summaryrefslogtreecommitdiff
path: root/basegfx/source/tools
diff options
context:
space:
mode:
authorthb <thb@openoffice.org>2010-01-18 01:10:42 +0100
committerthb <thb@openoffice.org>2010-01-18 01:10:42 +0100
commitea48c18b848fed4d6504c956adeb3f24f05938ca (patch)
tree1eccf884707ec16e4dd74f8e83c74563e1539b34 /basegfx/source/tools
parent1737f4d2fdba50a590f76631cd7ca7e762d18c35 (diff)
parent8765a3bf9f2926a50d0f644e4263782269abe023 (diff)
thbfixes10: merge with DEV300 m69
Diffstat (limited to 'basegfx/source/tools')
-rw-r--r--basegfx/source/tools/gradienttools.cxx20
-rwxr-xr-xbasegfx/source/tools/unopolypolygon.cxx6
2 files changed, 12 insertions, 14 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
diff --git a/basegfx/source/tools/unopolypolygon.cxx b/basegfx/source/tools/unopolypolygon.cxx
index 6d8fcd83edb0..05dbe5b1c823 100755
--- a/basegfx/source/tools/unopolypolygon.cxx
+++ b/basegfx/source/tools/unopolypolygon.cxx
@@ -44,8 +44,8 @@
#include <basegfx/tools/canvastools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
-
#include <basegfx/tools/unopolypolygon.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
using namespace ::com::sun::star;
@@ -138,9 +138,7 @@ namespace unotools
if( !aOffset.equalZero() )
{
- B2DHomMatrix aTranslate;
- aTranslate.translate( aOffset.getX(), aOffset.getY() );
-
+ const B2DHomMatrix aTranslate(tools::createTranslateB2DHomMatrix(aOffset));
aSrcPoly.transform( aTranslate );
}