Re: NSView's origin
Re: NSView's origin
- Subject: Re: NSView's origin
- From: Shawn Erickson <email@hidden>
- Date: Sun, 26 Nov 2006 18:34:37 -0800
On Nov 26, 2006, at 6:01 PM, Aaron Boothello wrote:
I have gone over the coordinate system stuff... but i can seem to
find the method which return the origin of an NSView in a window. i
know there is a method with lets you change the origin, but there's
no where to determine where the origin actually is.
-[NSView frame] gives you the views frame which contains the origin
of the view in its super views coordinate space and then use
convertPoint:toView: to convert to window coordinates.
For example...
NSPoint originInWindowCoordinates;
originInWindowCoordinates = [self convertPoint:[myGLView
frame].origin toView:nil];
...however you likely only need to do calculations in terms of the
top level content view and if your gl views are all peers (have the
same super view) you likely don't need to do any conversion of the
frame.
-Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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