diff options
author | Thorsten Behrens <tbehrens@suse.com> | 2011-11-02 23:36:36 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2011-11-02 23:58:28 +0100 |
commit | 1e297aef53ec79e2905cb9ca57d649b82bc3938d (patch) | |
tree | f5ec93d4b92881eb59ed50c2aee7200e25e5cbd2 /basegfx/source | |
parent | aeee94cb587082430f3a277a24ae459829f6d384 (diff) |
Move BitmapDevice to use B2IBox instead of B2IRange.
Semantically, B2IBox represents a pixel rect much better than
B2IRange - replaced all occurences in and around the software
renderer, and client code.
Diffstat (limited to 'basegfx/source')
-rw-r--r-- | basegfx/source/tools/canvastools.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/basegfx/source/tools/canvastools.cxx b/basegfx/source/tools/canvastools.cxx index d29d5796389b..896f5615f78f 100644 --- a/basegfx/source/tools/canvastools.cxx +++ b/basegfx/source/tools/canvastools.cxx @@ -55,6 +55,7 @@ #include <basegfx/vector/b2isize.hxx> #include <basegfx/point/b2ipoint.hxx> #include <basegfx/range/b2irectangle.hxx> +#include <basegfx/range/b2ibox.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/tools/canvastools.hxx> @@ -597,6 +598,14 @@ namespace basegfx rRect.Y + rRect.Height ); } + ::basegfx::B2IBox b2ISurroundingBoxFromB2DRange( const ::basegfx::B2DRange& rRange ) + { + return ::basegfx::B2IBox( static_cast<sal_Int32>( floor(rRange.getMinX()) ), + static_cast<sal_Int32>( floor(rRange.getMinY()) ), + static_cast<sal_Int32>( ceil(rRange.getMaxX()) ), + static_cast<sal_Int32>( ceil(rRange.getMaxY()) ) ); + } + ::basegfx::B2IRange b2ISurroundingRangeFromB2DRange( const ::basegfx::B2DRange& rRange ) { return ::basegfx::B2IRange( static_cast<sal_Int32>( floor(rRange.getMinX()) ), |