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

#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
 
bool operator== (const AlphaMask &rAlphaMask) const
 
bool operator!= (const AlphaMask &rAlphaMask) const
 
void SetPrefMapMode (const MapMode &rMapMode)
 
void SetPrefSize (const Size &rSize)
 
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)
 
BitmapReadAccessAcquireAlphaReadAccess ()
 
BitmapWriteAccessAcquireAlphaWriteAccess ()
 
void ReleaseAccess (BitmapReadAccess *pAccess)
 
- Public Member Functions inherited from Bitmap
 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 ()
 
Bitmapoperator= (const Bitmap &rBitmap)
 
Bitmapoperator= (Bitmap &&rBitmap) noexcept
 
bool operator! () const
 
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
 
sal_uInt16 GetBitCount () const
 
sal_Int64 GetColorCount () const
 
sal_uLong GetSizeBytes () const
 
bool HasGreyPalette () const
 
bool GetSystemData (BitmapSystemData &rData) const
 get system dependent bitmap data More...
 
BitmapChecksum GetChecksum () const
 
Bitmap CreateDisplayBitmap (OutputDevice *pDisplay)
 
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 (long 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, sal_uLong 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< 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)
 
BitmapInfoAccessAcquireInfoAccess ()
 
BitmapReadAccessAcquireReadAccess ()
 
BitmapWriteAccessAcquireWriteAccess ()
 

Private Member Functions

SAL_DLLPRIVATE const BitmapImplGetBitmap () 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 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

Definition at line 65 of file alpha.hxx.

Constructor & Destructor Documentation

AlphaMask::AlphaMask ( )
default
AlphaMask::AlphaMask ( const Bitmap rBitmap)
explicit

Definition at line 28 of file alpha.cxx.

References Bitmap::Convert(), and N8BitGreys.

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

Definition at line 39 of file alpha.cxx.

References Bitmap::Erase().

AlphaMask::~AlphaMask ( )
overridevirtualdefault

Member Function Documentation

BitmapReadAccess* AlphaMask::AcquireAlphaReadAccess ( )
inline

Definition at line 60 of file alpha.hxx.

References Bitmap::AcquireReadAccess().

BitmapWriteAccess* AlphaMask::AcquireAlphaWriteAccess ( )
inline

Definition at line 61 of file alpha.hxx.

References Bitmap::AcquireWriteAccess().

void AlphaMask::Erase ( sal_uInt8  cTransparency)
Bitmap const & AlphaMask::GetBitmap ( ) const
const Bitmap & AlphaMask::ImplGetBitmap ( ) const
private

Definition at line 58 of file alpha.cxx.

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

void AlphaMask::ImplSetBitmap ( const Bitmap rBitmap)
private

Definition at line 63 of file alpha.cxx.

References Bitmap::GetBitCount(), Bitmap::HasGreyPalette(), and SAL_WARN_IF.

Referenced by BitmapEx::GetAlpha(), and ReadDIBBitmapEx().

bool AlphaMask::operator! ( ) const
inline

Definition at line 46 of file alpha.hxx.

References Bitmap::operator!().

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

Definition at line 48 of file alpha.hxx.

References Bitmap::operator!=().

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

Definition at line 48 of file alpha.cxx.

References Bitmap::Convert(), and N8BitGreys.

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

Definition at line 44 of file alpha.hxx.

References Bitmap::operator=().

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

Definition at line 45 of file alpha.hxx.

References Bitmap::operator=().

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

Definition at line 47 of file alpha.hxx.

References Bitmap::operator==().

void AlphaMask::ReleaseAccess ( BitmapReadAccess pAccess)
void AlphaMask::Replace ( const Bitmap rMask,
sal_uInt8  rReplaceTransparency 
)
void AlphaMask::Replace ( sal_uInt8  cSearchTransparency,
sal_uInt8  cReplaceTransparency 
)
void AlphaMask::SetPrefMapMode ( const MapMode rMapMode)
inline

Definition at line 50 of file alpha.hxx.

References Bitmap::SetPrefMapMode().

void AlphaMask::SetPrefSize ( const Size rSize)
inline

Definition at line 52 of file alpha.hxx.

References Bitmap::SetPrefSize().

Friends And Related Function Documentation

friend class ::OutputDevice
friend

Definition at line 71 of file alpha.hxx.

friend class BitmapEx
friend

Definition at line 70 of file alpha.hxx.

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

Definition at line 1740 of file dibtools.cxx.


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