summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-06-03 12:54:32 +0200
committerNoel Grandin <noel@peralex.com>2015-06-04 08:30:24 +0200
commit1d92933d96d94819fa3a4ae2de9519874f9b92b6 (patch)
tree8b43292fd1950be75ce05c726696310eaf12e747 /basegfx
parent397a0afd3b3dd597f23bfbc75543eaead8bab5d2 (diff)
convert B2VectorContinuity to scoped enum
Change-Id: Ifa401dd0d2d1bef8c0ae2987d2aee86100b59816
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dpolygon.cxx2
-rw-r--r--basegfx/source/polygon/b2dpolygontools.cxx10
-rw-r--r--basegfx/source/polygon/b2dsvgpolypolygon.cxx2
-rw-r--r--basegfx/source/tools/unotools.cxx4
-rw-r--r--basegfx/source/vector/b2dvector.cxx8
-rw-r--r--basegfx/test/basegfx2d.cxx2
6 files changed, 14 insertions, 14 deletions
diff --git a/basegfx/source/polygon/b2dpolygon.cxx b/basegfx/source/polygon/b2dpolygon.cxx
index 096c4a01f44d..fb7a98ff4b6e 100644
--- a/basegfx/source/polygon/b2dpolygon.cxx
+++ b/basegfx/source/polygon/b2dpolygon.cxx
@@ -1336,7 +1336,7 @@ namespace basegfx
}
else
{
- return CONTINUITY_NONE;
+ return B2VectorContinuity::NONE;
}
}
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 41b40f4190f9..13844613ff6b 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -2625,7 +2625,7 @@ namespace basegfx
switch(eContinuity)
{
- case CONTINUITY_NONE :
+ case B2VectorContinuity::NONE :
{
if(rCandidate.isPrevControlPointUsed(nIndex))
{
@@ -2661,7 +2661,7 @@ namespace basegfx
break;
}
- case CONTINUITY_C1 :
+ case B2VectorContinuity::C1 :
{
if(rCandidate.isPrevControlPointUsed(nIndex) && rCandidate.isNextControlPointUsed(nIndex))
{
@@ -2714,7 +2714,7 @@ namespace basegfx
}
break;
}
- case CONTINUITY_C2 :
+ case B2VectorContinuity::C2 :
{
if(rCandidate.isPrevControlPointUsed(nIndex) && rCandidate.isNextControlPointUsed(nIndex))
{
@@ -3557,11 +3557,11 @@ namespace basegfx
{
const B2VectorContinuity eCont(rPolygon.getContinuityInPoint(a));
- if(CONTINUITY_C1 == eCont)
+ if(B2VectorContinuity::C1 == eCont)
{
aCollectFlags[nStartPointIndex] = com::sun::star::drawing::PolygonFlags_SMOOTH;
}
- else if(CONTINUITY_C2 == eCont)
+ else if(B2VectorContinuity::C2 == eCont)
{
aCollectFlags[nStartPointIndex] = com::sun::star::drawing::PolygonFlags_SYMMETRIC;
}
diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index 7a76f075c6e4..3ba94235c2a7 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -758,7 +758,7 @@ namespace basegfx
// is necessary.
const bool bSymmetricAtEdgeStart(
0 != nIndex
- && CONTINUITY_C2 == aPolygon.getContinuityInPoint(nIndex));
+ && B2VectorContinuity::C2 == aPolygon.getContinuityInPoint(nIndex));
if(bDetectQuadraticBeziers)
{
diff --git a/basegfx/source/tools/unotools.cxx b/basegfx/source/tools/unotools.cxx
index 2a923e1bdb9a..f3a4765eb3d0 100644
--- a/basegfx/source/tools/unotools.cxx
+++ b/basegfx/source/tools/unotools.cxx
@@ -214,11 +214,11 @@ namespace unotools
{
const basegfx::B2VectorContinuity eCont(rPoly.getContinuityInPoint(b));
- if(basegfx::CONTINUITY_C1 == eCont)
+ if(basegfx::B2VectorContinuity::C1 == eCont)
{
aFlags[nStartPointIndex] = drawing::PolygonFlags_SMOOTH;
}
- else if(basegfx::CONTINUITY_C2 == eCont)
+ else if(basegfx::B2VectorContinuity::C2 == eCont)
{
aFlags[nStartPointIndex] = drawing::PolygonFlags_SYMMETRIC;
}
diff --git a/basegfx/source/vector/b2dvector.cxx b/basegfx/source/vector/b2dvector.cxx
index 4c23f51c03c2..a9223175e4ee 100644
--- a/basegfx/source/vector/b2dvector.cxx
+++ b/basegfx/source/vector/b2dvector.cxx
@@ -168,22 +168,22 @@ namespace basegfx
{
if(rBackVector.equalZero() || rForwardVector.equalZero())
{
- return CONTINUITY_NONE;
+ return B2VectorContinuity::NONE;
}
if(fTools::equal(rBackVector.getX(), -rForwardVector.getX()) && fTools::equal(rBackVector.getY(), -rForwardVector.getY()))
{
// same direction and same length -> C2
- return CONTINUITY_C2;
+ return B2VectorContinuity::C2;
}
if(areParallel(rBackVector, rForwardVector) && rBackVector.scalar(rForwardVector) < 0.0)
{
// parallel and opposite direction -> C1
- return CONTINUITY_C1;
+ return B2VectorContinuity::C1;
}
- return CONTINUITY_NONE;
+ return B2VectorContinuity::NONE;
}
} // end of namespace basegfx
diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx
index 6abd54250da6..96d76bf1929b 100644
--- a/basegfx/test/basegfx2d.cxx
+++ b/basegfx/test/basegfx2d.cxx
@@ -737,7 +737,7 @@ public:
CPPUNIT_ASSERT_MESSAGE("areControlPointsUsed() wrong",
aPoly.areControlPointsUsed());
CPPUNIT_ASSERT_MESSAGE("getContinuityInPoint() wrong",
- aPoly.getContinuityInPoint(0) == CONTINUITY_C2);
+ aPoly.getContinuityInPoint(0) == B2VectorContinuity::C2);
aPoly.resetControlPoints();
CPPUNIT_ASSERT_MESSAGE("resetControlPoints() did not clear",