summaryrefslogtreecommitdiff
path: root/basegfx/source/tools/gradienttools.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@Sun.COM>2009-09-22 18:14:05 +0200
committerArmin Le Grand <Armin.Le.Grand@Sun.COM>2009-09-22 18:14:05 +0200
commit7857f07d09265f58b2c17c4f619f4aad81b1c43d (patch)
treea88bc2ea43db41f9cb3a715651cfe77b477643f6 /basegfx/source/tools/gradienttools.cxx
parent1f0839c836781bc41f8c301b6262eabc978c90f8 (diff)
#i97509# continued matrix tooling and adapting the usages now to all the ooo code
Diffstat (limited to 'basegfx/source/tools/gradienttools.cxx')
-rw-r--r--basegfx/source/tools/gradienttools.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/basegfx/source/tools/gradienttools.cxx b/basegfx/source/tools/gradienttools.cxx
index 9e78039cd590..51989899ebf4 100644
--- a/basegfx/source/tools/gradienttools.cxx
+++ b/basegfx/source/tools/gradienttools.cxx
@@ -32,9 +32,9 @@
#include "precompiled_basegfx.hxx"
#include <basegfx/tools/gradienttools.hxx>
-
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/range/b2drange.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
namespace basegfx
{
@@ -79,9 +79,8 @@ namespace basegfx
B2DPoint aCenter(0.5, 0.5);
aCenter *= o_rGradientInfo.maTextureTransform;
- o_rGradientInfo.maTextureTransform.translate(-aCenter.getX(), -aCenter.getY());
- o_rGradientInfo.maTextureTransform.rotate(fAngle);
- o_rGradientInfo.maTextureTransform.translate(aCenter.getX(), aCenter.getY());
+ o_rGradientInfo.maTextureTransform = basegfx::tools::createRotateAroundPoint(aCenter, fAngle)
+ * o_rGradientInfo.maTextureTransform;
}
// add object translate
@@ -158,9 +157,8 @@ namespace basegfx
B2DPoint aCenter(0.5, 0.5);
aCenter *= o_rGradientInfo.maTextureTransform;
- o_rGradientInfo.maTextureTransform.translate(-aCenter.getX(), -aCenter.getY());
- o_rGradientInfo.maTextureTransform.rotate(fAngle);
- o_rGradientInfo.maTextureTransform.translate(aCenter.getX(), aCenter.getY());
+ o_rGradientInfo.maTextureTransform = basegfx::tools::createRotateAroundPoint(aCenter, fAngle)
+ * o_rGradientInfo.maTextureTransform;
}
}
@@ -232,9 +230,8 @@ namespace basegfx
B2DPoint aCenter(0.5, 0.5);
aCenter *= o_rGradientInfo.maTextureTransform;
- o_rGradientInfo.maTextureTransform.translate(-aCenter.getX(), -aCenter.getY());
- o_rGradientInfo.maTextureTransform.rotate(fAngle);
- o_rGradientInfo.maTextureTransform.translate(aCenter.getX(), aCenter.getY());
+ o_rGradientInfo.maTextureTransform = basegfx::tools::createRotateAroundPoint(aCenter, fAngle)
+ * o_rGradientInfo.maTextureTransform;
}
// add defined offsets after rotation