I'm drawing a NSBezierPath line on my NSImageView. I'm creating NSBezierPath object, setting moveToPoint
, setting lineToPoint
, setting setLineWidth:
and after that in drawRect
of my NSImageView
subclass I'm calling [myNSBezierPath stroke]
. It all works just like I want, but I can't seem to use containsPoint:
method... I tried implementing
if([myNSBezierPath containsPoint:[theEvent locationInWindow]]{
//do something
}
in -(void)mouseUp:(NSEvent*)theEvent
of my NSImageView subclass but it's never reacting and I'm sure I'm hitting that line... Am I doing something wrong? I just need to detect if NSBezierPath is being clicked.
Cheers.