From 86e509b9cfc3249fc97f9f49fbeafdc4a7d8af12 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 14 May 2020 14:42:24 +0300 Subject: Consider mpAlphaVDev when processing metafile in OutputDevice::DrawOutDev Change-Id: Ia9709bba6eb2a64781297ca260341693b0e39107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95019 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 946b01e2d4a41b06415f6371b7b52dca090e7b86) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95074 --- vcl/source/outdev/outdev.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'vcl') diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 18f273b8185a..020a57a6a40c 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -415,8 +415,16 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, if ( mpMetaFile ) { - const Bitmap aBmp( rOutDev.GetBitmap( rSrcPt, rSrcSize ) ); - mpMetaFile->AddAction( new MetaBmpScaleAction( rDestPt, rDestSize, aBmp ) ); + if (rOutDev.mpAlphaVDev) + { + const BitmapEx aBmpEx(rOutDev.GetBitmapEx(rSrcPt, rSrcSize)); + mpMetaFile->AddAction(new MetaBmpExScaleAction(rDestPt, rDestSize, aBmpEx)); + } + else + { + const Bitmap aBmp(rOutDev.GetBitmap(rSrcPt, rSrcSize)); + mpMetaFile->AddAction(new MetaBmpScaleAction(rDestPt, rDestSize, aBmp)); + } } if ( !IsDeviceOutputNecessary() ) -- cgit