LibreOffice Module canvas (master) 1
|
Backbuffer implementation for canvas bitmap. More...
#include <bitmapbackbuffer.hxx>
Public Member Functions | |
BitmapBackBuffer (const BitmapEx &rBitmap, const OutputDevice &rRefDevice) | |
Create a backbuffer for given reference device. More... | |
virtual | ~BitmapBackBuffer () override |
virtual OutputDevice & | getOutDev () override |
virtual const OutputDevice & | getOutDev () const override |
void | clear () |
Clear the underlying bitmap to white, all transparent. More... | |
BitmapEx & | getBitmapReference () |
Exposing our internal bitmap. More... | |
Size | getBitmapSizePixel () const |
Public Member Functions inherited from vclcanvas::OutDevProvider | |
virtual | ~OutDevProvider () |
virtual OutputDevice & | getOutDev ()=0 |
virtual const OutputDevice & | getOutDev () const =0 |
Private Member Functions | |
void | createVDev () const |
void | updateVDev () const |
Private Attributes | |
::canvas::vcltools::VCLObject< BitmapEx > | maBitmap |
VclPtr< VirtualDevice > | mpVDev |
const OutputDevice & | mrRefDevice |
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... | |
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 38 of file bitmapbackbuffer.hxx.
vclcanvas::BitmapBackBuffer::BitmapBackBuffer | ( | const BitmapEx & | rBitmap, |
const OutputDevice & | rRefDevice | ||
) |
Create a backbuffer for given reference device.
Definition at line 31 of file bitmapbackbuffer.cxx.
|
overridevirtual |
Definition at line 41 of file bitmapbackbuffer.cxx.
References VclPtr< class reference_type >::disposeAndClear(), and mpVDev.
void vclcanvas::BitmapBackBuffer::clear | ( | ) |
Clear the underlying bitmap to white, all transparent.
Definition at line 64 of file bitmapbackbuffer.cxx.
References COL_TRANSPARENT(), BitmapEx::Erase(), and getBitmapReference().
|
private |
Definition at line 107 of file bitmapbackbuffer.cxx.
References VclPtr< class reference_type >::Create(), BitmapEx::GetSizePixel(), BitmapEx::IsAlpha(), maBitmap, mpVDev, mrRefDevice, and vclcanvas::tools::SetDefaultDeviceAntiAliasing().
Referenced by getOutDev().
BitmapEx & vclcanvas::BitmapBackBuffer::getBitmapReference | ( | ) |
Exposing our internal bitmap.
Only to be used from CanvasBitmapHelper
Definition at line 70 of file bitmapbackbuffer.cxx.
References maBitmap, mbBitmapContentIsCurrent, mbVDevContentIsCurrent, and mpVDev.
Referenced by clear().
Size vclcanvas::BitmapBackBuffer::getBitmapSizePixel | ( | ) | const |
Definition at line 93 of file bitmapbackbuffer.cxx.
References BitmapEx::GetSizePixel(), maBitmap, mbVDevContentIsCurrent, and mpVDev.
|
overridevirtual |
Implements vclcanvas::OutDevProvider.
Definition at line 57 of file bitmapbackbuffer.cxx.
References createVDev(), mpVDev, and updateVDev().
|
overridevirtual |
Implements vclcanvas::OutDevProvider.
Definition at line 50 of file bitmapbackbuffer.cxx.
References createVDev(), mpVDev, and updateVDev().
|
private |
Definition at line 126 of file bitmapbackbuffer.cxx.
References maBitmap, mbBitmapContentIsCurrent, mbVDevContentIsCurrent, and mpVDev.
Referenced by getOutDev().
|
private |
Definition at line 66 of file bitmapbackbuffer.hxx.
Referenced by createVDev(), getBitmapReference(), getBitmapSizePixel(), and updateVDev().
|
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 78 of file bitmapbackbuffer.hxx.
Referenced by getBitmapReference(), and updateVDev().
|
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 86 of file bitmapbackbuffer.hxx.
Referenced by getBitmapReference(), getBitmapSizePixel(), and updateVDev().
|
mutableprivate |
Definition at line 67 of file bitmapbackbuffer.hxx.
Referenced by createVDev(), getBitmapReference(), getBitmapSizePixel(), getOutDev(), updateVDev(), and ~BitmapBackBuffer().
|
private |
Definition at line 69 of file bitmapbackbuffer.hxx.
Referenced by createVDev().