diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-04-09 13:45:35 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2012-04-09 13:45:35 +0200 |
commit | 161fb1781bec7e587743b7589d00c9eb7fa00ac7 (patch) | |
tree | 2b97a1c25e7d780d3f60f9089b1318ba03ac0ec3 /canvas/source/tools | |
parent | 26398f9dbf7134f79993f2f8258613124ac2483b (diff) |
Remove canvas::tools::calcRectToRectTransform
Diffstat (limited to 'canvas/source/tools')
-rw-r--r-- | canvas/source/tools/canvastools.cxx | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/canvas/source/tools/canvastools.cxx b/canvas/source/tools/canvastools.cxx index a089f5430b6e..4a55ad55a60b 100644 --- a/canvas/source/tools/canvastools.cxx +++ b/canvas/source/tools/canvastools.cxx @@ -688,45 +688,6 @@ namespace canvas return outRect; } - ::basegfx::B2DHomMatrix& calcRectToRectTransform( ::basegfx::B2DHomMatrix& o_transform, - const ::basegfx::B2DRange& destRect, - const ::basegfx::B2DRange& srcRect, - const ::basegfx::B2DHomMatrix& transformation ) - { - if( srcRect.isEmpty() || - destRect.isEmpty() ) - { - return o_transform=transformation; - } - - // transform inputRect by transformation - ::basegfx::B2DRectangle aTransformedRect; - calcTransformedRectBounds( aTransformedRect, - srcRect, - transformation ); - - // now move resulting left,top point of bounds to (0,0) - basegfx::B2DHomMatrix aCorrectedTransform(basegfx::tools::createTranslateB2DHomMatrix( - -aTransformedRect.getMinX(), -aTransformedRect.getMinY())); - - // scale to match outRect - const double xDenom( aTransformedRect.getWidth() ); - const double yDenom( aTransformedRect.getHeight() ); - if( xDenom != 0.0 && yDenom != 0.0 ) - aCorrectedTransform.scale( destRect.getWidth() / xDenom, - destRect.getHeight() / yDenom ); - // TODO(E2): error handling - - // translate to final position - aCorrectedTransform.translate( destRect.getMinX(), - destRect.getMinY() ); - - ::basegfx::B2DHomMatrix transform( transformation ); - o_transform = aCorrectedTransform * transform; - - return o_transform; - } - bool isInside( const ::basegfx::B2DRange& rContainedRect, const ::basegfx::B2DRange& rTransformRect, const ::basegfx::B2DHomMatrix& rTransformation ) |