From 56f2ab808ec8b0ce9aed1acd042123b87006ad60 Mon Sep 17 00:00:00 2001 From: Armin Weiss Date: Wed, 26 Nov 2003 13:40:18 +0000 Subject: Added support for B3DPolyPOlygon, moved BDRange from source/inc to range namespace and the directories --- basegfx/inc/basegfx/polygon/b2dpolygon.hxx | 12 +++++++++-- basegfx/inc/basegfx/polygon/b2dpolygontools.hxx | 18 ++++++++-------- basegfx/inc/basegfx/polygon/b2dpolypolygon.hxx | 16 +++++++++++---- .../inc/basegfx/polygon/b2dpolypolygontools.hxx | 24 ++++++++++++++-------- 4 files changed, 47 insertions(+), 23 deletions(-) (limited to 'basegfx/inc/basegfx/polygon') diff --git a/basegfx/inc/basegfx/polygon/b2dpolygon.hxx b/basegfx/inc/basegfx/polygon/b2dpolygon.hxx index 3ce8fff7bf8c..c58be040d447 100644 --- a/basegfx/inc/basegfx/polygon/b2dpolygon.hxx +++ b/basegfx/inc/basegfx/polygon/b2dpolygon.hxx @@ -2,9 +2,9 @@ * * $RCSfile: b2dpolygon.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: aw $ $Date: 2003-11-10 11:45:47 $ + * last change: $Author: aw $ $Date: 2003-11-26 14:39:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,6 +86,11 @@ namespace basegfx { class B2DVector; } // end of namespace vector + + namespace matrix + { + class B2DHomMatrix; + } // end of namespace matrix } // end of namespace basegfx ////////////////////////////////////////////////////////////////////////////// @@ -157,6 +162,9 @@ namespace basegfx // remove double points, at the begin/end and follow-ups, too void removeDoublePoints(); + + // apply transformation given in matrix form to the polygon + void transform(const ::basegfx::matrix::B2DHomMatrix& rMatrix); }; } // end of namespace polygon } // end of namespace basegfx diff --git a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx index efc77e678d21..b2fc5f9c16e5 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.5 $ + * $Revision: 1.6 $ * - * last change: $Author: aw $ $Date: 2003-11-11 09:48:12 $ + * last change: $Author: aw $ $Date: 2003-11-26 14:39:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,20 +70,17 @@ #include #endif -#ifndef _TOOLS_DEBUG_HXX -#include -#endif - ////////////////////////////////////////////////////////////////////////////// namespace basegfx { + // predefinitions namespace polygon { - // predefinitions class B2DPolygon; } // end of namespace polygon + // predefinitions namespace range { class B2DRange; @@ -125,7 +122,7 @@ namespace basegfx sal_Bool isInside(const ::basegfx::polygon::B2DPolygon& rCandidate, const ::basegfx::point::B2DPoint& rPoint, sal_Bool bWithBorder = sal_False); sal_Bool isInside(const ::basegfx::polygon::B2DPolygon& rCandidate, const ::basegfx::polygon::B2DPolygon& rPolygon, sal_Bool bWithBorder = sal_False); - // get size of polygon + // get size of polygon. Control vectors are included in that ranges. ::basegfx::range::B2DRange getRange(const ::basegfx::polygon::B2DPolygon& rCandidate); // get area of polygon @@ -154,7 +151,10 @@ namespace basegfx ::basegfx::vector::B2DVectorContinuity getContinuityInPoint(const ::basegfx::polygon::B2DPolygon& rCandidate, sal_uInt32 nIndex); // Subdivide all contained curves. Use distanceBound value if given. - ::basegfx::polygon::B2DPolygon adaptiveSubdivide(const ::basegfx::polygon::B2DPolygon& rCandidate, double fDistanceBound = 0.0); + ::basegfx::polygon::B2DPolygon adaptiveSubdivideByDistance(const ::basegfx::polygon::B2DPolygon& rCandidate, double fDistanceBound = 0.0); + + // Subdivide all contained curves. Use distanceBound value if given. + ::basegfx::polygon::B2DPolygon adaptiveSubdivideByAngle(const ::basegfx::polygon::B2DPolygon& rCandidate, double fAngleBound = 5.0); // Definitions for the cut flags used from the findCut methods typedef sal_uInt16 CutFlagValue; diff --git a/basegfx/inc/basegfx/polygon/b2dpolypolygon.hxx b/basegfx/inc/basegfx/polygon/b2dpolypolygon.hxx index acd385099ebe..89e6b68b4072 100644 --- a/basegfx/inc/basegfx/polygon/b2dpolypolygon.hxx +++ b/basegfx/inc/basegfx/polygon/b2dpolypolygon.hxx @@ -2,9 +2,9 @@ * * $RCSfile: b2dpolypolygon.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: aw $ $Date: 2003-11-10 11:45:48 $ + * last change: $Author: aw $ $Date: 2003-11-26 14:39:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -75,6 +75,11 @@ namespace basegfx { class B2DPolygon; } // end of namespace polygon + + namespace matrix + { + class B2DHomMatrix; + } // end of namespace matrix } // end of namespace basegfx ////////////////////////////////////////////////////////////////////////////// @@ -107,8 +112,8 @@ namespace basegfx // polygon interface sal_uInt32 count() const; - B2DPolygon getPolygon(sal_uInt32 nIndex) const; - void setPolygon(sal_uInt32 nIndex, const B2DPolygon& rPolygon); + B2DPolygon getB2DPolygon(sal_uInt32 nIndex) const; + void setB2DPolygon(sal_uInt32 nIndex, const B2DPolygon& rPolygon); // test for curve sal_Bool areControlPointsUsed() const; @@ -139,6 +144,9 @@ namespace basegfx // remove double points, at the begin/end and follow-ups, too void removeDoublePoints(); + + // apply transformation given in matrix form to the polygon + void transform(const ::basegfx::matrix::B2DHomMatrix& rMatrix); }; } // end of namespace polygon } // end of namespace basegfx diff --git a/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx b/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx index 926fa918035a..5165ef6a37ed 100644 --- a/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx +++ b/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx @@ -2,9 +2,9 @@ * * $RCSfile: b2dpolypolygontools.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: aw $ $Date: 2003-11-11 09:48:13 $ + * last change: $Author: aw $ $Date: 2003-11-26 14:39:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,20 +70,22 @@ #include #endif -#ifndef _TOOLS_DEBUG_HXX -#include -#endif - ////////////////////////////////////////////////////////////////////////////// namespace basegfx { + // predefinitions namespace polygon { - // predefinitions class B2DPolyPolygon; } // end of namespace polygon + // predefinitions + namespace range + { + class B2DRange; + } // end of namespace range + namespace polygon { namespace tools @@ -108,7 +110,13 @@ namespace basegfx sal_Bool bForceOrientation = sal_True, sal_Bool bInvertRemove = sal_False); // Subdivide all contained curves. Use distanceBound value if given. - ::basegfx::polygon::B2DPolyPolygon adaptiveSubdivide(const ::basegfx::polygon::B2DPolyPolygon& rCandidate, double fDistanceBound = 0.0); + ::basegfx::polygon::B2DPolyPolygon adaptiveSubdivideByDistance(const ::basegfx::polygon::B2DPolyPolygon& rCandidate, double fDistanceBound = 0.0); + + // Subdivide all contained curves. Use distanceBound value if given. + ::basegfx::polygon::B2DPolyPolygon adaptiveSubdivideByAngle(const ::basegfx::polygon::B2DPolyPolygon& rCandidate, double fAngleBound = 5.0); + + // get size of PolyPolygon. Control vectors are included in that ranges. + ::basegfx::range::B2DRange getRange(const ::basegfx::polygon::B2DPolyPolygon& rCandidate); } // end of namespace tools } // end of namespace polygon -- cgit v1.2.3