summaryrefslogtreecommitdiff
path: root/basegfx/source/point
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-11-02 12:56:49 +0000
committerKurt Zenker <kz@openoffice.org>2005-11-02 12:56:49 +0000
commite895ac9c6843b8d61cd1cda6a6a202f97a2e4a9d (patch)
tree9681096d48c57af2f6f4dbf9136602ededb4c9a5 /basegfx/source/point
parent79125407aee6bf798eeeb2030ce25b4b38de6e9a (diff)
INTEGRATION: CWS canvas02 (1.5.58); FILE MERGED
2005/10/08 13:17:15 thb 1.5.58.2: RESYNC: (1.5-1.6); FILE MERGED 2005/07/28 10:10:18 thb 1.5.58.1: Join from cws_src680_aw024: #i48939# and new rendering subsystem need AW's clipper changes
Diffstat (limited to 'basegfx/source/point')
-rw-r--r--basegfx/source/point/b2dpoint.cxx38
1 files changed, 30 insertions, 8 deletions
diff --git a/basegfx/source/point/b2dpoint.cxx b/basegfx/source/point/b2dpoint.cxx
index b708ecff21a8..e733d78eecaf 100644
--- a/basegfx/source/point/b2dpoint.cxx
+++ b/basegfx/source/point/b2dpoint.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: b2dpoint.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: rt $ $Date: 2005-09-07 20:43:56 $
+ * last change: $Author: kz $ $Date: 2005-11-02 13:56:49 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -41,6 +41,10 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#endif
+#ifndef _BGFX_NUMERIC_FTOOLS_HXX
+#include <basegfx/numeric/ftools.hxx>
+#endif
+
namespace basegfx
{
B2DPoint& B2DPoint::operator=( const ::basegfx::B2DTuple& rPoint )
@@ -52,12 +56,30 @@ namespace basegfx
B2DPoint& B2DPoint::operator*=( const ::basegfx::B2DHomMatrix& rMat )
{
- const double fTempX( rMat.get(0,0)*mfX +
- rMat.get(0,1)*mfY +
- rMat.get(0,2) );
- const double fTempY( rMat.get(1,0)*mfX +
- rMat.get(1,1)*mfY +
- rMat.get(1,2) );
+ double fTempX(
+ rMat.get(0, 0) * mfX +
+ rMat.get(0, 1) * mfY +
+ rMat.get(0, 2));
+ double fTempY(
+ rMat.get(1, 0) * mfX +
+ rMat.get(1, 1) * mfY +
+ rMat.get(1, 2));
+
+ if(!rMat.isLastLineDefault())
+ {
+ const double fOne(1.0);
+ const double fTempM(
+ rMat.get(2, 0) * mfX +
+ rMat.get(2, 1) * mfY +
+ rMat.get(2, 2));
+
+ if(!fTools::equalZero(fTempM) && !fTools::equal(fOne, fTempM))
+ {
+ fTempX /= fTempM;
+ fTempY /= fTempM;
+ }
+ }
+
mfX = fTempX;
mfY = fTempY;