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 the only way. ... You can center by hand too. Calculate the pos in _draw not in _arrange. Le 17 juil. 2013 10:36, "Tobias Boege" <[email protected]> a écrit : > 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 > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
