• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSView -backingAlignedRect:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSView -backingAlignedRect:
      • From: Uli Kusterer <email@hidden>
    • Re: NSView -backingAlignedRect:
      • From: Andy Lee <email@hidden>
References: 
 >NSView -backingAlignedRect: (From: Dave Keck <email@hidden>)
 >Re: NSView -backingAlignedRect: (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Finder Info
  • Next by Date: Re: NSView -backingAlignedRect:
  • Previous by thread: Re: NSView -backingAlignedRect:
  • Next by thread: Re: NSView -backingAlignedRect:
  • Index(es):
    • Date
    • Thread