QGraphicsOpacityEffect::setOpacityMask(const QBrush & mask): black not 100% transparent and transparent not 100% opaque.
-
Got an issue with QGraphicsOpacityEffect::setOpacityMask(const QBrush & mask) the mask is a pixmap set with QBrush::(const QPixmap & pixmap) it contains a gradient Qt::black to Qt::transparent. On windows the black part is transparent and the transparent part is opaque with the mask applied, as it should be.
On Ubuntu Lucid and also with maemo with the latest qtsdk-2010.04 and latest NokiaSDK black is not 100% transparent and transparent is not 100% opaque. It seems to be the default opacity value (0.7) that gets applied to the mask it self. I tried to fix it with setting opacity to (1.0) before and after setting the mask. Result is that the black area is as it should 100% transparent, but the transparent area is totally black with the mask applied.
@QGraphicsOpacityEffect *effect_opacity = new QGraphicsOpacityEffect;
effect_opacity->setOpacityMask(QBrush(opacity_mask));
//effect_opacity->setOpacity(1.0);@Question am I doing something totally wrong and missed something, somehow, somewhere? Or is this a bug/feature? ;-)
-
[quote author="ucomesdag" date="1282779969"]black is not 100% transparent and transparent is not 100% opaque.[/quote]
Whut? I'm probably missing out on some detail here, but why would you want something that you define to be transparent (see-through) to end up opaque (not very see-through)?
-
[quote author="Franzk" date="1282801390"][quote author="ucomesdag" date="1282779969"]black is not 100% transparent and transparent is not 100% opaque.[/quote]
Whut? I'm probably missing out on some detail here, but why would you want something that you define to be transparent (see-through) to end up opaque (not very see-through)?
[/quote]
Dude I'm talking about the opacity mask. A black mask applies the effect and a transparent mask lets the image as is. So with an opcity mask, black will make the image transparent and transparent will leave the image as is, opaque as in not transparent. :-)
-
Reported it as a bug: http://bugreports.qt.nokia.com/browse/QTSDK-176