Skip navigation.
 
mlRe: Points
FROM : Steve Christensen
DATE : Sun Apr 08 23:00:23 2007

On Apr 8, 2007, at 1:26 PM, Ryan Brown wrote:

> [[NSScreen mainScreen] frame] reports the resolution of the main 
> screen in points. Points are defined to be 1/72th of an inch. If my 
> resolution is 1680x1050, [[NSScreen mainScreen] frame] returns 
> (1680, 1050) and if my resolution (hypothetically) is 10x10 it 
> returns (10, 10). But how can this be so? 10 pixels are being 
> mapped onto to my 21" screen (making each pixel > 1in), so the 
> number returned by [[NSScreen mainScreen] frame] should be 
> significantly higher. Why isn't it? Is there some level of 
> abstraction I'm missing?


The documentation on Apple's website (http://developer.apple.com/
documentation/Cocoa/Reference/ApplicationKit/Classes/NSScreen_Class/
Reference/Reference.html#//apple_ref/occ/instm/NSScreen/frame) says 
the following:

  frame

  Returns the dimensions and location of the receiver.

  - (NSRect)frame

  Return Value

  The full screen rectangle at the current resolution. This rectangle
  includes any space currently occupied by the menu bar and dock.


This suggests that we're talking pixels, not points.

steve

Related mailsAuthorDate
mlPoints Ryan Brown Apr 8, 22:26
mlRe: Points j o a r Apr 8, 22:52
mlRe: Points Steve Christensen Apr 8, 23:00
mlRe: Points Ryan Brown Apr 8, 23:04
mlRe: Points j o a r Apr 9, 00:24
mlRe: Points Ryan Brown Apr 9, 01:54