1*09dbbe93SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*09dbbe93SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*09dbbe93SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*09dbbe93SAndrew Rist  * distributed with this work for additional information
6*09dbbe93SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*09dbbe93SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*09dbbe93SAndrew Rist  * "License"); you may not use this file except in compliance
9*09dbbe93SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*09dbbe93SAndrew Rist  *
11*09dbbe93SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*09dbbe93SAndrew Rist  *
13*09dbbe93SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*09dbbe93SAndrew Rist  * software distributed under the License is distributed on an
15*09dbbe93SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*09dbbe93SAndrew Rist  * KIND, either express or implied.  See the License for the
17*09dbbe93SAndrew Rist  * specific language governing permissions and limitations
18*09dbbe93SAndrew Rist  * under the License.
19*09dbbe93SAndrew Rist  *
20*09dbbe93SAndrew Rist  *************************************************************/
21*09dbbe93SAndrew Rist 
22*09dbbe93SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_basegfx.hxx"
26cdf0e10cSrcweir #include <basegfx/range/b2dpolyrange.hxx>
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <basegfx/range/b2drange.hxx>
29cdf0e10cSrcweir #include <basegfx/range/b2drangeclipper.hxx>
30cdf0e10cSrcweir #include <basegfx/tuple/b2dtuple.hxx>
31cdf0e10cSrcweir #include <basegfx/polygon/b2dpolypolygon.hxx>
32cdf0e10cSrcweir 
33cdf0e10cSrcweir #include <boost/bind.hpp>
34cdf0e10cSrcweir #include <boost/tuple/tuple.hpp>
35cdf0e10cSrcweir #include <algorithm>
36cdf0e10cSrcweir #include <vector>
37cdf0e10cSrcweir 
flipOrientation(basegfx::B2VectorOrientation eOrient)38cdf0e10cSrcweir static basegfx::B2VectorOrientation flipOrientation(
39cdf0e10cSrcweir     basegfx::B2VectorOrientation eOrient)
40cdf0e10cSrcweir {
41cdf0e10cSrcweir     return eOrient == basegfx::ORIENTATION_POSITIVE ?
42cdf0e10cSrcweir         basegfx::ORIENTATION_NEGATIVE : basegfx::ORIENTATION_POSITIVE;
43cdf0e10cSrcweir }
44cdf0e10cSrcweir 
45cdf0e10cSrcweir namespace basegfx
46cdf0e10cSrcweir {
47cdf0e10cSrcweir     class ImplB2DPolyRange
48cdf0e10cSrcweir     {
updateBounds()49cdf0e10cSrcweir         void updateBounds()
50cdf0e10cSrcweir         {
51cdf0e10cSrcweir             maBounds.reset();
52cdf0e10cSrcweir             std::for_each(maRanges.begin(),
53cdf0e10cSrcweir                           maRanges.end(),
54cdf0e10cSrcweir                           boost::bind(
55cdf0e10cSrcweir                               (void (B2DRange::*)(const B2DRange&))(
56cdf0e10cSrcweir                  &B2DRange::expand),
57cdf0e10cSrcweir                               boost::ref(maBounds),
58cdf0e10cSrcweir                               _1));
59cdf0e10cSrcweir         }
60cdf0e10cSrcweir 
61cdf0e10cSrcweir     public:
ImplB2DPolyRange()62cdf0e10cSrcweir         ImplB2DPolyRange() :
63cdf0e10cSrcweir             maBounds(),
64cdf0e10cSrcweir             maRanges(),
65cdf0e10cSrcweir             maOrient()
66cdf0e10cSrcweir         {}
67cdf0e10cSrcweir 
ImplB2DPolyRange(const B2DPolyRange::ElementType & rElem)68cdf0e10cSrcweir         explicit ImplB2DPolyRange( const B2DPolyRange::ElementType& rElem ) :
69cdf0e10cSrcweir             maBounds( boost::get<0>(rElem) ),
70cdf0e10cSrcweir             maRanges( 1, boost::get<0>(rElem) ),
71cdf0e10cSrcweir             maOrient( 1, boost::get<1>(rElem) )
72cdf0e10cSrcweir         {}
73cdf0e10cSrcweir 
ImplB2DPolyRange(const B2DRange & rRange,B2VectorOrientation eOrient)74cdf0e10cSrcweir         explicit ImplB2DPolyRange( const B2DRange& rRange, B2VectorOrientation eOrient ) :
75cdf0e10cSrcweir             maBounds( rRange ),
76cdf0e10cSrcweir             maRanges( 1, rRange ),
77cdf0e10cSrcweir             maOrient( 1, eOrient )
78cdf0e10cSrcweir         {}
79cdf0e10cSrcweir 
operator ==(const ImplB2DPolyRange & rRHS) const80cdf0e10cSrcweir         bool operator==(const ImplB2DPolyRange& rRHS) const
81cdf0e10cSrcweir         {
82cdf0e10cSrcweir             return maRanges == rRHS.maRanges && maOrient == rRHS.maOrient;
83cdf0e10cSrcweir         }
84cdf0e10cSrcweir 
count() const85cdf0e10cSrcweir         sal_uInt32 count() const
86cdf0e10cSrcweir         {
87cdf0e10cSrcweir             return maRanges.size();
88cdf0e10cSrcweir         }
89cdf0e10cSrcweir 
getElement(sal_uInt32 nIndex) const90cdf0e10cSrcweir         B2DPolyRange::ElementType getElement(sal_uInt32 nIndex) const
91cdf0e10cSrcweir         {
92cdf0e10cSrcweir             return boost::make_tuple(maRanges[nIndex],
93cdf0e10cSrcweir                                      maOrient[nIndex]);
94cdf0e10cSrcweir         }
95cdf0e10cSrcweir 
setElement(sal_uInt32 nIndex,const B2DPolyRange::ElementType & rElement)96cdf0e10cSrcweir         void setElement(sal_uInt32 nIndex, const B2DPolyRange::ElementType& rElement )
97cdf0e10cSrcweir         {
98cdf0e10cSrcweir             maRanges[nIndex] = boost::get<0>(rElement);
99cdf0e10cSrcweir             maOrient[nIndex] = boost::get<1>(rElement);
100cdf0e10cSrcweir             updateBounds();
101cdf0e10cSrcweir         }
102cdf0e10cSrcweir 
setElement(sal_uInt32 nIndex,const B2DRange & rRange,B2VectorOrientation eOrient)103cdf0e10cSrcweir         void setElement(sal_uInt32 nIndex, const B2DRange& rRange, B2VectorOrientation eOrient )
104cdf0e10cSrcweir         {
105cdf0e10cSrcweir             maRanges[nIndex] = rRange;
106cdf0e10cSrcweir             maOrient[nIndex] = eOrient;
107cdf0e10cSrcweir             updateBounds();
108cdf0e10cSrcweir         }
109cdf0e10cSrcweir 
insertElement(sal_uInt32 nIndex,const B2DPolyRange::ElementType & rElement,sal_uInt32 nCount)110cdf0e10cSrcweir         void insertElement(sal_uInt32 nIndex, const B2DPolyRange::ElementType& rElement, sal_uInt32 nCount)
111cdf0e10cSrcweir         {
112cdf0e10cSrcweir             maRanges.insert(maRanges.begin()+nIndex, nCount, boost::get<0>(rElement));
113cdf0e10cSrcweir             maOrient.insert(maOrient.begin()+nIndex, nCount, boost::get<1>(rElement));
114cdf0e10cSrcweir             maBounds.expand(boost::get<0>(rElement));
115cdf0e10cSrcweir         }
116cdf0e10cSrcweir 
insertElement(sal_uInt32 nIndex,const B2DRange & rRange,B2VectorOrientation eOrient,sal_uInt32 nCount)117cdf0e10cSrcweir         void insertElement(sal_uInt32 nIndex, const B2DRange& rRange, B2VectorOrientation eOrient, sal_uInt32 nCount)
118cdf0e10cSrcweir         {
119cdf0e10cSrcweir             maRanges.insert(maRanges.begin()+nIndex, nCount, rRange);
120cdf0e10cSrcweir             maOrient.insert(maOrient.begin()+nIndex, nCount, eOrient);
121cdf0e10cSrcweir             maBounds.expand(rRange);
122cdf0e10cSrcweir         }
123cdf0e10cSrcweir 
appendElement(const B2DPolyRange::ElementType & rElement,sal_uInt32 nCount)124cdf0e10cSrcweir         void appendElement(const B2DPolyRange::ElementType& rElement, sal_uInt32 nCount)
125cdf0e10cSrcweir         {
126cdf0e10cSrcweir             maRanges.insert(maRanges.end(), nCount, boost::get<0>(rElement));
127cdf0e10cSrcweir             maOrient.insert(maOrient.end(), nCount, boost::get<1>(rElement));
128cdf0e10cSrcweir             maBounds.expand(boost::get<0>(rElement));
129cdf0e10cSrcweir         }
130cdf0e10cSrcweir 
appendElement(const B2DRange & rRange,B2VectorOrientation eOrient,sal_uInt32 nCount)131cdf0e10cSrcweir         void appendElement(const B2DRange& rRange, B2VectorOrientation eOrient, sal_uInt32 nCount)
132cdf0e10cSrcweir         {
133cdf0e10cSrcweir             maRanges.insert(maRanges.end(), nCount, rRange);
134cdf0e10cSrcweir             maOrient.insert(maOrient.end(), nCount, eOrient);
135cdf0e10cSrcweir             maBounds.expand(rRange);
136cdf0e10cSrcweir         }
137cdf0e10cSrcweir 
insertPolyRange(sal_uInt32 nIndex,const ImplB2DPolyRange & rPolyRange)138cdf0e10cSrcweir         void insertPolyRange(sal_uInt32 nIndex, const ImplB2DPolyRange& rPolyRange)
139cdf0e10cSrcweir         {
140cdf0e10cSrcweir             maRanges.insert(maRanges.begin()+nIndex, rPolyRange.maRanges.begin(), rPolyRange.maRanges.end());
141cdf0e10cSrcweir             maOrient.insert(maOrient.begin()+nIndex, rPolyRange.maOrient.begin(), rPolyRange.maOrient.end());
142cdf0e10cSrcweir             updateBounds();
143cdf0e10cSrcweir         }
144cdf0e10cSrcweir 
appendPolyRange(const ImplB2DPolyRange & rPolyRange)145cdf0e10cSrcweir         void appendPolyRange(const ImplB2DPolyRange& rPolyRange)
146cdf0e10cSrcweir         {
147cdf0e10cSrcweir             maRanges.insert(maRanges.end(),
148cdf0e10cSrcweir                             rPolyRange.maRanges.begin(),
149cdf0e10cSrcweir                             rPolyRange.maRanges.end());
150cdf0e10cSrcweir             maOrient.insert(maOrient.end(),
151cdf0e10cSrcweir                             rPolyRange.maOrient.begin(),
152cdf0e10cSrcweir                             rPolyRange.maOrient.end());
153cdf0e10cSrcweir             updateBounds();
154cdf0e10cSrcweir         }
155cdf0e10cSrcweir 
remove(sal_uInt32 nIndex,sal_uInt32 nCount)156cdf0e10cSrcweir         void remove(sal_uInt32 nIndex, sal_uInt32 nCount)
157cdf0e10cSrcweir         {
158cdf0e10cSrcweir             maRanges.erase(maRanges.begin()+nIndex,maRanges.begin()+nIndex+nCount);
159cdf0e10cSrcweir             maOrient.erase(maOrient.begin()+nIndex,maOrient.begin()+nIndex+nCount);
160cdf0e10cSrcweir             updateBounds();
161cdf0e10cSrcweir         }
162cdf0e10cSrcweir 
clear()163cdf0e10cSrcweir         void clear()
164cdf0e10cSrcweir         {
165cdf0e10cSrcweir             std::vector<B2DRange> aTmpRanges;
166cdf0e10cSrcweir             std::vector<B2VectorOrientation> aTmpOrient;
167cdf0e10cSrcweir 
168cdf0e10cSrcweir             maRanges.swap(aTmpRanges);
169cdf0e10cSrcweir             maOrient.swap(aTmpOrient);
170cdf0e10cSrcweir 
171cdf0e10cSrcweir             maBounds.reset();
172cdf0e10cSrcweir         }
173cdf0e10cSrcweir 
flip()174cdf0e10cSrcweir         void flip()
175cdf0e10cSrcweir         {
176cdf0e10cSrcweir             std::for_each(maOrient.begin(),
177cdf0e10cSrcweir                           maOrient.end(),
178cdf0e10cSrcweir                           boost::bind(
179cdf0e10cSrcweir                               &flipOrientation,
180cdf0e10cSrcweir                               _1));
181cdf0e10cSrcweir         }
182cdf0e10cSrcweir 
getBounds() const183cdf0e10cSrcweir         B2DRange getBounds() const
184cdf0e10cSrcweir         {
185cdf0e10cSrcweir             return maBounds;
186cdf0e10cSrcweir         }
187cdf0e10cSrcweir 
isInside(const ValueType & rValue) const188cdf0e10cSrcweir 		template< typename ValueType > bool isInside( const ValueType& rValue ) const
189cdf0e10cSrcweir         {
190cdf0e10cSrcweir             if( !maBounds.isInside( rValue ) )
191cdf0e10cSrcweir                 return false;
192cdf0e10cSrcweir 
193cdf0e10cSrcweir             // cannot use boost::bind here, since isInside is overloaded.
194cdf0e10cSrcweir             // It is currently not possible to resolve the overload
195cdf0e10cSrcweir             // by considering one of the other template arguments.
196cdf0e10cSrcweir             std::vector<B2DRange>::const_iterator 		aCurr( maRanges.begin() );
197cdf0e10cSrcweir             const std::vector<B2DRange>::const_iterator aEnd ( maRanges.end() );
198cdf0e10cSrcweir             while( aCurr != aEnd )
199cdf0e10cSrcweir                 if( aCurr->isInside( rValue ) )
200cdf0e10cSrcweir                     return true;
201cdf0e10cSrcweir 
202cdf0e10cSrcweir             return false;
203cdf0e10cSrcweir         }
204cdf0e10cSrcweir 
overlaps(const B2DRange & rRange) const205cdf0e10cSrcweir 		bool overlaps( const B2DRange& rRange ) const
206cdf0e10cSrcweir         {
207cdf0e10cSrcweir             if( !maBounds.overlaps( rRange ) )
208cdf0e10cSrcweir                 return false;
209cdf0e10cSrcweir 
210cdf0e10cSrcweir             const std::vector<B2DRange>::const_iterator aEnd( maRanges.end() );
211cdf0e10cSrcweir             return std::find_if( maRanges.begin(),
212cdf0e10cSrcweir                                  aEnd,
213cdf0e10cSrcweir                                  boost::bind<bool>( boost::mem_fn( &B2DRange::overlaps ),
214cdf0e10cSrcweir                                                     _1,
215cdf0e10cSrcweir                                                     boost::cref(rRange) ) ) != aEnd;
216cdf0e10cSrcweir         }
217cdf0e10cSrcweir 
solveCrossovers() const218cdf0e10cSrcweir         B2DPolyPolygon solveCrossovers() const
219cdf0e10cSrcweir         {
220cdf0e10cSrcweir             return tools::solveCrossovers(maRanges,maOrient);
221cdf0e10cSrcweir         }
222cdf0e10cSrcweir 
begin() const223cdf0e10cSrcweir         const B2DRange* begin() const
224cdf0e10cSrcweir         {
225cdf0e10cSrcweir             if(maRanges.empty())
226cdf0e10cSrcweir                 return 0;
227cdf0e10cSrcweir             else
228cdf0e10cSrcweir                 return &maRanges.front();
229cdf0e10cSrcweir         }
230cdf0e10cSrcweir 
end() const231cdf0e10cSrcweir         const B2DRange* end() const
232cdf0e10cSrcweir         {
233cdf0e10cSrcweir             if(maRanges.empty())
234cdf0e10cSrcweir                 return 0;
235cdf0e10cSrcweir             else
236cdf0e10cSrcweir                 return (&maRanges.back())+1;
237cdf0e10cSrcweir         }
238cdf0e10cSrcweir 
begin()239cdf0e10cSrcweir         B2DRange* begin()
240cdf0e10cSrcweir         {
241cdf0e10cSrcweir             if(maRanges.empty())
242cdf0e10cSrcweir                 return 0;
243cdf0e10cSrcweir             else
244cdf0e10cSrcweir                 return &maRanges.front();
245cdf0e10cSrcweir         }
246cdf0e10cSrcweir 
end()247cdf0e10cSrcweir         B2DRange* end()
248cdf0e10cSrcweir         {
249cdf0e10cSrcweir             if(maRanges.empty())
250cdf0e10cSrcweir                 return 0;
251cdf0e10cSrcweir             else
252cdf0e10cSrcweir                 return (&maRanges.back())+1;
253cdf0e10cSrcweir         }
254cdf0e10cSrcweir 
255cdf0e10cSrcweir     private:
256cdf0e10cSrcweir         B2DRange						 maBounds;
257cdf0e10cSrcweir         std::vector<B2DRange>			 maRanges;
258cdf0e10cSrcweir         std::vector<B2VectorOrientation> maOrient;
259cdf0e10cSrcweir     };
260cdf0e10cSrcweir 
B2DPolyRange()261cdf0e10cSrcweir     B2DPolyRange::B2DPolyRange() :
262cdf0e10cSrcweir         mpImpl()
263cdf0e10cSrcweir     {}
264cdf0e10cSrcweir 
~B2DPolyRange()265cdf0e10cSrcweir     B2DPolyRange::~B2DPolyRange()
266cdf0e10cSrcweir     {}
267cdf0e10cSrcweir 
B2DPolyRange(const ElementType & rElem)268cdf0e10cSrcweir     B2DPolyRange::B2DPolyRange( const ElementType& rElem ) :
269cdf0e10cSrcweir         mpImpl( ImplB2DPolyRange( rElem ) )
270cdf0e10cSrcweir     {}
271cdf0e10cSrcweir 
B2DPolyRange(const B2DRange & rRange,B2VectorOrientation eOrient)272cdf0e10cSrcweir     B2DPolyRange::B2DPolyRange( const B2DRange& rRange, B2VectorOrientation eOrient ) :
273cdf0e10cSrcweir         mpImpl( ImplB2DPolyRange( rRange, eOrient ) )
274cdf0e10cSrcweir     {}
275cdf0e10cSrcweir 
B2DPolyRange(const B2DPolyRange & rRange)276cdf0e10cSrcweir     B2DPolyRange::B2DPolyRange( const B2DPolyRange& rRange ) :
277cdf0e10cSrcweir         mpImpl( rRange.mpImpl )
278cdf0e10cSrcweir     {}
279cdf0e10cSrcweir 
operator =(const B2DPolyRange & rRange)280cdf0e10cSrcweir     B2DPolyRange& B2DPolyRange::operator=( const B2DPolyRange& rRange )
281cdf0e10cSrcweir     {
282cdf0e10cSrcweir         mpImpl = rRange.mpImpl;
283cdf0e10cSrcweir         return *this;
284cdf0e10cSrcweir     }
285cdf0e10cSrcweir 
makeUnique()286cdf0e10cSrcweir     void B2DPolyRange::makeUnique()
287cdf0e10cSrcweir     {
288cdf0e10cSrcweir         mpImpl.make_unique();
289cdf0e10cSrcweir     }
290cdf0e10cSrcweir 
operator ==(const B2DPolyRange & rRange) const291cdf0e10cSrcweir     bool B2DPolyRange::operator==(const B2DPolyRange& rRange) const
292cdf0e10cSrcweir     {
293cdf0e10cSrcweir         if(mpImpl.same_object(rRange.mpImpl))
294cdf0e10cSrcweir             return true;
295cdf0e10cSrcweir 
296cdf0e10cSrcweir         return ((*mpImpl) == (*rRange.mpImpl));
297cdf0e10cSrcweir     }
298cdf0e10cSrcweir 
operator !=(const B2DPolyRange & rRange) const299cdf0e10cSrcweir     bool B2DPolyRange::operator!=(const B2DPolyRange& rRange) const
300cdf0e10cSrcweir     {
301cdf0e10cSrcweir         return !(*this == rRange);
302cdf0e10cSrcweir     }
303cdf0e10cSrcweir 
count() const304cdf0e10cSrcweir     sal_uInt32 B2DPolyRange::count() const
305cdf0e10cSrcweir     {
306cdf0e10cSrcweir         return mpImpl->count();
307cdf0e10cSrcweir     }
308cdf0e10cSrcweir 
getElement(sal_uInt32 nIndex) const309cdf0e10cSrcweir     B2DPolyRange::ElementType B2DPolyRange::getElement(sal_uInt32 nIndex) const
310cdf0e10cSrcweir     {
311cdf0e10cSrcweir         return mpImpl->getElement(nIndex);
312cdf0e10cSrcweir     }
313cdf0e10cSrcweir 
setElement(sal_uInt32 nIndex,const ElementType & rElement)314cdf0e10cSrcweir     void B2DPolyRange::setElement(sal_uInt32 nIndex, const ElementType& rElement )
315cdf0e10cSrcweir     {
316cdf0e10cSrcweir         mpImpl->setElement(nIndex, rElement);
317cdf0e10cSrcweir     }
318cdf0e10cSrcweir 
setElement(sal_uInt32 nIndex,const B2DRange & rRange,B2VectorOrientation eOrient)319cdf0e10cSrcweir     void B2DPolyRange::setElement(sal_uInt32 nIndex, const B2DRange& rRange, B2VectorOrientation eOrient )
320cdf0e10cSrcweir     {
321cdf0e10cSrcweir         mpImpl->setElement(nIndex, rRange, eOrient );
322cdf0e10cSrcweir     }
323cdf0e10cSrcweir 
insertElement(sal_uInt32 nIndex,const ElementType & rElement,sal_uInt32 nCount)324cdf0e10cSrcweir     void B2DPolyRange::insertElement(sal_uInt32 nIndex, const ElementType& rElement, sal_uInt32 nCount)
325cdf0e10cSrcweir     {
326cdf0e10cSrcweir         mpImpl->insertElement(nIndex, rElement, nCount );
327cdf0e10cSrcweir     }
328cdf0e10cSrcweir 
insertElement(sal_uInt32 nIndex,const B2DRange & rRange,B2VectorOrientation eOrient,sal_uInt32 nCount)329cdf0e10cSrcweir     void B2DPolyRange::insertElement(sal_uInt32 nIndex, const B2DRange& rRange, B2VectorOrientation eOrient, sal_uInt32 nCount)
330cdf0e10cSrcweir     {
331cdf0e10cSrcweir         mpImpl->insertElement(nIndex, rRange, eOrient, nCount );
332cdf0e10cSrcweir     }
333cdf0e10cSrcweir 
appendElement(const ElementType & rElement,sal_uInt32 nCount)334cdf0e10cSrcweir     void B2DPolyRange::appendElement(const ElementType& rElement, sal_uInt32 nCount)
335cdf0e10cSrcweir     {
336cdf0e10cSrcweir         mpImpl->appendElement(rElement, nCount);
337cdf0e10cSrcweir     }
338cdf0e10cSrcweir 
appendElement(const B2DRange & rRange,B2VectorOrientation eOrient,sal_uInt32 nCount)339cdf0e10cSrcweir     void B2DPolyRange::appendElement(const B2DRange& rRange, B2VectorOrientation eOrient, sal_uInt32 nCount)
340cdf0e10cSrcweir     {
341cdf0e10cSrcweir         mpImpl->appendElement(rRange, eOrient, nCount );
342cdf0e10cSrcweir     }
343cdf0e10cSrcweir 
insertPolyRange(sal_uInt32 nIndex,const B2DPolyRange & rRange)344cdf0e10cSrcweir     void B2DPolyRange::insertPolyRange(sal_uInt32 nIndex, const B2DPolyRange& rRange)
345cdf0e10cSrcweir     {
346cdf0e10cSrcweir         mpImpl->insertPolyRange(nIndex, *rRange.mpImpl);
347cdf0e10cSrcweir     }
348cdf0e10cSrcweir 
appendPolyRange(const B2DPolyRange & rRange)349cdf0e10cSrcweir     void B2DPolyRange::appendPolyRange(const B2DPolyRange& rRange)
350cdf0e10cSrcweir     {
351cdf0e10cSrcweir         mpImpl->appendPolyRange(*rRange.mpImpl);
352cdf0e10cSrcweir     }
353cdf0e10cSrcweir 
remove(sal_uInt32 nIndex,sal_uInt32 nCount)354cdf0e10cSrcweir     void B2DPolyRange::remove(sal_uInt32 nIndex, sal_uInt32 nCount)
355cdf0e10cSrcweir     {
356cdf0e10cSrcweir         mpImpl->remove(nIndex, nCount);
357cdf0e10cSrcweir     }
358cdf0e10cSrcweir 
clear()359cdf0e10cSrcweir     void B2DPolyRange::clear()
360cdf0e10cSrcweir     {
361cdf0e10cSrcweir         mpImpl->clear();
362cdf0e10cSrcweir     }
363cdf0e10cSrcweir 
flip()364cdf0e10cSrcweir     void B2DPolyRange::flip()
365cdf0e10cSrcweir     {
366cdf0e10cSrcweir         mpImpl->flip();
367cdf0e10cSrcweir     }
368cdf0e10cSrcweir 
getBounds() const369cdf0e10cSrcweir     B2DRange B2DPolyRange::getBounds() const
370cdf0e10cSrcweir     {
371cdf0e10cSrcweir         return mpImpl->getBounds();
372cdf0e10cSrcweir     }
373cdf0e10cSrcweir 
isInside(const B2DTuple & rTuple) const374cdf0e10cSrcweir     bool B2DPolyRange::isInside( const B2DTuple& rTuple ) const
375cdf0e10cSrcweir     {
376cdf0e10cSrcweir         return mpImpl->isInside(rTuple);
377cdf0e10cSrcweir     }
378cdf0e10cSrcweir 
isInside(const B2DRange & rRange) const379cdf0e10cSrcweir     bool B2DPolyRange::isInside( const B2DRange& rRange ) const
380cdf0e10cSrcweir     {
381cdf0e10cSrcweir         return mpImpl->isInside(rRange);
382cdf0e10cSrcweir     }
383cdf0e10cSrcweir 
overlaps(const B2DRange & rRange) const384cdf0e10cSrcweir     bool B2DPolyRange::overlaps( const B2DRange& rRange ) const
385cdf0e10cSrcweir     {
386cdf0e10cSrcweir         return mpImpl->overlaps(rRange);
387cdf0e10cSrcweir     }
388cdf0e10cSrcweir 
solveCrossovers() const389cdf0e10cSrcweir     B2DPolyPolygon B2DPolyRange::solveCrossovers() const
390cdf0e10cSrcweir     {
391cdf0e10cSrcweir         return mpImpl->solveCrossovers();
392cdf0e10cSrcweir     }
393cdf0e10cSrcweir 
begin() const394cdf0e10cSrcweir     const B2DRange* B2DPolyRange::begin() const
395cdf0e10cSrcweir     {
396cdf0e10cSrcweir         return mpImpl->begin();
397cdf0e10cSrcweir     }
398cdf0e10cSrcweir 
end() const399cdf0e10cSrcweir     const B2DRange* B2DPolyRange::end() const
400cdf0e10cSrcweir     {
401cdf0e10cSrcweir         return mpImpl->end();
402cdf0e10cSrcweir     }
403cdf0e10cSrcweir 
begin()404cdf0e10cSrcweir     B2DRange* B2DPolyRange::begin()
405cdf0e10cSrcweir     {
406cdf0e10cSrcweir         return mpImpl->begin();
407cdf0e10cSrcweir     }
408cdf0e10cSrcweir 
end()409cdf0e10cSrcweir     B2DRange* B2DPolyRange::end()
410cdf0e10cSrcweir     {
411cdf0e10cSrcweir         return mpImpl->end();
412cdf0e10cSrcweir     }
413cdf0e10cSrcweir 
414cdf0e10cSrcweir } // end of namespace basegfx
415cdf0e10cSrcweir 
416cdf0e10cSrcweir // eof
417