Re: Screen Resolution and Screen Size
Re: Screen Resolution and Screen Size
- Subject: Re: Screen Resolution and Screen Size
- From: j o a r <email@hidden>
- Date: Tue, 22 Nov 2005 08:27:06 +0100
On 22 nov 2005, at 08.20, m wrote:
Docs say that NSScreen's displayDescription method returns a
dictionary that is supposed to have an entry (key:
NSDeviceResolution) that describes the device's pixel density. You
should be able to back calculate the screen's physical dimensions
from that and the pixel dimensions.
Yes, if it weren't for the fact (?) that it _always_ returns 72 dpi [*].
I think that the bottom line is that Apple _can't_ provide this
information, because it _can't_ get it from the monitor. At least I'm
pretty sure that it wouldn't be possible for CRT and VGA monitors.
Perhaps it would be possible using LCD+DVI, I don't know enough to
say for sure.
j o a r
[*] Unless you've changed the resolution using the "resolution
independent UI" controls that are still in beta, and not supported in
Mac OS X. According to the Tiger AppKit release notes:
"Both NSWindow and NSScreen define a -deviceDescription method, This
method returns an NSDictionary containing a NSDeviceResolution key.
NSDeviceResolution has historically contained an NSSize of (72.0,
72.0). On a scaled system, NSDeviceResolution will contain an NSSize
of (72.0*userSpaceScaleFactor, 72.0*userSpaceScaleFactor)."
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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