diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-03-28 23:30:02 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-03-29 04:21:58 +0000 |
commit | 9153a36b59f2efc2bfb2c9256c39eb5687808deb (patch) | |
tree | e2b8ce02df3a2c0d5ae7413c3b0b15c62fad4a9b /include/vcl/outdev.hxx | |
parent | bb20d37025318d5a2fb35689c26c3600a625ed68 (diff) |
fdo#74702 Refactor OutputDevice::DrawTransparent()
I have refactored OutputDevice::DrawTransparent() - functionality
is now in the functions DrawInvisiblePolygon(),
DrawTransparentNatively() and EmulateDrawTransparent().
DrawTransparentNatively() will return true if it is successful,
otherwise it will return false if it isn't possible to draw the
transparency natively. This allows us to fall back to a VCL based
emulation.
The function EmulateDrawTransparent() is virtual because Printer
handles transparencies differently to pixel based devices.
Change-Id: I300850ccea03c17673666dadd287bcddd40ec5ef
Reviewed-on: https://gerrit.libreoffice.org/8779
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'include/vcl/outdev.hxx')
-rw-r--r-- | include/vcl/outdev.hxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 35c48faeb900..8f5fd3832247 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -805,6 +805,7 @@ protected: const Point& rSrcPtPixel, const Size& rSrcSizePixel ); virtual long ImplGetGradientStepCount( long nMinRect ); + /** Transform and draw a bitmap directly @param aFullTransform The B2DHomMatrix used for the transformation @@ -839,6 +840,8 @@ protected: const Point& rSrcPtPixel, const Size& rSrcSizePixel, BitmapEx& rBitmapEx ); + virtual void EmulateDrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ); + void DrawInvisiblePolygon( const PolyPolygon& rPolyPoly ); private: typedef void ( OutputDevice::* FontUpdateHandler_t )( bool ); @@ -852,7 +855,9 @@ private: SAL_DLLPRIVATE long ImplGetGradientSteps( const Gradient& rGradient, const Rectangle& rRect, bool bMtf ); // not implemented; to detect misuses of DrawOutDev(...OutputDevice&); - void DrawOutDev( const Point&, const Size&, const Point&, const Size&, const Printer&); + void DrawOutDev( const Point&, const Size&, const Point&, const Size&, const Printer&); + + bool DrawTransparentNatively( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ); public: virtual ~OutputDevice(); |