[Lazarus] Fuzzy translations ignored

Giuliano Colla giuliano.colla at fastwebnet.it
Thu Sep 18 18:41:25 CEST 2014

Il 18/09/2014 14:55, Mattias Gaertner ha scritto:
> Are you saying, that Canvas.Pie is broken?
In short, yes.

Canvas.RadalPie on GTK2 and Windows works only clockwise, but provides a 
very poor image (more like a portion of an octagon that a portion of a 
Counterclockwise it generates the image of my previous e-mail.

Only on Qt I provided a patch to take advantage of the native 
QT_Painter, and RadialPie works properly, but by overriding 
Canvas.RadialPie (or, to be precise, TWidgetset.RadialPie).

Plain Canvas.Pie works differently for each widgetset: it is offset with 
respect to an Ellipse with the same parameters, but by a different 
amount depending on the widgetset. This is rather annoying, if you want 
to show the full circle, as it's usual.

I'd like to avoid code like this:

         Pie(PaintRect.Left, PaintRect.Top, W-2, H,
         Integer(Round(MiddleX * (1 - Cos(Angle)))),
         Integer(Round(MiddleY * (1 - Sin(Angle)))), MiddleX, 0);
        Pie(PaintRect.Left, PaintRect.Top, W-1, H-1,
        Integer(Round(MiddleX * (1 - Cos(Angle)))),
        Integer(Round(MiddleY * (1 - Sin(Angle)))), MiddleX, 0);

What I'd like to do, if nobody else wants to take care of the matter, is 
to try to put things in order, and achieve a consistent and predictable 
behavior with all widgetsets, starting from GraphMath.

Most likely it happened a number of time what I've done recently: 
RadialPie wasn't working in a satisfactory way, and I've just taken 
advantage of the native Qt implementation, but maybe I've broken 
something else in the process, because Pie was just using RadialPie.

I'm not a fan of Delphi compatibility, but in that case, as there a 
number of arbitrary decisions to take, I'd take Delphi look as a 
guideline: a Pie, RadialPie, Arc, etc. should just look, with the same 
parameters, the same as it looks in Delphi.

Another thing that I'd like to do is to add to Canvas support for 
antialiasing, which provides a more pleasant look to lines, circles, 
ellipses etc. as expected by modern users, accustomed to modern graphic 

Of course, unless someone else wants to do it.


More information about the Lazarus mailing list