diff options
author | Elton Chung <elton@layerjet.com> | 2012-03-04 15:27:27 +0800 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-03-05 10:35:50 +0200 |
commit | a1a1131c16227327d17bcf5ad2a5209ddc0f01a1 (patch) | |
tree | 5766be6474c0ce1ecccb00024260a0487110b639 /basegfx | |
parent | 2bdac353ce7e28611b546bcc8a5ea236c891f944 (diff) |
Remove unused code
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx | 3 | ||||
-rw-r--r-- | basegfx/source/polygon/b3dpolygonclipper.cxx | 172 |
2 files changed, 0 insertions, 175 deletions
diff --git a/basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx b/basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx index a6ca7146b31e..d1bce0ed911c 100644 --- a/basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx +++ b/basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx @@ -52,9 +52,6 @@ namespace basegfx B3DORIENTATION_Z // Z-Axis }; - // version for Polygons - BASEGFX_DLLPUBLIC B3DPolyPolygon clipPolygonOnOrthogonalPlane(const B3DPolygon& rCandidate, B3DOrientation ePlaneOrthogonal, bool bClipPositive, double fPlaneOffset, bool bStroke); - } // end of namespace tools } // end of namespace basegfx diff --git a/basegfx/source/polygon/b3dpolygonclipper.cxx b/basegfx/source/polygon/b3dpolygonclipper.cxx index 8130d00eced2..728fc46092cf 100644 --- a/basegfx/source/polygon/b3dpolygonclipper.cxx +++ b/basegfx/source/polygon/b3dpolygonclipper.cxx @@ -127,178 +127,6 @@ namespace basegfx ////////////////////////////////////////////////////////////////////////////// -namespace basegfx -{ - namespace tools - { - B3DPolyPolygon clipPolygonOnOrthogonalPlane(const B3DPolygon& rCandidate, B3DOrientation ePlaneOrthogonal, bool bClipPositive, double fPlaneOffset, bool bStroke) - { - B3DPolyPolygon aRetval; - - if(rCandidate.count()) - { - const B3DRange aCandidateRange(getRange(rCandidate)); - - if(B3DORIENTATION_X == ePlaneOrthogonal && fTools::moreOrEqual(aCandidateRange.getMinX(), fPlaneOffset)) - { - // completely above and on the clip plane. - if(bClipPositive) - { - // add completely - aRetval.append(rCandidate); - } - } - else if(B3DORIENTATION_X == ePlaneOrthogonal && fTools::lessOrEqual(aCandidateRange.getMaxX(), fPlaneOffset)) - { - // completely below and on the clip plane. - if(!bClipPositive) - { - // add completely - aRetval.append(rCandidate); - } - } - else if(B3DORIENTATION_Y == ePlaneOrthogonal && fTools::moreOrEqual(aCandidateRange.getMinY(), fPlaneOffset)) - { - // completely above and on the clip plane. - if(bClipPositive) - { - // add completely - aRetval.append(rCandidate); - } - } - else if(B3DORIENTATION_Y == ePlaneOrthogonal && fTools::lessOrEqual(aCandidateRange.getMaxY(), fPlaneOffset)) - { - // completely below and on the clip plane. - if(!bClipPositive) - { - // add completely - aRetval.append(rCandidate); - } - } - else if(B3DORIENTATION_Z == ePlaneOrthogonal && fTools::moreOrEqual(aCandidateRange.getMinZ(), fPlaneOffset)) - { - // completely above and on the clip plane. - if(bClipPositive) - { - // add completely - aRetval.append(rCandidate); - } - } - else if(B3DORIENTATION_Z == ePlaneOrthogonal && fTools::lessOrEqual(aCandidateRange.getMaxZ(), fPlaneOffset)) - { - // completely below and on the clip plane. - if(!bClipPositive) - { - // add completely - aRetval.append(rCandidate); - } - } - else - { - // prepare loop(s) - B3DPolygon aNewPolygon; - B3DPoint aCurrent(rCandidate.getB3DPoint(0L)); - const sal_uInt32 nPointCount(rCandidate.count()); - const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1L); - bool bCurrentInside(impIsInside(aCurrent, fPlaneOffset, ePlaneOrthogonal) == bClipPositive); - - if(bCurrentInside) - { - impAppendCopy(aNewPolygon, rCandidate, 0L); - } - - if(bStroke) - { - // open polygon, create clipped line snippets. - for(sal_uInt32 a(0L); a < nEdgeCount; a++) - { - // get next point data - const sal_uInt32 nNextIndex((a + 1L == nPointCount) ? 0L : a + 1L); - const B3DPoint aNext(rCandidate.getB3DPoint(nNextIndex)); - const bool bNextInside(impIsInside(aNext, fPlaneOffset, ePlaneOrthogonal) == bClipPositive); - - if(bCurrentInside != bNextInside) - { - // change inside/outside - if(bNextInside) - { - // entering, finish existing and start new line polygon - if(aNewPolygon.count() > 1L) - { - aRetval.append(aNewPolygon); - } - - aNewPolygon.clear(); - } - - // calculate and add cut point - const double fCut(impGetCut(aCurrent, aNext, fPlaneOffset, ePlaneOrthogonal)); - impAppendInterpolate(aNewPolygon, rCandidate, a, nNextIndex, fCut); - - // pepare next step - bCurrentInside = bNextInside; - } - - if(bNextInside) - { - impAppendCopy(aNewPolygon, rCandidate, nNextIndex); - } - - // pepare next step - aCurrent = aNext; - } - - if(aNewPolygon.count() > 1L) - { - aRetval.append(aNewPolygon); - } - } - else - { - // closed polygon, create single clipped closed polygon - for(sal_uInt32 a(0L); a < nEdgeCount; a++) - { - // get next point data, use offset - const sal_uInt32 nNextIndex((a + 1L == nPointCount) ? 0L : a + 1L); - const B3DPoint aNext(rCandidate.getB3DPoint(nNextIndex)); - const bool bNextInside(impIsInside(aNext, fPlaneOffset, ePlaneOrthogonal) == bClipPositive); - - if(bCurrentInside != bNextInside) - { - // calculate and add cut point - const double fCut(impGetCut(aCurrent, aNext, fPlaneOffset, ePlaneOrthogonal)); - impAppendInterpolate(aNewPolygon, rCandidate, a, nNextIndex, fCut); - - // pepare next step - bCurrentInside = bNextInside; - } - - if(bNextInside && nNextIndex) - { - impAppendCopy(aNewPolygon, rCandidate, nNextIndex); - } - - // pepare next step - aCurrent = aNext; - } - - if(aNewPolygon.count() > 2L) - { - aNewPolygon.setClosed(true); - aRetval.append(aNewPolygon); - } - } - } - } - - return aRetval; - } - - } // end of namespace tools -} // end of namespace basegfx - -////////////////////////////////////////////////////////////////////////////// - // eof /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |