LibreOffice Module vcl (master) 1
|
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, sal_Int8 nBitCount, bool bReversColors, bool bReverseAlpha) |
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_Int8 > | GetMaskDIB (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 &aBmpEx, Bitmap &aBitmap, unsigned char *&data, bool &bHasAlpha, tools::Long &rnWidth, tools::Long &rnHeight) |
uno::Sequence< sal_Int8 > | CanvasExtractBitmapData (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) |
Bitmap | GetDownsampledBitmap (Size const &rDstSizeTwip, Point const &rSrcPt, Size const &rSrcSz, Bitmap const &rBmp, tools::Long nMaxBmpDPIX, tools::Long nMaxBmpDPIY) |
Retrieve downsampled and cropped bitmap. More... | |
std::unique_ptr< ScanlineTransformer > | getScanlineTransformer (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_Int8 > | CanvasExtractBitmapData (BitmapEx const &rBitmapEx, const css::geometry::IntegerRectangle2D &rect) |
typedef std::array<std::array<sal_uInt8, 256>, 256> vcl::bitmap::lookup_table |
Definition at line 32 of file BitmapTools.hxx.
VCL_DLLPUBLIC void vcl::bitmap::CanvasCairoExtractBitmapData | ( | BitmapEx const & | aBmpEx, |
Bitmap & | aBitmap, | ||
unsigned char *& | data, | ||
bool & | bHasAlpha, | ||
tools::Long & | rnWidth, | ||
tools::Long & | rnHeight | ||
) |
data | will be filled with alpha data, if xBitmap is alpha/transparent image |
bHasAlpha | will be set to true if resulting surface has alpha |
Definition at line 706 of file BitmapTools.cxx.
References Bitmap::AcquireReadAccess(), get_premultiply_table(), BitmapEx::GetAlphaMask(), Color::GetBlue(), BitmapReadAccess::GetColor(), Color::GetGreen(), BitmapInfoAccess::GetPaletteColor(), Color::GetRed(), BitmapReadAccess::GetScanline(), BitmapInfoAccess::GetScanlineFormat(), BitmapInfoAccess::Height(), BitmapEx::IsAlpha(), N24BitTcBgr, N24BitTcRgb, N32BitTcBgra, N32BitTcRgba, N8BitPal, premultiply(), readAlpha(), Bitmap::ReleaseAccess(), AlphaMask::ReleaseAccess(), SAL_INFO, and BitmapInfoAccess::Width().
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 1001 of file BitmapTools.cxx.
References Bitmap::AcquireReadAccess(), vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::get(), BitmapEx::GetAlphaMask(), AlphaMask::GetBitmap(), BitmapEx::GetBitmap(), Color::GetBlue(), BitmapReadAccess::GetColor(), Color::GetGreen(), BitmapReadAccess::GetIndexFromData(), Color::GetRed(), BitmapReadAccess::GetScanline(), Bitmap::GetSizePixel(), Size::Height(), Bitmap::IsEmpty(), Size::Width(), x, and y.
VCL_DLLPUBLIC BitmapEx vcl::bitmap::CanvasTransformBitmap | ( | const BitmapEx & | rBitmap, |
const ::basegfx::B2DHomMatrix & | rTransform, | ||
::basegfx::B2DRectangle const & | rDestRect, | ||
::basegfx::B2DHomMatrix const & | rLocalTransform | ||
) |
Definition at line 374 of file BitmapTools.cxx.
References Bitmap::AcquireReadAccess(), ENSURE_OR_THROW, vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::get(), BitmapEx::GetAlphaMask(), AlphaMask::GetBitmap(), BitmapEx::GetBitmap(), basegfx::Range2D< typename TYPE, typename TRAITS >::getHeight(), BitmapInfoAccess::GetPalette(), BitmapReadAccess::GetPixel(), Bitmap::getPixelFormat(), BitmapReadAccess::GetPixelIndex(), BitmapEx::GetSizePixel(), basegfx::Range2D< typename TYPE, typename TRAITS >::getWidth(), basegfx::Tuple2D< typename TYPE >::getX(), basegfx::Tuple2D< typename TYPE >::getY(), Size::Height(), basegfx::B2DHomMatrix::invert(), BitmapEx::IsAlpha(), Size::IsEmpty(), Size::Width(), x, and y.
VCL_DLLPUBLIC bool vcl::bitmap::convertBitmap32To24Plus8 | ( | BitmapEx const & | rInput, |
BitmapEx & | rResult | ||
) |
Definition at line 1199 of file BitmapTools.cxx.
References Color::GetAlpha(), BitmapEx::GetAlphaMask(), BitmapEx::GetBitmap(), Color::GetBlue(), Color::GetGreen(), Bitmap::getPixelFormat(), BitmapReadAccess::GetPixelFromData(), Color::GetRed(), BitmapReadAccess::GetScanline(), Bitmap::GetSizePixel(), Size::Height(), BitmapEx::IsAlpha(), vcl::N24_BPP, vcl::N32_BPP, and Size::Width().
Referenced by vcl::pngWrite().
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 228 of file BitmapTools.cxx.
BitmapEx VCL_DLLPUBLIC vcl::bitmap::CreateFromData | ( | sal_uInt8 const * | pData, |
sal_Int32 | nWidth, | ||
sal_Int32 | nHeight, | ||
sal_Int32 | nStride, | ||
sal_Int8 | nBitCount, | ||
bool | bReversColors, | ||
bool | bReverseAlpha | ||
) |
Copy block of image data into the bitmap.
Assumes that the Bitmap has been constructed with the desired size.
pData | The block of data to copy |
nStride | The number of bytes in a scanline, must >= (width * nBitCount / 8) |
bReversColors | In case the endianness of pData is wrong, you could reverse colors |
Assumes that the Bitmap has been constructed with the desired size.
pData | The block of data to copy |
nStride | The number of bytes in a scanline, must be >= (width * bitcount / 8) |
Definition at line 132 of file BitmapTools.cxx.
References col, COL_BLACK(), COL_WHITE(), vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::get(), vcl::N24_BPP, vcl::N32_BPP, vcl::N8_BPP, nBitCount, nValue, p, pData, vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::reset(), x, and y.
Referenced by ImportEpsGraphic().
BitmapEx VCL_DLLPUBLIC vcl::bitmap::createHistorical8x8FromArray | ( | std::array< sal_uInt8, 64 > const & | pArray, |
Color | aColorPix, | ||
Color | aColorBack | ||
) |
Definition at line 1054 of file BitmapTools.cxx.
References a, and vcl::N8_BPP.
VCL_DLLPUBLIC void vcl::bitmap::DrawAlphaBitmapAndAlphaGradient | ( | BitmapEx & | rBitmapEx, |
bool | bFixedTransparence, | ||
float | fTransparence, | ||
AlphaMask & | rNewMask | ||
) |
Definition at line 518 of file BitmapTools.cxx.
References basegfx::fround(), BitmapEx::GetAlphaMask(), BitmapEx::GetBitmap(), BitmapEx::IsAlpha(), x, and y.
VCL_DLLPUBLIC void vcl::bitmap::DrawAndClipBitmap | ( | const Point & | rPos, |
const Size & | rSize, | ||
const BitmapEx & | rBitmap, | ||
BitmapEx & | aBmpEx, | ||
basegfx::B2DPolyPolygon const & | rClipPath | ||
) |
Definition at line 582 of file BitmapTools.cxx.
References COL_BLACK(), BitmapEx::GetAlphaMask(), BitmapEx::GetBitmap(), BitmapEx::GetSizePixel(), Size::Height(), BitmapEx::IsAlpha(), vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::reset(), MapMode::SetOrigin(), MapMode::SetScaleX(), MapMode::SetScaleY(), Size::Width(), Point::X(), and Point::Y().
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 1191 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 1172 of file BitmapTools.cxx.
References make_unpremultiply_table_().
Referenced by unpremultiply().
VCL_DLLPUBLIC Bitmap vcl::bitmap::GetDownsampledBitmap | ( | Size const & | rDstSizeTwip, |
Point const & | rSrcPt, | ||
Size const & | rSrcSz, | ||
Bitmap const & | rBmp, | ||
tools::Long | nMaxBmpDPIX, | ||
tools::Long | nMaxBmpDPIY | ||
) |
Retrieve downsampled and cropped bitmap.
Takes destination size in twips units.
Definition at line 1239 of file BitmapTools.cxx.
References Bitmap::Crop(), FRound(), Bitmap::GetSizePixel(), Size::Height(), o3tl::in, tools::Rectangle::Intersection(), tools::Rectangle::IsEmpty(), Bitmap::IsEmpty(), Bitmap::Scale(), Bitmap::SetEmpty(), Size::setHeight(), Size::setWidth(), o3tl::twip, and Size::Width().
Referenced by OutputDevice::RemoveTransparenciesFromMetaFile().
VCL_DLLPUBLIC css::uno::Sequence< sal_Int8 > vcl::bitmap::GetMaskDIB | ( | BitmapEx const & | aBmpEx | ) |
Definition at line 650 of file BitmapTools.cxx.
References BitmapEx::GetAlphaMask(), AlphaMask::GetBitmap(), SvMemoryStream::GetData(), BitmapEx::IsAlpha(), SvStream::Tell(), and WriteDIB().
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 | ||
) |
Definition at line 1082 of file BitmapTools.cxx.
References BitmapEx::GetBitmap(), BitmapReadAccess::GetColor(), Color::GetLuminance(), Bitmap::GetSizePixel(), Size::Height(), BitmapInfoAccess::Height(), BitmapEx::IsAlpha(), Size::Width(), BitmapInfoAccess::Width(), x, and y.
BitmapEx VCL_DLLPUBLIC vcl::bitmap::loadFromName | ( | const OUString & | rFileName, |
const ImageLoadFlags | eFlags | ||
) |
Definition at line 52 of file BitmapTools.cxx.
References StyleSettings::DetermineIconTheme(), ImageTree::get(), Application::GetSettings(), AllSettings::GetStyleSettings(), ImageTree::loadImage(), and SAL_WARN_IF.
void vcl::bitmap::loadFromSvg | ( | SvStream & | rStream, |
const OUString & | sPath, | ||
BitmapEx & | rBitmapEx, | ||
double | fScalingFactor | ||
) |
Definition at line 72 of file BitmapTools.cxx.
References aBuffer, aData, vcl::unotools::bitmapExFromXBitmap(), basegfx::Range2D< typename TYPE, typename TRAITS >::expand(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMaxX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMaxY(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinY(), comphelper::getProcessComponentContext(), basegfx::B2DRange::getRange(), SvStream::ReadBytes(), and SvStream::remainingSize().
|
staticconstexpr |
Definition at line 1185 of file BitmapTools.cxx.
References make_premultiply_table_row_().
Referenced by get_premultiply_table().
|
staticconstexpr |
Definition at line 1179 of file BitmapTools.cxx.
References a, and premultiplyImpl().
Referenced by make_premultiply_table_().
|
staticconstexpr |
Definition at line 1166 of file BitmapTools.cxx.
References make_unpremultiply_table_row_().
Referenced by get_unpremultiply_table().
|
staticconstexpr |
Definition at line 1160 of file BitmapTools.cxx.
References a, and unpremultiplyImpl().
Referenced by make_unpremultiply_table_().
VCL_DLLPUBLIC sal_uInt8 vcl::bitmap::premultiply | ( | sal_uInt8 | c, |
sal_uInt8 | a | ||
) |
Definition at line 1150 of file BitmapTools.cxx.
References a, and get_premultiply_table().
Referenced by CanvasCairoExtractBitmapData(), BitmapReadAccess::SetPixelForN32BitTcAbgr(), BitmapReadAccess::SetPixelForN32BitTcArgb(), BitmapReadAccess::SetPixelForN32BitTcBgra(), and BitmapReadAccess::SetPixelForN32BitTcRgba().
|
staticconstexpr |
Definition at line 1155 of file BitmapTools.cxx.
References a.
Referenced by make_premultiply_table_row_().
|
static |
Definition at line 662 of file BitmapTools.cxx.
References BitmapReadAccess::GetColor(), BitmapColor::GetIndex(), BitmapInfoAccess::GetPaletteColor(), BitmapReadAccess::GetScanline(), BitmapInfoAccess::GetScanlineFormat(), N8BitPal, and SAL_INFO.
Referenced by CanvasCairoExtractBitmapData().
VCL_DLLPUBLIC sal_uInt8 vcl::bitmap::unpremultiply | ( | sal_uInt8 | c, |
sal_uInt8 | a | ||
) |
Definition at line 1140 of file BitmapTools.cxx.
References a, and get_unpremultiply_table().
Referenced by BitmapReadAccess::GetPixelForN32BitTcAbgr(), BitmapReadAccess::GetPixelForN32BitTcArgb(), BitmapReadAccess::GetPixelForN32BitTcBgra(), and BitmapReadAccess::GetPixelForN32BitTcRgba().
|
staticconstexpr |
Definition at line 1145 of file BitmapTools.cxx.
References a.
Referenced by make_unpremultiply_table_row_().