LibreOffice Module vcl (master) 1
Public Member Functions | Private Attributes | List of all members
vcl::ScopedBitmapAccess< Access, Bitmap, Acquire > Class Template Reference

This template handles BitmapAccess the RAII way. More...

#include <scopedbitmapaccess.hxx>

Inheritance diagram for vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >:
[legend]
Collaboration diagram for vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >:
[legend]

Public Member Functions

 ScopedBitmapAccess (Bitmap &rBitmap)
 
 ScopedBitmapAccess (Access *pAccess, Bitmap &rBitmap)
 
 ScopedBitmapAccess ()
 
ScopedBitmapAccessoperator= (ScopedBitmapAccess &&other)
 
 ScopedBitmapAccess (const ScopedBitmapAccess &)=delete
 
ScopedBitmapAccessoperator= (const ScopedBitmapAccess &)=delete
 
 ~ScopedBitmapAccess () COVERITY_NOEXCEPT_FALSE
 
void reset ()
 
bool operator! () const
 
 operator bool () const
 
Access * get ()
 
const Access * get () const
 
Access * operator-> ()
 
const Access * operator-> () const
 
Access & operator* ()
 
const Access & operator* () const
 

Private Attributes

Access * mpAccess
 
BitmapmpBitmap
 

Detailed Description

template<class Access, class Bitmap, Access *(Bitmap::*)() Acquire>
class vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >

This template handles BitmapAccess the RAII way.

Please don't use directly, but through the ready-made typedefs ScopedReadAccess and ScopedWriteAccess in classes Bitmap and AlphaMask.

Use as follows: Bitmap aBitmap; Bitmap::ScopedReadAccess pReadAccess( aBitmap ); pReadAccess->SetPixel()...

Bitmap aBitmap2; BitmapScopedWriteAccess pWriteAccess( bCond ? aBitmap2.AcquireWriteAccess() : 0, aBitmap2 ); if ( pWriteAccess )...

Attention: \n for practical reasons, ScopedBitmapAccess stores a
reference to the provided bitmap, thus, make sure that the bitmap specified at construction time lives at least as long as the ScopedBitmapAccess.

Definition at line 48 of file scopedbitmapaccess.hxx.

Constructor & Destructor Documentation

◆ ScopedBitmapAccess() [1/4]

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::ScopedBitmapAccess ( Bitmap rBitmap)
inlineexplicit

◆ ScopedBitmapAccess() [2/4]

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::ScopedBitmapAccess ( Access *  pAccess,
Bitmap rBitmap 
)
inline

Definition at line 58 of file scopedbitmapaccess.hxx.

◆ ScopedBitmapAccess() [3/4]

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::ScopedBitmapAccess ( )
inline

Definition at line 64 of file scopedbitmapaccess.hxx.

◆ ScopedBitmapAccess() [4/4]

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::ScopedBitmapAccess ( const ScopedBitmapAccess< Access, Bitmap, Acquire > &  )
delete

◆ ~ScopedBitmapAccess()

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::~ScopedBitmapAccess ( )
inline

Member Function Documentation

◆ get() [1/2]

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
Access * vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::get ( )
inline

◆ get() [2/2]

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
const Access * vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::get ( ) const
inline

◆ operator bool()

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::operator bool ( ) const
inlineexplicit

◆ operator!()

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
bool vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::operator! ( ) const
inline

◆ operator*() [1/2]

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
Access & vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::operator* ( void  )
inline

◆ operator*() [2/2]

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
const Access & vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::operator* ( void  ) const
inline

◆ operator->() [1/2]

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
Access * vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::operator-> ( )
inline

◆ operator->() [2/2]

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
const Access * vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::operator-> ( ) const
inline

◆ operator=() [1/2]

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
ScopedBitmapAccess & vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::operator= ( const ScopedBitmapAccess< Access, Bitmap, Acquire > &  )
delete

◆ operator=() [2/2]

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
ScopedBitmapAccess & vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::operator= ( ScopedBitmapAccess< Access, Bitmap, Acquire > &&  other)
inline

◆ reset()

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
void vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::reset ( )
inline

Definition at line 90 of file scopedbitmapaccess.hxx.

References vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::mpAccess, vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::mpBitmap, and Bitmap::ReleaseAccess().

Referenced by Bitmap::Adjust(), OutputDevice::BlendBitmap(), OutputDevice::BlendBitmapWithAlpha(), AlphaMask::BlendWith(), Bitmap::CopyPixel(), Bitmap::CopyPixel_AlphaOptimized(), Bitmap::CreateAlphaMask(), createBlendFrame(), vcl::bitmap::CreateFromData(), Bitmap::CreateMask(), Bitmap::CreateRegion(), Bitmap::Crop(), DetectEdges(), Bitmap::Dither(), vcl::bitmap::DrawAndClipBitmap(), OutputDevice::EmulateDrawTransparent(), BitmapScaleSuperFilter::execute(), BitmapColorQuantizationFilter::execute(), BitmapConvolutionMatrixFilter::execute(), BitmapDuoToneFilter::execute(), BitmapEmbossGreyFilter::execute(), BitmapGaussianSeparableBlurFilter::execute(), BitmapMedianFilter::execute(), BitmapMonochromeFilter::execute(), BitmapPopArtFilter::execute(), BitmapSeparableUnsharpenFilter::execute(), BitmapSepiaFilter::execute(), BitmapSimpleColorQuantizationFilter::execute(), BitmapSobelGreyFilter::execute(), BitmapSolarizeFilter::execute(), BitmapFastScaleFilter::execute(), BitmapInterpolateScaleFilter::execute(), BitmapLightenFilter::execute(), BitmapMaskToAlphaFilter::execute(), Bitmap::Expand(), Bitmap::ImplConvertDown8BPP(), Bitmap::ImplMakeGreyscales(), ImplVectorizer::ImplVectorize(), ImportTiffGraphicImport(), Bitmap::Mirror(), vcl::pngWrite(), readWebp(), Bitmap::Replace(), Bitmap::Rotate(), and JPEGWriter::Write().

Member Data Documentation

◆ mpAccess

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
Access* vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::mpAccess
private

◆ mpBitmap

template<class Access , class Bitmap , Access *(Bitmap::*)() Acquire>
Bitmap* vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::mpBitmap
private

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