LibreOffice Module vcl (master)
1
|
#include <alpha.hxx>
Public Types | |
typedef vcl::ScopedBitmapAccess< BitmapReadAccess, AlphaMask,&AlphaMask::AcquireAlphaReadAccess > | ScopedReadAccess |
![]() | |
typedef vcl::ScopedBitmapAccess< BitmapReadAccess, Bitmap,&Bitmap::AcquireReadAccess > | ScopedReadAccess |
typedef vcl::ScopedBitmapAccess< BitmapInfoAccess, Bitmap,&Bitmap::AcquireInfoAccess > | ScopedInfoAccess |
Public Member Functions | |
AlphaMask () | |
AlphaMask (const Bitmap &rBitmap) | |
AlphaMask (const AlphaMask &rAlphaMask) | |
AlphaMask (AlphaMask &&rAlphaMask) | |
AlphaMask (const Size &rSizePixel, const sal_uInt8 *pEraseTransparency=nullptr) | |
virtual | ~AlphaMask () override |
AlphaMask & | operator= (const Bitmap &rBitmap) |
AlphaMask & | operator= (const AlphaMask &rAlphaMask) |
AlphaMask & | operator= (AlphaMask &&rAlphaMask) noexcept |
bool | operator! () const |
bool | operator== (const AlphaMask &rAlphaMask) const |
bool | operator!= (const AlphaMask &rAlphaMask) const |
Bitmap const & | GetBitmap () const |
void | Erase (sal_uInt8 cTransparency) |
void | Replace (const Bitmap &rMask, sal_uInt8 rReplaceTransparency) |
void | Replace (sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency) |
void | BlendWith (const Bitmap &rOther) |
BitmapReadAccess * | AcquireAlphaReadAccess () |
BitmapWriteAccess * | AcquireAlphaWriteAccess () |
void | ReleaseAccess (BitmapReadAccess *pAccess) |
![]() | |
Bitmap () | |
Bitmap (const Bitmap &rBitmap) | |
Bitmap (const Size &rSizePixel, sal_uInt16 nBitCount, const BitmapPalette *pPal=nullptr) | |
Bitmap (std::shared_ptr< SalBitmap > const &xSalBitmap) | |
virtual | ~Bitmap () |
Bitmap & | operator= (const Bitmap &rBitmap) |
Bitmap & | operator= (Bitmap &&rBitmap) noexcept |
bool | operator! () const |
bool | operator== (const Bitmap &rBitmap) const |
bool | operator!= (const Bitmap &rBitmap) const |
bool | IsEmpty () const |
void | SetEmpty () |
const MapMode & | GetPrefMapMode () const |
void | SetPrefMapMode (const MapMode &rMapMode) |
const Size & | GetPrefSize () const |
void | SetPrefSize (const Size &rSize) |
Size | GetSizePixel () const |
sal_uInt16 | GetBitCount () const |
sal_Int64 | GetColorCount () const |
sal_uLong | GetSizeBytes () const |
bool | HasGreyPalette8Bit () const |
bool | HasGreyPaletteAny () const |
bool | GetSystemData (BitmapSystemData &rData) const |
get system dependent bitmap data More... | |
BitmapChecksum | GetChecksum () const |
Bitmap | CreateDisplayBitmap (OutputDevice *pDisplay) const |
bool | Convert (BmpConversion eConversion) |
Convert bitmap format. More... | |
bool | Dither () |
Apply a Floyd dither algorithm to the bitmap. More... | |
bool | Crop (const tools::Rectangle &rRectPixel) |
Crop the bitmap. More... | |
bool | Expand (sal_uLong nDX, sal_uLong nDY, const Color *pInitColor=nullptr) |
Expand the bitmap by pixel padding. More... | |
bool | CopyPixel (const tools::Rectangle &rRectDst, const tools::Rectangle &rRectSrc, const Bitmap *pBmpSrc=nullptr) |
Copy a rectangular area from another bitmap. More... | |
bool | CopyPixel_AlphaOptimized (const tools::Rectangle &rRectDst, const tools::Rectangle &rRectSrc, const Bitmap *pBmpSrc) |
bool | CombineSimple (const Bitmap &rMask, BmpCombine eCombine) |
Perform boolean operations with another bitmap. More... | |
bool | Blend (const AlphaMask &rAlpha, const Color &rBackgroundColor) |
Alpha-blend the given bitmap against a specified uniform background color. 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... | |
void | AdaptBitCount (Bitmap &rNew) const |
bool | Rotate (Degree10 nAngle10, const Color &rFillColor) |
Rotate bitmap by the specified angle. More... | |
Bitmap | CreateMask (const Color &rTransColor, sal_uInt8 nTol=0) const |
Create on-off mask from bitmap. More... | |
vcl::Region | CreateRegion (const Color &rColor, const tools::Rectangle &rRect) const |
Create region of similar colors in a given rectangle. More... | |
bool | Replace (const Bitmap &rMask, const Color &rReplaceColor) |
Replace all pixel where the given mask is on with the specified color. More... | |
bool | Replace (const AlphaMask &rAlpha, const Color &rMergeColor) |
Merge bitmap with given background color according to specified alpha mask. More... | |
bool | Replace (const Color &rSearchColor, const Color &rReplaceColor, sal_uInt8 nTol=0) |
Replace all pixel having the search color with the specified color. More... | |
bool | Replace (const Color *pSearchColors, const Color *rReplaceColors, size_t nColorCount, sal_uInt8 const *pTols) |
Replace all pixel having one the search colors with the corresponding replace color. More... | |
void | Vectorize (GDIMetaFile &rMtf, sal_uInt8 cReduce, const Link< tools::Long, void > *pProgress) |
Convert the bitmap to a meta file. More... | |
bool | Adjust (short nLuminancePercent, short nContrastPercent=0, short nChannelRPercent=0, short nChannelGPercent=0, short nChannelBPercent=0, double fGamma=1.0, bool bInvert=false, bool msoBrightness=false) |
Change various global color characteristics. More... | |
SAL_DLLPRIVATE void | ReassignWithSize (const Bitmap &rBitmap) |
ReassignWithSize and recalculate bitmap. More... | |
SAL_DLLPRIVATE void | ImplMakeUnique () |
const std::shared_ptr< SalBitmap > & | ImplGetSalBitmap () const |
SAL_DLLPRIVATE void | ImplSetSalBitmap (const std::shared_ptr< SalBitmap > &xImpBmp) |
SAL_DLLPRIVATE bool | ImplMakeGreyscales (sal_uInt16 nGreyscales) |
BitmapInfoAccess * | AcquireInfoAccess () |
BitmapReadAccess * | AcquireReadAccess () |
BitmapWriteAccess * | AcquireWriteAccess () |
Private Member Functions | |
SAL_DLLPRIVATE const Bitmap & | ImplGetBitmap () const |
SAL_DLLPRIVATE void | ImplSetBitmap (const Bitmap &rBitmap) |
Friends | |
class | BitmapEx |
class | ::OutputDevice |
bool VCL_DLLPUBLIC | ReadDIBBitmapEx (BitmapEx &rTarget, SvStream &rIStm, bool bFileHeader, bool bMSOFormat) |
Additional Inherited Members | |
![]() | |
static const BitmapPalette & | GetGreyPalette (int nEntries) |
static bool | HasFastScale () |
Returns true if bitmap scaling is considered to be fast. More... | |
static void | ReleaseAccess (BitmapInfoAccess *pAccess) |
|
default |
|
explicit |
Definition at line 31 of file alpha.cxx.
References Bitmap::Convert(), and N8BitNoConversion.
|
default |
|
default |
|
explicit |
Definition at line 42 of file alpha.cxx.
References Bitmap::Erase().
|
overridevirtualdefault |
|
inline |
Definition at line 57 of file alpha.hxx.
References Bitmap::AcquireReadAccess().
|
inline |
Definition at line 58 of file alpha.hxx.
References Bitmap::AcquireWriteAccess().
Definition at line 144 of file alpha.cxx.
References BitmapInfoAccess::GetBitCount(), BitmapReadAccess::GetScanline(), BitmapInfoAccess::Height(), Bitmap::ImplGetSalBitmap(), ImplGetSVData(), Bitmap::ImplSetSalBitmap(), BitmapInfoAccess::Width(), x, and y.
Referenced by OutputDevice::DrawTransparent().
Definition at line 78 of file alpha.cxx.
References Bitmap::Erase().
Referenced by OutputDevice::DrawTransformBitmapExDirect(), OutputDevice::DrawTransformedBitmapEx(), and vcl::PageSyncData::PlaySyncPageAct().
Bitmap const & AlphaMask::GetBitmap | ( | ) | const |
Definition at line 73 of file alpha.cxx.
References ImplGetBitmap().
Referenced by vcl::bitmap::CanvasExtractBitmapData(), vcl::bitmap::CanvasTransformBitmap(), Image::Draw(), OutputDevice::DrawBitmapEx(), vcl::bitmap::GetMaskDIB(), vcl::PDFWriterImpl::implWriteBitmapEx(), vcl::unotools::VclCanvasBitmap::VclCanvasBitmap(), and vcl::PDFWriterImpl::writeBitmapObject().
|
private |
Definition at line 61 of file alpha.cxx.
Referenced by BitmapEx::BitmapEx(), BitmapEx::CopyPixel(), and GetBitmap().
Definition at line 66 of file alpha.cxx.
References Bitmap::GetBitCount(), Bitmap::HasGreyPalette8Bit(), and SAL_WARN_IF.
Referenced by BitmapEx::GetAlpha(), and ReadDIBBitmapEx().
|
inline |
Definition at line 46 of file alpha.hxx.
References Bitmap::operator!().
|
inline |
Definition at line 48 of file alpha.hxx.
References Bitmap::operator!=().
Definition at line 51 of file alpha.cxx.
References Bitmap::Convert(), and N8BitNoConversion.
Definition at line 44 of file alpha.hxx.
References Bitmap::operator=().
Definition at line 45 of file alpha.hxx.
References Bitmap::operator=().
|
inline |
Definition at line 47 of file alpha.hxx.
References Bitmap::operator==().
void AlphaMask::ReleaseAccess | ( | BitmapReadAccess * | pAccess | ) |
Definition at line 176 of file alpha.cxx.
References Bitmap::Convert(), N8BitNoConversion, and Bitmap::ReleaseAccess().
Referenced by vcl::bitmap::CanvasCairoExtractBitmapData().
Definition at line 83 of file alpha.cxx.
References COL_WHITE, BitmapInfoAccess::GetBestMatchingColor(), BitmapReadAccess::GetPixelFromData(), BitmapReadAccess::GetScanline(), BitmapInfoAccess::Height(), BitmapReadAccess::SetPixelOnData(), and BitmapInfoAccess::Width().
Referenced by BitmapEx::AdjustTransparency().
Definition at line 106 of file alpha.cxx.
References BitmapInfoAccess::GetBitCount(), BitmapReadAccess::GetIndexFromData(), BitmapReadAccess::GetScanline(), BitmapInfoAccess::GetScanlineFormat(), BitmapInfoAccess::Height(), N8BitPal, BitmapReadAccess::SetPixelOnData(), and BitmapInfoAccess::Width().
|
friend |
|
friend |
Definition at line 1751 of file dibtools.cxx.