Re: how to convert metric to pixels
- From: Knute Johnson <nospam@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 26 Oct 2007 15:16:26 -0700
Rita Leon wrote:
On Fri, 26 Oct 2007 10:59:07 GMT, Roedy Green
<see_website@xxxxxxxxxxxxxxxxxxxx> wrote:
This must be it. thank you.
int dpi = Toolkit.getDefaultToolkit().getScreenResolution();
see http://mindprod.com/jgloss/resolution.html
http://mindprod.com/jgloss/coordinates.html
There is more to it than that. Windows keeps a DPI setting but it doesn't really reflect the actual size of the screen in inches. On my XP computer the DPI setting is 96 dots per inch and that is what is returned by Toolkit.getScreenResolution(). My screen is set for 1024x768 and it is 13 1/4 inch by 10 3/4 inch. At 96 DPI the screen should be 10 2/3 x 8 inches. As far as I know there is no way to actually determine how many pixels will make up an inch on your display.
--
Knute Johnson
email s/nospam/knute/
.
- References:
- how to convert metric to pixels
- From: Rita Leon
- Re: how to convert metric to pixels
- From: Roedy Green
- Re: how to convert metric to pixels
- From: Rita Leon
- how to convert metric to pixels
- Prev by Date: Re: how to convert metric to pixels
- Next by Date: Help with Vista error
- Previous by thread: Re: how to convert metric to pixels
- Next by thread: Re: how to convert metric to pixels
- Index(es):
Relevant Pages
|
|