summaryrefslogtreecommitdiff
path: root/sd/source/core/CustomAnimationEffect.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/core/CustomAnimationEffect.cxx')
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 23a04bf9d5ee..040bc7c0a78c 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -69,6 +69,7 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/range/b2drange.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <algorithm>
@@ -1715,21 +1716,16 @@ void CustomAnimationEffect::updateSdrPathObjFromPath( SdrPathObj& rPathObj )
SdrObject* pObj = GetSdrObjectFromXShape( getTargetShape() );
if( pObj )
{
- ::basegfx::B2DHomMatrix aTransform;
-
SdrPage* pPage = pObj->GetPage();
if( pPage )
{
const Size aPageSize( pPage->GetSize() );
- aTransform.scale( (double)aPageSize.Width(), (double)aPageSize.Height() );
- xPolyPoly.transform( aTransform );
- aTransform.identity();
+ xPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix((double)aPageSize.Width(), (double)aPageSize.Height()));
}
const Rectangle aBoundRect( pObj->GetCurrentBoundRect() );
const Point aCenter( aBoundRect.Center() );
- aTransform.translate( aCenter.X(), aCenter.Y() );
- xPolyPoly.transform( aTransform );
+ xPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(aCenter.X(), aCenter.Y()));
}
}
@@ -1748,17 +1744,14 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj
const Rectangle aBoundRect( pObj->GetCurrentBoundRect() );
const Point aCenter( aBoundRect.Center() );
- ::basegfx::B2DHomMatrix aTransform;
- aTransform.translate( -aCenter.X(), -aCenter.Y() );
- xPolyPoly.transform( aTransform );
+ xPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(-aCenter.X(), -aCenter.Y()));
SdrPage* pPage = pObj->GetPage();
if( pPage )
{
- aTransform.identity();
const Size aPageSize( pPage->GetSize() );
- aTransform.scale( 1.0 / (double)aPageSize.Width(), 1.0 / (double)aPageSize.Height() );
- xPolyPoly.transform( aTransform );
+ xPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix(
+ 1.0 / (double)aPageSize.Width(), 1.0 / (double)aPageSize.Height()));
}
}