summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-02-14 22:53:53 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2017-02-15 16:48:56 +0000
commit61d5ff8fd96809a285f0e64817ef6fe4b8cdaa75 (patch)
tree540989778b7def70e836ad0a3f934cb4ab6a50f2
parent4bef184a4b88b7dbb4edf0ccde6bd5bff668e729 (diff)
tdf#106011: The "swing angle" is negative when counter-clockwise
Change-Id: I1ef77e4c8cf0a6d31b36411a79b576115c32c644 (cherry picked from commit 34d8dc19a08e2752a4b8d3b3d83b7cf3ac341f1c) Reviewed-on: https://gerrit.libreoffice.org/34284 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 4bad1d5f3abd..d63095410477 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1780,7 +1780,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
<< aStartPoint.Y() << " end: "
<< aEndPoint.X() << ", " << aEndPoint.Y()
<< " clockwise: " << int(bClockwise));
- basegfx::B2DPolygon aArc = CreateArc( aRect, bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, bClockwise, aStartPoint == aEndPoint && fSwingAngle > F_PI);
+ basegfx::B2DPolygon aArc = CreateArc( aRect, bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, bClockwise, aStartPoint == aEndPoint && ((bClockwise && fSwingAngle > F_PI) || (!bClockwise && fSwingAngle < -F_PI)));
// Now that we have the arc, move it to aStartPointB2D.
basegfx::B2DHomMatrix aMatrix = basegfx::tools::createTranslateB2DHomMatrix(aStartPointB2D.getX(), aStartPointB2D.getY());
aArc.transform(aMatrix);