diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2006-11-14 13:05:29 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2006-11-14 13:05:29 +0000 |
commit | 050ba5389ab6c0f346a44e835cd0e5e9a7872c9c (patch) | |
tree | eb9297e53031c7396c5fc4272308738818206c7f /basegfx/inc/basegfx/polygon/b2dpolygontools.hxx | |
parent | 19a69efa6fb9557ef07e9c80533f32cd7e669d12 (diff) |
INTEGRATION: CWS aw024 (1.14.2); FILE MERGED
2006/11/01 10:06:04 aw 1.14.2.11: #i67360# corrected isInside to work correctly when bWithBorder==true with horizontal touches. Added a solo isPointOnPolygon test for that
2005/11/18 18:56:03 aw 1.14.2.10: RESYNC: (1.18-1.19); FILE MERGED
2005/09/19 21:34:43 aw 1.14.2.9: RESYNC: (1.17-1.18); FILE MERGED
2005/07/13 11:10:47 aw 1.14.2.8: #114176#
2005/06/03 11:53:09 aw 1.14.2.7: #i39532#
2005/05/13 16:29:26 aw 1.14.2.6: RESYNC: (1.16-1.17); FILE MERGED
2005/05/12 16:35:25 aw 1.14.2.5: #i39529#
2005/04/26 14:48:36 aw 1.14.2.4: #i39528#
2005/03/24 01:10:06 aw 1.14.2.3: RESYNC: (1.14-1.16); FILE MERGED
2005/02/02 20:59:38 aw 1.14.2.2: #i39528#
2004/12/23 16:49:20 aw 1.14.2.1: #i39525
Diffstat (limited to 'basegfx/inc/basegfx/polygon/b2dpolygontools.hxx')
-rw-r--r-- | basegfx/inc/basegfx/polygon/b2dpolygontools.hxx | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx index fe0c5865898a..21d74649b811 100644 --- a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx +++ b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx @@ -4,9 +4,9 @@ * * $RCSfile: b2dpolygontools.hxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: kz $ $Date: 2005-11-02 13:53:36 $ + * last change: $Author: ihi $ $Date: 2006-11-14 14:05:29 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -279,6 +279,41 @@ namespace basegfx */ B2DPolygon createPolygonFromEllipse( const B2DPoint& rCenter, double fRadiusX, double fRadiusY ); + /** append a unit circle with one point and the control vectors to the given polygon + */ + void appendUnitCircleQuadrant(B2DPolygon& rPolygon, sal_uInt32 nQuadrant, bool bEndPoint); + + /** append a segment of unit circle with one point and the control vectors to the given polygon + */ + void appendUnitCircleQuadrantSegment(B2DPolygon& rPolygon, sal_uInt32 nQuadrant, double fStart, double fEnd, bool bEndPoint); + + /** create a polygon which describes the unit circle and close it + */ + B2DPolygon createPolygonFromUnitCircle(); + + /** Create an ellipse polygon with given radii. + + This method creates an ellipse approximation consisting of + four cubic bezier segments, which approximate the given + ellipse with an error of less than 0.5 percent. + + @param rCenter + Center point of the circle + + @param fRadiusX + Radius of the ellipse in X direction + + @param fRadiusY + Radius of the ellipse in Y direction + + @param fStart + Start angle where the ellipe segment starts in the range [0.0 .. 2PI[ + + @param fEnd + End angle where the ellipe segment ends in the range [0.0 .. 2PI[ + */ + B2DPolygon createPolygonFromEllipse( const B2DPoint& rCenter, double fRadiusX, double fRadiusY ); + /** Create an ellipse polygon with given radii and the given angles, from start to end This method creates an ellipse approximation consisting of @@ -376,6 +411,10 @@ namespace basegfx // calculates if given point is on given line, taking care of the numerical epsilon bool isPointOnLine(const B2DPoint& rStart, const B2DPoint& rEnd, const B2DPoint& rCandidate, bool bWithPoints = false); + // calculates if given point is on given polygon, taking care of the numerical epsilon. Uses + // isPointOnLine internally + bool isPointOnPolygon(const B2DPolygon& rCandidate, const B2DPoint& rPoint, bool bWithPoints = true); + // test if candidate is inside triangle bool isPointInTriangle(const B2DPoint& rA, const B2DPoint& rB, const B2DPoint& rC, const B2DPoint& rCandidate, bool bWithBorder = false); |