• 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: Pixel Size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pixel Size


  • Subject: Re: Pixel Size
  • From: "Dmitry Savenok" <email@hidden>
  • Date: Fri, 29 Sep 2006 14:16:43 +0300
  • Organization: Eltima

replace in code NSDeviceSize to NSDeviceResolution and you give "An NSValue that contains an NSSize which indicates the device’s resolution in dots per inch (dpi)."

On 28 Sep 2006, at 14:37, Dmitry Savenok wrote:

try this
width = [[[[_window screen] deviceDescription] objectForKey:NSDeviceSize] sizeValue].width;
height = [[[[_window screen] deviceDescription] objectForKey:NSDeviceSize] sizeValue].height;
width, height - screen size in pixels

Thanks very much. But, as you certainly know, the size of a pixel is computed as
screen width in mm / screen width in pixels and screen height in mm / screen height in pixels.


So the next question: How do I get the screen dimensions in mm (or any other length unit) ?

Or, if this is not possible: How can I get at least some unique identifier for an NSScreen (like "display of 12 inch G4 iBook" or: "Apple Studio Display Model xxx") ?

Kind regards

Gerriet.


Is there a way to get the size of a pixel (or dpi) of an NSScreen?

I am NOT interested in [NSScreen deviceDescription] which - obviously without making any real effort of getting at the truth - just returns an arbitrary value of 72 dpi for all screens.

So: is there some function somewhere which really tells the truth about screen resolution?


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Pixel Size (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Pixel Size (From: "Dmitry Savenok" <email@hidden>)
 >Re: Pixel Size (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: cursor control fun
  • Next by Date: Re: Help Book not working
  • Previous by thread: Re: Pixel Size
  • Next by thread: CoreData Undo in Modal Dialog
  • Index(es):
    • Date
    • Thread