summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2014-12-28 12:53:02 +0100
committerZolnai Tamás <zolnaitamas2000@gmail.com>2014-12-28 16:15:27 +0100
commit04fa50e39888926e1efdb52d46e6ab9bcd9cbea8 (patch)
tree58a5e4ddba7ffc34bf14e9843a4e7d48846a2994
parent9bfeeee0aac88d8215525a2a18280b5183b03b7f (diff)
Regression in rendering of flowChartPunchedTape custom shape
Regression from: 20f8006e21943b08f1f152e4a0359c9ebe4786f2 It's not a good idea to create the arc first in small resolution and scale it later, because the result won't be smooth (e.g. in case of flowChartPunchedTape). Both cloud and flowChartPunchedTape rendered well after that change. It seems the problem in case of cloud was with the arc tangent values which should be calculated based on the ARCANGLETO's original values before scaling. Change-Id: I0315afd0452108b6539b4b8ba271d1615810d985
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 9a669213ef7f..38478bbcb583 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1790,6 +1790,9 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
OSL_TRACE("ARCANGLETO angles: %f, %f --> parameters: %f, %f", fStartAngle, fSwingAngle, fT, fTE );
+ fWR *= fXScale;
+ fHR *= fYScale;
+
Rectangle aRect ( Point ( aStartPoint.getX() - fWR*cos(fT) - fWR, aStartPoint.getY() - fHR*sin(fT) - fHR ),
Point ( aStartPoint.getX() - fWR*cos(fT) + fWR, aStartPoint.getY() - fHR*sin(fT) + fHR) );
@@ -1799,8 +1802,8 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom(),
aStartPoint.X(), aStartPoint.Y(), aEndPoint.X(), aEndPoint.Y(), bClockwise);
basegfx::B2DPolygon aArc = CreateArc( aRect, bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, bClockwise, aStartPoint == aEndPoint && fSwingAngle > F_PI);
- // Now that we have the arc, move it to aStartPointB2D and also scale it.
- basegfx::B2DHomMatrix aMatrix = basegfx::tools::createScaleTranslateB2DHomMatrix(fXScale, fYScale, aStartPointB2D.getX(), aStartPointB2D.getY());
+ // Now that we have the arc, move it to aStartPointB2D.
+ basegfx::B2DHomMatrix aMatrix = basegfx::tools::createTranslateB2DHomMatrix(aStartPointB2D.getX(), aStartPointB2D.getY());
aArc.transform(aMatrix);
aNewB2DPolygon.append(aArc);
}