diff options
author | Thorsten Behrens <thb@openoffice.org> | 2004-01-16 09:34:43 +0000 |
---|---|---|
committer | Thorsten Behrens <thb@openoffice.org> | 2004-01-16 09:34:43 +0000 |
commit | fb6fefbd9482f6fa26447be417286ae1935c0702 (patch) | |
tree | df3b1b957f17a5f70a83b705865b4c1291b1f382 /basegfx/source/matrix | |
parent | 08761ff6d5991730ed66b7e13817b325ce848da3 (diff) |
#110496# Added integer point, size and rectangle classes, needed for the new canvas
Diffstat (limited to 'basegfx/source/matrix')
-rw-r--r-- | basegfx/source/matrix/b2dhommatrix.cxx | 36 | ||||
-rw-r--r-- | basegfx/source/matrix/b3dhommatrix.cxx | 34 |
2 files changed, 35 insertions, 35 deletions
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 |