SOLVED NSPoint's global screen position onto glyph's view coordinate system
-
I'm testing out some stuff.
Is there a way to convert NSPoint's global-screen-position onto glyph's view coordinate system?Best,
R
-
thanks a lot!
-
that is possible:
convert the point first to the windows coordinate system
nsGlyphWindow.convertScreenToBase_
https://developer.apple.com/documentation/appkit/nswindow/1419414-convertscreentobase
then use the
nsGlyphView.convertPoint_fromView_
https://developer.apple.com/documentation/appkit/nsview/1483269-convertpoint?language=objc
and subtract the offset of the
nsGlyphView.offset()
(out of my head)