Re: Converting Window coord to View coord
Re: Converting Window coord to View coord
- Subject: Re: Converting Window coord to View coord
- From: "John C. Randolph" <email@hidden>
- Date: Wed, 12 Mar 2003 20:34:11 -0800
On Wednesday, March 12, 2003, at 08:13 PM, Hisaoki Nishida wrote:
I can't seem to find a method in NSWindow that converts its window
coordinates to the coord of the view passed in as argument.
The lack of such method suggests that I am supposed to do this
manually?
I can see the method in NSView though:
convertPoint:toView:
- (NSPoint)convertPoint:(NSPoint)aPoint toView:(NSView *)aView
Converts aPoint from the receiver's coordinate system to that of aView.
If aView is nil, this method instead converts to window base
coordinates. Both aView and the receiver must belong to the same
NSWindow. Returns the converted point.
The method you want is [NSView -convertPoint:fromView:]
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.