summaryrefslogtreecommitdiff
path: root/basegfx/source/polygon/b3dpolygontools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source/polygon/b3dpolygontools.cxx')
-rw-r--r--basegfx/source/polygon/b3dpolygontools.cxx99
1 files changed, 0 insertions, 99 deletions
diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx
index b31712a04780..65a7f6b800db 100644
--- a/basegfx/source/polygon/b3dpolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolygontools.cxx
@@ -217,105 +217,6 @@ namespace basegfx
return fRetval;
}
- B3DPoint getPositionAbsolute(const B3DPolygon& rCandidate, double fDistance, double fLength)
- {
- B3DPoint aRetval;
- const sal_uInt32 nPointCount(rCandidate.count());
-
- if(nPointCount > 1L)
- {
- sal_uInt32 nIndex(0L);
- bool bIndexDone(false);
- const double fZero(0.0);
- double fEdgeLength(fZero);
-
- // get length if not given
- if(fTools::equalZero(fLength))
- {
- fLength = getLength(rCandidate);
- }
-
- // handle fDistance < 0.0
- if(fTools::less(fDistance, fZero))
- {
- if(rCandidate.isClosed())
- {
- // if fDistance < 0.0 increment with multiple of fLength
- sal_uInt32 nCount(sal_uInt32(-fDistance / fLength));
- fDistance += double(nCount + 1L) * fLength;
- }
- else
- {
- // crop to polygon start
- fDistance = fZero;
- bIndexDone = true;
- }
- }
-
- // handle fDistance >= fLength
- if(fTools::moreOrEqual(fDistance, fLength))
- {
- if(rCandidate.isClosed())
- {
- // if fDistance >= fLength decrement with multiple of fLength
- sal_uInt32 nCount(sal_uInt32(fDistance / fLength));
- fDistance -= (double)(nCount) * fLength;
- }
- else
- {
- // crop to polygon end
- fDistance = fZero;
- nIndex = nPointCount - 1L;
- bIndexDone = true;
- }
- }
-
- // look for correct index. fDistance is now [0.0 .. fLength[
- if(!bIndexDone)
- {
- do
- {
- // get length of next edge
- fEdgeLength = getEdgeLength(rCandidate, nIndex);
-
- if(fTools::moreOrEqual(fDistance, fEdgeLength))
- {
- // go to next edge
- fDistance -= fEdgeLength;
- nIndex++;
- }
- else
- {
- // it's on this edge, stop
- bIndexDone = true;
- }
- } while (!bIndexDone);
- }
-
- // get the point using nIndex
- aRetval = rCandidate.getB3DPoint(nIndex);
-
- // if fDistance != 0.0, move that length on the edge. The edge
- // length is in fEdgeLength.
- if(!fTools::equalZero(fDistance))
- {
- sal_uInt32 nNextIndex(getIndexOfSuccessor(nIndex, rCandidate));
- const B3DPoint aNextPoint(rCandidate.getB3DPoint(nNextIndex));
- double fRelative(fZero);
-
- if(!fTools::equalZero(fEdgeLength))
- {
- fRelative = fDistance / fEdgeLength;
- }
-
- // add calculated average value to the return value
- aRetval += interpolate(aRetval, aNextPoint, fRelative);
- }
- }
-
- return aRetval;
- }
-
void applyLineDashing(const B3DPolygon& rCandidate, const ::std::vector<double>& rDotDashArray, B3DPolyPolygon* pLineTarget, B3DPolyPolygon* pGapTarget, double fDotDashLength)
{
const sal_uInt32 nPointCount(rCandidate.count());