From c58ad39340a331ca5b77f39530f5267985b53144 Mon Sep 17 00:00:00 2001 From: Armin Weiss Date: Wed, 12 Dec 2007 12:23:40 +0000 Subject: #i39532# clipping changes --- .../drawinglayer/primitive2d/textlayoutdevice.hxx | 7 +- .../processor2d/vclpixelprocessor2d.hxx | 11 +- .../drawinglayer/processor2d/vclprocessor2d.hxx | 19 +++- .../source/primitive2d/polygonprimitive2d.cxx | 6 +- .../source/primitive2d/textlayoutdevice.cxx | 11 +- .../source/primitive2d/textprimitive2d.cxx | 14 +-- .../source/processor2d/vclmetafileprocessor2d.cxx | 19 +++- .../source/processor2d/vclpixelprocessor2d.cxx | 83 ++++++++++++-- drawinglayer/source/processor2d/vclprocessor2d.cxx | 120 ++++++++++++++++++++- 9 files changed, 245 insertions(+), 45 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx index 5b4f8879c873..4422b2b52202 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx @@ -4,9 +4,9 @@ * * $RCSfile: textlayoutdevice.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: aw $ $Date: 2007-11-19 10:21:42 $ + * last change: $Author: aw $ $Date: 2007-12-12 13:23:39 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -104,8 +104,7 @@ namespace drawinglayer basegfx::B2DPolyPolygonVector&, const String& rText, xub_StrLen nIndex, - xub_StrLen nLength, - const ::std::vector< sal_Int32 >& rDXArray); + xub_StrLen nLength); basegfx::B2DRange getTextBoundRect( const String& rText, diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclpixelprocessor2d.hxx index e2a3b8b1b4d2..b755fc0fc82d 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/vclpixelprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/vclpixelprocessor2d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: vclpixelprocessor2d.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: aw $ $Date: 2007-11-20 10:20:08 $ + * last change: $Author: aw $ $Date: 2007-12-12 13:23:39 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -40,10 +40,6 @@ #include #endif -#ifndef INCLUDED_SVTOOLS_OPTIONSDRAWINGLAYER_HXX -#include -#endif - ////////////////////////////////////////////////////////////////////////////// // predefines @@ -56,9 +52,6 @@ namespace drawinglayer class VclPixelProcessor2D : public VclProcessor2D { private: - // SvtOptionsDrawinglayer incarnation to react on diverse settings - const SvtOptionsDrawinglayer maDrawinglayerOpt; - protected: // the local processor for BasePrinitive2D-Implementation based primitives, // called from the common process()-implementation diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx index 679736ac8049..dc9bdc1d10fe 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: vclprocessor2d.hxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: aw $ $Date: 2007-11-20 10:20:08 $ + * last change: $Author: aw $ $Date: 2007-12-12 13:23:39 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -52,6 +52,10 @@ #include #endif +#ifndef INCLUDED_SVTOOLS_OPTIONSDRAWINGLAYER_HXX +#include +#endif + ////////////////////////////////////////////////////////////////////////////// // predefines class OutputDevice; @@ -93,6 +97,9 @@ namespace drawinglayer // the current transformation basegfx::B2DHomMatrix maCurrentTransformation; + // SvtOptionsDrawinglayer incarnation to react on diverse settings + const SvtOptionsDrawinglayer maDrawinglayerOpt; + ////////////////////////////////////////////////////////////////////////////// // common VCL rendering support @@ -112,6 +119,11 @@ namespace drawinglayer void RenderWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWrongSpellCandidate); void RenderPolygonStrokePrimitive2D(const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokeCandidate); + ///////////////////////////////////////////////////////////////////////////// + // DrawMode adaption support + void adaptLineToFillDrawMode() const; + void adaptTextToFillDrawMode() const; + ///////////////////////////////////////////////////////////////////////////// // FormControl support basegfx::B2DPoint PositionAndSizeControl(const primitive2d::ControlPrimitive2D& rControlPrimitive2D); @@ -132,6 +144,9 @@ namespace drawinglayer // directly when it's a BasePrinitive2D implementation. This is used as tooling from derived // implementations virtual void process(const primitive2d::Primitive2DSequence& rSource); + + // access to Drawinglayer configuration options + const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; } }; } // end of namespace processor2d } // end of namespace drawinglayer diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx index 0518665a432f..22f4551867f6 100644 --- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: polygonprimitive2d.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: aw $ $Date: 2007-11-22 15:01:17 $ + * last change: $Author: aw $ $Date: 2007-12-12 13:23:39 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -227,7 +227,7 @@ namespace drawinglayer // to be painted as a single PolyPolygon (XORed as fill rule). Alternatively, a // melting process may be used here one day. const basegfx::B2DPolyPolygon aNewPolyPolygon(aAreaPolyPolygon.getB2DPolygon(b)); - static bool bTestByUsingRandomColor(true); + static bool bTestByUsingRandomColor(false); const basegfx::BColor aColor(bTestByUsingRandomColor ? basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0) : getLineAttribute().getColor()); diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index 56d7ea292bba..aee637ce1884 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -4,9 +4,9 @@ * * $RCSfile: textlayoutdevice.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: aw $ $Date: 2007-11-19 10:21:42 $ + * last change: $Author: aw $ $Date: 2007-12-12 13:23:39 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -231,11 +231,8 @@ namespace drawinglayer basegfx::B2DPolyPolygonVector& rB2DPolyPolyVector, const String& rText, xub_StrLen nIndex, - xub_StrLen nLength, - const ::std::vector< sal_Int32 >& rDXArray) + xub_StrLen nLength) { - const sal_Int32* pDXArray = rDXArray.size() ? &rDXArray[0] : NULL; - return mrDevice.GetTextOutlines( rB2DPolyPolyVector, rText, @@ -244,7 +241,7 @@ namespace drawinglayer nLength, true, 0, - pDXArray); + 0); } basegfx::B2DRange TextLayouterDevice::getTextBoundRect( diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx index 59c9e9281a8f..ac92d4680f88 100644 --- a/drawinglayer/source/primitive2d/textprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: textprimitive2d.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: aw $ $Date: 2007-11-19 10:21:42 $ + * last change: $Author: aw $ $Date: 2007-12-12 13:23:40 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -158,13 +158,9 @@ namespace drawinglayer TextLayouterDevice aTextLayouter; aTextLayouter.setFontAttributes(getFontAttributes(), aFontScale.getX(), aFontScale.getY()); - // get integer DXArray for getTextOutlines call (ATM uses vcl, so this - // is needed) - const basegfx::B2DVector aPixelVector(getTextTransform() * basegfx::B2DVector(1.0, 0.0)); - const ::std::vector< sal_Int32 > aNewIntegerDXArray(getDXArray().size(), basegfx::fround(aPixelVector.getLength())); - - // get the text outlines - aTextLayouter.getTextOutlines(rTarget, getText(), getTextPosition(), getTextLength(), aNewIntegerDXArray); + // get the text outlines. No DXArray is given (would contain integers equal to unit vector + // transformed by object's transformation), let VCL do the job + aTextLayouter.getTextOutlines(rTarget, getText(), getTextPosition(), getTextLength()); // create primitives for the outlines const sal_uInt32 nCount(rTarget.size()); diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 63149fe24d1d..0ae5f47832e2 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: vclmetafileprocessor2d.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: aw $ $Date: 2007-11-19 10:21:42 $ + * last change: $Author: aw $ $Date: 2007-12-12 13:23:40 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1001,9 +1001,16 @@ namespace drawinglayer const primitive2d::TextSimplePortionPrimitive2D& rTextCandidate = static_cast< const primitive2d::TextSimplePortionPrimitive2D& >(rCandidate); const primitive2d::TextDecoratedPortionPrimitive2D* pTextDecoratedCandidate = dynamic_cast< const primitive2d::TextDecoratedPortionPrimitive2D* >(&rCandidate); + // Adapt evtl. used special DrawMode + const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode()); + adaptTextToFillDrawMode(); + // directdraw of text simple portion; use default processing RenderTextSimpleOrDecoratedPortionPrimitive2D(rTextCandidate); + // restore DrawMode + mpOutputDevice->SetDrawMode(nOriginalDrawMode); + if(pTextDecoratedCandidate) { // support for TEXT_ MetaFile actions only for decorated texts @@ -1075,9 +1082,17 @@ namespace drawinglayer SvtGraphicStroke* pSvtGraphicStroke = impTryToCreateSvtGraphicStroke(rStrokePrimitive.getB2DPolygon(), 0, &rStrokePrimitive.getLineAttribute(), &rStrokePrimitive.getStrokeAttribute(), 0, 0); + // Adapt OutDev's DrawMode if special ones were used + const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode()); + adaptLineToFillDrawMode(); + impStartSvtGraphicStroke(pSvtGraphicStroke); process(rCandidate.get2DDecomposition(getViewInformation2D())); impEndSvtGraphicStroke(pSvtGraphicStroke); + + // restore DrawMode + mpOutputDevice->SetDrawMode(nOriginalDrawMode); + break; } case PRIMITIVE2D_ID_POLYGONSTROKEARROWPRIMITIVE2D : diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 5ee9af406e22..8485cc647c1d 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: vclpixelprocessor2d.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: aw $ $Date: 2007-11-20 10:20:18 $ + * last change: $Author: aw $ $Date: 2007-12-12 13:23:40 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -105,6 +105,10 @@ #include #endif +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_UNIFIEDALPHAPRIMITIVE2D_HXX +#include +#endif + ////////////////////////////////////////////////////////////////////////////// namespace drawinglayer @@ -112,8 +116,7 @@ namespace drawinglayer namespace processor2d { VclPixelProcessor2D::VclPixelProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev) - : VclProcessor2D(rViewInformation, rOutDev), - maDrawinglayerOpt() + : VclProcessor2D(rViewInformation, rOutDev) { // prepare maCurrentTransformation matrix with viewTransformation to target directly to pixels maCurrentTransformation = rViewInformation.getViewTransformation(); @@ -123,7 +126,7 @@ namespace drawinglayer mpOutputDevice->SetMapMode(); // react on AntiAliasing settings - if(maDrawinglayerOpt.IsAntiAliasing()) + if(getOptionsDrawinglayer().IsAntiAliasing()) { mpOutputDevice->SetAntialiasing(mpOutputDevice->GetAntialiasing() & ~ANTIALIASING_DISABLE_POLYGONS); } @@ -166,6 +169,10 @@ namespace drawinglayer // directdraw of text simple portion; added test possibility to check text decompose static bool bHandleSimpleTextDirectly(true); + // Adapt evtl. used special DrawMode + const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode()); + adaptTextToFillDrawMode(); + if(bHandleSimpleTextDirectly) { RenderTextSimpleOrDecoratedPortionPrimitive2D(static_cast< const primitive2d::TextSimplePortionPrimitive2D& >(rCandidate)); @@ -174,6 +181,10 @@ namespace drawinglayer { process(rCandidate.get2DDecomposition(getViewInformation2D())); } + + // restore DrawMode + mpOutputDevice->SetDrawMode(nOriginalDrawMode); + break; } case PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D : @@ -181,6 +192,10 @@ namespace drawinglayer // directdraw of text simple portion; added test possibility to check text decompose static bool bHandleComplexTextDirectly(false); + // Adapt evtl. used special DrawMode + const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode()); + adaptTextToFillDrawMode(); + if(bHandleComplexTextDirectly) { RenderTextSimpleOrDecoratedPortionPrimitive2D(static_cast< const primitive2d::TextSimplePortionPrimitive2D& >(rCandidate)); @@ -189,6 +204,10 @@ namespace drawinglayer { process(rCandidate.get2DDecomposition(getViewInformation2D())); } + + // restore DrawMode + mpOutputDevice->SetDrawMode(nOriginalDrawMode); + break; } case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D : @@ -239,6 +258,48 @@ namespace drawinglayer RenderModifiedColorPrimitive2D(static_cast< const primitive2d::ModifiedColorPrimitive2D& >(rCandidate)); break; } + case PRIMITIVE2D_ID_UNIFIEDALPHAPRIMITIVE2D : + { + // Detect if a single PolyPolygonColorPrimitive2D is contained; in that case, + // use the faster OutputDevice::DrawTransparent method + const primitive2d::UnifiedAlphaPrimitive2D& rUniAlphaCandidate = static_cast< const primitive2d::UnifiedAlphaPrimitive2D& >(rCandidate); + const primitive2d::Primitive2DSequence rContent = rUniAlphaCandidate.getChildren(); + bool bCouldUseDrawTransparent(false); + + // ATM need to disable this since OutputDevice::DrawTransparent uses the + // old tools::Polygon classes and may not be sufficient here. HDU is evaluating... + static bool bAllowUsingDrawTransparent(false); + + if(bAllowUsingDrawTransparent && rContent.hasElements() && 1 == rContent.getLength()) + { + const primitive2d::Primitive2DReference xReference(rContent[0]); + const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = dynamic_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(xReference.get()); + + if(pPoPoColor && PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D == pPoPoColor->getPrimitiveID()) + { + // single transparent PolyPolygon identified, use directly + const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(pPoPoColor->getBColor())); + mpOutputDevice->SetFillColor(Color(aPolygonColor)); + mpOutputDevice->SetLineColor(); + + basegfx::B2DPolyPolygon aLocalPolyPolygon(pPoPoColor->getB2DPolyPolygon()); + aLocalPolyPolygon.transform(maCurrentTransformation); + + const PolyPolygon aToolsPolyPolygon(aLocalPolyPolygon); + const sal_uInt16 aPercentTrans(sal_uInt16(basegfx::fround(rUniAlphaCandidate.getAlpha() * 100.0))); + mpOutputDevice->DrawTransparent(aToolsPolyPolygon, aPercentTrans); + bCouldUseDrawTransparent = true; + } + } + + if(!bCouldUseDrawTransparent) + { + // use decomposition + process(rCandidate.get2DDecomposition(getViewInformation2D())); + } + + break; + } case PRIMITIVE2D_ID_ALPHAPRIMITIVE2D : { // sub-transparence group. Draw to VDev first. @@ -304,10 +365,17 @@ namespace drawinglayer } case PRIMITIVE2D_ID_POLYGONSTROKEPRIMITIVE2D: { + // the stroke primitive may be decomposed to filled polygons. To keep + // evtl. set DrawModes aka DRAWMODE_BLACKLINE, DRAWMODE_GRAYLINE, + // DRAWMODE_GHOSTEDLINE, DRAWMODE_WHITELINE or DRAWMODE_SETTINGSLINE + // working, these need to be copied to the corresponding fill modes + const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode()); + adaptLineToFillDrawMode(); + // polygon stroke primitive static bool bSuppressFatToHairlineCorrection(false); - if(maDrawinglayerOpt.IsAntiAliasing() || bSuppressFatToHairlineCorrection) + if(getOptionsDrawinglayer().IsAntiAliasing() || bSuppressFatToHairlineCorrection) { // with AA there is no need to handle thin lines special process(rCandidate.get2DDecomposition(getViewInformation2D())); @@ -323,6 +391,9 @@ namespace drawinglayer RenderPolygonStrokePrimitive2D(rPolygonStrokePrimitive); } + // restore DrawMode + mpOutputDevice->SetDrawMode(nOriginalDrawMode); + break; } default : diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 359da7b2e8e5..79088a6bf404 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: vclprocessor2d.cxx,v $ * - * $Revision: 1.22 $ + * $Revision: 1.23 $ * - * last change: $Author: aw $ $Date: 2007-12-04 15:21:39 $ + * last change: $Author: aw $ $Date: 2007-12-12 13:23:40 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1034,6 +1034,119 @@ namespace drawinglayer } } + void VclProcessor2D::adaptLineToFillDrawMode() const + { + const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode()); + + if(nOriginalDrawMode & (DRAWMODE_BLACKLINE|DRAWMODE_GRAYLINE|DRAWMODE_GHOSTEDLINE|DRAWMODE_WHITELINE|DRAWMODE_SETTINGSLINE)) + { + sal_uInt32 nAdaptedDrawMode(nOriginalDrawMode); + + if(nOriginalDrawMode & DRAWMODE_BLACKLINE) + { + nAdaptedDrawMode |= DRAWMODE_BLACKFILL; + } + else + { + nAdaptedDrawMode &= ~DRAWMODE_BLACKFILL; + } + + if(nOriginalDrawMode & DRAWMODE_GRAYLINE) + { + nAdaptedDrawMode |= DRAWMODE_GRAYFILL; + } + else + { + nAdaptedDrawMode &= ~DRAWMODE_GRAYFILL; + } + + if(nOriginalDrawMode & DRAWMODE_GHOSTEDLINE) + { + nAdaptedDrawMode |= DRAWMODE_GHOSTEDFILL; + } + else + { + nAdaptedDrawMode &= ~DRAWMODE_GHOSTEDFILL; + } + + if(nOriginalDrawMode & DRAWMODE_WHITELINE) + { + nAdaptedDrawMode |= DRAWMODE_WHITEFILL; + } + else + { + nAdaptedDrawMode &= ~DRAWMODE_WHITEFILL; + } + + if(nOriginalDrawMode & DRAWMODE_SETTINGSLINE) + { + nAdaptedDrawMode |= DRAWMODE_SETTINGSFILL; + } + else + { + nAdaptedDrawMode &= ~DRAWMODE_SETTINGSFILL; + } + + mpOutputDevice->SetDrawMode(nAdaptedDrawMode); + } + } + + void VclProcessor2D::adaptTextToFillDrawMode() const + { + const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode()); + if(nOriginalDrawMode & (DRAWMODE_BLACKTEXT|DRAWMODE_GRAYTEXT|DRAWMODE_GHOSTEDTEXT|DRAWMODE_WHITETEXT|DRAWMODE_SETTINGSTEXT)) + { + sal_uInt32 nAdaptedDrawMode(nOriginalDrawMode); + + if(nOriginalDrawMode & DRAWMODE_BLACKTEXT) + { + nAdaptedDrawMode |= DRAWMODE_BLACKFILL; + } + else + { + nAdaptedDrawMode &= ~DRAWMODE_BLACKFILL; + } + + if(nOriginalDrawMode & DRAWMODE_GRAYTEXT) + { + nAdaptedDrawMode |= DRAWMODE_GRAYFILL; + } + else + { + nAdaptedDrawMode &= ~DRAWMODE_GRAYFILL; + } + + if(nOriginalDrawMode & DRAWMODE_GHOSTEDTEXT) + { + nAdaptedDrawMode |= DRAWMODE_GHOSTEDFILL; + } + else + { + nAdaptedDrawMode &= ~DRAWMODE_GHOSTEDFILL; + } + + if(nOriginalDrawMode & DRAWMODE_WHITETEXT) + { + nAdaptedDrawMode |= DRAWMODE_WHITEFILL; + } + else + { + nAdaptedDrawMode &= ~DRAWMODE_WHITEFILL; + } + + if(nOriginalDrawMode & DRAWMODE_SETTINGSTEXT) + { + nAdaptedDrawMode |= DRAWMODE_SETTINGSFILL; + } + else + { + nAdaptedDrawMode &= ~DRAWMODE_SETTINGSFILL; + } + + mpOutputDevice->SetDrawMode(nAdaptedDrawMode); + } + } + basegfx::B2DPoint VclProcessor2D::PositionAndSizeControl(const primitive2d::ControlPrimitive2D& rControlPrimitive2D) { // prepare output for given device @@ -1106,7 +1219,8 @@ namespace drawinglayer : BaseProcessor2D(rViewInformation), mpOutputDevice(&rOutDev), maBColorModifierStack(), - maCurrentTransformation() + maCurrentTransformation(), + maDrawinglayerOpt() { // set digit language, derived from SvtCTLOptions to have the correct // number display for arabic/hindi numerals -- cgit