[Gambas-user] Two problems painting richtext

Tobias Boege taboege at ...626...
Sat Jul 20 12:36:52 CEST 2013


On Sat, 20 Jul 2013, Beno?t Minisini wrote:
> Le 14/07/2013 18:46, Tobias Boege a ?crit :
> > Hi,
> >
> > I want to paint richtext which is:
> >
> > a) fading in a RadialGradient (black towards transparency) and
> > b) centered in a rectangle.
> >
> > I can achieve a) when using Paint.RichText() followed by Paint.Fill(). But
> > with this code, the text is not centered (although I specified Align.Center
> > as a parameter to Paint.RichText()). This is a) without b).
> >
> > If I use Paint.DrawRichText(), the text is centered in the rectangle but the
> > RadialGradient brush does not take effect. This is b) without a).
> >
> > I hope this is a bug and I can do both at a time. :-) Project and screenshot
> > of the non-working result here are attached.
> >
> > Regards,
> > Tobi
> >
> 
> Paint.RichText() has been fixed in revision #5746.
> 
> Note that Paint.DrawRichText() does not take the brush into account in 
> gb.qt4 (only its color). You have to use Paint.RichText(). But 
> Paint.DrawRichText() is faster.
> 
> At the moment, I have no way to workaround this limitation of the Qt API.
> 

Thanks. It's not a critical path so Paint.RichText() is OK.

Regards,
Tobi




More information about the User mailing list