Commit 27b6c1f3 authored by Željan Rikalo's avatar Željan Rikalo 🏊🏼
Browse files

Gtk2: fixed offset in Gtk2 polygon drawer. issue #23359

git-svn-id: trunk@39326 -
parent 2316eaf3
......@@ -6676,7 +6676,7 @@ var
i: integer;
PointArray: PGDKPoint;
Tmp, RGN : hRGN;
ClipRect : TRect;
R, ClipRect : TRect;
DCOrigin: TPoint;
OldNumPts: integer;
begin
......@@ -6733,13 +6733,15 @@ begin
DevCtx.TransfNormalize(ClipRect.Left, ClipRect.Right);
DevCtx.TransfNormalize(ClipRect.Top, ClipRect.Bottom);
end;
// 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
SelectClipRGN(DC, Tmp);
DeleteObject(Tmp);
end
else
end else
begin
DevCtx.SelectBrushProps;
gdk_draw_polygon(DevCtx.Drawable, DevCtx.GC, 1, PointArray, NumPts);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment