summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slideshow/source/engine/shapes/gdimtftools.cxx2
-rw-r--r--vcl/headless/svpgdi.cxx9
2 files changed, 9 insertions, 2 deletions
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx
index 3d7e643dfb7b..fb12c9853392 100644
--- a/slideshow/source/engine/shapes/gdimtftools.cxx
+++ b/slideshow/source/engine/shapes/gdimtftools.cxx
@@ -285,7 +285,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames,
pVDev->EnableMapMode( false );
// setup mask VDev (alpha VDev is currently rather slow)
- ScopedVclPtrInstance< VirtualDevice > pVDevMask;
+ ScopedVclPtrInstance<VirtualDevice> pVDevMask(DeviceFormat::BITMASK);
pVDevMask->SetOutputSizePixel( aAnimSize );
pVDevMask->EnableMapMode( false );
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 170d6c6087e6..5b8c0a8a66e0 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1145,7 +1145,14 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rTR,
SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeight )
{
SvpSalBitmap* pBitmap = new SvpSalBitmap();
- pBitmap->Create(Size(nWidth, nHeight), GetBitCount(), BitmapPalette());
+ BitmapPalette aPal;
+ if (GetBitCount() == 1)
+ {
+ aPal.SetEntryCount(2);
+ aPal[0] = Color(COL_BLACK);
+ aPal[1] = Color(COL_WHITE);
+ }
+ pBitmap->Create(Size(nWidth, nHeight), GetBitCount(), aPal);
cairo_surface_t* target = SvpSalGraphics::createCairoSurface(pBitmap->GetBuffer());
cairo_t* cr = cairo_create(target);