[Gambas-user] How do I replace Image transparent background with a white background?

RICHARD WALKER richard.j.walker at ...247...
Tue Sep 18 23:48:31 CEST 2012


OK Benoît,
I have rebuilt gambas3-3.1.1, which is the version distributed with
Mageia 2, with the patch I derived from your modified
gb.gtk/src/CClipboard.cpp file in revision 5175. It works just fine
(sort of - see later) and I have registered an appropriate Mageia bug
(Bug 7522) which will hopefully make this fix available to other
Gambas users in the Mageia community. No doubt the version of Gambas
to be released with Mageia 3 will be post revision 5175 (my
anglo-saxon fingers are crossed; south africans hold thumbs, I
believe. Is there a standard Euro-gesture?).

Now that I can paste a Gambas-processed image using either qt4 or gtk
I can see that there is a difference in the way these toolkits support
the PaintImage method of the Image class. The gb.qt4 way is pretty
much what the manual says. The gb.gtk method does not implement any
anti-aliasing and is much less refined looking. Seems I will have to
go on using the qt4 version for a while longer. Nevertheless, for
ordinary purposes not involving conversion from transparent to opaque
backgrounds it should be usable.

The stranger thing is what happens when you substitute DrawImage for
PaintImage in each toolkit. The raggedness of the gtk PaintImage is
echoed by the qt4 DrawImage and the smoothness of the qt4 PaintImage
is rivalled by the smoothness of the gtk DrawImage. Mind-bending
stuff! If you are as confused as I was then please have a look at the
attached Lbreoffice doc...

Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gambascopyfromclipboard.odt
Type: application/vnd.oasis.opendocument.text
Size: 92006 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20120918/ffaf214c/attachment.odt>


More information about the User mailing list