[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: display-mm-width return value off on Windows
From: |
Jason Rumney |
Subject: |
Re: display-mm-width return value off on Windows |
Date: |
Thu, 06 Jul 2006 23:09:36 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) |
Ralf Angeli <address@hidden> writes:
> - cap = GetDeviceCaps (hdc, VERTSIZE);
> + height = round (GetDeviceCaps (hdc, VERTRES)
> + / GetDeviceCaps (hdc, LOGPIXELSY) * 25.4);
> - cap = GetDeviceCaps (hdc, HORZSIZE);
> + width = round (GetDeviceCaps (hdc, HORZRES)
> + / GetDeviceCaps (hdc, LOGPIXELSX) * 25.4);
Do these get any more accurate if you move the multiplication to
before the division?
cap = round (25.4 * GetDeviceCaps (hdc, VERTRES)
/ GetDeviceCaps (hdc, LOGPIXELSY));
If so, it might be worth changing. Otherwise, the results look just as
broken as what we have now. You may have found two cases where the
results were closer, but it does not follow that they will always be
so if they are still wildly inaccurate.
- Re: display-mm-width return value off on Windows, (continued)
- Re: display-mm-width return value off on Windows, David Kastrup, 2006/07/13
- Re: display-mm-width return value off on Windows, Richard Stallman, 2006/07/14
- Re: display-mm-width return value off on Windows, Stefan Monnier, 2006/07/14
- Re: display-mm-width return value off on Windows, David Kastrup, 2006/07/14
- Re: display-mm-width return value off on Windows, Stefan Monnier, 2006/07/14
- Re: display-mm-width return value off on Windows, Ralf Angeli, 2006/07/15
- Re: display-mm-width return value off on Windows, Ralf Angeli, 2006/07/16
- Re: display-mm-width return value off on Windows, Richard Stallman, 2006/07/14
- Re: display-mm-width return value off on Windows, Jan Djärv, 2006/07/09
- Re: display-mm-width return value off on Windows, Robert J. Chassell, 2006/07/08
Re: display-mm-width return value off on Windows,
Jason Rumney <=
Re: display-mm-width return value off on Windows, Robert J. Chassell, 2006/07/14