xref: /trunk/main/svx/source/sdr/overlay/overlaymanager.cxx (revision cf6516809c57e1bb0a940545cca99cdad54d4ce2)
1f6e50924SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3f6e50924SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4f6e50924SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5f6e50924SAndrew Rist  * distributed with this work for additional information
6f6e50924SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7f6e50924SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8f6e50924SAndrew Rist  * "License"); you may not use this file except in compliance
9f6e50924SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11f6e50924SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13f6e50924SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14f6e50924SAndrew Rist  * software distributed under the License is distributed on an
15f6e50924SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16f6e50924SAndrew Rist  * KIND, either express or implied.  See the License for the
17f6e50924SAndrew Rist  * specific language governing permissions and limitations
18f6e50924SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20f6e50924SAndrew Rist  *************************************************************/
21f6e50924SAndrew Rist 
22f6e50924SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_svx.hxx"
26cdf0e10cSrcweir #include <svx/sdr/overlay/overlaymanager.hxx>
27cdf0e10cSrcweir #include <basegfx/point/b2dpoint.hxx>
28cdf0e10cSrcweir #include <basegfx/range/b2drange.hxx>
29cdf0e10cSrcweir #include <tools/gen.hxx>
30cdf0e10cSrcweir #include <vcl/salbtype.hxx>
31cdf0e10cSrcweir #include <vcl/outdev.hxx>
32cdf0e10cSrcweir #include <vcl/window.hxx>
33cdf0e10cSrcweir #include <svx/sdr/overlay/overlayobject.hxx>
34cdf0e10cSrcweir #include <basegfx/matrix/b2dhommatrix.hxx>
35*a7185797SArmin Le Grand #include <drawinglayer/processor2d/processor2dtools.hxx>
36cdf0e10cSrcweir 
37cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
38cdf0e10cSrcweir 
39cdf0e10cSrcweir using namespace com::sun::star;
40cdf0e10cSrcweir 
41cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
42cdf0e10cSrcweir 
43cdf0e10cSrcweir namespace sdr
44cdf0e10cSrcweir {
45cdf0e10cSrcweir     namespace overlay
46cdf0e10cSrcweir     {
ImpDrawMembers(const basegfx::B2DRange & rRange,OutputDevice & rDestinationDevice) const47cdf0e10cSrcweir         void OverlayManager::ImpDrawMembers(const basegfx::B2DRange& rRange, OutputDevice& rDestinationDevice) const
48cdf0e10cSrcweir         {
49cdf0e10cSrcweir             const sal_uInt32 nSize(maOverlayObjects.size());
50cdf0e10cSrcweir 
51cdf0e10cSrcweir             if(nSize)
52cdf0e10cSrcweir             {
53cdf0e10cSrcweir                 const sal_uInt16 nOriginalAA(rDestinationDevice.GetAntialiasing());
54cdf0e10cSrcweir                 const bool bIsAntiAliasing(getDrawinglayerOpt().IsAntiAliasing());
55cdf0e10cSrcweir 
56cdf0e10cSrcweir                 // create processor
57*a7185797SArmin Le Grand                 drawinglayer::processor2d::BaseProcessor2D* pProcessor = drawinglayer::processor2d::createProcessor2DFromOutputDevice(
58cdf0e10cSrcweir                     rDestinationDevice,
59cdf0e10cSrcweir                     getCurrentViewInformation2D());
60cdf0e10cSrcweir 
61cdf0e10cSrcweir                 if(pProcessor)
62cdf0e10cSrcweir                 {
63cdf0e10cSrcweir                     for(OverlayObjectVector::const_iterator aIter(maOverlayObjects.begin()); aIter != maOverlayObjects.end(); aIter++)
64cdf0e10cSrcweir                     {
65cdf0e10cSrcweir                         OSL_ENSURE(*aIter, "Corrupted OverlayObject List (!)");
66cdf0e10cSrcweir                         const OverlayObject& rCandidate = **aIter;
67cdf0e10cSrcweir 
68cdf0e10cSrcweir                         if(rCandidate.isVisible())
69cdf0e10cSrcweir                         {
70cdf0e10cSrcweir                             const drawinglayer::primitive2d::Primitive2DSequence& rSequence = rCandidate.getOverlayObjectPrimitive2DSequence();
71cdf0e10cSrcweir 
72cdf0e10cSrcweir                             if(rSequence.hasElements())
73cdf0e10cSrcweir                             {
74cdf0e10cSrcweir                                 if(rRange.overlaps(rCandidate.getBaseRange()))
75cdf0e10cSrcweir                                 {
76cdf0e10cSrcweir                                     if(bIsAntiAliasing && rCandidate.allowsAntiAliase())
77cdf0e10cSrcweir                                     {
78cdf0e10cSrcweir                                         rDestinationDevice.SetAntialiasing(nOriginalAA | ANTIALIASING_ENABLE_B2DDRAW);
79cdf0e10cSrcweir                                     }
80cdf0e10cSrcweir                                     else
81cdf0e10cSrcweir                                     {
82cdf0e10cSrcweir                                         rDestinationDevice.SetAntialiasing(nOriginalAA & ~ANTIALIASING_ENABLE_B2DDRAW);
83cdf0e10cSrcweir                                     }
84cdf0e10cSrcweir 
85cdf0e10cSrcweir                                     pProcessor->process(rSequence);
86cdf0e10cSrcweir                                 }
87cdf0e10cSrcweir                             }
88cdf0e10cSrcweir                         }
89cdf0e10cSrcweir                     }
90cdf0e10cSrcweir 
91cdf0e10cSrcweir                     delete pProcessor;
92cdf0e10cSrcweir                 }
93cdf0e10cSrcweir 
94cdf0e10cSrcweir                 // restore AA settings
95cdf0e10cSrcweir                 rDestinationDevice.SetAntialiasing(nOriginalAA);
96cdf0e10cSrcweir             }
97cdf0e10cSrcweir         }
98cdf0e10cSrcweir 
ImpStripeDefinitionChanged()99cdf0e10cSrcweir         void OverlayManager::ImpStripeDefinitionChanged()
100cdf0e10cSrcweir         {
101cdf0e10cSrcweir             const sal_uInt32 nSize(maOverlayObjects.size());
102cdf0e10cSrcweir 
103cdf0e10cSrcweir             if(nSize)
104cdf0e10cSrcweir             {
105cdf0e10cSrcweir                 for(OverlayObjectVector::iterator aIter(maOverlayObjects.begin()); aIter != maOverlayObjects.end(); aIter++)
106cdf0e10cSrcweir                 {
107cdf0e10cSrcweir                     OSL_ENSURE(*aIter, "Corrupted OverlayObject List (!)");
108cdf0e10cSrcweir                     OverlayObject& rCandidate = **aIter;
109cdf0e10cSrcweir                     rCandidate.stripeDefinitionHasChanged();
110cdf0e10cSrcweir                 }
111cdf0e10cSrcweir             }
112cdf0e10cSrcweir         }
113cdf0e10cSrcweir 
getDiscreteOne() const114cdf0e10cSrcweir         double OverlayManager::getDiscreteOne() const
115cdf0e10cSrcweir         {
116cdf0e10cSrcweir             if(basegfx::fTools::equalZero(mfDiscreteOne))
117cdf0e10cSrcweir             {
118cdf0e10cSrcweir                 const basegfx::B2DVector aDiscreteInLogic(getOutputDevice().GetInverseViewTransformation() * basegfx::B2DVector(1.0, 0.0));
119cdf0e10cSrcweir                 const_cast< OverlayManager* >(this)->mfDiscreteOne = aDiscreteInLogic.getLength();
120cdf0e10cSrcweir             }
121cdf0e10cSrcweir 
122cdf0e10cSrcweir             return mfDiscreteOne;
123cdf0e10cSrcweir         }
124cdf0e10cSrcweir 
OverlayManager(OutputDevice & rOutputDevice)125a56bd57bSArmin Le Grand         OverlayManager::OverlayManager(OutputDevice& rOutputDevice)
126cdf0e10cSrcweir         :   Scheduler(),
127cdf0e10cSrcweir             rmOutputDevice(rOutputDevice),
128cdf0e10cSrcweir             maOverlayObjects(),
129cdf0e10cSrcweir             maStripeColorA(Color(COL_BLACK)),
130cdf0e10cSrcweir             maStripeColorB(Color(COL_WHITE)),
131cdf0e10cSrcweir             mnStripeLengthPixel(5),
132cdf0e10cSrcweir             maDrawinglayerOpt(),
133cdf0e10cSrcweir             maViewTransformation(),
134cdf0e10cSrcweir             maViewInformation2D(),
135cdf0e10cSrcweir             mfDiscreteOne(0.0)
136cdf0e10cSrcweir         {
137cdf0e10cSrcweir             // set Property 'ReducedDisplayQuality' to true to allow simpler interaction
138cdf0e10cSrcweir             // visualisations
139cdf0e10cSrcweir             static bool bUseReducedDisplayQualityForDrag(true);
140cdf0e10cSrcweir 
141cdf0e10cSrcweir             if(bUseReducedDisplayQualityForDrag)
142cdf0e10cSrcweir             {
143cdf0e10cSrcweir                 uno::Sequence< beans::PropertyValue > xProperties(1);
144cdf0e10cSrcweir                 xProperties[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedDisplayQuality"));
145cdf0e10cSrcweir                 xProperties[0].Value <<= true;
146cdf0e10cSrcweir                 maViewInformation2D = drawinglayer::geometry::ViewInformation2D(xProperties);
147cdf0e10cSrcweir             }
148cdf0e10cSrcweir         }
149cdf0e10cSrcweir 
getCurrentViewInformation2D() const150cdf0e10cSrcweir         const drawinglayer::geometry::ViewInformation2D OverlayManager::getCurrentViewInformation2D() const
151cdf0e10cSrcweir         {
152cdf0e10cSrcweir             if(getOutputDevice().GetViewTransformation() != maViewTransformation)
153cdf0e10cSrcweir             {
154cdf0e10cSrcweir                 basegfx::B2DRange aViewRange(maViewInformation2D.getViewport());
155cdf0e10cSrcweir 
156cdf0e10cSrcweir                 if(OUTDEV_WINDOW == getOutputDevice().GetOutDevType())
157cdf0e10cSrcweir                 {
158cdf0e10cSrcweir                     const Size aOutputSizePixel(getOutputDevice().GetOutputSizePixel());
1591cd65da9SArmin Le Grand 
1601cd65da9SArmin Le Grand                     // only set when we *have* a output size, else let aViewRange
1611cd65da9SArmin Le Grand                     // stay on empty
1621cd65da9SArmin Le Grand                     if(aOutputSizePixel.Width() && aOutputSizePixel.Height())
1631cd65da9SArmin Le Grand                     {
164cdf0e10cSrcweir                         aViewRange = basegfx::B2DRange(0.0, 0.0, aOutputSizePixel.getWidth(), aOutputSizePixel.getHeight());
165cdf0e10cSrcweir                         aViewRange.transform(getOutputDevice().GetInverseViewTransformation());
166cdf0e10cSrcweir                     }
1671cd65da9SArmin Le Grand                 }
168cdf0e10cSrcweir 
169cdf0e10cSrcweir                 OverlayManager* pThis = const_cast< OverlayManager* >(this);
170cdf0e10cSrcweir 
171cdf0e10cSrcweir                 pThis->maViewTransformation = getOutputDevice().GetViewTransformation();
172cdf0e10cSrcweir                 pThis->maViewInformation2D = drawinglayer::geometry::ViewInformation2D(
173cdf0e10cSrcweir                     maViewInformation2D.getObjectTransformation(),
174cdf0e10cSrcweir                     maViewTransformation,
175cdf0e10cSrcweir                     aViewRange,
176cdf0e10cSrcweir                     maViewInformation2D.getVisualizedPage(),
177cdf0e10cSrcweir                     maViewInformation2D.getViewTime(),
178cdf0e10cSrcweir                     maViewInformation2D.getExtendedInformationSequence());
179cdf0e10cSrcweir                 pThis->mfDiscreteOne = 0.0;
180cdf0e10cSrcweir             }
181cdf0e10cSrcweir 
182cdf0e10cSrcweir             return maViewInformation2D;
183cdf0e10cSrcweir         }
184cdf0e10cSrcweir 
impApplyRemoveActions(OverlayObject & rTarget)185cdf0e10cSrcweir         void OverlayManager::impApplyRemoveActions(OverlayObject& rTarget)
186cdf0e10cSrcweir         {
187cdf0e10cSrcweir             // handle evtl. animation
188cdf0e10cSrcweir             if(rTarget.allowsAnimation())
189cdf0e10cSrcweir             {
190cdf0e10cSrcweir                 // remove from event chain
191cdf0e10cSrcweir                 RemoveEvent(&rTarget);
192cdf0e10cSrcweir             }
193cdf0e10cSrcweir 
194cdf0e10cSrcweir             // make invisible
195cdf0e10cSrcweir             invalidateRange(rTarget.getBaseRange());
196cdf0e10cSrcweir 
197cdf0e10cSrcweir             // clear manager
198cdf0e10cSrcweir             rTarget.mpOverlayManager = 0;
199cdf0e10cSrcweir         }
200cdf0e10cSrcweir 
impApplyAddActions(OverlayObject & rTarget)201cdf0e10cSrcweir         void OverlayManager::impApplyAddActions(OverlayObject& rTarget)
202cdf0e10cSrcweir         {
203cdf0e10cSrcweir             // set manager
204cdf0e10cSrcweir             rTarget.mpOverlayManager = this;
205cdf0e10cSrcweir 
206cdf0e10cSrcweir             // make visible
207cdf0e10cSrcweir             invalidateRange(rTarget.getBaseRange());
208cdf0e10cSrcweir 
209cdf0e10cSrcweir             // handle evtl. animation
210cdf0e10cSrcweir             if(rTarget.allowsAnimation())
211cdf0e10cSrcweir             {
212cdf0e10cSrcweir                 // Trigger at current time to get alive. This will do the
213cdf0e10cSrcweir                 // object-specific next time calculation and hand over adding
214cdf0e10cSrcweir                 // again to the scheduler to the animated object, too. This works for
215cdf0e10cSrcweir                 // a paused or non-paused animator.
216cdf0e10cSrcweir                 rTarget.Trigger(GetTime());
217cdf0e10cSrcweir             }
218cdf0e10cSrcweir         }
219cdf0e10cSrcweir 
~OverlayManager()220cdf0e10cSrcweir         OverlayManager::~OverlayManager()
221cdf0e10cSrcweir         {
222cdf0e10cSrcweir             // The OverlayManager is not the owner of the OverlayObjects
223cdf0e10cSrcweir             // and thus will not delete them, but remove them. Profit here
224cdf0e10cSrcweir             // from knowing that all will be removed
225cdf0e10cSrcweir             const sal_uInt32 nSize(maOverlayObjects.size());
226cdf0e10cSrcweir 
227cdf0e10cSrcweir             if(nSize)
228cdf0e10cSrcweir             {
229cdf0e10cSrcweir                 for(OverlayObjectVector::iterator aIter(maOverlayObjects.begin()); aIter != maOverlayObjects.end(); aIter++)
230cdf0e10cSrcweir                 {
231cdf0e10cSrcweir                     OSL_ENSURE(*aIter, "Corrupted OverlayObject List (!)");
232cdf0e10cSrcweir                     OverlayObject& rCandidate = **aIter;
233cdf0e10cSrcweir                     impApplyRemoveActions(rCandidate);
234cdf0e10cSrcweir                 }
235cdf0e10cSrcweir 
236cdf0e10cSrcweir                 // erase vector
237cdf0e10cSrcweir                 maOverlayObjects.clear();
238cdf0e10cSrcweir             }
239cdf0e10cSrcweir         }
240cdf0e10cSrcweir 
completeRedraw(const Region & rRegion,OutputDevice * pPreRenderDevice) const241cdf0e10cSrcweir         void OverlayManager::completeRedraw(const Region& rRegion, OutputDevice* pPreRenderDevice) const
242cdf0e10cSrcweir         {
243cdf0e10cSrcweir             if(!rRegion.IsEmpty() && maOverlayObjects.size())
244cdf0e10cSrcweir             {
245cdf0e10cSrcweir                 // check for changed MapModes. That may influence the
246cdf0e10cSrcweir                 // logical size of pixel based OverlayObjects (like BitmapHandles)
247cdf0e10cSrcweir                 //ImpCheckMapModeChange();
248cdf0e10cSrcweir 
249cdf0e10cSrcweir                 // paint members
250cdf0e10cSrcweir                 const Rectangle aRegionBoundRect(rRegion.GetBoundRect());
251cdf0e10cSrcweir                 const basegfx::B2DRange aRegionRange(
252cdf0e10cSrcweir                     aRegionBoundRect.Left(), aRegionBoundRect.Top(),
253cdf0e10cSrcweir                     aRegionBoundRect.Right(), aRegionBoundRect.Bottom());
254cdf0e10cSrcweir 
255cdf0e10cSrcweir                 OutputDevice& rTarget = (pPreRenderDevice) ? *pPreRenderDevice : getOutputDevice();
256cdf0e10cSrcweir                 ImpDrawMembers(aRegionRange, rTarget);
257cdf0e10cSrcweir             }
258cdf0e10cSrcweir         }
259cdf0e10cSrcweir 
flush()260cdf0e10cSrcweir         void OverlayManager::flush()
261cdf0e10cSrcweir         {
262cdf0e10cSrcweir             // default has nothing to do
263cdf0e10cSrcweir         }
264cdf0e10cSrcweir 
265cdf0e10cSrcweir         // #i68597# part of content gets copied, react on it
copyArea(const Point &,const Point &,const Size &)266cdf0e10cSrcweir         void OverlayManager::copyArea(const Point& /*rDestPt*/, const Point& /*rSrcPt*/, const Size& /*rSrcSize*/)
267cdf0e10cSrcweir         {
268cdf0e10cSrcweir             // unbuffered versions do nothing here
269cdf0e10cSrcweir         }
270cdf0e10cSrcweir 
restoreBackground(const Region &) const271cdf0e10cSrcweir         void OverlayManager::restoreBackground(const Region& /*rRegion*/) const
272cdf0e10cSrcweir         {
273cdf0e10cSrcweir             // unbuffered versions do nothing here
274cdf0e10cSrcweir         }
275cdf0e10cSrcweir 
add(OverlayObject & rOverlayObject)276cdf0e10cSrcweir         void OverlayManager::add(OverlayObject& rOverlayObject)
277cdf0e10cSrcweir         {
278cdf0e10cSrcweir             OSL_ENSURE(0 == rOverlayObject.mpOverlayManager, "OverlayObject is added twice to an OverlayManager (!)");
279cdf0e10cSrcweir 
280cdf0e10cSrcweir             // add to the end of chain to preserve display order in paint
281cdf0e10cSrcweir             maOverlayObjects.push_back(&rOverlayObject);
282cdf0e10cSrcweir 
283cdf0e10cSrcweir             // execute add actions
284cdf0e10cSrcweir             impApplyAddActions(rOverlayObject);
285cdf0e10cSrcweir         }
286cdf0e10cSrcweir 
remove(OverlayObject & rOverlayObject)287cdf0e10cSrcweir         void OverlayManager::remove(OverlayObject& rOverlayObject)
288cdf0e10cSrcweir         {
289cdf0e10cSrcweir             OSL_ENSURE(rOverlayObject.mpOverlayManager == this, "OverlayObject is removed from wrong OverlayManager (!)");
290cdf0e10cSrcweir 
291cdf0e10cSrcweir             // execute remove actions
292cdf0e10cSrcweir             impApplyRemoveActions(rOverlayObject);
293cdf0e10cSrcweir 
294cdf0e10cSrcweir             // remove from vector
295cdf0e10cSrcweir             const OverlayObjectVector::iterator aFindResult = ::std::find(maOverlayObjects.begin(), maOverlayObjects.end(), &rOverlayObject);
296cdf0e10cSrcweir             const bool bFound(aFindResult != maOverlayObjects.end());
297cdf0e10cSrcweir             OSL_ENSURE(bFound, "OverlayObject NOT found at OverlayManager (!)");
298cdf0e10cSrcweir 
299cdf0e10cSrcweir             if(bFound)
300cdf0e10cSrcweir             {
301cdf0e10cSrcweir                 maOverlayObjects.erase(aFindResult);
302cdf0e10cSrcweir             }
303cdf0e10cSrcweir         }
304cdf0e10cSrcweir 
invalidateRange(const basegfx::B2DRange & rRange)305cdf0e10cSrcweir         void OverlayManager::invalidateRange(const basegfx::B2DRange& rRange)
306cdf0e10cSrcweir         {
307cdf0e10cSrcweir             if(OUTDEV_WINDOW == getOutputDevice().GetOutDevType())
308cdf0e10cSrcweir             {
309cdf0e10cSrcweir                 if(getDrawinglayerOpt().IsAntiAliasing())
310cdf0e10cSrcweir                 {
311cdf0e10cSrcweir                     // assume AA needs one pixel more and invalidate one pixel more
312cdf0e10cSrcweir                     const double fDiscreteOne(getDiscreteOne());
313cdf0e10cSrcweir                     const Rectangle aInvalidateRectangle(
314cdf0e10cSrcweir                         (sal_Int32)floor(rRange.getMinX() - fDiscreteOne),
315cdf0e10cSrcweir                         (sal_Int32)floor(rRange.getMinY() - fDiscreteOne),
316cdf0e10cSrcweir                         (sal_Int32)ceil(rRange.getMaxX() + fDiscreteOne),
317cdf0e10cSrcweir                         (sal_Int32)ceil(rRange.getMaxY() + fDiscreteOne));
318cdf0e10cSrcweir 
319cdf0e10cSrcweir                     // simply invalidate
320cdf0e10cSrcweir                     ((Window&)getOutputDevice()).Invalidate(aInvalidateRectangle, INVALIDATE_NOERASE);
321cdf0e10cSrcweir                 }
322cdf0e10cSrcweir                 else
323cdf0e10cSrcweir                 {
324cdf0e10cSrcweir                     // #i77674# transform to rectangle. Use floor/ceil to get all covered
325cdf0e10cSrcweir                     // discrete pixels, see #i75163# and OverlayManagerBuffered::invalidateRange
326cdf0e10cSrcweir                     const Rectangle aInvalidateRectangle(
327cdf0e10cSrcweir                         (sal_Int32)floor(rRange.getMinX()), (sal_Int32)floor(rRange.getMinY()),
328cdf0e10cSrcweir                         (sal_Int32)ceil(rRange.getMaxX()), (sal_Int32)ceil(rRange.getMaxY()));
329cdf0e10cSrcweir 
330cdf0e10cSrcweir                     // simply invalidate
331cdf0e10cSrcweir                     ((Window&)getOutputDevice()).Invalidate(aInvalidateRectangle, INVALIDATE_NOERASE);
332cdf0e10cSrcweir                 }
333cdf0e10cSrcweir             }
334cdf0e10cSrcweir         }
335cdf0e10cSrcweir 
336cdf0e10cSrcweir         // stripe support ColA
setStripeColorA(Color aNew)337cdf0e10cSrcweir         void OverlayManager::setStripeColorA(Color aNew)
338cdf0e10cSrcweir         {
339cdf0e10cSrcweir             if(aNew != maStripeColorA)
340cdf0e10cSrcweir             {
341cdf0e10cSrcweir                 maStripeColorA = aNew;
342cdf0e10cSrcweir                 ImpStripeDefinitionChanged();
343cdf0e10cSrcweir             }
344cdf0e10cSrcweir         }
345cdf0e10cSrcweir 
346cdf0e10cSrcweir         // stripe support ColB
setStripeColorB(Color aNew)347cdf0e10cSrcweir         void OverlayManager::setStripeColorB(Color aNew)
348cdf0e10cSrcweir         {
349cdf0e10cSrcweir             if(aNew != maStripeColorB)
350cdf0e10cSrcweir             {
351cdf0e10cSrcweir                 maStripeColorB = aNew;
352cdf0e10cSrcweir                 ImpStripeDefinitionChanged();
353cdf0e10cSrcweir             }
354cdf0e10cSrcweir         }
355cdf0e10cSrcweir 
356cdf0e10cSrcweir         // stripe support StripeLengthPixel
setStripeLengthPixel(sal_uInt32 nNew)357cdf0e10cSrcweir         void OverlayManager::setStripeLengthPixel(sal_uInt32 nNew)
358cdf0e10cSrcweir         {
359cdf0e10cSrcweir             if(nNew != mnStripeLengthPixel)
360cdf0e10cSrcweir             {
361cdf0e10cSrcweir                 mnStripeLengthPixel = nNew;
362cdf0e10cSrcweir                 ImpStripeDefinitionChanged();
363cdf0e10cSrcweir             }
364cdf0e10cSrcweir         }
365cdf0e10cSrcweir     } // end of namespace overlay
366cdf0e10cSrcweir } // end of namespace sdr
367cdf0e10cSrcweir 
368cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
369cdf0e10cSrcweir // eof
370