LibreOffice Module vcl (master) 1
Public Types | Public Member Functions | Private Member Functions | Friends | List of all members
AlphaMask Class Referencefinal

#include <alpha.hxx>

Inheritance diagram for AlphaMask:
[legend]
Collaboration diagram for AlphaMask:
[legend]

Public Types

typedef vcl::ScopedBitmapAccess< BitmapReadAccess, AlphaMask, &AlphaMask::AcquireAlphaReadAccessScopedReadAccess
 
- Public Types inherited from Bitmap
typedef vcl::ScopedBitmapAccess< BitmapReadAccess, Bitmap, &Bitmap::AcquireReadAccessScopedReadAccess
 
typedef vcl::ScopedBitmapAccess< BitmapInfoAccess, Bitmap, &Bitmap::AcquireInfoAccessScopedInfoAccess
 

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
 
AlphaMaskoperator= (const Bitmap &rBitmap)
 
AlphaMaskoperator= (const AlphaMask &rAlphaMask)
 
AlphaMaskoperator= (AlphaMask &&rAlphaMask) noexcept
 
bool operator== (const AlphaMask &rAlphaMask) const
 
bool operator!= (const AlphaMask &rAlphaMask) const
 
Bitmap const & GetBitmap () const
 
void Erase (sal_uInt8 cTransparency)
 
void BlendWith (const AlphaMask &rOther)
 
bool hasAlpha () const
 
BitmapReadAccessAcquireAlphaReadAccess ()
 
BitmapWriteAccessAcquireAlphaWriteAccess ()
 
void ReleaseAccess (BitmapReadAccess *pAccess)
 
bool IsEmpty () const
 
- Public Member Functions inherited from Bitmap
 Bitmap ()
 
 Bitmap (const Bitmap &rBitmap)
 
 Bitmap (const Size &rSizePixel, vcl::PixelFormat ePixelFormat, const BitmapPalette *pPal=nullptr)
 
 Bitmap (std::shared_ptr< SalBitmap > xSalBitmap)
 
virtual ~Bitmap ()
 
Bitmapoperator= (const Bitmap &rBitmap)
 
Bitmapoperator= (Bitmap &&rBitmap) noexcept
 
bool operator== (const Bitmap &rBitmap) const
 
bool operator!= (const Bitmap &rBitmap) const
 
bool IsEmpty () const
 
void SetEmpty ()
 
const MapModeGetPrefMapMode () const
 
void SetPrefMapMode (const MapMode &rMapMode)
 
const SizeGetPrefSize () const
 
void SetPrefSize (const Size &rSize)
 
Size GetSizePixel () const
 
vcl::PixelFormat getPixelFormat () const
 
sal_Int64 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_Int32 nDX, sal_Int32 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 CombineOr (const Bitmap &rMask)
 Perform boolean OR operation 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) const
 Create on-off mask from bitmap. More...
 
Bitmap CreateMask (const Color &rTransColor, sal_uInt8 nTol) const
 Create on-off mask from bitmap. More...
 
AlphaMask CreateAlphaMask (const Color &rTransColor) const
 Create on-off alpha mask from bitmap. More...
 
AlphaMask CreateAlphaMask (const Color &rTransColor, sal_uInt8 nTol) const
 Create on-off alpha 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 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...
 
void RemoveBlendedStartColor (const Color &rColor, const AlphaMask &rAlphaMask)
 Remove existing blending against COL_WHITE based on given AlphaMask. More...
 
const basegfx::SystemDependentDataHolderaccessSystemDependentDataHolder () const
 
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 ()
 
BitmapInfoAccessAcquireInfoAccess ()
 
BitmapReadAccessAcquireReadAccess ()
 
BitmapWriteAccessAcquireWriteAccess ()
 

Private Member Functions

SAL_DLLPRIVATE const BitmapImplGetBitmap () const
 

Friends

class BitmapEx
 
class ::OutputDevice
 
bool VCL_DLLPUBLIC ReadDIBBitmapEx (BitmapEx &rTarget, SvStream &rIStm, bool bFileHeader, bool bMSOFormat)
 

Additional Inherited Members

- Static Public Member Functions inherited from Bitmap
static const BitmapPaletteGetGreyPalette (int nEntries)
 
static bool HasFastScale ()
 Returns true if bitmap scaling is considered to be fast. More...
 
static void ReleaseAccess (BitmapInfoAccess *pAccess)
 

Detailed Description

Definition at line 32 of file alpha.hxx.

Member Typedef Documentation

◆ ScopedReadAccess

Definition at line 62 of file alpha.hxx.

Constructor & Destructor Documentation

◆ AlphaMask() [1/5]

AlphaMask::AlphaMask ( )
default

◆ AlphaMask() [2/5]

AlphaMask::AlphaMask ( const Bitmap rBitmap)
explicit

◆ AlphaMask() [3/5]

AlphaMask::AlphaMask ( const AlphaMask rAlphaMask)
default

◆ AlphaMask() [4/5]

AlphaMask::AlphaMask ( AlphaMask &&  rAlphaMask)
default

◆ AlphaMask() [5/5]

AlphaMask::AlphaMask ( const Size rSizePixel,
const sal_uInt8 pEraseTransparency = nullptr 
)
explicit

Definition at line 45 of file alpha.cxx.

References COL_ALPHA_OPAQUE(), and Bitmap::Erase().

◆ ~AlphaMask()

AlphaMask::~AlphaMask ( )
overridevirtualdefault

Member Function Documentation

◆ AcquireAlphaReadAccess()

BitmapReadAccess * AlphaMask::AcquireAlphaReadAccess ( )
inline

Definition at line 57 of file alpha.hxx.

References Bitmap::AcquireReadAccess().

◆ AcquireAlphaWriteAccess()

BitmapWriteAccess * AlphaMask::AcquireAlphaWriteAccess ( )
inline

Definition at line 58 of file alpha.hxx.

References Bitmap::AcquireWriteAccess().

◆ BlendWith()

void AlphaMask::BlendWith ( const AlphaMask rOther)

◆ Erase()

void AlphaMask::Erase ( sal_uInt8  cTransparency)

◆ GetBitmap()

Bitmap const & AlphaMask::GetBitmap ( ) const

◆ hasAlpha()

bool AlphaMask::hasAlpha ( ) const

Definition at line 132 of file alpha.cxx.

References IsEmpty(), x, and y.

◆ ImplGetBitmap()

const Bitmap & AlphaMask::ImplGetBitmap ( ) const
private

Definition at line 72 of file alpha.cxx.

Referenced by BitmapEx::BitmapEx(), BitmapEx::CopyPixel(), and GetBitmap().

◆ IsEmpty()

bool Bitmap::IsEmpty ( ) const
inline

◆ operator!=()

bool AlphaMask::operator!= ( const AlphaMask rAlphaMask) const
inline

Definition at line 47 of file alpha.hxx.

References Bitmap::operator!=().

◆ operator=() [1/3]

AlphaMask & AlphaMask::operator= ( AlphaMask &&  rAlphaMask)
inlinenoexcept

Definition at line 45 of file alpha.hxx.

References Bitmap::operator=().

◆ operator=() [2/3]

AlphaMask & AlphaMask::operator= ( const AlphaMask rAlphaMask)
inline

Definition at line 44 of file alpha.hxx.

References Bitmap::operator=().

◆ operator=() [3/3]

AlphaMask & AlphaMask::operator= ( const Bitmap rBitmap)

◆ operator==()

bool AlphaMask::operator== ( const AlphaMask rAlphaMask) const
inline

Definition at line 46 of file alpha.hxx.

References Bitmap::operator==().

◆ ReleaseAccess()

void AlphaMask::ReleaseAccess ( BitmapReadAccess pAccess)

Friends And Related Function Documentation

◆ ::OutputDevice

friend class ::OutputDevice
friend

Definition at line 68 of file alpha.hxx.

◆ BitmapEx

friend class BitmapEx
friend

Definition at line 67 of file alpha.hxx.

◆ ReadDIBBitmapEx

bool VCL_DLLPUBLIC ReadDIBBitmapEx ( BitmapEx rTarget,
SvStream rIStm,
bool  bFileHeader,
bool  bMSOFormat 
)
friend

Definition at line 1623 of file dibtools.cxx.


The documentation for this class was generated from the following files: