BitmapBackBuffer::~BitmapBackBuffer()
{ // make sure solar mutex is held on deletion (other methods // are supposed to be called with already locked solar mutex)
SolarMutexGuard aGuard;
void BitmapBackBuffer::clear()
{ // force current content to bitmap, make all transparent white
getBitmapReference().Erase(COL_TRANSPARENT);
}
BitmapEx& BitmapBackBuffer::getBitmapReference()
{
OSL_ENSURE( !mbBitmapContentIsCurrent || !mbVDevContentIsCurrent, "BitmapBackBuffer::getBitmapReference(): Both bitmap and VDev are valid?!" );
if( mbVDevContentIsCurrent && mpVDev )
{ // VDev content is more current than bitmap - copy contents before!
mpVDev->EnableMapMode( false );
mpVDev->SetAntialiasing( AntialiasingFlags::Enable ); const Point aEmptyPoint;
*maBitmap = mpVDev->GetBitmapEx( aEmptyPoint,
mpVDev->GetOutputSizePixel() );
}
// client queries bitmap, and will possibly alter content - // next time, VDev needs to be updated
mbBitmapContentIsCurrent = true;
mbVDevContentIsCurrent = false;
// VDev not yet created, do it now. Create an alpha-VDev, // if bitmap has transparency.
mpVDev = maBitmap->IsAlpha() ?
VclPtr<VirtualDevice>::Create( mrRefDevice, DeviceFormat::WITH_ALPHA ) :
VclPtr<VirtualDevice>::Create( mrRefDevice );
OSL_ENSURE( mpVDev, "BitmapBackBuffer::createVDev(): Unable to create VirtualDevice" );
void BitmapBackBuffer::updateVDev() const
{
OSL_ENSURE( !mbBitmapContentIsCurrent || !mbVDevContentIsCurrent, "BitmapBackBuffer::updateVDev(): Both bitmap and VDev are valid?!" );
if( mpVDev && mbBitmapContentIsCurrent )
{ // fill with bitmap content
mpVDev->EnableMapMode( false );
mpVDev->SetAntialiasing( AntialiasingFlags::Enable ); const Point aEmptyPoint;
mpVDev->DrawBitmapEx( aEmptyPoint, *maBitmap );
}
// canvas queried the VDev, and will possibly paint into // it. Next time, bitmap must be updated
mbBitmapContentIsCurrent = false;
mbVDevContentIsCurrent = true;
}
}
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.9Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.