summaryrefslogtreecommitdiff
path: root/basebmp/inc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-04-12 01:45:20 +0300
committerTor Lillqvist <tml@iki.fi>2013-04-12 02:24:12 +0300
commit3f9acb7f9c3b68da11f8263b9103d2700321913b (patch)
tree98df3364ecd7a51c8e4f12281cec842f3cd6436a /basebmp/inc
parentb7bae354aafc3b2c1e579c72443ccfba4d42e4ac (diff)
Nah, I don't need a getOffset(), but I do need a getBufferSize()
To properly handle subsetted BitmapDevices in the iOS vcl backend I seem to need to know what the size of the full BitmapDevice is. I wasted at least one day on desperate hacking and debugging, trying to wrap my head around a misunderstanding of what a subsetted BitmapDevice is. I thought it involved coordinate offsetting... Change-Id: I83bf1a7d75ce192aaf21f1e408008e362fd6c6e6
Diffstat (limited to 'basebmp/inc')
-rw-r--r--basebmp/inc/basebmp/bitmapdevice.hxx23
1 files changed, 15 insertions, 8 deletions
diff --git a/basebmp/inc/basebmp/bitmapdevice.hxx b/basebmp/inc/basebmp/bitmapdevice.hxx
index 71c4a6307766..941b01c840c3 100644
--- a/basebmp/inc/basebmp/bitmapdevice.hxx
+++ b/basebmp/inc/basebmp/bitmapdevice.hxx
@@ -79,7 +79,7 @@ class BASEBMP_DLLPUBLIC BitmapDevice : public boost::enable_shared_from_this<Bit
private boost::noncopyable
{
public:
- /** Query size of device in pixel
+ /** Query size of device in pixel columns (X) and rows (Y, "scanlines")
*/
basegfx::B2IVector getSize() const;
@@ -92,12 +92,12 @@ public:
*/
bool isTopDown() const;
- /** Query the offset from the start of the memory buffer
+ /** Query the size of the whole frame buffer
- @ return the offset, which is (0,0) unless this is a subset
- device.
+ @ return the size of the whole frame buffer, the same as
+ getSize() unless this is a "subset" device.
*/
- basegfx::B2IVector getOffset() const;
+ basegfx::B2IVector getBufferSize() const;
/** Query type of scanline memory format
*/
@@ -552,6 +552,7 @@ public:
protected:
BASEBMP_DLLPRIVATE BitmapDevice( const basegfx::B2IBox& rBounds,
+ const basegfx::B2IVector& rBufferSize,
sal_Int32 nScanlineFormat,
sal_Int32 nScanlineStride,
sal_uInt8* pFirstScanline,
@@ -688,10 +689,16 @@ BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVe
/** Function to retrieve a subsetted BitmapDevice to the same
memory.
+ Note that there is no coordinate system translation or offsetting
+ involved.
+
This method creates a second bitmap device instance, which renders
- to the same memory as the original, but to a limited, rectangular
- area. Useful to implement rectangular clips (usually faster than
- setting up a 1bpp clip mask).
+ to the same memory as the original, with the same pixel coordinate
+ pairs refering to the same pixels in the memory buffer, but with
+ rendering clipped to a rectangular area. Useful to implement
+ rectangular clips (usually faster than setting up a 1bpp clip
+ mask).
+
*/
BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC subsetBitmapDevice( const BitmapDeviceSharedPtr& rProto,
const basegfx::B2IBox& rSubset );