[Gambas-user] Two problems painting richtext

Tobias Boege taboege at ...626...
Wed Jul 17 10:34:59 CEST 2013


On Tue, 16 Jul 2013, Fabien Bodard wrote:
> Public Sub dwgDrawRichText_Draw()
> 
>   Dim hExtent As PaintExtents
> 
> 
> 
>   Paint.Text("Align.Center OK.", 0, 0, Paint.Width, Paint.Height,
> Align.Center)
>   hExtent = Paint.PathExtents
>   Paint.Brush = Paint.RadialGradient(hExtent.X, hExtent.Y,
> Max(hExtent.Width, hExtent.Height), hExtent.X + hExtent.Width / 2,
> hExtent.y + hExtent.Height / 2, [Color.Black, Color.Transparent], [0.0,
> 1.0])
> 
>   Paint.Fill
>   Paint.Rectangle(hExtent.X - 5, hExtent.Y - 5, hExtent.Width + 10,
> hExtent.Height + 10)
>   Paint.Stroke()
> 
> End
> 

Makes sense (somehow) :-) Thanks. But is this the intended solution or just
a workaround?

Regards,
Tobi




More information about the User mailing list