LibreOffice Module vcl (master)  1
Classes | Typedefs | Functions
vcl::bitmap Namespace Reference

Classes

class  RawBitmap
 Intended to be used to feed into CreateFromData to create a BitmapEx. More...
 
class  ScanlineTransformer
 
class  ScanlineTransformer_1BitPalette
 
class  ScanlineTransformer_4BitPalette
 
class  ScanlineTransformer_8BitPalette
 
class  ScanlineTransformer_ARGB
 
class  ScanlineTransformer_BGR
 

Typedefs

typedef std::array< std::array< sal_uInt8, 256 >, 256 > lookup_table
 

Functions

BitmapEx loadFromName (const OUString &rFileName, const ImageLoadFlags eFlags)
 
void loadFromSvg (SvStream &rStream, const OUString &sPath, BitmapEx &rBitmapEx, double fScalingFactor)
 
BitmapEx CreateFromData (sal_uInt8 const *pData, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int32 nStride, vcl::PixelFormat ePixelFormat, bool bReversColors)
 Copy block of image data into the bitmap. More...
 
BitmapEx CreateFromData (RawBitmap &&rawBitmap)
 Copy block of image data into the bitmap. More...
 
BitmapEx CanvasTransformBitmap (const BitmapEx &rBitmap, const ::basegfx::B2DHomMatrix &rTransform,::basegfx::B2DRectangle const &rDestRect,::basegfx::B2DHomMatrix const &rLocalTransform)
 
void DrawAlphaBitmapAndAlphaGradient (BitmapEx &rBitmapEx, bool bFixedTransparence, float fTransparence, AlphaMask &rNewMask)
 
void DrawAndClipBitmap (const Point &rPos, const Size &rSize, const BitmapEx &rBitmap, BitmapEx &aBmpEx, basegfx::B2DPolyPolygon const &rClipPath)
 
css::uno::Sequence< sal_Int8GetMaskDIB (BitmapEx const &aBmpEx)
 
static bool readAlpha (BitmapReadAccess const *pAlphaReadAcc, tools::Long nY, const tools::Long nWidth, unsigned char *data, tools::Long nOff)
 
void CanvasCairoExtractBitmapData (BitmapEx const &rBmpEx, Bitmap &rBitmap, unsigned char *&data, bool &bHasAlpha, tools::Long &rnWidth, tools::Long &rnHeight)
 
uno::Sequence< sal_Int8CanvasExtractBitmapData (BitmapEx const &rBitmapEx, const geometry::IntegerRectangle2D &rect)
 
BitmapEx createHistorical8x8FromArray (std::array< sal_uInt8, 64 > const &pArray, Color aColorPix, Color aColorBack)
 
bool isHistorical8x8 (const BitmapEx &rBitmapEx, Color &o_rBack, Color &o_rFront)
 
sal_uInt8 unpremultiply (sal_uInt8 c, sal_uInt8 a)
 
static constexpr sal_uInt8 unpremultiplyImpl (sal_uInt8 c, sal_uInt8 a)
 
sal_uInt8 premultiply (sal_uInt8 c, sal_uInt8 a)
 
static constexpr sal_uInt8 premultiplyImpl (sal_uInt8 c, sal_uInt8 a)
 
template<int... Is>
static constexpr std::array< sal_uInt8, 256 > make_unpremultiply_table_row_ (int a, std::integer_sequence< int, Is... >)
 
template<int... Is>
static constexpr lookup_table make_unpremultiply_table_ (std::integer_sequence< int, Is... >)
 
lookup_table const & get_unpremultiply_table ()
 
template<int... Is>
static constexpr std::array< sal_uInt8, 256 > make_premultiply_table_row_ (int a, std::integer_sequence< int, Is... >)
 
template<int... Is>
static constexpr lookup_table make_premultiply_table_ (std::integer_sequence< int, Is... >)
 
lookup_table const & get_premultiply_table ()
 
bool convertBitmap32To24Plus8 (BitmapEx const &rInput, BitmapEx &rResult)
 
std::unique_ptr< ScanlineTransformergetScanlineTransformer (sal_uInt16 nBits, const BitmapPalette &rPalette)
 
template<int STRIP_SIZE>
void generateStripRanges (tools::Long nFirst, tools::Long nLast, std::function< void(tools::Long const nStart, tools::Long const nEnd, bool const bLast)> aFunction)
 
VCL_DLLPUBLIC css::uno::Sequence< sal_Int8CanvasExtractBitmapData (BitmapEx const &rBitmapEx, const css::geometry::IntegerRectangle2D &rect)
 

Typedef Documentation

typedef std::array<std::array<sal_uInt8, 256>, 256> vcl::bitmap::lookup_table

Definition at line 29 of file BitmapTools.hxx.

Function Documentation

VCL_DLLPUBLIC void vcl::bitmap::CanvasCairoExtractBitmapData ( BitmapEx const &  aBmpEx,
Bitmap aBitmap,
unsigned char *&  data,
bool &  bHasAlpha,
tools::Long rnWidth,
tools::Long rnHeight 
)
VCL_DLLPUBLIC css::uno::Sequence< sal_Int8 > vcl::bitmap::CanvasExtractBitmapData ( BitmapEx const &  rBitmapEx,
const css::geometry::IntegerRectangle2D &  rect 
)
uno::Sequence< sal_Int8 > vcl::bitmap::CanvasExtractBitmapData ( BitmapEx const &  rBitmapEx,
const geometry::IntegerRectangle2D &  rect 
)

Definition at line 893 of file BitmapTools.cxx.

References BitmapEx::GetAlpha(), AlphaMask::GetBitmap(), BitmapEx::GetBitmap(), x, and y.

VCL_DLLPUBLIC BitmapEx vcl::bitmap::CanvasTransformBitmap ( const BitmapEx rBitmap,
const ::basegfx::B2DHomMatrix rTransform,
::basegfx::B2DRectangle const &  rDestRect,
::basegfx::B2DHomMatrix const &  rLocalTransform 
)
VCL_DLLPUBLIC bool vcl::bitmap::convertBitmap32To24Plus8 ( BitmapEx const &  rInput,
BitmapEx rResult 
)
BitmapEx VCL_DLLPUBLIC vcl::bitmap::CreateFromData ( sal_uInt8 const *  pData,
sal_Int32  nWidth,
sal_Int32  nHeight,
sal_Int32  nStride,
vcl::PixelFormat  ePixelFormat,
bool  bReversColors 
)

Copy block of image data into the bitmap.

Assumes that the Bitmap has been constructed with the desired size.

Parameters
pDataThe block of data to copy
nStrideThe number of bytes in a scanline, must >= (width * nBitCount / 8)
bReversColorsIn case the endianness of pData is wrong, you could reverse colors

Assumes that the Bitmap has been constructed with the desired size.

Parameters
pDataThe block of data to copy
nStrideThe number of bytes in a scanline, must be >= (width * bitcount / 8)

Definition at line 131 of file BitmapTools.cxx.

References vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::get(), nBitCount, p, vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::reset(), x, and y.

Referenced by ImportEpsGraphic().

BitmapEx VCL_DLLPUBLIC vcl::bitmap::CreateFromData ( RawBitmap &&  rawBitmap)

Copy block of image data into the bitmap.

Assumes that the Bitmap has been constructed with the desired size.

Definition at line 202 of file BitmapTools.cxx.

References vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::get(), vcl::INVALID, vcl::N24_BPP, vcl::N32_BPP, nBitCount, p, vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::reset(), x, and y.

BitmapEx VCL_DLLPUBLIC vcl::bitmap::createHistorical8x8FromArray ( std::array< sal_uInt8, 64 > const &  pArray,
Color  aColorPix,
Color  aColorBack 
)

Definition at line 946 of file BitmapTools.cxx.

References a, vcl::N1_BPP, and pContent.

VCL_DLLPUBLIC void vcl::bitmap::DrawAlphaBitmapAndAlphaGradient ( BitmapEx rBitmapEx,
bool  bFixedTransparence,
float  fTransparence,
AlphaMask rNewMask 
)
VCL_DLLPUBLIC void vcl::bitmap::DrawAndClipBitmap ( const Point &  rPos,
const Size rSize,
const BitmapEx rBitmap,
BitmapEx aBmpEx,
basegfx::B2DPolyPolygon const &  rClipPath 
)
template<int STRIP_SIZE>
void vcl::bitmap::generateStripRanges ( tools::Long  nFirst,
tools::Long  nLast,
std::function< void(tools::Long const nStart, tools::Long const nEnd, bool const bLast)>  aFunction 
)

Definition at line 30 of file BitmapFilter.hxx.

VCL_DLLPUBLIC lookup_table const & vcl::bitmap::get_premultiply_table ( )

Definition at line 1093 of file BitmapTools.cxx.

References make_premultiply_table_().

Referenced by CanvasCairoExtractBitmapData(), and premultiply().

VCL_DLLPUBLIC lookup_table const & vcl::bitmap::get_unpremultiply_table ( )

Definition at line 1074 of file BitmapTools.cxx.

References make_unpremultiply_table_().

Referenced by unpremultiply().

VCL_DLLPUBLIC css::uno::Sequence< sal_Int8 > vcl::bitmap::GetMaskDIB ( BitmapEx const &  aBmpEx)
std::unique_ptr<ScanlineTransformer> vcl::bitmap::getScanlineTransformer ( sal_uInt16  nBits,
const BitmapPalette rPalette 
)

Definition at line 211 of file ScanlineTools.hxx.

bool VCL_DLLPUBLIC vcl::bitmap::isHistorical8x8 ( const BitmapEx rBitmapEx,
Color o_rBack,
Color o_rFront 
)
BitmapEx VCL_DLLPUBLIC vcl::bitmap::loadFromName ( const OUString &  rFileName,
const ImageLoadFlags  eFlags 
)
void vcl::bitmap::loadFromSvg ( SvStream rStream,
const OUString &  sPath,
BitmapEx rBitmapEx,
double  fScalingFactor 
)
template<int... Is>
static constexpr lookup_table vcl::bitmap::make_premultiply_table_ ( std::integer_sequence< int, Is... >  )
static

Definition at line 1087 of file BitmapTools.cxx.

References make_premultiply_table_row_().

Referenced by get_premultiply_table().

template<int... Is>
static constexpr std::array<sal_uInt8, 256> vcl::bitmap::make_premultiply_table_row_ ( int  a,
std::integer_sequence< int, Is... >   
)
static

Definition at line 1081 of file BitmapTools.cxx.

References premultiplyImpl().

Referenced by make_premultiply_table_().

template<int... Is>
static constexpr lookup_table vcl::bitmap::make_unpremultiply_table_ ( std::integer_sequence< int, Is... >  )
static

Definition at line 1068 of file BitmapTools.cxx.

References make_unpremultiply_table_row_().

Referenced by get_unpremultiply_table().

template<int... Is>
static constexpr std::array<sal_uInt8, 256> vcl::bitmap::make_unpremultiply_table_row_ ( int  a,
std::integer_sequence< int, Is... >   
)
static

Definition at line 1062 of file BitmapTools.cxx.

References unpremultiplyImpl().

Referenced by make_unpremultiply_table_().

sal_uInt8 vcl::bitmap::premultiply ( sal_uInt8  c,
sal_uInt8  a 
)
static constexpr sal_uInt8 vcl::bitmap::premultiplyImpl ( sal_uInt8  c,
sal_uInt8  a 
)
static

Definition at line 1057 of file BitmapTools.cxx.

Referenced by make_premultiply_table_row_().

static bool vcl::bitmap::readAlpha ( BitmapReadAccess const *  pAlphaReadAcc,
tools::Long  nY,
const tools::Long  nWidth,
unsigned char *  data,
tools::Long  nOff 
)
static
sal_uInt8 vcl::bitmap::unpremultiply ( sal_uInt8  c,
sal_uInt8  a 
)
static constexpr sal_uInt8 vcl::bitmap::unpremultiplyImpl ( sal_uInt8  c,
sal_uInt8  a 
)
static

Definition at line 1047 of file BitmapTools.cxx.

Referenced by make_unpremultiply_table_row_().