Re: how to convert metric to pixels
- From: Joshua Cranmer <Pidgeot18@xxxxxxxxxxxxxxx>
- Date: Sun, 28 Oct 2007 19:20:38 GMT
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
.
- Follow-Ups:
- Re: how to convert metric to pixels
- From: Eric Sosman
- Re: how to convert metric to pixels
- References:
- how to convert metric to pixels
- From: Rita Leon
- Re: how to convert metric to pixels
- From: Thomas Fritsch
- Re: how to convert metric to pixels
- From: Rita Leon
- Re: how to convert metric to pixels
- From: Eric Sosman
- how to convert metric to pixels
- Prev by Date: Re: how to convert metric to pixels
- Next by Date: Re: how to convert metric to pixels
- Previous by thread: Re: how to convert metric to pixels
- Next by thread: Re: how to convert metric to pixels
- Index(es):
Relevant Pages
|
|