Created
August 18, 2011 11:44
-
-
Save skahack/1153914 to your computer and use it in GitHub Desktop.
NSViewの座標系変換
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// self = NSView | |
//NSRect rect; | |
// 画面左下が起点の座標系に変換 | |
rect = [self convertRectToBase:rect]; | |
// スクリーン座標系に変換 | |
rect.origin = [[self window] convertBaseToScreen:rect.origin]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment