summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2018-11-14 14:30:49 +0100
committerRegina Henschel <rb.henschel@t-online.de>2018-11-16 17:45:48 +0100
commitc4c1636b5132261e64492de38f252b19b77e69b8 (patch)
tree01ac0188baf7601d770431aa48ebf164697f92d4 /include
parent90b93b6964e922fcc4aaadf06278edc0e10af925 (diff)
tdf#121305 Increase accuracy of custom shape circle
The old implementation has used 4 segments and a questionable control point distance. The patch changes this to use the common implementation in basegfx. The method in basegfx is extended to allow to set the start quarter, so that the custom shape circle can get the same start quarter as it has before. The method descriptions in basegfx are adapted to the current implementation. Change-Id: I3a40f81827227ee0037d336bdf3c1ec6fdd64b4b Reviewed-on: https://gerrit.libreoffice.org/63366 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Diffstat (limited to 'include')
-rw-r--r--include/basegfx/polygon/b2dpolygontools.hxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/basegfx/polygon/b2dpolygontools.hxx b/include/basegfx/polygon/b2dpolygontools.hxx
index 2f5641bb1581..57b9130b4399 100644
--- a/include/basegfx/polygon/b2dpolygontools.hxx
+++ b/include/basegfx/polygon/b2dpolygontools.hxx
@@ -231,7 +231,7 @@ namespace basegfx
/** Create a circle polygon with given radius.
This method creates a circle approximation consisting of
- four cubic bezier segments, which approximate the given
+ 12 cubic bezier segments, which approximate the given
circle with an error of less than 0.5 percent.
@param rCenter
@@ -260,7 +260,7 @@ namespace basegfx
/** Create an ellipse polygon with given radii.
This method creates an ellipse approximation consisting of
- four cubic bezier segments, which approximate the given
+ 12 cubic bezier segments, which approximate the given
ellipse with an error of less than 0.5 percent.
@param rCenter
@@ -271,8 +271,11 @@ namespace basegfx
@param fRadiusY
Radius of the ellipse in Y direction
+
+ @param nStartQuadrant
+ With Y down on screens, 0 = 3 o'clock, 1 = 6 o'clock, 2 = 9 o'clock, 3 = 12 o'clock
*/
- BASEGFX_DLLPUBLIC B2DPolygon createPolygonFromEllipse( const B2DPoint& rCenter, double fRadiusX, double fRadiusY );
+ BASEGFX_DLLPUBLIC B2DPolygon createPolygonFromEllipse( const B2DPoint& rCenter, double fRadiusX, double fRadiusY, sal_uInt32 nStartQuadrant = 0);
/** Create an unit ellipse polygon with the given angles, from start to end
*/