mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 08:36:04 +02:00
Gtk2: fixed offset in Gtk2 polygon drawer. issue #23359
git-svn-id: trunk@39326 -
This commit is contained in:
parent
2316eaf3f4
commit
27b6c1f3a2
@ -6676,7 +6676,7 @@ var
|
|||||||
i: integer;
|
i: integer;
|
||||||
PointArray: PGDKPoint;
|
PointArray: PGDKPoint;
|
||||||
Tmp, RGN : hRGN;
|
Tmp, RGN : hRGN;
|
||||||
ClipRect : TRect;
|
R, ClipRect : TRect;
|
||||||
DCOrigin: TPoint;
|
DCOrigin: TPoint;
|
||||||
OldNumPts: integer;
|
OldNumPts: integer;
|
||||||
begin
|
begin
|
||||||
@ -6733,13 +6733,15 @@ begin
|
|||||||
DevCtx.TransfNormalize(ClipRect.Left, ClipRect.Right);
|
DevCtx.TransfNormalize(ClipRect.Left, ClipRect.Right);
|
||||||
DevCtx.TransfNormalize(ClipRect.Top, ClipRect.Bottom);
|
DevCtx.TransfNormalize(ClipRect.Top, ClipRect.Bottom);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// draw polygon area
|
// draw polygon area
|
||||||
DevCtx.FillRect(ClipRect, HBrush({%H-}PtrUInt(DevCtx.GetBrush)), False);
|
R := ClipRect;
|
||||||
|
LPtoDP(DC, R, 2);
|
||||||
|
DevCtx.FillRect(R, HBrush({%H-}PtrUInt(DevCtx.GetBrush)), False);
|
||||||
// restore old clipping
|
// restore old clipping
|
||||||
SelectClipRGN(DC, Tmp);
|
SelectClipRGN(DC, Tmp);
|
||||||
DeleteObject(Tmp);
|
DeleteObject(Tmp);
|
||||||
end
|
end else
|
||||||
else
|
|
||||||
begin
|
begin
|
||||||
DevCtx.SelectBrushProps;
|
DevCtx.SelectBrushProps;
|
||||||
gdk_draw_polygon(DevCtx.Drawable, DevCtx.GC, 1, PointArray, NumPts);
|
gdk_draw_polygon(DevCtx.Drawable, DevCtx.GC, 1, PointArray, NumPts);
|
||||||
|
Loading…
Reference in New Issue
Block a user