[Gambas-user] [gambas-user] Possible bug in gb.gui

Benoît Minisini gambas at ...1...
Sun Dec 14 22:42:09 CET 2014


Le 14/12/2014 21:10, Paul Horechuk a écrit :
> OK, then let's rephrase that slightly. The gb.gtk component does not
> behave the same as the gb.qt4 component. If I disable the capability to
> autodetect the environment and force the use of gb.qt4, then everything
> works. Hence, the problem is within gb.gtk. As part of setting the taget
> environment then I have to install the base qt4 libraries as a minimum,
> or install perhaps a full KDE desktop.
> ...

OK, I understood: the gb.gtk paint library (cairo) does not support 
painting images while the current path has not be stroke or filled, 
which is what you are doing.

You create the path of all your labels, and then you call Paint.Stroke 
once at the end. But you mix calls to Paint.DrawImage in the middle, and 
Paint.DrawImage will fill the current path with the drawn image (so the 
strange patterns in the text).

1) You must call Paint.Stroke before (in the time, not in the code) 
calling Paint.DrawImage.

2) Why do you call Paint.Stroke? You should call Paint.Fill, shouldn't you?

Qt4 does not have that problem, as the image drawing routine is 
completely separated from the path drawing routines.

Regards,

-- 
Benoît Minisini




More information about the User mailing list