LibreOffice Module canvas (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
vclcanvas::BitmapBackBuffer Class Reference

Backbuffer implementation for canvas bitmap. More...

#include <bitmapbackbuffer.hxx>

Inheritance diagram for vclcanvas::BitmapBackBuffer:
[legend]
Collaboration diagram for vclcanvas::BitmapBackBuffer:
[legend]

Public Member Functions

 BitmapBackBuffer (const BitmapEx &rBitmap, const OutputDevice &rRefDevice)
 Create a backbuffer for given reference device. More...
 
virtual ~BitmapBackBuffer () override
 
virtual OutputDevicegetOutDev () override
 
virtual const OutputDevicegetOutDev () const override
 
void clear ()
 Clear the underlying bitmap to white, all transparent. More...
 
BitmapExgetBitmapReference ()
 Exposing our internal bitmap. More...
 
Size getBitmapSizePixel () const
 
- Public Member Functions inherited from vclcanvas::OutDevProvider
virtual ~OutDevProvider ()
 

Private Member Functions

void createVDev () const
 
void updateVDev () const
 

Private Attributes

::canvas::vcltools::VCLObject< BitmapExmaBitmap
 
VclPtr< VirtualDevicempVDev
 
const OutputDevicemrRefDevice
 
bool mbBitmapContentIsCurrent
 When true, the bitmap contains the last valid content. More...
 
bool mbVDevContentIsCurrent
 When true, and mpVDev is non-NULL, the VDev contains the last valid content. More...
 

Detailed Description

Backbuffer implementation for canvas bitmap.

This class abstracts away the renderable bitmap for the bitmap canvas. The actual VirtualDevice is only created when necessary, which makes read-only bitmaps a lot smaller.

Definition at line 39 of file bitmapbackbuffer.hxx.

Constructor & Destructor Documentation

vclcanvas::BitmapBackBuffer::BitmapBackBuffer ( const BitmapEx rBitmap,
const OutputDevice rRefDevice 
)

Create a backbuffer for given reference device.

Definition at line 32 of file bitmapbackbuffer.cxx.

vclcanvas::BitmapBackBuffer::~BitmapBackBuffer ( )
overridevirtual

Definition at line 42 of file bitmapbackbuffer.cxx.

References VclPtr< VirtualDevice >::disposeAndClear(), and mpVDev.

Member Function Documentation

void vclcanvas::BitmapBackBuffer::clear ( )

Clear the underlying bitmap to white, all transparent.

Definition at line 65 of file bitmapbackbuffer.cxx.

References COL_TRANSPARENT(), BitmapEx::Erase(), and getBitmapReference().

void vclcanvas::BitmapBackBuffer::createVDev ( ) const
private
BitmapEx & vclcanvas::BitmapBackBuffer::getBitmapReference ( )
Size vclcanvas::BitmapBackBuffer::getBitmapSizePixel ( ) const
OutputDevice & vclcanvas::BitmapBackBuffer::getOutDev ( )
overridevirtual

Implements vclcanvas::OutDevProvider.

Definition at line 51 of file bitmapbackbuffer.cxx.

References createVDev(), mpVDev, and updateVDev().

const OutputDevice & vclcanvas::BitmapBackBuffer::getOutDev ( ) const
overridevirtual

Implements vclcanvas::OutDevProvider.

Definition at line 58 of file bitmapbackbuffer.cxx.

References createVDev(), mpVDev, and updateVDev().

void vclcanvas::BitmapBackBuffer::updateVDev ( ) const
private

Member Data Documentation

::canvas::vcltools::VCLObject<BitmapEx> vclcanvas::BitmapBackBuffer::maBitmap
private
bool vclcanvas::BitmapBackBuffer::mbBitmapContentIsCurrent
mutableprivate

When true, the bitmap contains the last valid content.

When false, and mbVDevContentIsCurrent is true, the VDev contains the last valid content (which must be copied back to the bitmap, when getBitmapReference() is called). When both are false, this object is just initialized.

Definition at line 79 of file bitmapbackbuffer.hxx.

Referenced by getBitmapReference(), and updateVDev().

bool vclcanvas::BitmapBackBuffer::mbVDevContentIsCurrent
mutableprivate

When true, and mpVDev is non-NULL, the VDev contains the last valid content.

When false, and mbBitmapContentIsCurrent is true, the bitmap contains the last valid content. When both are false, this object is just initialized.

Definition at line 87 of file bitmapbackbuffer.hxx.

Referenced by getBitmapReference(), getBitmapSizePixel(), and updateVDev().

VclPtr<VirtualDevice> vclcanvas::BitmapBackBuffer::mpVDev
mutableprivate
const OutputDevice& vclcanvas::BitmapBackBuffer::mrRefDevice
private

Definition at line 70 of file bitmapbackbuffer.hxx.

Referenced by createVDev().


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