Re: NSView -backingAlignedRect:
Re: NSView -backingAlignedRect:
- Subject: Re: NSView -backingAlignedRect:
- From: Andy Lee <email@hidden>
- Date: Sat, 25 Aug 2012 12:05:39 -0400
On Aug 25, 2012, at 11:38 AM, Fritz Anderson <email@hidden> wrote:
> On 24 Aug 2012, at 8:17 PM, Dave Keck <email@hidden> wrote:
>
>> Regarding the NSRect returned from -backingAlignedRect:options:, the
>> NSView documentation states:
>>
>> The rectangle is in window coordinates.
>>
>> Is this a documentation error? I would expect the returned rect to be
>> in local view coordinates.
>
> Why? It's a method of NSScreen. The screen doesn't know about views.
Well, it's a method on three classes. The NSScreen docs say:
"Converts a rectangle in global screen coordinates to a pixel aligned rectangle."
with the input rect being "in global screen coordinates".
The NSWindow and NSView docs are identical and both say:
"Returns a backing store pixel aligned rectangle in window coordinates."
with the input rect being "in view coordinates".
The NSWindow docs must be wrong (looks like a copy-paste error), since it's never specified *which* view's coordinates are used. The other docs might be wrong too for all I know; hard to speculate since I don't know what this method is used for.
--Andy
_______________________________________________
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