diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-11-26 17:32:54 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-11-26 17:32:54 +0000 |
commit | d4034ca0e6e0acd28251de183bfd1dac8988c64d (patch) | |
tree | b173d5ada3442f4cc7e3d53674f953fa32aeb60e /basegfx | |
parent | 838aa2e1135cc6979913de2a7bfc0bf17c06c0ec (diff) |
INTEGRATION: CWS presentationengine01 (1.10.2); FILE MERGED
2004/11/17 18:53:01 thb 1.10.2.5: RESYNC: (1.11-1.12); FILE MERGED
2004/08/23 14:11:54 thb 1.10.2.4: RESYNC: (1.10-1.11); FILE MERGED
2004/08/11 13:22:07 thb 1.10.2.3: #110496# Now using M_SQRT2 instead of direct sqrt(2) calculations
2004/08/11 13:06:20 thb 1.10.2.2: #110496# Added circle factory method for B2DPolygon
2004/04/21 18:45:54 thb 1.10.2.1: #110496# Added B2DPolygon contructor to B2DPolyPolygon, added rect2poly convenience method to polygontools
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/inc/basegfx/polygon/b2dpolygontools.hxx | 43 |
1 files changed, 35 insertions, 8 deletions
diff --git a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx index 10d7c310f145..82cb882999a4 100644 --- a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx +++ b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx @@ -2,9 +2,9 @@ * * $RCSfile: b2dpolygontools.hxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: pjunck $ $Date: 2004-11-03 08:34:05 $ + * last change: $Author: rt $ $Date: 2004-11-26 18:32:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,6 +70,10 @@ #include <basegfx/vector/b2dvector.hxx> #endif +#ifndef _BGFX_RANGE_B2DRECTANGLE_HXX +#include <basegfx/range/b2drectangle.hxx> +#endif + #ifndef _BGFX_POLYGON_B2DPOLYPOLYGON_HXX #include <basegfx/polygon/b2dpolypolygon.hxx> #endif @@ -88,12 +92,14 @@ namespace basegfx { // B2DPolygon tools - /** Check if given polygon is closed. This is kind of a - 'classic' method to support old polygon definitions. - Those old polygon definitions define the closed state - of the polygon using identical start and endpoints. This - method corrects this (removes double start/end points) - and sets the Closed()-state of the polygon correctly. + /** Check if given polygon is closed. + + This is kind of a 'classic' method to support old polygon + definitions. Those old polygon definitions define the + closed state of the polygon using identical start and + endpoints. This method corrects this (removes double + start/end points) and sets the Closed()-state of the + polygon correctly. */ void checkClosed(B2DPolygon& rCandidate); @@ -226,6 +232,27 @@ namespace basegfx void transform(const Matrix4D& rTfMatrix); Polygon3D getExpandedPolygon(sal_uInt32 nNum); */ + + /** Create a polygon from a rectangle. + */ + B2DPolygon createPolygonFromRect( const B2DRectangle& rRect ); + + /** Create a circle polygon with given radius. + + This method creates a circle approximation consisting of + four cubic bezier segments, which approximate the given + circle with an error of less than 0.5 percent. To create + ellipses, simply scale the resulting circle + anisotrophically. + + @param rCenter + Center point of the circle + + @param nRadius + Radius of the circle + */ + B2DPolygon createPolygonFromCircle( const B2DPoint& rCenter, double nRadius ); + } // end of namespace tools } // end of namespace basegfx |