painting suggestions

Aaron J. Seigo aseigo at kde.org
Mon Sep 22 20:07:42 CEST 2008


On Sunday 21 September 2008, Riccardo Iaconelli wrote:
> On Monday 22 September 2008 02:04:04 Robert Knight wrote:
> > Fredrik has answered this one on techbase:
> >
> > http://techbase.kde.org/Development/Tutorials/Graphics/Performance#QPaint
> >er
> >
> >::setOpacity.28.29
>
> This changes the opacity of the start pixmap, while I want to decrease
> opacity just for that single painting operation, keeping the cached pixmap
> intact.
>
> So the two options are:
> a) create a copy of the cached pixmap and use the above trick on it.
> b) use QPainter::setOpacity()
>
> Which one is the cheapest?

you could always experiment with either valgrind or using QTimer ... but 
QPainter::setOpacity always defaults to a software path that renders into a 
local image, and so is likely to usually be slower.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080922/2414c34c/attachment-0001.sig 


More information about the Plasma-devel mailing list