diff options
Diffstat (limited to 'basebmp')
-rw-r--r-- | basebmp/inc/basebmp/bitmapdevice.hxx | 7 | ||||
-rw-r--r-- | basebmp/source/bitmapdevice.cxx | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/basebmp/inc/basebmp/bitmapdevice.hxx b/basebmp/inc/basebmp/bitmapdevice.hxx index 98e032597f07..389265e21ef5 100644 --- a/basebmp/inc/basebmp/bitmapdevice.hxx +++ b/basebmp/inc/basebmp/bitmapdevice.hxx @@ -92,6 +92,13 @@ public: */ bool isTopDown() const; + /** Query the offset from the start of the memory buffer + + @ return the offset, which is (0,0) unless this is a subset + device. + */ + basegfx::B2IVector getOffset() const; + /** Query type of scanline memory format */ sal_Int32 getScanlineFormat() const; diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx index d49a18d2e2af..c090b456cabc 100644 --- a/basebmp/source/bitmapdevice.cxx +++ b/basebmp/source/bitmapdevice.cxx @@ -1105,6 +1105,11 @@ bool BitmapDevice::isTopDown() const return mpImpl->mnScanlineStride >= 0; } +basegfx::B2IVector BitmapDevice::getOffset() const +{ + return basegfx::B2IVector(mpImpl->maBounds.getMinX(), mpImpl->maBounds.getMinY()); +} + sal_Int32 BitmapDevice::getScanlineFormat() const { return mpImpl->mnScanlineFormat; |