diff options
-rw-r--r-- | include/vcl/outdev.hxx | 2 | ||||
-rw-r--r-- | include/vcl/print.hxx | 2 | ||||
-rw-r--r-- | include/vcl/virdev.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/virdev.cxx | 6 |
4 files changed, 7 insertions, 5 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 64936a956cd0..81724f297917 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -436,6 +436,8 @@ public: const Point& GetRefPoint() const { return maRefPoint; } bool IsRefPoint() const { return mbRefPoint; } + virtual bool IsScreenComp() const { return true; } + virtual sal_uInt16 GetBitCount() const; Size GetOutputSizePixel() const diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index c5167d7bd608..edc55728e5f0 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -241,6 +241,8 @@ public: const Gradient& rGradient ); virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const override; + bool IsScreenComp() const override { return false; } + protected: virtual void DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor, const Point& rDestPt, const Size& rDestSize, diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx index 51053ad37e8c..0268e49a1b1e 100644 --- a/include/vcl/virdev.hxx +++ b/include/vcl/virdev.hxx @@ -177,6 +177,8 @@ public: bool IsVirtual() const override; + bool IsScreenComp() const override { return mbScreenComp; } + private: SAL_DLLPRIVATE void ImplSetReferenceDevice( RefDevMode, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY ); diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index 0eeab8b8dd44..1bb163cda06e 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -158,15 +158,11 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, } mnOutWidth = nDX; mnOutHeight = nDY; - mbScreenComp = true; if (meFormat == DeviceFormat::BITMASK) SetAntialiasing( AntialiasingFlags::DisableText ); - if ( pOutDev->GetOutDevType() == OUTDEV_PRINTER ) - mbScreenComp = false; - else if ( pOutDev->IsVirtual() ) - mbScreenComp = static_cast<const VirtualDevice*>(pOutDev)->mbScreenComp; + mbScreenComp = pOutDev->IsScreenComp(); mbDevOutput = true; mxFontCollection = pSVData->maGDIData.mxScreenFontList; |