summaryrefslogtreecommitdiff
path: root/basegfx/inc/basegfx
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2004-02-12 16:11:42 +0000
committerArmin Weiss <aw@openoffice.org>2004-02-12 16:11:42 +0000
commitb23dfd18d71d77164ae51be108de09f3ed00f7a7 (patch)
treed3ea51cafc59d781440215e88d7b4c13d1d950b2 /basegfx/inc/basegfx
parent634b32e4ea0c9da79e7c6c4eafc023ce0c5dfa6f (diff)
Changed usages of (G/S)etControlVector(A/B) to use the new curve convention that both vectors are relative to the point of the edge. Before, B was relative to the next edge.
Also added (G/S)etControlPoint(A/B) interface for B2DPolygon.
Diffstat (limited to 'basegfx/inc/basegfx')
-rw-r--r--basegfx/inc/basegfx/curve/b2dcubicbezier.hxx10
-rw-r--r--basegfx/inc/basegfx/polygon/b2dpolygon.hxx13
2 files changed, 18 insertions, 5 deletions
diff --git a/basegfx/inc/basegfx/curve/b2dcubicbezier.hxx b/basegfx/inc/basegfx/curve/b2dcubicbezier.hxx
index dd23a841d51a..85f80d5009b2 100644
--- a/basegfx/inc/basegfx/curve/b2dcubicbezier.hxx
+++ b/basegfx/inc/basegfx/curve/b2dcubicbezier.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dcubicbezier.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: thb $ $Date: 2004-01-16 10:33:48 $
+ * last change: $Author: aw $ $Date: 2004-02-12 17:11:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -98,6 +98,12 @@ namespace basegfx
// test if contained bezier is trivial and reset vectors accordingly
void testAndSolveTrivialBezier();
+ // get distance between start and end point
+ double getEdgeLength() const;
+
+ // get length of control polygon
+ double getControlPolygonLength() const;
+
// data interface
::basegfx::B2DPoint getStartPoint() const { return maStartPoint; }
void setStartPoint(const ::basegfx::B2DPoint& rValue) { maStartPoint = rValue; }
diff --git a/basegfx/inc/basegfx/polygon/b2dpolygon.hxx b/basegfx/inc/basegfx/polygon/b2dpolygon.hxx
index 8bc81e641f09..cd5cb71a2511 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.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: thb $ $Date: 2004-01-16 10:33:58 $
+ * last change: $Author: aw $ $Date: 2004-02-12 17:11:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -121,7 +121,14 @@ namespace basegfx
void setControlVectorA(sal_uInt32 nIndex, const ::basegfx::B2DVector& rValue);
::basegfx::B2DVector getControlVectorB(sal_uInt32 nIndex) const;
void setControlVectorB(sal_uInt32 nIndex, const ::basegfx::B2DVector& rValue);
- bool areControlPointsUsed() const;
+ bool areControlVectorsUsed() const;
+
+ // ControlPoint interface
+ ::basegfx::B2DPoint getControlPointA(sal_uInt32 nIndex) const;
+ void setControlPointA(sal_uInt32 nIndex, const ::basegfx::B2DPoint& rValue);
+ ::basegfx::B2DPoint getControlPointB(sal_uInt32 nIndex) const;
+ void setControlPointB(sal_uInt32 nIndex, const ::basegfx::B2DPoint& rValue);
+ bool areControlPointsUsed() const { return areControlVectorsUsed(); }
// insert/append other 2D polygons
void insert(sal_uInt32 nIndex, const B2DPolygon& rPoly, sal_uInt32 nIndex2 = 0, sal_uInt32 nCount = 0);