diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-17 13:23:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-18 06:15:55 +0000 |
commit | 292560a957498bed70b625c992ec6bcf631dceb3 (patch) | |
tree | 4b4c39fbabf370d870ac9a5b2c6154df2238599a /basegfx | |
parent | e64ea98801d20e5024da900a0ac8faaf565f4bf3 (diff) |
loplugin:unusedmethods
Change-Id: Icf773925c37dde8b7404edac9864e7b10fe113b4
Reviewed-on: https://gerrit.libreoffice.org/29968
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/polygon/b2dpolygontools.cxx | 66 | ||||
-rw-r--r-- | basegfx/source/polygon/b2dtrapezoid.cxx | 33 |
2 files changed, 0 insertions, 99 deletions
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx index d47366827296..23e01233852c 100644 --- a/basegfx/source/polygon/b2dpolygontools.cxx +++ b/basegfx/source/polygon/b2dpolygontools.cxx @@ -40,7 +40,6 @@ // #i37443# #define ANGLE_BOUND_START_VALUE (2.25) #define ANGLE_BOUND_MINIMUM_VALUE (0.1) -#define COUNT_SUBDIVIDE_DEFAULT (4) #ifdef DBG_UTIL static double fAngleBoundStartValue = ANGLE_BOUND_START_VALUE; #endif @@ -322,71 +321,6 @@ namespace basegfx } } - B2DPolygon adaptiveSubdivideByCount(const B2DPolygon& rCandidate, sal_uInt32 nCount) - { - if(rCandidate.areControlPointsUsed()) - { - const sal_uInt32 nPointCount(rCandidate.count()); - B2DPolygon aRetval; - - if(nPointCount) - { - // prepare edge-oriented loop - const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1); - B2DCubicBezier aBezier; - aBezier.setStartPoint(rCandidate.getB2DPoint(0)); - - // perf: try to avoid too many realloctions by guessing the result's pointcount - aRetval.reserve(nPointCount*4); - - // add start point (always) - aRetval.append(aBezier.getStartPoint()); - - // #i37443# prepare convenient count if none was given - if(0 == nCount) - { - nCount = COUNT_SUBDIVIDE_DEFAULT; - } - - for(sal_uInt32 a(0); a < nEdgeCount; a++) - { - // get next and control points - const sal_uInt32 nNextIndex((a + 1) % nPointCount); - aBezier.setEndPoint(rCandidate.getB2DPoint(nNextIndex)); - aBezier.setControlPointA(rCandidate.getNextControlPoint(a)); - aBezier.setControlPointB(rCandidate.getPrevControlPoint(nNextIndex)); - aBezier.testAndSolveTrivialBezier(); - - if(aBezier.isBezier()) - { - // call adaptive subdivide - aBezier.adaptiveSubdivideByCount(aRetval, nCount); - } - else - { - // add non-curved edge - aRetval.append(aBezier.getEndPoint()); - } - - // prepare next step - aBezier.setStartPoint(aBezier.getEndPoint()); - } - - if(rCandidate.isClosed()) - { - // set closed flag and correct last point (which is added double now). - closeWithGeometryChange(aRetval); - } - } - - return aRetval; - } - else - { - return rCandidate; - } - } - bool isInside(const B2DPolygon& rCandidate, const B2DPoint& rPoint, bool bWithBorder) { const B2DPolygon aCandidate(rCandidate.areControlPointsUsed() ? rCandidate.getDefaultAdaptiveSubdivision() : rCandidate); diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx index 33d588650ce8..21c5c86cc9db 100644 --- a/basegfx/source/polygon/b2dtrapezoid.cxx +++ b/basegfx/source/polygon/b2dtrapezoid.cxx @@ -1178,39 +1178,6 @@ namespace basegfx } } - void createLineTrapezoidFromB2DPolyPolygon( - B2DTrapezoidVector& ro_Result, - const B2DPolyPolygon& rPolyPolygon, - double fLineWidth) - { - if(fTools::lessOrEqual(fLineWidth, 0.0)) - { - return; - } - - // ensure there are no curves used - B2DPolyPolygon aSource(rPolyPolygon); - - if(aSource.areControlPointsUsed()) - { - aSource = aSource.getDefaultAdaptiveSubdivision(); - } - - const sal_uInt32 nCount(aSource.count()); - - if(!nCount) - { - return; - } - - for(sal_uInt32 a(0); a < nCount; a++) - { - createLineTrapezoidFromB2DPolygon( - ro_Result, - aSource.getB2DPolygon(a), - fLineWidth); - } - } } // end of namespace tools } // end of namespace basegfx |