diff options
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 20 | ||||
-rw-r--r-- | drawinglayer/source/processor2d/vclpixelprocessor2d.hxx | 5 |
2 files changed, 21 insertions, 4 deletions
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 1376a03ba29f..a805bd2895ff 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -62,8 +62,18 @@ namespace drawinglayer { namespace processor2d { + struct VclPixelProcessor2D::Impl + { + sal_uInt16 m_nOrigAntiAliasing; + + explicit Impl(OutputDevice const& rOutDev) + : m_nOrigAntiAliasing(rOutDev.GetAntialiasing()) + { } + }; + VclPixelProcessor2D::VclPixelProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev) - : VclProcessor2D(rViewInformation, rOutDev) + : VclProcessor2D(rViewInformation, rOutDev) + , m_pImpl(new Impl(rOutDev)) { // prepare maCurrentTransformation matrix with viewTransformation to target directly to pixels maCurrentTransformation = rViewInformation.getObjectToViewTransformation(); @@ -75,11 +85,13 @@ namespace drawinglayer // react on AntiAliasing settings if(getOptionsDrawinglayer().IsAntiAliasing()) { - mpOutputDevice->SetAntialiasing(mpOutputDevice->GetAntialiasing() | ANTIALIASING_ENABLE_B2DDRAW); + mpOutputDevice->SetAntialiasing( + m_pImpl->m_nOrigAntiAliasing | ANTIALIASING_ENABLE_B2DDRAW); } else { - mpOutputDevice->SetAntialiasing(mpOutputDevice->GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW); + mpOutputDevice->SetAntialiasing( + m_pImpl->m_nOrigAntiAliasing & ~ANTIALIASING_ENABLE_B2DDRAW); } } @@ -89,7 +101,7 @@ namespace drawinglayer mpOutputDevice->Pop(); // restore AntiAliasing - mpOutputDevice->SetAntialiasing(mpOutputDevice->GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW); + mpOutputDevice->SetAntialiasing(m_pImpl->m_nOrigAntiAliasing); } bool VclPixelProcessor2D::tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency) diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx index 2b4128925a91..a55962deb5b6 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx @@ -25,6 +25,8 @@ #include "vclprocessor2d.hxx" #include <vcl/outdev.hxx> +#include <boost/scoped_ptr.hpp> + ////////////////////////////////////////////////////////////////////////////// // predefines @@ -49,6 +51,9 @@ namespace drawinglayer class VclPixelProcessor2D : public VclProcessor2D { private: + struct Impl; + boost::scoped_ptr<Impl> m_pImpl; + protected: /* the local processor for BasePrinitive2D-Implementation based primitives, called from the common process()-implementation |