summaryrefslogtreecommitdiff
path: root/basegfx/source
diff options
context:
space:
mode:
authorThorsten Behrens <thb@openoffice.org>2004-01-16 09:34:43 +0000
committerThorsten Behrens <thb@openoffice.org>2004-01-16 09:34:43 +0000
commitfb6fefbd9482f6fa26447be417286ae1935c0702 (patch)
treedf3b1b957f17a5f70a83b705865b4c1291b1f382 /basegfx/source
parent08761ff6d5991730ed66b7e13817b325ce848da3 (diff)
#110496# Added integer point, size and rectangle classes, needed for the new canvas
Diffstat (limited to 'basegfx/source')
-rw-r--r--basegfx/source/curve/b2dcubicbezier.cxx14
-rw-r--r--basegfx/source/curve/b2dquadraticbezier.cxx14
-rw-r--r--basegfx/source/inc/PolygonPoint.hxx50
-rw-r--r--basegfx/source/inc/hommatrixtemplate.hxx48
-rw-r--r--basegfx/source/inc/polygontemplate.hxx50
-rw-r--r--basegfx/source/matrix/b2dhommatrix.cxx36
-rw-r--r--basegfx/source/matrix/b3dhommatrix.cxx34
-rw-r--r--basegfx/source/point/b2dhompoint.cxx10
-rw-r--r--basegfx/source/point/makefile.mk10
-rw-r--r--basegfx/source/polygon/b2dpolygon.cxx72
-rw-r--r--basegfx/source/polygon/b2dpolygontools.cxx324
-rw-r--r--basegfx/source/polygon/b2dpolypolygon.cxx44
-rw-r--r--basegfx/source/polygon/b2dpolypolygoncutter.cxx166
-rw-r--r--basegfx/source/polygon/b2dpolypolygontools.cxx64
-rw-r--r--basegfx/source/polygon/b3dpolygon.cxx42
-rw-r--r--basegfx/source/polygon/b3dpolygontools.cxx20
-rw-r--r--basegfx/source/polygon/b3dpolypolygon.cxx38
-rw-r--r--basegfx/source/tuple/b2dtuple.cxx12
-rw-r--r--basegfx/source/tuple/makefile.mk12
-rw-r--r--basegfx/source/vector/b2dvector.cxx14
-rw-r--r--basegfx/source/vector/makefile.mk10
-rw-r--r--basegfx/source/workbench/bezierclip.cxx56
-rw-r--r--basegfx/source/workbench/bezierclip.hxx12
-rw-r--r--basegfx/source/workbench/convexhull.cxx10
-rw-r--r--basegfx/source/workbench/gauss.hxx30
25 files changed, 600 insertions, 592 deletions
diff --git a/basegfx/source/curve/b2dcubicbezier.cxx b/basegfx/source/curve/b2dcubicbezier.cxx
index 33f6fdb8f1ca..7ff14e13601b 100644
--- a/basegfx/source/curve/b2dcubicbezier.cxx
+++ b/basegfx/source/curve/b2dcubicbezier.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dcubicbezier.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:00 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -112,7 +112,7 @@ namespace basegfx
}
// compare operators
- sal_Bool B2DCubicBezier::operator==(const B2DCubicBezier& rBezier) const
+ bool B2DCubicBezier::operator==(const B2DCubicBezier& rBezier) const
{
return (
maStartPoint == rBezier.maStartPoint
@@ -122,7 +122,7 @@ namespace basegfx
);
}
- sal_Bool B2DCubicBezier::operator!=(const B2DCubicBezier& rBezier) const
+ bool B2DCubicBezier::operator!=(const B2DCubicBezier& rBezier) const
{
return (
maStartPoint != rBezier.maStartPoint
@@ -133,14 +133,14 @@ namespace basegfx
}
// test if vectors are used
- sal_Bool B2DCubicBezier::isBezier() const
+ bool B2DCubicBezier::isBezier() const
{
if(maControlPointA != maStartPoint || maControlPointB != maEndPoint)
{
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
void B2DCubicBezier::testAndSolveTrivialBezier()
diff --git a/basegfx/source/curve/b2dquadraticbezier.cxx b/basegfx/source/curve/b2dquadraticbezier.cxx
index 2086a9d1b15e..6a2281dd1701 100644
--- a/basegfx/source/curve/b2dquadraticbezier.cxx
+++ b/basegfx/source/curve/b2dquadraticbezier.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dquadraticbezier.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:00 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -110,7 +110,7 @@ namespace basegfx
}
// compare operators
- sal_Bool B2DQuadraticBezier::operator==(const B2DQuadraticBezier& rBezier) const
+ bool B2DQuadraticBezier::operator==(const B2DQuadraticBezier& rBezier) const
{
return (
maStartPoint == rBezier.maStartPoint
@@ -119,7 +119,7 @@ namespace basegfx
);
}
- sal_Bool B2DQuadraticBezier::operator!=(const B2DQuadraticBezier& rBezier) const
+ bool B2DQuadraticBezier::operator!=(const B2DQuadraticBezier& rBezier) const
{
return (
maStartPoint != rBezier.maStartPoint
@@ -129,13 +129,13 @@ namespace basegfx
}
// test if control vector is used
- sal_Bool B2DQuadraticBezier::isBezier() const
+ bool B2DQuadraticBezier::isBezier() const
{
// if control vector is empty, bezier is not used
if(maControlPoint == maStartPoint || maControlPoint == maEndPoint)
- return sal_False;
+ return false;
- return sal_True;
+ return true;
}
} // end of namespace basegfx
diff --git a/basegfx/source/inc/PolygonPoint.hxx b/basegfx/source/inc/PolygonPoint.hxx
index 2d8a7c164d09..dfd4654fd234 100644
--- a/basegfx/source/inc/PolygonPoint.hxx
+++ b/basegfx/source/inc/PolygonPoint.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PolygonPoint.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: aw $ $Date: 2003-11-26 14:32:41 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,7 +91,7 @@ public:
maPoint = rValue;
}
- sal_Bool operator==(const SimplePointEntry& rEntry) const
+ bool operator==(const SimplePointEntry& rEntry) const
{
return (maPoint == rEntry.maPoint);
}
@@ -137,14 +137,14 @@ public:
maForward = rValue;
}
- sal_Bool isBezierNeeded()
+ bool isBezierNeeded()
{
if(maBackward != Vector::getEmptyVector() || maForward != Vector::getEmptyVector())
- return sal_True;
- return sal_False;
+ return true;
+ return false;
}
- sal_Bool operator==(const SimpleBezierEntry& rEntry) const
+ bool operator==(const SimpleBezierEntry& rEntry) const
{
return ((maBackward == rEntry.maBackward) && (maForward == rEntry.maForward));
}
@@ -181,17 +181,17 @@ template < class Point, class Vector > class PolygonPointList
}
public:
- sal_Bool isBezier() const
+ bool isBezier() const
{
- return sal_Bool(mnBezierCount);
+ return bool(mnBezierCount);
}
- sal_Bool isClosed() const
+ bool isClosed() const
{
- return sal_Bool(mbIsClosed);
+ return bool(mbIsClosed);
}
- void setClosed(sal_Bool bNew)
+ void setClosed(bool bNew)
{
mbIsClosed = bNew;
}
@@ -204,7 +204,7 @@ public:
PolygonPointList()
: mnBezierCount(0L),
mpVectors(0L),
- mbIsClosed(sal_False)
+ mbIsClosed(false)
{
// complete initialization with defaults
}
@@ -276,27 +276,27 @@ public:
}
}
- sal_Bool isEqual(const PolygonPointList& rPointList) const
+ bool isEqual(const PolygonPointList& rPointList) const
{
// same point count?
if(maPoints.size() != rPointList.maPoints.size())
- return sal_False;
+ return false;
// if zero points the polys are equal
if(!maPoints.size())
- return sal_True;
+ return true;
// if bezier count used it needs to be equal
if(mnBezierCount != rPointList.mnBezierCount)
- return sal_False;
+ return false;
// compare point content
if(maPoints != rPointList.maPoints)
- return sal_False;
+ return false;
// beziercounts are equal: if it's zero, we are done
if(!mnBezierCount)
- return sal_True;
+ return true;
// beziercounts are equal and not zero; compare them
OSL_ENSURE(0L != mpVectors, "Error: Bezier list needs to exist here(!)");
@@ -328,9 +328,9 @@ public:
if(mpVectors)
{
LocalSimpleBezierEntry& rDest = (*mpVectors)[nIndex];
- sal_Bool bBezierNeededBefore(rDest.isBezierNeeded());
+ bool bBezierNeededBefore(rDest.isBezierNeeded());
((*mpVectors)[nIndex]).setBackwardVector(rValue);
- sal_Bool bBezierNeededAfter(rDest.isBezierNeeded());
+ bool bBezierNeededAfter(rDest.isBezierNeeded());
if(bBezierNeededBefore != bBezierNeededAfter)
{
@@ -342,7 +342,7 @@ public:
}
else
{
- sal_Bool bEmptyVector(rValue == Vector::getEmptyVector());
+ bool bEmptyVector(rValue == Vector::getEmptyVector());
if(bEmptyVector)
return;
@@ -366,9 +366,9 @@ public:
if(mpVectors)
{
LocalSimpleBezierEntry& rDest = (*mpVectors)[nIndex];
- sal_Bool bBezierNeededBefore(rDest.isBezierNeeded());
+ bool bBezierNeededBefore(rDest.isBezierNeeded());
((*mpVectors)[nIndex]).setForwardVector(rValue);
- sal_Bool bBezierNeededAfter(rDest.isBezierNeeded());
+ bool bBezierNeededAfter(rDest.isBezierNeeded());
if(bBezierNeededBefore != bBezierNeededAfter)
{
@@ -380,7 +380,7 @@ public:
}
else
{
- sal_Bool bEmptyVector(rValue == Vector::getEmptyVector());
+ bool bEmptyVector(rValue == Vector::getEmptyVector());
if(bEmptyVector)
return;
diff --git a/basegfx/source/inc/hommatrixtemplate.hxx b/basegfx/source/inc/hommatrixtemplate.hxx
index 4c688b09a218..4c4b1ad10b07 100644
--- a/basegfx/source/inc/hommatrixtemplate.hxx
+++ b/basegfx/source/inc/hommatrixtemplate.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: hommatrixtemplate.hxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:02 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -129,10 +129,10 @@ namespace basegfx
public:
// Is last line used?
- sal_Bool isLastLineDefault() const
+ bool isLastLineDefault() const
{
if(!mpLine)
- return sal_True;
+ return true;
for(sal_uInt16 a(0); a < RowSize; a++)
{
@@ -141,7 +141,7 @@ namespace basegfx
if(!::basegfx::fTools::equal(fDefault, fLineValue))
{
- return sal_False;
+ return false;
}
}
@@ -149,7 +149,7 @@ namespace basegfx
delete ((ImplHomMatrixTemplate< RowSize >*)this)->mpLine;
((ImplHomMatrixTemplate< RowSize >*)this)->mpLine = 0L;
- return sal_True;
+ return true;
}
// This constructor is only used form the static identity matrix, thus
@@ -238,7 +238,7 @@ namespace basegfx
{
if(mpLine)
{
- sal_Bool bNecessary(sal_False);
+ bool bNecessary(false);
for(sal_uInt16 a(0);!bNecessary && a < RowSize; a++)
{
@@ -247,7 +247,7 @@ namespace basegfx
if(!::basegfx::fTools::equal(fDefault, fLineValue))
{
- bNecessary = sal_True;
+ bNecessary = true;
}
}
@@ -260,7 +260,7 @@ namespace basegfx
}
// Left-upper decompositon
- sal_Bool ludcmp(sal_uInt16 nIndex[], sal_Int16& nParity)
+ bool ludcmp(sal_uInt16 nIndex[], sal_Int16& nParity)
{
double fBig, fSum, fDum;
double fStorage[RowSize];
@@ -286,7 +286,7 @@ namespace basegfx
if(::basegfx::fTools::equalZero(fBig))
{
- return sal_False;
+ return false;
}
fStorage[a] = 1.0 / fBig;
@@ -348,7 +348,7 @@ namespace basegfx
if(::basegfx::fTools::equalZero(fValBB))
{
- return sal_False;
+ return false;
}
if(b != (RowSize - 1))
@@ -362,7 +362,7 @@ namespace basegfx
}
}
- return sal_True;
+ return true;
}
void lubksb(const sal_uInt16 nIndex[], double fRow[]) const
@@ -410,7 +410,7 @@ namespace basegfx
}
}
- sal_Bool isIdentity() const
+ bool isIdentity() const
{
// last line needs no testing if not existing
const sal_uInt16 nMaxLine = (mpLine) ? RowSize : (RowSize - 1);
@@ -424,15 +424,15 @@ namespace basegfx
if(!::basegfx::fTools::equal(fDefault, fValueAB))
{
- return sal_False;
+ return false;
}
}
}
- return sal_True;
+ return true;
}
- sal_Bool isInvertible() const
+ bool isInvertible() const
{
ImplHomMatrixTemplate aWork(*this);
sal_uInt16 nIndex[RowSize];
@@ -441,26 +441,26 @@ namespace basegfx
return aWork.ludcmp(nIndex, nParity);
}
- sal_Bool isNormalized() const
+ bool isNormalized() const
{
if(!mpLine)
- return sal_True;
+ return true;
const double fHomValue(get((RowSize - 1), (RowSize - 1)));
if(::basegfx::fTools::equalZero(fHomValue))
{
- return sal_True;
+ return true;
}
const double fOne(1.0);
if(::basegfx::fTools::equal(fOne, fHomValue))
{
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
void doInvert(const ImplHomMatrixTemplate& rWork, const sal_uInt16 nIndex[])
@@ -623,7 +623,7 @@ namespace basegfx
testLastLine();
}
- sal_Bool isEqual(const ImplHomMatrixTemplate& rMat)
+ bool isEqual(const ImplHomMatrixTemplate& rMat)
{
const sal_uInt16 nMaxLine = (mpLine || rMat.mpLine) ? RowSize : (RowSize - 1);
@@ -636,12 +636,12 @@ namespace basegfx
if(!::basegfx::fTools::equal(fValueA, fValueB))
{
- return sal_False;
+ return false;
}
}
}
- return sal_True;
+ return true;
}
};
diff --git a/basegfx/source/inc/polygontemplate.hxx b/basegfx/source/inc/polygontemplate.hxx
index 310706bb461d..1639c5070622 100644
--- a/basegfx/source/inc/polygontemplate.hxx
+++ b/basegfx/source/inc/polygontemplate.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: polygontemplate.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: aw $ $Date: 2003-11-26 14:32:41 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,7 +91,7 @@ public:
maPoint = rValue;
}
- sal_Bool operator==(const ImplSimplePointEntry& rEntry) const
+ bool operator==(const ImplSimplePointEntry& rEntry) const
{
return (maPoint == rEntry.maPoint);
}
@@ -137,14 +137,14 @@ public:
maForward = rValue;
}
- sal_Bool isBezierNeeded()
+ bool isBezierNeeded()
{
if(!maBackward.equalZero() || !maForward.equalZero())
- return sal_True;
- return sal_False;
+ return true;
+ return false;
}
- sal_Bool operator==(const ImplSimpleBezierEntry& rEntry) const
+ bool operator==(const ImplSimpleBezierEntry& rEntry) const
{
return ((maBackward == rEntry.maBackward) && (maForward == rEntry.maForward));
}
@@ -181,17 +181,17 @@ template < class Point, class Vector > class ImplPolygonTemplate
}
public:
- sal_Bool isBezier() const
+ bool isBezier() const
{
- return sal_Bool(mnBezierCount);
+ return bool(mnBezierCount);
}
- sal_Bool isClosed() const
+ bool isClosed() const
{
- return sal_Bool(mbIsClosed);
+ return bool(mbIsClosed);
}
- void setClosed(sal_Bool bNew)
+ void setClosed(bool bNew)
{
mbIsClosed = bNew;
}
@@ -204,7 +204,7 @@ public:
ImplPolygonTemplate()
: mnBezierCount(0L),
mpVectors(0L),
- mbIsClosed(sal_False)
+ mbIsClosed(false)
{
// complete initialization with defaults
}
@@ -276,27 +276,27 @@ public:
}
}
- sal_Bool isEqual(const ImplPolygonTemplate& rPointList) const
+ bool isEqual(const ImplPolygonTemplate& rPointList) const
{
// same point count?
if(maPoints.size() != rPointList.maPoints.size())
- return sal_False;
+ return false;
// if zero points the polys are equal
if(!maPoints.size())
- return sal_True;
+ return true;
// if bezier count used it needs to be equal
if(mnBezierCount != rPointList.mnBezierCount)
- return sal_False;
+ return false;
// compare point content
if(maPoints != rPointList.maPoints)
- return sal_False;
+ return false;
// beziercounts are equal: if it's zero, we are done
if(!mnBezierCount)
- return sal_True;
+ return true;
// beziercounts are equal and not zero; compare them
OSL_ENSURE(0L != mpVectors, "Error: Bezier list needs to exist here(!)");
@@ -328,9 +328,9 @@ public:
if(mpVectors)
{
LocalImplSimpleBezierEntry& rDest = (*mpVectors)[nIndex];
- sal_Bool bBezierNeededBefore(rDest.isBezierNeeded());
+ bool bBezierNeededBefore(rDest.isBezierNeeded());
((*mpVectors)[nIndex]).setBackwardVector(rValue);
- sal_Bool bBezierNeededAfter(rDest.isBezierNeeded());
+ bool bBezierNeededAfter(rDest.isBezierNeeded());
if(bBezierNeededBefore != bBezierNeededAfter)
{
@@ -342,7 +342,7 @@ public:
}
else
{
- sal_Bool bEmptyVector(rValue.equalZero());
+ bool bEmptyVector(rValue.equalZero());
if(bEmptyVector)
return;
@@ -366,9 +366,9 @@ public:
if(mpVectors)
{
LocalImplSimpleBezierEntry& rDest = (*mpVectors)[nIndex];
- sal_Bool bBezierNeededBefore(rDest.isBezierNeeded());
+ bool bBezierNeededBefore(rDest.isBezierNeeded());
((*mpVectors)[nIndex]).setForwardVector(rValue);
- sal_Bool bBezierNeededAfter(rDest.isBezierNeeded());
+ bool bBezierNeededAfter(rDest.isBezierNeeded());
if(bBezierNeededBefore != bBezierNeededAfter)
{
@@ -380,7 +380,7 @@ public:
}
else
{
- sal_Bool bEmptyVector(rValue.equalZero());
+ bool bEmptyVector(rValue.equalZero());
if(bEmptyVector)
return;
diff --git a/basegfx/source/matrix/b2dhommatrix.cxx b/basegfx/source/matrix/b2dhommatrix.cxx
index acf4355067a7..ee4c43a785be 100644
--- a/basegfx/source/matrix/b2dhommatrix.cxx
+++ b/basegfx/source/matrix/b2dhommatrix.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dhommatrix.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: thb $ $Date: 2003-12-08 13:24:07 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -144,10 +144,10 @@ namespace basegfx
mpM->set(nRow, nColumn, fValue);
}
- sal_Bool B2DHomMatrix::isIdentity() const
+ bool B2DHomMatrix::isIdentity() const
{
if(mpM == &get2DIdentityMatrix())
- return sal_True;
+ return true;
return mpM->isIdentity();
}
@@ -163,12 +163,12 @@ namespace basegfx
mpM->incRefCount();
}
- sal_Bool B2DHomMatrix::isInvertible() const
+ bool B2DHomMatrix::isInvertible() const
{
return mpM->isInvertible();
}
- sal_Bool B2DHomMatrix::invert()
+ bool B2DHomMatrix::invert()
{
Impl2DHomMatrix aWork(*mpM);
sal_uInt16* pIndex = new sal_uInt16[mpM->getEdgeLength()];
@@ -180,14 +180,14 @@ namespace basegfx
mpM->doInvert(aWork, pIndex);
delete pIndex;
- return sal_True;
+ return true;
}
delete pIndex;
- return sal_False;
+ return false;
}
- sal_Bool B2DHomMatrix::isNormalized() const
+ bool B2DHomMatrix::isNormalized() const
{
return mpM->isNormalized();
}
@@ -270,18 +270,18 @@ namespace basegfx
return *this;
}
- sal_Bool B2DHomMatrix::operator==(const B2DHomMatrix& rMat) const
+ bool B2DHomMatrix::operator==(const B2DHomMatrix& rMat) const
{
if(mpM == rMat.mpM)
- return sal_True;
+ return true;
return mpM->isEqual(*rMat.mpM);
}
- sal_Bool B2DHomMatrix::operator!=(const B2DHomMatrix& rMat) const
+ bool B2DHomMatrix::operator!=(const B2DHomMatrix& rMat) const
{
if(mpM == rMat.mpM)
- return sal_False;
+ return false;
return !mpM->isEqual(*rMat.mpM);
}
@@ -365,15 +365,15 @@ namespace basegfx
}
// Decomposition
- sal_Bool B2DHomMatrix::decompose(B2DTuple& rScale, B2DTuple& rTranslate, double& rRotate, double& rShearX) const
+ bool B2DHomMatrix::decompose(B2DTuple& rScale, B2DTuple& rTranslate, double& rRotate, double& rShearX) const
{
// when perspective is used, decompose is not made here
if(!mpM->isLastLineDefault())
- return sal_False;
+ return false;
// If determinant is zero, decomposition is not possible
if(0.0 == mpM->doDeterminant())
- return sal_False;
+ return false;
// copy 2x2 matrix and translate vector to 3x3 matrix
::basegfx::B3DHomMatrix a3DHomMat;
@@ -403,10 +403,10 @@ namespace basegfx
rTranslate.setX(r3DTranslate.getX());
rTranslate.setY(r3DTranslate.getY());
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
} // end of namespace basegfx
diff --git a/basegfx/source/matrix/b3dhommatrix.cxx b/basegfx/source/matrix/b3dhommatrix.cxx
index b6df9ff51767..4817fc8f7655 100644
--- a/basegfx/source/matrix/b3dhommatrix.cxx
+++ b/basegfx/source/matrix/b3dhommatrix.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b3dhommatrix.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:03 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -136,10 +136,10 @@ namespace basegfx
mpM->set(nRow, nColumn, fValue);
}
- sal_Bool B3DHomMatrix::isIdentity() const
+ bool B3DHomMatrix::isIdentity() const
{
if(mpM == &get3DIdentityMatrix())
- return sal_True;
+ return true;
return mpM->isIdentity();
}
@@ -155,12 +155,12 @@ namespace basegfx
mpM->incRefCount();
}
- sal_Bool B3DHomMatrix::isInvertible() const
+ bool B3DHomMatrix::isInvertible() const
{
return mpM->isInvertible();
}
- sal_Bool B3DHomMatrix::invert()
+ bool B3DHomMatrix::invert()
{
Impl3DHomMatrix aWork(*mpM);
sal_uInt16* pIndex = new sal_uInt16[mpM->getEdgeLength()];
@@ -172,14 +172,14 @@ namespace basegfx
mpM->doInvert(aWork, pIndex);
delete pIndex;
- return sal_True;
+ return true;
}
delete pIndex;
- return sal_False;
+ return false;
}
- sal_Bool B3DHomMatrix::isNormalized() const
+ bool B3DHomMatrix::isNormalized() const
{
return mpM->isNormalized();
}
@@ -262,18 +262,18 @@ namespace basegfx
return *this;
}
- sal_Bool B3DHomMatrix::operator==(const B3DHomMatrix& rMat) const
+ bool B3DHomMatrix::operator==(const B3DHomMatrix& rMat) const
{
if(mpM == rMat.mpM)
- return sal_True;
+ return true;
return mpM->isEqual(*rMat.mpM);
}
- sal_Bool B3DHomMatrix::operator!=(const B3DHomMatrix& rMat) const
+ bool B3DHomMatrix::operator!=(const B3DHomMatrix& rMat) const
{
if(mpM == rMat.mpM)
- return sal_False;
+ return false;
return !mpM->isEqual(*rMat.mpM);
}
@@ -495,15 +495,15 @@ namespace basegfx
mpM = new Impl3DHomMatrix(aOrthoMat);
}
- sal_Bool B3DHomMatrix::decompose(B3DTuple& rScale, B3DTuple& rTranslate, B3DTuple& rRotate, B3DTuple& rShear) const
+ bool B3DHomMatrix::decompose(B3DTuple& rScale, B3DTuple& rTranslate, B3DTuple& rRotate, B3DTuple& rShear) const
{
// when perspective is used, decompose is not made here
if(!mpM->isLastLineDefault())
- return sal_False;
+ return false;
// If determinant is zero, decomposition is not possible
if(0.0 == mpM->doDeterminant())
- return sal_False;
+ return false;
// isolate translation
rTranslate.setX(mpM->get(0, 3));
@@ -629,7 +629,7 @@ namespace basegfx
// corrcet rotate values
rRotate.correctValues();
- return sal_True;
+ return true;
}
} // end of namespace basegfx
diff --git a/basegfx/source/point/b2dhompoint.cxx b/basegfx/source/point/b2dhompoint.cxx
index e23c9530b0e8..5fbb04c0313c 100644
--- a/basegfx/source/point/b2dhompoint.cxx
+++ b/basegfx/source/point/b2dhompoint.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dhompoint.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: aw $ $Date: 2003-12-03 09:24:28 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,7 +73,7 @@
namespace basegfx
{
- sal_Bool B2DHomPoint::implIsHomogenized() const
+ bool B2DHomPoint::implIsHomogenized() const
{
const double fOne(1.0);
return ::basegfx::fTools::equal(fOne, mfW);
@@ -181,13 +181,13 @@ namespace basegfx
return *this;
}
- sal_Bool B2DHomPoint::operator==( const B2DHomPoint& rPnt ) const
+ bool B2DHomPoint::operator==( const B2DHomPoint& rPnt ) const
{
implTestAndHomogenize();
return (maTuple == rPnt.maTuple);
}
- sal_Bool B2DHomPoint::operator!=( const B2DHomPoint& rPnt ) const
+ bool B2DHomPoint::operator!=( const B2DHomPoint& rPnt ) const
{
implTestAndHomogenize();
return (maTuple != rPnt.maTuple);
diff --git a/basegfx/source/point/makefile.mk b/basegfx/source/point/makefile.mk
index 639b03621b13..80ed2f066bb8 100644
--- a/basegfx/source/point/makefile.mk
+++ b/basegfx/source/point/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.2 $
+# $Revision: 1.3 $
#
-# last change: $Author: aw $ $Date: 2003-11-06 16:30:28 $
+# last change: $Author: thb $ $Date: 2004-01-16 10:34:31 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -78,8 +78,10 @@ SLOFILES= \
$(SLO)$/b2dpoint.obj \
$(SLO)$/b2dhompoint.obj \
$(SLO)$/b3dpoint.obj \
- $(SLO)$/b3dhompoint.obj
-
+ $(SLO)$/b3dhompoint.obj \
+ $(SLO)$/b2ipoint.obj \
+ $(SLO)$/b3ipoint.obj
+
# --- Targets ----------------------------------
.INCLUDE : target.mk
diff --git a/basegfx/source/polygon/b2dpolygon.cxx b/basegfx/source/polygon/b2dpolygon.cxx
index 0dcbeaa7a3a2..0c2c921dd64a 100644
--- a/basegfx/source/polygon/b2dpolygon.cxx
+++ b/basegfx/source/polygon/b2dpolygon.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dpolygon.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:05 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -95,7 +95,7 @@ public:
const ::basegfx::B2DPoint& getCoordinate() const { return maPoint; }
void setCoordinate(const ::basegfx::B2DPoint& rValue) { if(rValue != maPoint) maPoint = rValue; }
- sal_Bool operator==(const CoordinateData2D& rData ) const { return (maPoint == rData.getCoordinate()); }
+ bool operator==(const CoordinateData2D& rData ) const { return (maPoint == rData.getCoordinate()); }
void transform(const ::basegfx::B2DHomMatrix& rMatrix) { maPoint *= rMatrix; }
};
@@ -132,7 +132,7 @@ public:
return maVector.size();
}
- sal_Bool isEqual(const CoordinateDataArray2D& rCandidate) const
+ bool isEqual(const CoordinateDataArray2D& rCandidate) const
{
return (maVector == rCandidate.maVector);
}
@@ -262,7 +262,7 @@ public:
const ::basegfx::B2DVector& getVectorB() const { return maVectorB; }
void setVectorB(const ::basegfx::B2DVector& rValue) { if(rValue != maVectorB) maVectorB = rValue; }
- sal_Bool operator==(const ControlVectorPair2D& rData ) const
+ bool operator==(const ControlVectorPair2D& rData ) const
{ return (maVectorA == rData.getVectorA() && maVectorB == rData.getVectorB()); }
};
@@ -319,12 +319,12 @@ public:
return maVector.size();
}
- sal_Bool isEqual(const ControlVectorArray2D& rCandidate) const
+ bool isEqual(const ControlVectorArray2D& rCandidate) const
{
return (maVector == rCandidate.maVector);
}
- sal_Bool isUsed() const
+ bool isUsed() const
{
return (0L != mnUsedVectors);
}
@@ -336,8 +336,8 @@ public:
void setVectorA(sal_uInt32 nIndex, const ::basegfx::B2DVector& rValue)
{
- sal_Bool bWasUsed(mnUsedVectors && !maVector[nIndex].getVectorA().equalZero());
- sal_Bool bIsUsed(!rValue.equalZero());
+ bool bWasUsed(mnUsedVectors && !maVector[nIndex].getVectorA().equalZero());
+ bool bIsUsed(!rValue.equalZero());
if(bWasUsed)
{
@@ -368,8 +368,8 @@ public:
void setVectorB(sal_uInt32 nIndex, const ::basegfx::B2DVector& rValue)
{
- sal_Bool bWasUsed(mnUsedVectors && !maVector[nIndex].getVectorB().equalZero());
- sal_Bool bIsUsed(!rValue.equalZero());
+ bool bWasUsed(mnUsedVectors && !maVector[nIndex].getVectorB().equalZero());
+ bool bIsUsed(!rValue.equalZero());
if(bWasUsed)
{
@@ -483,7 +483,7 @@ public:
: mnRefCount(1),
maPoints(0L),
mpControlVector(0L),
- mbIsClosed(sal_False)
+ mbIsClosed(false)
{
// complete initialization with defaults
}
@@ -549,12 +549,12 @@ public:
return maPoints.count();
}
- sal_Bool isClosed() const
+ bool isClosed() const
{
return mbIsClosed;
}
- void setClosed(sal_Bool bNew)
+ void setClosed(bool bNew)
{
if(bNew != mbIsClosed)
{
@@ -562,13 +562,13 @@ public:
}
}
- sal_Bool isEqual(const ImplB2DPolygon& rCandidate) const
+ bool isEqual(const ImplB2DPolygon& rCandidate) const
{
if(mbIsClosed == rCandidate.mbIsClosed)
{
if(maPoints.isEqual(rCandidate.maPoints))
{
- sal_Bool bControlVectorsAreEqual(sal_True);
+ bool bControlVectorsAreEqual(true);
if(mpControlVector)
{
@@ -593,12 +593,12 @@ public:
if(bControlVectorsAreEqual)
{
- return sal_True;
+ return true;
}
}
}
- return sal_False;
+ return false;
}
const ::basegfx::B2DPoint& getPoint(sal_uInt32 nIndex) const
@@ -660,7 +660,7 @@ public:
}
}
- sal_Bool areControlPointsUsed() const
+ bool areControlPointsUsed() const
{
return (mpControlVector && mpControlVector->isUsed());
}
@@ -821,7 +821,7 @@ public:
}
}
- sal_Bool hasDoublePoints() const
+ bool hasDoublePoints() const
{
if(mbIsClosed)
{
@@ -835,12 +835,12 @@ public:
if(mpControlVector->getVectorA(nIndex).equalZero()
&& mpControlVector->getVectorB(nIndex).equalZero())
{
- return sal_True;
+ return true;
}
}
else
{
- return sal_True;
+ return true;
}
}
}
@@ -855,17 +855,17 @@ public:
if(mpControlVector->getVectorA(a).equalZero()
&& mpControlVector->getVectorB(a).equalZero())
{
- return sal_True;
+ return true;
}
}
else
{
- return sal_True;
+ return true;
}
}
}
- return sal_False;
+ return false;
}
void removeDoublePointsAtBeginEnd()
@@ -875,11 +875,11 @@ public:
{
if(mpControlVector)
{
- sal_Bool bRemove;
+ bool bRemove;
do
{
- bRemove = sal_False;
+ bRemove = false;
if(maPoints.count() > 1L)
{
@@ -890,7 +890,7 @@ public:
if(mpControlVector->getVectorA(nIndex).equalZero()
&& mpControlVector->getVectorB(nIndex).equalZero())
{
- bRemove = sal_True;
+ bRemove = true;
}
}
}
@@ -1045,21 +1045,21 @@ namespace basegfx
return *this;
}
- sal_Bool B2DPolygon::operator==(const B2DPolygon& rPolygon) const
+ bool B2DPolygon::operator==(const B2DPolygon& rPolygon) const
{
if(mpPolygon == rPolygon.mpPolygon)
{
- return sal_True;
+ return true;
}
return mpPolygon->isEqual(*(rPolygon.mpPolygon));
}
- sal_Bool B2DPolygon::operator!=(const B2DPolygon& rPolygon) const
+ bool B2DPolygon::operator!=(const B2DPolygon& rPolygon) const
{
if(mpPolygon == rPolygon.mpPolygon)
{
- return sal_False;
+ return false;
}
return !mpPolygon->isEqual(*(rPolygon.mpPolygon));
@@ -1144,7 +1144,7 @@ namespace basegfx
}
}
- sal_Bool B2DPolygon::areControlPointsUsed() const
+ bool B2DPolygon::areControlPointsUsed() const
{
return mpPolygon->areControlPointsUsed();
}
@@ -1225,12 +1225,12 @@ namespace basegfx
mpPolygon->incRefCount();
}
- sal_Bool B2DPolygon::isClosed() const
+ bool B2DPolygon::isClosed() const
{
return mpPolygon->isClosed();
}
- void B2DPolygon::setClosed(sal_Bool bNew)
+ void B2DPolygon::setClosed(bool bNew)
{
if(mpPolygon->isClosed() != bNew)
{
@@ -1248,7 +1248,7 @@ namespace basegfx
}
}
- sal_Bool B2DPolygon::hasDoublePoints() const
+ bool B2DPolygon::hasDoublePoints() const
{
return mpPolygon->hasDoublePoints();
}
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 6f5ef6e89fba..a15ede36e987 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dpolygontools.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:05 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -103,32 +103,32 @@ namespace basegfx
while(rCandidate.count() > 1L
&& rCandidate.getB2DPoint(0L).equal(rCandidate.getB2DPoint(rCandidate.count() - 1L)))
{
- rCandidate.setClosed(sal_True);
+ rCandidate.setClosed(true);
rCandidate.remove(rCandidate.count() - 1L);
}
}
// Get index of outmost point (e.g. biggest X and biggest Y)
- sal_uInt32 getIndexOfOutmostPoint(const ::basegfx::B2DPolygon& rCandidate)
+ sal_uInt32 getIndexOfOutmostPoint(const B2DPolygon& rCandidate)
{
sal_uInt32 nRetval(0L);
if(rCandidate.count())
{
- ::basegfx::B2DPoint aOutmostPoint(rCandidate.getB2DPoint(0L));
+ B2DPoint aOutmostPoint(rCandidate.getB2DPoint(0L));
for(sal_uInt32 a(1L); a < rCandidate.count(); a++)
{
- ::basegfx::B2DPoint rPoint(rCandidate.getB2DPoint(a));
+ B2DPoint rPoint(rCandidate.getB2DPoint(a));
- if(::basegfx::fTools::more(rPoint.getX(), aOutmostPoint.getX()))
+ if(fTools::more(rPoint.getX(), aOutmostPoint.getX()))
{
nRetval = a;
aOutmostPoint = rPoint;
}
else
{
- if(::basegfx::fTools::more(rPoint.getY(), aOutmostPoint.getY()))
+ if(fTools::more(rPoint.getY(), aOutmostPoint.getY()))
{
nRetval = a;
aOutmostPoint = rPoint;
@@ -142,7 +142,7 @@ namespace basegfx
// Get successor and predecessor indices. Returning the same index means there
// is none. Same for successor.
- sal_uInt32 getIndexOfPredecessor(sal_uInt32 nIndex, const ::basegfx::B2DPolygon& rCandidate)
+ sal_uInt32 getIndexOfPredecessor(sal_uInt32 nIndex, const B2DPolygon& rCandidate)
{
OSL_ENSURE(nIndex < rCandidate.count(), "getIndexOfPredecessor: Access to polygon out of range (!)");
@@ -160,7 +160,7 @@ namespace basegfx
}
}
- sal_uInt32 getIndexOfSuccessor(sal_uInt32 nIndex, const ::basegfx::B2DPolygon& rCandidate)
+ sal_uInt32 getIndexOfSuccessor(sal_uInt32 nIndex, const B2DPolygon& rCandidate)
{
OSL_ENSURE(nIndex < rCandidate.count(), "getIndexOfPredecessor: Access to polygon out of range (!)");
@@ -174,7 +174,7 @@ namespace basegfx
}
}
- sal_uInt32 getIndexOfDifferentPredecessor(sal_uInt32 nIndex, const ::basegfx::B2DPolygon& rCandidate)
+ sal_uInt32 getIndexOfDifferentPredecessor(sal_uInt32 nIndex, const B2DPolygon& rCandidate)
{
sal_uInt32 nNewIndex(nIndex);
OSL_ENSURE(nIndex < rCandidate.count(), "getIndexOfPredecessor: Access to polygon out of range (!)");
@@ -182,7 +182,7 @@ namespace basegfx
if(rCandidate.count() > 1)
{
nNewIndex = getIndexOfPredecessor(nIndex, rCandidate);
- ::basegfx::B2DPoint aPoint(rCandidate.getB2DPoint(nIndex));
+ B2DPoint aPoint(rCandidate.getB2DPoint(nIndex));
while(nNewIndex != nIndex
&& aPoint.equal(rCandidate.getB2DPoint(nNewIndex)))
@@ -194,7 +194,7 @@ namespace basegfx
return nNewIndex;
}
- sal_uInt32 getIndexOfDifferentSuccessor(sal_uInt32 nIndex, const ::basegfx::B2DPolygon& rCandidate)
+ sal_uInt32 getIndexOfDifferentSuccessor(sal_uInt32 nIndex, const B2DPolygon& rCandidate)
{
sal_uInt32 nNewIndex(nIndex);
OSL_ENSURE(nIndex < rCandidate.count(), "getIndexOfPredecessor: Access to polygon out of range (!)");
@@ -202,7 +202,7 @@ namespace basegfx
if(rCandidate.count() > 1)
{
nNewIndex = getIndexOfSuccessor(nIndex, rCandidate);
- ::basegfx::B2DPoint aPoint(rCandidate.getB2DPoint(nIndex));
+ B2DPoint aPoint(rCandidate.getB2DPoint(nIndex));
while(nNewIndex != nIndex
&& aPoint.equal(rCandidate.getB2DPoint(nNewIndex)))
@@ -214,9 +214,9 @@ namespace basegfx
return nNewIndex;
}
- ::basegfx::B2DVectorOrientation getOrientation(const ::basegfx::B2DPolygon& rCandidate)
+ B2VectorOrientation getOrientation(const B2DPolygon& rCandidate)
{
- ::basegfx::B2DVectorOrientation eRetval(::basegfx::ORIENTATION_NEUTRAL);
+ B2VectorOrientation eRetval(ORIENTATION_NEUTRAL);
if(rCandidate.count() > 2)
{
@@ -227,26 +227,26 @@ namespace basegfx
return eRetval;
}
- ::basegfx::B2DVectorContinuity getContinuityInPoint(const ::basegfx::B2DPolygon& rCandidate, sal_uInt32 nIndex)
+ B2VectorContinuity getContinuityInPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndex)
{
OSL_ENSURE(nIndex < rCandidate.count(), "getIndexOfPredecessor: Access to polygon out of range (!)");
- ::basegfx::B2DVectorContinuity eRetval(::basegfx::CONTINUITY_NONE);
+ B2VectorContinuity eRetval(CONTINUITY_NONE);
if(rCandidate.count() > 1L && rCandidate.areControlPointsUsed())
{
sal_uInt32 nPrevInd(getIndexOfPredecessor(nIndex, rCandidate));
- const ::basegfx::B2DVector aForwardVector(rCandidate.getControlVectorA(nIndex));
- const ::basegfx::B2DVector aBackVector(rCandidate.getControlVectorB(nPrevInd));
+ const B2DVector aForwardVector(rCandidate.getControlVectorA(nIndex));
+ const B2DVector aBackVector(rCandidate.getControlVectorB(nPrevInd));
- eRetval = ::basegfx::getContinuity(aBackVector, aForwardVector);
+ eRetval = getContinuity(aBackVector, aForwardVector);
}
return eRetval;
}
- ::basegfx::B2DPolygon adaptiveSubdivideByDistance(const ::basegfx::B2DPolygon& rCandidate, double fDistanceBound)
+ B2DPolygon adaptiveSubdivideByDistance(const B2DPolygon& rCandidate, double fDistanceBound)
{
- ::basegfx::B2DPolygon aRetval(rCandidate);
+ B2DPolygon aRetval(rCandidate);
if(aRetval.areControlPointsUsed())
{
@@ -255,19 +255,19 @@ namespace basegfx
for(sal_uInt32 a(0L); a < nPointCount; a++)
{
- const ::basegfx::B2DVector aVectorA(rCandidate.getControlVectorA(a));
- const ::basegfx::B2DVector aVectorB(rCandidate.getControlVectorB(a));
+ const B2DVector aVectorA(rCandidate.getControlVectorA(a));
+ const B2DVector aVectorB(rCandidate.getControlVectorB(a));
if(!aVectorA.equalZero() || !aVectorB.equalZero())
{
// vectors are used, get points
const sal_uInt32 nNext(getIndexOfSuccessor(a, rCandidate));
- ::basegfx::B2DPoint aPointA(rCandidate.getB2DPoint(a));
- ::basegfx::B2DPoint aPointB(rCandidate.getB2DPoint(nNext));
+ B2DPoint aPointA(rCandidate.getB2DPoint(a));
+ B2DPoint aPointB(rCandidate.getB2DPoint(nNext));
// build CubicBezier segment
- ::basegfx::B2DCubicBezier aBezier(
- aPointA, aPointA + aVectorA, aPointB + aVectorB, aPointB);
+ B2DCubicBezier aBezier(
+ aPointA, B2DPoint(aPointA + aVectorA), B2DPoint(aPointB + aVectorB), aPointB);
// generate DistanceBound
double fBound;
@@ -276,8 +276,8 @@ namespace basegfx
{
// If not set, calculate rough length of bezier segment by taking
// half of the sum of the edge and the control polygon
- ::basegfx::B2DVector aSimpleDistance(aPointB - aPointA);
- ::basegfx::B2DVector aTripleDistanceTop((aPointB + aVectorB) - (aPointA + aVectorA));
+ B2DVector aSimpleDistance(aPointB - aPointA);
+ B2DVector aTripleDistanceTop((aPointB + aVectorB) - (aPointA + aVectorA));
const double fRoughLength(
(aSimpleDistance.getLength()
+ (aVectorA.getLength() + aVectorB.getLength() + aTripleDistanceTop.getLength())) / 2.0);
@@ -318,9 +318,9 @@ namespace basegfx
return aRetval;
}
- ::basegfx::B2DPolygon adaptiveSubdivideByAngle(const ::basegfx::B2DPolygon& rCandidate, double fAngleBound)
+ B2DPolygon adaptiveSubdivideByAngle(const B2DPolygon& rCandidate, double fAngleBound)
{
- ::basegfx::B2DPolygon aRetval(rCandidate);
+ B2DPolygon aRetval(rCandidate);
if(aRetval.areControlPointsUsed())
{
@@ -329,25 +329,25 @@ namespace basegfx
for(sal_uInt32 a(0L); a < nPointCount; a++)
{
- const ::basegfx::B2DVector aVectorA(rCandidate.getControlVectorA(a));
- const ::basegfx::B2DVector aVectorB(rCandidate.getControlVectorB(a));
+ const B2DVector aVectorA(rCandidate.getControlVectorA(a));
+ const B2DVector aVectorB(rCandidate.getControlVectorB(a));
if(!aVectorA.equalZero() || !aVectorB.equalZero())
{
// vectors are used, get points
const sal_uInt32 nNext(getIndexOfSuccessor(a, rCandidate));
- ::basegfx::B2DPoint aPointA(rCandidate.getB2DPoint(a));
- ::basegfx::B2DPoint aPointB(rCandidate.getB2DPoint(nNext));
+ B2DPoint aPointA(rCandidate.getB2DPoint(a));
+ B2DPoint aPointB(rCandidate.getB2DPoint(nNext));
// build CubicBezier segment
- ::basegfx::B2DCubicBezier aBezier(
- aPointA, aPointA + aVectorA, aPointB + aVectorB, aPointB);
+ B2DCubicBezier aBezier(
+ aPointA, B2DPoint(aPointA + aVectorA), B2DPoint(aPointB + aVectorB), aPointB);
// generate AngleBound
double fBound(fAngleBound);
// make sure angle bound is not too small
- if(::basegfx::fTools::less(fAngleBound, 0.1))
+ if(fTools::less(fAngleBound, 0.1))
{
fAngleBound = 0.1;
}
@@ -372,29 +372,29 @@ namespace basegfx
return aRetval;
}
- sal_Bool isInside(const ::basegfx::B2DPolygon& rCandidate, const ::basegfx::B2DPoint& rPoint, sal_Bool bWithBorder)
+ bool isInside(const B2DPolygon& rCandidate, const B2DPoint& rPoint, bool bWithBorder)
{
- sal_Bool bRetval(sal_False);
+ bool bRetval(false);
const sal_uInt32 nPointCount(rCandidate.count());
for(sal_uInt32 a(0L); a < nPointCount; a++)
{
- const ::basegfx::B2DPoint aCurrentPoint(rCandidate.getB2DPoint(a));
+ const B2DPoint aCurrentPoint(rCandidate.getB2DPoint(a));
if(bWithBorder && aCurrentPoint.equal(rPoint))
{
- return sal_True;
+ return true;
}
// cross-over in Y?
- const ::basegfx::B2DPoint aPreviousPoint(rCandidate.getB2DPoint((!a) ? nPointCount - 1L : a - 1L));
- const sal_Bool bCompYA(::basegfx::fTools::more(aPreviousPoint.getY(), rPoint.getY()));
- const sal_Bool bCompYB(::basegfx::fTools::more(aCurrentPoint.getY(), rPoint.getY()));
+ const B2DPoint aPreviousPoint(rCandidate.getB2DPoint((!a) ? nPointCount - 1L : a - 1L));
+ const bool bCompYA(fTools::more(aPreviousPoint.getY(), rPoint.getY()));
+ const bool bCompYB(fTools::more(aCurrentPoint.getY(), rPoint.getY()));
if(bCompYA != bCompYB)
{
- const sal_Bool bCompXA(::basegfx::fTools::more(aPreviousPoint.getX(), rPoint.getX()));
- const sal_Bool bCompXB(::basegfx::fTools::more(aCurrentPoint.getX(), rPoint.getX()));
+ const bool bCompXA(fTools::more(aPreviousPoint.getX(), rPoint.getX()));
+ const bool bCompXB(fTools::more(aCurrentPoint.getX(), rPoint.getX()));
if(bCompXA == bCompXB)
{
@@ -410,11 +410,11 @@ namespace basegfx
(aPreviousPoint.getX() - aCurrentPoint.getX()) /
(aPreviousPoint.getY() - aCurrentPoint.getY());
- if(bWithBorder && ::basegfx::fTools::more(fCompare, rPoint.getX()))
+ if(bWithBorder && fTools::more(fCompare, rPoint.getX()))
{
bRetval = !bRetval;
}
- else if(::basegfx::fTools::moreOrEqual(fCompare, rPoint.getX()))
+ else if(fTools::moreOrEqual(fCompare, rPoint.getX()))
{
bRetval = !bRetval;
}
@@ -425,35 +425,35 @@ namespace basegfx
return bRetval;
}
- sal_Bool isInside(const ::basegfx::B2DPolygon& rCandidate, const ::basegfx::B2DPolygon& rPolygon, sal_Bool bWithBorder)
+ bool isInside(const B2DPolygon& rCandidate, const B2DPolygon& rPolygon, bool bWithBorder)
{
const sal_uInt32 nPointCount(rPolygon.count());
for(sal_uInt32 a(0L); a < nPointCount; a++)
{
- const ::basegfx::B2DPoint aTestPoint(rPolygon.getB2DPoint(a));
+ const B2DPoint aTestPoint(rPolygon.getB2DPoint(a));
if(!isInside(rCandidate, aTestPoint, bWithBorder))
{
- return sal_False;
+ return false;
}
}
- return sal_True;
+ return true;
}
- ::basegfx::B2DRange getRange(const ::basegfx::B2DPolygon& rCandidate)
+ B2DRange getRange(const B2DPolygon& rCandidate)
{
- ::basegfx::B2DRange aRetval;
+ B2DRange aRetval;
const sal_uInt32 nPointCount(rCandidate.count());
if(rCandidate.areControlPointsUsed())
{
for(sal_uInt32 a(0L); a < nPointCount; a++)
{
- const ::basegfx::B2DPoint aTestPoint(rCandidate.getB2DPoint(a));
- const ::basegfx::B2DVector aVectorA(rCandidate.getControlVectorA(a));
- const ::basegfx::B2DVector aVectorB(rCandidate.getControlVectorB(a));
+ const B2DPoint aTestPoint(rCandidate.getB2DPoint(a));
+ const B2DVector aVectorA(rCandidate.getControlVectorA(a));
+ const B2DVector aVectorB(rCandidate.getControlVectorB(a));
aRetval.expand(aTestPoint);
if(!aVectorA.equalZero())
@@ -464,7 +464,7 @@ namespace basegfx
if(!aVectorB.equalZero())
{
const sal_uInt32 nNextIndex(getIndexOfSuccessor(a, rCandidate));
- const ::basegfx::B2DPoint aNextPoint(rCandidate.getB2DPoint(nNextIndex));
+ const B2DPoint aNextPoint(rCandidate.getB2DPoint(nNextIndex));
aRetval.expand(aNextPoint + aVectorB);
}
}
@@ -473,7 +473,7 @@ namespace basegfx
{
for(sal_uInt32 a(0L); a < nPointCount; a++)
{
- const ::basegfx::B2DPoint aTestPoint(rCandidate.getB2DPoint(a));
+ const B2DPoint aTestPoint(rCandidate.getB2DPoint(a));
aRetval.expand(aTestPoint);
}
}
@@ -481,7 +481,7 @@ namespace basegfx
return aRetval;
}
- double getArea(const ::basegfx::B2DPolygon& rCandidate)
+ double getArea(const B2DPolygon& rCandidate)
{
double fRetval(0.0);
const sal_uInt32 nPointCount(rCandidate.count());
@@ -490,8 +490,8 @@ namespace basegfx
{
for(sal_uInt32 a(0L); a < nPointCount; a++)
{
- const ::basegfx::B2DPoint aPreviousPoint(rCandidate.getB2DPoint((!a) ? nPointCount - 1L : a - 1L));
- const ::basegfx::B2DPoint aCurrentPoint(rCandidate.getB2DPoint(a));
+ const B2DPoint aPreviousPoint(rCandidate.getB2DPoint((!a) ? nPointCount - 1L : a - 1L));
+ const B2DPoint aCurrentPoint(rCandidate.getB2DPoint(a));
fRetval += aPreviousPoint.getX() * aCurrentPoint.getY();
fRetval -= aPreviousPoint.getY() * aCurrentPoint.getX();
@@ -501,7 +501,7 @@ namespace basegfx
const double fZero(0.0);
- if(::basegfx::fTools::less(fRetval, fZero))
+ if(fTools::less(fRetval, fZero))
{
fRetval = -fRetval;
}
@@ -510,7 +510,7 @@ namespace basegfx
return fRetval;
}
- double getEdgeLength(const ::basegfx::B2DPolygon& rCandidate, sal_uInt32 nIndex)
+ double getEdgeLength(const B2DPolygon& rCandidate, sal_uInt32 nIndex)
{
OSL_ENSURE(nIndex < rCandidate.count(), "getIndexOfPredecessor: Access to polygon out of range (!)");
double fRetval(0.0);
@@ -521,9 +521,9 @@ namespace basegfx
if(rCandidate.isClosed() || nIndex + 1 != nPointCount)
{
const sal_uInt32 nNextIndex(nIndex + 1 == nPointCount ? 0L : nIndex + 1L);
- const ::basegfx::B2DPoint aCurrentPoint(rCandidate.getB2DPoint(nIndex));
- const ::basegfx::B2DPoint aNextPoint(rCandidate.getB2DPoint(nNextIndex));
- const ::basegfx::B2DVector aVector(aNextPoint - aCurrentPoint);
+ const B2DPoint aCurrentPoint(rCandidate.getB2DPoint(nIndex));
+ const B2DPoint aNextPoint(rCandidate.getB2DPoint(nNextIndex));
+ const B2DVector aVector(aNextPoint - aCurrentPoint);
fRetval = aVector.getLength();
}
}
@@ -531,7 +531,7 @@ namespace basegfx
return fRetval;
}
- double getLength(const ::basegfx::B2DPolygon& rCandidate)
+ double getLength(const B2DPolygon& rCandidate)
{
// This method may also be implemented using a loop over getEdgeLength, but
// since this would cause a lot of sqare roots to be solved it is much better
@@ -543,17 +543,17 @@ namespace basegfx
for(sal_uInt32 a(0L); a < nLoopCount; a++)
{
const sal_uInt32 nNextIndex(a + 1 == nPointCount ? 0L : a + 1L);
- const ::basegfx::B2DPoint aCurrentPoint(rCandidate.getB2DPoint(a));
- const ::basegfx::B2DPoint aNextPoint(rCandidate.getB2DPoint(nNextIndex));
- const ::basegfx::B2DVector aVector(aNextPoint - aCurrentPoint);
+ const B2DPoint aCurrentPoint(rCandidate.getB2DPoint(a));
+ const B2DPoint aNextPoint(rCandidate.getB2DPoint(nNextIndex));
+ const B2DVector aVector(aNextPoint - aCurrentPoint);
fRetval += aVector.scalar(aVector);
}
- if(!::basegfx::fTools::equalZero(fRetval))
+ if(!fTools::equalZero(fRetval))
{
const double fOne(1.0);
- if(!::basegfx::fTools::equal(fOne, fRetval))
+ if(!fTools::equal(fOne, fRetval))
{
fRetval = sqrt(fRetval);
}
@@ -562,26 +562,26 @@ namespace basegfx
return fRetval;
}
- ::basegfx::B2DPoint getPositionAbsolute(const ::basegfx::B2DPolygon& rCandidate, double fDistance, double fLength)
+ B2DPoint getPositionAbsolute(const B2DPolygon& rCandidate, double fDistance, double fLength)
{
- ::basegfx::B2DPoint aRetval;
+ B2DPoint aRetval;
const sal_uInt32 nPointCount(rCandidate.count());
if(nPointCount > 1L)
{
sal_uInt32 nIndex(0L);
- sal_Bool bIndexDone(sal_False);
+ bool bIndexDone(false);
const double fZero(0.0);
double fEdgeLength(fZero);
// get length if not given
- if(::basegfx::fTools::equalZero(fLength))
+ if(fTools::equalZero(fLength))
{
fLength = getLength(rCandidate);
}
// handle fDistance < 0.0
- if(::basegfx::fTools::less(fDistance, fZero))
+ if(fTools::less(fDistance, fZero))
{
if(rCandidate.isClosed())
{
@@ -593,12 +593,12 @@ namespace basegfx
{
// crop to polygon start
fDistance = fZero;
- bIndexDone = sal_True;
+ bIndexDone = true;
}
}
// handle fDistance >= fLength
- if(::basegfx::fTools::moreOrEqual(fDistance, fLength))
+ if(fTools::moreOrEqual(fDistance, fLength))
{
if(rCandidate.isClosed())
{
@@ -611,7 +611,7 @@ namespace basegfx
// crop to polygon end
fDistance = fZero;
nIndex = nPointCount - 1L;
- bIndexDone = sal_True;
+ bIndexDone = true;
}
}
@@ -623,7 +623,7 @@ namespace basegfx
// get length of next edge
fEdgeLength = getEdgeLength(rCandidate, nIndex);
- if(::basegfx::fTools::moreOrEqual(fDistance, fEdgeLength))
+ if(fTools::moreOrEqual(fDistance, fEdgeLength))
{
// go to next edge
fDistance -= fEdgeLength;
@@ -632,7 +632,7 @@ namespace basegfx
else
{
// it's on this edge, stop
- bIndexDone = sal_True;
+ bIndexDone = true;
}
} while (!bIndexDone);
}
@@ -642,29 +642,29 @@ namespace basegfx
// if fDistance != 0.0, move that length on the edge. The edge
// length is in fEdgeLength.
- if(!::basegfx::fTools::equalZero(fDistance))
+ if(!fTools::equalZero(fDistance))
{
sal_uInt32 nNextIndex(getIndexOfSuccessor(nIndex, rCandidate));
- const ::basegfx::B2DPoint aNextPoint(rCandidate.getB2DPoint(nNextIndex));
+ const B2DPoint aNextPoint(rCandidate.getB2DPoint(nNextIndex));
double fRelative(fZero);
- if(!::basegfx::fTools::equalZero(fEdgeLength))
+ if(!fTools::equalZero(fEdgeLength))
{
fRelative = fDistance / fEdgeLength;
}
// add calculated average value to the return value
- aRetval = ::basegfx::interpolate(aRetval, aNextPoint, fRelative);
+ aRetval = interpolate(aRetval, aNextPoint, fRelative);
}
}
return aRetval;
}
- ::basegfx::B2DPoint getPositionRelative(const ::basegfx::B2DPolygon& rCandidate, double fDistance, double fLength)
+ B2DPoint getPositionRelative(const B2DPolygon& rCandidate, double fDistance, double fLength)
{
// get length if not given
- if(::basegfx::fTools::equalZero(fLength))
+ if(fTools::equalZero(fLength))
{
fLength = getLength(rCandidate);
}
@@ -674,10 +674,10 @@ namespace basegfx
return getPositionAbsolute(rCandidate, fDistance * fLength, fLength);
}
- ::basegfx::B2DVectorOrientation getPointOrientation(const ::basegfx::B2DPolygon& rCandidate, sal_uInt32 nIndex)
+ B2VectorOrientation getPointOrientation(const B2DPolygon& rCandidate, sal_uInt32 nIndex)
{
OSL_ENSURE(nIndex < rCandidate.count(), "getIndexOfPredecessor: Access to polygon out of range (!)");
- ::basegfx::B2DVectorOrientation eRetval(::basegfx::ORIENTATION_NEUTRAL);
+ B2VectorOrientation eRetval(ORIENTATION_NEUTRAL);
if(rCandidate.count() > 2)
{
@@ -689,9 +689,9 @@ namespace basegfx
if(nIndNext != nIndex && nIndNext != nIndPrev)
{
- ::basegfx::B2DPoint aPoint(rCandidate.getB2DPoint(nIndex));
- ::basegfx::B2DVector aVecPrev(rCandidate.getB2DPoint(nIndPrev) - aPoint);
- ::basegfx::B2DVector aVecNext(rCandidate.getB2DPoint(nIndNext) - aPoint);
+ B2DPoint aPoint(rCandidate.getB2DPoint(nIndex));
+ B2DVector aVecPrev(rCandidate.getB2DPoint(nIndPrev) - aPoint);
+ B2DVector aVecNext(rCandidate.getB2DPoint(nIndNext) - aPoint);
eRetval = ::basegfx::getOrientation(aVecPrev, aVecNext);
}
}
@@ -701,7 +701,7 @@ namespace basegfx
}
CutFlagValue findCut(
- const ::basegfx::B2DPolygon& rCandidate,
+ const B2DPolygon& rCandidate,
sal_uInt32 nIndex1, sal_uInt32 nIndex2,
CutFlagValue aCutFlags,
double* pCut1, double* pCut2)
@@ -714,13 +714,13 @@ namespace basegfx
sal_uInt32 nEnd1(getIndexOfSuccessor(nIndex1, rCandidate));
sal_uInt32 nEnd2(getIndexOfSuccessor(nIndex2, rCandidate));
- const ::basegfx::B2DPoint aStart1(rCandidate.getB2DPoint(nIndex1));
- const ::basegfx::B2DPoint aEnd1(rCandidate.getB2DPoint(nEnd1));
- const ::basegfx::B2DVector aVector1(aEnd1 - aStart1);
+ const B2DPoint aStart1(rCandidate.getB2DPoint(nIndex1));
+ const B2DPoint aEnd1(rCandidate.getB2DPoint(nEnd1));
+ const B2DVector aVector1(aEnd1 - aStart1);
- const ::basegfx::B2DPoint aStart2(rCandidate.getB2DPoint(nIndex2));
- const ::basegfx::B2DPoint aEnd2(rCandidate.getB2DPoint(nEnd2));
- const ::basegfx::B2DVector aVector2(aEnd2 - aStart2);
+ const B2DPoint aStart2(rCandidate.getB2DPoint(nIndex2));
+ const B2DPoint aEnd2(rCandidate.getB2DPoint(nEnd2));
+ const B2DVector aVector2(aEnd2 - aStart2);
aRetval = findCut(
aStart1, aVector1, aStart2, aVector2,
@@ -731,8 +731,8 @@ namespace basegfx
}
CutFlagValue findCut(
- const ::basegfx::B2DPolygon& rCandidate1, sal_uInt32 nIndex1,
- const ::basegfx::B2DPolygon& rCandidate2, sal_uInt32 nIndex2,
+ const B2DPolygon& rCandidate1, sal_uInt32 nIndex1,
+ const B2DPolygon& rCandidate2, sal_uInt32 nIndex2,
CutFlagValue aCutFlags,
double* pCut1, double* pCut2)
{
@@ -745,13 +745,13 @@ namespace basegfx
sal_uInt32 nEnd1(getIndexOfSuccessor(nIndex1, rCandidate1));
sal_uInt32 nEnd2(getIndexOfSuccessor(nIndex2, rCandidate2));
- const ::basegfx::B2DPoint aStart1(rCandidate1.getB2DPoint(nIndex1));
- const ::basegfx::B2DPoint aEnd1(rCandidate1.getB2DPoint(nEnd1));
- const ::basegfx::B2DVector aVector1(aEnd1 - aStart1);
+ const B2DPoint aStart1(rCandidate1.getB2DPoint(nIndex1));
+ const B2DPoint aEnd1(rCandidate1.getB2DPoint(nEnd1));
+ const B2DVector aVector1(aEnd1 - aStart1);
- const ::basegfx::B2DPoint aStart2(rCandidate2.getB2DPoint(nIndex2));
- const ::basegfx::B2DPoint aEnd2(rCandidate2.getB2DPoint(nEnd2));
- const ::basegfx::B2DVector aVector2(aEnd2 - aStart2);
+ const B2DPoint aStart2(rCandidate2.getB2DPoint(nIndex2));
+ const B2DPoint aEnd2(rCandidate2.getB2DPoint(nEnd2));
+ const B2DVector aVector2(aEnd2 - aStart2);
aRetval = findCut(
aStart1, aVector1, aStart2, aVector2,
@@ -762,15 +762,15 @@ namespace basegfx
}
CutFlagValue findCut(
- const ::basegfx::B2DPoint& rEdge1Start, const ::basegfx::B2DVector& rEdge1Delta,
- const ::basegfx::B2DPoint& rEdge2Start, const ::basegfx::B2DVector& rEdge2Delta,
+ const B2DPoint& rEdge1Start, const B2DVector& rEdge1Delta,
+ const B2DPoint& rEdge2Start, const B2DVector& rEdge2Delta,
CutFlagValue aCutFlags,
double* pCut1, double* pCut2)
{
CutFlagValue aRetval(CUTFLAG_NONE);
double fCut1(0.0);
double fCut2(0.0);
- sal_Bool bFinished(!((sal_Bool)(aCutFlags & CUTFLAG_ALL)));
+ bool bFinished(!((bool)(aCutFlags & CUTFLAG_ALL)));
// test for same points?
if(!bFinished
@@ -782,7 +782,7 @@ namespace basegfx
{
if(rEdge1Start.equal(rEdge2Start))
{
- bFinished = sal_True;
+ bFinished = true;
aRetval = (CUTFLAG_START1|CUTFLAG_START2);
}
}
@@ -790,12 +790,12 @@ namespace basegfx
// same endpoint?
if(!bFinished && (aCutFlags & (CUTFLAG_END1|CUTFLAG_END2)) == (CUTFLAG_END1|CUTFLAG_END2))
{
- const ::basegfx::B2DPoint aEnd1(rEdge1Start + rEdge1Delta);
- const ::basegfx::B2DPoint aEnd2(rEdge2Start + rEdge2Delta);
+ const B2DPoint aEnd1(rEdge1Start + rEdge1Delta);
+ const B2DPoint aEnd2(rEdge2Start + rEdge2Delta);
if(aEnd1.equal(aEnd2))
{
- bFinished = sal_True;
+ bFinished = true;
aRetval = (CUTFLAG_END1|CUTFLAG_END2);
fCut1 = fCut2 = 1.0;
}
@@ -804,11 +804,11 @@ namespace basegfx
// startpoint1 == endpoint2?
if(!bFinished && (aCutFlags & (CUTFLAG_START1|CUTFLAG_END2)) == (CUTFLAG_START1|CUTFLAG_END2))
{
- const ::basegfx::B2DPoint aEnd2(rEdge2Start + rEdge2Delta);
+ const B2DPoint aEnd2(rEdge2Start + rEdge2Delta);
if(rEdge1Start.equal(aEnd2))
{
- bFinished = sal_True;
+ bFinished = true;
aRetval = (CUTFLAG_START1|CUTFLAG_END2);
fCut1 = 0.0;
fCut2 = 1.0;
@@ -818,11 +818,11 @@ namespace basegfx
// startpoint2 == endpoint1?
if(!bFinished&& (aCutFlags & (CUTFLAG_START2|CUTFLAG_END1)) == (CUTFLAG_START2|CUTFLAG_END1))
{
- const ::basegfx::B2DPoint aEnd1(rEdge1Start + rEdge1Delta);
+ const B2DPoint aEnd1(rEdge1Start + rEdge1Delta);
if(rEdge2Start.equal(aEnd1))
{
- bFinished = sal_True;
+ bFinished = true;
aRetval = (CUTFLAG_START2|CUTFLAG_END1);
fCut1 = 1.0;
fCut2 = 0.0;
@@ -837,7 +837,7 @@ namespace basegfx
// start1 on line 2 ?
if(isPointOnEdge(rEdge1Start, rEdge2Start, rEdge2Delta, &fCut2))
{
- bFinished = sal_True;
+ bFinished = true;
aRetval = (CUTFLAG_LINE|CUTFLAG_START1);
}
}
@@ -847,7 +847,7 @@ namespace basegfx
// start2 on line 1 ?
if(isPointOnEdge(rEdge2Start, rEdge1Start, rEdge1Delta, &fCut1))
{
- bFinished = sal_True;
+ bFinished = true;
aRetval = (CUTFLAG_LINE|CUTFLAG_START2);
}
}
@@ -855,11 +855,11 @@ namespace basegfx
if(!bFinished && (aCutFlags & CUTFLAG_END1))
{
// end1 on line 2 ?
- const ::basegfx::B2DPoint aEnd1(rEdge1Start + rEdge1Delta);
+ const B2DPoint aEnd1(rEdge1Start + rEdge1Delta);
if(isPointOnEdge(aEnd1, rEdge2Start, rEdge2Delta, &fCut2))
{
- bFinished = sal_True;
+ bFinished = true;
aRetval = (CUTFLAG_LINE|CUTFLAG_END1);
}
}
@@ -867,11 +867,11 @@ namespace basegfx
if(!bFinished && (aCutFlags & CUTFLAG_END2))
{
// end2 on line 1 ?
- const ::basegfx::B2DPoint aEnd2(rEdge2Start + rEdge2Delta);
+ const B2DPoint aEnd2(rEdge2Start + rEdge2Delta);
if(isPointOnEdge(aEnd2, rEdge1Start, rEdge1Delta, &fCut1))
{
- bFinished = sal_True;
+ bFinished = true;
aRetval = (CUTFLAG_LINE|CUTFLAG_END2);
}
}
@@ -881,7 +881,7 @@ namespace basegfx
// cut in line1, line2 ?
fCut1 = (rEdge1Delta.getX() * rEdge2Delta.getY()) - (rEdge1Delta.getY() * rEdge2Delta.getX());
- if(!::basegfx::fTools::equalZero(fCut1))
+ if(!fTools::equalZero(fCut1))
{
fCut1 = (rEdge2Delta.getY() * (rEdge2Start.getX() - rEdge1Start.getX())
+ rEdge2Delta.getX() * (rEdge1Start.getY() - rEdge2Start.getY())) / fCut1;
@@ -890,8 +890,8 @@ namespace basegfx
const double fOne(1.0);
// inside parameter range edge1 AND fCut2 is calcable
- if(::basegfx::fTools::more(fCut1, fZero) && ::basegfx::fTools::less(fCut1, fOne)
- && (!::basegfx::fTools::equalZero(rEdge2Delta.getX()) || !::basegfx::fTools::equalZero(rEdge2Delta.getY())))
+ if(fTools::more(fCut1, fZero) && fTools::less(fCut1, fOne)
+ && (!fTools::equalZero(rEdge2Delta.getX()) || !fTools::equalZero(rEdge2Delta.getY())))
{
// take the mopre precise calculation of the two possible
if(fabs(rEdge2Delta.getX()) > fabs(rEdge2Delta.getY()))
@@ -906,9 +906,9 @@ namespace basegfx
}
// inside parameter range edge2, too
- if(::basegfx::fTools::more(fCut2, fZero) && ::basegfx::fTools::less(fCut2, fOne))
+ if(fTools::more(fCut2, fZero) && fTools::less(fCut2, fOne))
{
- bFinished = sal_True;
+ bFinished = true;
aRetval = CUTFLAG_LINE;
}
}
@@ -930,56 +930,56 @@ namespace basegfx
return aRetval;
}
- sal_Bool isPointOnEdge(
- const ::basegfx::B2DPoint& rPoint,
- const ::basegfx::B2DPoint& rEdgeStart,
- const ::basegfx::B2DVector& rEdgeDelta,
+ bool isPointOnEdge(
+ const B2DPoint& rPoint,
+ const B2DPoint& rEdgeStart,
+ const B2DVector& rEdgeDelta,
double* pCut)
{
- sal_Bool bDeltaXIsZero(::basegfx::fTools::equalZero(rEdgeDelta.getX()));
- sal_Bool bDeltaYIsZero(::basegfx::fTools::equalZero(rEdgeDelta.getY()));
+ bool bDeltaXIsZero(fTools::equalZero(rEdgeDelta.getX()));
+ bool bDeltaYIsZero(fTools::equalZero(rEdgeDelta.getY()));
const double fZero(0.0);
const double fOne(1.0);
if(bDeltaXIsZero && bDeltaYIsZero)
{
// no line, just a point
- return sal_False;
+ return false;
}
else if(bDeltaXIsZero)
{
// vertical line
- if(::basegfx::fTools::equal(rPoint.getX(), rEdgeStart.getX()))
+ if(fTools::equal(rPoint.getX(), rEdgeStart.getX()))
{
double fValue = (rPoint.getY() - rEdgeStart.getY()) / rEdgeDelta.getY();
- if(::basegfx::fTools::more(fValue, fZero) && ::basegfx::fTools::less(fValue, fOne))
+ if(fTools::more(fValue, fZero) && fTools::less(fValue, fOne))
{
if(pCut)
{
*pCut = fValue;
}
- return sal_True;
+ return true;
}
}
}
else if(bDeltaYIsZero)
{
// horizontal line
- if(::basegfx::fTools::equal(rPoint.getY(), rEdgeStart.getY()))
+ if(fTools::equal(rPoint.getY(), rEdgeStart.getY()))
{
double fValue = (rPoint.getX() - rEdgeStart.getX()) / rEdgeDelta.getX();
- if(::basegfx::fTools::more(fValue, fZero)
- && ::basegfx::fTools::less(fValue, fOne))
+ if(fTools::more(fValue, fZero)
+ && fTools::less(fValue, fOne))
{
if(pCut)
{
*pCut = fValue;
}
- return sal_True;
+ return true;
}
}
}
@@ -989,13 +989,13 @@ namespace basegfx
double fTOne = (rPoint.getX() - rEdgeStart.getX()) / rEdgeDelta.getX();
double fTTwo = (rPoint.getY() - rEdgeStart.getY()) / rEdgeDelta.getY();
- if(::basegfx::fTools::equal(fTOne, fTTwo))
+ if(fTools::equal(fTOne, fTTwo))
{
// same parameter representation, point is on line. Take
// middle value for better results
double fValue = (fTOne + fTTwo) / 2.0;
- if(::basegfx::fTools::more(fValue, fZero) && ::basegfx::fTools::less(fValue, fOne))
+ if(fTools::more(fValue, fZero) && fTools::less(fValue, fOne))
{
// point is inside line bounds, too
if(pCut)
@@ -1003,17 +1003,17 @@ namespace basegfx
*pCut = fValue;
}
- return sal_True;
+ return true;
}
}
}
- return sal_False;
+ return false;
}
- ::basegfx::B2DPolyPolygon applyLineDashing(const ::basegfx::B2DPolygon& rCandidate, const ::std::vector<double>& raDashDotArray, double fFullDashDotLen)
+ B2DPolyPolygon applyLineDashing(const B2DPolygon& rCandidate, const ::std::vector<double>& raDashDotArray, double fFullDashDotLen)
{
- ::basegfx::B2DPolyPolygon aRetval;
+ B2DPolyPolygon aRetval;
if(rCandidate.count() && fFullDashDotLen > 0.0)
{
@@ -1024,9 +1024,9 @@ namespace basegfx
for(sal_uInt32 a(0L); a < nCount; a++)
{
const sal_uInt32 nNextIndex(getIndexOfSuccessor(a, rCandidate));
- const ::basegfx::B2DPoint aStart(rCandidate.getB2DPoint(a));
- const ::basegfx::B2DPoint aEnd(rCandidate.getB2DPoint(nNextIndex));
- const ::basegfx::B2DVector aVector(aEnd - aStart);
+ const B2DPoint aStart(rCandidate.getB2DPoint(a));
+ const B2DPoint aEnd(rCandidate.getB2DPoint(nNextIndex));
+ const B2DVector aVector(aEnd - aStart);
double fLength(aVector.getLength());
double fPosOnVector(0.0);
@@ -1035,7 +1035,7 @@ namespace basegfx
// handle [fPosOnVector .. fPosOnVector+fDashDotLength]
if(nDashDotIndex % 2)
{
- ::basegfx::B2DPolygon aResult;
+ B2DPolygon aResult;
// add start point
if(fPosOnVector == 0.0)
@@ -1044,11 +1044,11 @@ namespace basegfx
}
else
{
- aResult.append(aStart + (aVector * fPosOnVector));
+ aResult.append( B2DPoint(aStart + (aVector * fPosOnVector)) );
}
// add end point
- aResult.append(aStart + (aVector * (fPosOnVector + fDashDotLength)));
+ aResult.append( B2DPoint(aStart + (aVector * (fPosOnVector + fDashDotLength))) );
// add line to PolyPolygon
aRetval.append(aResult);
@@ -1064,10 +1064,10 @@ namespace basegfx
// handle [fPosOnVector .. fPosOnVector+fLength (bzw. end)]
if((fLength > 0.0) && (nDashDotIndex % 2))
{
- ::basegfx::B2DPolygon aResult;
+ B2DPolygon aResult;
// add start and end point
- const ::basegfx::B2DPoint aPosA(aStart + (aVector * fPosOnVector));
+ const B2DPoint aPosA(aStart + (aVector * fPosOnVector));
aResult.append(aPosA);
// add line to PolyPolygon
diff --git a/basegfx/source/polygon/b2dpolypolygon.cxx b/basegfx/source/polygon/b2dpolypolygon.cxx
index f6fcbd9c0e55..53da317e483e 100644
--- a/basegfx/source/polygon/b2dpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dpolypolygon.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dpolypolygon.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:06 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -110,21 +110,21 @@ public:
void incRefCount() { mnRefCount++; }
void decRefCount() { mnRefCount--; }
- sal_Bool isEqual(const ImplB2DPolyPolygon& rPolygonList) const
+ bool isEqual(const ImplB2DPolyPolygon& rPolygonList) const
{
// same polygon count?
if(maPolygons.size() != rPolygonList.maPolygons.size())
- return sal_False;
+ return false;
// if zero polygons the polys are equal
if(!maPolygons.size())
- return sal_True;
+ return true;
// compare polygon content
if(maPolygons != rPolygonList.maPolygons)
- return sal_False;
+ return false;
- return sal_True;
+ return true;
}
const ::basegfx::B2DPolygon& getB2DPolygon(sal_uInt32 nIndex) const
@@ -185,7 +185,7 @@ public:
return maPolygons.size();
}
- void setClosed(sal_Bool bNew)
+ void setClosed(bool bNew)
{
for(sal_uInt32 a(0L); a < maPolygons.size(); a++)
{
@@ -275,21 +275,21 @@ namespace basegfx
return *this;
}
- sal_Bool B2DPolyPolygon::operator==(const B2DPolyPolygon& rPolyPolygon) const
+ bool B2DPolyPolygon::operator==(const B2DPolyPolygon& rPolyPolygon) const
{
if(mpPolyPolygon == rPolyPolygon.mpPolyPolygon)
{
- return sal_True;
+ return true;
}
return mpPolyPolygon->isEqual(*(rPolyPolygon.mpPolyPolygon));
}
- sal_Bool B2DPolyPolygon::operator!=(const B2DPolyPolygon& rPolyPolygon) const
+ bool B2DPolyPolygon::operator!=(const B2DPolyPolygon& rPolyPolygon) const
{
if(mpPolyPolygon == rPolyPolygon.mpPolyPolygon)
{
- return sal_False;
+ return false;
}
return !mpPolyPolygon->isEqual(*(rPolyPolygon.mpPolyPolygon));
@@ -318,7 +318,7 @@ namespace basegfx
}
}
- sal_Bool B2DPolyPolygon::areControlPointsUsed() const
+ bool B2DPolyPolygon::areControlPointsUsed() const
{
for(sal_uInt32 a(0L); a < mpPolyPolygon->count(); a++)
{
@@ -326,11 +326,11 @@ namespace basegfx
if(rPolygon.areControlPointsUsed())
{
- return sal_True;
+ return true;
}
}
- return sal_False;
+ return false;
}
void B2DPolyPolygon::insert(sal_uInt32 nIndex, const B2DPolygon& rPolygon, sal_uInt32 nCount)
@@ -399,9 +399,9 @@ namespace basegfx
mpPolyPolygon->incRefCount();
}
- sal_Bool B2DPolyPolygon::isClosed() const
+ bool B2DPolyPolygon::isClosed() const
{
- sal_Bool bRetval(sal_True);
+ bool bRetval(true);
// PolyPOlygon is closed when all contained Polygons are closed or
// no Polygon exists.
@@ -409,14 +409,14 @@ namespace basegfx
{
if(!(mpPolyPolygon->getB2DPolygon(a)).isClosed())
{
- bRetval = sal_False;
+ bRetval = false;
}
}
return bRetval;
}
- void B2DPolyPolygon::setClosed(sal_Bool bNew)
+ void B2DPolyPolygon::setClosed(bool bNew)
{
if(bNew != isClosed())
{
@@ -431,15 +431,15 @@ namespace basegfx
mpPolyPolygon->flip();
}
- sal_Bool B2DPolyPolygon::hasDoublePoints() const
+ bool B2DPolyPolygon::hasDoublePoints() const
{
- sal_Bool bRetval(sal_False);
+ bool bRetval(false);
for(sal_uInt32 a(0L); !bRetval && a < mpPolyPolygon->count(); a++)
{
if((mpPolyPolygon->getB2DPolygon(a)).hasDoublePoints())
{
- bRetval = sal_True;
+ bRetval = true;
}
}
diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index 17d1c476acbf..9d1fb54e1e75 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dpolypolygoncutter.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:06 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,7 +88,7 @@
namespace basegfx
{
- B2DPolygonNode::B2DPolygonNode(const ::basegfx::B2DPoint& rPosition, B2DPolygonNode* pPrevious)
+ B2DPolygonNode::B2DPolygonNode(const B2DPoint& rPosition, B2DPolygonNode* pPrevious)
: maPosition(rPosition)
{
mpListPrevious = this;
@@ -190,14 +190,14 @@ namespace basegfx
}
}
- sal_Bool B2DPolygonNode::getOrientation() const
+ bool B2DPolygonNode::getOrientation() const
{
const B2DPolygonNode* pOutmost = this;
const B2DPolygonNode* pCurrent = this->getNext();
while(pCurrent != this)
{
- if(::basegfx::fTools::more(pOutmost->getPosition().getX(), pCurrent->getPosition().getX()))
+ if(fTools::more(pOutmost->getPosition().getX(), pCurrent->getPosition().getX()))
{
if(pCurrent->getPosition().getX() < pOutmost->getPosition().getX())
{
@@ -216,9 +216,9 @@ namespace basegfx
pCurrent = pCurrent->getNext();
}
- ::basegfx::B2DVector aVec1(pOutmost->getPrevious()->getPosition() - pOutmost->getPosition());
- ::basegfx::B2DVector aVec2(pOutmost->getNext()->getPosition() - pOutmost->getPosition());
- return sal_Bool(::basegfx::fTools::more(aVec1.getX() * aVec2.getY(), aVec1.getY() * aVec2.getX()));
+ B2DVector aVec1(pOutmost->getPrevious()->getPosition() - pOutmost->getPosition());
+ B2DVector aVec2(pOutmost->getNext()->getPosition() - pOutmost->getPosition());
+ return bool(fTools::more(aVec1.getX() * aVec2.getY(), aVec1.getY() * aVec2.getX()));
}
void B2DPolygonNode::swapOrientation()
@@ -231,9 +231,9 @@ namespace basegfx
} while(pCurrent != this);
}
- ::basegfx::B2DRange B2DPolygonNode::getRange() const
+ B2DRange B2DPolygonNode::getRange() const
{
- ::basegfx::B2DRange aRetval;
+ B2DRange aRetval;
const B2DPolygonNode* pCurrent = this;
do {
@@ -244,26 +244,26 @@ namespace basegfx
return aRetval;
}
- sal_Bool B2DPolygonNode::isInside(const ::basegfx::B2DPoint& rPoint, sal_Bool bWithBorder) const
+ bool B2DPolygonNode::isInside(const B2DPoint& rPoint, bool bWithBorder) const
{
- sal_Bool bInside(sal_False);
+ bool bInside(false);
const B2DPolygonNode* pCurrent = this;
do
{
if(bWithBorder && pCurrent->getPosition().equal(rPoint))
{
- return sal_True;
+ return true;
}
B2DPolygonNode* pNext = pCurrent->getNext();
- const sal_Bool bCompYA(::basegfx::fTools::more(pCurrent->getPosition().getY(), rPoint.getY()));
- const sal_Bool bCompYB(::basegfx::fTools::more(pNext->getPosition().getY(), rPoint.getY()));
+ const bool bCompYA(fTools::more(pCurrent->getPosition().getY(), rPoint.getY()));
+ const bool bCompYB(fTools::more(pNext->getPosition().getY(), rPoint.getY()));
if(bCompYA != bCompYB)
{
- const sal_Bool bCompXA(::basegfx::fTools::more(pCurrent->getPosition().getX(), rPoint.getX()));
- const sal_Bool bCompXB(::basegfx::fTools::more(pNext->getPosition().getX(), rPoint.getX()));
+ const bool bCompXA(fTools::more(pCurrent->getPosition().getX(), rPoint.getX()));
+ const bool bCompXB(fTools::more(pNext->getPosition().getX(), rPoint.getX()));
if(bCompXA == bCompXB)
{
@@ -279,11 +279,11 @@ namespace basegfx
(pCurrent->getPosition().getX() - pNext->getPosition().getX()) /
(pCurrent->getPosition().getY() - pNext->getPosition().getY());
- if(bWithBorder && ::basegfx::fTools::more(fCmp, rPoint.getX()))
+ if(bWithBorder && fTools::more(fCmp, rPoint.getX()))
{
bInside = !bInside;
}
- else if(::basegfx::fTools::moreOrEqual(fCmp, rPoint.getX()))
+ else if(fTools::moreOrEqual(fCmp, rPoint.getX()))
{
bInside = !bInside;
}
@@ -298,10 +298,10 @@ namespace basegfx
return bInside;
}
- sal_Bool B2DPolygonNode::isPolygonInside(B2DPolygonNode* pPoly, sal_Bool bWithBorder) const
+ bool B2DPolygonNode::isPolygonInside(B2DPolygonNode* pPoly, bool bWithBorder) const
{
B2DPolygonNode* pTest = pPoly;
- sal_Bool bAllAInside(sal_True);
+ bool bAllAInside(true);
do {
bAllAInside = isInside(pTest->getPosition(), bWithBorder);
@@ -348,7 +348,7 @@ namespace basegfx
mnDepth = (mbOrientation) ? 0L : -1L;
}
- void B2DClipExtraPolygonInfo::changeDepth(sal_Bool bOrientation)
+ void B2DClipExtraPolygonInfo::changeDepth(bool bOrientation)
{
if(bOrientation)
{
@@ -376,7 +376,7 @@ namespace basegfx
maPolygonList.clear();
}
- void B2DPolyPolygonCutter::removeIncludedPolygons(sal_Bool bUseOr)
+ void B2DPolyPolygonCutter::removeIncludedPolygons(bool bUseOr)
{
const sal_uInt32 aCount(maPolygonList.size());
B2DClipExtraPolygonInfo* pInfos = new B2DClipExtraPolygonInfo[aCount];
@@ -400,7 +400,7 @@ namespace basegfx
if(a != b && doRangesInclude(rInfoA.getRange(), rInfoB.getRange()))
{
// volume B in A, test pA, pB for inclusion, with border
- if(maPolygonList[a]->isPolygonInside(maPolygonList[b], sal_True))
+ if(maPolygonList[a]->isPolygonInside(maPolygonList[b], true))
{
// pB is inside pA
rInfoB.changeDepth(rInfoA.getOrientation());
@@ -486,7 +486,7 @@ namespace basegfx
for(sal_uInt32 a(0L); a < rPolygon.count(); a++)
{
- ::basegfx::B2DPoint aPoint(rPolygon.getB2DPoint(a));
+ B2DPoint aPoint(rPolygon.getB2DPoint(a));
pRetval = new B2DPolygonNode(aPoint, pRetval);
}
@@ -521,7 +521,7 @@ namespace basegfx
} while(pAct != pPolygon);
}
- void B2DPolyPolygonCutter::addPolyPolygon(const B2DPolyPolygon& rPolyPolygon, sal_Bool bForceOrientation)
+ void B2DPolyPolygonCutter::addPolyPolygon(const B2DPolyPolygon& rPolyPolygon, bool bForceOrientation)
{
for(sal_uInt32 a(0L); a < rPolyPolygon.count(); a++)
{
@@ -536,10 +536,10 @@ namespace basegfx
{
if(bForceOrientation)
{
- ::basegfx::B2DVectorOrientation aOrientation =
- ::basegfx::tools::getOrientation(aCandidate);
+ B2VectorOrientation aOrientation =
+ tools::getOrientation(aCandidate);
- if(::basegfx::ORIENTATION_POSITIVE != aOrientation)
+ if(ORIENTATION_POSITIVE != aOrientation)
{
aCandidate.flip();
}
@@ -575,7 +575,7 @@ namespace basegfx
pAct = pAct->getNext();
} while(pAct != pCand);
- aNewPolygon.setClosed(sal_True);
+ aNewPolygon.setClosed(true);
rPolyPolygon.append(aNewPolygon);
}
@@ -656,7 +656,7 @@ namespace basegfx
do {
if(isSamePos(pA->getPosition(), pB->getPosition()))
{
- aNewCuts.push_back(new B2DSimpleCut(pA, pB, sal_True, pCand->getOrientation()));
+ aNewCuts.push_back(new B2DSimpleCut(pA, pB, true, pCand->getOrientation()));
}
// next B
@@ -679,42 +679,42 @@ namespace basegfx
do {
pB->calcMinMaxX(fMaxBX, fMinBX);
- if(::basegfx::fTools::more(fMaxBX, fMinAX)
- && ::basegfx::fTools::more(fMaxAX, fMinBX))
+ if(fTools::more(fMaxBX, fMinAX)
+ && fTools::more(fMaxAX, fMinBX))
{
pB->calcMinMaxY(fMaxBY, fMinBY);
- if(::basegfx::fTools::more(fMaxBY, fMinAY)
- && ::basegfx::fTools::more(fMaxAY, fMinBY))
+ if(fTools::more(fMaxBY, fMinAY)
+ && fTools::more(fMaxAY, fMinBY))
{
if(!isSamePos(pA->getPosition(), pB->getPosition()))
{
- const ::basegfx::B2DVector aVectorA(pA->getNext()->getPosition() - pA->getPosition());
- const ::basegfx::B2DVector aVectorB(pB->getNext()->getPosition() - pB->getPosition());
+ const B2DVector aVectorA(pA->getNext()->getPosition() - pA->getPosition());
+ const B2DVector aVectorB(pB->getNext()->getPosition() - pB->getPosition());
- if(::basegfx::tools::findCut(pA->getPosition(), aVectorA, pB->getPosition(), aVectorB, CUTFLAG_LINE, &fCut))
+ if(tools::findCut(pA->getPosition(), aVectorA, pB->getPosition(), aVectorB, CUTFLAG_LINE, &fCut))
{
// crossover, two new points
- ::basegfx::B2DPoint aNewPos(::basegfx::interpolate(pA->getPosition(), pA->getNext()->getPosition(), fCut));
+ B2DPoint aNewPos(interpolate(pA->getPosition(), pA->getNext()->getPosition(), fCut));
B2DPolygonNode* pCutLo = new B2DPolygonNode(aNewPos, pA);
B2DPolygonNode* pCutHi = new B2DPolygonNode(aNewPos, pB);
- aNewCuts.push_back(new B2DSimpleCut(pCutLo, pCutHi, sal_True, pCand->getOrientation()));
+ aNewCuts.push_back(new B2DSimpleCut(pCutLo, pCutHi, true, pCand->getOrientation()));
pA->calcMinMaxX(fMaxAX, fMinAX);
pA->calcMinMaxY(fMaxAY, fMinAY);
}
else
{
- if(::basegfx::tools::isPointOnEdge(pA->getPosition(), pB->getPosition(), aVectorB, &fCut))
+ if(tools::isPointOnEdge(pA->getPosition(), pB->getPosition(), aVectorB, &fCut))
{
// startpoint A at edge B, one new point
B2DPolygonNode* pCutHi = new B2DPolygonNode(pA->getPosition(), pB);
- aNewCuts.push_back(new B2DSimpleCut(pA, pCutHi, sal_True, pCand->getOrientation()));
+ aNewCuts.push_back(new B2DSimpleCut(pA, pCutHi, true, pCand->getOrientation()));
}
- else if(::basegfx::tools::isPointOnEdge(pB->getPosition(), pA->getPosition(), aVectorA, &fCut))
+ else if(tools::isPointOnEdge(pB->getPosition(), pA->getPosition(), aVectorA, &fCut))
{
// startpoint B at edge A, one new point
B2DPolygonNode* pCutLo = new B2DPolygonNode(pB->getPosition(), pA);
- aNewCuts.push_back(new B2DSimpleCut(pCutLo, pB, sal_True, pCand->getOrientation()));
+ aNewCuts.push_back(new B2DSimpleCut(pCutLo, pB, true, pCand->getOrientation()));
pA->calcMinMaxX(fMaxAX, fMinAX);
pA->calcMinMaxY(fMaxAY, fMinAY);
}
@@ -743,11 +743,11 @@ namespace basegfx
}
}
- sal_Bool B2DPolyPolygonCutter::isCrossover(B2DPolygonNode* pA, B2DPolygonNode* pB)
+ bool B2DPolyPolygonCutter::isCrossover(B2DPolygonNode* pA, B2DPolygonNode* pB)
{
// build entering vectors
- ::basegfx::B2DVector aVecA(pA->getPrevious()->getPosition() - pA->getPosition());
- ::basegfx::B2DVector aVecB(pB->getPrevious()->getPosition() - pA->getPosition());
+ B2DVector aVecA(pA->getPrevious()->getPosition() - pA->getPosition());
+ B2DVector aVecB(pB->getPrevious()->getPosition() - pA->getPosition());
aVecA.normalize();
aVecB.normalize();
double fDegreeA2 = atan2(aVecA.getY(), aVecA.getX());
@@ -769,30 +769,30 @@ namespace basegfx
fDegreeA1 = fTemp;
}
- sal_Bool bB1Inside(::basegfx::fTools::more(fDegreeB1, fDegreeA1)
- && ::basegfx::fTools::more(fDegreeA2, fDegreeB1));
- sal_Bool bB2Inside(::basegfx::fTools::more(fDegreeB2, fDegreeA1)
- && ::basegfx::fTools::more(fDegreeA2, fDegreeB2));
+ bool bB1Inside(fTools::more(fDegreeB1, fDegreeA1)
+ && fTools::more(fDegreeA2, fDegreeB1));
+ bool bB2Inside(fTools::more(fDegreeB2, fDegreeA1)
+ && fTools::more(fDegreeA2, fDegreeB2));
if(bB1Inside && bB2Inside)
{
- return sal_False;
+ return false;
}
- sal_Bool bB1Outside(::basegfx::fTools::more(fDegreeA1, fDegreeB1)
- || ::basegfx::fTools::more(fDegreeB1, fDegreeA2));
- sal_Bool bB2Outside(::basegfx::fTools::more(fDegreeA1, fDegreeB2)
- || ::basegfx::fTools::more(fDegreeB2, fDegreeA2));
+ bool bB1Outside(fTools::more(fDegreeA1, fDegreeB1)
+ || fTools::more(fDegreeB1, fDegreeA2));
+ bool bB2Outside(fTools::more(fDegreeA1, fDegreeB2)
+ || fTools::more(fDegreeB2, fDegreeA2));
return !(bB1Outside && bB2Outside);
}
- sal_Bool B2DPolyPolygonCutter::isCrossover(B2DSimpleCut* pEnter, B2DSimpleCut* pLeave)
+ bool B2DPolyPolygonCutter::isCrossover(B2DSimpleCut* pEnter, B2DSimpleCut* pLeave)
{
// build entering vectors
- ::basegfx::B2DVector aVecJ(pEnter->getLeft()->getNext()->getPosition() - pEnter->getLeft()->getPosition());
- ::basegfx::B2DVector aVecA(pEnter->getLeft()->getPrevious()->getPosition() - pEnter->getLeft()->getPosition());
- ::basegfx::B2DVector aVecB(pEnter->getRight()->getPrevious()->getPosition() - pEnter->getLeft()->getPosition());
+ B2DVector aVecJ(pEnter->getLeft()->getNext()->getPosition() - pEnter->getLeft()->getPosition());
+ B2DVector aVecA(pEnter->getLeft()->getPrevious()->getPosition() - pEnter->getLeft()->getPosition());
+ B2DVector aVecB(pEnter->getRight()->getPrevious()->getPosition() - pEnter->getLeft()->getPosition());
aVecJ.normalize();
aVecA.normalize();
aVecB.normalize();
@@ -822,7 +822,7 @@ namespace basegfx
fDegreeB2 -= (2.0 * F_PI);
}
- sal_Bool bA2BiggerB2(::basegfx::fTools::more(fDegreeA2, fDegreeB2));
+ bool bA2BiggerB2(fTools::more(fDegreeA2, fDegreeB2));
// build leaving vectors
aVecJ = pLeave->getLeft()->getPrevious()->getPosition() - pLeave->getLeft()->getPosition();
@@ -857,7 +857,7 @@ namespace basegfx
fDegreeB1 -= (2.0 * F_PI);
}
- sal_Bool bA1BiggerB1(::basegfx::fTools::more(fDegreeA1, fDegreeB1));
+ bool bA1BiggerB1(fTools::more(fDegreeA1, fDegreeB1));
// compare
return (bA1BiggerB1 == bA2BiggerB2);
@@ -878,7 +878,7 @@ namespace basegfx
sal_uInt32 a;
// create volume list for all polys for faster compares
- ::basegfx::B2DRange* pVolumes = new ::basegfx::B2DRange[maPolygonList.size()];
+ B2DRange* pVolumes = new B2DRange[maPolygonList.size()];
for(a = 0L; a < maPolygonList.size(); a++)
{
@@ -928,23 +928,23 @@ namespace basegfx
do {
pB->calcMinMaxX(fMaxBX, fMinBX);
- if(::basegfx::fTools::more(fMaxBX, fMinAX)
- && ::basegfx::fTools::more(fMaxAX, fMinBX))
+ if(fTools::more(fMaxBX, fMinAX)
+ && fTools::more(fMaxAX, fMinBX))
{
pB->calcMinMaxY(fMaxBY, fMinBY);
- if(::basegfx::fTools::more(fMaxBY, fMinAY)
- && ::basegfx::fTools::more(fMaxAY, fMinBY))
+ if(fTools::more(fMaxBY, fMinAY)
+ && fTools::more(fMaxAY, fMinBY))
{
if(!isSamePos(pA->getPosition(), pB->getPosition()))
{
- const ::basegfx::B2DVector aVectorA(pA->getNext()->getPosition() - pA->getPosition());
- const ::basegfx::B2DVector aVectorB(pB->getNext()->getPosition() - pB->getPosition());
+ const B2DVector aVectorA(pA->getNext()->getPosition() - pA->getPosition());
+ const B2DVector aVectorB(pB->getNext()->getPosition() - pB->getPosition());
- if(::basegfx::tools::findCut(pA->getPosition(), aVectorA, pB->getPosition(), aVectorB, CUTFLAG_LINE, &fCut))
+ if(tools::findCut(pA->getPosition(), aVectorA, pB->getPosition(), aVectorB, CUTFLAG_LINE, &fCut))
{
// crossover, two new points, use as cutpoint
- ::basegfx::B2DPoint aNewPos(::basegfx::interpolate(pA->getPosition(), pA->getNext()->getPosition(), fCut));
+ B2DPoint aNewPos(interpolate(pA->getPosition(), pA->getNext()->getPosition(), fCut));
B2DPolygonNode* pCutLo = new B2DPolygonNode(aNewPos, pA);
B2DPolygonNode* pCutHi = new B2DPolygonNode(aNewPos, pB);
aNewCuts.push_back(new B2DSimpleCut(pCutLo, pCutHi));
@@ -953,14 +953,14 @@ namespace basegfx
}
else
{
- if(::basegfx::tools::isPointOnEdge(pA->getPosition(), pB->getPosition(), aVectorB, &fCut))
+ if(tools::isPointOnEdge(pA->getPosition(), pB->getPosition(), aVectorB, &fCut))
{
// startpoint A at edge B, one new point
// leaves or enters common section
B2DPolygonNode* pCutHi = new B2DPolygonNode(pA->getPosition(), pB);
aTmpCuts.push_back(new B2DSimpleCut(pA, pCutHi));
}
- else if(::basegfx::tools::isPointOnEdge(pB->getPosition(), pA->getPosition(), aVectorA, &fCut))
+ else if(tools::isPointOnEdge(pB->getPosition(), pA->getPosition(), aVectorA, &fCut))
{
// startpoint B at edge A, one new point
// leaves or enters common section
@@ -986,15 +986,15 @@ namespace basegfx
for(sal_uInt32 c(0L); c < aTmpCuts.size();)
{
B2DSimpleCut* pCand = aTmpCuts[c];
- sal_Bool bPrevSamePos(isPrevSamePos(pCand->getLeft(), pCand->getRight()));
- sal_Bool bNextSamePos(isNextSamePos(pCand->getLeft(), pCand->getRight()));
- sal_Bool bDelete(sal_False);
- sal_Bool bIncC(sal_True);
+ bool bPrevSamePos(isPrevSamePos(pCand->getLeft(), pCand->getRight()));
+ bool bNextSamePos(isNextSamePos(pCand->getLeft(), pCand->getRight()));
+ bool bDelete(false);
+ bool bIncC(true);
if(bPrevSamePos && bNextSamePos)
{
// single point inside continued same direction section
- bDelete = sal_True;
+ bDelete = true;
}
else if(!bPrevSamePos && !bNextSamePos)
{
@@ -1004,12 +1004,12 @@ namespace basegfx
// real cut, move to real cutlist
aNewCuts.push_back(pCand);
aTmpCuts.erase(aTmpCuts.begin() + c);
- bIncC = sal_False;
+ bIncC = false;
}
else
{
// no cut, just a touch in one point
- bDelete = sal_True;
+ bDelete = true;
}
}
@@ -1018,7 +1018,7 @@ namespace basegfx
{
delete pCand;
aTmpCuts.erase(aTmpCuts.begin() + c);
- bIncC = sal_False;
+ bIncC = false;
}
// next candidate
@@ -1036,8 +1036,8 @@ namespace basegfx
aTmpCuts.erase(aTmpCuts.begin());
B2DPolygonNode* pActA = pCutA->getLeft();
B2DPolygonNode* pActB = pCutA->getRight();
- sal_Bool bPrevSamePos(isPrevSamePos(pActA, pActB));
- sal_Bool bNextSamePos(isNextSamePos(pActA, pActB));
+ bool bPrevSamePos(isPrevSamePos(pActA, pActB));
+ bool bNextSamePos(isNextSamePos(pActA, pActB));
if(aTmpCuts.size())
{
diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx
index 60f61b347135..856725546868 100644
--- a/basegfx/source/polygon/b2dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolypolygontools.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dpolypolygontools.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:06 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,37 +91,37 @@ namespace basegfx
{
// B2DPolyPolygon tools
- void correctOrientations(::basegfx::B2DPolyPolygon& rCandidate)
+ void correctOrientations(B2DPolyPolygon& rCandidate)
{
const sal_uInt32 nPolygonCount(rCandidate.count());
sal_uInt32 nIndexOfOutmostPolygon(0L);
- sal_Bool bIndexOfOutmostPolygonSet(sal_False);
+ bool bIndexOfOutmostPolygonSet(false);
for(sal_uInt32 a(0L); a < nPolygonCount; a++)
{
- ::basegfx::B2DPolygon aCandidate = rCandidate.getB2DPolygon(a);
+ B2DPolygon aCandidate = rCandidate.getB2DPolygon(a);
if(aCandidate.count() > 2L)
{
- ::basegfx::B2DVectorOrientation aOrientation =
- ::basegfx::tools::getOrientation(aCandidate);
- sal_Bool bDoFlip(::basegfx::ORIENTATION_POSITIVE != aOrientation);
+ B2VectorOrientation aOrientation =
+ tools::getOrientation(aCandidate);
+ bool bDoFlip(ORIENTATION_POSITIVE != aOrientation);
// init values for depth and compare point for
// inside test. Since the ordering makes only sense when assuming
// that there are no intersections, the inside test is done with
// any point of the candidate, so teke the first one.
sal_uInt32 nDepth(0L);
- const ::basegfx::B2DPoint aTestPoint(aCandidate.getB2DPoint(0L));
+ const B2DPoint aTestPoint(aCandidate.getB2DPoint(0L));
// loop over other polygons and calculate depth
for(sal_uInt32 b(0L); b < nPolygonCount; b++)
{
if(b != a)
{
- ::basegfx::B2DPolygon aComparePolygon = rCandidate.getB2DPolygon(b);
+ B2DPolygon aComparePolygon = rCandidate.getB2DPolygon(b);
- if(::basegfx::tools::isInside(aComparePolygon, aTestPoint))
+ if(tools::isInside(aComparePolygon, aTestPoint))
{
nDepth++;
}
@@ -129,7 +129,7 @@ namespace basegfx
}
// if nDepth is odd it is a hole
- sal_Bool bIsHole(1L == (nDepth & 0x00000001));
+ bool bIsHole(1L == (nDepth & 0x00000001));
// does polygon need to be flipped?
if((bDoFlip && !bIsHole) || (!bDoFlip && bIsHole))
@@ -143,7 +143,7 @@ namespace basegfx
// remember the index if it's the outmost polygon
if(!bIndexOfOutmostPolygonSet && 0L == nDepth)
{
- bIndexOfOutmostPolygonSet = sal_True;
+ bIndexOfOutmostPolygonSet = true;
nIndexOfOutmostPolygon = a;
}
}
@@ -152,16 +152,16 @@ namespace basegfx
// if the outmost polygon is not the first, move it in front
if(bIndexOfOutmostPolygonSet && nIndexOfOutmostPolygon > 0L)
{
- ::basegfx::B2DPolygon aOutmostPolygon = rCandidate.getB2DPolygon(nIndexOfOutmostPolygon);
+ B2DPolygon aOutmostPolygon = rCandidate.getB2DPolygon(nIndexOfOutmostPolygon);
rCandidate.remove(nIndexOfOutmostPolygon);
rCandidate.insert(0L, aOutmostPolygon);
}
}
- void removeIntersections(::basegfx::B2DPolyPolygon& rCandidate,
- sal_Bool bForceOrientation, sal_Bool bInvertRemove)
+ void removeIntersections(B2DPolyPolygon& rCandidate,
+ bool bForceOrientation, bool bInvertRemove)
{
- ::basegfx::B2DPolyPolygonCutter aCutter;
+ B2DPolyPolygonCutter aCutter;
aCutter.addPolyPolygon(rCandidate, bForceOrientation);
aCutter.removeSelfIntersections();
@@ -171,9 +171,9 @@ namespace basegfx
aCutter.getPolyPolygon(rCandidate);
}
- ::basegfx::B2DPolyPolygon adaptiveSubdivideByDistance(const ::basegfx::B2DPolyPolygon& rCandidate, double fDistanceBound)
+ B2DPolyPolygon adaptiveSubdivideByDistance(const B2DPolyPolygon& rCandidate, double fDistanceBound)
{
- ::basegfx::B2DPolyPolygon aRetval(rCandidate);
+ B2DPolyPolygon aRetval(rCandidate);
if(aRetval.areControlPointsUsed())
{
@@ -181,11 +181,11 @@ namespace basegfx
for(sal_uInt32 a(0L); aRetval.areControlPointsUsed() && a < nPolygonCount; a++)
{
- ::basegfx::B2DPolygon aCandidate = aRetval.getB2DPolygon(a);
+ B2DPolygon aCandidate = aRetval.getB2DPolygon(a);
if(aCandidate.areControlPointsUsed())
{
- aCandidate = ::basegfx::tools::adaptiveSubdivideByDistance(aCandidate, fDistanceBound);
+ aCandidate = tools::adaptiveSubdivideByDistance(aCandidate, fDistanceBound);
aRetval.setB2DPolygon(a, aCandidate);
}
}
@@ -194,9 +194,9 @@ namespace basegfx
return aRetval;
}
- ::basegfx::B2DPolyPolygon adaptiveSubdivideByAngle(const ::basegfx::B2DPolyPolygon& rCandidate, double fAngleBound)
+ B2DPolyPolygon adaptiveSubdivideByAngle(const B2DPolyPolygon& rCandidate, double fAngleBound)
{
- ::basegfx::B2DPolyPolygon aRetval(rCandidate);
+ B2DPolyPolygon aRetval(rCandidate);
if(aRetval.areControlPointsUsed())
{
@@ -204,11 +204,11 @@ namespace basegfx
for(sal_uInt32 a(0L); aRetval.areControlPointsUsed() && a < nPolygonCount; a++)
{
- ::basegfx::B2DPolygon aCandidate = aRetval.getB2DPolygon(a);
+ B2DPolygon aCandidate = aRetval.getB2DPolygon(a);
if(aCandidate.areControlPointsUsed())
{
- aCandidate = ::basegfx::tools::adaptiveSubdivideByAngle(aCandidate, fAngleBound);
+ aCandidate = tools::adaptiveSubdivideByAngle(aCandidate, fAngleBound);
aRetval.setB2DPolygon(a, aCandidate);
}
}
@@ -217,28 +217,28 @@ namespace basegfx
return aRetval;
}
- ::basegfx::B2DRange getRange(const ::basegfx::B2DPolyPolygon& rCandidate)
+ B2DRange getRange(const B2DPolyPolygon& rCandidate)
{
- ::basegfx::B2DRange aRetval;
+ B2DRange aRetval;
const sal_uInt32 nPolygonCount(rCandidate.count());
for(sal_uInt32 a(0L); a < nPolygonCount; a++)
{
- ::basegfx::B2DPolygon aCandidate = rCandidate.getB2DPolygon(a);
- aRetval.expand(::basegfx::tools::getRange(aCandidate));
+ B2DPolygon aCandidate = rCandidate.getB2DPolygon(a);
+ aRetval.expand(tools::getRange(aCandidate));
}
return aRetval;
}
- ::basegfx::B2DPolyPolygon applyLineDashing(const ::basegfx::B2DPolyPolygon& rCandidate, const ::std::vector<double>& raDashDotArray, double fFullDashDotLen)
+ B2DPolyPolygon applyLineDashing(const B2DPolyPolygon& rCandidate, const ::std::vector<double>& raDashDotArray, double fFullDashDotLen)
{
- ::basegfx::B2DPolyPolygon aRetval;
+ B2DPolyPolygon aRetval;
const sal_uInt32 nPolygonCount(rCandidate.count());
for(sal_uInt32 a(0L); a < nPolygonCount; a++)
{
- ::basegfx::B2DPolygon aCandidate = rCandidate.getB2DPolygon(a);
+ B2DPolygon aCandidate = rCandidate.getB2DPolygon(a);
aRetval.append(applyLineDashing(aCandidate, raDashDotArray, fFullDashDotLen));
}
diff --git a/basegfx/source/polygon/b3dpolygon.cxx b/basegfx/source/polygon/b3dpolygon.cxx
index 0d488c04bf2c..f31c91cdcb49 100644
--- a/basegfx/source/polygon/b3dpolygon.cxx
+++ b/basegfx/source/polygon/b3dpolygon.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b3dpolygon.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:06 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,7 +91,7 @@ public:
const ::basegfx::B3DPoint& getCoordinate() const { return maPoint; }
void setCoordinate(const ::basegfx::B3DPoint& rValue) { if(rValue != maPoint) maPoint = rValue; }
- sal_Bool operator==(const CoordinateData3D& rData ) const { return (maPoint == rData.getCoordinate()); }
+ bool operator==(const CoordinateData3D& rData ) const { return (maPoint == rData.getCoordinate()); }
void transform(const ::basegfx::B3DHomMatrix& rMatrix) { maPoint *= rMatrix; }
};
@@ -128,7 +128,7 @@ public:
return maVector.size();
}
- sal_Bool isEqual(const CoordinateDataArray3D& rCandidate) const
+ bool isEqual(const CoordinateDataArray3D& rCandidate) const
{
return (maVector == rCandidate.maVector);
}
@@ -262,7 +262,7 @@ public:
ImplB3DPolygon()
: mnRefCount(1),
maPoints(0L),
- mbIsClosed(sal_False)
+ mbIsClosed(false)
{
// complete initialization with defaults
}
@@ -307,12 +307,12 @@ public:
return maPoints.count();
}
- sal_Bool isClosed() const
+ bool isClosed() const
{
return mbIsClosed;
}
- void setClosed(sal_Bool bNew)
+ void setClosed(bool bNew)
{
if(bNew != mbIsClosed)
{
@@ -320,17 +320,17 @@ public:
}
}
- sal_Bool isEqual(const ImplB3DPolygon& rCandidate) const
+ bool isEqual(const ImplB3DPolygon& rCandidate) const
{
if(mbIsClosed == rCandidate.mbIsClosed)
{
if(maPoints.isEqual(rCandidate.maPoints))
{
- return sal_True;
+ return true;
}
}
- return sal_False;
+ return false;
}
const ::basegfx::B3DPoint& getPoint(sal_uInt32 nIndex) const
@@ -378,7 +378,7 @@ public:
}
}
- sal_Bool hasDoublePoints() const
+ bool hasDoublePoints() const
{
if(mbIsClosed)
{
@@ -387,7 +387,7 @@ public:
if(maPoints.getCoordinate(0L) == maPoints.getCoordinate(nIndex))
{
- return sal_True;
+ return true;
}
}
@@ -396,11 +396,11 @@ public:
{
if(maPoints.getCoordinate(a) == maPoints.getCoordinate(a + 1L))
{
- return sal_True;
+ return true;
}
}
- return sal_False;
+ return false;
}
void removeDoublePointsAtBeginEnd()
@@ -486,21 +486,21 @@ namespace basegfx
return *this;
}
- sal_Bool B3DPolygon::operator==(const B3DPolygon& rPolygon) const
+ bool B3DPolygon::operator==(const B3DPolygon& rPolygon) const
{
if(mpPolygon == rPolygon.mpPolygon)
{
- return sal_True;
+ return true;
}
return mpPolygon->isEqual(*(rPolygon.mpPolygon));
}
- sal_Bool B3DPolygon::operator!=(const B3DPolygon& rPolygon) const
+ bool B3DPolygon::operator!=(const B3DPolygon& rPolygon) const
{
if(mpPolygon == rPolygon.mpPolygon)
{
- return sal_False;
+ return false;
}
return !mpPolygon->isEqual(*(rPolygon.mpPolygon));
@@ -625,12 +625,12 @@ namespace basegfx
mpPolygon->incRefCount();
}
- sal_Bool B3DPolygon::isClosed() const
+ bool B3DPolygon::isClosed() const
{
return mpPolygon->isClosed();
}
- void B3DPolygon::setClosed(sal_Bool bNew)
+ void B3DPolygon::setClosed(bool bNew)
{
if(mpPolygon->isClosed() != bNew)
{
@@ -648,7 +648,7 @@ namespace basegfx
}
}
- sal_Bool B3DPolygon::hasDoublePoints() const
+ bool B3DPolygon::hasDoublePoints() const
{
return mpPolygon->hasDoublePoints();
}
diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx
index 9784ae5930a9..e4f2011795ae 100644
--- a/basegfx/source/polygon/b3dpolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolygontools.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b3dpolygontools.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:07 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,7 +91,7 @@ namespace basegfx
while(rCandidate.count() > 1L
&& rCandidate.getB3DPoint(0L).equal(rCandidate.getB3DPoint(rCandidate.count() - 1L)))
{
- rCandidate.setClosed(sal_True);
+ rCandidate.setClosed(true);
rCandidate.remove(rCandidate.count() - 1L);
}
}
@@ -244,7 +244,7 @@ namespace basegfx
if(nPointCount > 1L)
{
sal_uInt32 nIndex(0L);
- sal_Bool bIndexDone(sal_False);
+ bool bIndexDone(false);
const double fZero(0.0);
double fEdgeLength(fZero);
@@ -267,7 +267,7 @@ namespace basegfx
{
// crop to polygon start
fDistance = fZero;
- bIndexDone = sal_True;
+ bIndexDone = true;
}
}
@@ -285,7 +285,7 @@ namespace basegfx
// crop to polygon end
fDistance = fZero;
nIndex = nPointCount - 1L;
- bIndexDone = sal_True;
+ bIndexDone = true;
}
}
@@ -306,7 +306,7 @@ namespace basegfx
else
{
// it's on this edge, stop
- bIndexDone = sal_True;
+ bIndexDone = true;
}
} while (!bIndexDone);
}
@@ -328,7 +328,7 @@ namespace basegfx
}
// add calculated average value to the return value
- aRetval += ::basegfx::average(aRetval, aNextPoint, fRelative);
+ aRetval += ::basegfx::interpolate(aRetval, aNextPoint, fRelative);
}
}
@@ -382,11 +382,11 @@ namespace basegfx
}
else
{
- aResult.append(aStart + (aVector * fPosOnVector));
+ aResult.append( B3DPoint(aStart + (aVector * fPosOnVector)) );
}
// add end point
- aResult.append(aStart + (aVector * (fPosOnVector + fDashDotLength)));
+ aResult.append( B3DPoint(aStart + (aVector * (fPosOnVector + fDashDotLength))) );
// add line to PolyPolygon
aRetval.append(aResult);
diff --git a/basegfx/source/polygon/b3dpolypolygon.cxx b/basegfx/source/polygon/b3dpolypolygon.cxx
index bb78552b24e5..72e77b05f578 100644
--- a/basegfx/source/polygon/b3dpolypolygon.cxx
+++ b/basegfx/source/polygon/b3dpolypolygon.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b3dpolypolygon.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:07 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -106,21 +106,21 @@ public:
void incRefCount() { mnRefCount++; }
void decRefCount() { mnRefCount--; }
- sal_Bool isEqual(const ImplB3DPolyPolygon& rPolygonList) const
+ bool isEqual(const ImplB3DPolyPolygon& rPolygonList) const
{
// same polygon count?
if(maPolygons.size() != rPolygonList.maPolygons.size())
- return sal_False;
+ return false;
// if zero polygons the polys are equal
if(!maPolygons.size())
- return sal_True;
+ return true;
// compare polygon content
if(maPolygons != rPolygonList.maPolygons)
- return sal_False;
+ return false;
- return sal_True;
+ return true;
}
const ::basegfx::B3DPolygon& getB3DPolygon(sal_uInt32 nIndex) const
@@ -181,7 +181,7 @@ public:
return maPolygons.size();
}
- void setClosed(sal_Bool bNew)
+ void setClosed(bool bNew)
{
for(sal_uInt32 a(0L); a < maPolygons.size(); a++)
{
@@ -271,21 +271,21 @@ namespace basegfx
return *this;
}
- sal_Bool B3DPolyPolygon::operator==(const B3DPolyPolygon& rPolyPolygon) const
+ bool B3DPolyPolygon::operator==(const B3DPolyPolygon& rPolyPolygon) const
{
if(mpPolyPolygon == rPolyPolygon.mpPolyPolygon)
{
- return sal_True;
+ return true;
}
return mpPolyPolygon->isEqual(*(rPolyPolygon.mpPolyPolygon));
}
- sal_Bool B3DPolyPolygon::operator!=(const B3DPolyPolygon& rPolyPolygon) const
+ bool B3DPolyPolygon::operator!=(const B3DPolyPolygon& rPolyPolygon) const
{
if(mpPolyPolygon == rPolyPolygon.mpPolyPolygon)
{
- return sal_False;
+ return false;
}
return !mpPolyPolygon->isEqual(*(rPolyPolygon.mpPolyPolygon));
@@ -380,9 +380,9 @@ namespace basegfx
mpPolyPolygon->incRefCount();
}
- sal_Bool B3DPolyPolygon::isClosed() const
+ bool B3DPolyPolygon::isClosed() const
{
- sal_Bool bRetval(sal_True);
+ bool bRetval(true);
// PolyPOlygon is closed when all contained Polygons are closed or
// no Polygon exists.
@@ -390,14 +390,14 @@ namespace basegfx
{
if(!(mpPolyPolygon->getB3DPolygon(a)).isClosed())
{
- bRetval = sal_False;
+ bRetval = false;
}
}
return bRetval;
}
- void B3DPolyPolygon::setClosed(sal_Bool bNew)
+ void B3DPolyPolygon::setClosed(bool bNew)
{
if(bNew != isClosed())
{
@@ -412,15 +412,15 @@ namespace basegfx
mpPolyPolygon->flip();
}
- sal_Bool B3DPolyPolygon::hasDoublePoints() const
+ bool B3DPolyPolygon::hasDoublePoints() const
{
- sal_Bool bRetval(sal_False);
+ bool bRetval(false);
for(sal_uInt32 a(0L); !bRetval && a < mpPolyPolygon->count(); a++)
{
if((mpPolyPolygon->getB3DPolygon(a)).hasDoublePoints())
{
- bRetval = sal_True;
+ bRetval = true;
}
}
diff --git a/basegfx/source/tuple/b2dtuple.cxx b/basegfx/source/tuple/b2dtuple.cxx
index 1565fe3ea0d2..caf527d2d522 100644
--- a/basegfx/source/tuple/b2dtuple.cxx
+++ b/basegfx/source/tuple/b2dtuple.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dtuple.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:13 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -72,26 +72,26 @@ namespace basegfx
// initialize static member
::basegfx::B2DTuple B2DTuple::maEmptyTuple(0.0, 0.0);
- sal_Bool B2DTuple::equalZero() const
+ bool B2DTuple::equalZero() const
{
return (this == &maEmptyTuple ||
(::basegfx::fTools::equalZero(mfX) && ::basegfx::fTools::equalZero(mfY)));
}
- sal_Bool B2DTuple::equalZero(const double& rfSmallValue) const
+ bool B2DTuple::equalZero(const double& rfSmallValue) const
{
return (this == &maEmptyTuple ||
(::basegfx::fTools::equalZero(mfX, rfSmallValue) && ::basegfx::fTools::equalZero(mfY, rfSmallValue)));
}
- sal_Bool B2DTuple::equal(const B2DTuple& rTup) const
+ bool B2DTuple::equal(const B2DTuple& rTup) const
{
return (
::basegfx::fTools::equal(mfX, rTup.mfX) &&
::basegfx::fTools::equal(mfY, rTup.mfY));
}
- sal_Bool B2DTuple::equal(const B2DTuple& rTup, const double& rfSmallValue) const
+ bool B2DTuple::equal(const B2DTuple& rTup, const double& rfSmallValue) const
{
return (
::basegfx::fTools::equal(mfX, rTup.mfX, rfSmallValue) &&
diff --git a/basegfx/source/tuple/makefile.mk b/basegfx/source/tuple/makefile.mk
index 94566b96d598..21e7a2465aad 100644
--- a/basegfx/source/tuple/makefile.mk
+++ b/basegfx/source/tuple/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.1 $
+# $Revision: 1.2 $
#
-# last change: $Author: aw $ $Date: 2003-10-28 11:24:16 $
+# last change: $Author: thb $ $Date: 2004-01-16 10:34:36 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -76,8 +76,12 @@ TARGET=tuple
SLOFILES= \
$(SLO)$/b2dtuple.obj \
- $(SLO)$/b3dtuple.obj
-
+ $(SLO)$/b3dtuple.obj \
+ $(SLO)$/b2ituple.obj \
+ $(SLO)$/b3ituple.obj \
+ $(SLO)$/b2i64tuple.obj \
+ $(SLO)$/b3i64tuple.obj
+
# --- Targets ----------------------------------
.INCLUDE : target.mk
diff --git a/basegfx/source/vector/b2dvector.cxx b/basegfx/source/vector/b2dvector.cxx
index d9c46044211c..ea131f8a4a60 100644
--- a/basegfx/source/vector/b2dvector.cxx
+++ b/basegfx/source/vector/b2dvector.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dvector.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:15 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -162,7 +162,7 @@ namespace basegfx
return *this;
}
- sal_Bool B2DVector::isNormalized() const
+ bool B2DVector::isNormalized() const
{
const double fOne(1.0);
const double fScalar(scalar(*this));
@@ -170,13 +170,13 @@ namespace basegfx
return (::basegfx::fTools::equal(fOne, fScalar));
}
- sal_Bool areParallel( const B2DVector& rVecA, const B2DVector& rVecB )
+ bool areParallel( const B2DVector& rVecA, const B2DVector& rVecB )
{
double fVal(rVecA.getX() * rVecB.getY() - rVecA.getY() * rVecB.getX());
return ::basegfx::fTools::equalZero(fVal);
}
- B2DVectorOrientation getOrientation( const B2DVector& rVecA, const B2DVector& rVecB )
+ B2VectorOrientation getOrientation( const B2DVector& rVecA, const B2DVector& rVecB )
{
double fVal(rVecA.getX() * rVecB.getY() - rVecA.getY() * rVecB.getX());
@@ -205,9 +205,9 @@ namespace basegfx
return aRes*=rMat;
}
- ::basegfx::B2DVectorContinuity getContinuity(const B2DVector& rBackVector, const B2DVector& rForwardVector )
+ B2VectorContinuity getContinuity(const B2DVector& rBackVector, const B2DVector& rForwardVector )
{
- ::basegfx::B2DVectorContinuity eRetval(::basegfx::CONTINUITY_NONE);
+ B2VectorContinuity eRetval(::basegfx::CONTINUITY_NONE);
if(!rBackVector.equalZero() && !rForwardVector.equalZero())
{
diff --git a/basegfx/source/vector/makefile.mk b/basegfx/source/vector/makefile.mk
index fead5951b707..5075ee9aabb2 100644
--- a/basegfx/source/vector/makefile.mk
+++ b/basegfx/source/vector/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.1 $
+# $Revision: 1.2 $
#
-# last change: $Author: aw $ $Date: 2003-10-28 11:26:57 $
+# last change: $Author: thb $ $Date: 2004-01-16 10:34:39 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -76,8 +76,10 @@ TARGET=vector
SLOFILES= \
$(SLO)$/b2dvector.obj \
- $(SLO)$/b3dvector.obj
-
+ $(SLO)$/b3dvector.obj \
+ $(SLO)$/b2ivector.obj \
+ $(SLO)$/b3ivector.obj
+
# --- Targets ----------------------------------
.INCLUDE : target.mk
diff --git a/basegfx/source/workbench/bezierclip.cxx b/basegfx/source/workbench/bezierclip.cxx
index 7fb95c4977b1..12a26aa52a7f 100644
--- a/basegfx/source/workbench/bezierclip.cxx
+++ b/basegfx/source/workbench/bezierclip.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bezierclip.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2003-11-05 12:25:57 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -183,7 +183,7 @@ void Impl_calcBounds( Point2D& leftTop,
rightBottom.y = ::std::max( c1.p0.y, ::std::max( c1.p1.y, ::std::max( c1.p2.y, c1.p3.y ) ) );
}
-sal_Bool Impl_doBBoxIntersect( const Bezier& c1,
+bool Impl_doBBoxIntersect( const Bezier& c1,
const Bezier& c2 )
{
// calc rectangular boxes from c1 and c2
@@ -198,11 +198,11 @@ sal_Bool Impl_doBBoxIntersect( const Bezier& c1,
if( ::std::min(rb1.x, rb2.x) < ::std::max(lt1.x, lt2.x) ||
::std::min(rb1.y, rb2.y) < ::std::max(lt1.y, lt2.y) )
{
- return sal_False;
+ return false;
}
else
{
- return sal_True;
+ return true;
}
}
@@ -211,7 +211,7 @@ sal_Bool Impl_doBBoxIntersect( const Bezier& c1,
* the left, the second is the intersection of the max value line with
* the convex hull from the right.
*/
-sal_Bool Impl_calcSafeParams( double& t1,
+bool Impl_calcSafeParams( double& t1,
double& t2,
const Polygon2D& rPoly,
double lowerYBound,
@@ -229,13 +229,13 @@ sal_Bool Impl_calcSafeParams( double& t1,
double currHigherT( 0.0 );
if( convHull.size() <= 1 )
- return sal_False; // only one point? Then we're done with clipping
+ return false; // only one point? Then we're done with clipping
/* now, clip against lower and higher bounds */
Point2D p0;
Point2D p1;
- sal_Bool bIntersection( sal_False );
+ bool bIntersection( false );
for( Polygon2D::size_type i=0; i<convHull.size(); ++i )
{
@@ -298,7 +298,7 @@ sal_Bool Impl_calcSafeParams( double& t1,
// set flag that at least one segment is contained or
// intersects given horizontal band.
- bIntersection = sal_True;
+ bIntersection = true;
}
}
@@ -320,7 +320,7 @@ sal_Bool Impl_calcSafeParams( double& t1,
* The polynomial coefficients c0 to c3 given to this method
* must correspond to t values of 0, 1/3, 2/3 and 1, respectively.
*/
-sal_Bool Impl_calcSafeParams_clip( double& t1,
+bool Impl_calcSafeParams_clip( double& t1,
double& t2,
const FatLine& bounds,
double c0,
@@ -340,7 +340,7 @@ sal_Bool Impl_calcSafeParams_clip( double& t1,
return Impl_calcSafeParams( t1, t2, poly, bounds.dMin, bounds.dMax );
#else
- sal_Bool bRet( Impl_calcSafeParams( t1, t2, poly, bounds.dMin, bounds.dMax ) );
+ bool bRet( Impl_calcSafeParams( t1, t2, poly, bounds.dMin, bounds.dMax ) );
Polygon2D convHull( convexHull( poly ) );
@@ -592,7 +592,7 @@ void printResultWithFinalCurves( const Bezier& c1, const Bezier& c1_part,
// -----------------------------------------------------------------------------
/** determine parameter ranges [0,t1) and (t2,1] on c1, where c1 is guaranteed to lie outside c2.
- Returns sal_False, if the two curves don't even intersect.
+ Returns false, if the two curves don't even intersect.
@param t1
Range [0,t1) on c1 is guaranteed to lie outside c2
@@ -612,7 +612,7 @@ void printResultWithFinalCurves( const Bezier& c1, const Bezier& c1_part,
@param c2_part
Subdivided current part of c2
*/
-sal_Bool Impl_calcClipRange( double& t1,
+bool Impl_calcClipRange( double& t1,
double& t2,
const Bezier& c1_orig,
const Bezier& c1_part,
@@ -661,12 +661,12 @@ sal_Bool Impl_calcClipRange( double& t1,
//printCurvesWithSafeRange(c1_orig, c2_orig, t1, t2, c2_part, bounds_c2);
// they do intersect
- return sal_True;
+ return true;
}
}
// they don't intersect: nothing to do
- return sal_False;
+ return false;
}
// -----------------------------------------------------------------------------
@@ -804,7 +804,7 @@ void Impl_calcFocus( Bezier& res, const Bezier& c )
// -----------------------------------------------------------------------------
-sal_Bool Impl_calcSafeParams_focus( double& t1,
+bool Impl_calcSafeParams_focus( double& t1,
double& t2,
const Bezier& curve,
const Bezier& focus )
@@ -913,7 +913,7 @@ sal_Bool Impl_calcSafeParams_focus( double& t1,
return Impl_calcSafeParams( t1, t2, controlPolygon, 0.0, 0.0 );
#else
- sal_Bool bRet( Impl_calcSafeParams( t1, t2, controlPolygon, 0.0, 0.0 ) );
+ bool bRet( Impl_calcSafeParams( t1, t2, controlPolygon, 0.0, 0.0 ) );
Polygon2D convHull( convexHull( controlPolygon ) );
@@ -957,12 +957,12 @@ sal_Bool Impl_calcSafeParams_focus( double& t1,
don't intersect, nothing is added.
@param delta
- Maximal allowed distance to sal_True critical point (measured in the
+ Maximal allowed distance to true critical point (measured in the
original curve's coordinate system)
@param safeRangeFunctor
Functor object, that must provide the following operator():
- sal_Bool safeRangeFunctor( double& t1,
+ bool safeRangeFunctor( double& t1,
double& t2,
const Bezier& c1_orig,
const Bezier& c1_part,
@@ -970,7 +970,7 @@ sal_Bool Impl_calcSafeParams_focus( double& t1,
const Bezier& c2_part );
This functor must calculate the safe ranges [0,t1] and [t2,1] on
c1_orig, where c1_orig is 'safe' from c2_part. If the whole
- c1_orig is safe, sal_False must be returned, sal_True otherwise.
+ c1_orig is safe, false must be returned, true otherwise.
*/
template <class Functor> void Impl_applySafeRanges_rec( ::std::back_insert_iterator< ::std::vector< ::std::pair<double, double> > >& result,
double delta,
@@ -1026,7 +1026,7 @@ template <class Functor> void Impl_applySafeRanges_rec( ::std::back_insert_itera
// Note: we first perform the clipping and only test for precision
// sufficiency afterwards, since we want to exploit the fact that
- // Impl_calcClipRange returns sal_False if the curves don't
+ // Impl_calcClipRange returns false if the curves don't
// intersect. We would have to check that separately for the end
// condition, otherwise.
@@ -1097,7 +1097,7 @@ template <class Functor> void Impl_applySafeRanges_rec( ::std::back_insert_itera
// 20%, subdivide longest curve, and clip shortest against
// both parts of longest
// if( (last_t2_c1 - last_t1_c1 - t2_c1 + t1_c1) / (last_t2_c1 - last_t1_c1) < 0.2 )
- if( sal_False )
+ if( false )
{
// subdivide and descend
// =====================
@@ -1189,7 +1189,7 @@ template <class Functor> void Impl_applySafeRanges_rec( ::std::back_insert_itera
struct ClipBezierFunctor
{
- sal_Bool operator()( double& t1_c1,
+ bool operator()( double& t1_c1,
double& t2_c1,
const Bezier& c1_orig,
const Bezier& c1_part,
@@ -1204,7 +1204,7 @@ struct ClipBezierFunctor
struct BezierTangencyFunctor
{
- sal_Bool operator()( double& t1_c1,
+ bool operator()( double& t1_c1,
double& t2_c1,
const Bezier& c1_orig,
const Bezier& c1_part,
@@ -1218,7 +1218,7 @@ struct BezierTangencyFunctor
// used for focus calculation
// determine safe range on c1_orig
- sal_Bool bRet( Impl_calcSafeParams_focus( t1_c1, t2_c1,
+ bool bRet( Impl_calcSafeParams_focus( t1_c1, t2_c1,
c1_orig, // use orig curve here, need t's on original curve
focus ) );
@@ -1237,7 +1237,7 @@ struct BezierTangencyFunctor
iterator will remain empty, if there are no intersections.
@param delta
- Maximal allowed distance to sal_True intersection (measured in the
+ Maximal allowed distance to true intersection (measured in the
original curve's coordinate system)
*/
void clipBezier( ::std::back_insert_iterator< ::std::vector< ::std::pair<double, double> > >& result,
@@ -1646,7 +1646,7 @@ int main(int argc, const char *argv[])
double t1, t2;
- sal_Bool bRet( Impl_calcSafeParams( t1, t2, poly, 0, 1 ) );
+ bool bRet( Impl_calcSafeParams( t1, t2, poly, 0, 1 ) );
Polygon2D convHull( convexHull( poly ) );
@@ -1872,7 +1872,7 @@ int main(int argc, const char *argv[])
focus = c2;
#endif
// determine safe range on c1
- sal_Bool bRet( Impl_calcSafeParams_focus( t1, t2,
+ bool bRet( Impl_calcSafeParams_focus( t1, t2,
c1, focus ) );
cerr << "t1: " << t1 << ", t2: " << t2 << endl;
diff --git a/basegfx/source/workbench/bezierclip.hxx b/basegfx/source/workbench/bezierclip.hxx
index b151a9bdd43f..7cb705edc075 100644
--- a/basegfx/source/workbench/bezierclip.hxx
+++ b/basegfx/source/workbench/bezierclip.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bezierclip.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2003-11-05 12:25:57 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -119,9 +119,9 @@ Polygon2D convexHull( const Polygon2D& rPoly );
#define DBL_EPSILON 1.0e-100
/* little approximate comparions */
-template <typename NumType> sal_Bool tolZero( NumType n ) { return fabs(n) < DBL_EPSILON; }
-template <typename NumType> sal_Bool tolEqual( NumType n1, NumType n2 ) { return tolZero(n1-n2); }
-template <typename NumType> sal_Bool tolLessEqual( NumType n1, NumType n2 ) { return tolEqual(n1,n2) || n1<n2; }
-template <typename NumType> sal_Bool tolGreaterEqual( NumType n1, NumType n2 ) { return tolEqual(n1,n2) || n1>n2; }
+template <typename NumType> bool tolZero( NumType n ) { return fabs(n) < DBL_EPSILON; }
+template <typename NumType> bool tolEqual( NumType n1, NumType n2 ) { return tolZero(n1-n2); }
+template <typename NumType> bool tolLessEqual( NumType n1, NumType n2 ) { return tolEqual(n1,n2) || n1<n2; }
+template <typename NumType> bool tolGreaterEqual( NumType n1, NumType n2 ) { return tolEqual(n1,n2) || n1>n2; }
#endif // BASEGFX_BEZIERCLIP_HXX
diff --git a/basegfx/source/workbench/convexhull.cxx b/basegfx/source/workbench/convexhull.cxx
index 3765d70663bc..772059a4a66d 100644
--- a/basegfx/source/workbench/convexhull.cxx
+++ b/basegfx/source/workbench/convexhull.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: convexhull.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2003-11-05 12:25:57 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,14 +88,14 @@ template <class PointType> double theta( const PointType& p1, const PointType& p
/* Model of LessThanComparable for theta sort.
* Uses the theta function from Sedgewick: Algorithms in XXX, chapter 24
*/
-template <class PointType> class ThetaCompare : public ::std::binary_function< const PointType&, const PointType&, sal_Bool >
+template <class PointType> class ThetaCompare : public ::std::binary_function< const PointType&, const PointType&, bool >
{
public:
ThetaCompare( const PointType& rRefPoint ) : maRefPoint( rRefPoint ) {}
- sal_Bool operator() ( const PointType& p1, const PointType& p2 )
+ bool operator() ( const PointType& p1, const PointType& p2 )
{
- // return sal_True, if p1 precedes p2 in the angle relative to maRefPoint
+ // return true, if p1 precedes p2 in the angle relative to maRefPoint
return theta(maRefPoint, p1) < theta(maRefPoint, p2);
}
diff --git a/basegfx/source/workbench/gauss.hxx b/basegfx/source/workbench/gauss.hxx
index b5b65e2644c9..f002f174e70f 100644
--- a/basegfx/source/workbench/gauss.hxx
+++ b/basegfx/source/workbench/gauss.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: gauss.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2003-11-05 12:25:58 $
+ * last change: $Author: thb $ $Date: 2004-01-16 10:34:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,12 +76,12 @@
@param minPivot
If the pivot element gets lesser than minPivot, this method fails,
- otherwise, elimination succeeds and sal_True is returned.
+ otherwise, elimination succeeds and true is returned.
- @return sal_True, if elimination succeeded.
+ @return true, if elimination succeeded.
*/
template <class Matrix, typename BaseType>
-sal_Bool eliminate( Matrix& matrix,
+bool eliminate( Matrix& matrix,
int rows,
int cols,
const BaseType& minPivot )
@@ -100,7 +100,7 @@ sal_Bool eliminate( Matrix& matrix,
/* check pivot value */
if( fabs(matrix[ max*cols + i ]) < minPivot )
- return sal_False; /* pivot too small! */
+ return false; /* pivot too small! */
/* interchange rows 'max' and 'i' */
for(k=0; k<cols; ++k)
@@ -118,7 +118,7 @@ sal_Bool eliminate( Matrix& matrix,
}
/* everything went well */
- return sal_True;
+ return true;
}
@@ -139,11 +139,11 @@ sal_Bool eliminate( Matrix& matrix,
@param result
Result vector. Given matrix must have space for one column (rows entries).
- @return sal_True, if back substitution was possible (i.e. no division
+ @return true, if back substitution was possible (i.e. no division
by zero occured).
*/
template <class Matrix, class Vector, typename BaseType>
-sal_Bool substitute( const Matrix& matrix,
+bool substitute( const Matrix& matrix,
int rows,
int cols,
Vector& result )
@@ -159,13 +159,13 @@ sal_Bool substitute( const Matrix& matrix,
temp += matrix[ j*cols + k ] * result[k];
if( matrix[ j*cols + j ] == 0.0 )
- return sal_False; /* imminent division by zero! */
+ return false; /* imminent division by zero! */
result[j] = (matrix[ j*cols + cols-1 ] - temp) / matrix[ j*cols + j ];
}
/* everything went well */
- return sal_True;
+ return true;
}
@@ -188,12 +188,12 @@ sal_Bool substitute( const Matrix& matrix,
@param minPivot
If the pivot element gets lesser than minPivot, this method fails,
- otherwise, elimination succeeds and sal_True is returned.
+ otherwise, elimination succeeds and true is returned.
- @return sal_True, if elimination succeeded.
+ @return true, if elimination succeeded.
*/
template <class Matrix, class Vector, typename BaseType>
-sal_Bool solve( Matrix& matrix,
+bool solve( Matrix& matrix,
int rows,
int cols,
Vector& result,
@@ -202,5 +202,5 @@ sal_Bool solve( Matrix& matrix,
if( eliminate<Matrix,BaseType>(matrix, rows, cols, minPivot) )
return substitute<Matrix,Vector,BaseType>(matrix, rows, cols, result);
- return sal_False;
+ return false;
}