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 sal_uInt8(* | lookup_table)[256] |
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_uInt16 nBitCount) |
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 &rBmpEx, Bitmap &rBitmap, 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) |
sal_uInt8 | premultiply (sal_uInt8 c, sal_uInt8 a) |
lookup_table | get_unpremultiply_table () |
lookup_table | get_premultiply_table () |
bool | convertBitmap32To24Plus8 (BitmapEx const &rInput, BitmapEx &rResult) |
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 sal_uInt8(* vcl::bitmap::lookup_table)[256] |
Definition at line 29 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 697 of file BitmapTools.cxx.
References Bitmap::AcquireReadAccess(), get_premultiply_table(), BitmapEx::GetAlpha(), Color::GetBlue(), BitmapReadAccess::GetColor(), Color::GetGreen(), BitmapInfoAccess::GetPaletteColor(), Color::GetRed(), BitmapReadAccess::GetScanline(), BitmapInfoAccess::GetScanlineFormat(), BitmapInfoAccess::Height(), BitmapEx::IsAlpha(), BitmapEx::IsTransparent(), N24BitTcBgr, N24BitTcRgb, N32BitTcBgra, N32BitTcRgba, N8BitPal, readAlpha(), AlphaMask::ReleaseAccess(), Bitmap::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 918 of file BitmapTools.cxx.
References assert(), 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 | ||
) |
Definition at line 315 of file BitmapTools.cxx.
References ENSURE_OR_THROW, basegfx::fround(), vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::get(), BitmapEx::GetAlpha(), AlphaMask::GetBitmap(), BitmapEx::GetBitmap(), basegfx::B2DRange::getHeight(), BitmapEx::GetMask(), BitmapInfoAccess::GetPalette(), BitmapReadAccess::GetPixel(), Color::GetRed(), BitmapReadAccess::GetScanline(), BitmapEx::GetSizePixel(), basegfx::B2DRange::getWidth(), basegfx::B2DTuple::getX(), basegfx::B2DTuple::getY(), Size::Height(), basegfx::B2DHomMatrix::invert(), BitmapEx::IsAlpha(), Size::IsEmpty(), BitmapEx::IsTransparent(), BitmapReadAccess::SetPixelOnData(), Size::Width(), x, and y.
VCL_DLLPUBLIC bool vcl::bitmap::convertBitmap32To24Plus8 | ( | BitmapEx const & | rInput, |
BitmapEx & | rResult | ||
) |
Definition at line 1078 of file BitmapTools.cxx.
References Color::GetAlpha(), BitmapEx::GetAlpha(), BitmapEx::GetBitmap(), Color::GetBlue(), Color::GetGreen(), BitmapReadAccess::GetPixelFromData(), Color::GetRed(), BitmapReadAccess::GetScanline(), Size::Height(), BitmapEx::IsTransparent(), BitmapReadAccess::SetPixelOnData(), and Size::Width().
Referenced by vcl::PNGWriterImpl::PNGWriterImpl().
BitmapEx VCL_DLLPUBLIC vcl::bitmap::CreateFromData | ( | sal_uInt8 const * | pData, |
sal_Int32 | nWidth, | ||
sal_Int32 | nHeight, | ||
sal_Int32 | nStride, | ||
sal_uInt16 | nBitCount | ||
) |
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) |
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 * nBitCount / 8) |
Definition at line 124 of file BitmapTools.cxx.
References assert(), vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::get(), BitmapReadAccess::GetScanline(), p, vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::reset(), BitmapReadAccess::SetPixelOnData(), 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 187 of file BitmapTools.cxx.
References assert(), vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::get(), BitmapReadAccess::GetScanline(), nBitCount, p, vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::reset(), BitmapReadAccess::SetPixelOnData(), x, and y.
BitmapEx VCL_DLLPUBLIC vcl::bitmap::createHistorical8x8FromArray | ( | std::array< sal_uInt8, 64 > const & | pArray, |
Color | aColorPix, | ||
Color | aColorBack | ||
) |
Definition at line 971 of file BitmapTools.cxx.
References a, pContent, and BitmapWriteAccess::SetPixelIndex().
VCL_DLLPUBLIC void vcl::bitmap::DrawAlphaBitmapAndAlphaGradient | ( | BitmapEx & | rBitmapEx, |
bool | bFixedTransparence, | ||
float | fTransparence, | ||
AlphaMask & | rNewMask | ||
) |
Definition at line 476 of file BitmapTools.cxx.
References assert(), Bitmap, Color, Bitmap::CreateMask(), basegfx::fround(), BitmapEx::GetAlpha(), BitmapEx::GetBitmap(), BitmapReadAccess::GetIndexFromData(), BitmapEx::GetMask(), BitmapReadAccess::GetScanline(), BitmapEx::GetTransparentColor(), BitmapEx::GetTransparentType(), BitmapInfoAccess::Height(), BitmapEx::IsAlpha(), BitmapReadAccess::SetPixelOnData(), BitmapInfoAccess::Width(), 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 547 of file BitmapTools.cxx.
References And, COL_BLACK, COL_WHITE, Bitmap::CombineSimple(), BitmapEx::GetAlpha(), BitmapEx::GetBitmap(), BitmapReadAccess::GetIndexFromData(), BitmapEx::GetMask(), BitmapReadAccess::GetScanline(), BitmapEx::GetSizePixel(), BitmapEx::GetTransparentColor(), BitmapInfoAccess::Height(), BitmapEx::IsAlpha(), BitmapEx::IsTransparent(), Or, Point, vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::reset(), MapMode::SetOrigin(), BitmapReadAccess::SetPixelOnData(), MapMode::SetScaleX(), MapMode::SetScaleY(), and BitmapInfoAccess::Width().
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.
lookup_table VCL_DLLPUBLIC vcl::bitmap::get_premultiply_table | ( | ) |
Definition at line 1062 of file BitmapTools.cxx.
References a, and premultiply().
Referenced by CanvasCairoExtractBitmapData().
lookup_table VCL_DLLPUBLIC vcl::bitmap::get_unpremultiply_table | ( | ) |
Definition at line 1046 of file BitmapTools.cxx.
References a, and unpremultiply().
VCL_DLLPUBLIC css::uno::Sequence< sal_Int8 > vcl::bitmap::GetMaskDIB | ( | BitmapEx const & | aBmpEx | ) |
Definition at line 635 of file BitmapTools.cxx.
References BitmapEx::GetAlpha(), AlphaMask::GetBitmap(), SvMemoryStream::GetData(), BitmapEx::GetMask(), BitmapEx::IsAlpha(), BitmapEx::IsTransparent(), 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.
References assert().
bool VCL_DLLPUBLIC vcl::bitmap::isHistorical8x8 | ( | const BitmapEx & | rBitmapEx, |
Color & | o_rBack, | ||
Color & | o_rFront | ||
) |
Definition at line 999 of file BitmapTools.cxx.
References BitmapEx::GetBitmap(), BitmapInfoAccess::GetPalette(), BitmapInfoAccess::GetPaletteEntryCount(), BitmapInfoAccess::HasPalette(), BitmapEx::IsTransparent(), and Bitmap::ReleaseAccess().
BitmapEx VCL_DLLPUBLIC vcl::bitmap::loadFromName | ( | const OUString & | rFileName, |
const ImageLoadFlags | eFlags | ||
) |
Definition at line 46 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 66 of file BitmapTools.cxx.
References aBuffer, aData, vcl::unotools::bitmapExFromXBitmap(), basegfx::B2DRange::expand(), basegfx::B2DRange::getMaxX(), basegfx::B2DRange::getMaxY(), basegfx::B2DRange::getMinX(), basegfx::B2DRange::getMinY(), comphelper::getProcessComponentContext(), basegfx::B2DRange::getRange(), SvStream::ReadBytes(), and SvStream::remainingSize().
Definition at line 1041 of file BitmapTools.cxx.
Referenced by get_premultiply_table(), BitmapReadAccess::SetPixelForN32BitTcAbgr(), BitmapReadAccess::SetPixelForN32BitTcArgb(), BitmapReadAccess::SetPixelForN32BitTcBgra(), and BitmapReadAccess::SetPixelForN32BitTcRgba().
|
static |
Definition at line 653 of file BitmapTools.cxx.
References BitmapReadAccess::GetColor(), BitmapColor::GetIndex(), BitmapInfoAccess::GetPaletteColor(), BitmapReadAccess::GetScanline(), BitmapInfoAccess::GetScanlineFormat(), N8BitPal, and SAL_INFO.
Referenced by CanvasCairoExtractBitmapData().
Definition at line 1036 of file BitmapTools.cxx.
Referenced by get_unpremultiply_table(), BitmapReadAccess::GetPixelForN32BitTcAbgr(), BitmapReadAccess::GetPixelForN32BitTcArgb(), BitmapReadAccess::GetPixelForN32BitTcBgra(), and BitmapReadAccess::GetPixelForN32BitTcRgba().