summaryrefslogtreecommitdiff
path: root/basegfx/source/curve/b2dcubicbezier.cxx
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2003-11-28 10:18:16 +0000
committerArmin Weiss <aw@openoffice.org>2003-11-28 10:18:16 +0000
commitd539c95155ccc7030411f7494704894a3ac610a8 (patch)
treedc3dbd283a5f501f6e48dd585d80bb158db920e3 /basegfx/source/curve/b2dcubicbezier.cxx
parentce0ce72d1fd37f7b8e7cb4ebc372d8cd6b4ab9c0 (diff)
Removed in-between namespaces (curve, matrix, numeric, point, polygon, range, tuple, vector). Names were too common and e.g. vector leaded to problems with some defines. This is now avoided. Also some bug fixes, addition of 3d polygon tooling etc.
Diffstat (limited to 'basegfx/source/curve/b2dcubicbezier.cxx')
-rw-r--r--basegfx/source/curve/b2dcubicbezier.cxx146
1 files changed, 71 insertions, 75 deletions
diff --git a/basegfx/source/curve/b2dcubicbezier.cxx b/basegfx/source/curve/b2dcubicbezier.cxx
index 9633aa6b5130..33f6fdb8f1ca 100644
--- a/basegfx/source/curve/b2dcubicbezier.cxx
+++ b/basegfx/source/curve/b2dcubicbezier.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dcubicbezier.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: aw $ $Date: 2003-11-26 14:40:07 $
+ * last change: $Author: aw $ $Date: 2003-11-28 11:18:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,90 +67,86 @@
namespace basegfx
{
- namespace curve
+ B2DCubicBezier::B2DCubicBezier(const B2DCubicBezier& rBezier)
+ : maStartPoint(rBezier.maStartPoint),
+ maEndPoint(rBezier.maEndPoint),
+ maControlPointA(rBezier.maControlPointA),
+ maControlPointB(rBezier.maControlPointB)
{
- B2DCubicBezier::B2DCubicBezier(const B2DCubicBezier& rBezier)
- : maStartPoint(rBezier.maStartPoint),
- maEndPoint(rBezier.maEndPoint),
- maControlPointA(rBezier.maControlPointA),
- maControlPointB(rBezier.maControlPointB)
- {
- }
-
- B2DCubicBezier::B2DCubicBezier()
- {
- }
-
- B2DCubicBezier::B2DCubicBezier(const ::basegfx::point::B2DPoint& rStart, const ::basegfx::point::B2DPoint& rEnd)
- : maStartPoint(rStart),
- maEndPoint(rEnd),
- maControlPointA(rStart),
- maControlPointB(rEnd)
- {
- }
+ }
- B2DCubicBezier::B2DCubicBezier(const ::basegfx::point::B2DPoint& rStart, const ::basegfx::point::B2DPoint& rControlPointA,
- const ::basegfx::point::B2DPoint& rControlPointB, const ::basegfx::point::B2DPoint& rEnd)
- : maStartPoint(rStart),
- maEndPoint(rEnd),
- maControlPointA(rControlPointA),
- maControlPointB(rControlPointB)
- {
- }
-
- B2DCubicBezier::~B2DCubicBezier()
- {
- }
+ B2DCubicBezier::B2DCubicBezier()
+ {
+ }
- // assignment operator
- B2DCubicBezier& B2DCubicBezier::operator=(const B2DCubicBezier& rBezier)
- {
- maStartPoint = rBezier.maStartPoint;
- maEndPoint = rBezier.maEndPoint;
- maControlPointA = rBezier.maControlPointA;
- maControlPointB = rBezier.maControlPointB;
+ B2DCubicBezier::B2DCubicBezier(const ::basegfx::B2DPoint& rStart, const ::basegfx::B2DPoint& rEnd)
+ : maStartPoint(rStart),
+ maEndPoint(rEnd),
+ maControlPointA(rStart),
+ maControlPointB(rEnd)
+ {
+ }
+
+ B2DCubicBezier::B2DCubicBezier(const ::basegfx::B2DPoint& rStart, const ::basegfx::B2DPoint& rControlPointA,
+ const ::basegfx::B2DPoint& rControlPointB, const ::basegfx::B2DPoint& rEnd)
+ : maStartPoint(rStart),
+ maEndPoint(rEnd),
+ maControlPointA(rControlPointA),
+ maControlPointB(rControlPointB)
+ {
+ }
- return *this;
- }
+ B2DCubicBezier::~B2DCubicBezier()
+ {
+ }
- // compare operators
- sal_Bool B2DCubicBezier::operator==(const B2DCubicBezier& rBezier) const
- {
- return (
- maStartPoint == rBezier.maStartPoint
- && maEndPoint == rBezier.maEndPoint
- && maControlPointA == rBezier.maControlPointA
- && maControlPointB == rBezier.maControlPointB
- );
- }
+ // assignment operator
+ B2DCubicBezier& B2DCubicBezier::operator=(const B2DCubicBezier& rBezier)
+ {
+ maStartPoint = rBezier.maStartPoint;
+ maEndPoint = rBezier.maEndPoint;
+ maControlPointA = rBezier.maControlPointA;
+ maControlPointB = rBezier.maControlPointB;
- sal_Bool B2DCubicBezier::operator!=(const B2DCubicBezier& rBezier) const
- {
- return (
- maStartPoint != rBezier.maStartPoint
- || maEndPoint != rBezier.maEndPoint
- || maControlPointA != rBezier.maControlPointA
- || maControlPointB != rBezier.maControlPointB
- );
- }
+ return *this;
+ }
- // test if vectors are used
- sal_Bool B2DCubicBezier::isBezier() const
+ // compare operators
+ sal_Bool B2DCubicBezier::operator==(const B2DCubicBezier& rBezier) const
+ {
+ return (
+ maStartPoint == rBezier.maStartPoint
+ && maEndPoint == rBezier.maEndPoint
+ && maControlPointA == rBezier.maControlPointA
+ && maControlPointB == rBezier.maControlPointB
+ );
+ }
+
+ sal_Bool B2DCubicBezier::operator!=(const B2DCubicBezier& rBezier) const
+ {
+ return (
+ maStartPoint != rBezier.maStartPoint
+ || maEndPoint != rBezier.maEndPoint
+ || maControlPointA != rBezier.maControlPointA
+ || maControlPointB != rBezier.maControlPointB
+ );
+ }
+
+ // test if vectors are used
+ sal_Bool B2DCubicBezier::isBezier() const
+ {
+ if(maControlPointA != maStartPoint || maControlPointB != maEndPoint)
{
- if(maControlPointA != maStartPoint || maControlPointB != maEndPoint)
- {
- return sal_True;
- }
-
- return sal_False;
+ return sal_True;
}
- void B2DCubicBezier::testAndSolveTrivialBezier()
- {
- // TODO
- }
+ return sal_False;
+ }
- } // end of namespace curve
+ void B2DCubicBezier::testAndSolveTrivialBezier()
+ {
+ // TODO
+ }
} // end of namespace basegfx
// eof