From 070948cf181f2c8537d67ec38c3b97f5cb24a88d Mon Sep 17 00:00:00 2001 From: maxim Date: Wed, 8 Jun 2016 22:15:55 +0000 Subject: [PATCH] Merged revision(s) 52405 #04f0bf21ef from trunk: LCL: Fix default implementations of Arc, Chord and Pie functions. Issue #30194, patch from errno. ........ git-svn-id: branches/fixes_1_6@52457 - --- lcl/include/intfbaselcl.inc | 12 ++++++++++-- lcl/include/intfbasewinapi.inc | 6 +++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lcl/include/intfbaselcl.inc b/lcl/include/intfbaselcl.inc index 94146166da..89527d3ae5 100644 --- a/lcl/include/intfbaselcl.inc +++ b/lcl/include/intfbaselcl.inc @@ -569,18 +569,26 @@ function TWidgetSet.RadialArc(DC: HDC; left, top, right, bottom, sx, sy, ex, ey: Integer): Boolean; var A1, A2: Extended; + A2i : integer; begin Coords2Angles(left, top, right-left, bottom-top, sx, sy, ex, ey, A1, A2); - Result := Arc(DC, left, top, right, bottom, RoundToInt(A1), RoundToInt(A2)); + A2i := RoundToInt(A2); + if A2i = 0 then + A2i := 5760; + Result := Arc(DC, left, top, right, bottom, RoundToInt(A1), A2i); end; function TWidgetSet.RadialChord(DC: HDC; x1, y1, x2, y2, sx, sy, ex, ey: Integer): Boolean; var A1, A2: Extended; + A2i : integer; Begin Coords2Angles(x1, y1, x2-x1, y2-y1, sx, sy, ex, ey, A1, A2); - Result := AngleChord(DC, x1, y1, x2, y2, RoundToInt(A1), RoundToInt(A2)); + A2i := RoundToInt(A2); + if A2i = 0 then + A2i := 5760; + Result := AngleChord(DC, x1, y1, x2, y2, RoundToInt(A1), A2i); End; function TWidgetSet.RadialPie(DC: HDC; x1, y1, x2, y2, diff --git a/lcl/include/intfbasewinapi.inc b/lcl/include/intfbasewinapi.inc index a2c4e944d0..dd5d962590 100644 --- a/lcl/include/intfbasewinapi.inc +++ b/lcl/include/intfbasewinapi.inc @@ -1706,9 +1706,13 @@ function TWidgetSet.Pie(DC: HDC; x1, y1, x2, y2, sx, sy, ex, ey: Integer): Boolean; var A1, A2: extended; + A2i: integer; begin Coords2Angles(x1, y1, x2-x1, y2-y1, sx, sy, ex, ey, A1, A2); - Result := RadialPie(DC, x1, y1, x2, y2, RoundToInt(A1), RoundToInt(A2)); + A2i := RoundToInt(A2); + if A2i = 0 then + A2i := 5760; + Result := RadialPie(DC, x1, y1, x2, y2, RoundToInt(A1), A2i); end; function TWidgetSet.PolyBezier(DC: HDC; Points: PPoint; NumPts: Integer;