[Qt-interest] Semi-transparent pixmap
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Thu Feb 25 11:01:04 CET 2010
Jugdish wrote on Wednesday, February 24, 2010 7:00 PM:
> ...
> QPixmap::createMaskFromColor(). So I know that the painter is looking
> at the pixmap's alpha channel when painting it, but for some reason
> it seems to only acknowledge 0 or 1 alpha values.
Without looking at the actual Qt implemenation, but I don't think that from the fact that the painter respects the mask you can derive that it also looks at the alpha channel. I think that the 'mask' and the 'alpha' channel are two *different* concepts: I believe the 'mask' is really a separate "boolean"-bitmap which specifies where to draw (completely) and were not. This concept - if it is really implemented like that - would allow to specify a pixmap with both alpha channel and a mask, even though this information would be somewhat redundant, because you could always just use an alpha mask which would contain the same information. But maybe there are graphic cards with special hardware support for simple bitmap masks (and hence it would make sense to keep a separate mask bitmap)?
Anyway, this does not answer your concrete question ;)
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list