Re: [Gambas-user] Two problems painting richtext

2013-07-20 Thread Tobias Boege
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() fo

Re: [Gambas-user] Two problems painting richtext

2013-07-20 Thread Benoît Minisini
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

Re: [Gambas-user] Two problems painting richtext

2013-07-17 Thread Tobias Boege
On Wed, 17 Jul 2013, Fabien Bodard wrote: > In fact i fnt know what you want to achieve. So I've just trying to > understand and then make it in a good way. > What I want is to draw a box and richtext which is centered in that box. The whole picture shall fade from black to transparency in a Radi

Re: [Gambas-user] Two problems painting richtext

2013-07-17 Thread Fabien Bodard
In fact i fnt know what you want to achieve. So I've just trying to understand and then make it in a good way. Centering is different between draw and paint Then you can't center a richtext vertically. This make sens when wrap is active. And you have give a bad zone for centering. My way is not

Re: [Gambas-user] Two problems painting richtext

2013-07-17 Thread Tobias Boege
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,

Re: [Gambas-user] Two problems painting richtext

2013-07-16 Thread Fabien Bodard
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

[Gambas-user] Two problems painting richtext

2013-07-14 Thread Tobias Boege
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