summaryrefslogtreecommitdiff
path: root/basegfx/source/polygon/b2dpolypolygoncutter.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-09-22 14:12:07 +0300
committerTor Lillqvist <tml@collabora.com>2017-09-26 14:18:41 +0200
commit8e7897588d7185ef1964e8120669c1de3d1ce734 (patch)
tree8f48598670a5dc22703371943c05789d60b9a07d /basegfx/source/polygon/b2dpolypolygoncutter.cxx
parent0b4135ec9945ea627318ecf5fccc4b7d0940ff0d (diff)
Rename the basegfx::tools namespace to basegfx::utils
Reduce potential confusion with the global tools namespace. Will hopefully make it possible to remove the annoying initial :: when referring to the global tools namespace. Unless we have even more tools subnamespaces somewhere. Thorsten said it was OK. Change-Id: Id088dfe8f4244cb79df9aa988995b31a1758c996 Reviewed-on: https://gerrit.libreoffice.org/42644 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'basegfx/source/polygon/b2dpolypolygoncutter.cxx')
-rw-r--r--basegfx/source/polygon/b2dpolypolygoncutter.cxx44
1 files changed, 22 insertions, 22 deletions
diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index 1c72680a325a..5f6e088fff1d 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -486,9 +486,9 @@ namespace basegfx
if(nOriginalCount)
{
- B2DPolygon aGeometry(tools::addPointsAtCutsAndTouches(rOriginal));
+ B2DPolygon aGeometry(utils::addPointsAtCutsAndTouches(rOriginal));
aGeometry.removeDoublePoints();
- aGeometry = tools::simplifyCurveSegments(aGeometry);
+ aGeometry = utils::simplifyCurveSegments(aGeometry);
mbIsCurve = aGeometry.areControlPointsUsed();
const sal_uInt32 nPointCount(aGeometry.count());
@@ -521,9 +521,9 @@ namespace basegfx
if(nOriginalCount)
{
- B2DPolyPolygon aGeometry(tools::addPointsAtCutsAndTouches(maOriginal));
+ B2DPolyPolygon aGeometry(utils::addPointsAtCutsAndTouches(maOriginal));
aGeometry.removeDoublePoints();
- aGeometry = tools::simplifyCurveSegments(aGeometry);
+ aGeometry = utils::simplifyCurveSegments(aGeometry);
mbIsCurve = aGeometry.areControlPointsUsed();
nOriginalCount = aGeometry.count();
@@ -682,7 +682,7 @@ namespace basegfx
namespace basegfx
{
- namespace tools
+ namespace utils
{
B2DPolyPolygon solveCrossovers(const B2DPolyPolygon& rCandidate)
@@ -712,7 +712,7 @@ namespace basegfx
{
const B2DPolygon aCandidate(rCandidate.getB2DPolygon(a));
- if(tools::getOrientation(aCandidate) != B2VectorOrientation::Neutral)
+ if(utils::getOrientation(aCandidate) != B2VectorOrientation::Neutral)
{
aRetval.append(aCandidate);
}
@@ -728,15 +728,15 @@ namespace basegfx
// remove all self-intersections and intersections
if(rCandidate.count() == 1)
{
- aCandidate = basegfx::tools::solveCrossovers(rCandidate.getB2DPolygon(0));
+ aCandidate = basegfx::utils::solveCrossovers(rCandidate.getB2DPolygon(0));
}
else
{
- aCandidate = basegfx::tools::solveCrossovers(rCandidate);
+ aCandidate = basegfx::utils::solveCrossovers(rCandidate);
}
// cleanup evtl. neutral polygons
- aCandidate = basegfx::tools::stripNeutralPolygons(aCandidate);
+ aCandidate = basegfx::utils::stripNeutralPolygons(aCandidate);
// remove all polygons which have the same orientation as the polygon they are directly contained in
const sal_uInt32 nCount(aCandidate.count());
@@ -751,8 +751,8 @@ namespace basegfx
{
const B2DPolygon aCand(aCandidate.getB2DPolygon(a));
StripHelper* pNewHelper = &(aHelpers[a]);
- pNewHelper->maRange = tools::getRange(aCand);
- pNewHelper->meOrinetation = tools::getOrientation(aCand);
+ pNewHelper->maRange = utils::getRange(aCand);
+ pNewHelper->meOrinetation = utils::getOrientation(aCand);
// initialize with own orientation
pNewHelper->mnDepth = (pNewHelper->meOrinetation == B2VectorOrientation::Negative ? -1 : 1);
@@ -767,7 +767,7 @@ namespace basegfx
{
const B2DPolygon aCandB(aCandidate.getB2DPolygon(b));
StripHelper& rHelperB = aHelpers[b];
- const bool bAInB(rHelperB.maRange.isInside(rHelperA.maRange) && tools::isInside(aCandB, aCandA, true));
+ const bool bAInB(rHelperB.maRange.isInside(rHelperA.maRange) && utils::isInside(aCandB, aCandA, true));
if(bAInB)
{
@@ -775,7 +775,7 @@ namespace basegfx
rHelperA.mnDepth += (rHelperB.meOrinetation == B2VectorOrientation::Negative ? -1 : 1);
}
- const bool bBInA(rHelperA.maRange.isInside(rHelperB.maRange) && tools::isInside(aCandA, aCandB, true));
+ const bool bBInA(rHelperA.maRange.isInside(rHelperB.maRange) && utils::isInside(aCandA, aCandB, true));
if(bBInA)
{
@@ -816,7 +816,7 @@ namespace basegfx
{
if(nCount == 1)
{
- if(!bKeepAboveZero && tools::getOrientation(rCandidate.getB2DPolygon(0)) == B2VectorOrientation::Positive)
+ if(!bKeepAboveZero && utils::getOrientation(rCandidate.getB2DPolygon(0)) == B2VectorOrientation::Positive)
{
aRetval = rCandidate;
}
@@ -831,8 +831,8 @@ namespace basegfx
{
const B2DPolygon aCandidate(rCandidate.getB2DPolygon(a));
StripHelper* pNewHelper = &(aHelpers[a]);
- pNewHelper->maRange = tools::getRange(aCandidate);
- pNewHelper->meOrinetation = tools::getOrientation(aCandidate);
+ pNewHelper->maRange = utils::getRange(aCandidate);
+ pNewHelper->meOrinetation = utils::getOrientation(aCandidate);
pNewHelper->mnDepth = (pNewHelper->meOrinetation == B2VectorOrientation::Negative ? -1 : 0);
}
@@ -845,8 +845,8 @@ namespace basegfx
{
const B2DPolygon aCandB(rCandidate.getB2DPolygon(b));
StripHelper& rHelperB = aHelpers[b];
- const bool bAInB(rHelperB.maRange.isInside(rHelperA.maRange) && tools::isInside(aCandB, aCandA, true));
- const bool bBInA(rHelperA.maRange.isInside(rHelperB.maRange) && tools::isInside(aCandA, aCandB, true));
+ const bool bAInB(rHelperB.maRange.isInside(rHelperA.maRange) && utils::isInside(aCandB, aCandA, true));
+ const bool bBInA(rHelperA.maRange.isInside(rHelperB.maRange) && utils::isInside(aCandA, aCandB, true));
if(bAInB && bBInA)
{
@@ -1019,10 +1019,10 @@ namespace basegfx
// solve crossovers and throw away all sub-polygons which have a
// depth other than 0.
- aRetval = basegfx::tools::solveCrossovers(aRetval);
- aRetval = basegfx::tools::stripNeutralPolygons(aRetval);
+ aRetval = basegfx::utils::solveCrossovers(aRetval);
+ aRetval = basegfx::utils::stripNeutralPolygons(aRetval);
- return basegfx::tools::stripDispensablePolygons(aRetval);
+ return basegfx::utils::stripDispensablePolygons(aRetval);
}
}
@@ -1106,7 +1106,7 @@ namespace basegfx
return B2DPolyPolygon();
}
- } // end of namespace tools
+ } // end of namespace utils
} // end of namespace basegfx
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */