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

RICHARD WALKER richard.j.walker at ...247...
Mon Sep 17 14:47:08 CEST 2012


Benoît,

1. Please ignore all comments relating to the behaviour of the
FontChooser thing. I am coding this as a minor birthday present for my
brother who likes things to be done for him in a program, so I have
made the FontChooser a bit more ... adaptable and so caused the
runaway expansion of the example text box where the font size is
previewed.

2. As both brother and I use the LXDE desktop we are seldom troubled
by differences between qt4 and gtk as everything defaults to gtk. I
just "discovered" the GB_GUI environment variable while exploring the
OnScreenDisplay example project so I have recently been trying all
sorts of little program doodles I have written with both settings to
see if it might improve/change some quirks I may have coded around (or
attempted to).

3. Example project attached. As shipped it is set for qt4 (although on
my system the compiled version still uses gtk!?)

The PaintImage differences can be seen by creating any sort of image
with the program and clicking on the "Copy" button before pasting the
image into, for example, Libreoffice Writer. With qt4 we get a
beautifully blended image on a white background. With gtk we get some
white, some black and random coloured dots, perhaps even some
recognisable shapes of the image.

The "Save" button dumps a copy with alpha intact into your ~/Pictures directory.

The "Icon" button lets you browse for svg or png graphics to be
included in the composition (it is still very crude in positioning the
graphic). A couple of "suitable" images are included in the source
directory.

The text box lets you enter your own few words which may be coloured
and shaped/sized with the Font/Colour button - just go easy when
winding up the font size. If it gets too big you can fix it after
clicking the panic button.

Aside from subtle differences in the precise way the FontChooser thing
adjusts itself when I increase the size of the example text box the
only display niggle is the arrow buttons on the SpinBox - qt4 displays
them each at half the height of the SpinBox, gtk doesn't.

I have noted other minor differences, not evidenced in this project,
and one which is; on program startup ( the screen opens near the mouse
pointer ), with the task bar and the mouse at the top of the screen,
the qt4 version will hide the title bar of the window under the panel.
The gtk version places it correctly just below the panel.

And Finally:
[System]
OperatingSystem=Linux
Kernel=3.2.16-0.rt27.1.mga2
Architecture=x86_64
Memory=3092992 kB
DistributionVendor="Mageia"
DistributionRelease="Mageia 2"
Desktop=LXDE

[Gambas 3]
Version=3.1.1
Path=/usr/bin/gbx3


Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SplashDesigner-1.0.2.tar.gz
Type: application/x-gzip
Size: 26791 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20120917/997b0063/attachment.bin>


More information about the User mailing list