Turn basebmp::Format into a proper enum
Change-Id: I4067c5039c7b5c74a1c144721dd7260de54dd2bf
This commit is contained in:
@@ -17,6 +17,9 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include "sal/config.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <string.h>
|
||||
|
||||
#include "basebmp/bitmapdevice.hxx"
|
||||
@@ -284,7 +287,7 @@ namespace
|
||||
|
||||
BitmapRenderer( const basegfx::B2IBox& rBounds,
|
||||
const basegfx::B2IVector& rBufferSize,
|
||||
sal_Int32 nScanlineFormat,
|
||||
Format nScanlineFormat,
|
||||
sal_Int32 nScanlineStride,
|
||||
sal_uInt8* pFirstScanline,
|
||||
dest_iterator_type begin,
|
||||
@@ -1049,7 +1052,7 @@ struct ImplBitmapDevice
|
||||
basegfx::B2IVector maBufferSize;
|
||||
|
||||
/// Scanline format, as provided at the constructor
|
||||
sal_Int32 mnScanlineFormat;
|
||||
Format mnScanlineFormat;
|
||||
|
||||
/// Scanline stride. Negative for bottom-to-top formats
|
||||
sal_Int32 mnScanlineStride;
|
||||
@@ -1077,7 +1080,7 @@ struct ImplBitmapDevice
|
||||
|
||||
BitmapDevice::BitmapDevice( const basegfx::B2IBox& rBounds,
|
||||
const basegfx::B2IVector& rBufferSize,
|
||||
sal_Int32 nScanlineFormat,
|
||||
Format nScanlineFormat,
|
||||
sal_Int32 nScanlineStride,
|
||||
sal_uInt8* pFirstScanline,
|
||||
const RawMemorySharedArray& rMem,
|
||||
@@ -1116,7 +1119,7 @@ basegfx::B2IVector BitmapDevice::getBufferSize() const
|
||||
return mpImpl->maBufferSize;
|
||||
}
|
||||
|
||||
sal_Int32 BitmapDevice::getScanlineFormat() const
|
||||
Format BitmapDevice::getScanlineFormat() const
|
||||
{
|
||||
return mpImpl->mnScanlineFormat;
|
||||
}
|
||||
@@ -1691,7 +1694,7 @@ template< class FormatTraits, class MaskTraits >
|
||||
BitmapDeviceSharedPtr createRenderer(
|
||||
const basegfx::B2IBox& rBounds,
|
||||
const basegfx::B2IVector& rBufferSize,
|
||||
sal_Int32 nScanlineFormat,
|
||||
Format nScanlineFormat,
|
||||
sal_Int32 nScanlineStride,
|
||||
sal_uInt8* pFirstScanline,
|
||||
typename FormatTraits::raw_accessor_type const& rRawAccessor,
|
||||
@@ -1706,7 +1709,7 @@ template< class FormatTraits, class MaskTraits, class Accessor >
|
||||
BitmapDeviceSharedPtr createRenderer(
|
||||
const basegfx::B2IBox& rBounds,
|
||||
const basegfx::B2IVector& rBufferSize,
|
||||
sal_Int32 nScanlineFormat,
|
||||
Format nScanlineFormat,
|
||||
sal_Int32 nScanlineStride,
|
||||
sal_uInt8* pFirstScanline,
|
||||
typename FormatTraits::raw_accessor_type const& rRawAccessor,
|
||||
@@ -1765,7 +1768,7 @@ template< class FormatTraits, class MaskTraits >
|
||||
BitmapDeviceSharedPtr createRenderer(
|
||||
const basegfx::B2IBox& rBounds,
|
||||
const basegfx::B2IVector& rBufferSize,
|
||||
sal_Int32 nScanlineFormat,
|
||||
Format nScanlineFormat,
|
||||
sal_Int32 nScanlineStride,
|
||||
sal_uInt8* pFirstScanline,
|
||||
boost::shared_array< sal_uInt8 > pMem,
|
||||
@@ -1791,7 +1794,7 @@ template< class FormatTraits, class MaskTraits >
|
||||
BitmapDeviceSharedPtr createRenderer(
|
||||
const basegfx::B2IBox& rBounds,
|
||||
const basegfx::B2IVector& rBufferSize,
|
||||
sal_Int32 nScanlineFormat,
|
||||
Format nScanlineFormat,
|
||||
sal_Int32 nScanlineStride,
|
||||
sal_uInt8* pFirstScanline,
|
||||
boost::shared_array< sal_uInt8 > pMem,
|
||||
@@ -1850,7 +1853,7 @@ namespace
|
||||
{
|
||||
BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector& rSize,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat,
|
||||
Format nScanlineFormat,
|
||||
boost::shared_array< sal_uInt8 > pMem,
|
||||
PaletteMemorySharedVector pPal,
|
||||
const basegfx::B2IBox* pSubset,
|
||||
@@ -1858,8 +1861,8 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector&
|
||||
{
|
||||
OSL_ASSERT(rSize.getX() > 0 && rSize.getY() > 0);
|
||||
|
||||
if( nScanlineFormat <= Format::NONE ||
|
||||
nScanlineFormat > Format::MAX )
|
||||
if( nScanlineFormat <= FORMAT_NONE ||
|
||||
nScanlineFormat > FORMAT_MAX )
|
||||
return BitmapDeviceSharedPtr();
|
||||
|
||||
static const sal_uInt8 bitsPerPixel[] =
|
||||
@@ -1933,23 +1936,23 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector&
|
||||
// ----------------------------------------------------------------------
|
||||
// one bit formats
|
||||
|
||||
case Format::ONE_BIT_MSB_GREY:
|
||||
case FORMAT_ONE_BIT_MSB_GREY:
|
||||
return createRenderer<PixelFormatTraits_GREY1_MSB,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal, rDamage );
|
||||
|
||||
case Format::ONE_BIT_LSB_GREY:
|
||||
case FORMAT_ONE_BIT_LSB_GREY:
|
||||
return createRenderer<PixelFormatTraits_GREY1_LSB,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal, rDamage );
|
||||
|
||||
case Format::ONE_BIT_MSB_PAL:
|
||||
case FORMAT_ONE_BIT_MSB_PAL:
|
||||
return createRenderer<PixelFormatTraits_PAL1_MSB,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal,
|
||||
bitsPerPixel[nScanlineFormat], rDamage );
|
||||
|
||||
case Format::ONE_BIT_LSB_PAL:
|
||||
case FORMAT_ONE_BIT_LSB_PAL:
|
||||
return createRenderer<PixelFormatTraits_PAL1_LSB,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal,
|
||||
@@ -1959,23 +1962,23 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector&
|
||||
// ----------------------------------------------------------------------
|
||||
// four bit formats
|
||||
|
||||
case Format::FOUR_BIT_MSB_GREY:
|
||||
case FORMAT_FOUR_BIT_MSB_GREY:
|
||||
return createRenderer<PixelFormatTraits_GREY4_MSB,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal, rDamage );
|
||||
|
||||
case Format::FOUR_BIT_LSB_GREY:
|
||||
case FORMAT_FOUR_BIT_LSB_GREY:
|
||||
return createRenderer<PixelFormatTraits_GREY4_LSB,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal, rDamage );
|
||||
|
||||
case Format::FOUR_BIT_MSB_PAL:
|
||||
case FORMAT_FOUR_BIT_MSB_PAL:
|
||||
return createRenderer<PixelFormatTraits_PAL4_MSB,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal,
|
||||
bitsPerPixel[nScanlineFormat], rDamage );
|
||||
|
||||
case Format::FOUR_BIT_LSB_PAL:
|
||||
case FORMAT_FOUR_BIT_LSB_PAL:
|
||||
return createRenderer<PixelFormatTraits_PAL4_LSB,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal,
|
||||
@@ -1985,12 +1988,12 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector&
|
||||
// ----------------------------------------------------------------------
|
||||
// eight bit formats
|
||||
|
||||
case Format::EIGHT_BIT_GREY:
|
||||
case FORMAT_EIGHT_BIT_GREY:
|
||||
return createRenderer<PixelFormatTraits_GREY8,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal, rDamage );
|
||||
|
||||
case Format::EIGHT_BIT_PAL:
|
||||
case FORMAT_EIGHT_BIT_PAL:
|
||||
return createRenderer<PixelFormatTraits_PAL8,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal,
|
||||
@@ -2000,12 +2003,12 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector&
|
||||
// ----------------------------------------------------------------------
|
||||
// sixteen bit formats
|
||||
|
||||
case Format::SIXTEEN_BIT_LSB_TC_MASK:
|
||||
case FORMAT_SIXTEEN_BIT_LSB_TC_MASK:
|
||||
return createRenderer<PixelFormatTraits_RGB16_565_LSB,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal, rDamage );
|
||||
|
||||
case Format::SIXTEEN_BIT_MSB_TC_MASK:
|
||||
case FORMAT_SIXTEEN_BIT_MSB_TC_MASK:
|
||||
return createRenderer<PixelFormatTraits_RGB16_565_MSB,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal, rDamage );
|
||||
@@ -2013,7 +2016,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector&
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// twentyfour bit formats
|
||||
case Format::TWENTYFOUR_BIT_TC_MASK:
|
||||
case FORMAT_TWENTYFOUR_BIT_TC_MASK:
|
||||
return createRenderer<PixelFormatTraits_BGR24,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal, rDamage );
|
||||
@@ -2022,25 +2025,28 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector&
|
||||
// ----------------------------------------------------------------------
|
||||
// thirtytwo bit formats
|
||||
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_BGRA:
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA:
|
||||
return createRenderer<PixelFormatTraits_BGRX32_8888,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal, rDamage );
|
||||
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_ARGB:
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB:
|
||||
return createRenderer<PixelFormatTraits_XRGB32_8888,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal, rDamage );
|
||||
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_ABGR:
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR:
|
||||
return createRenderer<PixelFormatTraits_XBGR32_8888,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal, rDamage );
|
||||
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_RGBA:
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA:
|
||||
return createRenderer<PixelFormatTraits_RGBX32_8888,StdMasks>(
|
||||
aBounds, rSize, nScanlineFormat, nScanlineStride,
|
||||
pFirstScanline, pMem, pPal, rDamage );
|
||||
|
||||
default:
|
||||
assert(false); // this cannot happen
|
||||
}
|
||||
|
||||
// TODO(F3): other formats not yet implemented
|
||||
@@ -2049,7 +2055,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector&
|
||||
|
||||
BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& rSize,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat,
|
||||
Format nScanlineFormat,
|
||||
boost::shared_array< sal_uInt8 > pMem,
|
||||
PaletteMemorySharedVector pPal,
|
||||
const basegfx::B2IBox* pSubset,
|
||||
@@ -2067,7 +2073,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector&
|
||||
"createBitmapDevice: "
|
||||
<< rSize.getX() << "x" << rSize.getY()
|
||||
<< (bTopDown ? " top-down " : " bottom-up ")
|
||||
<< Format::formatName(nScanlineFormat)
|
||||
<< formatName(nScanlineFormat)
|
||||
<< subset.str()
|
||||
<< " = " << result.get() );
|
||||
#endif
|
||||
@@ -2078,7 +2084,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector&
|
||||
|
||||
BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat )
|
||||
Format nScanlineFormat )
|
||||
{
|
||||
return createBitmapDeviceImpl( rSize,
|
||||
bTopDown,
|
||||
@@ -2091,7 +2097,7 @@ BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize,
|
||||
|
||||
BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat,
|
||||
Format nScanlineFormat,
|
||||
const PaletteMemorySharedVector& rPalette )
|
||||
{
|
||||
return createBitmapDeviceImpl( rSize,
|
||||
@@ -2105,7 +2111,7 @@ BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize
|
||||
|
||||
BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat,
|
||||
Format nScanlineFormat,
|
||||
const RawMemorySharedArray& rMem,
|
||||
const PaletteMemorySharedVector& rPalette )
|
||||
{
|
||||
|
@@ -31,51 +31,48 @@
|
||||
|
||||
namespace basebmp
|
||||
{
|
||||
namespace Format
|
||||
const char* formatName( Format nScanlineFormat )
|
||||
{
|
||||
const char* formatName( sal_Int32 nScanlineFormat )
|
||||
switch( nScanlineFormat )
|
||||
{
|
||||
switch( nScanlineFormat )
|
||||
{
|
||||
case Format::NONE:
|
||||
return "NONE";
|
||||
case Format::ONE_BIT_MSB_GREY:
|
||||
return "ONE_BIT_MSB_GREY";
|
||||
case Format::ONE_BIT_LSB_GREY:
|
||||
return "ONE_BIT_LSB_GREY";
|
||||
case Format::ONE_BIT_MSB_PAL:
|
||||
return "ONE_BIT_MSB_PAL";
|
||||
case Format::ONE_BIT_LSB_PAL:
|
||||
return "ONE_BIT_LSB_PAL";
|
||||
case Format::FOUR_BIT_MSB_GREY:
|
||||
return "FOUR_BIT_MSB_GREY";
|
||||
case Format::FOUR_BIT_LSB_GREY:
|
||||
return "FOUR_BIT_LSB_GREY";
|
||||
case Format::FOUR_BIT_MSB_PAL:
|
||||
return "FOUR_BIT_MSB_PAL";
|
||||
case Format::FOUR_BIT_LSB_PAL:
|
||||
return "FOUR_BIT_LSB_PAL";
|
||||
case Format::EIGHT_BIT_PAL:
|
||||
return "EIGHT_BIT_PAL";
|
||||
case Format::EIGHT_BIT_GREY:
|
||||
return "EIGHT_BIT_GREY";
|
||||
case Format::SIXTEEN_BIT_LSB_TC_MASK:
|
||||
return "SIXTEEN_BIT_LSB_TC_MASK";
|
||||
case Format::SIXTEEN_BIT_MSB_TC_MASK:
|
||||
return "SIXTEEN_BIT_MSB_TC_MASK";
|
||||
case Format::TWENTYFOUR_BIT_TC_MASK:
|
||||
return "TWENTYFOUR_BIT_TC_MASK";
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_BGRA:
|
||||
return "THIRTYTWO_BIT_TC_MASK_BGRA";
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_ARGB:
|
||||
return "THIRTYTWO_BIT_TC_MASK_ARGB";
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_ABGR:
|
||||
return "THIRTYTWO_BIT_TC_MASK_ABGR";
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_RGBA:
|
||||
return "THIRTYTWO_BIT_TC_MASK_RGBA";
|
||||
default:
|
||||
return "<unknown>";
|
||||
}
|
||||
case FORMAT_NONE:
|
||||
return "NONE";
|
||||
case FORMAT_ONE_BIT_MSB_GREY:
|
||||
return "ONE_BIT_MSB_GREY";
|
||||
case FORMAT_ONE_BIT_LSB_GREY:
|
||||
return "ONE_BIT_LSB_GREY";
|
||||
case FORMAT_ONE_BIT_MSB_PAL:
|
||||
return "ONE_BIT_MSB_PAL";
|
||||
case FORMAT_ONE_BIT_LSB_PAL:
|
||||
return "ONE_BIT_LSB_PAL";
|
||||
case FORMAT_FOUR_BIT_MSB_GREY:
|
||||
return "FOUR_BIT_MSB_GREY";
|
||||
case FORMAT_FOUR_BIT_LSB_GREY:
|
||||
return "FOUR_BIT_LSB_GREY";
|
||||
case FORMAT_FOUR_BIT_MSB_PAL:
|
||||
return "FOUR_BIT_MSB_PAL";
|
||||
case FORMAT_FOUR_BIT_LSB_PAL:
|
||||
return "FOUR_BIT_LSB_PAL";
|
||||
case FORMAT_EIGHT_BIT_PAL:
|
||||
return "EIGHT_BIT_PAL";
|
||||
case FORMAT_EIGHT_BIT_GREY:
|
||||
return "EIGHT_BIT_GREY";
|
||||
case FORMAT_SIXTEEN_BIT_LSB_TC_MASK:
|
||||
return "SIXTEEN_BIT_LSB_TC_MASK";
|
||||
case FORMAT_SIXTEEN_BIT_MSB_TC_MASK:
|
||||
return "SIXTEEN_BIT_MSB_TC_MASK";
|
||||
case FORMAT_TWENTYFOUR_BIT_TC_MASK:
|
||||
return "TWENTYFOUR_BIT_TC_MASK";
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA:
|
||||
return "THIRTYTWO_BIT_TC_MASK_BGRA";
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB:
|
||||
return "THIRTYTWO_BIT_TC_MASK_ARGB";
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR:
|
||||
return "THIRTYTWO_BIT_TC_MASK_ABGR";
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA:
|
||||
return "THIRTYTWO_BIT_TC_MASK_RGBA";
|
||||
default:
|
||||
return "<unknown>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +83,7 @@ namespace basebmp
|
||||
{
|
||||
const basegfx::B2IVector aSize( rDevice->getSize() );
|
||||
const bool bTopDown( rDevice->isTopDown() );
|
||||
const sal_Int32 nScanlineFormat( rDevice->getScanlineFormat() );
|
||||
const Format nScanlineFormat( rDevice->getScanlineFormat() );
|
||||
|
||||
rOutputStream
|
||||
<< "/* basebmp::BitmapDevice content dump */" << std::endl
|
||||
|
@@ -83,13 +83,13 @@ public:
|
||||
basegfx::B2ISize aSize2(aSize);
|
||||
BitmapDeviceSharedPtr pDevice( createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL ));
|
||||
FORMAT_ONE_BIT_MSB_PAL ));
|
||||
CPPUNIT_ASSERT_MESSAGE("right size",
|
||||
pDevice->getSize() == aSize2 );
|
||||
CPPUNIT_ASSERT_MESSAGE("Top down format",
|
||||
pDevice->isTopDown() == true );
|
||||
CPPUNIT_ASSERT_MESSAGE("Scanline format",
|
||||
pDevice->getScanlineFormat() == Format::ONE_BIT_MSB_PAL );
|
||||
pDevice->getScanlineFormat() == FORMAT_ONE_BIT_MSB_PAL );
|
||||
CPPUNIT_ASSERT_MESSAGE("Scanline len",
|
||||
pDevice->getScanlineStride() == (aSize2.getY() + 7)/8 );
|
||||
CPPUNIT_ASSERT_MESSAGE("Palette existence",
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
basegfx::B2ISize aSize2(3,3);
|
||||
BitmapDeviceSharedPtr pDevice( createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL ));
|
||||
FORMAT_ONE_BIT_MSB_PAL ));
|
||||
|
||||
BitmapDeviceSharedPtr pClone( cloneBitmapDevice(
|
||||
aSize2,
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
const basegfx::B2ISize aSize(64,64);
|
||||
BitmapDeviceSharedPtr pDevice( createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL ));
|
||||
FORMAT_ONE_BIT_MSB_PAL ));
|
||||
|
||||
const basegfx::B2IPoint aPt(3,3);
|
||||
CPPUNIT_ASSERT_MESSAGE("getPixelData for virgin device",
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
{
|
||||
pDevice = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_LSB_PAL );
|
||||
FORMAT_ONE_BIT_LSB_PAL );
|
||||
|
||||
pDevice->setPixel( aPt2, aCol, DrawMode_PAINT );
|
||||
CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #4",
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
{
|
||||
pDevice = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::EIGHT_BIT_GREY );
|
||||
FORMAT_EIGHT_BIT_GREY );
|
||||
|
||||
const Color aCol4(0x010101);
|
||||
pDevice->setPixel( aPt, aCol4, DrawMode_PAINT );
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
{
|
||||
pDevice = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::SIXTEEN_BIT_LSB_TC_MASK );
|
||||
FORMAT_SIXTEEN_BIT_LSB_TC_MASK );
|
||||
const Color aCol7(0);
|
||||
pDevice->clear( aCol7 );
|
||||
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
{
|
||||
pDevice = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::TWENTYFOUR_BIT_TC_MASK );
|
||||
FORMAT_TWENTYFOUR_BIT_TC_MASK );
|
||||
|
||||
const Color aCol4(0x01010101);
|
||||
pDevice->setPixel( aPt, aCol4, DrawMode_PAINT );
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
{
|
||||
pDevice = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
|
||||
const Color aCol4(0x01010101);
|
||||
pDevice->setPixel( aPt, aCol4, DrawMode_PAINT );
|
||||
|
@@ -1055,7 +1055,7 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ )
|
||||
basegfx::B2ISize aTestSize(1000,1000);
|
||||
basebmp::BitmapDeviceSharedPtr pDevice( basebmp::createBitmapDevice( aTestSize,
|
||||
false,
|
||||
basebmp::Format::THIRTYTWO_BIT_TC_MASK_BGRA ));
|
||||
basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA ));
|
||||
|
||||
{
|
||||
OUString aSvg;
|
||||
@@ -1074,7 +1074,7 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ )
|
||||
{
|
||||
basebmp::BitmapDeviceSharedPtr pMask( basebmp::createBitmapDevice( aTestSize,
|
||||
false,
|
||||
basebmp::Format::ONE_BIT_MSB_GREY ));
|
||||
basebmp::FORMAT_ONE_BIT_MSB_GREY ));
|
||||
|
||||
const basegfx::B2IPoint aPt111(10,10);
|
||||
const basegfx::B2IPoint aPt222(0,10);
|
||||
|
@@ -93,21 +93,21 @@ public:
|
||||
const basegfx::B2ISize aSize(10,10);
|
||||
mpDevice1bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL );
|
||||
FORMAT_ONE_BIT_MSB_PAL );
|
||||
mpDevice32bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
|
||||
mpMaskBmp1bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_GREY );
|
||||
FORMAT_ONE_BIT_MSB_GREY );
|
||||
|
||||
mpBmp1bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL );
|
||||
FORMAT_ONE_BIT_MSB_PAL );
|
||||
mpBmp32bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
|
||||
OUString aSvg( "m 0 0h5v10h5v-5h-10z" );
|
||||
|
||||
|
@@ -150,17 +150,17 @@ public:
|
||||
const basegfx::B2ISize aSize(10,10);
|
||||
mpDevice1bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL );
|
||||
FORMAT_ONE_BIT_MSB_PAL );
|
||||
mpDevice32bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
|
||||
mpBmp1bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL );
|
||||
FORMAT_ONE_BIT_MSB_PAL );
|
||||
mpBmp32bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
|
||||
OUString aSvg( "m 0 0h5v10h5v-5h-10z" );
|
||||
|
||||
|
@@ -156,7 +156,7 @@ private:
|
||||
{
|
||||
BitmapDeviceSharedPtr pBmp( createBitmapDevice( rDevice->getSize(),
|
||||
true,
|
||||
Format::EIGHT_BIT_GREY ));
|
||||
FORMAT_EIGHT_BIT_GREY ));
|
||||
|
||||
OUString aSvg( "m 0 0h5v10h5v-5h-10z" );
|
||||
|
||||
@@ -190,13 +190,13 @@ public:
|
||||
const basegfx::B2ISize aSize(11,11);
|
||||
mpClipMask = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_GREY );
|
||||
FORMAT_ONE_BIT_MSB_GREY );
|
||||
mpDevice1bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL );
|
||||
FORMAT_ONE_BIT_MSB_PAL );
|
||||
mpDevice32bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
|
||||
OUString aSvg( "m 0 0 h5 l5 5 v5 h-5 l-5-5 z" );
|
||||
basegfx::B2DPolyPolygon aPoly;
|
||||
|
@@ -211,10 +211,10 @@ public:
|
||||
const basegfx::B2ISize aSize(11,11);
|
||||
mpDevice1bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL );
|
||||
FORMAT_ONE_BIT_MSB_PAL );
|
||||
mpDevice32bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
}
|
||||
|
||||
void testRectFill()
|
||||
|
@@ -151,10 +151,10 @@ public:
|
||||
const basegfx::B2ISize aSize(11,11);
|
||||
mpDevice1bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL );
|
||||
FORMAT_ONE_BIT_MSB_PAL );
|
||||
mpDevice32bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
}
|
||||
|
||||
void testCornerCases()
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
BitmapDeviceSharedPtr pDevice = createBitmapDevice(
|
||||
aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL );
|
||||
FORMAT_ONE_BIT_MSB_PAL );
|
||||
|
||||
const basegfx::B2IPoint aPt1(0,0);
|
||||
const basegfx::B2IPoint aPt2(10,10);
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
pDevice = createBitmapDevice(
|
||||
aSize2,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL );
|
||||
FORMAT_ONE_BIT_MSB_PAL );
|
||||
|
||||
CPPUNIT_ASSERT_MESSAGE("only pixel cleared",
|
||||
pDevice->getPixelData(aPt1) == 0);
|
||||
|
@@ -104,14 +104,14 @@ public:
|
||||
const basegfx::B2ISize aSize(10,10);
|
||||
mpDevice1bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL );
|
||||
FORMAT_ONE_BIT_MSB_PAL );
|
||||
mpDevice32bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
|
||||
mpMask = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::EIGHT_BIT_GREY );
|
||||
FORMAT_EIGHT_BIT_GREY );
|
||||
|
||||
OUString aSvg( "m 0 0h5v10h5v-5h-10z" );
|
||||
|
||||
|
@@ -292,10 +292,10 @@ public:
|
||||
const basegfx::B2ISize aSize(10,10);
|
||||
mpDevice1bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::ONE_BIT_MSB_PAL );
|
||||
FORMAT_ONE_BIT_MSB_PAL );
|
||||
mpDevice32bpp = createBitmapDevice( aSize,
|
||||
true,
|
||||
Format::THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA );
|
||||
}
|
||||
|
||||
void testEmpty()
|
||||
|
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <sal/types.h>
|
||||
#include <basebmp/drawmodes.hxx>
|
||||
#include <basebmp/scanlineformats.hxx>
|
||||
#include <basebmp/basebmpdllapi.h>
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
@@ -101,7 +102,7 @@ public:
|
||||
|
||||
/** Query type of scanline memory format
|
||||
*/
|
||||
sal_Int32 getScanlineFormat() const;
|
||||
Format getScanlineFormat() const;
|
||||
|
||||
/** Query byte offset to get from scanline n to scanline n+1
|
||||
|
||||
@@ -556,7 +557,7 @@ public:
|
||||
protected:
|
||||
BASEBMP_DLLPRIVATE BitmapDevice( const basegfx::B2IBox& rBounds,
|
||||
const basegfx::B2IVector& rBufferSize,
|
||||
sal_Int32 nScanlineFormat,
|
||||
Format nScanlineFormat,
|
||||
sal_Int32 nScanlineStride,
|
||||
sal_uInt8* pFirstScanline,
|
||||
const RawMemorySharedArray& rMem,
|
||||
@@ -662,7 +663,7 @@ private:
|
||||
*/
|
||||
BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVector& rSize,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat );
|
||||
Format nScanlineFormat );
|
||||
|
||||
/** Function to create a BitmapDevice for given scanline format
|
||||
with the given palette
|
||||
@@ -673,7 +674,7 @@ BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVe
|
||||
*/
|
||||
BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVector& rSize,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat,
|
||||
Format nScanlineFormat,
|
||||
const PaletteMemorySharedVector& rPalette );
|
||||
|
||||
/** Function to create a BitmapDevice for given scanline format
|
||||
@@ -684,7 +685,7 @@ BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVe
|
||||
*/
|
||||
BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVector& rSize,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat,
|
||||
Format nScanlineFormat,
|
||||
const RawMemorySharedArray& rMem,
|
||||
const PaletteMemorySharedVector& rPalette );
|
||||
|
||||
|
@@ -20,36 +20,40 @@
|
||||
#ifndef INCLUDED_BASEBMP_SCANLINEFORMATS_HXX
|
||||
#define INCLUDED_BASEBMP_SCANLINEFORMATS_HXX
|
||||
|
||||
#include <sal/types.h>
|
||||
#include "sal/config.h"
|
||||
|
||||
/* Definition of Scanline formats */
|
||||
|
||||
namespace basebmp { namespace Format
|
||||
namespace basebmp {
|
||||
|
||||
enum Format
|
||||
{
|
||||
static const sal_Int32 NONE = 0;
|
||||
static const sal_Int32 ONE_BIT_MSB_GREY = (sal_Int32)0x01;
|
||||
static const sal_Int32 ONE_BIT_LSB_GREY = (sal_Int32)0x02;
|
||||
static const sal_Int32 ONE_BIT_MSB_PAL = (sal_Int32)0x03;
|
||||
static const sal_Int32 ONE_BIT_LSB_PAL = (sal_Int32)0x04;
|
||||
static const sal_Int32 FOUR_BIT_MSB_GREY = (sal_Int32)0x05;
|
||||
static const sal_Int32 FOUR_BIT_LSB_GREY = (sal_Int32)0x06;
|
||||
static const sal_Int32 FOUR_BIT_MSB_PAL = (sal_Int32)0x07;
|
||||
static const sal_Int32 FOUR_BIT_LSB_PAL = (sal_Int32)0x08;
|
||||
static const sal_Int32 EIGHT_BIT_PAL = (sal_Int32)0x09;
|
||||
static const sal_Int32 EIGHT_BIT_GREY = (sal_Int32)0x0A;
|
||||
static const sal_Int32 SIXTEEN_BIT_LSB_TC_MASK = (sal_Int32)0x0B;
|
||||
static const sal_Int32 SIXTEEN_BIT_MSB_TC_MASK = (sal_Int32)0x0C;
|
||||
static const sal_Int32 TWENTYFOUR_BIT_TC_MASK = (sal_Int32)0x0D;
|
||||
FORMAT_NONE,
|
||||
FORMAT_ONE_BIT_MSB_GREY,
|
||||
FORMAT_ONE_BIT_LSB_GREY,
|
||||
FORMAT_ONE_BIT_MSB_PAL,
|
||||
FORMAT_ONE_BIT_LSB_PAL,
|
||||
FORMAT_FOUR_BIT_MSB_GREY,
|
||||
FORMAT_FOUR_BIT_LSB_GREY,
|
||||
FORMAT_FOUR_BIT_MSB_PAL,
|
||||
FORMAT_FOUR_BIT_LSB_PAL,
|
||||
FORMAT_EIGHT_BIT_PAL,
|
||||
FORMAT_EIGHT_BIT_GREY,
|
||||
FORMAT_SIXTEEN_BIT_LSB_TC_MASK,
|
||||
FORMAT_SIXTEEN_BIT_MSB_TC_MASK,
|
||||
FORMAT_TWENTYFOUR_BIT_TC_MASK,
|
||||
// The order of the channels code letters indicates the order of the
|
||||
// channel bytes in memory, I think
|
||||
static const sal_Int32 THIRTYTWO_BIT_TC_MASK_BGRA = (sal_Int32)0x0E;
|
||||
static const sal_Int32 THIRTYTWO_BIT_TC_MASK_ARGB = (sal_Int32)0x0F;
|
||||
static const sal_Int32 THIRTYTWO_BIT_TC_MASK_ABGR = (sal_Int32)0x10;
|
||||
static const sal_Int32 THIRTYTWO_BIT_TC_MASK_RGBA = (sal_Int32)0x11;
|
||||
static const sal_Int32 MAX = (sal_Int32)0x11;
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA,
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB,
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR,
|
||||
FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA,
|
||||
FORMAT_MAX = FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA
|
||||
};
|
||||
|
||||
const char *formatName(sal_Int32 nScanlineFormat);
|
||||
} }
|
||||
const char *formatName(Format nScanlineFormat);
|
||||
|
||||
}
|
||||
|
||||
#endif /* INCLUDED_BASEBMP_SCANLINEFORMATS_HXX */
|
||||
|
||||
|
@@ -227,7 +227,7 @@ public:
|
||||
sal_uLong nSalFrameStyle,
|
||||
SystemParentData *pSysParent )
|
||||
: SvpSalFrame( pInstance, pParent, nSalFrameStyle,
|
||||
true, basebmp::Format::THIRTYTWO_BIT_TC_MASK_RGBA,
|
||||
true, basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA,
|
||||
pSysParent )
|
||||
{
|
||||
enableDamageTracker();
|
||||
|
@@ -842,14 +842,14 @@ bool SvpSalGraphics::CheckContext()
|
||||
" bufferSize=(" << bufferSize.getX() << "," << bufferSize.getY() << ")" );
|
||||
|
||||
switch( m_aDevice->getScanlineFormat() ) {
|
||||
case basebmp::Format::EIGHT_BIT_PAL:
|
||||
case basebmp::FORMAT_EIGHT_BIT_PAL:
|
||||
mrContext = CGBitmapContextCreate(pixelBuffer.get(),
|
||||
bufferSize.getX(), bufferSize.getY(),
|
||||
8, scanlineStride,
|
||||
CGColorSpaceCreateDeviceGray(),
|
||||
kCGImageAlphaNone);
|
||||
break;
|
||||
case basebmp::Format::THIRTYTWO_BIT_TC_MASK_RGBA:
|
||||
case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA:
|
||||
mrContext = CGBitmapContextCreate(pixelBuffer.get(),
|
||||
bufferSize.getX(), bufferSize.getY(),
|
||||
8, scanlineStride,
|
||||
@@ -857,7 +857,7 @@ bool SvpSalGraphics::CheckContext()
|
||||
kCGImageAlphaNoneSkipLast);
|
||||
break;
|
||||
default:
|
||||
SAL_INFO( "vcl.ios", "CheckContext: unsupported color format " << basebmp::Format::formatName( m_aDevice->getScanlineFormat() ) );
|
||||
SAL_INFO( "vcl.ios", "CheckContext: unsupported color format " << basebmp::formatName( m_aDevice->getScanlineFormat() ) );
|
||||
}
|
||||
|
||||
SAL_WARN_IF( mrContext == NULL, "vcl.ios", "CheckContext() failed" );
|
||||
|
@@ -38,23 +38,23 @@ bool SvpSalBitmap::Create( const Size& rSize,
|
||||
sal_uInt16 nBitCount,
|
||||
const BitmapPalette& rPalette )
|
||||
{
|
||||
sal_uInt32 nFormat = SVP_DEFAULT_BITMAP_FORMAT;
|
||||
basebmp::Format nFormat = SVP_DEFAULT_BITMAP_FORMAT;
|
||||
SAL_INFO( "vcl.headless", "SvpSalBitmap::Create(" << rSize.Width() << "," << rSize.Height() << "," << nBitCount << ")" );
|
||||
switch( nBitCount )
|
||||
{
|
||||
case 1: nFormat = Format::ONE_BIT_MSB_PAL; break;
|
||||
case 4: nFormat = Format::FOUR_BIT_MSB_PAL; break;
|
||||
case 8: nFormat = Format::EIGHT_BIT_PAL; break;
|
||||
case 1: nFormat = FORMAT_ONE_BIT_MSB_PAL; break;
|
||||
case 4: nFormat = FORMAT_FOUR_BIT_MSB_PAL; break;
|
||||
case 8: nFormat = FORMAT_EIGHT_BIT_PAL; break;
|
||||
#ifdef OSL_BIGENDIAN
|
||||
case 16: nFormat = Format::SIXTEEN_BIT_MSB_TC_MASK; break;
|
||||
case 16: nFormat = FORMAT_SIXTEEN_BIT_MSB_TC_MASK; break;
|
||||
#else
|
||||
case 16: nFormat = Format::SIXTEEN_BIT_LSB_TC_MASK; break;
|
||||
case 16: nFormat = FORMAT_SIXTEEN_BIT_LSB_TC_MASK; break;
|
||||
#endif
|
||||
case 24: nFormat = Format::TWENTYFOUR_BIT_TC_MASK; break;
|
||||
case 24: nFormat = FORMAT_TWENTYFOUR_BIT_TC_MASK; break;
|
||||
#if defined(ANDROID) || defined(IOS)
|
||||
case 32: nFormat = Format::THIRTYTWO_BIT_TC_MASK_RGBA; break;
|
||||
case 32: nFormat = FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA; break;
|
||||
#else
|
||||
case 32: nFormat = Format::THIRTYTWO_BIT_TC_MASK_BGRA; break;
|
||||
case 32: nFormat = FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA; break;
|
||||
#endif
|
||||
}
|
||||
B2IVector aSize( rSize.Width(), rSize.Height() );
|
||||
@@ -152,49 +152,49 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool )
|
||||
sal_uInt16 nBitCount = 1;
|
||||
switch( m_aBitmap->getScanlineFormat() )
|
||||
{
|
||||
case Format::ONE_BIT_MSB_GREY:
|
||||
case Format::ONE_BIT_MSB_PAL:
|
||||
case FORMAT_ONE_BIT_MSB_GREY:
|
||||
case FORMAT_ONE_BIT_MSB_PAL:
|
||||
nBitCount = 1;
|
||||
pBuf->mnFormat = BMP_FORMAT_1BIT_MSB_PAL;
|
||||
break;
|
||||
case Format::ONE_BIT_LSB_GREY:
|
||||
case Format::ONE_BIT_LSB_PAL:
|
||||
case FORMAT_ONE_BIT_LSB_GREY:
|
||||
case FORMAT_ONE_BIT_LSB_PAL:
|
||||
nBitCount = 1;
|
||||
pBuf->mnFormat = BMP_FORMAT_1BIT_LSB_PAL;
|
||||
break;
|
||||
case Format::FOUR_BIT_MSB_GREY:
|
||||
case Format::FOUR_BIT_MSB_PAL:
|
||||
case FORMAT_FOUR_BIT_MSB_GREY:
|
||||
case FORMAT_FOUR_BIT_MSB_PAL:
|
||||
nBitCount = 4;
|
||||
pBuf->mnFormat = BMP_FORMAT_4BIT_MSN_PAL;
|
||||
break;
|
||||
case Format::FOUR_BIT_LSB_GREY:
|
||||
case Format::FOUR_BIT_LSB_PAL:
|
||||
case FORMAT_FOUR_BIT_LSB_GREY:
|
||||
case FORMAT_FOUR_BIT_LSB_PAL:
|
||||
nBitCount = 4;
|
||||
pBuf->mnFormat = BMP_FORMAT_4BIT_LSN_PAL;
|
||||
break;
|
||||
case Format::EIGHT_BIT_PAL:
|
||||
case FORMAT_EIGHT_BIT_PAL:
|
||||
nBitCount = 8;
|
||||
pBuf->mnFormat = BMP_FORMAT_8BIT_PAL;
|
||||
break;
|
||||
case Format::EIGHT_BIT_GREY:
|
||||
case FORMAT_EIGHT_BIT_GREY:
|
||||
nBitCount = 8;
|
||||
pBuf->mnFormat = BMP_FORMAT_8BIT_PAL;
|
||||
break;
|
||||
case Format::SIXTEEN_BIT_LSB_TC_MASK:
|
||||
case FORMAT_SIXTEEN_BIT_LSB_TC_MASK:
|
||||
nBitCount = 16;
|
||||
pBuf->mnFormat = BMP_FORMAT_16BIT_TC_LSB_MASK;
|
||||
pBuf->maColorMask = ColorMask( 0xf800, 0x07e0, 0x001f );
|
||||
break;
|
||||
case Format::SIXTEEN_BIT_MSB_TC_MASK:
|
||||
case FORMAT_SIXTEEN_BIT_MSB_TC_MASK:
|
||||
nBitCount = 16;
|
||||
pBuf->mnFormat = BMP_FORMAT_16BIT_TC_MSB_MASK;
|
||||
pBuf->maColorMask = ColorMask( 0xf800, 0x07e0, 0x001f );
|
||||
break;
|
||||
case Format::TWENTYFOUR_BIT_TC_MASK:
|
||||
case FORMAT_TWENTYFOUR_BIT_TC_MASK:
|
||||
nBitCount = 24;
|
||||
pBuf->mnFormat = BMP_FORMAT_24BIT_TC_BGR;
|
||||
break;
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_BGRA:
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA:
|
||||
nBitCount = 32;
|
||||
pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK;
|
||||
#ifdef OSL_BIGENDIAN
|
||||
@@ -203,7 +203,7 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool )
|
||||
pBuf->maColorMask = ColorMask( 0x00ff0000, 0x0000ff00, 0x000000ff );
|
||||
#endif
|
||||
break;
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_ARGB:
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB:
|
||||
nBitCount = 32;
|
||||
pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK;
|
||||
#ifdef OSL_BIGENDIAN
|
||||
@@ -212,7 +212,7 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool )
|
||||
pBuf->maColorMask = ColorMask( 0x0000ff00, 0x00ff0000, 0xff000000 );
|
||||
#endif
|
||||
break;
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_ABGR:
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR:
|
||||
nBitCount = 32;
|
||||
pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK;
|
||||
#ifdef OSL_BIGENDIAN
|
||||
@@ -221,7 +221,7 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool )
|
||||
pBuf->maColorMask = ColorMask( 0xff000000, 0x00ff0000, 0x0000ff00 );
|
||||
#endif
|
||||
break;
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_RGBA:
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA:
|
||||
nBitCount = 32;
|
||||
pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK;
|
||||
#ifdef OSL_BIGENDIAN
|
||||
@@ -248,11 +248,11 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool )
|
||||
pBuf->mpBits = (sal_uInt8*)m_aBitmap->getBuffer().get();
|
||||
if( nBitCount <= 8 )
|
||||
{
|
||||
if( m_aBitmap->getScanlineFormat() == Format::EIGHT_BIT_GREY ||
|
||||
m_aBitmap->getScanlineFormat() == Format::FOUR_BIT_LSB_GREY ||
|
||||
m_aBitmap->getScanlineFormat() == Format::FOUR_BIT_MSB_GREY ||
|
||||
m_aBitmap->getScanlineFormat() == Format::ONE_BIT_LSB_GREY ||
|
||||
m_aBitmap->getScanlineFormat() == Format::ONE_BIT_MSB_GREY
|
||||
if( m_aBitmap->getScanlineFormat() == FORMAT_EIGHT_BIT_GREY ||
|
||||
m_aBitmap->getScanlineFormat() == FORMAT_FOUR_BIT_LSB_GREY ||
|
||||
m_aBitmap->getScanlineFormat() == FORMAT_FOUR_BIT_MSB_GREY ||
|
||||
m_aBitmap->getScanlineFormat() == FORMAT_ONE_BIT_LSB_GREY ||
|
||||
m_aBitmap->getScanlineFormat() == FORMAT_ONE_BIT_MSB_GREY
|
||||
)
|
||||
pBuf->maPalette = Bitmap::GetGreyPalette( 1U << nBitCount );
|
||||
else
|
||||
@@ -287,29 +287,29 @@ void SvpSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly )
|
||||
sal_uInt16 nBitCount = 0;
|
||||
switch( m_aBitmap->getScanlineFormat() )
|
||||
{
|
||||
case Format::ONE_BIT_MSB_GREY:
|
||||
case FORMAT_ONE_BIT_MSB_GREY:
|
||||
// FALLTHROUGH intended
|
||||
case Format::ONE_BIT_MSB_PAL:
|
||||
case FORMAT_ONE_BIT_MSB_PAL:
|
||||
// FALLTHROUGH intended
|
||||
case Format::ONE_BIT_LSB_GREY:
|
||||
case FORMAT_ONE_BIT_LSB_GREY:
|
||||
// FALLTHROUGH intended
|
||||
case Format::ONE_BIT_LSB_PAL:
|
||||
case FORMAT_ONE_BIT_LSB_PAL:
|
||||
nBitCount = 1;
|
||||
break;
|
||||
|
||||
case Format::FOUR_BIT_MSB_GREY:
|
||||
case FORMAT_FOUR_BIT_MSB_GREY:
|
||||
// FALLTHROUGH intended
|
||||
case Format::FOUR_BIT_MSB_PAL:
|
||||
case FORMAT_FOUR_BIT_MSB_PAL:
|
||||
// FALLTHROUGH intended
|
||||
case Format::FOUR_BIT_LSB_GREY:
|
||||
case FORMAT_FOUR_BIT_LSB_GREY:
|
||||
// FALLTHROUGH intended
|
||||
case Format::FOUR_BIT_LSB_PAL:
|
||||
case FORMAT_FOUR_BIT_LSB_PAL:
|
||||
nBitCount = 4;
|
||||
break;
|
||||
|
||||
case Format::EIGHT_BIT_PAL:
|
||||
case FORMAT_EIGHT_BIT_PAL:
|
||||
// FALLTHROUGH intended
|
||||
case Format::EIGHT_BIT_GREY:
|
||||
case FORMAT_EIGHT_BIT_GREY:
|
||||
nBitCount = 8;
|
||||
break;
|
||||
|
||||
@@ -349,38 +349,38 @@ bool SvpSalBitmap::GetSystemData( BitmapSystemData& )
|
||||
return false;
|
||||
}
|
||||
|
||||
sal_uInt32 SvpSalBitmap::getBitCountFromScanlineFormat( sal_Int32 nFormat )
|
||||
sal_uInt32 SvpSalBitmap::getBitCountFromScanlineFormat( basebmp::Format nFormat )
|
||||
{
|
||||
sal_uInt32 nBitCount = 1;
|
||||
switch( nFormat )
|
||||
{
|
||||
case Format::ONE_BIT_MSB_GREY:
|
||||
case Format::ONE_BIT_LSB_GREY:
|
||||
case Format::ONE_BIT_MSB_PAL:
|
||||
case Format::ONE_BIT_LSB_PAL:
|
||||
case FORMAT_ONE_BIT_MSB_GREY:
|
||||
case FORMAT_ONE_BIT_LSB_GREY:
|
||||
case FORMAT_ONE_BIT_MSB_PAL:
|
||||
case FORMAT_ONE_BIT_LSB_PAL:
|
||||
nBitCount = 1;
|
||||
break;
|
||||
case Format::FOUR_BIT_MSB_GREY:
|
||||
case Format::FOUR_BIT_LSB_GREY:
|
||||
case Format::FOUR_BIT_MSB_PAL:
|
||||
case Format::FOUR_BIT_LSB_PAL:
|
||||
case FORMAT_FOUR_BIT_MSB_GREY:
|
||||
case FORMAT_FOUR_BIT_LSB_GREY:
|
||||
case FORMAT_FOUR_BIT_MSB_PAL:
|
||||
case FORMAT_FOUR_BIT_LSB_PAL:
|
||||
nBitCount = 4;
|
||||
break;
|
||||
case Format::EIGHT_BIT_PAL:
|
||||
case Format::EIGHT_BIT_GREY:
|
||||
case FORMAT_EIGHT_BIT_PAL:
|
||||
case FORMAT_EIGHT_BIT_GREY:
|
||||
nBitCount = 8;
|
||||
break;
|
||||
case Format::SIXTEEN_BIT_LSB_TC_MASK:
|
||||
case Format::SIXTEEN_BIT_MSB_TC_MASK:
|
||||
case FORMAT_SIXTEEN_BIT_LSB_TC_MASK:
|
||||
case FORMAT_SIXTEEN_BIT_MSB_TC_MASK:
|
||||
nBitCount = 16;
|
||||
break;
|
||||
case Format::TWENTYFOUR_BIT_TC_MASK:
|
||||
case FORMAT_TWENTYFOUR_BIT_TC_MASK:
|
||||
nBitCount = 24;
|
||||
break;
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_BGRA:
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_ARGB:
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_ABGR:
|
||||
case Format::THIRTYTWO_BIT_TC_MASK_RGBA:
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA:
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB:
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR:
|
||||
case FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA:
|
||||
nBitCount = 32;
|
||||
break;
|
||||
default:
|
||||
|
@@ -65,7 +65,7 @@ SvpSalFrame::SvpSalFrame( SvpSalInstance* pInstance,
|
||||
SalFrame* pParent,
|
||||
sal_uLong nSalFrameStyle,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat,
|
||||
basebmp::Format nScanlineFormat,
|
||||
SystemParentData* ) :
|
||||
m_pInstance( pInstance ),
|
||||
m_pParent( static_cast<SvpSalFrame*>(pParent) ),
|
||||
|
@@ -95,7 +95,7 @@ SvpSalGraphics::SvpSalGraphics() :
|
||||
m_aFillColor( COL_WHITE ),
|
||||
m_aDrawMode( basebmp::DrawMode_PAINT ),
|
||||
m_aTextColor( COL_BLACK ),
|
||||
m_eTextFmt( basebmp::Format::EIGHT_BIT_GREY ),
|
||||
m_eTextFmt( basebmp::FORMAT_EIGHT_BIT_GREY ),
|
||||
m_bClipSetup( false )
|
||||
{
|
||||
for( int i = 0; i < MAX_FALLBACK; ++i )
|
||||
@@ -115,22 +115,22 @@ void SvpSalGraphics::setDevice( basebmp::BitmapDeviceSharedPtr& rDevice )
|
||||
|
||||
#ifndef IOS
|
||||
// determine matching bitmap format for masks
|
||||
sal_uInt32 nDeviceFmt = m_aDevice->getScanlineFormat();
|
||||
DBG_ASSERT( (nDeviceFmt <= (sal_uInt32)basebmp::Format::MAX), "SVP::setDevice() with invalid bitmap format" );
|
||||
basebmp::Format nDeviceFmt = m_aDevice->getScanlineFormat();
|
||||
DBG_ASSERT( (nDeviceFmt <= (sal_uInt32)basebmp::FORMAT_MAX), "SVP::setDevice() with invalid bitmap format" );
|
||||
switch( nDeviceFmt )
|
||||
{
|
||||
case basebmp::Format::EIGHT_BIT_GREY:
|
||||
case basebmp::Format::SIXTEEN_BIT_LSB_TC_MASK:
|
||||
case basebmp::Format::SIXTEEN_BIT_MSB_TC_MASK:
|
||||
case basebmp::Format::TWENTYFOUR_BIT_TC_MASK:
|
||||
case basebmp::Format::THIRTYTWO_BIT_TC_MASK_BGRA:
|
||||
case basebmp::Format::THIRTYTWO_BIT_TC_MASK_ARGB:
|
||||
case basebmp::Format::THIRTYTWO_BIT_TC_MASK_ABGR:
|
||||
case basebmp::Format::THIRTYTWO_BIT_TC_MASK_RGBA:
|
||||
m_eTextFmt = basebmp::Format::EIGHT_BIT_GREY;
|
||||
case basebmp::FORMAT_EIGHT_BIT_GREY:
|
||||
case basebmp::FORMAT_SIXTEEN_BIT_LSB_TC_MASK:
|
||||
case basebmp::FORMAT_SIXTEEN_BIT_MSB_TC_MASK:
|
||||
case basebmp::FORMAT_TWENTYFOUR_BIT_TC_MASK:
|
||||
case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA:
|
||||
case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB:
|
||||
case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR:
|
||||
case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA:
|
||||
m_eTextFmt = basebmp::FORMAT_EIGHT_BIT_GREY;
|
||||
break;
|
||||
default:
|
||||
m_eTextFmt = basebmp::Format::ONE_BIT_LSB_GREY;
|
||||
m_eTextFmt = basebmp::FORMAT_ONE_BIT_LSB_GREY;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@@ -173,7 +173,7 @@ void SvpSalGraphics::ensureClip()
|
||||
|
||||
m_aDevice = m_aOrigDevice;
|
||||
basegfx::B2IVector aSize = m_aDevice->getSize();
|
||||
m_aClipMap = basebmp::createBitmapDevice( aSize, false, basebmp::Format::ONE_BIT_MSB_GREY );
|
||||
m_aClipMap = basebmp::createBitmapDevice( aSize, false, basebmp::FORMAT_ONE_BIT_MSB_GREY );
|
||||
m_aClipMap->clear( basebmp::Color(0xFFFFFFFF) );
|
||||
|
||||
RectangleVector aRectangles;
|
||||
|
@@ -46,7 +46,7 @@ public:
|
||||
SvpGlyphPeer() {}
|
||||
|
||||
BitmapDeviceSharedPtr GetGlyphBmp( ServerFont&, int nGlyphIndex,
|
||||
sal_uInt32 nBmpFormat, B2IPoint& rTargetPos );
|
||||
basebmp::Format nBmpFormat, B2IPoint& rTargetPos );
|
||||
|
||||
protected:
|
||||
virtual void RemovingFont( ServerFont& );
|
||||
@@ -110,15 +110,15 @@ SvpGlyphCache& SvpGlyphCache::GetInstance()
|
||||
|
||||
|
||||
BitmapDeviceSharedPtr SvpGlyphPeer::GetGlyphBmp( ServerFont& rServerFont,
|
||||
int nGlyphIndex, sal_uInt32 nBmpFormat, B2IPoint& rTargetPos )
|
||||
int nGlyphIndex, basebmp::Format nBmpFormat, B2IPoint& rTargetPos )
|
||||
{
|
||||
GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex );
|
||||
SvpGcpHelper* pGcpHelper = (SvpGcpHelper*)rGlyphData.ExtDataRef().mpData;
|
||||
|
||||
// nothing to do if the GlyphPeer hasn't allocated resources for the glyph
|
||||
if( rGlyphData.ExtDataRef().meInfo != sal::static_int_cast<int>(nBmpFormat) )
|
||||
if( rGlyphData.ExtDataRef().meInfo != nBmpFormat )
|
||||
{
|
||||
if( rGlyphData.ExtDataRef().meInfo == Format::NONE )
|
||||
if( rGlyphData.ExtDataRef().meInfo == FORMAT_NONE )
|
||||
pGcpHelper = new SvpGcpHelper;
|
||||
RawBitmap& rRawBitmap = pGcpHelper->maRawBitmap;
|
||||
|
||||
@@ -126,16 +126,16 @@ BitmapDeviceSharedPtr SvpGlyphPeer::GetGlyphBmp( ServerFont& rServerFont,
|
||||
bool bFound = false;
|
||||
switch( nBmpFormat )
|
||||
{
|
||||
case Format::ONE_BIT_LSB_GREY:
|
||||
case FORMAT_ONE_BIT_LSB_GREY:
|
||||
bFound = rServerFont.GetGlyphBitmap1( nGlyphIndex, pGcpHelper->maRawBitmap );
|
||||
break;
|
||||
case Format::EIGHT_BIT_GREY:
|
||||
case FORMAT_EIGHT_BIT_GREY:
|
||||
bFound = rServerFont.GetGlyphBitmap8( nGlyphIndex, pGcpHelper->maRawBitmap );
|
||||
break;
|
||||
default:
|
||||
OSL_FAIL( "SVP GCP::GetGlyphBmp(): illegal scanline format");
|
||||
// fall back to black&white mask
|
||||
nBmpFormat = Format::ONE_BIT_LSB_GREY;
|
||||
nBmpFormat = FORMAT_ONE_BIT_LSB_GREY;
|
||||
bFound = false;
|
||||
break;
|
||||
}
|
||||
@@ -172,10 +172,10 @@ void SvpGlyphPeer::RemovingFont( ServerFont& )
|
||||
|
||||
void SvpGlyphPeer::RemovingGlyph( ServerFont&, GlyphData& rGlyphData, int /*nGlyphIndex*/ )
|
||||
{
|
||||
if( rGlyphData.ExtDataRef().mpData != Format::NONE )
|
||||
if( rGlyphData.ExtDataRef().mpData != 0 )
|
||||
{
|
||||
// release the glyph related resources
|
||||
DBG_ASSERT( (rGlyphData.ExtDataRef().meInfo <= Format::MAX), "SVP::RG() invalid alpha format" );
|
||||
DBG_ASSERT( (rGlyphData.ExtDataRef().meInfo <= FORMAT_MAX), "SVP::RG() invalid alpha format" );
|
||||
SvpGcpHelper* pGcpHelper = (SvpGcpHelper*)rGlyphData.ExtDataRef().mpData;
|
||||
delete[] pGcpHelper->maRawBitmap.mpBits;
|
||||
delete pGcpHelper;
|
||||
|
@@ -61,28 +61,28 @@ sal_Bool SvpSalVirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY, cons
|
||||
aDevSize.setY( 1 );
|
||||
if( ! m_aDevice.get() || m_aDevice->getSize() != aDevSize )
|
||||
{
|
||||
sal_uInt32 nFormat = SVP_DEFAULT_BITMAP_FORMAT;
|
||||
basebmp::Format nFormat = SVP_DEFAULT_BITMAP_FORMAT;
|
||||
std::vector< basebmp::Color > aDevPal;
|
||||
switch( m_nBitCount )
|
||||
{
|
||||
case 1: nFormat = Format::ONE_BIT_MSB_PAL;
|
||||
case 1: nFormat = FORMAT_ONE_BIT_MSB_PAL;
|
||||
aDevPal.reserve(2);
|
||||
aDevPal.push_back( basebmp::Color( 0, 0, 0 ) );
|
||||
aDevPal.push_back( basebmp::Color( 0xff, 0xff, 0xff ) );
|
||||
break;
|
||||
case 4: nFormat = Format::FOUR_BIT_MSB_PAL; break;
|
||||
case 8: nFormat = Format::EIGHT_BIT_PAL; break;
|
||||
case 4: nFormat = FORMAT_FOUR_BIT_MSB_PAL; break;
|
||||
case 8: nFormat = FORMAT_EIGHT_BIT_PAL; break;
|
||||
#ifdef OSL_BIGENDIAN
|
||||
case 16: nFormat = Format::SIXTEEN_BIT_MSB_TC_MASK; break;
|
||||
case 16: nFormat = FORMAT_SIXTEEN_BIT_MSB_TC_MASK; break;
|
||||
#else
|
||||
case 16: nFormat = Format::SIXTEEN_BIT_LSB_TC_MASK; break;
|
||||
case 16: nFormat = FORMAT_SIXTEEN_BIT_LSB_TC_MASK; break;
|
||||
#endif
|
||||
case 24: nFormat = Format::TWENTYFOUR_BIT_TC_MASK; break;
|
||||
case 32: nFormat = Format::THIRTYTWO_BIT_TC_MASK_BGRA; break;
|
||||
case 24: nFormat = FORMAT_TWENTYFOUR_BIT_TC_MASK; break;
|
||||
case 32: nFormat = FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA; break;
|
||||
#if defined(ANDROID) || defined(IOS)
|
||||
case 0: nFormat = Format::THIRTYTWO_BIT_TC_MASK_RGBA; break;
|
||||
case 0: nFormat = FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA; break;
|
||||
#else
|
||||
case 0: nFormat = Format::TWENTYFOUR_BIT_TC_MASK; break;
|
||||
case 0: nFormat = FORMAT_TWENTYFOUR_BIT_TC_MASK; break;
|
||||
#endif
|
||||
}
|
||||
m_aDevice = aDevPal.empty()
|
||||
|
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <salbmp.hxx>
|
||||
|
||||
#define SVP_DEFAULT_BITMAP_FORMAT basebmp::Format::TWENTYFOUR_BIT_TC_MASK
|
||||
#define SVP_DEFAULT_BITMAP_FORMAT basebmp::FORMAT_TWENTYFOUR_BIT_TC_MASK
|
||||
|
||||
class SvpSalBitmap : public SalBitmap
|
||||
{
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
|
||||
virtual bool GetSystemData( BitmapSystemData& rData );
|
||||
|
||||
static sal_uInt32 getBitCountFromScanlineFormat( sal_Int32 nFormat );
|
||||
static sal_uInt32 getBitCountFromScanlineFormat( basebmp::Format nFormat );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -43,7 +43,7 @@ class SvpSalFrame : public SalFrame
|
||||
bool m_bVisible;
|
||||
bool m_bDamageTracking;
|
||||
bool m_bTopDown;
|
||||
sal_Int32 m_nScanlineFormat;
|
||||
basebmp::Format m_nScanlineFormat;
|
||||
long m_nMinWidth;
|
||||
long m_nMinHeight;
|
||||
long m_nMaxWidth;
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
SalFrame* pParent,
|
||||
sal_uLong nSalFrameStyle,
|
||||
bool bTopDown,
|
||||
sal_Int32 nScanlineFormat,
|
||||
basebmp::Format nScanlineFormat,
|
||||
SystemParentData* pSystemParent = NULL );
|
||||
virtual ~SvpSalFrame();
|
||||
|
||||
|
@@ -60,7 +60,7 @@ class SvpSalGraphics : public SalGraphics
|
||||
// headless backend, i.e. not on iOS.
|
||||
basebmp::Color m_aTextColor;
|
||||
ServerFont* m_pServerFont[ MAX_FALLBACK ];
|
||||
sal_uInt32 m_eTextFmt;
|
||||
basebmp::Format m_eTextFmt;
|
||||
#endif
|
||||
|
||||
basebmp::BitmapDeviceSharedPtr m_aClipMap;
|
||||
|
@@ -152,7 +152,7 @@ public:
|
||||
sal_uLong nSalFrameStyle,
|
||||
SystemParentData *pSysParent )
|
||||
: SvpSalFrame( pInstance, pParent, nSalFrameStyle,
|
||||
true, basebmp::Format::THIRTYTWO_BIT_TC_MASK_RGBA,
|
||||
true, basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA,
|
||||
pSysParent )
|
||||
{
|
||||
enableDamageTracker();
|
||||
|
@@ -1778,7 +1778,7 @@ void GtkSalFrame::AllocateFrame()
|
||||
if( aFrameSize.getY() == 0 )
|
||||
aFrameSize.setY( 1 );
|
||||
m_aFrame = basebmp::createBitmapDevice( aFrameSize, true,
|
||||
basebmp::Format::TWENTYFOUR_BIT_TC_MASK );
|
||||
basebmp::FORMAT_TWENTYFOUR_BIT_TC_MASK );
|
||||
m_aFrame->setDamageTracker(
|
||||
basebmp::IBitmapDeviceDamageTrackerSharedPtr(new DamageTracker(*this)) );
|
||||
fprintf( stderr, "allocated m_aFrame size of %dx%d \n",
|
||||
|
Reference in New Issue
Block a user