[Qt-interest] [SOLVED] Re: QPainter drawPixmap , wired image scale problem
Aaron Lewis
aaron.lewis1989 at gmail.com
Sat Apr 17 15:52:25 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/17/2010 08:13 PM, Tilman Vogel wrote:
> Look at the documentation, e.g. with Qt Assistant (assistant):
>
> QRectF ( qreal x, qreal y, qreal width, qreal height )
>
> i.e. the last two parameters are not bottom/right but width/height.
> Your loop is producing larger and larger targets. That's must likely
> not what you want.
Oops , i take it as (x1,y1) and (x2,y2) , so bad.
>
> You could consider to use just this overload for painting:
>
> void QPainter::drawPixmap ( const QPoint & point, const QPixmap & pixmap )
>
> which just needs the target origin and keeps original scale. Use
> QPixmap::{width,height}() for reading the sizes.
>
I'd try with them.
Thanks Tilman ;-)
- --
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkvJvRkACgkQvf41sEptMqDbBgCdEgSTl1L9Z85tofwNO6Ewna84
UlEAniFzVOTuMTfzGYF6l40xOSsLbMPD
=7S0G
-----END PGP SIGNATURE-----
More information about the Qt-interest-old
mailing list