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