diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-24 17:19:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-24 18:38:11 +0000 |
commit | efe28833d484e6c59ce928e4218a07752262c5e9 (patch) | |
tree | f192cf333e674d8970ff739481f788f83b354f4c /include | |
parent | 28f909df366d731ee0684d0608e5a00dcf70181c (diff) |
make ScanlineStride an argument to createBitmapDevice
so we could create bitmap devices that have the same stride that cairo expects,
provide getBitmapDeviceStrideForWidth to get a default value
Change-Id: I7ecc6f54a734b3f6bed59c699ac3b482c4ad7c47
Diffstat (limited to 'include')
-rw-r--r-- | include/basebmp/bitmapdevice.hxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/basebmp/bitmapdevice.hxx b/include/basebmp/bitmapdevice.hxx index 48c6d474c809..595374183697 100644 --- a/include/basebmp/bitmapdevice.hxx +++ b/include/basebmp/bitmapdevice.hxx @@ -659,11 +659,17 @@ private: std::unique_ptr< ImplBitmapDevice > mpImpl; }; +/** Function to calculate a suitable BitmapDevice Scanline Stride for a given scanline format and width + * you can provide this value or any larger value. + */ +sal_Int32 BASEBMP_DLLPUBLIC getBitmapDeviceStrideForWidth(Format nScanlineFormat, sal_Int32 nWidth); + /** Function to create a BitmapDevice for given scanline format */ BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVector& rSize, bool bTopDown, - Format nScanlineFormat ); + Format nScanlineFormat, + sal_Int32 nScanlineStride ); /** Function to create a BitmapDevice for given scanline format with the given palette @@ -675,6 +681,7 @@ BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVe BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVector& rSize, bool bTopDown, Format nScanlineFormat, + sal_Int32 nScanlineStride, const PaletteMemorySharedVector& rPalette ); /** Function to create a BitmapDevice for given scanline format @@ -686,6 +693,7 @@ BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVe BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVector& rSize, bool bTopDown, Format nScanlineFormat, + sal_Int32 nScanlineStride, const RawMemorySharedArray& rMem, const PaletteMemorySharedVector& rPalette ); |