Qt-interest Archive, August 2006
[Feature request] QPainter.drawImage and alpha
Message 1 in thread
It would be great to add a parameter to the QPainter.drawImage()
functions to indicate a scale factor for the alpha of an image.
Currently, If I want to qpaint an image semi-transparently on a
qpaintdevice, I have to first get the alphaChannel of the image, scale
it, then put it back. This is overly costly, and affects all the pixel,
even if the QImage I paint end up covering few pixels on paint device.
I believe it would not be difficult, when a paint engine rasterizes the
image, to scale the alpha component with a given factor.
On an OpenGL based QPaintDevice, it would even have full hardware support.
Regards.
--
[ signature omitted ]