Re: Converting HIPoints to CGPoints/NSPoints in global space?
Re: Converting HIPoints to CGPoints/NSPoints in global space?
- Subject: Re: Converting HIPoints to CGPoints/NSPoints in global space?
- From: Scott Thompson <email@hidden>
- Date: Mon, 13 Feb 2006 13:03:25 -0600
On Feb 12, 2006, at 3:16 PM, Dave MacLachlan wrote:
Sorry...
HIPoints in general are relative to 0,0 in the upper left.
NSPoints (and CGPoints) are relative to 0,0 in the lower left.
so an HIPoint at x,y coordinates is equivalent to an NSPoint at
x,displaysheight - y
The question is an easy way of figuring out exactly how high the
display height is, especially in the case of multiple monitors.
Currently I'm looping through the displays, but there's got to be a
better way of doing it.
Ah... that could be problematic. Particularly since there may be
more than one display that contains a given point.
I'd start with CGGetDisplaysWithPoint and CGDisplayBounds.
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden