diff options
author | Oliver Bolte <obo@openoffice.org> | 2007-07-18 10:03:01 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2007-07-18 10:03:01 +0000 |
commit | e87ef674b04f3bf0b02f4ec95f095f6451bfb352 (patch) | |
tree | 8c8dff0971ad68a4ec5224b7438f204850ae320c /basegfx | |
parent | 1242d5e27a6180e05a100203e40e3cca65df6bd4 (diff) |
INTEGRATION: CWS aw051 (1.20.24); FILE MERGED
2007/06/12 16:28:20 aw 1.20.24.4: #i77162# Continued adaptions to bezier handling
2007/06/08 14:37:22 aw 1.20.24.3: #i77162# adaptions to changed B2DPolygon bezier handling
2007/06/06 15:49:29 aw 1.20.24.2: #i77162# B2DPolygin control point interface changes
2007/05/10 09:48:43 aw 1.20.24.1: #i76891#
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/inc/basegfx/polygon/b2dpolygontools.hxx | 53 |
1 files changed, 18 insertions, 35 deletions
diff --git a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx index 21d74649b811..d9919bd75486 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.20 $ + * $Revision: 1.21 $ * - * last change: $Author: ihi $ $Date: 2006-11-14 14:05:29 $ + * last change: $Author: obo $ $Date: 2007-07-18 11:03:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -70,6 +70,10 @@ namespace basegfx { // B2DPolygon tools + // open/close with point add/remove and control point corrections + void openWithGeometryChange(B2DPolygon& rCandidate); + void closeWithGeometryChange(B2DPolygon& rCandidate); + /** Check if given polygon is closed. This is kind of a 'classic' method to support old polygon @@ -250,42 +254,13 @@ namespace basegfx */ B2DPolygon createPolygonFromCircle( const B2DPoint& rCenter, double fRadius ); - /** 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 + /** append given unit circle quadrant with start point, the control vectors and end point to the given polygon */ - B2DPolygon createPolygonFromEllipse( const B2DPoint& rCenter, double fRadiusX, double fRadiusY ); + void appendUnitCircleQuadrant(B2DPolygon& rPolygon, sal_uInt32 nQuadrant); - /** append a unit circle with one point and the control vectors to the given polygon + /** append a segment of unit circle with start point, the control vectors and end point 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); + void appendUnitCircleQuadrantSegment(B2DPolygon& rPolygon, sal_uInt32 nQuadrant, double fStart, double fEnd); /** create a polygon which describes the unit circle and close it */ @@ -428,6 +403,14 @@ namespace basegfx bool isPolyPolygonEqualRectangle( const ::basegfx::B2DPolyPolygon& rPolyPoly, const ::basegfx::B2DRange& rRect ); + // #i76891# Try to remove existing curve segments if they are simply edges + B2DPolygon simplifyCurveSegments(const B2DPolygon& rCandidate); + + // makes the given indexed point the new polygon start point. To do that, the points in the + // polygon will be rotated. This is only valid for closed polygons, for non-closed ones + // an assertion will be triggered + B2DPolygon makeStartPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndexOfNewStatPoint); + } // end of namespace tools } // end of namespace basegfx |