Re: CGDisplayBounds vs NSSCreen visibleFrame
Re: CGDisplayBounds vs NSSCreen visibleFrame
- Subject: Re: CGDisplayBounds vs NSSCreen visibleFrame
- From: Trygve Inda <email@hidden>
- Date: Sun, 27 Jul 2008 00:04:57 +0000
- Thread-topic: CGDisplayBounds vs NSSCreen visibleFrame
The previous code was written in mail. Real code here:
Given an CGDirectDisplayID for an auxScreen, get its frame in modern (0,0 is
bottom left) coordinates.
CGRect auxScreenRect = CGDisplayBounds (displayID);
CGRect mainScreenRect = CGDisplayBounds (CGMainDisplayID ());
auxScreenRect.origin.y = -1 *
(auxSreenRect.origin.y + auxScreenRect.size.height -
mainScreenRect.size.height);
// -1 * (924 + 1050 - 1200) = -774
Seems to work, but it'd be nice if there were a more direct way to obtain
this.
TRygve
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden