Re: how to convert metric to pixels



Patricia Shanahan wrote:
I'm typing this on a laptop with an external display connected, in
extended desktop mode, and the composition window placed so that it lies
across the boundary between the displays. The two displays have
different characteristics. What is the pixel size for this window?

On most Windows computers, the answer will be 96 dpi: the value is controlled by a setting in Display Properties->Settings->Advanced, and very few people actually change it.

The getScreenResolution() should come with a note that it relies on the OS reporting correct information. I don't know about how X or mac's equivalent handles this data, but at least Windows will probably report incorrect information.

I'm curious about the ultimate motive for caring about the size in
inches, as distinct from whether the user want to zoom in or out.

I would think that most implementations that absolutely need to deal with being able to size uniform measurements have other means to work with it other than relying on OS information. Then again, this is not an area I have experience in.

--
Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
.



Relevant Pages

  • Re: how to convert metric to pixels
    ... extended desktop mode, and the composition window placed so that it lies ... What is the pixel size for this window? ... and vertically (30 dots/cm and 28.1+ dots/cm). ...
    (comp.lang.java.help)
  • Re: Restore Down button
    ... using extended desktop mode. ... Restore Down acts like Minimize. ... Probably the restored window is positioned somewhere outside the screen area. ... empty section of the taskbar and choose one of the Tile options. ...
    (microsoft.public.word.docmanagement)
  • Re: How to fullscreen a window and eliminate the "CLOSE" button
    ... CLOSE button still lies there. ... > CS_NOCLOSE Disables Close on the window menu. ... > which can solve the second question. ...
    (microsoft.public.pocketpc.developer)