summaryrefslogtreecommitdiff
path: root/basegfx/source/tools/gradienttools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source/tools/gradienttools.cxx')
-rw-r--r--basegfx/source/tools/gradienttools.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/basegfx/source/tools/gradienttools.cxx b/basegfx/source/tools/gradienttools.cxx
index 447eac056c55..8a2d38f44c6f 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
{
@@ -94,9 +94,9 @@ namespace basegfx
{
const B2DPoint aCenter(0.5*fTargetSizeX,
0.5*fTargetSizeY);
- o_rGradientInfo.maTextureTransform.translate(-aCenter.getX(), -aCenter.getY());
- o_rGradientInfo.maTextureTransform.rotate(fAngle);
- o_rGradientInfo.maTextureTransform.translate(aCenter.getX(), aCenter.getY());
+ o_rGradientInfo.maTextureTransform =
+ o_rGradientInfo.maTextureTransform
+ * basegfx::tools::createRotateAroundPoint(aCenter, fAngle);
}
// add object translate
@@ -162,9 +162,9 @@ namespace basegfx
{
const B2DPoint aCenter(0.5*fTargetSizeX,
0.5*fTargetSizeY);
- o_rGradientInfo.maTextureTransform.translate(-aCenter.getX(), -aCenter.getY());
- o_rGradientInfo.maTextureTransform.rotate(fAngle);
- o_rGradientInfo.maTextureTransform.translate(aCenter.getX(), aCenter.getY());
+ o_rGradientInfo.maTextureTransform =
+ o_rGradientInfo.maTextureTransform
+ * basegfx::tools::createRotateAroundPoint(aCenter, fAngle);
}
}
@@ -232,9 +232,9 @@ namespace basegfx
{
const B2DPoint aCenter(0.5*fTargetSizeX,
0.5*fTargetSizeY);
- o_rGradientInfo.maTextureTransform.translate(-aCenter.getX(), -aCenter.getY());
- o_rGradientInfo.maTextureTransform.rotate(fAngle);
- o_rGradientInfo.maTextureTransform.translate(aCenter.getX(), aCenter.getY());
+ o_rGradientInfo.maTextureTransform =
+ o_rGradientInfo.maTextureTransform
+ * basegfx::tools::createRotateAroundPoint(aCenter, fAngle);
}
// add defined offsets after rotation