[Gambas-user] Picture.Fill() does not support transparent colors

Benoît Minisini gambas at ...1...
Wed Oct 10 22:09:40 CEST 2012


Le 10/10/2012 22:01, Adrien Prokopowicz a écrit :
> Hi Benoît,
>
> I'd like to fill (and clear) a picture with a transparent (or
> semi-transparent) color, but the Fill() method does not seems to take
> the alpha part into account (Color.Transparent gives me a plain white
> background). I attached a little test project.
>
> Is it a bug, or is it a known problem with the Qt API ? (as the GTK+
> renders it correctly)
>
> Regards,
> Adrien.
>

Picture cannot have an alpha channel, except with gb.qt4, and only if 
you convert an image with alpha channel to a picture. Because in that 
case Qt uses the XRender extension.

GTK+ does not use XRender, so I implemented Picture differently. Picture 
and Image are actually the same underlying object, and the image is 
converted to a picture internally only if really needed.

I have to implement that behaviour in gb.qt4 too, so that both 
components are compatible.

Regards,

-- 
Benoît Minisini




More information about the User mailing list