diff --git a/basegfx/source/range/b2drange.cxx b/basegfx/source/range/b2drange.cxx index 22741a7171ad..ad7ea42c081a 100644 --- a/basegfx/source/range/b2drange.cxx +++ b/basegfx/source/range/b2drange.cxx @@ -4,9 +4,9 @@ * * $RCSfile: b2drange.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: obo $ $Date: 2006-09-17 08:04:56 $ + * last change: $Author: ihi $ $Date: 2006-11-14 14:09:48 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -48,6 +48,10 @@ #include #endif +#ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX +#include +#endif + namespace basegfx { B2DRange::B2DRange( const B2IRange& rRange ) : @@ -64,6 +68,19 @@ namespace basegfx } } + void B2DRange::transform(const B2DHomMatrix& rMatrix) + { + if(!isEmpty() && !rMatrix.isIdentity()) + { + const B2DRange aSource(*this); + reset(); + expand(rMatrix * B2DPoint(aSource.getMinX(), aSource.getMinY())); + expand(rMatrix * B2DPoint(aSource.getMaxX(), aSource.getMinY())); + expand(rMatrix * B2DPoint(aSource.getMinX(), aSource.getMaxY())); + expand(rMatrix * B2DPoint(aSource.getMaxX(), aSource.getMaxY())); + } + } + B2IRange fround(const B2DRange& rRange) { return rRange.isEmpty() ?