LibreOffice Module vcl (master)
1
|
#include <bitmapex.hxx>
Public Member Functions | |
BitmapEx () | |
BitmapEx (const OUString &rIconName) | |
BitmapEx (const BitmapEx &rBitmapEx) | |
BitmapEx (const BitmapEx &rBitmapEx, Point aSrc, Size aSize) | |
BitmapEx (Size aSize, vcl::PixelFormat ePixelFormat) | |
BitmapEx (const Bitmap &rBmp) | |
BitmapEx (const Bitmap &rBmp, const Bitmap &rMask) | |
BitmapEx (const Bitmap &rBmp, const AlphaMask &rAlphaMask) | |
BitmapEx (const Bitmap &rBmp, const Color &rTransparentColor) | |
BitmapEx & | operator= (const BitmapEx &rBitmapEx) |
BitmapEx & | operator= (const Bitmap &rBitmap) |
bool | operator== (const BitmapEx &rBitmapEx) const |
bool | operator!= (const BitmapEx &rBitmapEx) const |
bool | IsEmpty () const |
void | SetEmpty () |
void | Clear () |
void | Draw (OutputDevice *pOutDev, const Point &rDestPt) const |
void | Draw (OutputDevice *pOutDev, const Point &rDestPt, const Size &rDestSize) const |
bool | IsTransparent () const |
TransparentType | GetTransparentType () const |
Bitmap | GetBitmap (Color aTransparentReplaceColor) const |
const Bitmap & | GetBitmap () const |
Gives direct access to the contained bitmap. More... | |
Bitmap | GetMask () const |
bool | IsAlpha () const |
AlphaMask | GetAlpha () const |
const Size & | GetSizePixel () const |
void | SetSizePixel (const Size &rNewSize) |
const Size & | GetPrefSize () const |
void | SetPrefSize (const Size &rPrefSize) |
const MapMode & | GetPrefMapMode () const |
void | SetPrefMapMode (const MapMode &rPrefMapMode) |
vcl::PixelFormat | getPixelFormat () const |
sal_uLong | GetSizeBytes () const |
BitmapChecksum | GetChecksum () const |
bool | Convert (BmpConversion eConversion) |
Convert bitmap format. More... | |
bool | Crop (const tools::Rectangle &rRectPixel) |
Crop the bitmap. More... | |
void | Expand (sal_uLong nDX, sal_uLong nDY, bool bExpandTransparent=false) |
Expand the bitmap by pixel padding. More... | |
bool | CopyPixel (const tools::Rectangle &rRectDst, const tools::Rectangle &rRectSrc, const BitmapEx *pBmpExSrc) |
Copy a rectangular area from another bitmap. More... | |
bool | Erase (const Color &rFillColor) |
Fill the entire bitmap with the given color. More... | |
bool | Invert () |
Perform the Invert operation on every pixel. More... | |
bool | Mirror (BmpMirrorFlags nMirrorFlags) |
Mirror the bitmap. More... | |
bool | Scale (const Size &rNewSize, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default) |
Scale the bitmap. More... | |
bool | Scale (const double &rScaleX, const double &rScaleY, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default) |
Scale the bitmap. More... | |
bool | Rotate (Degree10 nAngle10, const Color &rFillColor) |
Rotate bitmap by the specified angle. More... | |
void | Replace (const Color &rSearchColor, const Color &rReplaceColor) |
Replace all pixel having the search color with the specified color. More... | |
void | Replace (const Color &rSearchColor, const Color &rReplaceColor, sal_uInt8 nTolerance) |
Replace all pixel having the search color with the specified color. More... | |
void | Replace (const Color *pSearchColors, const Color *pReplaceColors, size_t nColorCount) |
Replace all pixel having one the search colors with the corresponding replace color. More... | |
void | Replace (const Color *pSearchColors, const Color *pReplaceColors, size_t nColorCount, sal_uInt8 const *pTols) |
Replace all pixel having one the search colors with the corresponding replace color. More... | |
void | ReplaceTransparency (const Color &rColor) |
Replace transparency with given color. More... | |
tools::Polygon | GetContour (bool bContourEdgeDetect, const tools::Rectangle *pWorkRect) |
Get contours in image. More... | |
bool | Adjust (short nLuminancePercent, short nContrastPercent, short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, double fGamma=1.0, bool bInvert=false, bool msoBrightness=false) |
Change various global color characteristics. More... | |
sal_uInt8 | GetAlpha (sal_Int32 nX, sal_Int32 nY) const |
Get alpha at given position. More... | |
::Color | GetPixelColor (sal_Int32 nX, sal_Int32 nY) const |
Get pixel color (including alpha) at given position. More... | |
BitmapEx | TransformBitmapEx (double fWidth, double fHeight, const basegfx::B2DHomMatrix &rTransformation) const |
Create transformed Bitmap. More... | |
BitmapEx | getTransformed (const basegfx::B2DHomMatrix &rTransformation, const basegfx::B2DRange &rVisibleRange, double fMaximumArea) const |
Create transformed Bitmap. More... | |
BitmapEx | ModifyBitmapEx (const basegfx::BColorModifierStack &rBColorModifierStack) const |
Create ColorStack-modified version of this BitmapEx. More... | |
bool | Create (const css::uno::Reference< css::rendering::XBitmapCanvas > &xBitmapCanvas, const Size &rSize) |
populate from a canvas implementation More... | |
void | setAlphaFrom (sal_uInt8 cIndexFrom, sal_Int8 nAlphaTo) |
void | AdjustTransparency (sal_uInt8 cTrans) |
void | CombineMaskOr (Color maskColor, sal_uInt8 nTol) |
void | GetColorModel (css::uno::Sequence< sal_Int32 > &rRGBPalette, sal_uInt32 &rnRedMask, sal_uInt32 &rnGreenMask, sal_uInt32 &rnBlueMask, sal_uInt32 &rnAlphaMask, sal_uInt32 &rnTransparencyIndex, sal_uInt32 &rnWidth, sal_uInt32 &rnHeight, sal_uInt8 &rnBitCount) |
Retrieves the color model data we need for the XImageConsumer stuff. More... | |
SAL_DLLPRIVATE std::shared_ptr< SalBitmap > const & | ImplGetBitmapSalBitmap () const |
SAL_DLLPRIVATE std::shared_ptr< SalBitmap > const & | ImplGetMaskSalBitmap () const |
Static Public Member Functions | |
static BitmapEx | AutoScaleBitmap (BitmapEx const &aBitmap, const tools::Long aStandardSize) |
Private Member Functions | |
void | loadFromIconTheme (const OUString &rIconName) |
Private Attributes | |
Bitmap | maBitmap |
Bitmap | maMask |
Size | maBitmapSize |
TransparentType | meTransparent |
bool | mbAlpha |
Friends | |
class | ImpGraphic |
class | OutputDevice |
bool VCL_DLLPUBLIC | WriteDIBBitmapEx (const BitmapEx &rSource, SvStream &rOStm) |
bool VCL_DLLPUBLIC | ReadRawDIB (BitmapEx &rTarget, const unsigned char *pBuf, const ScanlineFormat nFormat, const int nHeight, const int nStride) |
Definition at line 44 of file bitmapex.hxx.
BitmapEx::BitmapEx | ( | ) |
Definition at line 50 of file BitmapEx.cxx.
References NONE.
Referenced by AdjustTransparency(), Create(), ModifyBitmapEx(), setAlphaFrom(), and TransformBitmapEx().
|
explicit |
Definition at line 88 of file BitmapEx.cxx.
References loadFromIconTheme(), and NONE.
|
default |
Definition at line 58 of file BitmapEx.cxx.
References CopyPixel(), Bitmap::getPixelFormat(), AlphaMask::ImplGetBitmap(), IsAlpha(), Size::IsEmpty(), IsEmpty(), IsTransparent(), maBitmap, maMask, mbAlpha, NONE, Point, and SetSizePixel().
BitmapEx::BitmapEx | ( | Size | aSize, |
vcl::PixelFormat | ePixelFormat | ||
) |
Definition at line 80 of file BitmapEx.cxx.
References maBitmap, NONE, and SetSizePixel().
|
explicit |
Definition at line 113 of file BitmapEx.cxx.
References NONE.
Definition at line 121 of file BitmapEx.cxx.
References BitmapFilter::Filter(), GetBitmap(), Bitmap::getPixelFormat(), Bitmap::GetSizePixel(), Bitmap::HasGreyPalette8Bit(), Bitmap::IsEmpty(), maBitmap, maMask, vcl::N1_BPP, vcl::N8_BPP, NONE, SAL_WARN, and Bitmap::Scale().
Definition at line 146 of file BitmapEx.cxx.
References Bitmap::GetSizePixel(), Bitmap::IsEmpty(), maBitmap, maMask, NONE, and Bitmap::Scale().
Definition at line 161 of file BitmapEx.cxx.
References Bitmap::CreateMask(), Bitmap::GetSizePixel(), maBitmap, maMask, and SAL_WARN_IF.
bool BitmapEx::Adjust | ( | short | nLuminancePercent, |
short | nContrastPercent, | ||
short | nChannelRPercent, | ||
short | nChannelGPercent, | ||
short | nChannelBPercent, | ||
double | fGamma = 1.0 , |
||
bool | bInvert = false , |
||
bool | msoBrightness = false |
||
) |
Change various global color characteristics.
nLuminancePercent | Percent of luminance change, valid range [-100,100]. Values outside this range are clipped to the valid range. |
nContrastPercent | Percent of contrast change, valid range [-100,100]. Values outside this range are clipped to the valid range. |
nChannelRPercent | Percent of red channel change, valid range [-100,100]. Values outside this range are clipped to the valid range. |
nChannelGPercent | Percent of green channel change, valid range [-100,100]. Values outside this range are clipped to the valid range. |
nChannelBPercent | Percent of blue channel change, valid range [-100,100]. Values outside this range are clipped to the valid range. |
fGamma | Exponent of the gamma function applied to the bitmap. The value 1.0 results in no change, the valid range is (0.0,10.0]. Values outside this range are regarded as 1.0. |
bInvert | If true, invert the channel values with the logical 'not' operator |
msoBrightness | Use the same formula for brightness as used by MSOffice. |
Definition at line 586 of file BitmapEx.cxx.
References Bitmap::Adjust(), Bitmap::IsEmpty(), and maBitmap.
Referenced by Animation::Adjust(), unographic::GraphicTransformer::applyBrightnessContrast(), and GDIMetaFile::ImplBmpAdjustFnc().
Definition at line 1523 of file BitmapEx.cxx.
References assert(), BitmapEx(), GetAlpha(), GetBitmap(), GetMask(), GetSizePixel(), IsAlpha(), IsTransparent(), N8BitPal, AlphaMask::Replace(), and BitmapColor::SetIndex().
|
static |
Definition at line 606 of file BitmapEx.cxx.
References BestQuality, BITMASK, COL_TRANSPARENT(), DEFAULT, Application::GetDefaultDevice(), GetSizePixel(), Size::Height(), Point, Scale(), and Size::Width().
void BitmapEx::Clear | ( | ) |
Definition at line 209 of file BitmapEx.cxx.
References SetEmpty().
Referenced by ImpGraphic::clearGraphics(), and createBlendFrame().
Definition at line 1580 of file BitmapEx.cxx.
References Bitmap, Bitmap::CombineSimple(), Bitmap::CreateMask(), IsTransparent(), maBitmap, maMask, meTransparent, and Or.
bool BitmapEx::Convert | ( | BmpConversion | eConversion | ) |
Convert bitmap format.
eConversion | The format this bitmap should be converted to. |
Definition at line 432 of file BitmapEx.cxx.
References Bitmap::Convert(), Bitmap::IsEmpty(), and maBitmap.
Referenced by BmpWriter(), Animation::Convert(), vcl::PDFWriterImpl::createBitmapEmit(), GDIMetaFile::CreateThumbnail(), OutputDevice::DrawBitmapEx(), ImpGetScaledGraphic(), GDIMetaFile::ImplBmpConvertFnc(), and vcl::PDFWriterImpl::implWriteBitmapEx().
bool BitmapEx::CopyPixel | ( | const tools::Rectangle & | rRectDst, |
const tools::Rectangle & | rRectSrc, | ||
const BitmapEx * | pBmpExSrc | ||
) |
Copy a rectangular area from another bitmap.
rRectDst | Destination rectangle in this bitmap. This is clipped to the bitmap dimensions. |
rRectSrc | Source rectangle in pBmpSrc. This is clipped to the source bitmap dimensions. Note further that no scaling takes place during this copy operation, i.e. only the minimum of source and destination rectangle's width and height are used. |
pBmpExSrc | The source bitmap to copy from. If this argument is NULL, or equal to the object this method is called on, copying takes place within the same bitmap. |
Definition at line 458 of file BitmapEx.cxx.
References Bitmap, COL_BLACK, Bitmap::CopyPixel(), Bitmap::CopyPixel_AlphaOptimized(), Bitmap::Erase(), GetSizePixel(), AlphaMask::ImplGetBitmap(), IsAlpha(), IsEmpty(), Bitmap::IsEmpty(), IsTransparent(), maBitmap, maMask, mbAlpha, meTransparent, and vcl::N1_BPP.
Referenced by BitmapEx(), and GraphicObject::ImplTransformBitmap().
bool BitmapEx::Create | ( | const css::uno::Reference< css::rendering::XBitmapCanvas > & | xBitmapCanvas, |
const Size & | rSize | ||
) |
populate from a canvas implementation
Definition at line 735 of file BitmapEx.cxx.
References BitmapEx(), SalInstance::CreateSalBitmap(), ImplGetSVData(), and ImplSVData::mpDefInst.
Referenced by GDIMetaFile::ImplPlayWithRenderer().
bool BitmapEx::Crop | ( | const tools::Rectangle & | rRectPixel | ) |
Crop the bitmap.
rRectPixel | A rectangle specifying the crop amounts on all four sides of the bitmap. If the upper left corner of the bitmap is assigned (0,0), then this method cuts out the given rectangle from the bitmap. Note that the rectangle is clipped to the bitmap's dimension, i.e. negative left,top rectangle coordinates or exceeding width or height is ignored. |
Definition at line 412 of file BitmapEx.cxx.
References Bitmap, Bitmap::Crop(), Bitmap::GetSizePixel(), Bitmap::IsEmpty(), maBitmap, maMask, meTransparent, SAL_WARN_IF, and SetSizePixel().
Referenced by clipMetafileContentAgainstOwnRegions(), GraphicObject::ImplTransformBitmap(), EMFWriter::ImplWrite(), vcl::PDFWriterImpl::playMetafile(), GDIMetaFile::Rotate(), and WMFWriter::WriteRecords().
void BitmapEx::Draw | ( | OutputDevice * | pOutDev, |
const Point & | rDestPt | ||
) | const |
Definition at line 595 of file BitmapEx.cxx.
References OutputDevice::DrawBitmapEx().
Referenced by Animation::Draw(), and ImpGraphic::draw().
void BitmapEx::Draw | ( | OutputDevice * | pOutDev, |
const Point & | rDestPt, | ||
const Size & | rDestSize | ||
) | const |
Definition at line 600 of file BitmapEx.cxx.
References OutputDevice::DrawBitmapEx().
bool BitmapEx::Erase | ( | const Color & | rFillColor | ) |
Fill the entire bitmap with the given color.
rFillColor | Color value to use for filling. Set the transparency part of the color to fill the mask. |
Definition at line 547 of file BitmapEx.cxx.
References Bitmap, COL_BLACK, Bitmap::Erase(), Color::GetAlpha(), Bitmap::IsEmpty(), Color::IsTransparent(), maBitmap, maMask, and meTransparent.
Referenced by GraphicObject::ImplTransformBitmap().
Expand the bitmap by pixel padding.
nDX | Number of pixel to pad at the right border of the bitmap |
nDY | Number of scanlines to pad at the bottom border of the bitmap |
bExpandTransparent | Whether to expand the transparency color or not. |
Definition at line 437 of file BitmapEx.cxx.
References Bitmap, COL_BLACK, COL_WHITE, Bitmap::Expand(), Bitmap::GetSizePixel(), Bitmap::IsEmpty(), maBitmap, maMask, meTransparent, SAL_WARN_IF, and SetSizePixel().
AlphaMask BitmapEx::GetAlpha | ( | ) | const |
Definition at line 256 of file BitmapEx.cxx.
References AlphaMask::ImplSetBitmap(), IsAlpha(), and maMask.
Referenced by AdjustTransparency(), vcl::bitmap::CanvasCairoExtractBitmapData(), vcl::bitmap::CanvasExtractBitmapData(), vcl::bitmap::CanvasTransformBitmap(), vcl::bitmap::convertBitmap32To24Plus8(), vcl::PDFWriterImpl::createBitmapEmit(), Image::Draw(), vcl::bitmap::DrawAlphaBitmapAndAlphaGradient(), vcl::bitmap::DrawAndClipBitmap(), OutputDevice::DrawBitmapEx(), Printer::DrawDeviceBitmap(), OutputDevice::DrawDeviceBitmap(), OutputDevice::DrawTransformBitmapExDirect(), OutputDevice::DrawTransparent(), BitmapLightenFilter::execute(), BitmapDisabledImageFilter::execute(), BitmapAlphaClampFilter::execute(), GetBitmap(), vcl::bitmap::GetMaskDIB(), GetPixelColor(), GDIMetaFile::ImplBmpMonoFnc(), GraphicObject::ImplTransformBitmap(), vcl::PDFWriterImpl::implWriteBitmapEx(), ModifyBitmapEx(), vcl::PNGWriterImpl::PNGWriterImpl(), setAlphaFrom(), OutputDevice::SetBackground(), TransformBitmapEx(), vcl::unotools::VclCanvasBitmap::VclCanvasBitmap(), and vcl::PDFWriterImpl::writeBitmapObject().
sal_uInt8 BitmapEx::GetAlpha | ( | sal_Int32 | nX, |
sal_Int32 | nY | ||
) | const |
Get alpha at given position.
Definition at line 661 of file BitmapEx.cxx.
References Bitmap, Color::GetAlpha(), BitmapColor::GetIndex(), BitmapReadAccess::GetPixel(), GetPixelColor(), Bitmap::getPixelFormat(), GetSizePixel(), Size::Height(), Bitmap::IsEmpty(), maBitmap, maMask, mbAlpha, meTransparent, vcl::N32_BPP, NONE, and Size::Width().
Definition at line 229 of file BitmapEx.cxx.
References GetAlpha(), IsAlpha(), maBitmap, maMask, meTransparent, NONE, and Bitmap::Replace().
Referenced by BitmapEx(), vcl::bitmap::CanvasExtractBitmapData(), vcl::bitmap::CanvasTransformBitmap(), Bitmap::Convert(), vcl::bitmap::convertBitmap32To24Plus8(), vcl::PDFWriterImpl::createBitmapEmit(), Image::Draw(), vcl::bitmap::DrawAlphaBitmapAndAlphaGradient(), vcl::bitmap::DrawAndClipBitmap(), OutputDevice::DrawBitmapEx(), OutputDevice::DrawBitmapWallpaper(), Printer::DrawDeviceBitmap(), OutputDevice::DrawDeviceBitmap(), vcl::PDFWriterImpl::drawJPGBitmap(), OutputDevice::DrawTransformBitmapExDirect(), OutputDevice::DrawTransformedBitmapEx(), OutputDevice::DrawTransparent(), BitmapLightenFilter::execute(), BitmapSobelGreyFilter::execute(), BitmapDisabledImageFilter::execute(), BitmapPopArtFilter::execute(), BitmapMedianFilter::execute(), BitmapShadowFilter::execute(), BitmapAlphaClampFilter::execute(), BitmapSolarizeFilter::execute(), BitmapFastScaleFilter::execute(), BitmapFilterStackBlur::execute(), BitmapColorizeFilter::execute(), BitmapInterpolateScaleFilter::execute(), BitmapEmbossGreyFilter::execute(), BitmapDuoToneFilter::execute(), BitmapConvolutionMatrixFilter::execute(), BitmapSimpleColorQuantizationFilter::execute(), BitmapSeparableUnsharpenFilter::execute(), BitmapColorQuantizationFilter::execute(), BitmapSepiaFilter::execute(), BitmapScaleSuperFilter::execute(), BitmapMosaicFilter::execute(), BitmapBasicMorphologyFilter::execute(), BitmapGaussianSeparableBlurFilter::execute(), BitmapMonochromeFilter::execute(), vcl::BitmapScaleConvolutionFilter::execute(), ImpGraphic::getBitmap(), ImpGraphic::getGDIMetaFile(), GetMask(), GraphicObject::ImplDrawTiled(), GraphicObject::ImplTransformBitmap(), ImplWheelWindow::ImplWheelWindow(), EMFWriter::ImplWrite(), vcl::PDFWriterImpl::implWriteBitmapEx(), vcl::bitmap::isHistorical8x8(), vcl::PNGWriterImpl::PNGWriterImpl(), GraphicFilter::readJPEG(), Bitmap::Scale(), TransferableHelper::SetBitmapEx(), JPEGWriter::Write(), MetaBmpExAction::Write(), MetaBmpExScaleAction::Write(), WriteAnimation(), vcl::PDFWriterImpl::writeBitmapObject(), WriteDIB(), WriteDIBBitmapEx(), WMFWriter::WriteRecords(), and MetafileXmlDump::writeXml().
const Bitmap & BitmapEx::GetBitmap | ( | ) | const |
Gives direct access to the contained bitmap.
Definition at line 224 of file BitmapEx.cxx.
References maBitmap.
Referenced by AdjustTransparency(), ModifyBitmapEx(), setAlphaFrom(), and TransformBitmapEx().
BitmapChecksum BitmapEx::GetChecksum | ( | ) | const |
Definition at line 280 of file BitmapEx.cxx.
References BCToBCOA(), Bitmap, BITMAP_CHECKSUM_SIZE, Bitmap::GetChecksum(), Bitmap::IsEmpty(), maBitmap, maMask, mbAlpha, meTransparent, o3tl::underlyingEnumValue(), and vcl_get_checksum().
Referenced by ImplImage::getBitmapEx(), AnimationBitmap::GetChecksum(), Animation::GetChecksum(), GDIMetaFile::GetChecksum(), ImpGraphic::getChecksum(), vcl::PDFWriterImpl::implWriteBitmapEx(), and MetafileXmlDump::writeXml().
void BitmapEx::GetColorModel | ( | css::uno::Sequence< sal_Int32 > & | rRGBPalette, |
sal_uInt32 & | rnRedMask, | ||
sal_uInt32 & | rnGreenMask, | ||
sal_uInt32 & | rnBlueMask, | ||
sal_uInt32 & | rnAlphaMask, | ||
sal_uInt32 & | rnTransparencyIndex, | ||
sal_uInt32 & | rnWidth, | ||
sal_uInt32 & | rnHeight, | ||
sal_uInt8 & | rnBitCount | ||
) |
Retrieves the color model data we need for the XImageConsumer stuff.
Definition at line 1592 of file BitmapEx.cxx.
References assert(), BitmapInfoAccess::GetBitCount(), Color::GetBlue(), Color::GetGreen(), BitmapInfoAccess::GetPaletteColor(), BitmapInfoAccess::GetPaletteEntryCount(), Color::GetRed(), BitmapInfoAccess::HasPalette(), BitmapInfoAccess::Height(), i, IsTransparent(), maBitmap, UL, and BitmapInfoAccess::Width().
tools::Polygon BitmapEx::GetContour | ( | bool | bContourEdgeDetect, |
const tools::Rectangle * | pWorkRect | ||
) |
Get contours in image.
Definition at line 1404 of file BitmapEx.cxx.
References Bitmap::AcquireReadAccess(), COL_BLACK, DetectEdges(), BitmapInfoAccess::GetBestMatchingColor(), BitmapReadAccess::GetPixelFromData(), Bitmap::GetPrefSize(), BitmapReadAccess::GetScanline(), Bitmap::GetSizePixel(), Size::Height(), BitmapInfoAccess::Height(), tools::Rectangle::Intersection(), tools::Rectangle::Justify(), maBitmap, Point, Bitmap::ReleaseAccess(), tools::Polygon::Scale(), tools::Polygon::SetSize(), Size::Width(), and BitmapInfoAccess::Width().
Bitmap BitmapEx::GetMask | ( | ) | const |
Definition at line 246 of file BitmapEx.cxx.
References BitmapFilter::Filter(), GetBitmap(), IsAlpha(), and maMask.
Referenced by AdjustTransparency(), vcl::bitmap::CanvasTransformBitmap(), vcl::PDFWriterImpl::createBitmapEmit(), vcl::bitmap::DrawAlphaBitmapAndAlphaGradient(), vcl::bitmap::DrawAndClipBitmap(), OutputDevice::DrawBitmapEx(), OutputDevice::DrawBitmapWallpaper(), Printer::DrawDeviceBitmap(), OutputDevice::DrawDeviceBitmap(), OutputDevice::DrawTransformBitmapExDirect(), BitmapFastScaleFilter::execute(), BitmapFilterStackBlur::execute(), BitmapBasicMorphologyFilter::execute(), vcl::bitmap::GetMaskDIB(), GDIMetaFile::ImplBmpMonoFnc(), GraphicObject::ImplTransformBitmap(), EMFWriter::ImplWrite(), vcl::PDFWriterImpl::implWriteBitmapEx(), ModifyBitmapEx(), vcl::PNGWriterImpl::PNGWriterImpl(), ReplaceTransparency(), OutputDevice::SetBackground(), TransformBitmapEx(), vcl::unotools::VclCanvasBitmap::VclCanvasBitmap(), vcl::PDFWriterImpl::writeBitmapObject(), and WMFWriter::WriteRecords().
Color BitmapEx::GetPixelColor | ( | sal_Int32 | nX, |
sal_Int32 | nY | ||
) | const |
Get pixel color (including alpha) at given position.
Definition at line 713 of file BitmapEx.cxx.
References assert(), GetAlpha(), BitmapReadAccess::GetColor(), Bitmap::getPixelFormat(), IsAlpha(), maBitmap, vcl::N32_BPP, and Color::SetAlpha().
Referenced by GetAlpha().
|
inline |
Definition at line 92 of file bitmapex.hxx.
Referenced by BitmapDisabledImageFilter::execute().
|
inline |
Definition at line 89 of file bitmapex.hxx.
Referenced by clipMetafileContentAgainstOwnRegions(), vcl::PDFWriterImpl::drawWallpaper(), ImpGraphic::getGDIMetaFile(), ImpGraphic::getPrefMapMode(), and vcl::PNGWriterImpl::ImplWritepHYs().
|
inline |
Definition at line 86 of file bitmapex.hxx.
Referenced by clipMetafileContentAgainstOwnRegions(), vcl::PDFWriterImpl::drawWallpaper(), ImpGraphic::getGDIMetaFile(), ImpGraphic::getPrefMapMode(), ImpGraphic::getPrefSize(), and vcl::PNGWriterImpl::ImplWritepHYs().
sal_uLong BitmapEx::GetSizeBytes | ( | ) | const |
Definition at line 270 of file BitmapEx.cxx.
References Bitmap, Bitmap::GetSizeBytes(), maBitmap, maMask, and meTransparent.
Referenced by OutputDevice::DrawTransformedBitmapEx(), Animation::GetSizeBytes(), and ImpGraphic::getSizeBytes().
|
inline |
Definition at line 83 of file bitmapex.hxx.
Referenced by AdjustTransparency(), AutoScaleBitmap(), vcl::bitmap::CanvasTransformBitmap(), CopyPixel(), vcl::PDFWriterImpl::createBitmapEmit(), ImpGraphic::createSwapInfo(), GDIMetaFile::CreateThumbnail(), Image::Draw(), vcl::bitmap::DrawAndClipBitmap(), OutputDevice::DrawBitmapEx(), OutputDevice::DrawBitmapWallpaper(), OutputDevice::DrawDeviceBitmap(), OutputDevice::DrawTransformBitmapExDirect(), BitmapLightenFilter::execute(), BitmapDisabledImageFilter::execute(), BitmapAlphaClampFilter::execute(), BitmapScaleSuperFilter::execute(), GetAlpha(), ImplImage::getBitmapEx(), ImplImage::getBitmapExForHiDPI(), GDIMetaFile::GetBoundRect(), ImpGraphic::getPrefSize(), ImplImage::getSizePixel(), ImpGraphic::getSizePixel(), getTransformed(), GDIMetaFile::ImplBmpMonoFnc(), FixedBitmap::ImplDraw(), GraphicObject::ImplDrawTiled(), GraphicObject::ImplTransformBitmap(), vcl::PDFWriterImpl::implWriteBitmapEx(), operator==(), Rotate(), GraphicNativeTransform::rotateJPEG(), Scale(), and MetafileXmlDump::writeXml().
BitmapEx BitmapEx::getTransformed | ( | const basegfx::B2DHomMatrix & | rTransformation, |
const basegfx::B2DRange & | rVisibleRange, | ||
double | fMaximumArea | ||
) | const |
Create transformed Bitmap.
rTransformation | The transformation from unit coordinates to the unit range |
rVisibleRange | The relative visible range in unit coordinates, relative to (0,0,1,1) which defines the whole target area |
fMaximumArea | A limitation for the maximum size of pixels to use for the result |
The target size of the result bitmap is defined by transforming the given rTargetRange with the given rTransformation; the area of the result is linearly scaled to not exceed the given fMaximumArea
Definition at line 899 of file BitmapEx.cxx.
References basegfx::utils::createScaleB2DHomMatrix(), basegfx::utils::createScaleTranslateB2DHomMatrix(), basegfx::B2DRange::getHeight(), basegfx::B2DRange::getMinimum(), basegfx::B2DRange::getMinX(), basegfx::B2DRange::getMinY(), basegfx::B2DRange::getRange(), GetSizePixel(), basegfx::B2DRange::getWidth(), Height, IsEmpty(), basegfx::fTools::more(), basegfx::B2DRange::transform(), TransformBitmapEx(), basegfx::B2DHomMatrix::translate(), and Width.
Referenced by OutputDevice::DrawTransformedBitmapEx().
|
inline |
Definition at line 73 of file bitmapex.hxx.
Referenced by vcl::bitmap::DrawAlphaBitmapAndAlphaGradient(), OutputDevice::DrawBitmapEx(), BitmapFastScaleFilter::execute(), OutputDevice::SetBackground(), vcl::PDFWriterImpl::writeBitmapObject(), and MetafileXmlDump::writeXml().
|
inline |
Definition at line 461 of file bitmapex.hxx.
Referenced by OutputDevice::DrawDeviceBitmap().
|
inline |
Definition at line 462 of file bitmapex.hxx.
Referenced by OutputDevice::DrawDeviceBitmap().
bool BitmapEx::Invert | ( | ) |
Perform the Invert operation on every pixel.
Definition at line 306 of file BitmapEx.cxx.
References Bitmap::Invert(), Bitmap::IsEmpty(), and maBitmap.
Referenced by Animation::Invert().
bool BitmapEx::IsAlpha | ( | ) | const |
Definition at line 219 of file BitmapEx.cxx.
References IsTransparent(), and mbAlpha.
Referenced by AdjustTransparency(), BitmapEx(), vcl::bitmap::CanvasCairoExtractBitmapData(), vcl::bitmap::CanvasTransformBitmap(), vcl::unotools::VclCanvasBitmap::convertIntegerToARGB(), vcl::unotools::VclCanvasBitmap::convertIntegerToPARGB(), CopyPixel(), vcl::PDFWriterImpl::createBitmapEmit(), vcl::bitmap::DrawAlphaBitmapAndAlphaGradient(), vcl::bitmap::DrawAndClipBitmap(), OutputDevice::DrawBitmapEx(), Printer::DrawDeviceBitmap(), OutputDevice::DrawDeviceBitmap(), OutputDevice::DrawTransformBitmapExDirect(), GetAlpha(), GetBitmap(), GetMask(), vcl::bitmap::GetMaskDIB(), GetPixelColor(), GDIMetaFile::ImplBmpMonoFnc(), GraphicObject::ImplTransformBitmap(), vcl::PDFWriterImpl::implWriteBitmapEx(), ImpGraphic::isAlpha(), ModifyBitmapEx(), vcl::PNGWriterImpl::PNGWriterImpl(), OutputDevice::SetBackground(), TransformBitmapEx(), vcl::unotools::VclCanvasBitmap::VclCanvasBitmap(), and vcl::PDFWriterImpl::writeBitmapObject().
bool BitmapEx::IsEmpty | ( | ) | const |
Definition at line 196 of file BitmapEx.cxx.
References Bitmap::IsEmpty(), maBitmap, and maMask.
Referenced by NotebookbarPopup::ApplyBackground(), ToolBox::ApplyBackgroundSettings(), BitmapEx(), clipMetafileContentAgainstOwnRegions(), CopyPixel(), ImpGraphic::createSwapInfo(), GDIMetaFile::CreateThumbnail(), ImplImageTree::doLoadImage(), ImpGraphic::draw(), OutputDevice::DrawBitmapEx(), OutputDevice::DrawDeviceBitmap(), ImplListBoxWindow::DrawEntry(), ImplWin::DrawEntry(), OutputDevice::DrawTransformedBitmapEx(), VectorGraphicData::ensurePdfReplacement(), VectorGraphicData::ensureReplacement(), ImpGraphic::getBitmap(), ImpGraphic::getBitmapEx(), ImpGraphic::getGDIMetaFile(), ImpGraphic::getPrefMapMode(), ImpGraphic::getPrefSize(), ImplImage::getSizePixel(), getTransformed(), FixedBitmap::ImplDraw(), ToolBox::ImplDrawBackground(), Image::ImplInit(), vcl::PDFWriterImpl::implWriteBitmapEx(), NotebookbarPopup::NotebookbarPopup(), MenuBarWindow::Paint(), vcl::PNGWriterImpl::PNGWriterImpl(), ImplBorderWindow::Resize(), Wallpaper::SetBitmap(), TransferableHelper::SetBitmapEx(), setupPersonaHeaderFooter(), ImpGraphic::setValuesForPrefSize(), and NotebookBar::UpdateBackground().
bool BitmapEx::IsTransparent | ( | ) | const |
Definition at line 214 of file BitmapEx.cxx.
References meTransparent, and NONE.
Referenced by AdjustTransparency(), BitmapEx(), vcl::bitmap::CanvasCairoExtractBitmapData(), vcl::bitmap::CanvasTransformBitmap(), CombineMaskOr(), vcl::bitmap::convertBitmap32To24Plus8(), vcl::unotools::VclCanvasBitmap::convertIntegerFromARGB(), vcl::unotools::VclCanvasBitmap::convertIntegerFromPARGB(), vcl::unotools::VclCanvasBitmap::convertIntegerFromRGB(), vcl::unotools::VclCanvasBitmap::convertIntegerToARGB(), vcl::unotools::VclCanvasBitmap::convertIntegerToPARGB(), vcl::unotools::VclCanvasBitmap::convertIntegerToRGB(), CopyPixel(), Image::Draw(), vcl::bitmap::DrawAndClipBitmap(), OutputDevice::DrawBitmapWallpaper(), OutputDevice::DrawTransformBitmapExDirect(), OutputDevice::DrawTransformedBitmapEx(), vcl::PDFWriterImpl::drawWallpaper(), BitmapDisabledImageFilter::execute(), BitmapAlphaClampFilter::execute(), GetColorModel(), vcl::unotools::VclCanvasBitmap::getData(), ImpGraphic::getGDIMetaFile(), vcl::bitmap::GetMaskDIB(), vcl::unotools::VclCanvasBitmap::getPixel(), vcl::unotools::VclCanvasBitmap::hasAlpha(), GDIMetaFile::ImplBmpMonoFnc(), GraphicObject::ImplTransformBitmap(), vcl::PDFWriterImpl::implWriteBitmapEx(), IsAlpha(), vcl::bitmap::isHistorical8x8(), Animation::IsTransparent(), ImpGraphic::isTransparent(), ModifyBitmapEx(), vcl::PNGWriterImpl::PNGWriterImpl(), ReplaceTransparency(), SvtIconChoiceCtrl::SetBackground(), TransformBitmapEx(), and vcl::unotools::VclCanvasBitmap::VclCanvasBitmap().
|
private |
Definition at line 95 of file BitmapEx.cxx.
References StyleSettings::DetermineIconTheme(), ImageTree::get(), Application::GetSettings(), AllSettings::GetStyleSettings(), ImageTree::loadImage(), and SAL_WARN_IF.
Referenced by BitmapEx().
bool BitmapEx::Mirror | ( | BmpMirrorFlags | nMirrorFlags | ) |
Mirror the bitmap.
nMirrorFlags | About which axis (horizontal, vertical, or both) to mirror |
Definition at line 316 of file BitmapEx.cxx.
References Bitmap, Bitmap::IsEmpty(), maBitmap, maMask, meTransparent, and Bitmap::Mirror().
Referenced by OutputDevice::DrawDeviceBitmap(), ImplMirrorImage(), vcl::PDFWriterImpl::implWriteBitmapEx(), and Animation::Mirror().
BitmapEx BitmapEx::ModifyBitmapEx | ( | const basegfx::BColorModifierStack & | rBColorModifierStack | ) | const |
Create ColorStack-modified version of this BitmapEx.
rBColorModifierStack | A ColrModifierStack which defines how each pixel has to be modified |
Definition at line 980 of file BitmapEx.cxx.
References a, basegfx::BColorModifierSharedPtr, BitmapEx(), Bitmap::Erase(), GetAlpha(), GetBitmap(), Color::GetBlue(), Color::GetGreen(), GetMask(), BitmapInfoAccess::GetPalette(), Bitmap::getPixelFormat(), Color::GetRed(), Bitmap::GetSizePixel(), IsAlpha(), Bitmap::IsEmpty(), vcl::isPalettePixelFormat(), IsTransparent(), N24BitTcBgr, N24BitTcRgb, nCount, Bitmap::SetEmpty(), x, xContent, and y.
|
inline |
Definition at line 61 of file bitmapex.hxx.
bool BitmapEx::operator== | ( | const BitmapEx & | rBitmapEx | ) | const |
Definition at line 176 of file BitmapEx.cxx.
References GetSizePixel(), maBitmap, maMask, mbAlpha, and meTransparent.
Replace all pixel having the search color with the specified color.
rSearchColor | Color specifying which pixel should be replaced |
rReplaceColor | Color to be placed in all changed pixel |
Definition at line 574 of file BitmapEx.cxx.
References Bitmap::IsEmpty(), maBitmap, and Bitmap::Replace().
Referenced by GDIMetaFile::ImplBmpReplaceFnc(), and LoadThemedImageList().
void BitmapEx::Replace | ( | const Color & | rSearchColor, |
const Color & | rReplaceColor, | ||
sal_uInt8 | nTolerance | ||
) |
Replace all pixel having the search color with the specified color.
rSearchColor | Color specifying which pixel should be replaced |
rReplaceColor | Color to be placed in all changed pixel |
nTolerance | Tolerance value. Specifies the maximal difference between rSearchColor and the individual pixel values, such that the corresponding pixel is still regarded a match. |
Definition at line 1284 of file BitmapEx.cxx.
References maBitmap, and Bitmap::Replace().
void BitmapEx::Replace | ( | const Color * | pSearchColors, |
const Color * | pReplaceColors, | ||
size_t | nColorCount | ||
) |
Replace all pixel having one the search colors with the corresponding replace color.
pSearchColors | Array of colors specifying which pixel should be replaced |
pReplaceColors | Array of colors to be placed in all changed pixel |
nColorCount | Size of the aforementioned color arrays |
pTols | Tolerance value. Specifies the maximal difference between pSearchColor colors and the individual pixel values, such that the corresponding pixel is still regarded a match. |
Definition at line 580 of file BitmapEx.cxx.
References Bitmap::IsEmpty(), maBitmap, and Bitmap::Replace().
void BitmapEx::Replace | ( | const Color * | pSearchColors, |
const Color * | pReplaceColors, | ||
size_t | nColorCount, | ||
sal_uInt8 const * | pTols | ||
) |
Replace all pixel having one the search colors with the corresponding replace color.
pSearchColors | Array of colors specifying which pixel should be replaced |
rReplaceColors | Array of colors to be placed in all changed pixel |
nColorCount | Size of the aforementioned color arrays |
pTols | Tolerance value. Specifies the maximal difference between pSearchColor colors and the individual pixel values, such that the corresponding pixel is still regarded a match. |
Definition at line 1291 of file BitmapEx.cxx.
References maBitmap, and Bitmap::Replace().
Replace transparency with given color.
Definition at line 1299 of file BitmapEx.cxx.
References GetMask(), Bitmap::GetSizePixel(), IsTransparent(), maBitmap, maBitmapSize, maMask, mbAlpha, meTransparent, NONE, and Bitmap::Replace().
Rotate bitmap by the specified angle.
nAngle10 | The rotation angle in tenth of a degree. The bitmap is always rotated around its center. |
rFillColor | The color to use for filling blank areas. During rotation, the bitmap is enlarged such that the whole rotation result fits in. The empty spaces around that rotated original bitmap are then filled with this color. |
Definition at line 373 of file BitmapEx.cxx.
References Bitmap, COL_BLACK, COL_TRANSPARENT(), COL_WHITE, Bitmap::Erase(), GetSizePixel(), Bitmap::GetSizePixel(), Bitmap::IsEmpty(), maBitmap, maMask, meTransparent, vcl::N1_BPP, NONE, Bitmap::Rotate(), SAL_WARN_IF, and SetSizePixel().
Referenced by OutputDevice::DrawTransformedBitmapEx(), ImplRotImage(), GDIMetaFile::Rotate(), GraphicNativeTransform::rotateBitmapOnly(), and GraphicNativeTransform::rotateGeneric().
bool BitmapEx::Scale | ( | const Size & | rNewSize, |
BmpScaleFlag | nScaleFlag = BmpScaleFlag::Default |
||
) |
Scale the bitmap.
rNewSize | The resulting size of the scaled bitmap |
nScaleFlag | The algorithm to be used for scaling |
Definition at line 353 of file BitmapEx.cxx.
References GetSizePixel(), Size::Height(), Height, Size::Width(), and Width.
Referenced by AutoScaleBitmap(), GDIMetaFile::CreateThumbnail(), OutputDevice::DrawBitmapWallpaper(), ImpGraphic::getBitmapEx(), vcl::unotools::VclCanvasBitmap::getScaledBitmap(), GraphicObject::ImplTransformBitmap(), vcl::PDFWriterImpl::implWriteBitmapEx(), and vcl::PrintDialog::PrintPreviewWindow::Paint().
bool BitmapEx::Scale | ( | const double & | rScaleX, |
const double & | rScaleY, | ||
BmpScaleFlag | nScaleFlag = BmpScaleFlag::Default |
||
) |
Scale the bitmap.
rScaleX | The scale factor in x direction. |
rScaleY | The scale factor in y direction. |
nScaleFlag | The algorithm to be used for scaling |
Definition at line 331 of file BitmapEx.cxx.
References Bitmap, Bitmap::GetSizePixel(), Bitmap::IsEmpty(), maBitmap, maMask, meTransparent, SAL_WARN_IF, Bitmap::Scale(), and SetSizePixel().
Definition at line 1500 of file BitmapEx.cxx.
References assert(), BitmapEx(), vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::get(), GetAlpha(), GetBitmap(), BitmapColor::GetIndex(), BitmapReadAccess::GetPixelFromData(), BitmapReadAccess::GetScanline(), BitmapInfoAccess::Height(), maBitmap, and BitmapInfoAccess::Width().
void BitmapEx::SetEmpty | ( | ) |
Definition at line 201 of file BitmapEx.cxx.
References maBitmap, maMask, mbAlpha, meTransparent, NONE, and Bitmap::SetEmpty().
Referenced by Animation::Clear(), Clear(), GDIMetaFile::CreateThumbnail(), ImplImageTree::doLoadImage(), and vcl::PDFWriterImpl::implWriteBitmapEx().
Definition at line 90 of file bitmapex.hxx.
Referenced by ImpGraphic::setValuesForPrefMapMod().
Definition at line 87 of file bitmapex.hxx.
Referenced by ImpGraphic::getVectorGraphicReplacement(), and ImpGraphic::setValuesForPrefSize().
Definition at line 301 of file BitmapEx.cxx.
References maBitmapSize.
Referenced by BitmapEx(), Crop(), Expand(), Rotate(), and Scale().
BitmapEx BitmapEx::TransformBitmapEx | ( | double | fWidth, |
double | fHeight, | ||
const basegfx::B2DHomMatrix & | rTransformation | ||
) | const |
Create transformed Bitmap.
fWidth | The target width in pixels |
fHeight | The target height in pixels |
rTransformation | The back transformation for each pixel in (0 .. fWidth),(0 .. fHeight) to local pixel coordinates |
Definition at line 868 of file BitmapEx.cxx.
References BitmapEx(), basegfx::fround(), GetAlpha(), GetBitmap(), GetMask(), IsAlpha(), and IsTransparent().
Referenced by getTransformed().
|
friend |
Definition at line 466 of file bitmapex.hxx.
|
friend |
Definition at line 467 of file bitmapex.hxx.
|
friend |
Definition at line 1807 of file dibtools.cxx.
|
friend |
Definition at line 1840 of file dibtools.cxx.
|
private |
Definition at line 476 of file bitmapex.hxx.
Referenced by Adjust(), BitmapEx(), CombineMaskOr(), Convert(), CopyPixel(), Crop(), Erase(), Expand(), GetAlpha(), GetBitmap(), GetChecksum(), GetColorModel(), GetContour(), GetPixelColor(), GetSizeBytes(), Invert(), IsEmpty(), Mirror(), operator==(), ReadRawDIB(), Replace(), ReplaceTransparency(), Rotate(), Scale(), setAlphaFrom(), and SetEmpty().
|
private |
Definition at line 478 of file bitmapex.hxx.
Referenced by ReplaceTransparency(), and SetSizePixel().
|
private |
Definition at line 477 of file bitmapex.hxx.
Referenced by BitmapEx(), CombineMaskOr(), CopyPixel(), Crop(), Erase(), Expand(), GetAlpha(), GetBitmap(), GetChecksum(), GetMask(), GetSizeBytes(), IsEmpty(), Mirror(), operator==(), ReplaceTransparency(), Rotate(), Scale(), SetEmpty(), and WriteDIBBitmapEx().
|
private |
Definition at line 480 of file bitmapex.hxx.
Referenced by BitmapEx(), CopyPixel(), GetAlpha(), GetChecksum(), IsAlpha(), operator==(), ReplaceTransparency(), and SetEmpty().
|
private |
Definition at line 479 of file bitmapex.hxx.
Referenced by CombineMaskOr(), CopyPixel(), Crop(), Erase(), Expand(), GetAlpha(), GetBitmap(), GetChecksum(), GetSizeBytes(), IsTransparent(), Mirror(), operator==(), ReplaceTransparency(), Rotate(), Scale(), SetEmpty(), and WriteDIBBitmapEx().