Converting View Coordinates
Converting View Coordinates
- Subject: Converting View Coordinates
- From: Alex Keresztes <email@hidden>
- Date: Wed, 16 Jan 2002 00:07:50 -0600
In my project I have my own custom view that overrides the
- (void)mouseDown: (NSEvent *)theEvent
so I can handle mouse clicks on that view.
I can get the screen coordinates on where the mouse was clicked by
[theEvent locationInWindow]
which returns an NSPoint.
My question is if there is any way to convert the coordinates from the
window coordinates to my
custom view's coordinates? I could potentially do this myself but I was
wondering if anyone knew of
any such functions?
Any help is appreciated.
Thanks
Alex