logicalDpiX/Y on QPixmap

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Sat Jan 28 20:47:05 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeremy Sanders schrieb:
> Hi -
> 
> I'm running the latest version of Q...3/Windows, compiled on Mingw on
> Windows XP (this also occured on 2000). If I print out the logicalDpiX()
> and logicalDpiY() on a QPaintDeviceMetrics object generated from a
> painter on a QPixmap, then I get really silly values (102 and 25 DPI for
> X and Y). On Linux it returned the Dpi of the screen (96 DPI).
> QPaintDeviceMetrics works for windows themselves. I should say that I'm
> using PyQt (though I don't think this is PyQt specific).
> 
> I include a PyQt program to demonstrate the problem. The two DPI values
> should be the same.
There was a small problem with
QPixmap::metric(QPaintDeviceMetrics::PdmDpiY). I've fixed this
(qpixmap_win.cpp rev. 1.1.2.13.2.41) and now the X and Y value should be
the same.
But I don't know why there is a difference to linux - do you maybe have
another resolution? But I think the calcualtions are correct.

Christian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFD28o4HAIuqbOiZ+kRAsDAAKDA+g1twhRyHDdsMdSmwN4cgr/GaACgmRfb
FXSh3nNVVedzeQXa1mwKnhw=
=jUwQ
-----END PGP SIGNATURE-----


More information about the kde-cygwin mailing list