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

git-svn-id: trunk@39326 -
This commit is contained in:
zeljko 2012-11-21 08:49:16 +00:00
parent 2316eaf3f4
commit 27b6c1f3a2

View File

@ -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);