xref: /AOO41X/main/basegfx/source/range/b2dpolyrange.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2008 by Sun Microsystems, Inc.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * $RCSfile: b2dmultirange.cxx,v $
10*cdf0e10cSrcweir  * $Revision: 1.8 $
11*cdf0e10cSrcweir  *
12*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
13*cdf0e10cSrcweir  *
14*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
15*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
16*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
17*cdf0e10cSrcweir  *
18*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
19*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
22*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
23*cdf0e10cSrcweir  *
24*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
25*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
26*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
27*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
28*cdf0e10cSrcweir  *
29*cdf0e10cSrcweir  ************************************************************************/
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
32*cdf0e10cSrcweir #include "precompiled_basegfx.hxx"
33*cdf0e10cSrcweir #include <basegfx/range/b2dpolyrange.hxx>
34*cdf0e10cSrcweir 
35*cdf0e10cSrcweir #include <basegfx/range/b2drange.hxx>
36*cdf0e10cSrcweir #include <basegfx/range/b2drangeclipper.hxx>
37*cdf0e10cSrcweir #include <basegfx/tuple/b2dtuple.hxx>
38*cdf0e10cSrcweir #include <basegfx/polygon/b2dpolypolygon.hxx>
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir #include <boost/bind.hpp>
41*cdf0e10cSrcweir #include <boost/tuple/tuple.hpp>
42*cdf0e10cSrcweir #include <algorithm>
43*cdf0e10cSrcweir #include <vector>
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir static basegfx::B2VectorOrientation flipOrientation(
46*cdf0e10cSrcweir     basegfx::B2VectorOrientation eOrient)
47*cdf0e10cSrcweir {
48*cdf0e10cSrcweir     return eOrient == basegfx::ORIENTATION_POSITIVE ?
49*cdf0e10cSrcweir         basegfx::ORIENTATION_NEGATIVE : basegfx::ORIENTATION_POSITIVE;
50*cdf0e10cSrcweir }
51*cdf0e10cSrcweir 
52*cdf0e10cSrcweir namespace basegfx
53*cdf0e10cSrcweir {
54*cdf0e10cSrcweir     class ImplB2DPolyRange
55*cdf0e10cSrcweir     {
56*cdf0e10cSrcweir         void updateBounds()
57*cdf0e10cSrcweir         {
58*cdf0e10cSrcweir             maBounds.reset();
59*cdf0e10cSrcweir             std::for_each(maRanges.begin(),
60*cdf0e10cSrcweir                           maRanges.end(),
61*cdf0e10cSrcweir                           boost::bind(
62*cdf0e10cSrcweir                               (void (B2DRange::*)(const B2DRange&))(
63*cdf0e10cSrcweir                  &B2DRange::expand),
64*cdf0e10cSrcweir                               boost::ref(maBounds),
65*cdf0e10cSrcweir                               _1));
66*cdf0e10cSrcweir         }
67*cdf0e10cSrcweir 
68*cdf0e10cSrcweir     public:
69*cdf0e10cSrcweir         ImplB2DPolyRange() :
70*cdf0e10cSrcweir             maBounds(),
71*cdf0e10cSrcweir             maRanges(),
72*cdf0e10cSrcweir             maOrient()
73*cdf0e10cSrcweir         {}
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir         explicit ImplB2DPolyRange( const B2DPolyRange::ElementType& rElem ) :
76*cdf0e10cSrcweir             maBounds( boost::get<0>(rElem) ),
77*cdf0e10cSrcweir             maRanges( 1, boost::get<0>(rElem) ),
78*cdf0e10cSrcweir             maOrient( 1, boost::get<1>(rElem) )
79*cdf0e10cSrcweir         {}
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir         explicit ImplB2DPolyRange( const B2DRange& rRange, B2VectorOrientation eOrient ) :
82*cdf0e10cSrcweir             maBounds( rRange ),
83*cdf0e10cSrcweir             maRanges( 1, rRange ),
84*cdf0e10cSrcweir             maOrient( 1, eOrient )
85*cdf0e10cSrcweir         {}
86*cdf0e10cSrcweir 
87*cdf0e10cSrcweir         bool operator==(const ImplB2DPolyRange& rRHS) const
88*cdf0e10cSrcweir         {
89*cdf0e10cSrcweir             return maRanges == rRHS.maRanges && maOrient == rRHS.maOrient;
90*cdf0e10cSrcweir         }
91*cdf0e10cSrcweir 
92*cdf0e10cSrcweir         sal_uInt32 count() const
93*cdf0e10cSrcweir         {
94*cdf0e10cSrcweir             return maRanges.size();
95*cdf0e10cSrcweir         }
96*cdf0e10cSrcweir 
97*cdf0e10cSrcweir         B2DPolyRange::ElementType getElement(sal_uInt32 nIndex) const
98*cdf0e10cSrcweir         {
99*cdf0e10cSrcweir             return boost::make_tuple(maRanges[nIndex],
100*cdf0e10cSrcweir                                      maOrient[nIndex]);
101*cdf0e10cSrcweir         }
102*cdf0e10cSrcweir 
103*cdf0e10cSrcweir         void setElement(sal_uInt32 nIndex, const B2DPolyRange::ElementType& rElement )
104*cdf0e10cSrcweir         {
105*cdf0e10cSrcweir             maRanges[nIndex] = boost::get<0>(rElement);
106*cdf0e10cSrcweir             maOrient[nIndex] = boost::get<1>(rElement);
107*cdf0e10cSrcweir             updateBounds();
108*cdf0e10cSrcweir         }
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir         void setElement(sal_uInt32 nIndex, const B2DRange& rRange, B2VectorOrientation eOrient )
111*cdf0e10cSrcweir         {
112*cdf0e10cSrcweir             maRanges[nIndex] = rRange;
113*cdf0e10cSrcweir             maOrient[nIndex] = eOrient;
114*cdf0e10cSrcweir             updateBounds();
115*cdf0e10cSrcweir         }
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir         void insertElement(sal_uInt32 nIndex, const B2DPolyRange::ElementType& rElement, sal_uInt32 nCount)
118*cdf0e10cSrcweir         {
119*cdf0e10cSrcweir             maRanges.insert(maRanges.begin()+nIndex, nCount, boost::get<0>(rElement));
120*cdf0e10cSrcweir             maOrient.insert(maOrient.begin()+nIndex, nCount, boost::get<1>(rElement));
121*cdf0e10cSrcweir             maBounds.expand(boost::get<0>(rElement));
122*cdf0e10cSrcweir         }
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir         void insertElement(sal_uInt32 nIndex, const B2DRange& rRange, B2VectorOrientation eOrient, sal_uInt32 nCount)
125*cdf0e10cSrcweir         {
126*cdf0e10cSrcweir             maRanges.insert(maRanges.begin()+nIndex, nCount, rRange);
127*cdf0e10cSrcweir             maOrient.insert(maOrient.begin()+nIndex, nCount, eOrient);
128*cdf0e10cSrcweir             maBounds.expand(rRange);
129*cdf0e10cSrcweir         }
130*cdf0e10cSrcweir 
131*cdf0e10cSrcweir         void appendElement(const B2DPolyRange::ElementType& rElement, sal_uInt32 nCount)
132*cdf0e10cSrcweir         {
133*cdf0e10cSrcweir             maRanges.insert(maRanges.end(), nCount, boost::get<0>(rElement));
134*cdf0e10cSrcweir             maOrient.insert(maOrient.end(), nCount, boost::get<1>(rElement));
135*cdf0e10cSrcweir             maBounds.expand(boost::get<0>(rElement));
136*cdf0e10cSrcweir         }
137*cdf0e10cSrcweir 
138*cdf0e10cSrcweir         void appendElement(const B2DRange& rRange, B2VectorOrientation eOrient, sal_uInt32 nCount)
139*cdf0e10cSrcweir         {
140*cdf0e10cSrcweir             maRanges.insert(maRanges.end(), nCount, rRange);
141*cdf0e10cSrcweir             maOrient.insert(maOrient.end(), nCount, eOrient);
142*cdf0e10cSrcweir             maBounds.expand(rRange);
143*cdf0e10cSrcweir         }
144*cdf0e10cSrcweir 
145*cdf0e10cSrcweir         void insertPolyRange(sal_uInt32 nIndex, const ImplB2DPolyRange& rPolyRange)
146*cdf0e10cSrcweir         {
147*cdf0e10cSrcweir             maRanges.insert(maRanges.begin()+nIndex, rPolyRange.maRanges.begin(), rPolyRange.maRanges.end());
148*cdf0e10cSrcweir             maOrient.insert(maOrient.begin()+nIndex, rPolyRange.maOrient.begin(), rPolyRange.maOrient.end());
149*cdf0e10cSrcweir             updateBounds();
150*cdf0e10cSrcweir         }
151*cdf0e10cSrcweir 
152*cdf0e10cSrcweir         void appendPolyRange(const ImplB2DPolyRange& rPolyRange)
153*cdf0e10cSrcweir         {
154*cdf0e10cSrcweir             maRanges.insert(maRanges.end(),
155*cdf0e10cSrcweir                             rPolyRange.maRanges.begin(),
156*cdf0e10cSrcweir                             rPolyRange.maRanges.end());
157*cdf0e10cSrcweir             maOrient.insert(maOrient.end(),
158*cdf0e10cSrcweir                             rPolyRange.maOrient.begin(),
159*cdf0e10cSrcweir                             rPolyRange.maOrient.end());
160*cdf0e10cSrcweir             updateBounds();
161*cdf0e10cSrcweir         }
162*cdf0e10cSrcweir 
163*cdf0e10cSrcweir         void remove(sal_uInt32 nIndex, sal_uInt32 nCount)
164*cdf0e10cSrcweir         {
165*cdf0e10cSrcweir             maRanges.erase(maRanges.begin()+nIndex,maRanges.begin()+nIndex+nCount);
166*cdf0e10cSrcweir             maOrient.erase(maOrient.begin()+nIndex,maOrient.begin()+nIndex+nCount);
167*cdf0e10cSrcweir             updateBounds();
168*cdf0e10cSrcweir         }
169*cdf0e10cSrcweir 
170*cdf0e10cSrcweir         void clear()
171*cdf0e10cSrcweir         {
172*cdf0e10cSrcweir             std::vector<B2DRange> aTmpRanges;
173*cdf0e10cSrcweir             std::vector<B2VectorOrientation> aTmpOrient;
174*cdf0e10cSrcweir 
175*cdf0e10cSrcweir             maRanges.swap(aTmpRanges);
176*cdf0e10cSrcweir             maOrient.swap(aTmpOrient);
177*cdf0e10cSrcweir 
178*cdf0e10cSrcweir             maBounds.reset();
179*cdf0e10cSrcweir         }
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir         void flip()
182*cdf0e10cSrcweir         {
183*cdf0e10cSrcweir             std::for_each(maOrient.begin(),
184*cdf0e10cSrcweir                           maOrient.end(),
185*cdf0e10cSrcweir                           boost::bind(
186*cdf0e10cSrcweir                               &flipOrientation,
187*cdf0e10cSrcweir                               _1));
188*cdf0e10cSrcweir         }
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir         B2DRange getBounds() const
191*cdf0e10cSrcweir         {
192*cdf0e10cSrcweir             return maBounds;
193*cdf0e10cSrcweir         }
194*cdf0e10cSrcweir 
195*cdf0e10cSrcweir 		template< typename ValueType > bool isInside( const ValueType& rValue ) const
196*cdf0e10cSrcweir         {
197*cdf0e10cSrcweir             if( !maBounds.isInside( rValue ) )
198*cdf0e10cSrcweir                 return false;
199*cdf0e10cSrcweir 
200*cdf0e10cSrcweir             // cannot use boost::bind here, since isInside is overloaded.
201*cdf0e10cSrcweir             // It is currently not possible to resolve the overload
202*cdf0e10cSrcweir             // by considering one of the other template arguments.
203*cdf0e10cSrcweir             std::vector<B2DRange>::const_iterator 		aCurr( maRanges.begin() );
204*cdf0e10cSrcweir             const std::vector<B2DRange>::const_iterator aEnd ( maRanges.end() );
205*cdf0e10cSrcweir             while( aCurr != aEnd )
206*cdf0e10cSrcweir                 if( aCurr->isInside( rValue ) )
207*cdf0e10cSrcweir                     return true;
208*cdf0e10cSrcweir 
209*cdf0e10cSrcweir             return false;
210*cdf0e10cSrcweir         }
211*cdf0e10cSrcweir 
212*cdf0e10cSrcweir 		bool overlaps( const B2DRange& rRange ) const
213*cdf0e10cSrcweir         {
214*cdf0e10cSrcweir             if( !maBounds.overlaps( rRange ) )
215*cdf0e10cSrcweir                 return false;
216*cdf0e10cSrcweir 
217*cdf0e10cSrcweir             const std::vector<B2DRange>::const_iterator aEnd( maRanges.end() );
218*cdf0e10cSrcweir             return std::find_if( maRanges.begin(),
219*cdf0e10cSrcweir                                  aEnd,
220*cdf0e10cSrcweir                                  boost::bind<bool>( boost::mem_fn( &B2DRange::overlaps ),
221*cdf0e10cSrcweir                                                     _1,
222*cdf0e10cSrcweir                                                     boost::cref(rRange) ) ) != aEnd;
223*cdf0e10cSrcweir         }
224*cdf0e10cSrcweir 
225*cdf0e10cSrcweir         B2DPolyPolygon solveCrossovers() const
226*cdf0e10cSrcweir         {
227*cdf0e10cSrcweir             return tools::solveCrossovers(maRanges,maOrient);
228*cdf0e10cSrcweir         }
229*cdf0e10cSrcweir 
230*cdf0e10cSrcweir         const B2DRange* begin() const
231*cdf0e10cSrcweir         {
232*cdf0e10cSrcweir             if(maRanges.empty())
233*cdf0e10cSrcweir                 return 0;
234*cdf0e10cSrcweir             else
235*cdf0e10cSrcweir                 return &maRanges.front();
236*cdf0e10cSrcweir         }
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir         const B2DRange* end() const
239*cdf0e10cSrcweir         {
240*cdf0e10cSrcweir             if(maRanges.empty())
241*cdf0e10cSrcweir                 return 0;
242*cdf0e10cSrcweir             else
243*cdf0e10cSrcweir                 return (&maRanges.back())+1;
244*cdf0e10cSrcweir         }
245*cdf0e10cSrcweir 
246*cdf0e10cSrcweir         B2DRange* begin()
247*cdf0e10cSrcweir         {
248*cdf0e10cSrcweir             if(maRanges.empty())
249*cdf0e10cSrcweir                 return 0;
250*cdf0e10cSrcweir             else
251*cdf0e10cSrcweir                 return &maRanges.front();
252*cdf0e10cSrcweir         }
253*cdf0e10cSrcweir 
254*cdf0e10cSrcweir         B2DRange* end()
255*cdf0e10cSrcweir         {
256*cdf0e10cSrcweir             if(maRanges.empty())
257*cdf0e10cSrcweir                 return 0;
258*cdf0e10cSrcweir             else
259*cdf0e10cSrcweir                 return (&maRanges.back())+1;
260*cdf0e10cSrcweir         }
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir     private:
263*cdf0e10cSrcweir         B2DRange						 maBounds;
264*cdf0e10cSrcweir         std::vector<B2DRange>			 maRanges;
265*cdf0e10cSrcweir         std::vector<B2VectorOrientation> maOrient;
266*cdf0e10cSrcweir     };
267*cdf0e10cSrcweir 
268*cdf0e10cSrcweir     B2DPolyRange::B2DPolyRange() :
269*cdf0e10cSrcweir         mpImpl()
270*cdf0e10cSrcweir     {}
271*cdf0e10cSrcweir 
272*cdf0e10cSrcweir     B2DPolyRange::~B2DPolyRange()
273*cdf0e10cSrcweir     {}
274*cdf0e10cSrcweir 
275*cdf0e10cSrcweir     B2DPolyRange::B2DPolyRange( const ElementType& rElem ) :
276*cdf0e10cSrcweir         mpImpl( ImplB2DPolyRange( rElem ) )
277*cdf0e10cSrcweir     {}
278*cdf0e10cSrcweir 
279*cdf0e10cSrcweir     B2DPolyRange::B2DPolyRange( const B2DRange& rRange, B2VectorOrientation eOrient ) :
280*cdf0e10cSrcweir         mpImpl( ImplB2DPolyRange( rRange, eOrient ) )
281*cdf0e10cSrcweir     {}
282*cdf0e10cSrcweir 
283*cdf0e10cSrcweir     B2DPolyRange::B2DPolyRange( const B2DPolyRange& rRange ) :
284*cdf0e10cSrcweir         mpImpl( rRange.mpImpl )
285*cdf0e10cSrcweir     {}
286*cdf0e10cSrcweir 
287*cdf0e10cSrcweir     B2DPolyRange& B2DPolyRange::operator=( const B2DPolyRange& rRange )
288*cdf0e10cSrcweir     {
289*cdf0e10cSrcweir         mpImpl = rRange.mpImpl;
290*cdf0e10cSrcweir         return *this;
291*cdf0e10cSrcweir     }
292*cdf0e10cSrcweir 
293*cdf0e10cSrcweir     void B2DPolyRange::makeUnique()
294*cdf0e10cSrcweir     {
295*cdf0e10cSrcweir         mpImpl.make_unique();
296*cdf0e10cSrcweir     }
297*cdf0e10cSrcweir 
298*cdf0e10cSrcweir     bool B2DPolyRange::operator==(const B2DPolyRange& rRange) const
299*cdf0e10cSrcweir     {
300*cdf0e10cSrcweir         if(mpImpl.same_object(rRange.mpImpl))
301*cdf0e10cSrcweir             return true;
302*cdf0e10cSrcweir 
303*cdf0e10cSrcweir         return ((*mpImpl) == (*rRange.mpImpl));
304*cdf0e10cSrcweir     }
305*cdf0e10cSrcweir 
306*cdf0e10cSrcweir     bool B2DPolyRange::operator!=(const B2DPolyRange& rRange) const
307*cdf0e10cSrcweir     {
308*cdf0e10cSrcweir         return !(*this == rRange);
309*cdf0e10cSrcweir     }
310*cdf0e10cSrcweir 
311*cdf0e10cSrcweir     sal_uInt32 B2DPolyRange::count() const
312*cdf0e10cSrcweir     {
313*cdf0e10cSrcweir         return mpImpl->count();
314*cdf0e10cSrcweir     }
315*cdf0e10cSrcweir 
316*cdf0e10cSrcweir     B2DPolyRange::ElementType B2DPolyRange::getElement(sal_uInt32 nIndex) const
317*cdf0e10cSrcweir     {
318*cdf0e10cSrcweir         return mpImpl->getElement(nIndex);
319*cdf0e10cSrcweir     }
320*cdf0e10cSrcweir 
321*cdf0e10cSrcweir     void B2DPolyRange::setElement(sal_uInt32 nIndex, const ElementType& rElement )
322*cdf0e10cSrcweir     {
323*cdf0e10cSrcweir         mpImpl->setElement(nIndex, rElement);
324*cdf0e10cSrcweir     }
325*cdf0e10cSrcweir 
326*cdf0e10cSrcweir     void B2DPolyRange::setElement(sal_uInt32 nIndex, const B2DRange& rRange, B2VectorOrientation eOrient )
327*cdf0e10cSrcweir     {
328*cdf0e10cSrcweir         mpImpl->setElement(nIndex, rRange, eOrient );
329*cdf0e10cSrcweir     }
330*cdf0e10cSrcweir 
331*cdf0e10cSrcweir     void B2DPolyRange::insertElement(sal_uInt32 nIndex, const ElementType& rElement, sal_uInt32 nCount)
332*cdf0e10cSrcweir     {
333*cdf0e10cSrcweir         mpImpl->insertElement(nIndex, rElement, nCount );
334*cdf0e10cSrcweir     }
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir     void B2DPolyRange::insertElement(sal_uInt32 nIndex, const B2DRange& rRange, B2VectorOrientation eOrient, sal_uInt32 nCount)
337*cdf0e10cSrcweir     {
338*cdf0e10cSrcweir         mpImpl->insertElement(nIndex, rRange, eOrient, nCount );
339*cdf0e10cSrcweir     }
340*cdf0e10cSrcweir 
341*cdf0e10cSrcweir     void B2DPolyRange::appendElement(const ElementType& rElement, sal_uInt32 nCount)
342*cdf0e10cSrcweir     {
343*cdf0e10cSrcweir         mpImpl->appendElement(rElement, nCount);
344*cdf0e10cSrcweir     }
345*cdf0e10cSrcweir 
346*cdf0e10cSrcweir     void B2DPolyRange::appendElement(const B2DRange& rRange, B2VectorOrientation eOrient, sal_uInt32 nCount)
347*cdf0e10cSrcweir     {
348*cdf0e10cSrcweir         mpImpl->appendElement(rRange, eOrient, nCount );
349*cdf0e10cSrcweir     }
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir     void B2DPolyRange::insertPolyRange(sal_uInt32 nIndex, const B2DPolyRange& rRange)
352*cdf0e10cSrcweir     {
353*cdf0e10cSrcweir         mpImpl->insertPolyRange(nIndex, *rRange.mpImpl);
354*cdf0e10cSrcweir     }
355*cdf0e10cSrcweir 
356*cdf0e10cSrcweir     void B2DPolyRange::appendPolyRange(const B2DPolyRange& rRange)
357*cdf0e10cSrcweir     {
358*cdf0e10cSrcweir         mpImpl->appendPolyRange(*rRange.mpImpl);
359*cdf0e10cSrcweir     }
360*cdf0e10cSrcweir 
361*cdf0e10cSrcweir     void B2DPolyRange::remove(sal_uInt32 nIndex, sal_uInt32 nCount)
362*cdf0e10cSrcweir     {
363*cdf0e10cSrcweir         mpImpl->remove(nIndex, nCount);
364*cdf0e10cSrcweir     }
365*cdf0e10cSrcweir 
366*cdf0e10cSrcweir     void B2DPolyRange::clear()
367*cdf0e10cSrcweir     {
368*cdf0e10cSrcweir         mpImpl->clear();
369*cdf0e10cSrcweir     }
370*cdf0e10cSrcweir 
371*cdf0e10cSrcweir     void B2DPolyRange::flip()
372*cdf0e10cSrcweir     {
373*cdf0e10cSrcweir         mpImpl->flip();
374*cdf0e10cSrcweir     }
375*cdf0e10cSrcweir 
376*cdf0e10cSrcweir     B2DRange B2DPolyRange::getBounds() const
377*cdf0e10cSrcweir     {
378*cdf0e10cSrcweir         return mpImpl->getBounds();
379*cdf0e10cSrcweir     }
380*cdf0e10cSrcweir 
381*cdf0e10cSrcweir     bool B2DPolyRange::isInside( const B2DTuple& rTuple ) const
382*cdf0e10cSrcweir     {
383*cdf0e10cSrcweir         return mpImpl->isInside(rTuple);
384*cdf0e10cSrcweir     }
385*cdf0e10cSrcweir 
386*cdf0e10cSrcweir     bool B2DPolyRange::isInside( const B2DRange& rRange ) const
387*cdf0e10cSrcweir     {
388*cdf0e10cSrcweir         return mpImpl->isInside(rRange);
389*cdf0e10cSrcweir     }
390*cdf0e10cSrcweir 
391*cdf0e10cSrcweir     bool B2DPolyRange::overlaps( const B2DRange& rRange ) const
392*cdf0e10cSrcweir     {
393*cdf0e10cSrcweir         return mpImpl->overlaps(rRange);
394*cdf0e10cSrcweir     }
395*cdf0e10cSrcweir 
396*cdf0e10cSrcweir     B2DPolyPolygon B2DPolyRange::solveCrossovers() const
397*cdf0e10cSrcweir     {
398*cdf0e10cSrcweir         return mpImpl->solveCrossovers();
399*cdf0e10cSrcweir     }
400*cdf0e10cSrcweir 
401*cdf0e10cSrcweir     const B2DRange* B2DPolyRange::begin() const
402*cdf0e10cSrcweir     {
403*cdf0e10cSrcweir         return mpImpl->begin();
404*cdf0e10cSrcweir     }
405*cdf0e10cSrcweir 
406*cdf0e10cSrcweir     const B2DRange* B2DPolyRange::end() const
407*cdf0e10cSrcweir     {
408*cdf0e10cSrcweir         return mpImpl->end();
409*cdf0e10cSrcweir     }
410*cdf0e10cSrcweir 
411*cdf0e10cSrcweir     B2DRange* B2DPolyRange::begin()
412*cdf0e10cSrcweir     {
413*cdf0e10cSrcweir         return mpImpl->begin();
414*cdf0e10cSrcweir     }
415*cdf0e10cSrcweir 
416*cdf0e10cSrcweir     B2DRange* B2DPolyRange::end()
417*cdf0e10cSrcweir     {
418*cdf0e10cSrcweir         return mpImpl->end();
419*cdf0e10cSrcweir     }
420*cdf0e10cSrcweir 
421*cdf0e10cSrcweir } // end of namespace basegfx
422*cdf0e10cSrcweir 
423*cdf0e10cSrcweir // eof
424