I have NSImageView inside NSScrollView on MAC. I subclass NSImageView and capture mouse down event.
But the coordinates keep changing depending if the NSScrollView is panned or zoomed even if I click on the same point in image.
How can I get a consistent mouse coordinate when zoomed or panned, here is my non working code.
-(void)mouseDown:(NSEvent *)theEvent
{
NSPoint currentLocation = [theEvent locationInWindow];
NSPoint locationInView = [scrollView convertPoint:currentLocation fromView:self];
[super mouseDown:theEvent];
}
Anybody???