summaryrefslogtreecommitdiff
path: root/basegfx/source/curve/b2dcubicbezier.cxx
diff options
context:
space:
mode:
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