You can obtain the current scale factor by calling: userSpaceScaleFactor] The only thing that make this value change is changing the scaling factor in the Quartz Debug utility, or if Apple ever turns on resolution-independent UI. ![]() This will currently give you an NSSize of for all screens, no matter what their actual PPI. You can ask a window for its resolution like so: NSDictionary* deviceDescription = You can use NSScreen to get the dimensions of the attached display(s) in pixels, but this won't give you the physical size/PPI of the display and in fact I don't think there are any APIs that will be able to do this reliably.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |