Re: how to convert metric to pixels



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/
.



Relevant Pages

  • Re: Internet Explorer Pictures
    ... > Change the DPI setting from Large to Normal and see if that helps. ... > The mk key is created by Windows and the others may be created by some other ... > unchecked to display pictures all the time. ... > 4) Click Delete Files under Temporary Internet Files and then press OK ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • RE: why is print layout different to print review
    ... I was missing about half inch right and bottom. ... > If it's more like half an inch, then it's probably because the Windows XP ... > printer driver for your printer can't print as close to the edge of the page ... > If it's more like two inches, then I think it's still an issue with tracked ...
    (microsoft.public.word.pagelayout)
  • RE: why is print layout different to print review
    ... If it's more like half an inch, then it's probably because the Windows XP ... Windows ME because Windows XP uses a different printer driver for your ... If it's more like two inches, then I think it's still an issue with tracked ...
    (microsoft.public.word.pagelayout)
  • Re: Text and Buttons in Dialog Boxes Dont Fit Properly.
    ... Is your DPI setting at 96? ... Microsoft MVP [Windows XP Shell/User] ... I'm not suer what my iu locale is or how to cahnge it ...
    (microsoft.public.windowsxp.customize)
  • Re: Little box with red X on website wont work (hyperlink)
    ... How do I change screen resolution and/or font size using Windows XP? ... Replies are posted only to the newsgroup for the benefit or other readers. ... >> Fuzzy Text and fuzzy web graphics ... >> Change the DPI setting from Large to Normal and see if that helps. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)