diff options
author | Elton Chung <elton@layerjet.com> | 2012-02-19 15:41:32 +0800 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-02-19 14:17:47 +0400 |
commit | af79fcb204efeafb48659ed4a97433b7e2cc2f84 (patch) | |
tree | 31f442490487e81404c340ebd6927cf5faca26f5 /basegfx | |
parent | Remove unused code (diff) | |
download | core-af79fcb204efeafb48659ed4a97433b7e2cc2f84.tar.gz core-af79fcb204efeafb48659ed4a97433b7e2cc2f84.zip |
Remove unused code
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/inc/basegfx/polygon/b2dpolygontools.hxx | 10 | ||||
-rw-r--r-- | basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx | 27 | ||||
-rw-r--r-- | basegfx/source/polygon/b2dpolygontools.cxx | 37 | ||||
-rw-r--r-- | basegfx/source/polygon/b2dpolypolygontools.cxx | 26 |
4 files changed, 0 insertions, 100 deletions
diff --git a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx index d86abb31f525..1bee9b38f124 100644 --- a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx +++ b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx @@ -130,12 +130,6 @@ namespace basegfx // if 0.0 it is calculated using getLength(...) BASEGFX_DLLPUBLIC B2DPolygon getSnippetAbsolute(const B2DPolygon& rCandidate, double fFrom, double fTo, double fLength = 0.0); - // get a snippet from given polygon for relative distances. The polygon is assumed - // to be opened (not closed). fFrom and fTo need to be in range [0.0 .. 1.0], where - // fTo >= fFrom. If length is given, it is assumed the correct polygon length, - // if 0.0 it is calculated using getLength(...) - BASEGFX_DLLPUBLIC B2DPolygon getSnippetRelative(const B2DPolygon& rCandidate, double fFrom = 0.0, double fTo = 1.0, double fLength = 0.0); - // Continuity check for point with given index BASEGFX_DLLPUBLIC B2VectorContinuity getContinuityInPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndex); @@ -351,10 +345,6 @@ namespace basegfx // by several trivial sub-segments BASEGFX_DLLPUBLIC B2DPolygon createSimplifiedPolygon(const B2DPolygon&); - // calculate the distance to the given endless ray and return. The relative position on the edge is returned in Cut. - // That position may be less than 0.0 or more than 1.0 - BASEGFX_DLLPUBLIC double getDistancePointToEndlessRay(const B2DPoint& rPointA, const B2DPoint& rPointB, const B2DPoint& rTestPoint, double& rCut); - // calculate the smallest distance to given edge and return. The relative position on the edge is returned in Cut. // That position is in the range [0.0 .. 1.0] and the returned distance is adapted accordingly to the start or end // point of the edge diff --git a/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx b/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx index 37d2cb553814..6962596a150e 100644 --- a/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx +++ b/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx @@ -78,19 +78,6 @@ namespace basegfx // in bWithBorder flag. It is assumed that the orientations of the given polygon are correct. BASEGFX_DLLPUBLIC bool isInside(const B2DPolyPolygon& rCandidate, const B2DPoint& rPoint, bool bWithBorder = false); - /** get range of PolyPolygon. Control points are included. - - For detailed description look at getRangeWithControlPoints(const B2DPolygon&). - This method just expands by the range of every sub-Polygon. - - @param rCandidate - The B2DPolyPolygon eventually containing bezier segments - - @return - The outer range including control points - */ - BASEGFX_DLLPUBLIC B2DRange getRangeWithControlPoints(const B2DPolyPolygon& rCandidate); - /** Get the range of a polyPolygon For detailed description look at getRange(const B2DPolygon&). @@ -241,20 +228,6 @@ namespace basegfx // #i76891# Try to remove existing curve segments if they are simply edges BASEGFX_DLLPUBLIC B2DPolyPolygon simplifyCurveSegments(const B2DPolyPolygon& rCandidate); - /** split each edge of a polyPolygon in exactly nSubEdges equidistant edges - - @param rCandidate - The source polyPolygon. If too small (no edges), nSubEdges too small (<2) - or neither bHandleCurvedEdgesnor bHandleStraightEdges it will just be returned. - Else for each edge nSubEdges will be created. Closed state is preserved. - - @param nSubEdges - @param bHandleCurvedEdges - @param bHandleStraightEdges - Please take a look at reSegmentPolygonEdges description, these are the same. - */ - BASEGFX_DLLPUBLIC B2DPolyPolygon reSegmentPolyPolygonEdges(const B2DPolyPolygon& rCandidate, sal_uInt32 nSubEdges, bool bHandleCurvedEdges, bool bHandleStraightEdges); - ////////////////////////////////////////////////////////////////////// // comparators with tolerance for 2D PolyPolygons BASEGFX_DLLPUBLIC bool equal(const B2DPolyPolygon& rCandidateA, const B2DPolyPolygon& rCandidateB, const double& rfSmallValue); diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx index c8d2b37cce93..2104a53c5ef6 100644 --- a/basegfx/source/polygon/b2dpolygontools.cxx +++ b/basegfx/source/polygon/b2dpolygontools.cxx @@ -978,19 +978,6 @@ namespace basegfx } } - B2DPolygon getSnippetRelative(const B2DPolygon& rCandidate, double fFrom, double fTo, double fLength) - { - // get length if not given - if(fTools::equalZero(fLength)) - { - fLength = getLength(rCandidate); - } - - // multiply distances with real length to get absolute position and - // use getSnippetAbsolute - return getSnippetAbsolute(rCandidate, fFrom * fLength, fTo * fLength, fLength); - } - CutFlagValue findCut( const B2DPolygon& rCandidate, sal_uInt32 nIndex1, sal_uInt32 nIndex2, @@ -2499,30 +2486,6 @@ namespace basegfx return aRetval; } - double getDistancePointToEndlessRay(const B2DPoint& rPointA, const B2DPoint& rPointB, const B2DPoint& rTestPoint, double& rCut) - { - if(rPointA.equal(rPointB)) - { - rCut = 0.0; - const B2DVector aVector(rTestPoint - rPointA); - return aVector.getLength(); - } - else - { - // get the relative cut value on line vector (Vector1) for cut with perpendicular through TestPoint - const B2DVector aVector1(rPointB - rPointA); - const B2DVector aVector2(rTestPoint - rPointA); - const double fDividend((aVector2.getX() * aVector1.getX()) + (aVector2.getY() * aVector1.getY())); - const double fDivisor((aVector1.getX() * aVector1.getX()) + (aVector1.getY() * aVector1.getY())); - - rCut = fDividend / fDivisor; - - const B2DPoint aCutPoint(rPointA + rCut * aVector1); - const B2DVector aVector(rTestPoint - aCutPoint); - return aVector.getLength(); - } - } - double getSmallestDistancePointToEdge(const B2DPoint& rPointA, const B2DPoint& rPointB, const B2DPoint& rTestPoint, double& rCut) { if(rPointA.equal(rPointB)) diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx index e372f725a24f..c49f6a8ab3c9 100644 --- a/basegfx/source/polygon/b2dpolypolygontools.cxx +++ b/basegfx/source/polygon/b2dpolypolygontools.cxx @@ -238,20 +238,6 @@ namespace basegfx } } - B2DRange getRangeWithControlPoints(const B2DPolyPolygon& rCandidate) - { - B2DRange aRetval; - const sal_uInt32 nPolygonCount(rCandidate.count()); - - for(sal_uInt32 a(0L); a < nPolygonCount; a++) - { - B2DPolygon aCandidate = rCandidate.getB2DPolygon(a); - aRetval.expand(tools::getRangeWithControlPoints(aCandidate)); - } - - return aRetval; - } - B2DRange getRange(const B2DPolyPolygon& rCandidate) { B2DRange aRetval; @@ -526,18 +512,6 @@ namespace basegfx } } - B2DPolyPolygon reSegmentPolyPolygonEdges(const B2DPolyPolygon& rCandidate, sal_uInt32 nSubEdges, bool bHandleCurvedEdges, bool bHandleStraightEdges) - { - B2DPolyPolygon aRetval; - - for(sal_uInt32 a(0L); a < rCandidate.count(); a++) - { - aRetval.append(reSegmentPolygonEdges(rCandidate.getB2DPolygon(a), nSubEdges, bHandleCurvedEdges, bHandleStraightEdges)); - } - - return aRetval; - } - ////////////////////////////////////////////////////////////////////// // comparators with tolerance for 2D PolyPolygons |