summaryrefslogtreecommitdiff
path: root/basegfx/source
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source')
-rw-r--r--basegfx/source/color/bcolortools.cxx11
-rw-r--r--basegfx/source/polygon/b2dpolygoncutandtouch.cxx41
-rw-r--r--basegfx/source/polygon/b2dpolygontools.cxx24
-rw-r--r--basegfx/source/polygon/b2dpolypolygoncutter.cxx8
-rw-r--r--basegfx/source/polygon/b2dpolypolygontools.cxx22
-rw-r--r--basegfx/source/polygon/b3dpolygonclipper.cxx156
-rw-r--r--basegfx/source/polygon/b3dpolygontools.cxx96
-rw-r--r--basegfx/source/polygon/b3dpolypolygontools.cxx36
-rw-r--r--basegfx/source/range/b2xrange.cxx9
9 files changed, 0 insertions, 403 deletions
diff --git a/basegfx/source/color/bcolortools.cxx b/basegfx/source/color/bcolortools.cxx
index f89a47574486..ef504ebacd9f 100644
--- a/basegfx/source/color/bcolortools.cxx
+++ b/basegfx/source/color/bcolortools.cxx
@@ -200,17 +200,6 @@ namespace basegfx { namespace tools
}
}
- BColor ciexyz2rgb( const BColor& rXYZColor )
- {
- // from Poynton color faq, and SMPTE RP 177-1993, Derivation
- // of Basic Television Color Equations
- const double x=rXYZColor.getRed(), y=rXYZColor.getGreen(), z=rXYZColor.getBlue();
- return BColor(
- 3.240479*x - 1.53715*y - 0.498535*z,
- -0.969256*x + 1.875991*y + 0.041556*z,
- 0.055648*x - 0.204043*y + 1.057311*z );
- }
-
BColor rgb2ciexyz( const BColor& rRGBColor )
{
// from Poynton color faq, and SMPTE RP 177-1993, Derivation
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index 385a5ac7e518..73a01be154d2 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -1008,31 +1008,6 @@ namespace basegfx
////////////////////////////////////////////////////////////////////////////////
- B2DPolygon addPointsAtCutsAndTouches(const B2DPolyPolygon& rMask, const B2DPolygon& rCandidate)
- {
- if(rCandidate.count())
- {
- temporaryPointVector aTempPoints;
- temporaryPointVector aTempPointsUnused;
-
- for(sal_uInt32 a(0L); a < rMask.count(); a++)
- {
- const B2DPolygon aPartMask(rMask.getB2DPolygon(a));
-
- findTouches(rCandidate, aPartMask, aTempPoints);
- findCuts(rCandidate, aPartMask, aTempPoints, aTempPointsUnused);
- }
-
- return mergeTemporaryPointsAndPolygon(rCandidate, aTempPoints);
- }
- else
- {
- return rCandidate;
- }
- }
-
- ////////////////////////////////////////////////////////////////////////////////
-
B2DPolygon addPointsAtCuts(const B2DPolygon& rCandidate, const B2DPoint& rStart, const B2DPoint& rEnd)
{
const sal_uInt32 nCount(rCandidate.count());
@@ -1163,22 +1138,6 @@ namespace basegfx
return rCandidate;
}
- B2DPolygon addPointsAtCuts(const B2DPolygon& rCandidate)
- {
- if(rCandidate.count())
- {
- temporaryPointVector aTempPoints;
-
- findCuts(rCandidate, aTempPoints);
-
- return mergeTemporaryPointsAndPolygon(rCandidate, aTempPoints);
- }
- else
- {
- return rCandidate;
- }
- }
-
////////////////////////////////////////////////////////////////////////////////
} // end of namespace tools
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 73f920fea85c..f86f0c655e9b 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -476,30 +476,6 @@ namespace basegfx
return true;
}
- B2DRange getRangeWithControlPoints(const B2DPolygon& rCandidate)
- {
- const sal_uInt32 nPointCount(rCandidate.count());
- B2DRange aRetval;
-
- if(nPointCount)
- {
- const bool bControlPointsUsed(rCandidate.areControlPointsUsed());
-
- for(sal_uInt32 a(0); a < nPointCount; a++)
- {
- aRetval.expand(rCandidate.getB2DPoint(a));
-
- if(bControlPointsUsed)
- {
- aRetval.expand(rCandidate.getNextControlPoint(a));
- aRetval.expand(rCandidate.getPrevControlPoint(a));
- }
- }
- }
-
- return aRetval;
- }
-
B2DRange getRange(const B2DPolygon& rCandidate)
{
// changed to use internally buffered version at B2DPolygon
diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index 8675b0121261..522bc3701556 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -657,14 +657,6 @@ namespace basegfx
//////////////////////////////////////////////////////////////////////////////
- B2DPolyPolygon solveCrossovers(const B2DPolygon& rCandidate)
- {
- solver aSolver(rCandidate);
- return aSolver.getB2DPolyPolygon();
- }
-
- //////////////////////////////////////////////////////////////////////////////
-
B2DPolyPolygon stripNeutralPolygons(const B2DPolyPolygon& rCandidate)
{
B2DPolyPolygon aRetval;
diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx
index 34721d20207d..6434dc050075 100644
--- a/basegfx/source/polygon/b2dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolypolygontools.cxx
@@ -397,28 +397,6 @@ namespace basegfx
return aRetval;
}
- B2DPolyPolygon setContinuity(const B2DPolyPolygon& rCandidate, B2VectorContinuity eContinuity)
- {
- if(rCandidate.areControlPointsUsed())
- {
- const sal_uInt32 nPolygonCount(rCandidate.count());
- B2DPolyPolygon aRetval;
-
- for(sal_uInt32 a(0L); a < nPolygonCount; a++)
- {
- const B2DPolygon aCandidate(rCandidate.getB2DPolygon(a));
-
- aRetval.append(setContinuity(aCandidate, eContinuity));
- }
-
- return aRetval;
- }
- else
- {
- return rCandidate;
- }
- }
-
B2DPolyPolygon growInNormalDirection(const B2DPolyPolygon& rCandidate, double fValue)
{
if(0.0 != fValue)
diff --git a/basegfx/source/polygon/b3dpolygonclipper.cxx b/basegfx/source/polygon/b3dpolygonclipper.cxx
index d1c9043f185b..6db49e23beb6 100644
--- a/basegfx/source/polygon/b3dpolygonclipper.cxx
+++ b/basegfx/source/polygon/b3dpolygonclipper.cxx
@@ -306,162 +306,6 @@ namespace basegfx
return aRetval;
}
- B3DPolyPolygon clipPolygonOnRange(const B3DPolygon& rCandidate, const B2DRange& rRange, bool bInside, bool bStroke)
- {
- B3DPolyPolygon aRetval;
-
- if(rRange.isEmpty())
- {
- // clipping against an empty range. Nothing is inside an empty range, so the polygon
- // is outside the range. So only return if not inside is wanted
- if(!bInside && rCandidate.count())
- {
- aRetval.append(rCandidate);
- }
- }
- else if(rCandidate.count())
- {
- const B3DRange aCandidateRange3D(getRange(rCandidate));
- const B2DRange aCandidateRange(
- aCandidateRange3D.getMinX(), aCandidateRange3D.getMinY(),
- aCandidateRange3D.getMaxX(), aCandidateRange3D.getMaxY());
-
- if(rRange.isInside(aCandidateRange))
- {
- // candidate is completely inside given range, nothing to do. Is also true with curves.
- if(bInside)
- {
- aRetval.append(rCandidate);
- }
- }
- else if(!rRange.overlaps(aCandidateRange))
- {
- // candidate is completely outside given range, nothing to do. Is also true with curves.
- if(!bInside)
- {
- aRetval.append(rCandidate);
- }
- }
- else
- {
- // clip against the six planes of the range
- // against lower X
- aRetval = clipPolygonOnOrthogonalPlane(rCandidate, tools::B3DORIENTATION_X, bInside, rRange.getMinX(), bStroke);
-
- if(aRetval.count())
- {
- // against lower Y
- if(1L == aRetval.count())
- {
- aRetval = clipPolygonOnOrthogonalPlane(aRetval.getB3DPolygon(0L), tools::B3DORIENTATION_Y, bInside, rRange.getMinY(), bStroke);
- }
- else
- {
- aRetval = clipPolyPolygonOnOrthogonalPlane(aRetval, tools::B3DORIENTATION_Y, bInside, rRange.getMinY(), bStroke);
- }
-
- if(aRetval.count())
- {
- // against higher X
- if(1L == aRetval.count())
- {
- aRetval = clipPolygonOnOrthogonalPlane(aRetval.getB3DPolygon(0L), tools::B3DORIENTATION_X, !bInside, rRange.getMaxX(), bStroke);
- }
- else
- {
- aRetval = clipPolyPolygonOnOrthogonalPlane(aRetval, tools::B3DORIENTATION_X, !bInside, rRange.getMaxX(), bStroke);
- }
-
- if(aRetval.count())
- {
- // against higher Y
- if(1L == aRetval.count())
- {
- aRetval = clipPolygonOnOrthogonalPlane(aRetval.getB3DPolygon(0L), tools::B3DORIENTATION_Y, !bInside, rRange.getMaxY(), bStroke);
- }
- else
- {
- aRetval = clipPolyPolygonOnOrthogonalPlane(aRetval, tools::B3DORIENTATION_Y, !bInside, rRange.getMaxY(), bStroke);
- }
- }
- }
- }
- }
- }
-
- return aRetval;
- }
-
- B3DPolyPolygon clipPolygonOnRange(const B3DPolygon& rCandidate, const B3DRange& rRange, bool bInside, bool bStroke)
- {
- B3DPolyPolygon aRetval;
-
- if(rRange.isEmpty())
- {
- // clipping against an empty range. Nothing is inside an empty range, so the polygon
- // is outside the range. So only return if not inside is wanted
- if(!bInside && rCandidate.count())
- {
- aRetval.append(rCandidate);
- }
- }
- else if(rCandidate.count())
- {
- const B3DRange aCandidateRange(getRange(rCandidate));
-
- if(rRange.isInside(aCandidateRange))
- {
- // candidate is completely inside given range, nothing to do. Is also true with curves.
- if(bInside)
- {
- aRetval.append(rCandidate);
- }
- }
- else if(!rRange.overlaps(aCandidateRange))
- {
- // candidate is completely outside given range, nothing to do. Is also true with curves.
- if(!bInside)
- {
- aRetval.append(rCandidate);
- }
- }
- else
- {
- // clip against X,Y first and see if there's something left
- const B2DRange aCandidateRange2D(rRange.getMinX(), rRange.getMinY(), rRange.getMaxX(), rRange.getMaxY());
- aRetval = clipPolygonOnRange(rCandidate, aCandidateRange2D, bInside, bStroke);
-
- if(aRetval.count())
- {
- // against lower Z
- if(1L == aRetval.count())
- {
- aRetval = clipPolygonOnOrthogonalPlane(aRetval.getB3DPolygon(0L), tools::B3DORIENTATION_Z, bInside, rRange.getMinZ(), bStroke);
- }
- else
- {
- aRetval = clipPolyPolygonOnOrthogonalPlane(aRetval, tools::B3DORIENTATION_Z, bInside, rRange.getMinZ(), bStroke);
- }
-
- if(aRetval.count())
- {
- // against higher Z
- if(1L == aRetval.count())
- {
- aRetval = clipPolygonOnOrthogonalPlane(aRetval.getB3DPolygon(0L), tools::B3DORIENTATION_Z, !bInside, rRange.getMaxZ(), bStroke);
- }
- else
- {
- aRetval = clipPolyPolygonOnOrthogonalPlane(aRetval, tools::B3DORIENTATION_Z, !bInside, rRange.getMaxZ(), bStroke);
- }
- }
- }
- }
- }
-
- return aRetval;
- }
-
} // end of namespace tools
} // end of namespace basegfx
diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx
index 65a7f6b800db..306f97b5c621 100644
--- a/basegfx/source/polygon/b3dpolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolygontools.cxx
@@ -88,27 +88,6 @@ namespace basegfx
return rCandidate.getNormal();
}
- B2VectorOrientation getOrientation(const B3DPolygon& rCandidate)
- {
- B2VectorOrientation eRetval(ORIENTATION_NEUTRAL);
-
- if(rCandidate.count() > 2L)
- {
- const double fSignedArea(getSignedArea(rCandidate));
-
- if(fSignedArea > 0.0)
- {
- eRetval = ORIENTATION_POSITIVE;
- }
- else if(fSignedArea < 0.0)
- {
- eRetval = ORIENTATION_NEGATIVE;
- }
- }
-
- return eRetval;
- }
-
double getSignedArea(const B3DPolygon& rCandidate)
{
double fRetval(0.0);
@@ -586,81 +565,6 @@ namespace basegfx
return aRetval;
}
- bool isInEpsilonRange(const B3DPoint& rEdgeStart, const B3DPoint& rEdgeEnd, const B3DPoint& rTestPosition, double fDistance)
- {
- // build edge vector
- const B3DVector aEdge(rEdgeEnd - rEdgeStart);
- bool bDoDistanceTestStart(false);
- bool bDoDistanceTestEnd(false);
-
- if(aEdge.equalZero())
- {
- // no edge, just a point. Do one of the distance tests.
- bDoDistanceTestStart = true;
- }
- else
- {
- // calculate fCut in aEdge
- const B3DVector aTestEdge(rTestPosition - rEdgeStart);
- const double fScalarTestEdge(aEdge.scalar(aTestEdge));
- const double fScalarStartEdge(aEdge.scalar(rEdgeStart));
- const double fScalarEdge(aEdge.scalar(aEdge));
- const double fCut((fScalarTestEdge - fScalarStartEdge) / fScalarEdge);
- const double fZero(0.0);
- const double fOne(1.0);
-
- if(fTools::less(fCut, fZero))
- {
- // left of rEdgeStart
- bDoDistanceTestStart = true;
- }
- else if(fTools::more(fCut, fOne))
- {
- // right of rEdgeEnd
- bDoDistanceTestEnd = true;
- }
- else
- {
- // inside line [0.0 .. 1.0]
- const B3DPoint aCutPoint(interpolate(rEdgeStart, rEdgeEnd, fCut));
- const B3DVector aDelta(rTestPosition - aCutPoint);
- const double fDistanceSquare(aDelta.scalar(aDelta));
-
- if(fDistanceSquare <= fDistance * fDistance * fDistance)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- }
-
- if(bDoDistanceTestStart)
- {
- const B3DVector aDelta(rTestPosition - rEdgeStart);
- const double fDistanceSquare(aDelta.scalar(aDelta));
-
- if(fDistanceSquare <= fDistance * fDistance * fDistance)
- {
- return true;
- }
- }
- else if(bDoDistanceTestEnd)
- {
- const B3DVector aDelta(rTestPosition - rEdgeEnd);
- const double fDistanceSquare(aDelta.scalar(aDelta));
-
- if(fDistanceSquare <= fDistance * fDistance * fDistance)
- {
- return true;
- }
- }
-
- return false;
- }
-
bool isInside(const B3DPolygon& rCandidate, const B3DPoint& rPoint, bool bWithBorder)
{
if(bWithBorder && isPointOnPolygon(rCandidate, rPoint, true))
diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx
index 928fb3132921..b229eaeecc45 100644
--- a/basegfx/source/polygon/b3dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolypolygontools.cxx
@@ -57,42 +57,6 @@ namespace basegfx
return aRetval;
}
- void applyLineDashing(const B3DPolyPolygon& rCandidate, const ::std::vector<double>& rDotDashArray, B3DPolyPolygon* pLineTarget, B3DPolyPolygon* pGapTarget, double fFullDashDotLen)
- {
- if(0.0 == fFullDashDotLen && rDotDashArray.size())
- {
- // calculate fFullDashDotLen from rDotDashArray
- fFullDashDotLen = ::std::accumulate(rDotDashArray.begin(), rDotDashArray.end(), 0.0);
- }
-
- if(rCandidate.count() && fFullDashDotLen > 0.0)
- {
- B3DPolyPolygon aLineTarget, aGapTarget;
-
- for(sal_uInt32 a(0L); a < rCandidate.count(); a++)
- {
- const B3DPolygon aCandidate(rCandidate.getB3DPolygon(a));
-
- applyLineDashing(
- aCandidate,
- rDotDashArray,
- pLineTarget ? &aLineTarget : 0,
- pGapTarget ? &aGapTarget : 0,
- fFullDashDotLen);
-
- if(pLineTarget)
- {
- pLineTarget->append(aLineTarget);
- }
-
- if(pGapTarget)
- {
- pGapTarget->append(aGapTarget);
- }
- }
- }
- }
-
B3DPolyPolygon createUnitCubePolyPolygon()
{
static B3DPolyPolygon aRetval;
diff --git a/basegfx/source/range/b2xrange.cxx b/basegfx/source/range/b2xrange.cxx
index 9c6b4252cadd..8b8f81136296 100644
--- a/basegfx/source/range/b2xrange.cxx
+++ b/basegfx/source/range/b2xrange.cxx
@@ -126,15 +126,6 @@ namespace basegfx
return o_rResult;
}
- ::std::vector< B2IBox >& computeSetDifference( ::std::vector< B2IBox >& o_rResult,
- const B2IBox& rFirst,
- const B2IBox& rSecond )
- {
- doComputeSetDifference( o_rResult, rFirst, rSecond );
-
- return o_rResult;
- }
-
} // end of namespace basegfx
// eof