Hi,
I have this code in my TAChart.
...
Rgn : HRGN;
p: array[0..1] of TPoint;
begin
if FSeries.Count = 0 then Exit;
//set cliping region so we don't draw outsite
p[0].x := XImageMin;
p[0].y := YImageMax;
p[1].x := XImageMax;
p[1].y := YImageMin;
{$IFDEF windows}
LPtoDP(Canvas.Handle, p, 2);
{$ENDIF}
Rgn := CreateRectRgn(p[0].x, p[0].y, p[1].x, p[1].y);
SelectClipRgn (Canvas.Handle, Rgn);
...
Since SelectClipRgn assumes that the coordinates for a region are
specified in device units (in windows) I have to do the IFDEF.
As Vincent told me in the issue 0009530:
"I have no answers, but the fact that you need to use LPtoDP on windows
only, doesn't look right to me.
Maybe a better solution can be found, for example converting LP to DP in
the CreateRectRgn wrapper."
Can someone please tell me a better solution.
Thanks,
Luís Rodrigues
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives