From 7857f07d09265f58b2c17c4f619f4aad81b1c43d Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 22 Sep 2009 18:14:05 +0200 Subject: #i97509# continued matrix tooling and adapting the usages now to all the ooo code --- cppcanvas/source/mtfrenderer/bitmapaction.cxx | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'cppcanvas/source/mtfrenderer/bitmapaction.cxx') diff --git a/cppcanvas/source/mtfrenderer/bitmapaction.cxx b/cppcanvas/source/mtfrenderer/bitmapaction.cxx index 355dd336e2c5..4f54b10c4879 100644 --- a/cppcanvas/source/mtfrenderer/bitmapaction.cxx +++ b/cppcanvas/source/mtfrenderer/bitmapaction.cxx @@ -35,25 +35,21 @@ #include #include #include - #include #include #include - #include - #include #include #include #include #include - #include - #include "cachedprimitivebase.hxx" #include "bitmapaction.hxx" #include "outdevstate.hxx" #include "mtftools.hxx" +#include using namespace ::com::sun::star; @@ -112,9 +108,7 @@ namespace cppcanvas // Setup transformation such that the next render call is // moved rPoint away. - ::basegfx::B2DHomMatrix aLocalTransformation; - aLocalTransformation.translate( rDstPoint.getX(), - rDstPoint.getY() ); + const basegfx::B2DHomMatrix aLocalTransformation(basegfx::tools::createTranslateB2DHomMatrix(rDstPoint)); ::canvas::tools::appendToRenderState( maState, aLocalTransformation ); @@ -144,15 +138,12 @@ namespace cppcanvas // moved rPoint away, and scaled according to the ratio // given by src and dst size. const ::Size aBmpSize( rBmpEx.GetSizePixel() ); - ::basegfx::B2DHomMatrix aLocalTransformation; const ::basegfx::B2DVector aScale( rDstSize.getX() / aBmpSize.Width(), rDstSize.getY() / aBmpSize.Height() ); - aLocalTransformation.scale( aScale.getX(), aScale.getY() ); - aLocalTransformation.translate( rDstPoint.getX(), - rDstPoint.getY() ); - ::canvas::tools::appendToRenderState( maState, - aLocalTransformation ); + const basegfx::B2DHomMatrix aLocalTransformation(basegfx::tools::createScaleTranslateB2DHomMatrix( + aScale, rDstPoint)); + ::canvas::tools::appendToRenderState( maState, aLocalTransformation ); // correct clip (which is relative to original transform) tools::modifyClip( maState, -- cgit