On Aug 25, 2012, at 11:38 AM, Fritz Anderson <[email protected]> wrote:

> On 24 Aug 2012, at 8:17 PM, Dave Keck <[email protected]> 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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to