diff options
442 files changed, 1516 insertions, 1513 deletions
diff --git a/basegfx/source/color/bcolortools.cxx b/basegfx/source/color/bcolortools.cxx index b28607bf298d..7b5bf9cae140 100644 --- a/basegfx/source/color/bcolortools.cxx +++ b/basegfx/source/color/bcolortools.cxx @@ -21,7 +21,7 @@ #include <basegfx/color/bcolor.hxx> #include <basegfx/color/bcolortools.hxx> -namespace basegfx { namespace tools +namespace basegfx { namespace utils { BColor rgb2hsl(const BColor& rRGBColor) { diff --git a/basegfx/source/matrix/b2dhommatrix.cxx b/basegfx/source/matrix/b2dhommatrix.cxx index f9bc24e81ea4..9f7d5bff0156 100644 --- a/basegfx/source/matrix/b2dhommatrix.cxx +++ b/basegfx/source/matrix/b2dhommatrix.cxx @@ -188,7 +188,7 @@ namespace basegfx double fSin(0.0); double fCos(1.0); - tools::createSinCosOrthogonal(fSin, fCos, fRadiant); + utils::createSinCosOrthogonal(fSin, fCos, fRadiant); Impl2DHomMatrix aRotMat; aRotMat.set(0, 0, fCos); diff --git a/basegfx/source/matrix/b2dhommatrixtools.cxx b/basegfx/source/matrix/b2dhommatrixtools.cxx index 89ab91424706..a267b05b96d1 100644 --- a/basegfx/source/matrix/b2dhommatrixtools.cxx +++ b/basegfx/source/matrix/b2dhommatrixtools.cxx @@ -25,7 +25,7 @@ namespace basegfx { - namespace tools + namespace utils { void createSinCosOrthogonal(double& o_rSin, double& o_rCos, double fRadiant) { @@ -412,7 +412,7 @@ namespace basegfx { return B2DTuple(rMatrix.get(0, nCol), rMatrix.get(1, nCol)); } - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx index 8ae52d508fd2..042cb480437b 100644 --- a/basegfx/source/polygon/b2dlinegeometry.cxx +++ b/basegfx/source/polygon/b2dlinegeometry.cxx @@ -33,7 +33,7 @@ namespace basegfx { - namespace tools + namespace utils { B2DPolyPolygon createAreaGeometryForLineStartEnd( const B2DPolygon& rCandidate, @@ -47,7 +47,7 @@ namespace basegfx { B2DPolyPolygon aRetval; OSL_ENSURE(rCandidate.count() > 1, "createAreaGeometryForLineStartEnd: Line polygon has too less points (!)"); - OSL_ENSURE(rArrow.count() > 0, "createAreaGeometryForLineStartEnd: Empty arrow tools::PolyPolygon (!)"); + OSL_ENSURE(rArrow.count() > 0, "createAreaGeometryForLineStartEnd: Empty arrow utils::PolyPolygon (!)"); OSL_ENSURE(fWidth > 0.0, "createAreaGeometryForLineStartEnd: Width too small (!)"); OSL_ENSURE(fDockingPosition >= 0.0 && fDockingPosition <= 1.0, "createAreaGeometryForLineStartEnd: fDockingPosition out of range [0.0 .. 1.0] (!)"); @@ -75,7 +75,7 @@ namespace basegfx const B2DRange aArrowSize(getRange(rArrow)); // build ArrowTransform; center in X, align with axis in Y - B2DHomMatrix aArrowTransform(basegfx::tools::createTranslateB2DHomMatrix( + B2DHomMatrix aArrowTransform(basegfx::utils::createTranslateB2DHomMatrix( -aArrowSize.getCenter().getX(), -aArrowSize.getMinimum().getY())); // scale to target size @@ -125,7 +125,7 @@ namespace basegfx return aRetval; } - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx namespace basegfx @@ -359,7 +359,7 @@ namespace basegfx const B2DVector aPerpendStartA(aNormalizedPerpendicularA * -fHalfLineWidth); const B2DVector aPerpendEndA(aNormalizedPerpendicularB * -fHalfLineWidth); double fCutA(0.0); - const CutFlagValue aCutA(tools::findCut( + const CutFlagValue aCutA(utils::findCut( rEdge.getStartPoint(), aPerpendStartA, rEdge.getEndPoint(), aPerpendEndA, CutFlagValue::ALL, &fCutA)); @@ -369,7 +369,7 @@ namespace basegfx const B2DVector aPerpendStartB(aNormalizedPerpendicularA * fHalfLineWidth); const B2DVector aPerpendEndB(aNormalizedPerpendicularB * fHalfLineWidth); double fCutB(0.0); - const CutFlagValue aCutB(tools::findCut( + const CutFlagValue aCutB(utils::findCut( rEdge.getEndPoint(), aPerpendEndB, rEdge.getStartPoint(), aPerpendStartB, CutFlagValue::ALL, &fCutB)); @@ -384,10 +384,10 @@ namespace basegfx { if(bStartRound) { - basegfx::B2DPolygon aStartPolygon(tools::createHalfUnitCircle()); + basegfx::B2DPolygon aStartPolygon(utils::createHalfUnitCircle()); aStartPolygon.transform( - tools::createScaleShearXRotateTranslateB2DHomMatrix( + utils::createScaleShearXRotateTranslateB2DHomMatrix( fHalfLineWidth, fHalfLineWidth, 0.0, atan2(aTangentA.getY(), aTangentA.getX()) + F_PI2, @@ -447,10 +447,10 @@ namespace basegfx { if(bEndRound) { - basegfx::B2DPolygon aEndPolygon(tools::createHalfUnitCircle()); + basegfx::B2DPolygon aEndPolygon(utils::createHalfUnitCircle()); aEndPolygon.transform( - tools::createScaleShearXRotateTranslateB2DHomMatrix( + utils::createScaleShearXRotateTranslateB2DHomMatrix( fHalfLineWidth, fHalfLineWidth, 0.0, atan2(aTangentB.getY(), aTangentB.getX()) - F_PI2, @@ -522,7 +522,7 @@ namespace basegfx // Remark: This nearly never happens due to curve preparations to extreme points // and maximum angle turning, but I constructed a test case and checked that it is // working properly. - const B2DPolyPolygon aTemp(tools::solveCrossovers(aBezierPolygon)); + const B2DPolyPolygon aTemp(utils::solveCrossovers(aBezierPolygon)); const sal_uInt32 nTempCount(aTemp.count()); if(nTempCount) @@ -589,11 +589,11 @@ namespace basegfx // create left vertical if(bStartRound) { - aEdgePolygon = tools::createHalfUnitCircle(); + aEdgePolygon = utils::createHalfUnitCircle(); fAngle = atan2(aTangent.getY(), aTangent.getX()); bAngle = true; aEdgePolygon.transform( - tools::createScaleShearXRotateTranslateB2DHomMatrix( + utils::createScaleShearXRotateTranslateB2DHomMatrix( fHalfLineWidth, fHalfLineWidth, 0.0, fAngle + F_PI2, @@ -623,7 +623,7 @@ namespace basegfx // create right vertical if(bEndRound) { - basegfx::B2DPolygon aEndPolygon(tools::createHalfUnitCircle()); + basegfx::B2DPolygon aEndPolygon(utils::createHalfUnitCircle()); if(!bAngle) { @@ -631,7 +631,7 @@ namespace basegfx } aEndPolygon.transform( - tools::createScaleShearXRotateTranslateB2DHomMatrix( + utils::createScaleShearXRotateTranslateB2DHomMatrix( fHalfLineWidth, fHalfLineWidth, 0.0, fAngle - F_PI2, @@ -713,7 +713,7 @@ namespace basegfx // is not needed since the same fCut will be found on the first edge. // If it exists, insert it to complete the mitered fill polygon. double fCutPos(0.0); - tools::findCut(aStartPoint, rTangentPrev, aEndPoint, rTangentEdge, CutFlagValue::ALL, &fCutPos); + utils::findCut(aStartPoint, rTangentPrev, aEndPoint, rTangentEdge, CutFlagValue::ALL, &fCutPos); if(fCutPos != 0.0) { @@ -740,7 +740,7 @@ namespace basegfx fAngleEnd += F_2PI; } - const B2DPolygon aBow(tools::createPolygonFromEllipseSegment(rPoint, fHalfLineWidth, fHalfLineWidth, fAngleStart, fAngleEnd)); + const B2DPolygon aBow(utils::createPolygonFromEllipseSegment(rPoint, fHalfLineWidth, fHalfLineWidth, fAngleStart, fAngleEnd)); if(aBow.count() > 1) { @@ -777,7 +777,7 @@ namespace basegfx } } // end of anonymus namespace - namespace tools + namespace utils { B2DPolyPolygon createAreaGeometry( const B2DPolygon& rCandidate, @@ -971,7 +971,7 @@ namespace basegfx return B2DPolyPolygon(rCandidate); } } - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b2dpolygon.cxx b/basegfx/source/polygon/b2dpolygon.cxx index aa528ad861ac..17df4c4b3738 100644 --- a/basegfx/source/polygon/b2dpolygon.cxx +++ b/basegfx/source/polygon/b2dpolygon.cxx @@ -477,7 +477,7 @@ public: { if(!mpDefaultSubdivision) { - const_cast< ImplBufferedData* >(this)->mpDefaultSubdivision.reset(new basegfx::B2DPolygon(basegfx::tools::adaptiveSubdivideByAngle(rSource))); + const_cast< ImplBufferedData* >(this)->mpDefaultSubdivision.reset(new basegfx::B2DPolygon(basegfx::utils::adaptiveSubdivideByAngle(rSource))); } return *mpDefaultSubdivision; diff --git a/basegfx/source/polygon/b2dpolygonclipper.cxx b/basegfx/source/polygon/b2dpolygonclipper.cxx index 63d3ac8c2210..5057fc52d977 100644 --- a/basegfx/source/polygon/b2dpolygonclipper.cxx +++ b/basegfx/source/polygon/b2dpolygonclipper.cxx @@ -25,12 +25,12 @@ #include <basegfx/polygon/b2dpolygoncutandtouch.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/curve/b2dcubicbezier.hxx> -#include <basegfx/tools/rectcliptools.hxx> +#include <basegfx/utils/rectcliptools.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> namespace basegfx { - namespace tools + namespace utils { B2DPolyPolygon clipPolygonOnParallelAxis(const B2DPolygon& rCandidate, bool bParallelToXAxis, bool bAboveAxis, double fValueOnOtherAxis, bool bStroke) { @@ -360,7 +360,7 @@ namespace basegfx { aCandidate.getBezierSegment(b, aEdge); const B2DPoint aTestPoint(aEdge.interpolatePoint(0.5)); - const bool bIsInside(tools::isInside(rClip, aTestPoint) == bInside); + const bool bIsInside(utils::isInside(rClip, aTestPoint) == bInside); if(bIsInside) { @@ -413,10 +413,10 @@ namespace basegfx // check for simplification with ranges if !bStroke (handling as stroke is more simple), // but also only when bInside, else the simplification may lead to recursive calls (see // calls to clipPolyPolygonOnPolyPolygon in clipPolyPolygonOnRange and clipPolygonOnRange) - if (bInside && basegfx::tools::isRectangle(rClip)) + if (bInside && basegfx::utils::isRectangle(rClip)) { // #i125349# detect if both given PolyPolygons are indeed ranges - if (basegfx::tools::isRectangle(rCandidate)) + if (basegfx::utils::isRectangle(rCandidate)) { // both are rectangle if(rCandidate.getB2DRange().equal(rClip.getB2DRange())) @@ -440,9 +440,9 @@ namespace basegfx else { // use common aIntersectionRange as result, convert - // to expected tools::PolyPolygon form + // to expected utils::PolyPolygon form return basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect(aIntersectionRange)); + basegfx::utils::createPolygonFromRect(aIntersectionRange)); } } } @@ -461,7 +461,7 @@ namespace basegfx // Also get rid of some not-needed polygons (neutral, no area -> when // no intersections, these are tubes). // Now it is possible to correct the orientations in the cut-free - // polygons to values corresponding to painting the tools::PolyPolygon with + // polygons to values corresponding to painting the utils::PolyPolygon with // a XOR-WindingRule. aMergePolyPolygonA = solveCrossovers(aMergePolyPolygonA); aMergePolyPolygonA = stripNeutralPolygons(aMergePolyPolygonA); @@ -814,7 +814,7 @@ namespace basegfx return aResult; } - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx index 6f164d2965ec..843b9c64e7ae 100644 --- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx +++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx @@ -77,7 +77,7 @@ namespace basegfx public: const B2DPolygon& getPolygon() const { return maPolygon; } - void setPolygon(const B2DPolygon& rNew) { maPolygon = rNew; maRange = tools::getRange(maPolygon); } + void setPolygon(const B2DPolygon& rNew) { maPolygon = rNew; maRange = utils::getRange(maPolygon); } const B2DRange& getRange() const { return maRange; } temporaryPointVector& getTemporaryPointVector() { return maPoints; } }; @@ -160,7 +160,7 @@ namespace basegfx if(rCandidate.isClosed()) { // set closed flag and correct last point (which is added double now). - tools::closeWithGeometryChange(aRetval); + utils::closeWithGeometryChange(aRetval); } return aRetval; @@ -841,7 +841,7 @@ namespace basegfx namespace basegfx { - namespace tools + namespace utils { B2DPolygon addPointsAtCutsAndTouches(const B2DPolygon& rCandidate) @@ -1070,7 +1070,7 @@ namespace basegfx return rCandidate; } - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx index 00ba32193db5..45fc27f5575f 100644 --- a/basegfx/source/polygon/b2dpolygontools.cxx +++ b/basegfx/source/polygon/b2dpolygontools.cxx @@ -47,7 +47,7 @@ static double fAngleBoundStartValue = ANGLE_BOUND_START_VALUE; namespace basegfx { - namespace tools + namespace utils { void openWithGeometryChange(B2DPolygon& rCandidate) { @@ -3225,7 +3225,7 @@ namespace basegfx if(bCheckClosed) { // check for closed state flag - tools::checkClosed(aRetval); + utils::checkClosed(aRetval); } } @@ -3345,7 +3345,7 @@ namespace basegfx SAL_WARN_IF(ePolygonFlag == css::drawing::PolygonFlags_CONTROL || bControlA != bControlB, "basegfx", "UnoPolygonBezierCoordsToB2DPolygon: Illegal source polygon (!)"); - // the previous writes used the B2DPolyPoygon -> tools::PolyPolygon converter + // the previous writes used the B2DPolyPoygon -> utils::PolyPolygon converter // which did not create minimal PolyPolygons, but created all control points // as null vectors (identical points). Because of the former P(CA)(CB)-norm of // B2DPolygon and it's unused sign of being the zero-vector and CA and CB being @@ -3536,7 +3536,7 @@ namespace basegfx } } - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b2dpolygontriangulator.cxx b/basegfx/source/polygon/b2dpolygontriangulator.cxx index 4a85547d7de3..8cd4f895b14a 100644 --- a/basegfx/source/polygon/b2dpolygontriangulator.cxx +++ b/basegfx/source/polygon/b2dpolygontriangulator.cxx @@ -181,7 +181,7 @@ namespace basegfx bool Triangulator::CheckPointInTriangle(EdgeEntry* pEdgeA, EdgeEntry const * pEdgeB, const B2DPoint& rTestPoint) { // inside triangle or on edge? - if(tools::isPointInTriangle(pEdgeA->getStart(), pEdgeA->getEnd(), pEdgeB->getEnd(), rTestPoint, true)) + if(utils::isPointInTriangle(pEdgeA->getStart(), pEdgeA->getEnd(), pEdgeB->getEnd(), rTestPoint, true)) { // but not on point if(!rTestPoint.equal(pEdgeA->getEnd()) && !rTestPoint.equal(pEdgeB->getEnd())) @@ -387,9 +387,9 @@ namespace basegfx B2DPolygon aRetval; // subdivide locally (triangulate does not work with beziers), remove double and neutral points - B2DPolygon aCandidate(rCandidate.areControlPointsUsed() ? tools::adaptiveSubdivideByAngle(rCandidate) : rCandidate); + B2DPolygon aCandidate(rCandidate.areControlPointsUsed() ? utils::adaptiveSubdivideByAngle(rCandidate) : rCandidate); aCandidate.removeDoublePoints(); - aCandidate = tools::removeNeutralPoints(aCandidate); + aCandidate = utils::removeNeutralPoints(aCandidate); if(aCandidate.count() == 2) { @@ -398,10 +398,10 @@ namespace basegfx } else if(aCandidate.count() > 2) { - if(tools::isConvex(aCandidate)) + if(utils::isConvex(aCandidate)) { // polygon is convex, just use a triangle fan - tools::addTriangleFan(aCandidate, aRetval); + utils::addTriangleFan(aCandidate, aRetval); } else { @@ -420,7 +420,7 @@ namespace basegfx B2DPolygon aRetval; // subdivide locally (triangulate does not work with beziers) - B2DPolyPolygon aCandidate(rCandidate.areControlPointsUsed() ? tools::adaptiveSubdivideByAngle(rCandidate) : rCandidate); + B2DPolyPolygon aCandidate(rCandidate.areControlPointsUsed() ? utils::adaptiveSubdivideByAngle(rCandidate) : rCandidate); if(aCandidate.count() == 1) { 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: */ diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx index d0353f5640c8..6e0a62f18a89 100644 --- a/basegfx/source/polygon/b2dpolypolygontools.cxx +++ b/basegfx/source/polygon/b2dpolypolygontools.cxx @@ -28,7 +28,7 @@ namespace basegfx { - namespace tools + namespace utils { B2DPolyPolygon correctOrientations(const B2DPolyPolygon& rCandidate) { @@ -38,7 +38,7 @@ namespace basegfx for(sal_uInt32 a(0); a < nCount; a++) { const B2DPolygon aCandidate(rCandidate.getB2DPolygon(a)); - const B2VectorOrientation aOrientation(tools::getOrientation(aCandidate)); + const B2VectorOrientation aOrientation(utils::getOrientation(aCandidate)); sal_uInt32 nDepth(0); for(sal_uInt32 b(0); b < nCount; b++) @@ -47,7 +47,7 @@ namespace basegfx { const B2DPolygon aCompare(rCandidate.getB2DPolygon(b)); - if(tools::isInside(aCompare, aCandidate, true)) + if(utils::isInside(aCompare, aCandidate, true)) { nDepth++; } @@ -85,7 +85,7 @@ namespace basegfx { const B2DPolygon aCompare(rCandidate.getB2DPolygon(b)); - if(tools::isInside(aCompare, aCandidate, true)) + if(utils::isInside(aCompare, aCandidate, true)) { nDepth++; } @@ -125,7 +125,7 @@ namespace basegfx if(aCandidate.areControlPointsUsed()) { - aRetval.append(tools::adaptiveSubdivideByDistance(aCandidate, fDistanceBound)); + aRetval.append(utils::adaptiveSubdivideByDistance(aCandidate, fDistanceBound)); } else { @@ -154,7 +154,7 @@ namespace basegfx if(aCandidate.areControlPointsUsed()) { - aRetval.append(tools::adaptiveSubdivideByAngle(aCandidate, fAngleBound)); + aRetval.append(utils::adaptiveSubdivideByAngle(aCandidate, fAngleBound)); } else { @@ -205,7 +205,7 @@ namespace basegfx for(sal_uInt32 a(0); a < nPolygonCount; a++) { B2DPolygon aCandidate = rCandidate.getB2DPolygon(a); - aRetval.expand(tools::getRange(aCandidate)); + aRetval.expand(utils::getRange(aCandidate)); } return aRetval; @@ -220,7 +220,7 @@ namespace basegfx { const B2DPolygon aCandidate(rCandidate.getB2DPolygon(a)); - fRetval += tools::getSignedArea(aCandidate); + fRetval += utils::getSignedArea(aCandidate); } return fRetval; @@ -704,7 +704,7 @@ namespace basegfx } } - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx index 7514abe6e3c8..98d77fe362d2 100644 --- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx +++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx @@ -29,7 +29,7 @@ namespace basegfx { - namespace tools + namespace utils { bool PointIndex::operator<(const PointIndex& rComp) const { @@ -488,7 +488,7 @@ namespace basegfx // |y1'| = |-sin phi cos phi| |(y1 - y2)/2| const B2DPoint p1(nLastX, nLastY); const B2DPoint p2(nX, nY); - B2DHomMatrix aTransform(basegfx::tools::createRotateB2DHomMatrix(-fPhi*M_PI/180)); + B2DHomMatrix aTransform(basegfx::utils::createRotateB2DHomMatrix(-fPhi*M_PI/180)); const B2DPoint p1_prime( aTransform * B2DPoint(((p1-p2)/2.0)) ); @@ -573,11 +573,11 @@ namespace basegfx // finally, create bezier polygon from this B2DPolygon aSegment( - tools::createPolygonFromUnitEllipseSegment( + utils::createPolygonFromUnitEllipseSegment( fTheta1, fTheta2 )); // transform ellipse by rotation & move to final center - aTransform = basegfx::tools::createScaleB2DHomMatrix(fRX, fRY); + aTransform = basegfx::utils::createScaleB2DHomMatrix(fRX, fRY); aTransform.translate(aCenter_prime.getX(), aCenter_prime.getY()); aTransform.rotate(fPhi*M_PI/180); diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx index 8572e8d18754..3e3c1c9d6b8c 100644 --- a/basegfx/source/polygon/b2dtrapezoid.cxx +++ b/basegfx/source/polygon/b2dtrapezoid.cxx @@ -360,24 +360,24 @@ namespace basegfx // check if one point is on the other edge (a touch, not a cut) const B2DVector aDeltaB(aEdgeB.getDeltaX(), aEdgeB.getDeltaY()); - if(tools::isPointOnEdge(aEdgeA.getStart(), aEdgeB.getStart(), aDeltaB)) + if(utils::isPointOnEdge(aEdgeA.getStart(), aEdgeB.getStart(), aDeltaB)) { return splitEdgeAtGivenPoint(aEdgeB, aEdgeA.getStart(), aCurrent); } - if(tools::isPointOnEdge(aEdgeA.getEnd(), aEdgeB.getStart(), aDeltaB)) + if(utils::isPointOnEdge(aEdgeA.getEnd(), aEdgeB.getStart(), aDeltaB)) { return splitEdgeAtGivenPoint(aEdgeB, aEdgeA.getEnd(), aCurrent); } const B2DVector aDeltaA(aEdgeA.getDeltaX(), aEdgeA.getDeltaY()); - if(tools::isPointOnEdge(aEdgeB.getStart(), aEdgeA.getStart(), aDeltaA)) + if(utils::isPointOnEdge(aEdgeB.getStart(), aEdgeA.getStart(), aDeltaA)) { return splitEdgeAtGivenPoint(aEdgeA, aEdgeB.getStart(), aCurrent); } - if(tools::isPointOnEdge(aEdgeB.getEnd(), aEdgeA.getStart(), aDeltaA)) + if(utils::isPointOnEdge(aEdgeB.getEnd(), aEdgeA.getStart(), aDeltaA)) { return splitEdgeAtGivenPoint(aEdgeA, aEdgeB.getEnd(), aCurrent); } @@ -387,7 +387,7 @@ namespace basegfx double fCutA(0.0); double fCutB(0.0); - if(tools::findCut( + if(utils::findCut( aEdgeA.getStart(), aDeltaA, aEdgeB.getStart(), aDeltaB, CutFlagValue::LINE, @@ -943,9 +943,9 @@ namespace basegfx namespace basegfx { - namespace tools + namespace utils { - // convert Source tools::PolyPolygon to trapezoids + // convert Source utils::PolyPolygon to trapezoids void trapezoidSubdivide(B2DTrapezoidVector& ro_Result, const B2DPolyPolygon& rSourcePolyPolygon) { trapezoidhelper::TrapezoidSubdivider aTrapezoidSubdivider(rSourcePolyPolygon); @@ -1168,7 +1168,7 @@ namespace basegfx } - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx index 0e09d996dd37..de362287f8ea 100644 --- a/basegfx/source/polygon/b3dpolygontools.cxx +++ b/basegfx/source/polygon/b3dpolygontools.cxx @@ -31,7 +31,7 @@ namespace basegfx { - namespace tools + namespace utils { // B3DPolygon tools void checkClosed(B3DPolygon& rCandidate) @@ -786,7 +786,7 @@ namespace basegfx } } - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx index 04408dee4721..ba93d1926b84 100644 --- a/basegfx/source/polygon/b3dpolypolygontools.cxx +++ b/basegfx/source/polygon/b3dpolypolygontools.cxx @@ -35,7 +35,7 @@ namespace basegfx { - namespace tools + namespace utils { // B3DPolyPolygon tools B3DRange getRange(const B3DPolyPolygon& rCandidate) @@ -525,7 +525,7 @@ namespace basegfx // see callers if(bCheckClosed) { - basegfx::tools::checkClosed(aNewPolygon); + basegfx::utils::checkClosed(aNewPolygon); } aRetval.append(aNewPolygon); @@ -606,7 +606,7 @@ namespace basegfx } } - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/range/b2dpolyrange.cxx b/basegfx/source/range/b2dpolyrange.cxx index 3b86f4fd8c0c..a98578ee974d 100644 --- a/basegfx/source/range/b2dpolyrange.cxx +++ b/basegfx/source/range/b2dpolyrange.cxx @@ -84,7 +84,7 @@ namespace basegfx B2DPolyPolygon solveCrossovers() const { - return tools::solveCrossovers(maRanges,maOrient); + return utils::solveCrossovers(maRanges,maOrient); } void transform(const basegfx::B2DHomMatrix& rTranslate) diff --git a/basegfx/source/range/b2drangeclipper.cxx b/basegfx/source/range/b2drangeclipper.cxx index 2b68bae713ad..e38a9132ec80 100644 --- a/basegfx/source/range/b2drangeclipper.cxx +++ b/basegfx/source/range/b2drangeclipper.cxx @@ -838,7 +838,7 @@ namespace basegfx } } - namespace tools + namespace utils { B2DPolyPolygon solveCrossovers(const std::vector<B2DRange>& rRanges, const std::vector<B2VectorOrientation>& rOrientations) diff --git a/basegfx/source/tools/b2dclipstate.cxx b/basegfx/source/tools/b2dclipstate.cxx index 5e0453fbf529..cf848f1af1c2 100644 --- a/basegfx/source/tools/b2dclipstate.cxx +++ b/basegfx/source/tools/b2dclipstate.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <basegfx/tools/b2dclipstate.hxx> +#include <basegfx/utils/b2dclipstate.hxx> #include <basegfx/range/b2drange.hxx> #include <basegfx/range/b2dpolyrange.hxx> @@ -31,7 +31,7 @@ namespace basegfx { -namespace tools +namespace utils { class ImplB2DClipState { @@ -196,7 +196,7 @@ namespace tools // assumption: maClipPoly has kept polygons prepared for // clipping; i.e. no neutral polygons & correct // orientation - maPendingPolygons = tools::prepareForPolygonOperation(maPendingPolygons); + maPendingPolygons = utils::prepareForPolygonOperation(maPendingPolygons); const bool bIsEmpty=isNullClipPoly(); const bool bIsCleared=!maClipPoly.count(); switch(mePendingOps) @@ -207,7 +207,7 @@ namespace tools if( bIsEmpty ) maClipPoly = maPendingPolygons; else - maClipPoly = tools::solvePolygonOperationOr( + maClipPoly = utils::solvePolygonOperationOr( maClipPoly, maPendingPolygons); break; @@ -217,7 +217,7 @@ namespace tools if( bIsCleared ) maClipPoly = maPendingPolygons; else - maClipPoly = tools::solvePolygonOperationAnd( + maClipPoly = utils::solvePolygonOperationAnd( maClipPoly, maPendingPolygons); break; @@ -235,13 +235,13 @@ namespace tools // 'holes' here) // going for an ugly hack meanwhile - maClipPoly = tools::solvePolygonOperationXor( + maClipPoly = utils::solvePolygonOperationXor( B2DPolyPolygon( - tools::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), + utils::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), maPendingPolygons); } else - maClipPoly = tools::solvePolygonOperationXor( + maClipPoly = utils::solvePolygonOperationXor( maClipPoly, maPendingPolygons); break; @@ -264,13 +264,13 @@ namespace tools // 'holes' here) // going for an ugly hack meanwhile - maClipPoly = tools::solvePolygonOperationDiff( + maClipPoly = utils::solvePolygonOperationDiff( B2DPolyPolygon( - tools::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), + utils::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), maPendingPolygons); } else - maClipPoly = tools::solvePolygonOperationDiff( + maClipPoly = utils::solvePolygonOperationDiff( maClipPoly, maPendingPolygons); break; @@ -300,7 +300,7 @@ namespace tools if( bIsEmpty ) maClipPoly = aCollectedRanges; else - maClipPoly = tools::solvePolygonOperationOr( + maClipPoly = utils::solvePolygonOperationOr( maClipPoly, aCollectedRanges); break; @@ -315,7 +315,7 @@ namespace tools if( bIsCleared ) maClipPoly = aCollectedRanges; else - maClipPoly = tools::solvePolygonOperationAnd( + maClipPoly = utils::solvePolygonOperationAnd( maClipPoly, aCollectedRanges); break; @@ -337,13 +337,13 @@ namespace tools // 'holes' here) // going for an ugly hack meanwhile - maClipPoly = tools::solvePolygonOperationXor( + maClipPoly = utils::solvePolygonOperationXor( B2DPolyPolygon( - tools::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), + utils::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), aCollectedRanges); } else - maClipPoly = tools::solvePolygonOperationXor( + maClipPoly = utils::solvePolygonOperationXor( maClipPoly, aCollectedRanges); break; @@ -366,13 +366,13 @@ namespace tools // 'holes' here) // going for an ugly hack meanwhile - maClipPoly = tools::solvePolygonOperationDiff( + maClipPoly = utils::solvePolygonOperationDiff( B2DPolyPolygon( - tools::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), + utils::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), aCollectedRanges); } else - maClipPoly = tools::solvePolygonOperationDiff( + maClipPoly = utils::solvePolygonOperationDiff( maClipPoly, aCollectedRanges); break; @@ -493,7 +493,7 @@ namespace tools } -} // end of namespace tools +} // end of namespace utils } // end of namespace basegfx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/tools/canvastools.cxx b/basegfx/source/tools/canvastools.cxx index e65ae9ce44b3..7073e49711ba 100644 --- a/basegfx/source/tools/canvastools.cxx +++ b/basegfx/source/tools/canvastools.cxx @@ -34,7 +34,7 @@ #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/awt/Point.hpp> #include <com/sun/star/awt/Rectangle.hpp> -#include <basegfx/tools/unopolypolygon.hxx> +#include <basegfx/utils/unopolypolygon.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/matrix/b3dhommatrix.hxx> #include <basegfx/vector/b2dsize.hxx> @@ -47,7 +47,7 @@ #include <basegfx/range/b2ibox.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <limits> using namespace ::com::sun::star; diff --git a/basegfx/source/tools/gradienttools.cxx b/basegfx/source/tools/gradienttools.cxx index a3c42a6b7e75..b05d9b219a53 100644 --- a/basegfx/source/tools/gradienttools.cxx +++ b/basegfx/source/tools/gradienttools.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <basegfx/tools/gradienttools.hxx> +#include <basegfx/utils/gradienttools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/range/b2drange.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> @@ -100,7 +100,7 @@ namespace basegfx { const B2DPoint aCenter(0.5 * fTargetSizeX, 0.5 * fTargetSizeY); - aTextureTransform *= basegfx::tools::createRotateAroundPoint(aCenter, fAngle); + aTextureTransform *= basegfx::utils::createRotateAroundPoint(aCenter, fAngle); } // add object translate @@ -161,7 +161,7 @@ namespace basegfx { const B2DPoint aCenter(0.5 * fTargetSizeX, 0.5 * fTargetSizeY); - aTextureTransform *= basegfx::tools::createRotateAroundPoint(aCenter, fAngle); + aTextureTransform *= basegfx::utils::createRotateAroundPoint(aCenter, fAngle); } // add defined offsets after rotation @@ -238,7 +238,7 @@ namespace basegfx { const B2DPoint aCenter(0.5 * fTargetSizeX, 0.5 * fTargetSizeY); - aTextureTransform *= basegfx::tools::createRotateAroundPoint(aCenter, fAngle); + aTextureTransform *= basegfx::utils::createRotateAroundPoint(aCenter, fAngle); } // add defined offsets after rotation @@ -258,7 +258,7 @@ namespace basegfx return ODFGradientInfo(aTextureTransform, fAspectRatio, nSteps); } - namespace tools + namespace utils { ODFGradientInfo createLinearODFGradientInfo( const B2DRange& rTargetArea, @@ -465,7 +465,7 @@ namespace basegfx { return getSquareGradientAlpha(rUV, rGradInfo); // only matrix setup differs } - } // namespace tools + } // namespace utils } // namespace basegfx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/tools/keystoplerp.cxx b/basegfx/source/tools/keystoplerp.cxx index e68bb1b60bf6..0b0f230253f1 100644 --- a/basegfx/source/tools/keystoplerp.cxx +++ b/basegfx/source/tools/keystoplerp.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <basegfx/tools/keystoplerp.hxx> +#include <basegfx/utils/keystoplerp.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <osl/diagnose.h> @@ -42,7 +42,7 @@ static void validateInput(const std::vector<double>& rKeyStops) namespace basegfx { - namespace tools + namespace utils { KeyStopLerp::KeyStopLerp( const std::vector<double>& rKeyStops ) : maKeyStops(rKeyStops), diff --git a/basegfx/source/tools/numbertools.cxx b/basegfx/source/tools/numbertools.cxx index 86b926ab55d2..c4bf5792cfb5 100644 --- a/basegfx/source/tools/numbertools.cxx +++ b/basegfx/source/tools/numbertools.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> @@ -17,7 +17,7 @@ #include <utility> -namespace basegfx { namespace tools +namespace basegfx { namespace utils { B2DPolyPolygon number2PolyPolygon(double fValue, sal_Int32 nTotalDigits, sal_Int32 nDecPlaces, bool bLitSegments) { diff --git a/basegfx/source/tools/tools.cxx b/basegfx/source/tools/tools.cxx index ec7170b513a7..16feb0c7ef16 100644 --- a/basegfx/source/tools/tools.cxx +++ b/basegfx/source/tools/tools.cxx @@ -17,14 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/range/b2drange.hxx> #include <algorithm> namespace basegfx { - namespace tools + namespace utils { namespace { diff --git a/basegfx/source/tools/unopolypolygon.cxx b/basegfx/source/tools/unopolypolygon.cxx index 05318647c2fb..e0b5b85f079b 100644 --- a/basegfx/source/tools/unopolypolygon.cxx +++ b/basegfx/source/tools/unopolypolygon.cxx @@ -28,10 +28,10 @@ #include <basegfx/range/b2drange.hxx> #include <basegfx/range/b2drectangle.hxx> #include <basegfx/point/b2dpoint.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/unopolypolygon.hxx> +#include <basegfx/utils/unopolypolygon.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <cppuhelper/supportsservice.hxx> @@ -117,13 +117,13 @@ namespace unotools } } - const B2DRange aBounds( tools::getRange( aSrcPoly ) ); + const B2DRange aBounds( utils::getRange( aSrcPoly ) ); const B2DVector aOffset( unotools::b2DPointFromRealPoint2D( position ) - aBounds.getMinimum() ); if( !aOffset.equalZero() ) { - const B2DHomMatrix aTranslate(tools::createTranslateB2DHomMatrix(aOffset)); + const B2DHomMatrix aTranslate(utils::createTranslateB2DHomMatrix(aOffset)); aSrcPoly.transform( aTranslate ); } diff --git a/basegfx/source/tools/unotools.cxx b/basegfx/source/tools/unotools.cxx index 7e3309e09c79..a80b6b9994a3 100644 --- a/basegfx/source/tools/unotools.cxx +++ b/basegfx/source/tools/unotools.cxx @@ -26,7 +26,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/curve/b2dcubicbezier.hxx> -#include <basegfx/tools/unotools.hxx> +#include <basegfx/utils/unotools.hxx> #include <comphelper/sequence.hxx> using namespace ::com::sun::star; @@ -113,7 +113,7 @@ namespace unotools if(ePolyFlag == drawing::PolygonFlags_CONTROL || bControlA != bControlB) throw lang::IllegalArgumentException(); - // the previous writes used the B2DPolyPoygon -> tools::PolyPolygon converter + // the previous writes used the B2DPolyPoygon -> utils::PolyPolygon converter // which did not create minimal PolyPolygons, but created all control points // as null vectors (identical points). Because of the former P(CA)(CB)-norm of // B2DPolygon and it's unused sign of being the zero-vector and CA and CB being @@ -146,7 +146,7 @@ namespace unotools // #i72807# API import uses old line start/end-equal definition for closed, // so we need to correct this to closed state here - basegfx::tools::checkClosed(aNewPolygon); + basegfx::utils::checkClosed(aNewPolygon); // add new subpolygon aNewPolyPolygon.append(aNewPolygon); diff --git a/basegfx/source/tools/zoomtools.cxx b/basegfx/source/tools/zoomtools.cxx index 57d88de6fe3c..7e007c525b52 100644 --- a/basegfx/source/tools/zoomtools.cxx +++ b/basegfx/source/tools/zoomtools.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <basegfx/tools/zoomtools.hxx> +#include <basegfx/utils/zoomtools.hxx> namespace basegfx { diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx index f5cc617ddbc2..9b9fec5a6d66 100644 --- a/basegfx/test/basegfx2d.cxx +++ b/basegfx/test/basegfx2d.cxx @@ -41,7 +41,7 @@ #include <basegfx/color/bcolor.hxx> #include <basegfx/color/bcolortools.hxx> -#include <basegfx/tools/rectcliptools.hxx> +#include <basegfx/utils/rectcliptools.hxx> #include <iostream> #include <fstream> @@ -138,20 +138,20 @@ public: OUString aExport; CPPUNIT_ASSERT_MESSAGE("importing simple rectangle from SVG-D", - tools::importFromSvgD( aPoly, aPath0, false, nullptr )); - aExport = tools::exportToSvgD( aPoly, true, true, false ); + utils::importFromSvgD( aPoly, aPath0, false, nullptr )); + aExport = utils::exportToSvgD( aPoly, true, true, false ); const char sExportString[] = "m10 10h-20v-20h20z"; CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting rectangle to SVG-D", OUString(sExportString), aExport ); CPPUNIT_ASSERT_MESSAGE("importing simple rectangle from SVG-D (round-trip", - tools::importFromSvgD( aPoly, aExport, false, nullptr )); - aExport = tools::exportToSvgD( aPoly, true, true, false ); + utils::importFromSvgD( aPoly, aExport, false, nullptr )); + aExport = utils::exportToSvgD( aPoly, true, true, false ); CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting rectangle to SVG-D (round-trip)", OUString(sExportString), aExport); CPPUNIT_ASSERT_MESSAGE("importing simple bezier polygon from SVG-D", - tools::importFromSvgD( aPoly, aPath1, false, nullptr )); - aExport = tools::exportToSvgD( aPoly, true, true, false ); + utils::importFromSvgD( aPoly, aPath1, false, nullptr )); + aExport = utils::exportToSvgD( aPoly, true, true, false ); // Adaptions for B2DPolygon bezier change (see #i77162#): @@ -178,11 +178,11 @@ public: // a 2nd good test is that re-importing of aExport has to create the same // B2DPolPolygon again: B2DPolyPolygon aReImport; - CPPUNIT_ASSERT_MESSAGE("importing simple bezier polygon from SVG-D", tools::importFromSvgD( aReImport, aExport, false, nullptr)); + CPPUNIT_ASSERT_MESSAGE("importing simple bezier polygon from SVG-D", utils::importFromSvgD( aReImport, aExport, false, nullptr)); CPPUNIT_ASSERT_EQUAL_MESSAGE("re-imported polygon needs to be identical", aPoly, aReImport); - CPPUNIT_ASSERT_MESSAGE("importing '@' from SVG-D", tools::importFromSvgD( aPoly, aPath2, false, nullptr)); - aExport = tools::exportToSvgD( aPoly, true, true, false ); + CPPUNIT_ASSERT_MESSAGE("importing '@' from SVG-D", utils::importFromSvgD( aPoly, aPath2, false, nullptr)); + aExport = utils::exportToSvgD( aPoly, true, true, false ); // Adaptions for B2DPolygon bezier change (see #i77162#): @@ -198,19 +198,19 @@ public: "8 752-224 1128-21 101-31 183-31 245 0 39 9 70 26 93 17 24 39 36 67 36 145 0 279-80 400-240s182-365 182-615c0-2" "88-107-533-322-734s-487-301-816-301c-395 0-715 124-960 373s-368 569-368 958q0 577.5 357 900c237 216 557 324 95" "8 325 189-1 389-27 600-77 211-52 378-110 503-174q40.5 105 81 210z"; - CPPUNIT_ASSERT_MESSAGE("re-importing '@' from SVG-D", tools::importFromSvgD( aReImport, aExport, false, nullptr)); + CPPUNIT_ASSERT_MESSAGE("re-importing '@' from SVG-D", utils::importFromSvgD( aReImport, aExport, false, nullptr)); CPPUNIT_ASSERT_EQUAL_MESSAGE("re-imported '@' needs to be identical", aPoly, aReImport); CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting '@' to SVG-D", OUString(sExportString1), aExport); CPPUNIT_ASSERT_MESSAGE("importing '@' from SVG-D (round-trip", - tools::importFromSvgD( aPoly, aExport, false, nullptr )); - aExport = tools::exportToSvgD( aPoly, true, true, false ); + utils::importFromSvgD( aPoly, aExport, false, nullptr )); + aExport = utils::exportToSvgD( aPoly, true, true, false ); CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting '@' to SVG-D (round-trip)", OUString(sExportString1), aExport); CPPUNIT_ASSERT_MESSAGE("importing complex polygon from SVG-D", - tools::importFromSvgD( aPoly, aPath3, false, nullptr )); - aExport = tools::exportToSvgD( aPoly, true, true, false ); + utils::importFromSvgD( aPoly, aPath3, false, nullptr )); + aExport = utils::exportToSvgD( aPoly, true, true, false ); const char sExportString2[] = "m1598 125h306v2334h-306v-1105h-1293v1105h-305v-2334h305v973h1293" "zm2159 1015 78-44 85 235-91 47-91 40-90 34-90 29-89 21-88 16-88 10-88 3-102-4-97" @@ -235,14 +235,14 @@ public: CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting complex polygon to SVG-D", OUString(sExportString2), aExport); CPPUNIT_ASSERT_MESSAGE("importing complex polygon from SVG-D (round-trip", - tools::importFromSvgD( aPoly, aExport, false, nullptr )); - aExport = tools::exportToSvgD( aPoly, true, true, false ); + utils::importFromSvgD( aPoly, aExport, false, nullptr )); + aExport = utils::exportToSvgD( aPoly, true, true, false ); CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting complex polygon to SVG-D (round-trip)", OUString(sExportString2), aExport); const B2DPolygon aRect( - tools::createPolygonFromRect( B2DRange(0.0,0.0,4000.0,4000.0) )); - aExport = tools::exportToSvgD( B2DPolyPolygon(aRect), false, false, false ); + utils::createPolygonFromRect( B2DRange(0.0,0.0,4000.0,4000.0) )); + aExport = utils::exportToSvgD( B2DPolyPolygon(aRect), false, false, false ); const char sExportStringRect[] = "M0 0H4000V4000H0Z"; CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting to rectangle svg-d string", @@ -297,7 +297,7 @@ public: // B2DPolyRange relies on correctly orientated rects const B2DRange aRect(0,0,1,1); CPPUNIT_ASSERT_EQUAL_MESSAGE("createPolygonFromRect - correct orientation", - B2VectorOrientation::Positive, tools::getOrientation(tools::createPolygonFromRect(aRect))); + B2VectorOrientation::Positive, utils::getOrientation(utils::createPolygonFromRect(aRect))); } // Change the following lines only, if you add, remove or rename @@ -669,7 +669,7 @@ public: CPPUNIT_ASSERT_MESSAGE("decompose: error test I4", impDecomposeComposeTest(-fSX, -fSY, tan(-fS), -fR)); // cover special case of 180 degree rotation - B2DHomMatrix aTest=tools::createScaleShearXRotateTranslateB2DHomMatrix( + B2DHomMatrix aTest=utils::createScaleShearXRotateTranslateB2DHomMatrix( 6425,3938, 0, 180*F_PI180, @@ -795,7 +795,7 @@ public: void testIsRectangle() { B2DPolygon aRect1( - tools::createPolygonFromRect( + utils::createPolygonFromRect( B2DRange(0,0,1,1) ) ); B2DPolygon aRect2 { @@ -847,19 +847,19 @@ public: aNonRect5.setClosed(true); CPPUNIT_ASSERT_MESSAGE("checking rectangle-ness of rectangle 1", - tools::isRectangle( aRect1 )); + utils::isRectangle( aRect1 )); CPPUNIT_ASSERT_MESSAGE("checking rectangle-ness of rectangle 2", - tools::isRectangle( aRect2 )); + utils::isRectangle( aRect2 )); CPPUNIT_ASSERT_MESSAGE("checking non-rectangle-ness of polygon 1", - !tools::isRectangle( aNonRect1 )); + !utils::isRectangle( aNonRect1 )); CPPUNIT_ASSERT_MESSAGE("checking non-rectangle-ness of polygon 2", - !tools::isRectangle( aNonRect2 )); + !utils::isRectangle( aNonRect2 )); CPPUNIT_ASSERT_MESSAGE("checking non-rectangle-ness of polygon 3", - !tools::isRectangle( aNonRect3 )); + !utils::isRectangle( aNonRect3 )); CPPUNIT_ASSERT_MESSAGE("checking non-rectangle-ness of polygon 4", - !tools::isRectangle( aNonRect4 )); + !utils::isRectangle( aNonRect4 )); CPPUNIT_ASSERT_MESSAGE("checking non-rectangle-ness of polygon 5", - !tools::isRectangle( aNonRect5 )); + !utils::isRectangle( aNonRect5 )); } // Change the following lines only, if you add, remove or rename @@ -901,7 +901,7 @@ public: aPolyPolygon.append(aPolygon); aPolyPolygon.append(aPolygonOffset); B2DTrapezoidVector aVector; - basegfx::tools::trapezoidSubdivide(aVector, aPolyPolygon); + basegfx::utils::trapezoidSubdivide(aVector, aPolyPolygon); CPPUNIT_ASSERT_MESSAGE("more than zero sub-divided trapezoids", aVector.size() > 0); } @@ -984,15 +984,15 @@ public: Type aRange(0,0,10,10); CPPUNIT_ASSERT_MESSAGE("(0,0) is outside range!", - tools::getCohenSutherlandClipFlags(B2IPoint(0,0),aRange) == 0); + utils::getCohenSutherlandClipFlags(B2IPoint(0,0),aRange) == 0); CPPUNIT_ASSERT_MESSAGE("(-1,-1) is inside range!", - tools::getCohenSutherlandClipFlags(B2IPoint(-1,-1),aRange) == - (tools::RectClipFlags::LEFT|tools::RectClipFlags::TOP)); + utils::getCohenSutherlandClipFlags(B2IPoint(-1,-1),aRange) == + (utils::RectClipFlags::LEFT|utils::RectClipFlags::TOP)); CPPUNIT_ASSERT_MESSAGE("(10,10) is outside range!", - tools::getCohenSutherlandClipFlags(B2IPoint(10,10),aRange) == 0); + utils::getCohenSutherlandClipFlags(B2IPoint(10,10),aRange) == 0); CPPUNIT_ASSERT_MESSAGE("(11,11) is inside range!", - tools::getCohenSutherlandClipFlags(B2IPoint(11,11),aRange) == - (tools::RectClipFlags::RIGHT|tools::RectClipFlags::BOTTOM)); + utils::getCohenSutherlandClipFlags(B2IPoint(11,11),aRange) == + (utils::RectClipFlags::RIGHT|utils::RectClipFlags::BOTTOM)); } void check() @@ -1019,15 +1019,15 @@ public: B2IBox aBox(0,0,10,10); CPPUNIT_ASSERT_EQUAL_MESSAGE("(0,0) is outside range!", - sal_uInt32(0), tools::getCohenSutherlandClipFlags(B2IPoint(0,0),aBox)); + sal_uInt32(0), utils::getCohenSutherlandClipFlags(B2IPoint(0,0),aBox)); CPPUNIT_ASSERT_EQUAL_MESSAGE("(-1,-1) is inside range!", - tools::RectClipFlags::LEFT|tools::RectClipFlags::TOP, - tools::getCohenSutherlandClipFlags(B2IPoint(-1,-1),aBox)); + utils::RectClipFlags::LEFT|utils::RectClipFlags::TOP, + utils::getCohenSutherlandClipFlags(B2IPoint(-1,-1),aBox)); CPPUNIT_ASSERT_EQUAL_MESSAGE("(9,9) is outside range!", - sal_uInt32(0), tools::getCohenSutherlandClipFlags(B2IPoint(9,9),aBox)); + sal_uInt32(0), utils::getCohenSutherlandClipFlags(B2IPoint(9,9),aBox)); CPPUNIT_ASSERT_EQUAL_MESSAGE("(10,10) is inside range!", - tools::RectClipFlags::RIGHT|tools::RectClipFlags::BOTTOM, - tools::getCohenSutherlandClipFlags(B2IPoint(10,10),aBox)); + utils::RectClipFlags::RIGHT|utils::RectClipFlags::BOTTOM, + utils::getCohenSutherlandClipFlags(B2IPoint(10,10),aBox)); } // Change the following lines only, if you add, remove or rename @@ -1084,118 +1084,118 @@ public: void hslTest() { CPPUNIT_ASSERT_EQUAL_MESSAGE("white", - BColor(0,0,1), tools::rgb2hsl(maWhite)); + BColor(0,0,1), utils::rgb2hsl(maWhite)); CPPUNIT_ASSERT_EQUAL_MESSAGE("black", - BColor(0,0,0), tools::rgb2hsl(maBlack)); + BColor(0,0,0), utils::rgb2hsl(maBlack)); CPPUNIT_ASSERT_EQUAL_MESSAGE("red", - BColor(0,1,0.5), tools::rgb2hsl(maRed)); + BColor(0,1,0.5), utils::rgb2hsl(maRed)); CPPUNIT_ASSERT_EQUAL_MESSAGE("green", - BColor(120,1,0.5), tools::rgb2hsl(maGreen)); + BColor(120,1,0.5), utils::rgb2hsl(maGreen)); CPPUNIT_ASSERT_EQUAL_MESSAGE("blue", - BColor(240,1,0.5), tools::rgb2hsl(maBlue)); + BColor(240,1,0.5), utils::rgb2hsl(maBlue)); CPPUNIT_ASSERT_EQUAL_MESSAGE("yellow", - BColor(60,1,0.5), tools::rgb2hsl(maYellow)); + BColor(60,1,0.5), utils::rgb2hsl(maYellow)); CPPUNIT_ASSERT_EQUAL_MESSAGE("magenta", - BColor(300,1,0.5), tools::rgb2hsl(maMagenta)); + BColor(300,1,0.5), utils::rgb2hsl(maMagenta)); CPPUNIT_ASSERT_EQUAL_MESSAGE("cyan", - BColor(180,1,0.5), tools::rgb2hsl(maCyan)); + BColor(180,1,0.5), utils::rgb2hsl(maCyan)); CPPUNIT_ASSERT_EQUAL_MESSAGE("third hue case", - BColor(210,1,0.5), tools::rgb2hsl(BColor(0,0.5,1))); + BColor(210,1,0.5), utils::rgb2hsl(BColor(0,0.5,1))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip white", - maWhite, tools::hsl2rgb(tools::rgb2hsl(maWhite))); + maWhite, utils::hsl2rgb(utils::rgb2hsl(maWhite))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip black", - maBlack, tools::hsl2rgb(tools::rgb2hsl(maBlack))); + maBlack, utils::hsl2rgb(utils::rgb2hsl(maBlack))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip red", - maRed, tools::hsl2rgb(tools::rgb2hsl(maRed))); + maRed, utils::hsl2rgb(utils::rgb2hsl(maRed))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip green", - maGreen, tools::hsl2rgb(tools::rgb2hsl(maGreen))); + maGreen, utils::hsl2rgb(utils::rgb2hsl(maGreen))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip blue", - maBlue, tools::hsl2rgb(tools::rgb2hsl(maBlue))); + maBlue, utils::hsl2rgb(utils::rgb2hsl(maBlue))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip yellow", - maYellow, tools::hsl2rgb(tools::rgb2hsl(maYellow))); + maYellow, utils::hsl2rgb(utils::rgb2hsl(maYellow))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip magenta", - maMagenta, tools::hsl2rgb(tools::rgb2hsl(maMagenta))); + maMagenta, utils::hsl2rgb(utils::rgb2hsl(maMagenta))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip cyan", - maCyan, tools::hsl2rgb(tools::rgb2hsl(maCyan))); + maCyan, utils::hsl2rgb(utils::rgb2hsl(maCyan))); CPPUNIT_ASSERT_EQUAL_MESSAGE("grey10", - BColor(0,0,.1), tools::rgb2hsl(maWhite*.1)); + BColor(0,0,.1), utils::rgb2hsl(maWhite*.1)); CPPUNIT_ASSERT_EQUAL_MESSAGE("grey90", - BColor(0,0,.9), tools::rgb2hsl(maWhite*.9)); + BColor(0,0,.9), utils::rgb2hsl(maWhite*.9)); CPPUNIT_ASSERT_EQUAL_MESSAGE("red/2", - BColor(0,1,0.25), tools::rgb2hsl(maRed*.5)); + BColor(0,1,0.25), utils::rgb2hsl(maRed*.5)); CPPUNIT_ASSERT_EQUAL_MESSAGE("green/2", - BColor(120,1,0.25), tools::rgb2hsl(maGreen*.5)); + BColor(120,1,0.25), utils::rgb2hsl(maGreen*.5)); CPPUNIT_ASSERT_EQUAL_MESSAGE("blue/2", - BColor(240,1,0.25), tools::rgb2hsl(maBlue*.5)); + BColor(240,1,0.25), utils::rgb2hsl(maBlue*.5)); CPPUNIT_ASSERT_EQUAL_MESSAGE("yellow/2", - BColor(60,1,0.25), tools::rgb2hsl(maYellow*.5)); + BColor(60,1,0.25), utils::rgb2hsl(maYellow*.5)); CPPUNIT_ASSERT_EQUAL_MESSAGE("magenta/2", - BColor(300,1,0.25), tools::rgb2hsl(maMagenta*.5)); + BColor(300,1,0.25), utils::rgb2hsl(maMagenta*.5)); CPPUNIT_ASSERT_EQUAL_MESSAGE("cyan/2", - BColor(180,1,0.25), tools::rgb2hsl(maCyan*.5)); + BColor(180,1,0.25), utils::rgb2hsl(maCyan*.5)); CPPUNIT_ASSERT_EQUAL_MESSAGE("pastel", - BColor(0,.5,.5), tools::rgb2hsl(BColor(.75,.25,.25))); + BColor(0,.5,.5), utils::rgb2hsl(BColor(.75,.25,.25))); } // insert your test code here. void hsvTest() { CPPUNIT_ASSERT_EQUAL_MESSAGE("white", - BColor(0,0,1), tools::rgb2hsv(maWhite)); + BColor(0,0,1), utils::rgb2hsv(maWhite)); CPPUNIT_ASSERT_EQUAL_MESSAGE("black", - BColor(0,0,0), tools::rgb2hsv(maBlack)); + BColor(0,0,0), utils::rgb2hsv(maBlack)); CPPUNIT_ASSERT_EQUAL_MESSAGE("red", - BColor(0,1,1), tools::rgb2hsv(maRed)); + BColor(0,1,1), utils::rgb2hsv(maRed)); CPPUNIT_ASSERT_EQUAL_MESSAGE("green", - BColor(120,1,1), tools::rgb2hsv(maGreen)); + BColor(120,1,1), utils::rgb2hsv(maGreen)); CPPUNIT_ASSERT_EQUAL_MESSAGE("blue", - BColor(240,1,1), tools::rgb2hsv(maBlue)); + BColor(240,1,1), utils::rgb2hsv(maBlue)); CPPUNIT_ASSERT_EQUAL_MESSAGE("yellow", - BColor(60,1,1), tools::rgb2hsv(maYellow)); + BColor(60,1,1), utils::rgb2hsv(maYellow)); CPPUNIT_ASSERT_EQUAL_MESSAGE("magenta", - BColor(300,1,1), tools::rgb2hsv(maMagenta)); + BColor(300,1,1), utils::rgb2hsv(maMagenta)); CPPUNIT_ASSERT_EQUAL_MESSAGE("cyan", - BColor(180,1,1), tools::rgb2hsv(maCyan)); + BColor(180,1,1), utils::rgb2hsv(maCyan)); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip white", - maWhite, tools::hsv2rgb(tools::rgb2hsv(maWhite))); + maWhite, utils::hsv2rgb(utils::rgb2hsv(maWhite))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip black", - maBlack, tools::hsv2rgb(tools::rgb2hsv(maBlack))); + maBlack, utils::hsv2rgb(utils::rgb2hsv(maBlack))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip red", - maRed, tools::hsv2rgb(tools::rgb2hsv(maRed))); + maRed, utils::hsv2rgb(utils::rgb2hsv(maRed))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip green", - maGreen, tools::hsv2rgb(tools::rgb2hsv(maGreen))); + maGreen, utils::hsv2rgb(utils::rgb2hsv(maGreen))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip blue", - maBlue, tools::hsv2rgb(tools::rgb2hsv(maBlue))); + maBlue, utils::hsv2rgb(utils::rgb2hsv(maBlue))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip yellow", - maYellow, tools::hsv2rgb(tools::rgb2hsv(maYellow))); + maYellow, utils::hsv2rgb(utils::rgb2hsv(maYellow))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip magenta", - maMagenta, tools::hsv2rgb(tools::rgb2hsv(maMagenta))); + maMagenta, utils::hsv2rgb(utils::rgb2hsv(maMagenta))); CPPUNIT_ASSERT_EQUAL_MESSAGE("roundtrip cyan", - maCyan, tools::hsv2rgb(tools::rgb2hsv(maCyan))); + maCyan, utils::hsv2rgb(utils::rgb2hsv(maCyan))); CPPUNIT_ASSERT_EQUAL_MESSAGE("grey10", - BColor(0,0,.1), tools::rgb2hsv(maWhite*.1)); + BColor(0,0,.1), utils::rgb2hsv(maWhite*.1)); CPPUNIT_ASSERT_EQUAL_MESSAGE("grey90", - BColor(0,0,.9), tools::rgb2hsv(maWhite*.9)); + BColor(0,0,.9), utils::rgb2hsv(maWhite*.9)); CPPUNIT_ASSERT_EQUAL_MESSAGE("red/2", - BColor(0,1,0.5), tools::rgb2hsv(maRed*.5)); + BColor(0,1,0.5), utils::rgb2hsv(maRed*.5)); CPPUNIT_ASSERT_EQUAL_MESSAGE("green/2", - BColor(120,1,0.5), tools::rgb2hsv(maGreen*.5)); + BColor(120,1,0.5), utils::rgb2hsv(maGreen*.5)); CPPUNIT_ASSERT_EQUAL_MESSAGE("blue/2", - BColor(240,1,0.5), tools::rgb2hsv(maBlue*.5)); + BColor(240,1,0.5), utils::rgb2hsv(maBlue*.5)); CPPUNIT_ASSERT_EQUAL_MESSAGE("yellow/2", - BColor(60,1,0.5), tools::rgb2hsv(maYellow*.5)); + BColor(60,1,0.5), utils::rgb2hsv(maYellow*.5)); CPPUNIT_ASSERT_EQUAL_MESSAGE("magenta/2", - BColor(300,1,0.5), tools::rgb2hsv(maMagenta*.5)); + BColor(300,1,0.5), utils::rgb2hsv(maMagenta*.5)); CPPUNIT_ASSERT_EQUAL_MESSAGE("cyan/2", - BColor(180,1,0.5), tools::rgb2hsv(maCyan*.5)); + BColor(180,1,0.5), utils::rgb2hsv(maCyan*.5)); CPPUNIT_ASSERT_EQUAL_MESSAGE("pastel", - BColor(0,.5,.5), tools::rgb2hsv(BColor(.5,.25,.25))); + BColor(0,.5,.5), utils::rgb2hsv(BColor(.5,.25,.25))); } // Change the following lines only, if you add, remove or rename diff --git a/basegfx/test/basegfxtools.cxx b/basegfx/test/basegfxtools.cxx index e06ee194cf00..5a443358f39b 100644 --- a/basegfx/test/basegfxtools.cxx +++ b/basegfx/test/basegfxtools.cxx @@ -22,7 +22,7 @@ #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> -#include <basegfx/tools/keystoplerp.hxx> +#include <basegfx/utils/keystoplerp.hxx> #include <basegfx/numeric/ftools.hxx> using namespace ::basegfx; @@ -32,7 +32,7 @@ namespace basegfxtools class KeyStopLerpTest : public CppUnit::TestFixture { - tools::KeyStopLerp maKeyStops; + utils::KeyStopLerp maKeyStops; static std::vector<double> getTestVector() { diff --git a/basegfx/test/boxclipper.cxx b/basegfx/test/boxclipper.cxx index 5be8ebb1660d..5f9794a2235a 100644 --- a/basegfx/test/boxclipper.cxx +++ b/basegfx/test/boxclipper.cxx @@ -161,7 +161,7 @@ public: #else const char randomSvg[]="m394 783h404v57h-404zm-197-505h571v576h-571zm356-634h75v200h-75zm-40-113h403v588h-403zm93-811h111v494h-111zm-364-619h562v121h-562zm-134-8h292v27h-292zm110 356h621v486h-621zm78-386h228v25h-228zm475-345h201v201h-201zm-2-93h122v126h-122zm-417-243h567v524h-567zm-266-738h863v456h-863zm262-333h315v698h-315zm-328-826h43v393h-43zm830-219h120v664h-120zm-311-636h221v109h-221zm-500 137h628v19h-628zm681-94h211v493h-211zm-366-646h384v355h-384zm-189-199h715v247h-715zm165-459h563v601h-563zm258-479h98v606h-98zm270-517h65v218h-65zm-44-259h96v286h-96zm-599-202h705v468h-705zm216-803h450v494h-450zm-150-22h26v167h-26zm-55-599h50v260h-50zm190-278h490v387h-490zm-290-453h634v392h-634zm257 189h552v300h-552zm-151-690h136v455h-136zm12-597h488v432h-488zm501-459h48v39h-48zm-224-112h429v22h-429zm-281 102h492v621h-492zm519-158h208v17h-208zm-681-563h56v427h-56zm126-451h615v392h-615zm-47-410h598v522h-598zm-32 316h79v110h-79zm-71-129h18v127h-18zm126-993h743v589h-743zm211-430h428v750h-428zm61-554h100v220h-100zm-353-49h658v157h-658zm778-383h115v272h-115zm-249-541h119v712h-119zm203 86h94v40h-94z"; B2DPolyPolygon randomPoly; - tools::importFromSvgD(randomPoly, randomSvg, false, nullptr); + utils::importFromSvgD(randomPoly, randomSvg, false, nullptr); for (auto const& aPolygon : randomPoly) aRandomIntersections.appendElement(aPolygon.getB2DRange(), B2VectorOrientation::Negative); #endif @@ -173,10 +173,10 @@ public: for( sal_uInt32 i=0; i<rPoly.count(); ++i ) { B2DPolygon aTmp=rPoly.getB2DPolygon(i); - if( tools::getOrientation(aTmp) == B2VectorOrientation::Negative ) + if( utils::getOrientation(aTmp) == B2VectorOrientation::Negative ) aTmp.flip(); - aTmp=tools::removeNeutralPoints(aTmp); + aTmp=utils::removeNeutralPoints(aTmp); std::vector<B2DPoint> aTmp2(aTmp.count()); for(sal_uInt32 j=0; j<aTmp.count(); ++j) aTmp2[j] = aTmp.getB2DPoint(j); @@ -202,7 +202,7 @@ public: // boxclipper & generic clipper disagree slightly on area-less // polygons (one or two points only) - aRes = tools::stripNeutralPolygons(aRes); + aRes = utils::stripNeutralPolygons(aRes); // now, sort all polygons with increasing 0th point std::sort(aRes.begin(), @@ -218,14 +218,14 @@ public: { B2DPolyPolygon aTmp1; CPPUNIT_ASSERT_MESSAGE(sName, - tools::importFromSvgD( + utils::importFromSvgD( aTmp1, OUString::createFromAscii(sSvg), false, nullptr)); const OUString aSvg= - tools::exportToSvgD(toTest.solveCrossovers(), true, true, false); + utils::exportToSvgD(toTest.solveCrossovers(), true, true, false); B2DPolyPolygon aTmp2; CPPUNIT_ASSERT_MESSAGE(sName, - tools::importFromSvgD( + utils::importFromSvgD( aTmp2, aSvg, false, nullptr)); CPPUNIT_ASSERT_EQUAL_MESSAGE( @@ -299,7 +299,7 @@ public: #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "%s - svg:d=\"%s\"\n", pName, OUStringToOString( - basegfx::tools::exportToSvgD(rPoly, , true, true, false), + basegfx::utils::exportToSvgD(rPoly, , true, true, false), RTL_TEXTENCODING_UTF8).getStr() ); #endif } @@ -331,7 +331,7 @@ public: const sal_uInt32 nCount=rRange.count(); for( sal_uInt32 i=0; i<nCount; ++i ) { - B2DPolygon aRect=tools::createPolygonFromRect(std::get<0>(rRange.getElement(i))); + B2DPolygon aRect=utils::createPolygonFromRect(std::get<0>(rRange.getElement(i))); if( std::get<1>(rRange.getElement(i)) == B2VectorOrientation::Negative ) aRect.flip(); @@ -341,14 +341,14 @@ public: #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "%s input - svg:d=\"%s\"\n", pName, OUStringToOString( - basegfx::tools::exportToSvgD( + basegfx::utils::exportToSvgD( genericClip, , true, true, false), RTL_TEXTENCODING_UTF8).getStr() ); #endif const B2DPolyPolygon boxClipResult=rRange.solveCrossovers(); const OUString boxClipSvg( - basegfx::tools::exportToSvgD( + basegfx::utils::exportToSvgD( normalizePoly(boxClipResult), true, true, false)); #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "%s boxclipper - svg:d=\"%s\"\n", @@ -357,9 +357,9 @@ public: RTL_TEXTENCODING_UTF8).getStr() ); #endif - genericClip = tools::solveCrossovers(genericClip); + genericClip = utils::solveCrossovers(genericClip); const OUString genericClipSvg( - basegfx::tools::exportToSvgD( + basegfx::utils::exportToSvgD( normalizePoly(genericClip), true, true, false)); #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "%s genclipper - svg:d=\"%s\"\n", diff --git a/basegfx/test/clipstate.cxx b/basegfx/test/clipstate.cxx index 02618d61034c..898b616c57a5 100644 --- a/basegfx/test/clipstate.cxx +++ b/basegfx/test/clipstate.cxx @@ -22,7 +22,7 @@ #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> -#include <basegfx/tools/b2dclipstate.hxx> +#include <basegfx/utils/b2dclipstate.hxx> #include <basegfx/range/b2dpolyrange.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> @@ -38,11 +38,11 @@ namespace basegfx2d class clipstate : public CppUnit::TestFixture { private: - tools::B2DClipState aUnion1; - tools::B2DClipState aUnion2; - tools::B2DClipState aIntersect; - tools::B2DClipState aXor; - tools::B2DClipState aSubtract; + utils::B2DClipState aUnion1; + utils::B2DClipState aUnion2; + utils::B2DClipState aIntersect; + utils::B2DClipState aXor; + utils::B2DClipState aSubtract; public: void setUp() override @@ -86,25 +86,25 @@ public: aSubtract.subtractRange(aEast); } - void verifyPoly(const char* sName, const char* sSvg, const tools::B2DClipState& toTest) + void verifyPoly(const char* sName, const char* sSvg, const utils::B2DClipState& toTest) { #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "%s - svg:d=\"%s\"\n", sName, OUStringToOString( - basegfx::tools::exportToSvgD(toTest.getClipPoly(), true, true, false), + basegfx::utils::exportToSvgD(toTest.getClipPoly(), true, true, false), RTL_TEXTENCODING_UTF8).getStr() ); #endif B2DPolyPolygon aTmp1; CPPUNIT_ASSERT_MESSAGE(sName, - tools::importFromSvgD( + utils::importFromSvgD( aTmp1, OUString::createFromAscii(sSvg), false, nullptr)); const OUString aSvg= - tools::exportToSvgD(toTest.getClipPoly(), true, true, false); + utils::exportToSvgD(toTest.getClipPoly(), true, true, false); B2DPolyPolygon aTmp2; CPPUNIT_ASSERT_MESSAGE(sName, - tools::importFromSvgD( + utils::importFromSvgD( aTmp2, aSvg, false, nullptr)); CPPUNIT_ASSERT_EQUAL_MESSAGE( @@ -130,12 +130,12 @@ public: void verifyMixedClips() { - tools::B2DClipState aMixedClip; + utils::B2DClipState aMixedClip; const char unionSvg[]="m100 10v90h-90v10h-20v-10h-90v-90h-10v-20h10v-90h90v-10h20v10h90v90h10v20z"; B2DPolyPolygon aTmp1; - tools::importFromSvgD(aTmp1, unionSvg, false, nullptr); + utils::importFromSvgD(aTmp1, unionSvg, false, nullptr); aMixedClip.intersectPolyPolygon(aTmp1); aMixedClip.subtractRange(B2DRange(-20,-150,20,0)); diff --git a/basegfx/test/genericclipper.cxx b/basegfx/test/genericclipper.cxx index a345b0eb3f0c..44aad203390b 100644 --- a/basegfx/test/genericclipper.cxx +++ b/basegfx/test/genericclipper.cxx @@ -59,7 +59,7 @@ public: aSelfIntersecting.append(B2DPoint(100,0)); aSelfIntersecting.setClosed(true); - aShiftedRectangle = tools::createPolygonFromRect( + aShiftedRectangle = utils::createPolygonFromRect( B2DRange(0,90,20,150)); } @@ -69,18 +69,18 @@ public: B2DPolyPolygon (*pFunc)(const B2DPolyPolygon&, const B2DPolyPolygon&)) { const B2DPolyPolygon aSelfIntersect( - tools::prepareForPolygonOperation(aSelfIntersecting)); + utils::prepareForPolygonOperation(aSelfIntersecting)); const B2DPolyPolygon aRect( - tools::prepareForPolygonOperation(aShiftedRectangle)); + utils::prepareForPolygonOperation(aShiftedRectangle)); #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "%s input LHS - svg:d=\"%s\"\n", pName, OUStringToOString( - basegfx::tools::exportToSvgD( + basegfx::utils::exportToSvgD( aSelfIntersect, true, true, false), RTL_TEXTENCODING_UTF8).getStr() ); fprintf(stderr, "%s input RHS - svg:d=\"%s\"\n", pName, OUStringToOString( - basegfx::tools::exportToSvgD( + basegfx::utils::exportToSvgD( aRect, true, true, false), RTL_TEXTENCODING_UTF8).getStr() ); #endif @@ -91,38 +91,38 @@ public: #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "%s - svg:d=\"%s\"\n", pName, OUStringToOString( - basegfx::tools::exportToSvgD(aRes, true, true, false), + basegfx::utils::exportToSvgD(aRes, true, true, false), RTL_TEXTENCODING_UTF8).getStr() ); #endif OUString aValid=OUString::createFromAscii(pValidSvgD); CPPUNIT_ASSERT_EQUAL_MESSAGE(pName, - aValid, basegfx::tools::exportToSvgD(aRes, true, true, false)); + aValid, basegfx::utils::exportToSvgD(aRes, true, true, false)); } void validateOr() { const char* const pValid="m0 0h100v150h-75v-50h-5v50h-20v-50-10zm75 100v-50h-50v50z"; - validate("validateOr", pValid, &tools::solvePolygonOperationOr); + validate("validateOr", pValid, &utils::solvePolygonOperationOr); } void validateXor() { const char* const pValid="m0 0h100v150h-75v-50h-5v50h-20v-50-10zm0 100h20v-10h-20zm75 0v-50h-50v50z"; - validate("validateXor", pValid, &tools::solvePolygonOperationXor); + validate("validateXor", pValid, &utils::solvePolygonOperationXor); } void validateAnd() { const char* const pValid="m0 100v-10h20v10z"; - validate("validateAnd", pValid, &tools::solvePolygonOperationAnd); + validate("validateAnd", pValid, &utils::solvePolygonOperationAnd); } void validateDiff() { const char* const pValid="m0 90v-90h100v150h-75v-50h-5v-10zm75 10v-50h-50v50z"; - validate("validateDiff", pValid, &tools::solvePolygonOperationDiff); + validate("validateDiff", pValid, &utils::solvePolygonOperationDiff); } void validateCrossover(const char* pName, @@ -133,14 +133,14 @@ public: OUString aValid=OUString::createFromAscii(pValidSvgD); B2DPolyPolygon aInputPoly, aValidPoly; - tools::importFromSvgD(aInputPoly, aInput, false, nullptr); - tools::importFromSvgD(aValidPoly, aValid, false, nullptr); + utils::importFromSvgD(aInputPoly, aInput, false, nullptr); + utils::importFromSvgD(aValidPoly, aValid, false, nullptr); CPPUNIT_ASSERT_EQUAL_MESSAGE( pName, aValid, - basegfx::tools::exportToSvgD( - tools::solveCrossovers(aInputPoly), true, true, false)); + basegfx::utils::exportToSvgD( + utils::solveCrossovers(aInputPoly), true, true, false)); } void checkCrossoverSolver() diff --git a/canvas/source/cairo/cairo_cachedbitmap.cxx b/canvas/source/cairo/cairo_cachedbitmap.cxx index 13e88f15b78f..73b139786fcd 100644 --- a/canvas/source/cairo/cairo_cachedbitmap.cxx +++ b/canvas/source/cairo/cairo_cachedbitmap.cxx @@ -20,7 +20,7 @@ #include <sal/config.h> #include <basegfx/matrix/b2dhommatrix.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/rendering/RepaintResult.hpp> #include <com/sun/star/rendering/XPolyPolygon2D.hpp> #include <tools/diagnose_ex.h> diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx index bb0ce960be74..043b7b7860a3 100644 --- a/canvas/source/cairo/cairo_canvas.cxx +++ b/canvas/source/cairo/cairo_canvas.cxx @@ -22,7 +22,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/lang/NoSupportException.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/registry/XRegistryKey.hpp> diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index fd0e798b008f..06c07665a831 100644 --- a/canvas/source/cairo/cairo_canvashelper.cxx +++ b/canvas/source/cairo/cairo_canvashelper.cxx @@ -27,9 +27,9 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/keystoplerp.hxx> -#include <basegfx/tools/lerp.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/keystoplerp.hxx> +#include <basegfx/utils/lerp.hxx> #include <com/sun/star/rendering/ColorComponentTag.hpp> #include <com/sun/star/rendering/ColorSpaceType.hpp> #include <com/sun/star/rendering/CompositeOperation.hpp> @@ -685,18 +685,18 @@ namespace cairocanvas if( rLeft.getLength() == 3 ) { uno::Sequence<double> aRes(3); - aRes[0] = basegfx::tools::lerp(rLeft[0],rRight[0],fAlpha); - aRes[1] = basegfx::tools::lerp(rLeft[1],rRight[1],fAlpha); - aRes[2] = basegfx::tools::lerp(rLeft[2],rRight[2],fAlpha); + aRes[0] = basegfx::utils::lerp(rLeft[0],rRight[0],fAlpha); + aRes[1] = basegfx::utils::lerp(rLeft[1],rRight[1],fAlpha); + aRes[2] = basegfx::utils::lerp(rLeft[2],rRight[2],fAlpha); return aRes; } else if( rLeft.getLength() == 4 ) { uno::Sequence<double> aRes(4); - aRes[0] = basegfx::tools::lerp(rLeft[0],rRight[0],fAlpha); - aRes[1] = basegfx::tools::lerp(rLeft[1],rRight[1],fAlpha); - aRes[2] = basegfx::tools::lerp(rLeft[2],rRight[2],fAlpha); - aRes[3] = basegfx::tools::lerp(rLeft[3],rRight[3],fAlpha); + aRes[0] = basegfx::utils::lerp(rLeft[0],rRight[0],fAlpha); + aRes[1] = basegfx::utils::lerp(rLeft[1],rRight[1],fAlpha); + aRes[2] = basegfx::utils::lerp(rLeft[2],rRight[2],fAlpha); + aRes[3] = basegfx::utils::lerp(rLeft[3],rRight[3],fAlpha); return aRes; } @@ -868,7 +868,7 @@ namespace cairocanvas 128U )) + 1 ); const uno::Sequence<double>* pColors=&pPolyImpl->getValues().maColors[0]; - basegfx::tools::KeyStopLerp aLerper(pPolyImpl->getValues().maStops); + basegfx::utils::KeyStopLerp aLerper(pPolyImpl->getValues().maStops); for( unsigned int i=1; i<nStepCount; ++i ) { const double fT( i/double(nStepCount) ); diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx index e26866913cf4..806bc415e7b1 100644 --- a/canvas/source/cairo/cairo_canvashelper_text.cxx +++ b/canvas/source/cairo/cairo_canvashelper_text.cxx @@ -20,7 +20,7 @@ #include <sal/config.h> #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <tools/diagnose_ex.h> #include <vcl/canvastools.hxx> #include <vcl/metric.hxx> diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx index 9e059646c6eb..d3a64b343f49 100644 --- a/canvas/source/cairo/cairo_devicehelper.cxx +++ b/canvas/source/cairo/cairo_devicehelper.cxx @@ -19,8 +19,8 @@ #include <sal/config.h> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/unopolypolygon.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/unopolypolygon.hxx> #include <com/sun/star/lang/NoSupportException.hpp> #include <toolkit/helper/vclunohelper.hxx> #include <tools/stream.hxx> diff --git a/canvas/source/cairo/cairo_spritecanvas.cxx b/canvas/source/cairo/cairo_spritecanvas.cxx index a2f9ad10b010..12750d868644 100644 --- a/canvas/source/cairo/cairo_spritecanvas.cxx +++ b/canvas/source/cairo/cairo_spritecanvas.cxx @@ -22,7 +22,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/lang/NoSupportException.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/registry/XRegistryKey.hpp> diff --git a/canvas/source/cairo/cairo_spritecanvashelper.cxx b/canvas/source/cairo/cairo_spritecanvashelper.cxx index 7f419e02e66c..d60341790364 100644 --- a/canvas/source/cairo/cairo_spritecanvashelper.cxx +++ b/canvas/source/cairo/cairo_spritecanvashelper.cxx @@ -22,7 +22,7 @@ #include <boost/cast.hpp> #include <basegfx/range/b2drectangle.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <comphelper/scopeguard.hxx> #include <tools/diagnose_ex.h> #include <vcl/canvastools.hxx> diff --git a/canvas/source/cairo/cairo_spritedevicehelper.cxx b/canvas/source/cairo/cairo_spritedevicehelper.cxx index 3d7a6fd45872..ef4d6b2d1996 100644 --- a/canvas/source/cairo/cairo_spritedevicehelper.cxx +++ b/canvas/source/cairo/cairo_spritedevicehelper.cxx @@ -19,8 +19,8 @@ #include <sal/config.h> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/unopolypolygon.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/unopolypolygon.hxx> #include <com/sun/star/lang/NoSupportException.hpp> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/cairo.hxx> diff --git a/canvas/source/cairo/cairo_spritehelper.cxx b/canvas/source/cairo/cairo_spritehelper.cxx index c6c03a90da88..273188a24542 100644 --- a/canvas/source/cairo/cairo_spritehelper.cxx +++ b/canvas/source/cairo/cairo_spritehelper.cxx @@ -26,7 +26,7 @@ #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolygontriangulator.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <rtl/math.hxx> #include <tools/diagnose_ex.h> diff --git a/canvas/source/directx/dx_bitmapcanvashelper.cxx b/canvas/source/directx/dx_bitmapcanvashelper.cxx index d2c4fa7b7736..7e69484935c9 100644 --- a/canvas/source/directx/dx_bitmapcanvashelper.cxx +++ b/canvas/source/directx/dx_bitmapcanvashelper.cxx @@ -23,7 +23,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/point/b2dpoint.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/rendering/CompositeOperation.hpp> #include <com/sun/star/rendering/PathCapType.hpp> #include <com/sun/star/rendering/PathJoinType.hpp> diff --git a/canvas/source/directx/dx_canvas.cxx b/canvas/source/directx/dx_canvas.cxx index 2ada97e9216b..d1a58d9f92b8 100644 --- a/canvas/source/directx/dx_canvas.cxx +++ b/canvas/source/directx/dx_canvas.cxx @@ -22,7 +22,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/awt/XSystemDependentWindowPeer.hpp> #include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/lang/NoSupportException.hpp> diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx index 8dfae8ab5a1d..f266ce86db0c 100644 --- a/canvas/source/directx/dx_canvashelper.cxx +++ b/canvas/source/directx/dx_canvashelper.cxx @@ -24,7 +24,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/point/b2dpoint.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/rendering/CompositeOperation.hpp> #include <com/sun/star/rendering/PathCapType.hpp> #include <com/sun/star/rendering/PathJoinType.hpp> @@ -721,7 +721,7 @@ namespace dxcanvas // add output offset if( !maOutputOffset.equalZero() ) { - const basegfx::B2DHomMatrix aOutputOffset(basegfx::tools::createTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aOutputOffset(basegfx::utils::createTranslateB2DHomMatrix( maOutputOffset.getX(), maOutputOffset.getY())); aTransform = aOutputOffset * aTransform; } @@ -760,7 +760,7 @@ namespace dxcanvas // add output offset if( !maOutputOffset.equalZero() ) { - const basegfx::B2DHomMatrix aOutputOffset(basegfx::tools::createTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aOutputOffset(basegfx::utils::createTranslateB2DHomMatrix( maOutputOffset.getX(), maOutputOffset.getY())); aTransform = aOutputOffset * aTransform; } diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx index d4aa15996a9c..8782114fbebe 100644 --- a/canvas/source/directx/dx_canvashelper_texturefill.cxx +++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx @@ -27,10 +27,10 @@ #include <basegfx/point/b2dpoint.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/range/b2drectangle.hxx> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/keystoplerp.hxx> -#include <basegfx/tools/lerp.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/keystoplerp.hxx> +#include <basegfx/utils/lerp.hxx> +#include <basegfx/utils/tools.hxx> #include <com/sun/star/rendering/TexturingMode.hpp> #include <rtl/math.hxx> #include <tools/diagnose_ex.h> @@ -103,7 +103,7 @@ namespace dxcanvas // now, we potentially have to enlarge our gradient area // atop and below the transformed [0,1]x[0,1] unit rect, // for the gradient to fill the complete bound rect. - ::basegfx::tools::infiniteLineFromParallelogram( aLeftTop, + ::basegfx::utils::infiniteLineFromParallelogram( aLeftTop, aLeftBottom, aRightTop, aRightBottom, @@ -277,7 +277,7 @@ namespace dxcanvas // subdivide polygon _before_ rendering, would otherwise have // to be performed on every loop turn. if( aOuterPoly.areControlPointsUsed() ) - aOuterPoly = ::basegfx::tools::adaptiveSubdivideByAngle(aOuterPoly); + aOuterPoly = ::basegfx::utils::adaptiveSubdivideByAngle(aOuterPoly); aInnerPoly = aOuterPoly; aOuterPoly.transform(aTextureTransform); @@ -319,7 +319,7 @@ namespace dxcanvas Gdiplus::GraphicsPath aCurrPath; Gdiplus::SolidBrush aFillBrush( rColors[0] ); const sal_uInt32 nNumPoints( aOuterPoly.count() ); - basegfx::tools::KeyStopLerp aLerper(rValues.maStops); + basegfx::utils::KeyStopLerp aLerper(rValues.maStops); for( int i=1; i<nStepCount; ++i ) { std::ptrdiff_t nIndex; @@ -328,9 +328,9 @@ namespace dxcanvas std::tie(nIndex,fAlpha)=aLerper.lerp(fT); const Gdiplus::Color aFillColor( - static_cast<BYTE>( basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha) ), - static_cast<BYTE>( basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha) ), - static_cast<BYTE>( basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha) ) ); + static_cast<BYTE>( basegfx::utils::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha) ), + static_cast<BYTE>( basegfx::utils::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha) ), + static_cast<BYTE>( basegfx::utils::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha) ) ); aFillBrush.SetColor( aFillColor ); aCurrPath.Reset(); aCurrPath.StartFigure(); diff --git a/canvas/source/directx/dx_devicehelper.cxx b/canvas/source/directx/dx_devicehelper.cxx index 24721af75c53..e73b8c68e65d 100644 --- a/canvas/source/directx/dx_devicehelper.cxx +++ b/canvas/source/directx/dx_devicehelper.cxx @@ -19,7 +19,7 @@ #include <sal/config.h> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/lang/NoSupportException.hpp> #include <toolkit/helper/vclunohelper.hxx> #include <tools/diagnose_ex.h> diff --git a/canvas/source/directx/dx_impltools.cxx b/canvas/source/directx/dx_impltools.cxx index 0ec1240019ea..712e3d9a92bd 100644 --- a/canvas/source/directx/dx_impltools.cxx +++ b/canvas/source/directx/dx_impltools.cxx @@ -29,7 +29,7 @@ #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/range/b2drectangle.hxx> #include <basegfx/range/b2irectangle.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/geometry/IntegerRectangle2D.hpp> #include <com/sun/star/geometry/RealPoint2D.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> diff --git a/canvas/source/directx/dx_linepolypolygon.cxx b/canvas/source/directx/dx_linepolypolygon.cxx index 801905c6ce7d..53ec2953e78f 100644 --- a/canvas/source/directx/dx_linepolypolygon.cxx +++ b/canvas/source/directx/dx_linepolypolygon.cxx @@ -19,7 +19,7 @@ #include <sal/config.h> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include "dx_linepolypolygon.hxx" diff --git a/canvas/source/directx/dx_linepolypolygon.hxx b/canvas/source/directx/dx_linepolypolygon.hxx index 7639448ef24d..87311136a46f 100644 --- a/canvas/source/directx/dx_linepolypolygon.hxx +++ b/canvas/source/directx/dx_linepolypolygon.hxx @@ -21,7 +21,7 @@ #define INCLUDED_CANVAS_SOURCE_DIRECTX_DX_LINEPOLYPOLYGON_HXX #include <canvas/canvastools.hxx> -#include <basegfx/tools/unopolypolygon.hxx> +#include <basegfx/utils/unopolypolygon.hxx> #include "dx_gdiplususer.hxx" #include "dx_impltools.hxx" diff --git a/canvas/source/directx/dx_spritecanvas.cxx b/canvas/source/directx/dx_spritecanvas.cxx index 74c019a11c50..2cec275c7ffc 100644 --- a/canvas/source/directx/dx_spritecanvas.cxx +++ b/canvas/source/directx/dx_spritecanvas.cxx @@ -22,7 +22,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/lang/NoSupportException.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/registry/XRegistryKey.hpp> diff --git a/canvas/source/directx/dx_spritecanvashelper.cxx b/canvas/source/directx/dx_spritecanvashelper.cxx index d10a6fe66824..7d859cff0e40 100644 --- a/canvas/source/directx/dx_spritecanvashelper.cxx +++ b/canvas/source/directx/dx_spritecanvashelper.cxx @@ -22,7 +22,7 @@ #include <boost/cast.hpp> #include <basegfx/range/b2drectangle.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <comphelper/scopeguard.hxx> #include <tools/diagnose_ex.h> diff --git a/canvas/source/directx/dx_spritedevicehelper.cxx b/canvas/source/directx/dx_spritedevicehelper.cxx index f2757289b4c9..e729dd84a5b1 100644 --- a/canvas/source/directx/dx_spritedevicehelper.cxx +++ b/canvas/source/directx/dx_spritedevicehelper.cxx @@ -19,7 +19,7 @@ #include <sal/config.h> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <canvas/canvastools.hxx> #include <com/sun/star/lang/NoSupportException.hpp> #include <toolkit/helper/vclunohelper.hxx> diff --git a/canvas/source/directx/dx_spritehelper.cxx b/canvas/source/directx/dx_spritehelper.cxx index 10131dadf19d..310e7160de29 100644 --- a/canvas/source/directx/dx_spritehelper.cxx +++ b/canvas/source/directx/dx_spritehelper.cxx @@ -26,7 +26,7 @@ #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolygontriangulator.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <rtl/math.hxx> #include <tools/diagnose_ex.h> @@ -150,7 +150,7 @@ namespace dxcanvas // check whether the clip is rectangular if( nNumClipPolygons == 1 ) - if( ::basegfx::tools::isRectangle( aClipPath.getB2DPolygon( 0 ) ) ) + if( ::basegfx::utils::isRectangle( aClipPath.getB2DPolygon( 0 ) ) ) bIsClipRectangular = true; } } @@ -171,7 +171,7 @@ namespace dxcanvas // ======================== ::basegfx::B2DRectangle aClipBounds( - ::basegfx::tools::getRange( aClipPath ) ); + ::basegfx::utils::getRange( aClipPath ) ); aClipBounds.intersect( aSourceRect ); mpBitmap->draw(fAlpha,rPos,aClipBounds,rTransform); diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx index 6e279788a8c1..4edd59cab623 100644 --- a/canvas/source/directx/dx_textlayout_drawhelper.cxx +++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx @@ -22,7 +22,7 @@ #include <memory> #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/rendering/FontRequest.hpp> #include <com/sun/star/rendering/PanoseProportion.hpp> #include <com/sun/star/rendering/XCanvasFont.hpp> diff --git a/canvas/source/opengl/ogl_canvascustomsprite.cxx b/canvas/source/opengl/ogl_canvascustomsprite.cxx index 2a794adec2ca..5f53ab4ece46 100644 --- a/canvas/source/opengl/ogl_canvascustomsprite.cxx +++ b/canvas/source/opengl/ogl_canvascustomsprite.cxx @@ -16,7 +16,7 @@ #include <basegfx/polygon/b2dpolygonclipper.hxx> #include <basegfx/polygon/b2dpolygontriangulator.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <canvas/canvastools.hxx> #include <canvas/verifyinput.hxx> #include <tools/diagnose_ex.h> diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx index d2edda651e4f..e7039ea2e7ed 100644 --- a/canvas/source/opengl/ogl_canvashelper.cxx +++ b/canvas/source/opengl/ogl_canvashelper.cxx @@ -16,7 +16,7 @@ #include <basegfx/polygon/b2dpolygontriangulator.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/rendering/CompositeOperation.hpp> #include <com/sun/star/rendering/PathCapType.hpp> #include <com/sun/star/rendering/PathJoinType.hpp> @@ -182,7 +182,7 @@ namespace oglcanvas rTexture.AffineTransform ); ::basegfx::B2DRange aBounds; for( const auto& rPoly : rPolyPolygons ) - aBounds.expand( ::basegfx::tools::getRange( rPoly ) ); + aBounds.expand( ::basegfx::utils::getRange( rPoly ) ); aTextureTransform.translate(-aBounds.getMinX(), -aBounds.getMinY()); aTextureTransform.scale(1/aBounds.getWidth(), 1/aBounds.getHeight()); @@ -326,7 +326,7 @@ namespace oglcanvas rTexture.AffineTransform ); ::basegfx::B2DRange aBounds; for( const auto& rPolyPolygon : rPolyPolygons ) - aBounds.expand( ::basegfx::tools::getRange( rPolyPolygon ) ); + aBounds.expand( ::basegfx::utils::getRange( rPolyPolygon ) ); aTextureTransform.translate(-aBounds.getMinX(), -aBounds.getMinY()); aTextureTransform.scale(1/aBounds.getWidth(), 1/aBounds.getHeight()); aTextureTransform.invert(); diff --git a/canvas/source/opengl/ogl_canvastools.cxx b/canvas/source/opengl/ogl_canvastools.cxx index 3d9448b367bf..cbf20db3a1e5 100644 --- a/canvas/source/opengl/ogl_canvastools.cxx +++ b/canvas/source/opengl/ogl_canvastools.cxx @@ -15,8 +15,8 @@ #include <basegfx/polygon/b2dpolygontriangulator.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/tools.hxx> #include <com/sun/star/rendering/ARGBColor.hpp> #include <tools/diagnose_ex.h> @@ -120,7 +120,7 @@ namespace oglcanvas y += 1.2*scale; basegfx::B2DPolyPolygon aPoly= - basegfx::tools::number2PolyPolygon(rNumber,10,3); + basegfx::utils::number2PolyPolygon(rNumber,10,3); aTmp=aTmp*aScaleShear; aPoly.transform(aTmp); diff --git a/canvas/source/opengl/ogl_spritedevicehelper.cxx b/canvas/source/opengl/ogl_spritedevicehelper.cxx index 25d0eaeef0cf..1c2a0525c9f4 100644 --- a/canvas/source/opengl/ogl_spritedevicehelper.cxx +++ b/canvas/source/opengl/ogl_spritedevicehelper.cxx @@ -9,8 +9,8 @@ #include <sal/config.h> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/unopolypolygon.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/unopolypolygon.hxx> #include <com/sun/star/lang/NoSupportException.hpp> #include <com/sun/star/rendering/XColorSpace.hpp> #include <com/sun/star/rendering/XIntegerBitmapColorSpace.hpp> diff --git a/canvas/source/simplecanvas/simplecanvasimpl.cxx b/canvas/source/simplecanvas/simplecanvasimpl.cxx index 8d632ec4886a..e957db00bf64 100644 --- a/canvas/source/simplecanvas/simplecanvasimpl.cxx +++ b/canvas/source/simplecanvas/simplecanvasimpl.cxx @@ -270,7 +270,7 @@ namespace ::sal_Int8 nTextDirection ) override { ::osl::MutexGuard aGuard( m_aMutex ); - const basegfx::B2DHomMatrix offsetTransform(basegfx::tools::createTranslateB2DHomMatrix(aOutPos.X,aOutPos.Y)); + const basegfx::B2DHomMatrix offsetTransform(basegfx::utils::createTranslateB2DHomMatrix(aOutPos.X,aOutPos.Y)); rendering::RenderState aRenderState( createStrokingRenderState() ); tools::appendToRenderState(aRenderState, offsetTransform); @@ -285,7 +285,7 @@ namespace const geometry::RealPoint2D& aLeftTop ) override { ::osl::MutexGuard aGuard( m_aMutex ); - const basegfx::B2DHomMatrix offsetTransform(basegfx::tools::createTranslateB2DHomMatrix(aLeftTop.X,aLeftTop.Y)); + const basegfx::B2DHomMatrix offsetTransform(basegfx::utils::createTranslateB2DHomMatrix(aLeftTop.X,aLeftTop.Y)); rendering::RenderState aRenderState( createStrokingRenderState() ); tools::appendToRenderState(aRenderState, offsetTransform); diff --git a/canvas/source/tools/cachedprimitivebase.cxx b/canvas/source/tools/cachedprimitivebase.cxx index d84e96495828..331db5e5bb1d 100644 --- a/canvas/source/tools/cachedprimitivebase.cxx +++ b/canvas/source/tools/cachedprimitivebase.cxx @@ -20,7 +20,7 @@ #include <sal/config.h> #include <basegfx/matrix/b2dhommatrix.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/rendering/RepaintResult.hpp> #include <cppuhelper/supportsservice.hxx> diff --git a/canvas/source/tools/canvascustomspritehelper.cxx b/canvas/source/tools/canvascustomspritehelper.cxx index 0cbefbc5bf15..9e74809da8d7 100644 --- a/canvas/source/tools/canvascustomspritehelper.cxx +++ b/canvas/source/tools/canvascustomspritehelper.cxx @@ -25,7 +25,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <rtl/math.hxx> #include <tools/diagnose_ex.h> @@ -59,7 +59,7 @@ namespace canvas // clip which is about to be set, expressed as a // b2drectangle const ::basegfx::B2DRectangle& rClipBounds( - ::basegfx::tools::getRange( aClipPath ) ); + ::basegfx::utils::getRange( aClipPath ) ); const ::basegfx::B2DRectangle aBounds( 0.0, 0.0, maSize.getX(), @@ -89,7 +89,7 @@ namespace canvas // new clip could be a single rectangle - check // that now: const bool bNewClipIsRect( - ::basegfx::tools::isRectangle( aClipPath.getB2DPolygon(0) ) ); + ::basegfx::utils::isRectangle( aClipPath.getB2DPolygon(0) ) ); // both new and old clip are truly rectangles // - can now take the optimized path diff --git a/canvas/source/tools/canvastools.cxx b/canvas/source/tools/canvastools.cxx index ee41f6732d2a..a80f23b3f2f4 100644 --- a/canvas/source/tools/canvastools.cxx +++ b/canvas/source/tools/canvastools.cxx @@ -32,7 +32,7 @@ #include <basegfx/range/b2drange.hxx> #include <basegfx/range/b2drectangle.hxx> #include <basegfx/range/b2irange.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/vector/b2ivector.hxx> #include <com/sun/star/awt/Rectangle.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -933,7 +933,7 @@ namespace canvas i_transformation ); // now move resulting left,top point of bounds to (0,0) - const basegfx::B2DHomMatrix aCorrectedTransform(basegfx::tools::createTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aCorrectedTransform(basegfx::utils::createTranslateB2DHomMatrix( -aTransformedRect.getMinX(), -aTransformedRect.getMinY())); // prepend to original transformation @@ -988,11 +988,11 @@ namespace canvas return false; ::basegfx::B2DPolygon aPoly( - ::basegfx::tools::createPolygonFromRect( rTransformRect ) ); + ::basegfx::utils::createPolygonFromRect( rTransformRect ) ); aPoly.transform( rTransformation ); - return ::basegfx::tools::isInside( aPoly, - ::basegfx::tools::createPolygonFromRect( + return ::basegfx::utils::isInside( aPoly, + ::basegfx::utils::createPolygonFromRect( rContainedRect ), true ); } diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx index c0999bde33cf..f999831ffc85 100644 --- a/canvas/source/tools/parametricpolypolygon.cxx +++ b/canvas/source/tools/parametricpolypolygon.cxx @@ -26,8 +26,8 @@ #include <basegfx/point/b2dpoint.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/range/b2drectangle.hxx> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/tools.hxx> #include <cppuhelper/supportsservice.hxx> #include <rtl/math.hxx> @@ -136,7 +136,7 @@ namespace canvas // the colors return new ParametricPolyPolygon( rDevice, - ::basegfx::tools::createPolygonFromCircle( + ::basegfx::utils::createPolygonFromCircle( ::basegfx::B2DPoint(0,0), 1 ), GradientType::Elliptical, colors, stops, fAspectRatio ); @@ -151,7 +151,7 @@ namespace canvas // the colors return new ParametricPolyPolygon( rDevice, - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( -1, -1, 1, 1 ) ), GradientType::Rectangular, colors, stops, fAspectRatio ); diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx index 971ad9af4ab1..c4e1af8c4337 100644 --- a/canvas/source/tools/spriteredrawmanager.cxx +++ b/canvas/source/tools/spriteredrawmanager.cxx @@ -22,7 +22,7 @@ #include <algorithm> #include <basegfx/range/b2drectangle.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/vector/b2dsize.hxx> #include <tools/diagnose_ex.h> diff --git a/canvas/source/tools/surface.cxx b/canvas/source/tools/surface.cxx index adea0c2a983d..6b0fac13cf48 100644 --- a/canvas/source/tools/surface.cxx +++ b/canvas/source/tools/surface.cxx @@ -114,7 +114,7 @@ namespace canvas // 4) scale to normalized device coordinates // 5) flip y-axis // 6) translate to account for viewport transform - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix( maSourceOffset.getX(), maSourceOffset.getY())); aTransform = aTransform * rTransform; aTransform.translate(::basegfx::fround(rPos.getX()), @@ -235,7 +235,7 @@ namespace canvas // 1) offset of surface subarea // 2) surface transform // 3) translation to output position [rPos] - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(aPos1.getX(), aPos1.getY())); + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix(aPos1.getX(), aPos1.getY())); aTransform = aTransform * rTransform; aTransform.translate(::basegfx::fround(rPos.getX()), ::basegfx::fround(rPos.getY())); @@ -366,7 +366,7 @@ namespace canvas // to the destination rectangle. const ::basegfx::B2DRectangle& rUV( getUVCoords() ); - basegfx::B2DPolygon rTriangleList(basegfx::tools::clipTriangleListOnRange(rClipPoly, + basegfx::B2DPolygon rTriangleList(basegfx::utils::clipTriangleListOnRange(rClipPoly, aSurfaceClipRect)); // Push vertices to backend renderer diff --git a/canvas/source/tools/surfaceproxy.cxx b/canvas/source/tools/surfaceproxy.cxx index 4f17d23985e9..0f4444020360 100644 --- a/canvas/source/tools/surfaceproxy.cxx +++ b/canvas/source/tools/surfaceproxy.cxx @@ -114,8 +114,8 @@ namespace canvas ::basegfx::triangulator::triangulate(rClipPoly)); // dump polygons - SAL_INFO("canvas", "Original clip polygon: " << basegfx::tools::exportToSvgD( rClipPoly, true, true, false )); - SAL_INFO("canvas", "Triangulated polygon: " << basegfx::tools::exportToSvgD(basegfx::B2DPolyPolygon(rTriangulatedPolygon), true, true, false )); + SAL_INFO("canvas", "Original clip polygon: " << basegfx::utils::exportToSvgD( rClipPoly, true, true, false )); + SAL_INFO("canvas", "Triangulated polygon: " << basegfx::utils::exportToSvgD(basegfx::B2DPolyPolygon(rTriangulatedPolygon), true, true, false )); for( const auto& rSurfacePtr : maSurfaceList ) rSurfacePtr->drawWithClip( fAlpha, rPos, rTriangulatedPolygon, rTransform ); diff --git a/canvas/source/tools/verifyinput.cxx b/canvas/source/tools/verifyinput.cxx index 800ca9dca1f4..c5764b38f7aa 100644 --- a/canvas/source/tools/verifyinput.cxx +++ b/canvas/source/tools/verifyinput.cxx @@ -25,7 +25,7 @@ #include <basegfx/range/b2drange.hxx> #include <basegfx/range/b2drectangle.hxx> #include <basegfx/range/b2irange.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/geometry/AffineMatrix2D.hpp> #include <com/sun/star/geometry/IntegerPoint2D.hpp> diff --git a/canvas/source/vcl/cachedbitmap.cxx b/canvas/source/vcl/cachedbitmap.cxx index eb94333c707d..b71ecd8fc7dd 100644 --- a/canvas/source/vcl/cachedbitmap.cxx +++ b/canvas/source/vcl/cachedbitmap.cxx @@ -20,7 +20,7 @@ #include <sal/config.h> #include <basegfx/matrix/b2dhommatrix.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/rendering/RepaintResult.hpp> #include <com/sun/star/rendering/XPolyPolygon2D.hpp> #include <tools/diagnose_ex.h> diff --git a/canvas/source/vcl/canvas.cxx b/canvas/source/vcl/canvas.cxx index 90826d253c5c..93dde16ed5f1 100644 --- a/canvas/source/vcl/canvas.cxx +++ b/canvas/source/vcl/canvas.cxx @@ -21,7 +21,7 @@ #include <algorithm> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/lang/NoSupportException.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/registry/XRegistryKey.hpp> diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx index 0ca9e3d9a84a..f7af9d1182d3 100644 --- a/canvas/source/vcl/canvasbitmaphelper.cxx +++ b/canvas/source/vcl/canvasbitmaphelper.cxx @@ -22,7 +22,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <canvas/canvastools.hxx> #include <com/sun/star/util/Endianness.hpp> #include <rtl/math.hxx> diff --git a/canvas/source/vcl/canvascustomsprite.cxx b/canvas/source/vcl/canvascustomsprite.cxx index ab1d4c80cd72..f999c26a016e 100644 --- a/canvas/source/vcl/canvascustomsprite.cxx +++ b/canvas/source/vcl/canvascustomsprite.cxx @@ -26,7 +26,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <cppuhelper/supportsservice.hxx> #include <rtl/math.hxx> #include <tools/diagnose_ex.h> diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index 8bdda85d1ba8..55c2c1cd4137 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -29,7 +29,7 @@ #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/range/b2drectangle.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/vector/b2dsize.hxx> #include <com/sun/star/drawing/LineCap.hpp> #include <com/sun/star/rendering/CompositeOperation.hpp> @@ -351,7 +351,7 @@ namespace vclcanvas if( aPolyPoly.areControlPointsUsed() ) { // AW: Not needed for ApplyLineDashing anymore; should be removed - aPolyPoly = ::basegfx::tools::adaptiveSubdivideByAngle(aPolyPoly); + aPolyPoly = ::basegfx::utils::adaptiveSubdivideByAngle(aPolyPoly); } // apply dashing, if any @@ -365,9 +365,9 @@ namespace vclcanvas for( sal_uInt32 i=0; i<aPolyPoly.count(); ++i ) { // AW: new interface; You may also get gaps in the same run now - basegfx::tools::applyLineDashing(aPolyPoly.getB2DPolygon(i), aDashArray, &aDashedPolyPoly); + basegfx::utils::applyLineDashing(aPolyPoly.getB2DPolygon(i), aDashArray, &aDashedPolyPoly); //aDashedPolyPoly.append( - // ::basegfx::tools::applyLineDashing( aPolyPoly.getB2DPolygon(i), + // ::basegfx::utils::applyLineDashing( aPolyPoly.getB2DPolygon(i), // aDashArray ) ); } @@ -406,7 +406,7 @@ namespace vclcanvas // seem to fit very well here // AW: New interface, will create bezier polygons now - aStrokedPolyPoly.append(basegfx::tools::createAreaGeometry( + aStrokedPolyPoly.append(basegfx::utils::createAreaGeometry( aPolyPoly.getB2DPolygon(i), strokeAttributes.StrokeWidth*0.5, b2DJoineFromJoin(strokeAttributes.JoinType), @@ -416,7 +416,7 @@ namespace vclcanvas fMiterMinimumAngle )); //aStrokedPolyPoly.append( - // ::basegfx::tools::createAreaGeometryForPolygon( aPolyPoly.getB2DPolygon(i), + // ::basegfx::utils::createAreaGeometryForPolygon( aPolyPoly.getB2DPolygon(i), // strokeAttributes.StrokeWidth*0.5, // b2DJoineFromJoin(strokeAttributes.JoinType) ) ); } diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index 3250fc879746..0452aca5fcd9 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -29,10 +29,10 @@ #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/range/b2drectangle.hxx> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/keystoplerp.hxx> -#include <basegfx/tools/lerp.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/keystoplerp.hxx> +#include <basegfx/utils/lerp.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/vector/b2dsize.hxx> #include <com/sun/star/rendering/PathCapType.hpp> #include <com/sun/star/rendering/PathJoinType.hpp> @@ -143,7 +143,7 @@ namespace vclcanvas // now, we potentially have to enlarge our gradient area // atop and below the transformed [0,1]x[0,1] unit rect, // for the gradient to fill the complete bound rect. - ::basegfx::tools::infiniteLineFromParallelogram( aLeftTop, + ::basegfx::utils::infiniteLineFromParallelogram( aLeftTop, aLeftBottom, aRightTop, aRightBottom, @@ -197,7 +197,7 @@ namespace vclcanvas rOutDev.SetLineColor(); - basegfx::tools::KeyStopLerp aLerper(rValues.maStops); + basegfx::utils::KeyStopLerp aLerper(rValues.maStops); // only iterate nStepCount-1 steps, as the last strip is // explicitly painted below @@ -208,9 +208,9 @@ namespace vclcanvas std::tie(nIndex,fAlpha)=aLerper.lerp(double(i)/nStepCount); rOutDev.SetFillColor( - Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), - (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), - (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); + Color( (sal_uInt8)(basegfx::utils::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), + (sal_uInt8)(basegfx::utils::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), + (sal_uInt8)(basegfx::utils::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); // copy right egde of polygon to left edge (and also // copy the closing point) @@ -285,7 +285,7 @@ namespace vclcanvas // subdivide polygon _before_ rendering, would otherwise have // to be performed on every loop turn. if( aOuterPoly.areControlPointsUsed() ) - aOuterPoly = ::basegfx::tools::adaptiveSubdivideByAngle(aOuterPoly); + aOuterPoly = ::basegfx::utils::adaptiveSubdivideByAngle(aOuterPoly); aInnerPoly = aOuterPoly; @@ -354,7 +354,7 @@ namespace vclcanvas rOutDev.SetLineColor(); - basegfx::tools::KeyStopLerp aLerper(rValues.maStops); + basegfx::utils::KeyStopLerp aLerper(rValues.maStops); if( !bFillNonOverlapping ) { @@ -375,9 +375,9 @@ namespace vclcanvas // lerp color rOutDev.SetFillColor( - Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), - (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), - (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); + Color( (sal_uInt8)(basegfx::utils::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), + (sal_uInt8)(basegfx::utils::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), + (sal_uInt8)(basegfx::utils::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); // scale and render polygon, by interpolating between // outer and inner polygon. @@ -433,9 +433,9 @@ namespace vclcanvas // lerp color rOutDev.SetFillColor( - Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), - (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), - (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); + Color( (sal_uInt8)(basegfx::utils::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), + (sal_uInt8)(basegfx::utils::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), + (sal_uInt8)(basegfx::utils::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); #if OSL_DEBUG_LEVEL > 0 if( i && !(i % 10) ) diff --git a/canvas/source/vcl/devicehelper.cxx b/canvas/source/vcl/devicehelper.cxx index fd85af43d3fc..f4d6866e39bd 100644 --- a/canvas/source/vcl/devicehelper.cxx +++ b/canvas/source/vcl/devicehelper.cxx @@ -19,8 +19,8 @@ #include <sal/config.h> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/unopolypolygon.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/unopolypolygon.hxx> #include <canvas/canvastools.hxx> #include <rtl/instance.hxx> #include <toolkit/helper/vclunohelper.hxx> diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx index 99e42fd46557..3abc76f8f7c7 100644 --- a/canvas/source/vcl/impltools.cxx +++ b/canvas/source/vcl/impltools.cxx @@ -26,7 +26,7 @@ #include <basegfx/point/b2dpoint.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/range/b2drectangle.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/tuple/b2dtuple.hxx> #include <com/sun/star/geometry/RealBezierSegment2D.hpp> #include <com/sun/star/geometry/RealPoint2D.hpp> @@ -159,7 +159,7 @@ namespace vclcanvas return false; // delegate to basegfx - return ::basegfx::tools::isRectangle( rPoly.getB2DPolygon() ); + return ::basegfx::utils::isRectangle( rPoly.getB2DPolygon() ); } diff --git a/canvas/source/vcl/services.cxx b/canvas/source/vcl/services.cxx index 1417c78c0111..9c4d0ab9e9fb 100644 --- a/canvas/source/vcl/services.cxx +++ b/canvas/source/vcl/services.cxx @@ -21,7 +21,7 @@ #include <algorithm> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/registry/XRegistryKey.hpp> #include <com/sun/star/uno/XComponentContext.hpp> diff --git a/canvas/source/vcl/spritecanvas.cxx b/canvas/source/vcl/spritecanvas.cxx index 5ef69d2c24e8..a62bbdad06b3 100644 --- a/canvas/source/vcl/spritecanvas.cxx +++ b/canvas/source/vcl/spritecanvas.cxx @@ -21,7 +21,7 @@ #include <algorithm> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/registry/XRegistryKey.hpp> #include <com/sun/star/uno/XComponentContext.hpp> diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx index 79a3cd9047af..00136c59aba0 100644 --- a/canvas/source/vcl/spritecanvashelper.cxx +++ b/canvas/source/vcl/spritecanvashelper.cxx @@ -22,7 +22,7 @@ #include <boost/cast.hpp> #include <basegfx/range/b2drectangle.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <tools/diagnose_ex.h> #include <vcl/bitmapex.hxx> #include <vcl/canvastools.hxx> diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx index 2b9a5d169525..502b73280f7f 100644 --- a/canvas/source/vcl/spritedevicehelper.cxx +++ b/canvas/source/vcl/spritedevicehelper.cxx @@ -19,7 +19,7 @@ #include <sal/config.h> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <canvas/canvastools.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/canvastools.hxx> diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx index d45adc84cd87..2aa1d99bbebe 100644 --- a/canvas/source/vcl/spritehelper.cxx +++ b/canvas/source/vcl/spritehelper.cxx @@ -28,7 +28,7 @@ #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolygontriangulator.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <rtl/math.hxx> #include <tools/diagnose_ex.h> #include <vcl/alpha.hxx> diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx index 3b8621989421..df6e69407d4d 100644 --- a/canvas/source/vcl/textlayout.cxx +++ b/canvas/source/vcl/textlayout.cxx @@ -24,7 +24,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/numeric/ftools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/rendering/CompositeOperation.hpp> #include <com/sun/star/rendering/TextDirection.hpp> #include <cppuhelper/supportsservice.hxx> diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx index af2319ab514b..294b7d25c2e4 100644 --- a/canvas/workben/canvasdemo.cxx +++ b/canvas/workben/canvasdemo.cxx @@ -27,7 +27,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/registry/XSimpleRegistry.hpp> @@ -321,7 +321,7 @@ class DemoRenderer const basegfx::B2DPoint aRadii( maBox.Width()*.3, maBox.Height()*.3 ); const basegfx::B2DPolygon& rEllipse( - basegfx::tools::createPolygonFromEllipse( aCenter, + basegfx::utils::createPolygonFromEllipse( aCenter, aRadii.getX(), aRadii.getY() )); diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx index 3afb0008ad5c..dcc529147b6c 100644 --- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx +++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx @@ -207,7 +207,7 @@ void DragMethod_RotateDiagram::CreateOverlayGeometry(sdr::overlay::OverlayManage const basegfx::B3DHomMatrix aTransform(aWorldToView * aCurrentTransform); // transform to relative scene coordinates - basegfx::B2DPolyPolygon aPolyPolygon(basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon(m_aWireframePolyPolygon, aTransform)); + basegfx::B2DPolyPolygon aPolyPolygon(basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon(m_aWireframePolyPolygon, aTransform)); // transform to 2D view coordinates aPolyPolygon.transform(rVCScene.getObjectTransformation()); diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index d5429ac3ff59..d94aef27fd19 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -132,7 +132,7 @@ bool lcl_doesShapeOverlapWithTickmark( const Reference< drawing::XShape >& xShap void lcl_getRotatedPolygon( B2DPolygon &aPoly, const ::basegfx::B2DRectangle &aRect, const awt::Point &aPos, const double fRotationAngleDegree ) { - aPoly = basegfx::tools::createPolygonFromRect( aRect ); + aPoly = basegfx::utils::createPolygonFromRect( aRect ); // For rotating the rectangle we use the opposite angle, // since `B2DHomMatrix` class used for @@ -168,7 +168,7 @@ bool doesOverlap( const Reference< drawing::XShape >& xShape1 B2DPolyPolygon aPolyPoly1, aPolyPoly2; aPolyPoly1.append( aPoly1 ); aPolyPoly2.append( aPoly2 ); - B2DPolyPolygon overlapPoly = ::basegfx::tools::clipPolyPolygonOnPolyPolygon( aPolyPoly1, aPolyPoly2, true, false ); + B2DPolyPolygon overlapPoly = ::basegfx::utils::clipPolyPolygonOnPolyPolygon( aPolyPoly1, aPolyPoly2, true, false ); return (overlapPoly.count() > 0); } diff --git a/compilerplugins/clang/fpcomparison.cxx b/compilerplugins/clang/fpcomparison.cxx index f85dba05cd1e..f1b833659c43 100644 --- a/compilerplugins/clang/fpcomparison.cxx +++ b/compilerplugins/clang/fpcomparison.cxx @@ -107,11 +107,11 @@ bool FpComparison::ignore(FunctionDecl* function) || dc.Function("lok_approxEqual").AnonymousNamespace().GlobalNamespace() // libreofficekit/source/gtk/lokdocview.cxx // These might need fixing: - || (dc.Function("getSmallestDistancePointToPolygon").Namespace("tools") + || (dc.Function("getSmallestDistancePointToPolygon").Namespace("utils") .Namespace("basegfx").GlobalNamespace()) // basegfx/source/polygon/b2dpolygontools.cxx || (dc.Function("getSmallestDistancePointToPolyPolygon") - .Namespace("tools").Namespace("basegfx").GlobalNamespace()) + .Namespace("utils").Namespace("basegfx").GlobalNamespace()) // basegfx/source/polygon/b2dpolypolygontools.cxx || dc.Function("performTest").Namespace("bridge_test").GlobalNamespace() // testtools/source/bridgetest/bridgetest.cxx diff --git a/compilerplugins/clang/unusedmethods.unused-returns.results b/compilerplugins/clang/unusedmethods.unused-returns.results index 8af384f43f06..1dbaac85bda1 100644 --- a/compilerplugins/clang/unusedmethods.unused-returns.results +++ b/compilerplugins/clang/unusedmethods.unused-returns.results @@ -66,7 +66,7 @@ include/basegfx/point/b3dpoint.hxx:85 class basegfx::B3DPoint & basegfx::B3DPoint::operator*=(const class basegfx::B3DPoint &) include/basegfx/point/b3dpoint.hxx:95 class basegfx::B3DPoint & basegfx::B3DPoint::operator*=(double) -include/basegfx/tools/unopolypolygon.hxx:91 +include/basegfx/utils/unopolypolygon.hxx:91 const class basegfx::B2DPolyPolygon & basegfx::unotools::UnoPolyPolygon::getPolyPolygonUnsafe() const include/basegfx/tuple/b2i64tuple.hxx:92 const long & basegfx::B2I64Tuple::operator[](int) const diff --git a/cppcanvas/inc/pch/precompiled_cppcanvas.hxx b/cppcanvas/inc/pch/precompiled_cppcanvas.hxx index 04d7d0022258..187a5a9a472e 100644 --- a/cppcanvas/inc/pch/precompiled_cppcanvas.hxx +++ b/cppcanvas/inc/pch/precompiled_cppcanvas.hxx @@ -130,8 +130,11 @@ #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/range/b2drange.hxx> #include <basegfx/range/b2drectangle.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/range/basicrange.hxx> +#include <basegfx/tuple/b2dtuple.hxx> +#include <basegfx/tuple/b2ituple.hxx> #include <basegfx/tuple/b3dtuple.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/vector/b2dsize.hxx> #include <basegfx/vector/b2enums.hxx> #include <canvas/canvastools.hxx> diff --git a/cppcanvas/source/mtfrenderer/bitmapaction.cxx b/cppcanvas/source/mtfrenderer/bitmapaction.cxx index 34513fd0528e..fd27bb62dd15 100644 --- a/cppcanvas/source/mtfrenderer/bitmapaction.cxx +++ b/cppcanvas/source/mtfrenderer/bitmapaction.cxx @@ -29,7 +29,7 @@ #include <basegfx/vector/b2dsize.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/range/b2drange.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include "cachedprimitivebase.hxx" #include "bitmapaction.hxx" #include "outdevstate.hxx" @@ -92,7 +92,7 @@ namespace cppcanvas // Setup transformation such that the next render call is // moved rPoint away. - const basegfx::B2DHomMatrix aLocalTransformation(basegfx::tools::createTranslateB2DHomMatrix(rDstPoint)); + const basegfx::B2DHomMatrix aLocalTransformation(basegfx::utils::createTranslateB2DHomMatrix(rDstPoint)); ::canvas::tools::appendToRenderState( maState, aLocalTransformation ); @@ -124,7 +124,7 @@ namespace cppcanvas const ::basegfx::B2DVector aScale( rDstSize.getX() / aBmpSize.Width(), rDstSize.getY() / aBmpSize.Height() ); - const basegfx::B2DHomMatrix aLocalTransformation(basegfx::tools::createScaleTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aLocalTransformation(basegfx::utils::createScaleTranslateB2DHomMatrix( aScale, rDstPoint)); ::canvas::tools::appendToRenderState( maState, aLocalTransformation ); diff --git a/cppcanvas/source/mtfrenderer/emfpbrush.cxx b/cppcanvas/source/mtfrenderer/emfpbrush.cxx index 051859d33549..927c89c1c2fa 100755 --- a/cppcanvas/source/mtfrenderer/emfpbrush.cxx +++ b/cppcanvas/source/mtfrenderer/emfpbrush.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> @@ -178,7 +178,7 @@ namespace cppcanvas s.Seek(pos + pathLength); - const ::basegfx::B2DRectangle aBounds(::basegfx::tools::getRange(path->GetPolygon(rR, false))); + const ::basegfx::B2DRectangle aBounds(::basegfx::utils::getRange(path->GetPolygon(rR, false))); areaWidth = aBounds.getWidth(); areaHeight = aBounds.getHeight(); SAL_INFO("cppcanvas.emf", "EMF+\t polygon bounding box: " << aBounds.getMinX() << "," << aBounds.getMinY() << " " << aBounds.getWidth() << "x" << aBounds.getHeight()); @@ -195,7 +195,7 @@ namespace cppcanvas s.Seek(pos + 8 * boundaryPointCount); - const ::basegfx::B2DRectangle aBounds(::basegfx::tools::getRange(path->GetPolygon(rR, false))); + const ::basegfx::B2DRectangle aBounds(::basegfx::utils::getRange(path->GetPolygon(rR, false))); areaWidth = aBounds.getWidth(); areaHeight = aBounds.getHeight(); SAL_INFO("cppcanvas.emf", "EMF+\t polygon bounding box: " << aBounds.getMinX() << "," << aBounds.getMinY() << " " << aBounds.getWidth() << "x" << aBounds.getHeight()); diff --git a/cppcanvas/source/mtfrenderer/emfpcustomlinecap.cxx b/cppcanvas/source/mtfrenderer/emfpcustomlinecap.cxx index 9ef47171ebea..d5baafc862f9 100755 --- a/cppcanvas/source/mtfrenderer/emfpcustomlinecap.cxx +++ b/cppcanvas/source/mtfrenderer/emfpcustomlinecap.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> diff --git a/cppcanvas/source/mtfrenderer/emfpfont.cxx b/cppcanvas/source/mtfrenderer/emfpfont.cxx index 71ce93cdf4d1..ade72e8ac380 100755 --- a/cppcanvas/source/mtfrenderer/emfpfont.cxx +++ b/cppcanvas/source/mtfrenderer/emfpfont.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> diff --git a/cppcanvas/source/mtfrenderer/emfpimage.cxx b/cppcanvas/source/mtfrenderer/emfpimage.cxx index c9c5176ef853..0cb54cb58a23 100755 --- a/cppcanvas/source/mtfrenderer/emfpimage.cxx +++ b/cppcanvas/source/mtfrenderer/emfpimage.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 7c2312954917..acc0b3f58573 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -22,9 +22,9 @@ #include <vcl/metaact.hxx> #include <vcl/graphicfilter.hxx> #include <basegfx/curve/b2dcubicbezier.hxx> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> @@ -491,7 +491,7 @@ namespace cppcanvas basegfx::B2DRange aBoundsRectangle (0, 0, 1, 1); if (brush->type == BrushTypeLinearGradient) { aGradientService = "LinearGradient"; - aGradInfo = basegfx::tools::createLinearODFGradientInfo( + aGradInfo = basegfx::utils::createLinearODFGradientInfo( aBoundsRectangle, aStops.getLength(), 0, @@ -499,7 +499,7 @@ namespace cppcanvas } else { aGradientService = "EllipticalGradient"; - aGradInfo = basegfx::tools::createEllipticalODFGradientInfo( + aGradInfo = basegfx::utils::createEllipticalODFGradientInfo( aBoundsRectangle, ::basegfx::B2DVector( 0, 0 ), aStops.getLength(), @@ -564,7 +564,7 @@ namespace cppcanvas // of the polygon. const double fShift = bIsFilled ? 0 : rAttributes.StrokeWidth; double fConsumed = 0; - basegfx::B2DPolyPolygon aArrow(basegfx::tools::createAreaGeometryForLineStartEnd( + basegfx::B2DPolyPolygon aArrow(basegfx::utils::createAreaGeometryForLineStartEnd( rPolygon, rLineCap, bStart, fWidth, fPolyLength, 0, &fConsumed, fShift)); @@ -650,7 +650,7 @@ namespace cppcanvas { double fStart = 0.0; double fEnd = 0.0; - double fPolyLength = basegfx::tools::getLength(aPolygon); + double fPolyLength = basegfx::utils::getLength(aPolygon); // line start if (pen->customStartCap) @@ -676,7 +676,7 @@ namespace cppcanvas // build new poly, consume something from the old poly if (fStart != 0.0 || fEnd != 0.0) - aPolygon = basegfx::tools::getSnippetAbsolute(aPolygon, fStart, fPolyLength - fEnd, fPolyLength); + aPolygon = basegfx::utils::getSnippetAbsolute(aPolygon, fStart, fPolyLength - fEnd, fPolyLength); } aFinalPolyPolygon.append(aPolygon); @@ -968,7 +968,7 @@ namespace cppcanvas (360.0*startAngle/M_PI) << ", end: " << (360.0*endAngle/M_PI) << " startAngle: " << startAngle << " sweepAngle: " << sweepAngle); - B2DPolygon polygon = basegfx::tools::createPolygonFromEllipseSegment (mappedCenter, mappedSize.getX (), mappedSize.getY (), startAngle, endAngle); + B2DPolygon polygon = basegfx::utils::createPolygonFromEllipseSegment (mappedCenter, mappedSize.getX (), mappedSize.getY (), startAngle, endAngle); if ( type != EmfPlusRecordTypeDrawArc ) { polygon.append (mappedCenter); @@ -1018,7 +1018,7 @@ namespace cppcanvas B2DPoint mappedCenter (Map (dx + dw/2, dy + dh/2)); B2DSize mappedSize( MapSize (dw/2, dh/2)); - ::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( ::basegfx::tools::createPolygonFromEllipse( mappedCenter, mappedSize.getX (), mappedSize.getY () ) ) ); + ::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( ::basegfx::utils::createPolygonFromEllipse( mappedCenter, mappedSize.getX (), mappedSize.getY () ) ) ); if ( type == EmfPlusRecordTypeFillEllipse ) EMFPPlusFillPolygon( polyPolygon, @@ -1518,7 +1518,7 @@ namespace cppcanvas B2DPoint mappedPoint (Map (dx, dy)); B2DSize mappedSize( MapSize (dw, dh)); - ::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( ::basegfx::tools::createPolygonFromRect( ::basegfx::B2DRectangle( mappedPoint.getX(), mappedPoint.getY(), + ::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( mappedPoint.getX(), mappedPoint.getY(), mappedPoint.getX() + mappedSize.getX(), mappedPoint.getY() + mappedSize.getY() ) ) ) ); polyPolygon.transform(rState.mapModeTransform); diff --git a/cppcanvas/source/mtfrenderer/emfppath.cxx b/cppcanvas/source/mtfrenderer/emfppath.cxx index 4a90f1e9c4c6..45d68f1313a6 100644 --- a/cppcanvas/source/mtfrenderer/emfppath.cxx +++ b/cppcanvas/source/mtfrenderer/emfppath.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> @@ -93,7 +93,7 @@ namespace cppcanvas aPolygon.clear (); #if OSL_DEBUG_LEVEL > 1 - const ::basegfx::B2DRectangle aBounds (::basegfx::tools::getRange (GetPolygon (rR))); + const ::basegfx::B2DRectangle aBounds (::basegfx::utils::getRange (GetPolygon (rR))); SAL_INFO ("cppcanvas.emf", "EMF+\tpolygon bounding box: " << aBounds.getMinX () << "," << aBounds.getMinY () << aBounds.getWidth () << "x" << aBounds.getHeight () << " (mapped)"); diff --git a/cppcanvas/source/mtfrenderer/emfppen.cxx b/cppcanvas/source/mtfrenderer/emfppen.cxx index 36cf63acdf72..14f91b73a7a5 100755 --- a/cppcanvas/source/mtfrenderer/emfppen.cxx +++ b/cppcanvas/source/mtfrenderer/emfppen.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> diff --git a/cppcanvas/source/mtfrenderer/emfpregion.cxx b/cppcanvas/source/mtfrenderer/emfpregion.cxx index 99db436fb5aa..58844b2478ad 100755 --- a/cppcanvas/source/mtfrenderer/emfpregion.cxx +++ b/cppcanvas/source/mtfrenderer/emfpregion.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 418bd5e2478d..f5e59ed6359c 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -36,8 +36,8 @@ #include <com/sun/star/rendering/XCanvas.hpp> #include <com/sun/star/rendering/PathCapType.hpp> #include <com/sun/star/rendering/PathJoinType.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> @@ -573,7 +573,7 @@ namespace cppcanvas } const ::basegfx::B2DRectangle aBounds( - ::basegfx::tools::getRange(aDevicePoly) ); + ::basegfx::utils::getRange(aDevicePoly) ); const ::basegfx::B2DVector aOffset( rGradient.GetOfsX() / 100.0, rGradient.GetOfsY() / 100.0); @@ -588,7 +588,7 @@ namespace cppcanvas switch( rGradient.GetStyle() ) { case GradientStyle::Linear: - aGradInfo = basegfx::tools::createLinearODFGradientInfo( + aGradInfo = basegfx::utils::createLinearODFGradientInfo( aBounds, nSteps, fBorder, @@ -614,7 +614,7 @@ namespace cppcanvas // border value, hence the second (left // most 1-... const double fAxialBorder (1-2*(1-fBorder)); - aGradInfo = basegfx::tools::createAxialODFGradientInfo( + aGradInfo = basegfx::utils::createAxialODFGradientInfo( aBounds, nSteps, fAxialBorder, @@ -634,7 +634,7 @@ namespace cppcanvas } case GradientStyle::Radial: - aGradInfo = basegfx::tools::createRadialODFGradientInfo( + aGradInfo = basegfx::utils::createRadialODFGradientInfo( aBounds, aOffset, nSteps, @@ -643,7 +643,7 @@ namespace cppcanvas break; case GradientStyle::Elliptical: - aGradInfo = basegfx::tools::createEllipticalODFGradientInfo( + aGradInfo = basegfx::utils::createEllipticalODFGradientInfo( aBounds, aOffset, nSteps, @@ -653,7 +653,7 @@ namespace cppcanvas break; case GradientStyle::Square: - aGradInfo = basegfx::tools::createSquareODFGradientInfo( + aGradInfo = basegfx::utils::createSquareODFGradientInfo( aBounds, aOffset, nSteps, @@ -663,7 +663,7 @@ namespace cppcanvas break; case GradientStyle::Rect: - aGradInfo = basegfx::tools::createRectangularODFGradientInfo( + aGradInfo = basegfx::utils::createRectangularODFGradientInfo( aBounds, aOffset, nSteps, @@ -1058,7 +1058,7 @@ namespace cppcanvas // convert rect to polygon beforehand, must revert // to general polygon clipping here. rState.clip = ::basegfx::B2DPolyPolygon( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( // #121100# VCL rectangular clips always // include one more pixel to the right // and the bottom @@ -1069,7 +1069,7 @@ namespace cppcanvas } // AW: Simplified - rState.clip = basegfx::tools::clipPolyPolygonOnPolyPolygon( + rState.clip = basegfx::utils::clipPolyPolygonOnPolyPolygon( rClipPoly, rState.clip, true, false); } @@ -1088,7 +1088,7 @@ namespace cppcanvas rState.xClipPoly = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rParms.mrCanvas->getUNOCanvas()->getDevice(), ::basegfx::B2DPolyPolygon( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( // #121100# VCL rectangular clips // always include one more pixel to // the right and the bottom @@ -1141,7 +1141,7 @@ namespace cppcanvas // convert rect to polygon beforehand, must revert // to general polygon clipping here. ::basegfx::B2DPolyPolygon aClipPoly( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( rClipRect.Left(), rClipRect.Top(), rClipRect.Right(), @@ -1150,7 +1150,7 @@ namespace cppcanvas rState.clipRect.SetEmpty(); // AW: Simplified - rState.clip = basegfx::tools::clipPolyPolygonOnPolyPolygon( + rState.clip = basegfx::utils::clipPolyPolygonOnPolyPolygon( aClipPoly, rState.clip, true, false); } @@ -1165,7 +1165,7 @@ namespace cppcanvas rState.xClipPoly = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rParms.mrCanvas->getUNOCanvas()->getDevice(), ::basegfx::B2DPolyPolygon( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( // #121100# VCL rectangular clips // always include one more pixel to // the right and the bottom @@ -1924,7 +1924,7 @@ namespace cppcanvas // additional pixel to the right and bottom. ::basegfx::B2DPoint(1,1) ); - createFillAndStroke( ::basegfx::tools::createPolygonFromRect( + createFillAndStroke( ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRange( aTopLeftPixel, aBottomRightPixel )), rFactoryParms ); @@ -1940,7 +1940,7 @@ namespace cppcanvas break; ::basegfx::B2DPolygon aPoly( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRange( vcl::unotools::b2DPointFromPoint( rRect.TopLeft() ), vcl::unotools::b2DPointFromPoint( rRect.BottomRight() ) + @@ -1968,7 +1968,7 @@ namespace cppcanvas ::basegfx::B2DPoint(1,1) ); ::basegfx::B2DPolygon aPoly( - ::basegfx::tools::createPolygonFromEllipse( + ::basegfx::utils::createPolygonFromEllipse( aRange.getCenter(), aRange.getWidth() / 2, // divide by 2 since createPolygonFromEllipse aRange.getHeight() / 2 )); // expects the radius and NOT the diameter! diff --git a/cppcanvas/source/mtfrenderer/lineaction.cxx b/cppcanvas/source/mtfrenderer/lineaction.cxx index 148ee26fd4e8..44fe93ca6d13 100644 --- a/cppcanvas/source/mtfrenderer/lineaction.cxx +++ b/cppcanvas/source/mtfrenderer/lineaction.cxx @@ -28,7 +28,7 @@ #include <basegfx/range/b2drange.hxx> #include <basegfx/point/b2dpoint.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <canvas/canvastools.hxx> #include <cppcanvas/canvas.hxx> diff --git a/cppcanvas/source/mtfrenderer/mtftools.cxx b/cppcanvas/source/mtfrenderer/mtftools.cxx index 4432e7196386..adeb30c1af24 100644 --- a/cppcanvas/source/mtfrenderer/mtftools.cxx +++ b/cppcanvas/source/mtfrenderer/mtftools.cxx @@ -22,7 +22,7 @@ #include <com/sun/star/rendering/RenderState.hpp> #include <com/sun/star/rendering/XCanvas.hpp> #include <basegfx/numeric/ftools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/range/b2drectangle.hxx> @@ -92,7 +92,7 @@ namespace cppcanvas const ::Size aSizePixel( rVDev.LogicToPixel( aSizeLogic ) ); - o_rMatrix = basegfx::tools::createScaleB2DHomMatrix( + o_rMatrix = basegfx::utils::createScaleB2DHomMatrix( aSizePixel.Width() / (double)aSizeLogic.Width(), aSizePixel.Height() / (double)aSizeLogic.Height() ); @@ -168,7 +168,7 @@ namespace cppcanvas // rotation involved - convert to polygon first, // then transform that ::basegfx::B2DPolygon aLocalClip( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( (double)(aLocalClipRect.Left()), (double)(aLocalClipRect.Top()), @@ -197,7 +197,7 @@ namespace cppcanvas o_rRenderState.Clip = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), ::basegfx::B2DPolyPolygon( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( (aLocalClipRect.Left() - rOffset.getX())/pScaling->getX(), (aLocalClipRect.Top() - rOffset.getY())/pScaling->getY(), @@ -211,7 +211,7 @@ namespace cppcanvas o_rRenderState.Clip = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), ::basegfx::B2DPolyPolygon( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( aLocalClipRect.Left() - rOffset.getX(), aLocalClipRect.Top() - rOffset.getY(), aLocalClipRect.Right() - rOffset.getX(), @@ -268,7 +268,7 @@ namespace cppcanvas const double y( rStartPos.getY() ); o_rPoly.append( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( x + nX1, y + nY1, x + nX2, y + nY2 ) ) ); } @@ -279,7 +279,7 @@ namespace cppcanvas const double nY2 ) { o_rPoly.append( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( nX1, nY1, nX2, nY2 ) ) ); } diff --git a/cppcanvas/source/mtfrenderer/pointaction.cxx b/cppcanvas/source/mtfrenderer/pointaction.cxx index 0c279ce00649..de099d9245df 100644 --- a/cppcanvas/source/mtfrenderer/pointaction.cxx +++ b/cppcanvas/source/mtfrenderer/pointaction.cxx @@ -25,7 +25,7 @@ #include <basegfx/range/b2drange.hxx> #include <basegfx/point/b2dpoint.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <canvas/canvastools.hxx> #include "pointaction.hxx" diff --git a/cppcanvas/source/mtfrenderer/polypolyaction.cxx b/cppcanvas/source/mtfrenderer/polypolyaction.cxx index a45642cb116b..7ad9399587a8 100644 --- a/cppcanvas/source/mtfrenderer/polypolyaction.cxx +++ b/cppcanvas/source/mtfrenderer/polypolyaction.cxx @@ -25,7 +25,7 @@ #include <vcl/canvastools.hxx> #include <basegfx/range/b2drectangle.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> @@ -91,7 +91,7 @@ namespace cppcanvas bool bStroke ) : CachedPrimitiveBase( rCanvas, false ), mxPolyPoly( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), rPolyPoly) ), - maBounds( ::basegfx::tools::getRange(rPolyPoly) ), + maBounds( ::basegfx::utils::getRange(rPolyPoly) ), mpCanvas( rCanvas ), maState(), maFillColor() @@ -113,7 +113,7 @@ namespace cppcanvas int nTransparency ) : CachedPrimitiveBase( rCanvas, false ), mxPolyPoly( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), rPolyPoly) ), - maBounds( ::basegfx::tools::getRange(rPolyPoly) ), + maBounds( ::basegfx::utils::getRange(rPolyPoly) ), mpCanvas( rCanvas ), maState(), maFillColor() @@ -264,7 +264,7 @@ namespace cppcanvas const rendering::Texture& rTexture ) : CachedPrimitiveBase( rCanvas, true ), mxPolyPoly( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), rPolyPoly) ), - maBounds( ::basegfx::tools::getRange(rPolyPoly) ), + maBounds( ::basegfx::utils::getRange(rPolyPoly) ), mpCanvas( rCanvas ), maState(), maTexture( rTexture ) @@ -375,7 +375,7 @@ namespace cppcanvas const rendering::StrokeAttributes& rStrokeAttributes ) : CachedPrimitiveBase( rCanvas, false ), mxPolyPoly( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), rPolyPoly) ), - maBounds( ::basegfx::tools::getRange(rPolyPoly) ), + maBounds( ::basegfx::utils::getRange(rPolyPoly) ), mpCanvas( rCanvas ), maState(), maStrokeAttributes( rStrokeAttributes ) diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx index 3c8827ecb65d..e53a2c0fe6e1 100644 --- a/cppcanvas/source/mtfrenderer/textaction.cxx +++ b/cppcanvas/source/mtfrenderer/textaction.cxx @@ -37,7 +37,7 @@ #include <vcl/canvastools.hxx> #include <vcl/virdev.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <canvas/canvastools.hxx> #include <memory> @@ -74,7 +74,7 @@ namespace cppcanvas nullptr, &rState.fontRotation ); - basegfx::B2DHomMatrix aLocalTransformation(basegfx::tools::createRotateB2DHomMatrix(rState.fontRotation)); + basegfx::B2DHomMatrix aLocalTransformation(basegfx::utils::createRotateB2DHomMatrix(rState.fontRotation)); aLocalTransformation.translate( rStartPoint.getX(), rStartPoint.getY() ); ::canvas::tools::appendToRenderState( o_rRenderState, @@ -576,7 +576,7 @@ namespace cppcanvas rOffsets, rLineInfo ) ); - o_rOverallSize = ::basegfx::tools::getRange( aPoly ).getRange(); + o_rOverallSize = ::basegfx::utils::getRange( aPoly ).getRange(); o_rTextLines = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), @@ -593,7 +593,7 @@ namespace cppcanvas tools::createTextLinesPolyPolygon( 0.0, nLineWidth, rLineInfo ) ); - o_rOverallSize = ::basegfx::tools::getRange( aPoly ).getRange(); + o_rOverallSize = ::basegfx::utils::getRange( aPoly ).getRange(); o_rTextLines = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), @@ -1495,7 +1495,7 @@ namespace cppcanvas return calcEffectTextBounds( ::basegfx::unotools::b2DRectangleFromRealRectangle2D( xTextLayout->queryTextBounds() ), - ::basegfx::tools::getRange( aPoly ), + ::basegfx::utils::getRange( aPoly ), maReliefOffset, maShadowOffset, aLocalState, @@ -2007,7 +2007,7 @@ namespace cppcanvas rReliefColor, rShadowOffset, rShadowColor, - ::basegfx::tools::getRange(aResultingPolyPolygon), + ::basegfx::utils::getRange(aResultingPolyPolygon), xTextPoly, aCharWidthSeq, rVDev, @@ -2024,7 +2024,7 @@ namespace cppcanvas rReliefColor, rShadowOffset, rShadowColor, - ::basegfx::tools::getRange(aResultingPolyPolygon), + ::basegfx::utils::getRange(aResultingPolyPolygon), xTextPoly, aCharWidthSeq, rVDev, diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx index f8e03bf467d3..16fa545c3c68 100644 --- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx +++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx @@ -45,7 +45,7 @@ #include <basegfx/numeric/ftools.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/tuple/b2dtuple.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include "transparencygroupaction.hxx" @@ -380,7 +380,7 @@ namespace cppcanvas // tdf#95709 // Adjust renderstate clip to modified scale from above ::basegfx::B2DPolyPolygon aClip = ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(aLocalState.Clip); - aClip.transform(basegfx::tools::createScaleB2DHomMatrix(aScale)); + aClip.transform(basegfx::utils::createScaleB2DHomMatrix(aScale)); aLocalState.Clip = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(mpCanvas->getUNOCanvas()->getDevice(), aClip); } diff --git a/cppcanvas/source/tools/canvasgraphichelper.cxx b/cppcanvas/source/tools/canvasgraphichelper.cxx index 56b0f7543790..81e77cc39c1e 100644 --- a/cppcanvas/source/tools/canvasgraphichelper.cxx +++ b/cppcanvas/source/tools/canvasgraphichelper.cxx @@ -25,7 +25,7 @@ #include <com/sun/star/rendering/XPolyPolygon2D.hpp> #include <canvas/canvastools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <cppcanvas/polypolygon.hxx> diff --git a/cppcanvas/source/wrapper/basegfxfactory.cxx b/cppcanvas/source/wrapper/basegfxfactory.cxx index 04be736c272a..f3b3babbbc0f 100644 --- a/cppcanvas/source/wrapper/basegfxfactory.cxx +++ b/cppcanvas/source/wrapper/basegfxfactory.cxx @@ -26,7 +26,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <cppcanvas/basegfxfactory.hxx> diff --git a/cppcanvas/source/wrapper/implbitmapcanvas.cxx b/cppcanvas/source/wrapper/implbitmapcanvas.cxx index 35f335b4e63d..fee1cf357706 100644 --- a/cppcanvas/source/wrapper/implbitmapcanvas.cxx +++ b/cppcanvas/source/wrapper/implbitmapcanvas.cxx @@ -23,7 +23,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include "implbitmapcanvas.hxx" diff --git a/cppcanvas/source/wrapper/implcanvas.cxx b/cppcanvas/source/wrapper/implcanvas.cxx index f3e5f49e8980..23d055e2b9f6 100644 --- a/cppcanvas/source/wrapper/implcanvas.cxx +++ b/cppcanvas/source/wrapper/implcanvas.cxx @@ -21,7 +21,7 @@ #include <rtl/ustring.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/rendering/XCanvas.hpp> diff --git a/cppcanvas/source/wrapper/implpolypolygon.cxx b/cppcanvas/source/wrapper/implpolypolygon.cxx index ab1504c78e5c..16e29abc541a 100644 --- a/cppcanvas/source/wrapper/implpolypolygon.cxx +++ b/cppcanvas/source/wrapper/implpolypolygon.cxx @@ -26,7 +26,7 @@ #include <com/sun/star/rendering/PathCapType.hpp> #include <basegfx/matrix/b2dhommatrix.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include "implpolypolygon.hxx" #include "tools.hxx" diff --git a/cppcanvas/source/wrapper/implsprite.cxx b/cppcanvas/source/wrapper/implsprite.cxx index e2921786ac30..aaff60db40ca 100644 --- a/cppcanvas/source/wrapper/implsprite.cxx +++ b/cppcanvas/source/wrapper/implsprite.cxx @@ -21,7 +21,7 @@ #include <com/sun/star/rendering/XSprite.hpp> #include <com/sun/star/rendering/XAnimatedSprite.hpp> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <canvas/canvastools.hxx> diff --git a/cppcanvas/source/wrapper/implspritecanvas.cxx b/cppcanvas/source/wrapper/implspritecanvas.cxx index 21a9ae4e0a18..9d720cdef5b0 100644 --- a/cppcanvas/source/wrapper/implspritecanvas.cxx +++ b/cppcanvas/source/wrapper/implspritecanvas.cxx @@ -18,7 +18,7 @@ */ #include <basegfx/matrix/b2dhommatrix.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <com/sun/star/rendering/InterpolationMode.hpp> diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 1b07b528665f..6444edaa8b98 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -92,7 +92,7 @@ enum class ColorComponent { static void RGBtoHSV( double dR, double dG, double dB, double& dH, double& dS, double& dV ) { - BColor result = basegfx::tools::rgb2hsv( BColor( dR, dG, dB ) ); + BColor result = basegfx::utils::rgb2hsv( BColor( dR, dG, dB ) ); dH = result.getX(); dS = result.getY(); @@ -101,7 +101,7 @@ static void RGBtoHSV( double dR, double dG, double dB, double& dH, double& dS, d static void HSVtoRGB(double dH, double dS, double dV, double& dR, double& dG, double& dB ) { - BColor result = basegfx::tools::hsv2rgb( BColor( dH, dS, dV ) ); + BColor result = basegfx::utils::hsv2rgb( BColor( dH, dS, dV ) ); dR = result.getRed(); dG = result.getGreen(); diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx index caf3c98fc31d..552ed85c72ed 100644 --- a/cui/source/dialogs/screenshotannotationdlg.cxx +++ b/cui/source/dialogs/screenshotannotationdlg.cxx @@ -446,7 +446,7 @@ void ScreenshotAnnotationDlg_Impl::PaintControlDataEntry( // createPolygonFromRect is relative [0.0 .. 1.0] static double fEdgeRoundPixel(8.0); const basegfx::B2DPolygon aPolygon( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( aB2DRange, fEdgeRoundPixel / aB2DRange.getWidth(), fEdgeRoundPixel / aB2DRange.getHeight())); diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 9329ea2d8008..16602120c0bf 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -408,10 +408,10 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl, Button*, void) } basegfx::B2DPolyPolygon aNewPolyPolygon(static_cast<const SdrPathObj*>(pNewObj)->GetPathPoly()); - basegfx::B2DRange aNewRange(basegfx::tools::getRange(aNewPolyPolygon)); + basegfx::B2DRange aNewRange(basegfx::utils::getRange(aNewPolyPolygon)); // normalize - aNewPolyPolygon.transform(basegfx::tools::createTranslateB2DHomMatrix( -aNewRange.getMinX(), -aNewRange.getMinY())); + aNewPolyPolygon.transform(basegfx::utils::createTranslateB2DHomMatrix( -aNewRange.getMinX(), -aNewRange.getMinY())); SdrObject::Free( pConvPolyObj ); diff --git a/drawinglayer/inc/pch/precompiled_drawinglayer.hxx b/drawinglayer/inc/pch/precompiled_drawinglayer.hxx index 185e7031bb98..5f070d4f77df 100644 --- a/drawinglayer/inc/pch/precompiled_drawinglayer.hxx +++ b/drawinglayer/inc/pch/precompiled_drawinglayer.hxx @@ -97,9 +97,9 @@ #include <basegfx/range/b2drectangle.hxx> #include <basegfx/range/b3drange.hxx> #include <basegfx/range/basicrange.hxx> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/tuple/b2dtuple.hxx> #include <basegfx/tuple/b3dtuple.hxx> #include <basegfx/vector/b2dsize.hxx> diff --git a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx index 02dd689b7048..c8139bb19dfd 100644 --- a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx +++ b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx @@ -146,7 +146,7 @@ namespace drawinglayer const sal_uInt32 nDiscreteHeight(basegfx::fround((fHeight * fFactor100th_mmToInch) * DPI_Y)); basegfx::B2DHomMatrix aEmbedding( - basegfx::tools::createTranslateB2DHomMatrix( + basegfx::utils::createTranslateB2DHomMatrix( -aRange.getMinX(), -aRange.getMinY())); diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx b/drawinglayer/source/geometry/viewinformation2d.cxx index e792c978c306..1010508e36b0 100644 --- a/drawinglayer/source/geometry/viewinformation2d.cxx +++ b/drawinglayer/source/geometry/viewinformation2d.cxx @@ -20,7 +20,7 @@ #include <drawinglayer/geometry/viewinformation2d.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/range/b2drange.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/geometry/AffineMatrix2D.hpp> #include <com/sun/star/geometry/RealRectangle2D.hpp> #include <rtl/instance.hxx> diff --git a/drawinglayer/source/geometry/viewinformation3d.cxx b/drawinglayer/source/geometry/viewinformation3d.cxx index ab16e6125d46..a8ababa930aa 100644 --- a/drawinglayer/source/geometry/viewinformation3d.cxx +++ b/drawinglayer/source/geometry/viewinformation3d.cxx @@ -22,7 +22,7 @@ #include <basegfx/matrix/b3dhommatrix.hxx> #include <com/sun/star/geometry/AffineMatrix3D.hpp> #include <com/sun/star/geometry/RealRectangle3D.hpp> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <rtl/instance.hxx> diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx index 00af2589627d..5808b68e0374 100644 --- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx @@ -162,7 +162,7 @@ namespace drawinglayer const sal_uInt32 nIndA(sal_uInt32(floor(fIndex))); const double fOffset(fIndex - (double)nIndA); basegfx::B2DHomMatrix aTargetTransform; - std::vector< basegfx::tools::B2DHomMatrixBufferedDecompose >::const_iterator aMatA(maMatrixStack.begin() + nIndA); + std::vector< basegfx::utils::B2DHomMatrixBufferedDecompose >::const_iterator aMatA(maMatrixStack.begin() + nIndA); if(basegfx::fTools::equalZero(fOffset)) { @@ -173,7 +173,7 @@ namespace drawinglayer { // interpolate. Get involved buffered decomposed matrices const sal_uInt32 nIndB((nIndA + 1) % nSize); - std::vector< basegfx::tools::B2DHomMatrixBufferedDecompose >::const_iterator aMatB(maMatrixStack.begin() + nIndB); + std::vector< basegfx::utils::B2DHomMatrixBufferedDecompose >::const_iterator aMatB(maMatrixStack.begin() + nIndB); // interpolate for fOffset [0.0 .. 1.0[ const basegfx::B2DVector aScale(basegfx::interpolate(aMatA->getScale(), aMatB->getScale(), fOffset)); @@ -182,7 +182,7 @@ namespace drawinglayer const double fShearX(((aMatB->getShearX() - aMatA->getShearX()) * fOffset) + aMatA->getShearX()); // build matrix for state - aTargetTransform = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aTargetTransform = basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aScale, fShearX, fRotate, aTranslate); } diff --git a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx index 00ef47ffd94d..3121a3fd573b 100644 --- a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx @@ -21,7 +21,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/geometry/viewinformation2d.hxx> #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> @@ -37,7 +37,7 @@ namespace drawinglayer { if(!rViewInformation.getViewport().isEmpty()) { - const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(rViewInformation.getViewport())); + const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(rViewInformation.getViewport())); rContainer.push_back(new PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aOutline), getBColor())); } } diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx index 581f0c421c75..cd45da11bae5 100644 --- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx @@ -25,7 +25,7 @@ #include <drawinglayer/primitive2d/baseprimitive2d.hxx> #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> #include <drawinglayer/geometry/viewinformation2d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <comphelper/sequence.hxx> diff --git a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx index 154791ab6e51..9e19fcce80b8 100644 --- a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx @@ -18,7 +18,7 @@ */ #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx index 3b967fb092b5..f718ceef5511 100644 --- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx @@ -202,7 +202,7 @@ namespace drawinglayer } // short form for scale and translate transformation - const basegfx::B2DHomMatrix aBitmapTransform(basegfx::tools::createScaleTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aBitmapTransform(basegfx::utils::createScaleTranslateB2DHomMatrix( aBitmapSizeLogic.getX(), aBitmapSizeLogic.getY(), aTranslate.getX(), aTranslate.getY())); // create primitive @@ -225,7 +225,7 @@ namespace drawinglayer // create a gray placeholder hairline polygon in object size basegfx::B2DRange aObjectRange(0.0, 0.0, 1.0, 1.0); aObjectRange.transform(getTransform()); - const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aObjectRange)); + const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aObjectRange)); const basegfx::BColor aGrayTone(0xc0 / 255.0, 0xc0 / 255.0, 0xc0 / 255.0); // The replacement object may also get a text like 'empty group' here later diff --git a/drawinglayer/source/primitive2d/cropprimitive2d.cxx b/drawinglayer/source/primitive2d/cropprimitive2d.cxx index 0088e2f349b2..b5e459c07db6 100644 --- a/drawinglayer/source/primitive2d/cropprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/cropprimitive2d.cxx @@ -106,7 +106,7 @@ namespace drawinglayer aNewTransform.invert(); // apply crop enlargement in unit coordinates - aNewTransform = basegfx::tools::createScaleTranslateB2DHomMatrix( + aNewTransform = basegfx::utils::createScaleTranslateB2DHomMatrix( aNewRange.getRange(), aNewRange.getMinimum()) * aNewTransform; @@ -131,7 +131,7 @@ namespace drawinglayer else { // mask with original object's bounds - basegfx::B2DPolyPolygon aMaskPolyPolygon(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolyPolygon aMaskPolyPolygon(basegfx::utils::createUnitPolygon()); aMaskPolyPolygon.transform(getTransformation()); // create maskPrimitive with aMaskPolyPolygon and aMaskContentVector diff --git a/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx b/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx index 3854e1a3f5aa..c46b27b50001 100644 --- a/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx @@ -182,7 +182,7 @@ namespace drawinglayer xRetval[0] = Primitive2DReference( new BitmapPrimitive2D( getDiscreteShadow().getTopLeft(), - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( fBigLenX, fBigLenY, -fBorderX, @@ -192,7 +192,7 @@ namespace drawinglayer xRetval[1] = Primitive2DReference( new BitmapPrimitive2D( getDiscreteShadow().getTop(), - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( 1.0 - (2.0 * (fBorderX + fSingleX)) + fSingleX, fBorderY, fBorderX + fSingleX, @@ -202,7 +202,7 @@ namespace drawinglayer xRetval[2] = Primitive2DReference( new BitmapPrimitive2D( getDiscreteShadow().getTopRight(), - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( fBigLenX, fBigLenY, 1.0 - fBorderX, @@ -212,7 +212,7 @@ namespace drawinglayer xRetval[3] = Primitive2DReference( new BitmapPrimitive2D( getDiscreteShadow().getRight(), - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( fBorderX, 1.0 - (2.0 * (fBorderY + fSingleY)) + fSingleY, 1.0 + fSingleX, @@ -222,7 +222,7 @@ namespace drawinglayer xRetval[4] = Primitive2DReference( new BitmapPrimitive2D( getDiscreteShadow().getBottomRight(), - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( fBigLenX, fBigLenY, 1.0 - (fBorderX + fSingleX) + fSingleX, @@ -232,7 +232,7 @@ namespace drawinglayer xRetval[5] = Primitive2DReference( new BitmapPrimitive2D( getDiscreteShadow().getBottom(), - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( 1.0 - (2.0 * (fBorderX + fSingleX)) + fSingleX, fBorderY, fBorderX + fSingleX, @@ -242,7 +242,7 @@ namespace drawinglayer xRetval[6] = Primitive2DReference( new BitmapPrimitive2D( getDiscreteShadow().getBottomLeft(), - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( fBigLenX, fBigLenY, -fBorderX, @@ -252,7 +252,7 @@ namespace drawinglayer xRetval[7] = Primitive2DReference( new BitmapPrimitive2D( getDiscreteShadow().getLeft(), - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( fBorderX, 1.0 - (2.0 * (fBorderY + fSingleY)) + fSingleY, -fBorderX, diff --git a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx index 52642107069e..06ec8dd58a44 100644 --- a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx @@ -22,7 +22,7 @@ #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/color/bcolor.hxx> #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/geometry/viewinformation2d.hxx> #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> #include <drawinglayer/geometry/viewinformation3d.hxx> @@ -67,7 +67,7 @@ namespace drawinglayer { // use info to create a yellow 2d rectangle, similar to empty 3d scenes and/or groups const basegfx::B2DRange aLocal2DRange(getB2DRange(rViewInformation)); - const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aLocal2DRange)); + const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aLocal2DRange)); const basegfx::BColor aYellow(1.0, 1.0, 0.0); rContainer.push_back(new PolygonHairlinePrimitive2D(aOutline, aYellow)); } diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx index 1848d0165369..a890288e5e30 100644 --- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx @@ -22,7 +22,7 @@ #include <basegfx/polygon/b2dpolygontools.hxx> #include <drawinglayer/texture/texture.hxx> #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> @@ -158,7 +158,7 @@ namespace drawinglayer rContainer.push_back( new PolyPolygonColorPrimitive2D( basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect(getOutputRange())), + basegfx::utils::createPolygonFromRect(getOutputRange())), rOuterColor)); // create solid fill steps @@ -198,7 +198,7 @@ namespace drawinglayer } // add outmost range to combined polypolygon (in 1st place), create first primitive - aCombinedPolyPoly.insert(0, basegfx::tools::createPolygonFromRect(aOutmostRange)); + aCombinedPolyPoly.insert(0, basegfx::utils::createPolygonFromRect(aOutmostRange)); rContainer.push_back( new PolyPolygonColorPrimitive2D( aCombinedPolyPoly, @@ -245,12 +245,12 @@ namespace drawinglayer case attribute::GradientStyle::Radial: case attribute::GradientStyle::Elliptical: { - aUnitPolygon = basegfx::tools::createPolygonFromCircle(basegfx::B2DPoint(0.0, 0.0), 1.0); + aUnitPolygon = basegfx::utils::createPolygonFromCircle(basegfx::B2DPoint(0.0, 0.0), 1.0); break; } default: // GradientStyle::Linear, attribute::GradientStyle::Axial, attribute::GradientStyle::Square, attribute::GradientStyle::Rect { - aUnitPolygon = basegfx::tools::createPolygonFromRect(basegfx::B2DRange(-1.0, -1.0, 1.0, 1.0)); + aUnitPolygon = basegfx::utils::createPolygonFromRect(basegfx::B2DRange(-1.0, -1.0, 1.0, 1.0)); break; } } diff --git a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx index 9bdd689f0e78..eb5550deb22a 100644 --- a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx @@ -81,7 +81,7 @@ namespace drawinglayer { // add graphic without tiling const basegfx::B2DHomMatrix aObjectTransform( - getTransformation() * basegfx::tools::createScaleTranslateB2DHomMatrix( + getTransformation() * basegfx::utils::createScaleTranslateB2DHomMatrix( rAttribute.getGraphicRange().getRange(), rAttribute.getGraphicRange().getMinimum())); @@ -119,10 +119,10 @@ namespace drawinglayer basegfx::B2DRange FillGraphicPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const { // return range of it - basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aPolygon(basegfx::utils::createUnitPolygon()); aPolygon.transform(getTransformation()); - return basegfx::tools::getRange(aPolygon); + return basegfx::utils::getRange(aPolygon); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx index 210ed61a251a..ce178aec61be 100644 --- a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx @@ -22,7 +22,7 @@ #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolygon.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> #include <drawinglayer/geometry/viewinformation2d.hxx> @@ -109,7 +109,7 @@ namespace drawinglayer rContainer.push_back( new PolyPolygonColorPrimitive2D( basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect(getOutputRange())), getBColor())); + basegfx::utils::createPolygonFromRect(getOutputRange())), getBColor())); } // create primitives diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index 35ec935ab9a7..4c2f80f87327 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer // mirror by applying negative scale to the unit primitive and // applying the object transformation on it. - aTransform = basegfx::tools::createScaleB2DHomMatrix( + aTransform = basegfx::utils::createScaleB2DHomMatrix( bHMirr ? -1.0 : 1.0, bVMirr ? -1.0 : 1.0); aTransform.translate( diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx index 20ee33834afb..6d4e1ba14f8c 100644 --- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx @@ -482,7 +482,7 @@ namespace drawinglayer { // translate back to origin, scale to unit coordinates basegfx::B2DHomMatrix aEmbedVectorGraphic( - basegfx::tools::createTranslateB2DHomMatrix( + basegfx::utils::createTranslateB2DHomMatrix( -rSvgRange.getMinX(), -rSvgRange.getMinY())); @@ -533,7 +533,7 @@ namespace drawinglayer || aMetaFileRealSize.getHeight() > aMetaFilePrefSize.getHeight()) { // clipping needed. Embed to MaskPrimitive2D. Create children and mask polygon - basegfx::B2DPolygon aMaskPolygon(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aMaskPolygon(basegfx::utils::createUnitPolygon()); aMaskPolygon.transform(rTransform); Primitive2DReference mask = new MaskPrimitive2D( diff --git a/drawinglayer/source/primitive2d/gridprimitive2d.cxx b/drawinglayer/source/primitive2d/gridprimitive2d.cxx index 9326d35b289d..877374e549ef 100644 --- a/drawinglayer/source/primitive2d/gridprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/gridprimitive2d.cxx @@ -18,7 +18,7 @@ */ #include <drawinglayer/primitive2d/gridprimitive2d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive2d/pointarrayprimitive2d.hxx> #include <drawinglayer/primitive2d/markerarrayprimitive2d.hxx> #include <drawinglayer/geometry/viewinformation2d.hxx> @@ -43,7 +43,7 @@ namespace drawinglayer getTransform().decompose(aScale, aTranslate, fRotate, fShearX); // create grid matrix which transforms from scaled logic to view - basegfx::B2DHomMatrix aRST(basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aRST(basegfx::utils::createShearXRotateTranslateB2DHomMatrix( fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); aRST *= rViewInformation.getObjectToViewTransformation(); diff --git a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx index 760022c53e7d..eb31fade9fb6 100644 --- a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx @@ -21,7 +21,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> #include <basegfx/polygon/b2dpolygonclipper.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/geometry/viewinformation2d.hxx> #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> @@ -109,7 +109,7 @@ namespace drawinglayer if(aLine.count()) { // clip against visible area - const basegfx::B2DPolyPolygon aResult(basegfx::tools::clipPolygonOnRange(aLine, rViewInformation.getDiscreteViewport(), true, true)); + const basegfx::B2DPolyPolygon aResult(basegfx::utils::clipPolygonOnRange(aLine, rViewInformation.getDiscreteViewport(), true, true)); for(sal_uInt32 a(0); a < aResult.count(); a++) { diff --git a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx index dd4d5241f3a2..fc9a7270afab 100644 --- a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx @@ -39,7 +39,7 @@ namespace drawinglayer xRetval.resize(1); // create background object - basegfx::B2DPolygon aBackgroundPolygon(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aBackgroundPolygon(basegfx::utils::createUnitPolygon()); aBackgroundPolygon.transform(getTransform()); const Primitive2DReference xRefBackground( new PolyPolygonColorPrimitive2D( diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index da3cca98b844..bb3d243b4beb 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -20,7 +20,7 @@ #include <drawinglayer/primitive2d/metafileprimitive2d.hxx> #include <wmfemfhelper.hxx> -//#include <basegfx/tools/canvastools.hxx> +//#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> //#include <basegfx/color/bcolor.hxx> //#include <drawinglayer/primitive2d/pointarrayprimitive2d.hxx> diff --git a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx index 1b8c941537e7..64d47694d121 100644 --- a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx @@ -58,7 +58,7 @@ namespace drawinglayer const Primitive2DReference xReferenceA( new MaskPrimitive2D( basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect(aAllowedContentRange)), aContent)); + basegfx::utils::createPolygonFromRect(aAllowedContentRange)), aContent)); aContent = Primitive2DContainer { xReferenceA }; } @@ -92,7 +92,7 @@ namespace drawinglayer } // add the missing object transformation aspects - const basegfx::B2DHomMatrix aCombined(basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aCombined(basegfx::utils::createShearXRotateTranslateB2DHomMatrix( fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); aPageTrans = aCombined * aPageTrans; diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx index ed26d32470b9..1cad17802106 100644 --- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx @@ -54,7 +54,7 @@ namespace drawinglayer // get discrete rounded up square size of a single tile const basegfx::B2DHomMatrix aMaskRangeTransformation( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( aMaskRange.getRange(), aMaskRange.getMinimum())); const basegfx::B2DHomMatrix aTransform( @@ -105,7 +105,7 @@ namespace drawinglayer const geometry::ViewInformation2D aViewInformation2D; const primitive2d::Primitive2DReference xEmbedRef( new primitive2d::TransformPrimitive2D( - basegfx::tools::createScaleB2DHomMatrix(mnDiscreteWidth, mnDiscreteHeight), + basegfx::utils::createScaleB2DHomMatrix(mnDiscreteWidth, mnDiscreteHeight), getChildren())); const primitive2d::Primitive2DContainer xEmbedSeq { xEmbedRef }; @@ -150,7 +150,7 @@ namespace drawinglayer { const Primitive2DReference xRef( new MaskPrimitive2D( - basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(aUnitRange)), + basegfx::B2DPolyPolygon(basegfx::utils::createPolygonFromRect(aUnitRange)), aContent)); aContent = Primitive2DContainer { xRef }; @@ -195,7 +195,7 @@ namespace drawinglayer // transform result which is in unit coordinates to mask's object coordinates { const basegfx::B2DHomMatrix aMaskTransform( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( aMaskRange.getRange(), aMaskRange.getMinimum())); diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx index 0511d3602fd4..28bd5f2fe714 100644 --- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx @@ -18,7 +18,7 @@ */ #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> @@ -106,7 +106,7 @@ namespace drawinglayer aDash.push_back(fLogicDashLength); aDash.push_back(fLogicDashLength); - basegfx::tools::applyLineDashing(getB2DPolygon(), aDash, &aDashedPolyPolyA, &aDashedPolyPolyB, 2.0 * fLogicDashLength); + basegfx::utils::applyLineDashing(getB2DPolygon(), aDash, &aDashedPolyPolyA, &aDashedPolyPolyB, 2.0 * fLogicDashLength); rContainer.push_back(new PolyPolygonHairlinePrimitive2D(aDashedPolyPolyA, getRGBColorA())); rContainer.push_back(new PolyPolygonHairlinePrimitive2D(aDashedPolyPolyB, getRGBColorB())); @@ -218,7 +218,7 @@ namespace drawinglayer if(getB2DPolygon().count()) { // #i102241# try to simplify before usage - const basegfx::B2DPolygon aB2DPolygon(basegfx::tools::simplifyCurveSegments(getB2DPolygon())); + const basegfx::B2DPolygon aB2DPolygon(basegfx::utils::simplifyCurveSegments(getB2DPolygon())); basegfx::B2DPolyPolygon aHairLinePolyPolygon; if(getStrokeAttribute().isDefault() || 0.0 == getStrokeAttribute().getFullDotDashLen()) @@ -229,7 +229,7 @@ namespace drawinglayer else { // apply LineStyle - basegfx::tools::applyLineDashing( + basegfx::utils::applyLineDashing( aB2DPolygon, getStrokeAttribute().getDotDashArray(), &aHairLinePolyPolygon, nullptr, getStrokeAttribute().getFullDotDashLen()); } @@ -248,7 +248,7 @@ namespace drawinglayer for(sal_uInt32 a(0); a < nCount; a++) { // New version of createAreaGeometry; now creates bezier polygons - aAreaPolyPolygon.append(basegfx::tools::createAreaGeometry( + aAreaPolyPolygon.append(basegfx::utils::createAreaGeometry( aHairLinePolyPolygon.getB2DPolygon(a), fHalfLineWidth, aLineJoin, @@ -404,7 +404,7 @@ namespace drawinglayer if(bHasWidth && bHasHeight) { // create waveline curve - const basegfx::B2DPolygon aWaveline(basegfx::tools::createWaveline(getB2DPolygon(), getWaveWidth(), getWaveHeight())); + const basegfx::B2DPolygon aWaveline(basegfx::utils::createWaveline(getB2DPolygon(), getWaveWidth(), getWaveHeight())); rContainer.push_back(new PolygonStrokePrimitive2D(aWaveline, getLineAttribute(), getStrokeAttribute())); } else @@ -511,7 +511,7 @@ namespace drawinglayer if(!aLocalPolygon.isClosed() && aLocalPolygon.count() > 1) { // apply arrows - const double fPolyLength(basegfx::tools::getLength(aLocalPolygon)); + const double fPolyLength(basegfx::utils::getLength(aLocalPolygon)); double fStart(0.0); double fEnd(0.0); double fStartOverlap(0.0); @@ -520,7 +520,7 @@ namespace drawinglayer if(!getStart().isDefault() && getStart().isActive()) { // create start arrow primitive and consume - aArrowA = basegfx::tools::createAreaGeometryForLineStartEnd( + aArrowA = basegfx::utils::createAreaGeometryForLineStartEnd( aLocalPolygon, getStart().getB2DPolyPolygon(), true, getStart().getWidth(), fPolyLength, getStart().isCentered() ? 0.5 : 0.0, &fStart); @@ -532,7 +532,7 @@ namespace drawinglayer if(!getEnd().isDefault() && getEnd().isActive()) { // create end arrow primitive and consume - aArrowB = basegfx::tools::createAreaGeometryForLineStartEnd( + aArrowB = basegfx::utils::createAreaGeometryForLineStartEnd( aLocalPolygon, getEnd().getB2DPolyPolygon(), false, getEnd().getWidth(), fPolyLength, getEnd().isCentered() ? 0.5 : 0.0, &fEnd); @@ -543,7 +543,7 @@ namespace drawinglayer if(0.0 != fStart || 0.0 != fEnd) { // build new poly, consume something from old poly - aLocalPolygon = basegfx::tools::getSnippetAbsolute(aLocalPolygon, fStart-fStartOverlap, fPolyLength - fEnd + fEndOverlap, fPolyLength); + aLocalPolygon = basegfx::utils::getSnippetAbsolute(aLocalPolygon, fStart-fStartOverlap, fPolyLength - fEnd + fEndOverlap, fPolyLength); } } diff --git a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx index a81922e52db0..73f40a1f319a 100644 --- a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx @@ -19,7 +19,7 @@ #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive2d/fillgradientprimitive2d.hxx> #include <drawinglayer/primitive2d/maskprimitive2d.hxx> #include <drawinglayer/primitive2d/fillhatchprimitive2d.hxx> @@ -77,7 +77,7 @@ namespace drawinglayer basegfx::B2DRange PolyPolygonHairlinePrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const { // return range - return basegfx::tools::getRange(getB2DPolyPolygon()); + return basegfx::utils::getRange(getB2DPolyPolygon()); } // provide unique ID @@ -141,7 +141,7 @@ namespace drawinglayer basegfx::B2DRange PolyPolygonMarkerPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const { // return range - return basegfx::tools::getRange(getB2DPolyPolygon()); + return basegfx::utils::getRange(getB2DPolyPolygon()); } // provide unique ID @@ -209,7 +209,7 @@ namespace drawinglayer basegfx::B2DRange PolyPolygonStrokePrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const { // get range of it (subdivided) - basegfx::B2DRange aRetval(basegfx::tools::getRange(getB2DPolyPolygon())); + basegfx::B2DRange aRetval(basegfx::utils::getRange(getB2DPolyPolygon())); // if width, grow by line width if(getLineAttribute().getWidth()) @@ -256,7 +256,7 @@ namespace drawinglayer basegfx::B2DRange PolyPolygonColorPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const { // return range - return basegfx::tools::getRange(getB2DPolyPolygon()); + return basegfx::utils::getRange(getB2DPolyPolygon()); } // provide unique ID @@ -422,7 +422,7 @@ namespace drawinglayer // create SubSequence with FillGraphicPrimitive2D based on polygon range const basegfx::B2DRange aOutRange(getB2DPolyPolygon().getB2DRange()); const basegfx::B2DHomMatrix aNewObjectTransform( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( aOutRange.getRange(), aOutRange.getMinimum())); Primitive2DReference xSubRef; @@ -439,14 +439,14 @@ namespace drawinglayer basegfx::B2DRange aAdaptedRange(getFillGraphic().getGraphicRange()); const basegfx::B2DHomMatrix aFromDefinitionRangeToGlobal( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( getDefinitionRange().getRange(), getDefinitionRange().getMinimum())); aAdaptedRange.transform(aFromDefinitionRangeToGlobal); basegfx::B2DHomMatrix aFromGlobalToOutRange( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( aOutRange.getRange(), aOutRange.getMinimum())); aFromGlobalToOutRange.invert(); @@ -595,7 +595,7 @@ namespace drawinglayer basegfx::B2DRange PolyPolygonSelectionPrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewInformation) const { - basegfx::B2DRange aRetval(basegfx::tools::getRange(getB2DPolyPolygon())); + basegfx::B2DRange aRetval(basegfx::utils::getRange(getB2DPolyPolygon())); if(getDiscreteGrow() > 0.0) { diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx index 3167d5f60d8f..6dce6773202b 100644 --- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx @@ -18,7 +18,7 @@ */ #include <drawinglayer/primitive2d/sceneprimitive2d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygonclipper.hxx> @@ -482,7 +482,7 @@ namespace drawinglayer if(bAddOutlineToCreated3DSceneRepresentation) { - basegfx::B2DPolygon aOutline(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aOutline(basegfx::utils::createUnitPolygon()); aOutline.transform(aNew2DTransform); rContainer.push_back(new PolygonHairlinePrimitive2D(aOutline, basegfx::BColor(1.0, 0.0, 0.0))); } diff --git a/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx b/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx index 40b5d3ef531c..be04cd9f44d5 100644 --- a/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx +++ b/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx @@ -32,7 +32,7 @@ namespace drawinglayer Primitive2DReference createHiddenGeometryPrimitives2D( const basegfx::B2DHomMatrix& rMatrix) { - const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createUnitPolygon()); + const basegfx::B2DPolygon aUnitOutline(basegfx::utils::createUnitPolygon()); return createHiddenGeometryPrimitives2D( false/*bFilled*/, @@ -64,7 +64,7 @@ namespace drawinglayer const basegfx::B2DRange& rRange, const basegfx::B2DHomMatrix& rMatrix) { - const basegfx::B2DPolyPolygon aOutline(basegfx::tools::createPolygonFromRect(rRange)); + const basegfx::B2DPolyPolygon aOutline(basegfx::utils::createPolygonFromRect(rRange)); return createHiddenGeometryPrimitives2D( bFilled, diff --git a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx index 4375319e5453..78b15dbb2c6f 100644 --- a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx @@ -21,7 +21,7 @@ #include <basegfx/color/bcolormodifier.hxx> #include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx> #include <drawinglayer/primitive2d/transformprimitive2d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive2d/transparenceprimitive2d.hxx> #include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx> #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> diff --git a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx index 60fc556a4f52..54b750d3df14 100644 --- a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx @@ -387,7 +387,7 @@ namespace drawinglayer // create ObjectTransform based on polygon range const basegfx::B2DHomMatrix aObjectTransform( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( fPolyWidth, fPolyHeight, aPolyRange.getMinX(), aPolyRange.getMinY())); basegfx::B2DHomMatrix aUnitGradientToObject; @@ -449,7 +449,7 @@ namespace drawinglayer // add a pre-multiply to aUnitGradientToObject to allow // multiplication of the polygon(xl, 0.0, xr, 1.0) const basegfx::B2DHomMatrix aPreMultiply( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( 1.0, aUnitRange.getHeight(), 0.0, aUnitRange.getMinY())); aUnitGradientToObject = aUnitGradientToObject * aPreMultiply; @@ -725,7 +725,7 @@ namespace drawinglayer // create ObjectTransform based on polygon range const basegfx::B2DHomMatrix aObjectTransform( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( fPolyWidth, fPolyHeight, aPolyRange.getMinX(), aPolyRange.getMinY())); basegfx::B2DHomMatrix aUnitGradientToObject; @@ -917,7 +917,7 @@ namespace drawinglayer // prepare polygon in needed width at start position (with discrete overlap) const basegfx::B2DPolygon aPolygon( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRange( getOffsetA() - fDiscreteUnit, 0.0, @@ -932,7 +932,7 @@ namespace drawinglayer { basegfx::B2DPolygon aNew(aPolygon); - aNew.transform(basegfx::tools::createTranslateB2DHomMatrix(fDelta * fUnitScale, 0.0)); + aNew.transform(basegfx::utils::createTranslateB2DHomMatrix(fDelta * fUnitScale, 0.0)); rContainer.push_back(new PolyPolygonColorPrimitive2D( basegfx::B2DPolyPolygon(aNew), basegfx::interpolate(getColorA(), getColorB(), fUnitScale))); @@ -1013,7 +1013,7 @@ namespace drawinglayer getTranslateA(), fUnitScale)); - aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix( + aTransform = basegfx::utils::createScaleTranslateB2DHomMatrix( fEndScale, fEndScale, aTranslate.getX(), @@ -1021,12 +1021,12 @@ namespace drawinglayer } else { - aTransform = basegfx::tools::createScaleB2DHomMatrix( + aTransform = basegfx::utils::createScaleB2DHomMatrix( fEndScale, fEndScale); } - basegfx::B2DPolygon aNew(basegfx::tools::createPolygonFromUnitCircle()); + basegfx::B2DPolygon aNew(basegfx::utils::createPolygonFromUnitCircle()); aNew.transform(aTransform); rContainer.push_back(new PolyPolygonColorPrimitive2D( diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx index 897166caa5fc..dbc19901001d 100644 --- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx @@ -36,7 +36,7 @@ namespace drawinglayer { void TextDecoratedPortionPrimitive2D::impCreateGeometryContent( std::vector< Primitive2DReference >& rTarget, - basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose const & rDecTrans, + basegfx::utils::B2DHomMatrixBufferedOnDemandDecompose const & rDecTrans, const OUString& rText, sal_Int32 nTextPosition, sal_Int32 nTextLength, @@ -176,7 +176,7 @@ namespace drawinglayer } } std::vector< Primitive2DReference > aNewPrimitives; - basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose aDecTrans(getTextTransform()); + basegfx::utils::B2DHomMatrixBufferedOnDemandDecompose aDecTrans(getTextTransform()); Primitive2DContainer aRetval; // create basic geometry such as SimpleTextPrimitive, Overline, Underline, @@ -233,7 +233,7 @@ namespace drawinglayer static basegfx::BColor aShadowColor(0.3, 0.3, 0.3); // preapare shadow transform matrix - const basegfx::B2DHomMatrix aShadowTransform(basegfx::tools::createTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aShadowTransform(basegfx::utils::createTranslateB2DHomMatrix( fTextShadowOffset, fTextShadowOffset)); // create shadow primitive diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx index 858be59a4f89..af22b38ba958 100644 --- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx @@ -47,12 +47,12 @@ namespace drawinglayer case TextEffectStyle2D::ReliefEngravedDefault: { // prepare transform of sub-group back to (0,0) and align to X-Axis - basegfx::B2DHomMatrix aBackTransform(basegfx::tools::createTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aBackTransform(basegfx::utils::createTranslateB2DHomMatrix( -getRotationCenter().getX(), -getRotationCenter().getY())); aBackTransform.rotate(-getDirection()); // prepare transform of sub-group back to its position and rotation - basegfx::B2DHomMatrix aForwardTransform(basegfx::tools::createRotateB2DHomMatrix(getDirection())); + basegfx::B2DHomMatrix aForwardTransform(basegfx::utils::createRotateB2DHomMatrix(getDirection())); aForwardTransform.translate(getRotationCenter().getX(), getRotationCenter().getY()); // create transformation for one discrete unit diff --git a/drawinglayer/source/primitive2d/textlineprimitive2d.cxx b/drawinglayer/source/primitive2d/textlineprimitive2d.cxx index a9ad1ec2dd89..89d1b92afec6 100644 --- a/drawinglayer/source/primitive2d/textlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textlineprimitive2d.cxx @@ -189,7 +189,7 @@ namespace drawinglayer aLine.append(basegfx::B2DPoint(getWidth(), fOffset)); const basegfx::B2DHomMatrix aUnscaledTransform( - basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + basegfx::utils::createShearXRotateTranslateB2DHomMatrix( fShearX, fRotate, aTranslate)); aLine.transform(aUnscaledTransform); @@ -230,7 +230,7 @@ namespace drawinglayer } // move base point of text to 0.0 and de-rotate - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix( -aTranslate.getX(), -aTranslate.getY())); aTransform.rotate(-fRotate); diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx index 3dc00a9e1a99..adc0ecaad385 100644 --- a/drawinglayer/source/primitive2d/textprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx @@ -157,7 +157,7 @@ namespace drawinglayer if(nCount) { // prepare object transformation for polygons - rTransformation = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + rTransformation = basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aScale, fShearX, fRotate, aTranslate); } } @@ -308,7 +308,7 @@ namespace drawinglayer if(!aNewRange.isEmpty()) { // prepare object transformation for range - const basegfx::B2DHomMatrix aRangeTransformation(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aRangeTransformation(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aScale, fShearX, fRotate, aTranslate)); // apply range transformation to it diff --git a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx index 37b9c3cd68fd..952ef92284ae 100644 --- a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx @@ -193,7 +193,7 @@ namespace drawinglayer aStrikeoutLine.append(basegfx::B2DPoint(getWidth(), -fStrikeoutOffset)); const basegfx::B2DHomMatrix aUnscaledTransform( - basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + basegfx::utils::createShearXRotateTranslateB2DHomMatrix( fShearX, fRotate, aTranslate)); aStrikeoutLine.transform(aUnscaledTransform); @@ -210,7 +210,7 @@ namespace drawinglayer const double fLineDist(2.0 * fStrikeoutHeight); // move base point of text to 0.0 and de-rotate - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix( -aTranslate.getX(), -aTranslate.getY())); aTransform.rotate(-fRotate); diff --git a/drawinglayer/source/primitive2d/transformprimitive2d.cxx b/drawinglayer/source/primitive2d/transformprimitive2d.cxx index 002b6490752b..39f5db38cdeb 100644 --- a/drawinglayer/source/primitive2d/transformprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/transformprimitive2d.cxx @@ -18,7 +18,7 @@ */ #include <drawinglayer/primitive2d/transformprimitive2d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> diff --git a/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx b/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx index 24f07733e81c..23a01e03e101 100644 --- a/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx @@ -87,7 +87,7 @@ namespace drawinglayer // I will take the last one here. The small overhead of two primitives will only be // used when UnifiedTransparencePrimitive2D is not handled directly. const basegfx::B2DRange aPolygonRange(getChildren().getB2DRange(rViewInformation)); - const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(aPolygonRange)); + const basegfx::B2DPolygon aPolygon(basegfx::utils::createPolygonFromRect(aPolygonRange)); const basegfx::BColor aGray(getTransparence(), getTransparence(), getTransparence()); Primitive2DContainer aTransparenceContent(2); diff --git a/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx index b5280ad2f31c..6bab9e92255f 100644 --- a/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx @@ -184,7 +184,7 @@ namespace drawinglayer // create ObjectTransform const basegfx::B2DHomMatrix aObjectTransform( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( getLocalObjectRange().getRange(), getLocalObjectRange().getMinimum())); @@ -203,7 +203,7 @@ namespace drawinglayer { // embed to clipping; this is necessary for tiled fills const basegfx::B2DPolyPolygon aPolyPolygon( - basegfx::tools::createPolygonFromRect(getLocalObjectRange())); + basegfx::utils::createPolygonFromRect(getLocalObjectRange())); const drawinglayer::primitive2d::Primitive2DReference xClippedFill( new drawinglayer::primitive2d::MaskPrimitive2D( aPolyPolygon, diff --git a/drawinglayer/source/primitive3d/baseprimitive3d.cxx b/drawinglayer/source/primitive3d/baseprimitive3d.cxx index d9d5804c69ff..cfac964e1a3a 100644 --- a/drawinglayer/source/primitive3d/baseprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/baseprimitive3d.cxx @@ -19,7 +19,7 @@ #include <drawinglayer/primitive3d/baseprimitive3d.hxx> #include <drawinglayer/geometry/viewinformation3d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <comphelper/sequence.hxx> diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx index d8348b2689f4..4400dd827d66 100644 --- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx @@ -132,7 +132,7 @@ namespace drawinglayer { // found two linearly independent 2D vectors // get 2d range of texture coordinates - const basegfx::B2DRange aOutlineRange(basegfx::tools::getRange(aTexPolyPolygon)); + const basegfx::B2DRange aOutlineRange(basegfx::utils::getRange(aTexPolyPolygon)); const basegfx::BColor aHatchColor(getHatch().getColor()); const double fAngle(getHatch().getAngle()); std::vector< basegfx::B2DHomMatrix > aMatrices; @@ -195,7 +195,7 @@ namespace drawinglayer if(a2DHatchLines.count()) { // clip against texture polygon - a2DHatchLines = basegfx::tools::clipPolyPolygonOnPolyPolygon(a2DHatchLines, aTexPolyPolygon, true, true); + a2DHatchLines = basegfx::utils::clipPolyPolygonOnPolyPolygon(a2DHatchLines, aTexPolyPolygon, true, true); } if(a2DHatchLines.count()) @@ -216,7 +216,7 @@ namespace drawinglayer a2DHatchLines.transform(a2D); // expand back-transformed geometry to 3D - basegfx::B3DPolyPolygon a3DHatchLines(basegfx::tools::createB3DPolyPolygonFromB2DPolyPolygon(a2DHatchLines, 0.0)); + basegfx::B3DPolyPolygon a3DHatchLines(basegfx::utils::createB3DPolyPolygonFromB2DPolyPolygon(a2DHatchLines, 0.0)); // create 3d matrix with 3d vectors as column vectors (0,0,1 as Z) and 3d point as offset, this represents // a coordinate system transformation from unit coordinates to the object's 3d coordinate system diff --git a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx index 20de70b7610a..a1956d9786e6 100644 --- a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx @@ -19,7 +19,7 @@ #include <drawinglayer/primitive3d/polygonprimitive3d.hxx> #include <basegfx/polygon/b3dpolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b3dpolypolygontools.hxx> #include <drawinglayer/primitive3d/polygontubeprimitive3d.hxx> #include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx> @@ -56,7 +56,7 @@ namespace drawinglayer basegfx::B3DRange PolygonHairlinePrimitive3D::getB3DRange(const geometry::ViewInformation3D& /*rViewInformation*/) const { - return basegfx::tools::getRange(getB3DPolygon()); + return basegfx::utils::getRange(getB3DPolygon()); } // provide unique ID @@ -85,7 +85,7 @@ namespace drawinglayer else { // apply LineStyle - basegfx::tools::applyLineDashing(getB3DPolygon(), getStrokeAttribute().getDotDashArray(), &aHairLinePolyPolygon, nullptr, getStrokeAttribute().getFullDotDashLen()); + basegfx::utils::applyLineDashing(getB3DPolygon(), getStrokeAttribute().getDotDashArray(), &aHairLinePolyPolygon, nullptr, getStrokeAttribute().getFullDotDashLen()); } // prepare result diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx index 5657307dd5f3..fb6555fd4e05 100644 --- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx @@ -239,7 +239,7 @@ namespace drawinglayer // create half-sphere; upper half of unit sphere basegfx::B3DPolyPolygon aSphere( - basegfx::tools::createUnitSphereFillPolyPolygon( + basegfx::utils::createUnitSphereFillPolyPolygon( nSegments, nVerSeg, true, @@ -314,7 +314,7 @@ namespace drawinglayer if(nHorSeg) { // create half-sphere - const basegfx::B3DPolyPolygon aSphere(basegfx::tools::createUnitSphereFillPolyPolygon(nHorSeg, nVerSeg, true, F_PI2, -F_PI2, 0.0, fAngle)); + const basegfx::B3DPolyPolygon aSphere(basegfx::utils::createUnitSphereFillPolyPolygon(nHorSeg, nVerSeg, true, F_PI2, -F_PI2, 0.0, fAngle)); for(sal_uInt32 a(0); a < aSphere.count(); a++) { diff --git a/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx b/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx index 3a77955da71a..38acc8c123f9 100644 --- a/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx @@ -19,7 +19,7 @@ #include <drawinglayer/primitive3d/polypolygonprimitive3d.hxx> #include <basegfx/polygon/b3dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx> @@ -57,7 +57,7 @@ namespace drawinglayer basegfx::B3DRange PolyPolygonMaterialPrimitive3D::getB3DRange(const geometry::ViewInformation3D& /*rViewInformation*/) const { - return basegfx::tools::getRange(getB3DPolyPolygon()); + return basegfx::utils::getRange(getB3DPolyPolygon()); } // provide unique ID diff --git a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx index 9b6d650e0303..864d3e41e98b 100644 --- a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx @@ -22,7 +22,7 @@ #include <basegfx/polygon/b3dpolygon.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <drawinglayer/primitive3d/sdrdecompositiontools3d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx> #include <drawinglayer/attribute/sdrfillattribute.hxx> #include <drawinglayer/attribute/sdrlineattribute.hxx> @@ -40,7 +40,7 @@ namespace drawinglayer { const basegfx::B3DRange aUnitRange(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); Primitive3DContainer aRetval; - basegfx::B3DPolyPolygon aFill(basegfx::tools::createCubeFillPolyPolygonFromB3DRange(aUnitRange)); + basegfx::B3DPolyPolygon aFill(basegfx::utils::createCubeFillPolyPolygonFromB3DRange(aUnitRange)); // normal creation if(!getSdrLFSAttribute().getFill().isDefault()) @@ -49,14 +49,14 @@ namespace drawinglayer || css::drawing::NormalsKind_SPHERE == getSdr3DObjectAttribute().getNormalsKind()) { // create sphere normals - const basegfx::B3DPoint aCenter(basegfx::tools::getRange(aFill).getCenter()); - aFill = basegfx::tools::applyDefaultNormalsSphere(aFill, aCenter); + const basegfx::B3DPoint aCenter(basegfx::utils::getRange(aFill).getCenter()); + aFill = basegfx::utils::applyDefaultNormalsSphere(aFill, aCenter); } if(getSdr3DObjectAttribute().getNormalsInvert()) { // invert normals - aFill = basegfx::tools::invertNormals(aFill); + aFill = basegfx::utils::invertNormals(aFill); } } @@ -76,16 +76,16 @@ namespace drawinglayer if(bParallelX || bParallelY) { // apply parallel texture coordinates in X and/or Y - const basegfx::B3DRange aRange(basegfx::tools::getRange(aFill)); - aFill = basegfx::tools::applyDefaultTextureCoordinatesParallel(aFill, aRange, bParallelX, bParallelY); + const basegfx::B3DRange aRange(basegfx::utils::getRange(aFill)); + aFill = basegfx::utils::applyDefaultTextureCoordinatesParallel(aFill, aRange, bParallelX, bParallelY); } if(bSphereX || bSphereY) { // apply spherical texture coordinates in X and/or Y - const basegfx::B3DRange aRange(basegfx::tools::getRange(aFill)); + const basegfx::B3DRange aRange(basegfx::utils::getRange(aFill)); const basegfx::B3DPoint aCenter(aRange.getCenter()); - aFill = basegfx::tools::applyDefaultTextureCoordinatesSphere(aFill, aCenter, bSphereX, bSphereY); + aFill = basegfx::utils::applyDefaultTextureCoordinatesSphere(aFill, aCenter, bSphereX, bSphereY); } if(bObjectSpecificX || bObjectSpecificY) @@ -157,7 +157,7 @@ namespace drawinglayer // add line if(!getSdrLFSAttribute().getLine().isDefault()) { - basegfx::B3DPolyPolygon aLine(basegfx::tools::createCubePolyPolygonFromB3DRange(aUnitRange)); + basegfx::B3DPolyPolygon aLine(basegfx::utils::createCubePolyPolygonFromB3DRange(aUnitRange)); const Primitive3DContainer aLines(create3DPolyPolygonLinePrimitives( aLine, getTransform(), getSdrLFSAttribute().getLine())); aRetval.append(aLines); diff --git a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx index 8f8f80303e9d..dcea2f877543 100644 --- a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx +++ b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx @@ -51,7 +51,7 @@ namespace drawinglayer for(basegfx::B3DPolyPolygon & a : rFill) { - aRetval.expand(basegfx::tools::getRange(a)); + aRetval.expand(basegfx::utils::getRange(a)); } return aRetval; @@ -64,7 +64,7 @@ namespace drawinglayer for(basegfx::B3DPolyPolygon & a : rFill) { - a = basegfx::tools::applyDefaultNormalsSphere(a, aCenter); + a = basegfx::utils::applyDefaultNormalsSphere(a, aCenter); } } @@ -81,7 +81,7 @@ namespace drawinglayer // invert normals for(basegfx::B3DPolyPolygon & a : rFill) { - a = basegfx::tools::invertNormals(a); + a = basegfx::utils::invertNormals(a); } } @@ -105,7 +105,7 @@ namespace drawinglayer // apply parallel texture coordinates in X and/or Y for(auto & a: rFill) { - a = basegfx::tools::applyDefaultTextureCoordinatesParallel(a, rRange, bParallelX, bParallelY); + a = basegfx::utils::applyDefaultTextureCoordinatesParallel(a, rRange, bParallelX, bParallelY); } } @@ -116,7 +116,7 @@ namespace drawinglayer for(auto & a: rFill) { - a = basegfx::tools::applyDefaultTextureCoordinatesSphere(a, aCenter, bSphereX, bSphereY); + a = basegfx::utils::applyDefaultTextureCoordinatesSphere(a, aCenter, bSphereX, bSphereY); } } diff --git a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx index deac45e862c9..be8fc6d91368 100644 --- a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx +++ b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx @@ -50,7 +50,7 @@ namespace if(!basegfx::fTools::equalZero(fScale)) { - const basegfx::B2DRange aRange(basegfx::tools::getRange(rSource)); + const basegfx::B2DRange aRange(basegfx::utils::getRange(rSource)); const basegfx::B2DPoint aCenter(aRange.getCenter()); basegfx::B2DHomMatrix aTrans; @@ -78,9 +78,9 @@ namespace // grow the outside polygon and scale all polygons to original size. This is done // to avoid a shrink which potentially would lead to self-intersections, but changes // the original polygon -> not a precision step, so e.g. not usable for charts - const basegfx::B2DRange aRange(basegfx::tools::getRange(rPolygon)); - rPolygon = basegfx::tools::growInNormalDirection(rPolygon, fOffset); - const basegfx::B2DRange aGrownRange(basegfx::tools::getRange(rPolygon)); + const basegfx::B2DRange aRange(basegfx::utils::getRange(rPolygon)); + rPolygon = basegfx::utils::growInNormalDirection(rPolygon, fOffset); + const basegfx::B2DRange aGrownRange(basegfx::utils::getRange(rPolygon)); const double fScaleX(basegfx::fTools::equalZero(aGrownRange.getWidth()) ? 1.0 : aRange.getWidth() / aGrownRange.getWidth()); const double fScaleY(basegfx::fTools::equalZero(aGrownRange.getHeight())? 1.0 : aRange.getHeight() / aGrownRange.getHeight()); basegfx::B2DHomMatrix aScaleTrans; @@ -95,8 +95,8 @@ namespace { // use more precision, shrink the outer polygons. Since this may lead to self-intersections, // some kind of correction should be applied here after that step - rOuterPolyPolygon = basegfx::tools::growInNormalDirection(rPolygon, -fOffset); - // basegfx::tools::correctGrowShrinkPolygonPair(rPolygon, rOuterPolyPolygon); + rOuterPolyPolygon = basegfx::utils::growInNormalDirection(rPolygon, -fOffset); + // basegfx::utils::correctGrowShrinkPolygonPair(rPolygon, rOuterPolyPolygon); } } } @@ -128,10 +128,10 @@ namespace if(bCreateTextureCoordinates) { - const double fPolygonLengthA(basegfx::tools::getLength(aSubA)); + const double fPolygonLengthA(basegfx::utils::getLength(aSubA)); fTexHorMultiplicatorA = basegfx::fTools::equalZero(fPolygonLengthA) ? 1.0 : 1.0 / fPolygonLengthA; - const double fPolygonLengthB(basegfx::tools::getLength(aSubB)); + const double fPolygonLengthB(basegfx::utils::getLength(aSubB)); fTexHorMultiplicatorB = basegfx::fTools::equalZero(fPolygonLengthB) ? 1.0 : 1.0 / fPolygonLengthB; } @@ -330,7 +330,7 @@ namespace const basegfx::B2DPoint aNext(rPoly.getB2DPoint(nNextIndex)); const basegfx::B2DVector aEdgeVector(aNext - aCurrent); - if(basegfx::tools::findCut( + if(basegfx::utils::findCut( rStart, aVector, aCurrent, aEdgeVector) != CutFlagValue::NONE) { @@ -394,7 +394,7 @@ namespace drawinglayer if(bCloseFront || bCloseBack) { - const basegfx::B2DRange aBaseRange(basegfx::tools::getRange(aFront)); + const basegfx::B2DRange aBaseRange(basegfx::utils::getRange(aFront)); const double fOuterLength(aBaseRange.getMaxX() * fRotation); const double fInnerLength(aBaseRange.getMinX() * fRotation); const double fAverageLength((fOuterLength + fInnerLength) * 0.5); @@ -430,7 +430,7 @@ namespace drawinglayer for(sal_uInt32 a(0); a < nSteps; a++) { const double fStep((double)(a + 1) * fStepSize); - basegfx::B2DPolyPolygon aNewPoly(bBackScale ? basegfx::tools::interpolate(aFront, aBack, fStep) : aFront); + basegfx::B2DPolyPolygon aNewPoly(bBackScale ? basegfx::utils::interpolate(aFront, aBack, fStep) : aFront); basegfx::B3DHomMatrix aNewMat; aNewMat.rotate(0.0, fRotation * fStep, 0.0); rSliceVector.emplace_back(aNewPoly, aNewMat); @@ -601,8 +601,8 @@ namespace drawinglayer if(bCreateTextureCoordinates) { - aTexRangeFront = basegfx::tools::getRange(rSliceVector[0].getB3DPolyPolygon()); - aTexRangeBack = basegfx::tools::getRange(rSliceVector[nNumSlices - 1].getB3DPolyPolygon()); + aTexRangeFront = basegfx::utils::getRange(rSliceVector[0].getB3DPolyPolygon()); + aTexRangeBack = basegfx::utils::getRange(rSliceVector[nNumSlices - 1].getB3DPolyPolygon()); if(aTexRangeBack.getDepth() > aTexRangeBack.getWidth()) { @@ -614,11 +614,11 @@ namespace drawinglayer aTexRangeBack.getMaxZ(), aTexRangeBack.getMaxY(), aTexRangeBack.getMaxX()); } - basegfx::B3DPoint aCenter(basegfx::tools::getRange(rSliceVector[0].getB3DPolyPolygon()).getCenter()); + basegfx::B3DPoint aCenter(basegfx::utils::getRange(rSliceVector[0].getB3DPolyPolygon()).getCenter()); for(a = 0; a < nLoopCount; a++) { - const basegfx::B3DPoint aNextCenter(basegfx::tools::getRange(rSliceVector[(a + 1) % nNumSlices].getB3DPolyPolygon()).getCenter()); + const basegfx::B3DPoint aNextCenter(basegfx::utils::getRange(rSliceVector[(a + 1) % nNumSlices].getB3DPolyPolygon()).getCenter()); const double fLength(basegfx::B3DVector(aNextCenter - aCenter).getLength()); aTexHeightArray.push_back(fLength); aCenter = aNextCenter; @@ -663,7 +663,7 @@ namespace drawinglayer if(bCreateTextureCoordinates) { - aFront = basegfx::tools::applyDefaultTextureCoordinatesParallel(aFront, aTexRangeFront); + aFront = basegfx::utils::applyDefaultTextureCoordinatesParallel(aFront, aTexRangeFront); } if(bCreateNormals) @@ -761,7 +761,7 @@ namespace drawinglayer if(bCreateTextureCoordinates) { - aBack = basegfx::tools::applyDefaultTextureCoordinatesParallel(aBack, aTexRangeBack); + aBack = basegfx::utils::applyDefaultTextureCoordinatesParallel(aBack, aTexRangeBack); } if(bCreateNormals) @@ -865,7 +865,7 @@ namespace drawinglayer if(bCreateTextureCoordinates) { - aFront = basegfx::tools::applyDefaultTextureCoordinatesParallel(aFront, aTexRangeFront); + aFront = basegfx::utils::applyDefaultTextureCoordinatesParallel(aFront, aTexRangeFront); } if(bCreateNormals) @@ -911,8 +911,8 @@ namespace drawinglayer if(nPointCount && nPointCount == rLoopB.count()) { const basegfx::B3DHomMatrix aObjectTransform(rViewInformation.getObjectToView() * rObjectTransform); - const basegfx::B2DPolygon a2DLoopA(basegfx::tools::createB2DPolygonFromB3DPolygon(rLoopA, aObjectTransform)); - const basegfx::B2DPolygon a2DLoopB(basegfx::tools::createB2DPolygonFromB3DPolygon(rLoopB, aObjectTransform)); + const basegfx::B2DPolygon a2DLoopA(basegfx::utils::createB2DPolygonFromB3DPolygon(rLoopA, aObjectTransform)); + const basegfx::B2DPolygon a2DLoopB(basegfx::utils::createB2DPolygonFromB3DPolygon(rLoopB, aObjectTransform)); const basegfx::B2DPoint a2DCenterA(a2DLoopA.getB2DRange().getCenter()); const basegfx::B2DPoint a2DCenterB(a2DLoopB.getB2DRange().getCenter()); @@ -933,9 +933,9 @@ namespace drawinglayer const basegfx::B2DPoint aEnd(a2DLoopB.getB2DPoint(a)); const basegfx::B2DPoint aMiddle(basegfx::average(aStart, aEnd)); - if(!basegfx::tools::isInside(a2DLoopA, aMiddle)) + if(!basegfx::utils::isInside(a2DLoopA, aMiddle)) { - if(!basegfx::tools::isInside(a2DLoopB, aMiddle)) + if(!basegfx::utils::isInside(a2DLoopB, aMiddle)) { if(!impHasCutWith(a2DLoopA, aStart, aEnd)) { diff --git a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx index 06a6eb3f2050..246894d0eab1 100644 --- a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx @@ -22,7 +22,7 @@ #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b3dpolypolygontools.hxx> #include <drawinglayer/primitive3d/sdrdecompositiontools3d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx> #include <drawinglayer/geometry/viewinformation3d.hxx> #include <drawinglayer/attribute/sdrfillattribute.hxx> @@ -58,8 +58,8 @@ namespace drawinglayer if(!getSdrLFSAttribute().getFill().isDefault() && (bCreateTextureCoordinatesX || bCreateTextureCoordinatesY)) { const basegfx::B2DPolygon aFirstPolygon(maCorrectedPolyPolygon.getB2DPolygon(0)); - const double fFrontLength(basegfx::tools::getLength(aFirstPolygon)); - const double fFrontArea(basegfx::tools::getArea(aFirstPolygon)); + const double fFrontLength(basegfx::utils::getLength(aFirstPolygon)); + const double fFrontArea(basegfx::utils::getArea(aFirstPolygon)); const double fSqrtFrontArea(sqrt(fFrontArea)); double fRelativeTextureWidth = basegfx::fTools::equalZero(fSqrtFrontArea) ? 1.0 : fFrontLength / fSqrtFrontArea; fRelativeTextureWidth = (double)((sal_uInt32)(fRelativeTextureWidth - 0.5)); @@ -360,10 +360,10 @@ namespace drawinglayer // prepare the polygon. No double points, correct orientations and a correct // outmost polygon are needed // Also important: subdivide here to ensure equal point count for all slices (!) - maCorrectedPolyPolygon = basegfx::tools::adaptiveSubdivideByAngle(getPolyPolygon()); + maCorrectedPolyPolygon = basegfx::utils::adaptiveSubdivideByAngle(getPolyPolygon()); maCorrectedPolyPolygon.removeDoublePoints(); - maCorrectedPolyPolygon = basegfx::tools::correctOrientations(maCorrectedPolyPolygon); - maCorrectedPolyPolygon = basegfx::tools::correctOutmostPolygon(maCorrectedPolyPolygon); + maCorrectedPolyPolygon = basegfx::utils::correctOrientations(maCorrectedPolyPolygon); + maCorrectedPolyPolygon = basegfx::utils::correctOutmostPolygon(maCorrectedPolyPolygon); // prepare slices as geometry createExtrudeSlices(maSlices, maCorrectedPolyPolygon, getBackScale(), getDiagonal(), getDepth(), getCharacterMode(), getCloseFront(), getCloseBack()); diff --git a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx index f453d03578d9..a63a7886e4b3 100644 --- a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx @@ -22,7 +22,7 @@ #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b3dpolypolygontools.hxx> #include <drawinglayer/primitive3d/sdrdecompositiontools3d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx> #include <drawinglayer/geometry/viewinformation3d.hxx> #include <drawinglayer/attribute/sdrfillattribute.hxx> @@ -205,10 +205,10 @@ namespace drawinglayer // prepare the polygon. No double points, correct orientations and a correct // outmost polygon are needed // Also important: subdivide here to ensure equal point count for all slices (!) - maCorrectedPolyPolygon = basegfx::tools::adaptiveSubdivideByAngle(getPolyPolygon()); + maCorrectedPolyPolygon = basegfx::utils::adaptiveSubdivideByAngle(getPolyPolygon()); maCorrectedPolyPolygon.removeDoublePoints(); - maCorrectedPolyPolygon = basegfx::tools::correctOrientations(maCorrectedPolyPolygon); - maCorrectedPolyPolygon = basegfx::tools::correctOutmostPolygon(maCorrectedPolyPolygon); + maCorrectedPolyPolygon = basegfx::utils::correctOrientations(maCorrectedPolyPolygon); + maCorrectedPolyPolygon = basegfx::utils::correctOutmostPolygon(maCorrectedPolyPolygon); // check edge count of first sub-polygon. If different, reSegment polyPolygon. This ensures // that for polyPolygons, the subPolys 1..n only get reSegmented when polygon 0 is different @@ -218,7 +218,7 @@ namespace drawinglayer if(nSubEdgeCount != getVerticalSegments()) { - maCorrectedPolyPolygon = basegfx::tools::reSegmentPolyPolygon(maCorrectedPolyPolygon, getVerticalSegments()); + maCorrectedPolyPolygon = basegfx::utils::reSegmentPolyPolygon(maCorrectedPolyPolygon, getVerticalSegments()); } // prepare slices as geometry diff --git a/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx index 76c2ac5d24eb..d94ff20bfebf 100644 --- a/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx @@ -153,7 +153,7 @@ namespace drawinglayer if(getPolyPolygon3D().count()) { - aRetval = basegfx::tools::getRange(getPolyPolygon3D()); + aRetval = basegfx::utils::getRange(getPolyPolygon3D()); aRetval.transform(getTransform()); if(!getSdrLFSAttribute().getLine().isDefault()) diff --git a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx index 298b58410041..8547da5a89bf 100644 --- a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx @@ -57,7 +57,7 @@ namespace drawinglayer { for(const auto & rSlice : rSlices) { - aRetval.expand(basegfx::tools::getRange(rSlice.getB3DPolyPolygon())); + aRetval.expand(basegfx::utils::getRange(rSlice.getB3DPolyPolygon())); } aRetval.transform(getTransform()); diff --git a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx index e09476df2c19..396cf22c0e7f 100644 --- a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx @@ -22,7 +22,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/polygon/b3dpolygon.hxx> #include <drawinglayer/primitive3d/sdrdecompositiontools3d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx> #include <drawinglayer/attribute/sdrfillattribute.hxx> #include <drawinglayer/attribute/sdrlineattribute.hxx> @@ -44,7 +44,7 @@ namespace drawinglayer || css::drawing::NormalsKind_SPHERE == getSdr3DObjectAttribute().getNormalsKind()); // create unit geometry - basegfx::B3DPolyPolygon aFill(basegfx::tools::createSphereFillPolyPolygonFromB3DRange(aUnitRange, + basegfx::B3DPolyPolygon aFill(basegfx::utils::createSphereFillPolyPolygonFromB3DRange(aUnitRange, getHorizontalSegments(), getVerticalSegments(), bCreateNormals)); // normal inversion @@ -54,7 +54,7 @@ namespace drawinglayer && aFill.areNormalsUsed()) { // invert normals - aFill = basegfx::tools::invertNormals(aFill); + aFill = basegfx::utils::invertNormals(aFill); } // texture coordinates @@ -73,8 +73,8 @@ namespace drawinglayer if(bParallelX || bParallelY) { // apply parallel texture coordinates in X and/or Y - const basegfx::B3DRange aRange(basegfx::tools::getRange(aFill)); - aFill = basegfx::tools::applyDefaultTextureCoordinatesParallel(aFill, aRange, bParallelX, bParallelY); + const basegfx::B3DRange aRange(basegfx::utils::getRange(aFill)); + aFill = basegfx::utils::applyDefaultTextureCoordinatesParallel(aFill, aRange, bParallelX, bParallelY); } if(bSphereX || bObjectSpecificX || bSphereY || bObjectSpecificY) @@ -94,9 +94,9 @@ namespace drawinglayer } // apply spherical texture coordinates in X and/or Y - const basegfx::B3DRange aRange(basegfx::tools::getRange(aFill)); + const basegfx::B3DRange aRange(basegfx::utils::getRange(aFill)); const basegfx::B3DPoint aCenter(aRange.getCenter()); - aFill = basegfx::tools::applyDefaultTextureCoordinatesSphere(aFill, aCenter, + aFill = basegfx::utils::applyDefaultTextureCoordinatesSphere(aFill, aCenter, bSphereX || bObjectSpecificX, bSphereY || bObjectSpecificY); if(bObjectSpecificX) @@ -146,7 +146,7 @@ namespace drawinglayer // add line if(!getSdrLFSAttribute().getLine().isDefault()) { - basegfx::B3DPolyPolygon aSphere(basegfx::tools::createSpherePolyPolygonFromB3DRange(aUnitRange, getHorizontalSegments(), getVerticalSegments())); + basegfx::B3DPolyPolygon aSphere(basegfx::utils::createSpherePolyPolygonFromB3DRange(aUnitRange, getHorizontalSegments(), getVerticalSegments())); const Primitive3DContainer aLines(create3DPolyPolygonLinePrimitives( aSphere, getTransform(), getSdrLFSAttribute().getLine())); aRetval.append(aLines); diff --git a/drawinglayer/source/primitive3d/transformprimitive3d.cxx b/drawinglayer/source/primitive3d/transformprimitive3d.cxx index 7af03029fc43..0090d0ec08fa 100644 --- a/drawinglayer/source/primitive3d/transformprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/transformprimitive3d.cxx @@ -18,7 +18,7 @@ */ #include <drawinglayer/primitive3d/transformprimitive3d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx> diff --git a/drawinglayer/source/processor2d/contourextractor2d.cxx b/drawinglayer/source/processor2d/contourextractor2d.cxx index 5015544f4c18..7e730bd2293e 100644 --- a/drawinglayer/source/processor2d/contourextractor2d.cxx +++ b/drawinglayer/source/processor2d/contourextractor2d.cxx @@ -67,7 +67,7 @@ namespace drawinglayer { // line polygons need to be represented as open polygons to differentiate them // from filled polygons - basegfx::tools::openWithGeometryChange(aLocalPolygon); + basegfx::utils::openWithGeometryChange(aLocalPolygon); } maExtractedContour.emplace_back(aLocalPolygon); @@ -88,7 +88,7 @@ namespace drawinglayer // extract BoundRect from bitmaps in world coordinates const primitive2d::BitmapPrimitive2D& rBitmapCandidate(static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate)); basegfx::B2DHomMatrix aLocalTransform(getViewInformation2D().getObjectTransformation() * rBitmapCandidate.getTransform()); - basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aPolygon(basegfx::utils::createUnitPolygon()); aPolygon.transform(aLocalTransform); maExtractedContour.emplace_back(aPolygon); break; @@ -98,7 +98,7 @@ namespace drawinglayer // extract BoundRect from MetaFiles in world coordinates const primitive2d::MetafilePrimitive2D& rMetaCandidate(static_cast< const primitive2d::MetafilePrimitive2D& >(rCandidate)); basegfx::B2DHomMatrix aLocalTransform(getViewInformation2D().getObjectTransformation() * rMetaCandidate.getTransform()); - basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aPolygon(basegfx::utils::createUnitPolygon()); aPolygon.transform(aLocalTransform); maExtractedContour.emplace_back(aPolygon); break; @@ -177,7 +177,7 @@ namespace drawinglayer // primitives who's BoundRect will be added in world coordinates basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); aRange.transform(getViewInformation2D().getObjectTransformation()); - maExtractedContour.emplace_back(basegfx::tools::createPolygonFromRect(aRange)); + maExtractedContour.emplace_back(basegfx::utils::createPolygonFromRect(aRange)); break; } default : diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index cae95d7e6a51..ef512060cf06 100644 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx @@ -92,7 +92,7 @@ namespace drawinglayer if(aPolygonRange.isInside(getDiscreteHitPosition())) { // check if a polygon edge is hit - return basegfx::tools::isInEpsilonRange( + return basegfx::utils::isInEpsilonRange( aLocalPolygon, getDiscreteHitPosition(), fDiscreteHitTolerance); @@ -123,7 +123,7 @@ namespace drawinglayer { // if a HitTolerance is given, check for polygon edge hit in epsilon first if(bDiscreteHitToleranceUsed && - basegfx::tools::isInEpsilonRange( + basegfx::utils::isInEpsilonRange( aLocalPolyPolygon, getDiscreteHitPosition(), fDiscreteHitTolerance)) @@ -132,7 +132,7 @@ namespace drawinglayer } // check for hit in filled polyPolygon - if(!bRetval && basegfx::tools::isInside( + if(!bRetval && basegfx::utils::isInside( aLocalPolyPolygon, getDiscreteHitPosition(), true)) @@ -209,7 +209,7 @@ namespace drawinglayer if(!getHit()) { // empty 3D scene; Check for border hit - basegfx::B2DPolygon aOutline(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aOutline(basegfx::utils::createUnitPolygon()); aOutline.transform(rCandidate.getObjectTransformation()); mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); @@ -416,7 +416,7 @@ namespace drawinglayer if(!aRange.isEmpty()) { - const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aRange)); mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance()); } @@ -459,7 +459,7 @@ namespace drawinglayer else { // fallback to standard HitTest - const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aRange)); mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance()); } } @@ -486,7 +486,7 @@ namespace drawinglayer if(!aRange.isEmpty()) { - const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aRange)); mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance()); } } diff --git a/drawinglayer/source/processor2d/processorfromoutputdevice.cxx b/drawinglayer/source/processor2d/processorfromoutputdevice.cxx index fe962c2b980a..16bd3b6404f4 100644 --- a/drawinglayer/source/processor2d/processorfromoutputdevice.cxx +++ b/drawinglayer/source/processor2d/processorfromoutputdevice.cxx @@ -21,7 +21,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/range/b2drange.hxx> #include <vcl/gdimtf.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/processor2d/processorfromoutputdevice.hxx> #include "vclmetafileprocessor2d.hxx" #include "vclpixelprocessor2d.hxx" diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 8ad128a53355..6f6deef4bfb5 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -153,14 +153,14 @@ namespace { // clip in left and right const basegfx::B2DPolyPolygon aLeft( - basegfx::tools::clipPolygonOnParallelAxis( + basegfx::utils::clipPolygonOnParallelAxis( aCandidate, false, true, aCenter.getX(), false)); const basegfx::B2DPolyPolygon aRight( - basegfx::tools::clipPolygonOnParallelAxis( + basegfx::utils::clipPolygonOnParallelAxis( aCandidate, false, false, @@ -174,14 +174,14 @@ namespace { // clip in top and bottom const basegfx::B2DPolyPolygon aTop( - basegfx::tools::clipPolygonOnParallelAxis( + basegfx::utils::clipPolygonOnParallelAxis( aCandidate, true, true, aCenter.getY(), false)); const basegfx::B2DPolyPolygon aBottom( - basegfx::tools::clipPolygonOnParallelAxis( + basegfx::utils::clipPolygonOnParallelAxis( aCandidate, true, false, @@ -414,9 +414,9 @@ namespace drawinglayer if(pStart && pStart->isActive()) { - fPolyLength = basegfx::tools::getLength(aLocalPolygon); + fPolyLength = basegfx::utils::getLength(aLocalPolygon); - aStartArrow = basegfx::tools::createAreaGeometryForLineStartEnd( + aStartArrow = basegfx::utils::createAreaGeometryForLineStartEnd( aLocalPolygon, pStart->getB2DPolyPolygon(), true, pStart->getWidth(), fPolyLength, pStart->isCentered() ? 0.5 : 0.0, &fStart); } @@ -425,10 +425,10 @@ namespace drawinglayer { if(basegfx::fTools::equalZero(fPolyLength)) { - fPolyLength = basegfx::tools::getLength(aLocalPolygon); + fPolyLength = basegfx::utils::getLength(aLocalPolygon); } - aEndArrow = basegfx::tools::createAreaGeometryForLineStartEnd( + aEndArrow = basegfx::utils::createAreaGeometryForLineStartEnd( aLocalPolygon, pEnd->getB2DPolyPolygon(), false, pEnd->getWidth(), fPolyLength, pEnd->isCentered() ? 0.5 : 0.0, &fEnd); } @@ -436,7 +436,7 @@ namespace drawinglayer if(0.0 != fStart || 0.0 != fEnd) { // build new poly, consume something from old poly - aLocalPolygon = basegfx::tools::getSnippetAbsolute(aLocalPolygon, fStart, fPolyLength - fEnd, fPolyLength); + aLocalPolygon = basegfx::utils::getSnippetAbsolute(aLocalPolygon, fStart, fPolyLength - fEnd, fPolyLength); } } @@ -1247,7 +1247,7 @@ namespace drawinglayer } else { - basegfx::tools::applyLineDashing( + basegfx::utils::applyLineDashing( rBasePolygon, rStroke.getDotDashArray(), &aHairLinePolyPolygon, nullptr, rStroke.getFullDotDashLen()); } @@ -1532,7 +1532,7 @@ namespace drawinglayer // #i111954# do NOT use decomposition, but use direct VCL-command // process(rCandidate.get2DDecomposition(getViewInformation2D())); - const ::tools::PolyPolygon aToolsPolyPolygon(basegfx::tools::adaptiveSubdivideByAngle(aLocalPolyPolygon)); + const ::tools::PolyPolygon aToolsPolyPolygon(basegfx::utils::adaptiveSubdivideByAngle(aLocalPolyPolygon)); const HatchStyle aHatchStyle( attribute::HatchStyle::Single == rFillHatchAttribute.getStyle() ? HatchStyle::Single : attribute::HatchStyle::Double == rFillHatchAttribute.getStyle() ? HatchStyle::Double : @@ -1608,7 +1608,7 @@ namespace drawinglayer // me when that task is fixed in the master const ::tools::PolyPolygon aToolsPolyPolygon( getFillPolyPolygon( - basegfx::tools::adaptiveSubdivideByAngle(aLocalPolyPolygon))); + basegfx::utils::adaptiveSubdivideByAngle(aLocalPolyPolygon))); // XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END support @@ -1739,7 +1739,7 @@ namespace drawinglayer { // there is already a clip polygon set; build clipped union of // current mask polygon and new one - maClipPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon( + maClipPolyPolygon = basegfx::utils::clipPolyPolygonOnPolyPolygon( aMask, maClipPolyPolygon, true, // #i106516# we want the inside of aMask, not the outside diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 5830a14c593c..d638fabfccc4 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -156,7 +156,7 @@ namespace drawinglayer basegfx::B2DPoint aTopRight(aRange.getMaxX() - fXOnePixel, aRange.getMinY()); basegfx::B2DPoint aBottomLeft(aRange.getMinX(), aRange.getMaxY() - fYOnePixel); basegfx::B2DPoint aBottomRight(aRange.getMaxX() - fXOnePixel, aRange.getMaxY() - fYOnePixel); - aLocalPolygon = basegfx::tools::distort(aLocalPolygon, aRange, aTopLeft, aTopRight, aBottomLeft, aBottomRight); + aLocalPolygon = basegfx::utils::distort(aLocalPolygon, aRange, aTopLeft, aTopRight, aBottomLeft, aBottomRight); } const basegfx::BColor aLineColor(maBColorModifierStack.getModifiedColor(rSource.getBColor())); @@ -182,7 +182,7 @@ namespace drawinglayer basegfx::B2DPolyPolygon aHairLinePolyPolygon; // simplify curve segments - aLocalPolygon = basegfx::tools::simplifyCurveSegments(aLocalPolygon); + aLocalPolygon = basegfx::utils::simplifyCurveSegments(aLocalPolygon); if(rSource.getStrokeAttribute().isDefault() || 0.0 == rSource.getStrokeAttribute().getFullDotDashLen()) { @@ -192,7 +192,7 @@ namespace drawinglayer else { // apply LineStyle - basegfx::tools::applyLineDashing( + basegfx::utils::applyLineDashing( aLocalPolygon, rSource.getStrokeAttribute().getDotDashArray(), &aHairLinePolyPolygon, @@ -745,7 +745,7 @@ namespace drawinglayer // create hatch polygon in range size and discrete coordinates basegfx::B2DRange aHatchRange(rFillHatchPrimitive.getOutputRange()); aHatchRange.transform(maCurrentTransformation); - const basegfx::B2DPolygon aHatchPolygon(basegfx::tools::createPolygonFromRect(aHatchRange)); + const basegfx::B2DPolygon aHatchPolygon(basegfx::utils::createPolygonFromRect(aHatchRange)); if(rFillHatchAttributes.isFillBackground()) { diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 97ef1f979f9b..da7e8e1056dd 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -335,7 +335,7 @@ namespace drawinglayer // allows to suppress AntiAliasing for pure horizontal or vertical lines. This is done since // not-AntiAliased such lines look more pleasing to the eye (e.g. 2D chart content). This // NEEDS to be done in discrete coordinates, so only useful for pixel based rendering. - aLocalPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aLocalPolygon); + aLocalPolygon = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(aLocalPolygon); } mpOutputDevice->DrawPolyLine(aLocalPolygon, 0.0); @@ -355,7 +355,7 @@ namespace drawinglayer { // color gets completely replaced, get it const basegfx::BColor aModifiedColor(maBColorModifierStack.getModifiedColor(basegfx::BColor())); - basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aPolygon(basegfx::utils::createUnitPolygon()); aPolygon.transform(aLocalTransform); mpOutputDevice->SetFillColor(Color(aModifiedColor)); @@ -464,7 +464,7 @@ namespace drawinglayer { // color gets completely replaced, get it const basegfx::BColor aModifiedColor(maBColorModifierStack.getModifiedColor(basegfx::BColor())); - basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aPolygon(basegfx::utils::createUnitPolygon()); aPolygon.transform(aLocalTransform); mpOutputDevice->SetFillColor(Color(aModifiedColor)); @@ -655,7 +655,7 @@ namespace drawinglayer basegfx::B2DRange aTileRange(rFillGraphicAttribute.getGraphicRange()); const basegfx::B2DRange aPolyPolygonRange(rPolyPolygon.getB2DRange()); const basegfx::B2DHomMatrix aNewObjectTransform( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( aPolyPolygonRange.getRange(), aPolyPolygonRange.getMinimum())); @@ -663,7 +663,7 @@ namespace drawinglayer // now clip the object polyPolygon against the tile range // to get the common area - basegfx::B2DPolyPolygon aTarget = basegfx::tools::clipPolyPolygonOnRange( + basegfx::B2DPolyPolygon aTarget = basegfx::utils::clipPolyPolygonOnRange( rPolyPolygon, aTileRange, true, @@ -711,7 +711,7 @@ namespace drawinglayer if(aMask.count()) { aMask.transform(maCurrentTransformation); - const basegfx::B2DRange aRange(basegfx::tools::getRange(aMask)); + const basegfx::B2DRange aRange(basegfx::utils::getRange(aMask)); impBufferDevice aBufferDevice(*mpOutputDevice, aRange); if(aBufferDevice.isVisible()) @@ -977,7 +977,7 @@ namespace drawinglayer else { // else apply LineStyle - basegfx::tools::applyLineDashing(rPolygonStrokeCandidate.getB2DPolygon(), + basegfx::utils::applyLineDashing(rPolygonStrokeCandidate.getB2DPolygon(), rStrokeAttribute.getDotDashArray(), &aHairlinePolyPolygon, nullptr, rStrokeAttribute.getFullDotDashLen()); } @@ -1222,7 +1222,7 @@ namespace drawinglayer // prepare polygon in needed width at start position (with discrete overlap) const basegfx::B2DPolygon aPolygon( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRange( rCandidate.getOffsetA() - fDiscreteUnit, 0.0, @@ -1239,7 +1239,7 @@ namespace drawinglayer { basegfx::B2DPolygon aNew(aPolygon); - aNew.transform(maCurrentTransformation * basegfx::tools::createTranslateB2DHomMatrix(fDelta * fUnitScale, 0.0)); + aNew.transform(maCurrentTransformation * basegfx::utils::createTranslateB2DHomMatrix(fDelta * fUnitScale, 0.0)); mpOutputDevice->SetFillColor(Color(basegfx::interpolate(aColorA, aColorB, fUnitScale))); mpOutputDevice->DrawPolyPolygon(basegfx::B2DPolyPolygon(aNew)); } @@ -1282,7 +1282,7 @@ namespace drawinglayer rCandidate.getTranslateA(), fUnitScale)); - aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix( + aTransform = basegfx::utils::createScaleTranslateB2DHomMatrix( fEndScale, fEndScale, aTranslate.getX(), @@ -1290,12 +1290,12 @@ namespace drawinglayer } else { - aTransform = basegfx::tools::createScaleB2DHomMatrix( + aTransform = basegfx::utils::createScaleB2DHomMatrix( fEndScale, fEndScale); } - basegfx::B2DPolygon aNew(basegfx::tools::createPolygonFromUnitCircle()); + basegfx::B2DPolygon aNew(basegfx::utils::createPolygonFromUnitCircle()); aNew.transform(maCurrentTransformation * aTransform); mpOutputDevice->SetFillColor(Color(basegfx::interpolate(aColorB, aColorA, fUnitScale))); diff --git a/drawinglayer/source/processor3d/cutfindprocessor3d.cxx b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx index 00b9a9a43c0f..04a37a73c2ad 100644 --- a/drawinglayer/source/processor3d/cutfindprocessor3d.cxx +++ b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx @@ -163,11 +163,11 @@ namespace drawinglayer const basegfx::B3DPoint aPointOnPlane(aPolygon.getB3DPoint(0)); double fCut(0.0); - if(basegfx::tools::getCutBetweenLineAndPlane(aPlaneNormal, aPointOnPlane, maFront, maBack, fCut)) + if(basegfx::utils::getCutBetweenLineAndPlane(aPlaneNormal, aPointOnPlane, maFront, maBack, fCut)) { const basegfx::B3DPoint aCutPoint(basegfx::interpolate(maFront, maBack, fCut)); - if(basegfx::tools::isInside(rPolyPolygon, aCutPoint)) + if(basegfx::utils::isInside(rPolyPolygon, aCutPoint)) { // #i102956# add result. Do not forget to do this in the coordinate // system the processor get started with, so use the collected diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index bd584eae9a93..a055a3e71aef 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -270,7 +270,7 @@ namespace drawinglayer basegfx::B2DRange aGraphicRange(rFillGraphicAttribute.getGraphicRange()); aGraphicRange.transform( - basegfx::tools::createScaleB2DHomMatrix( + basegfx::utils::createScaleB2DHomMatrix( rPrimitive.getTextureSize())); if(rFillGraphicAttribute.getTiling()) @@ -330,7 +330,7 @@ namespace drawinglayer // transform to device coordinates (-1.0 .. 1.0) and check for visibility aHairline.transform(getViewInformation3D().getObjectToView()); - const basegfx::B3DRange a3DRange(basegfx::tools::getRange(aHairline)); + const basegfx::B3DRange a3DRange(basegfx::utils::getRange(aHairline)); const basegfx::B2DRange a2DRange(a3DRange.getMinX(), a3DRange.getMinY(), a3DRange.getMaxX(), a3DRange.getMaxY()); if(a2DRange.overlaps(maRasterRange)) @@ -370,7 +370,7 @@ namespace drawinglayer // transform to device coordinates (-1.0 .. 1.0) and check for visibility aFill.transform(getViewInformation3D().getObjectToView()); - const basegfx::B3DRange a3DRange(basegfx::tools::getRange(aFill)); + const basegfx::B3DRange a3DRange(basegfx::utils::getRange(aFill)); const basegfx::B2DRange a2DRange(a3DRange.getMinX(), a3DRange.getMinY(), a3DRange.getMaxX(), a3DRange.getMaxY()); bPaintIt = a2DRange.overlaps(maRasterRange); diff --git a/drawinglayer/source/processor3d/geometry2dextractor.cxx b/drawinglayer/source/processor3d/geometry2dextractor.cxx index 5279e7fa560a..d935546c1118 100644 --- a/drawinglayer/source/processor3d/geometry2dextractor.cxx +++ b/drawinglayer/source/processor3d/geometry2dextractor.cxx @@ -85,7 +85,7 @@ namespace drawinglayer { // PolygonHairlinePrimitive3D const primitive3d::PolygonHairlinePrimitive3D& rPrimitive = static_cast< const primitive3d::PolygonHairlinePrimitive3D& >(rCandidate); - basegfx::B2DPolygon a2DHairline(basegfx::tools::createB2DPolygonFromB3DPolygon(rPrimitive.getB3DPolygon(), getViewInformation3D().getObjectToView())); + basegfx::B2DPolygon a2DHairline(basegfx::utils::createB2DPolygonFromB3DPolygon(rPrimitive.getB3DPolygon(), getViewInformation3D().getObjectToView())); if(a2DHairline.count()) { @@ -100,7 +100,7 @@ namespace drawinglayer { // PolyPolygonMaterialPrimitive3D const primitive3d::PolyPolygonMaterialPrimitive3D& rPrimitive = static_cast< const primitive3d::PolyPolygonMaterialPrimitive3D& >(rCandidate); - basegfx::B2DPolyPolygon a2DFill(basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon(rPrimitive.getB3DPolyPolygon(), getViewInformation3D().getObjectToView())); + basegfx::B2DPolyPolygon a2DFill(basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon(rPrimitive.getB3DPolyPolygon(), getViewInformation3D().getObjectToView())); if(a2DFill.count()) { diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx index 0544406ed59b..35032588c766 100644 --- a/drawinglayer/source/processor3d/shadow3dextractor.cxx +++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx @@ -147,7 +147,7 @@ namespace drawinglayer } else { - a2DHairline = basegfx::tools::createB2DPolygonFromB3DPolygon(rPrimitive.getB3DPolygon(), getViewInformation3D().getObjectToView()); + a2DHairline = basegfx::utils::createB2DPolygonFromB3DPolygon(rPrimitive.getB3DPolygon(), getViewInformation3D().getObjectToView()); } if(a2DHairline.count()) @@ -178,7 +178,7 @@ namespace drawinglayer } else { - a2DFill = basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon(rPrimitive.getB3DPolyPolygon(), getViewInformation3D().getObjectToView()); + a2DFill = basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon(rPrimitive.getB3DPolyPolygon(), getViewInformation3D().getObjectToView()); } if(a2DFill.count()) diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx index 0d9354cf303c..8f08a70d8dbe 100644 --- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx +++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx @@ -395,7 +395,7 @@ public: mpTransparenceGeoTexSvx(pTransparenceGeoTexSvx), maMaterial(rMaterial), maPolyPolygon(rPolyPolygon), - mfCenterZ(basegfx::tools::getRange(rPolyPolygon).getCenter().getZ()), + mfCenterZ(basegfx::utils::getRange(rPolyPolygon).getCenter().getZ()), mbModulate(bModulate), mbFilter(bFilter), mbSimpleTextureActive(bSimpleTextureActive), @@ -464,7 +464,7 @@ namespace drawinglayer aSnappedHairline.transform(aTransform); // snap to integer - aSnappedHairline = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aSnappedHairline); + aSnappedHairline = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(aSnappedHairline); // add oversampling again aTransform.identity(); diff --git a/drawinglayer/source/texture/texture.cxx b/drawinglayer/source/texture/texture.cxx index 3ec49e8440a5..aef02b5424aa 100644 --- a/drawinglayer/source/texture/texture.cxx +++ b/drawinglayer/source/texture/texture.cxx @@ -19,7 +19,7 @@ #include <drawinglayer/texture/texture.hxx> #include <basegfx/numeric/ftools.hxx> -#include <basegfx/tools/gradienttools.hxx> +#include <basegfx/utils/gradienttools.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include "converters.hxx" @@ -113,7 +113,7 @@ namespace drawinglayer mfUnitWidth(1.0), mfUnitMaxY(1.0) { - maGradientInfo = basegfx::tools::createLinearODFGradientInfo( + maGradientInfo = basegfx::utils::createLinearODFGradientInfo( rDefinitionRange, nSteps, fBorder, @@ -183,7 +183,7 @@ namespace drawinglayer void GeoTexSvxGradientLinear::modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& /*rfOpacity*/) const { - const double fScaler(basegfx::tools::getLinearGradientAlpha(rUV, maGradientInfo)); + const double fScaler(basegfx::utils::getLinearGradientAlpha(rUV, maGradientInfo)); rBColor = basegfx::interpolate(maStart, maEnd, fScaler); } @@ -207,7 +207,7 @@ namespace drawinglayer mfUnitMinX(0.0), mfUnitWidth(1.0) { - maGradientInfo = basegfx::tools::createAxialODFGradientInfo( + maGradientInfo = basegfx::utils::createAxialODFGradientInfo( rDefinitionRange, nSteps, fBorder, @@ -267,7 +267,7 @@ namespace drawinglayer void GeoTexSvxGradientAxial::modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& /*rfOpacity*/) const { - const double fScaler(basegfx::tools::getAxialGradientAlpha(rUV, maGradientInfo)); + const double fScaler(basegfx::utils::getAxialGradientAlpha(rUV, maGradientInfo)); rBColor = basegfx::interpolate(maStart, maEnd, fScaler); } @@ -289,7 +289,7 @@ namespace drawinglayer double fOffsetY) : GeoTexSvxGradient(rDefinitionRange, rStart, rEnd, fBorder) { - maGradientInfo = basegfx::tools::createRadialODFGradientInfo( + maGradientInfo = basegfx::utils::createRadialODFGradientInfo( rDefinitionRange, basegfx::B2DVector(fOffsetX,fOffsetY), nSteps, @@ -314,7 +314,7 @@ namespace drawinglayer for(sal_uInt32 a(1); a < maGradientInfo.getSteps(); a++) { const double fSize(1.0 - (fStepSize * a)); - aB2DHomMatrixAndBColor.maB2DHomMatrix = maGradientInfo.getTextureTransform() * basegfx::tools::createScaleB2DHomMatrix(fSize, fSize); + aB2DHomMatrixAndBColor.maB2DHomMatrix = maGradientInfo.getTextureTransform() * basegfx::utils::createScaleB2DHomMatrix(fSize, fSize); aB2DHomMatrixAndBColor.maBColor = interpolate(maStart, maEnd, double(a) / double(maGradientInfo.getSteps() - 1)); rEntries.push_back(aB2DHomMatrixAndBColor); } @@ -323,7 +323,7 @@ namespace drawinglayer void GeoTexSvxGradientRadial::modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& /*rfOpacity*/) const { - const double fScaler(basegfx::tools::getRadialGradientAlpha(rUV, maGradientInfo)); + const double fScaler(basegfx::utils::getRadialGradientAlpha(rUV, maGradientInfo)); rBColor = basegfx::interpolate(maStart, maEnd, fScaler); } @@ -346,7 +346,7 @@ namespace drawinglayer double fAngle) : GeoTexSvxGradient(rDefinitionRange, rStart, rEnd, fBorder) { - maGradientInfo = basegfx::tools::createEllipticalODFGradientInfo( + maGradientInfo = basegfx::utils::createEllipticalODFGradientInfo( rDefinitionRange, basegfx::B2DVector(fOffsetX,fOffsetY), nSteps, @@ -390,7 +390,7 @@ namespace drawinglayer fWidth -= fIncrementX; fHeight -= fIncrementY; - aB2DHomMatrixAndBColor.maB2DHomMatrix = maGradientInfo.getTextureTransform() * basegfx::tools::createScaleB2DHomMatrix(fWidth, fHeight); + aB2DHomMatrixAndBColor.maB2DHomMatrix = maGradientInfo.getTextureTransform() * basegfx::utils::createScaleB2DHomMatrix(fWidth, fHeight); aB2DHomMatrixAndBColor.maBColor = interpolate(maStart, maEnd, double(a) / double(maGradientInfo.getSteps() - 1)); rEntries.push_back(aB2DHomMatrixAndBColor); } @@ -399,7 +399,7 @@ namespace drawinglayer void GeoTexSvxGradientElliptical::modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& /*rfOpacity*/) const { - const double fScaler(basegfx::tools::getEllipticalGradientAlpha(rUV, maGradientInfo)); + const double fScaler(basegfx::utils::getEllipticalGradientAlpha(rUV, maGradientInfo)); rBColor = basegfx::interpolate(maStart, maEnd, fScaler); } @@ -422,7 +422,7 @@ namespace drawinglayer double fAngle) : GeoTexSvxGradient(rDefinitionRange, rStart, rEnd, fBorder) { - maGradientInfo = basegfx::tools::createSquareODFGradientInfo( + maGradientInfo = basegfx::utils::createSquareODFGradientInfo( rDefinitionRange, basegfx::B2DVector(fOffsetX,fOffsetY), nSteps, @@ -448,7 +448,7 @@ namespace drawinglayer for(sal_uInt32 a(1); a < maGradientInfo.getSteps(); a++) { const double fSize(1.0 - (fStepSize * a)); - aB2DHomMatrixAndBColor.maB2DHomMatrix = maGradientInfo.getTextureTransform() * basegfx::tools::createScaleB2DHomMatrix(fSize, fSize); + aB2DHomMatrixAndBColor.maB2DHomMatrix = maGradientInfo.getTextureTransform() * basegfx::utils::createScaleB2DHomMatrix(fSize, fSize); aB2DHomMatrixAndBColor.maBColor = interpolate(maStart, maEnd, double(a) / double(maGradientInfo.getSteps() - 1)); rEntries.push_back(aB2DHomMatrixAndBColor); } @@ -457,7 +457,7 @@ namespace drawinglayer void GeoTexSvxGradientSquare::modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& /*rfOpacity*/) const { - const double fScaler(basegfx::tools::getSquareGradientAlpha(rUV, maGradientInfo)); + const double fScaler(basegfx::utils::getSquareGradientAlpha(rUV, maGradientInfo)); rBColor = basegfx::interpolate(maStart, maEnd, fScaler); } @@ -480,7 +480,7 @@ namespace drawinglayer double fAngle) : GeoTexSvxGradient(rDefinitionRange, rStart, rEnd, fBorder) { - maGradientInfo = basegfx::tools::createRectangularODFGradientInfo( + maGradientInfo = basegfx::utils::createRectangularODFGradientInfo( rDefinitionRange, basegfx::B2DVector(fOffsetX,fOffsetY), nSteps, @@ -524,7 +524,7 @@ namespace drawinglayer fWidth -= fIncrementX; fHeight -= fIncrementY; - aB2DHomMatrixAndBColor.maB2DHomMatrix = maGradientInfo.getTextureTransform() * basegfx::tools::createScaleB2DHomMatrix(fWidth, fHeight); + aB2DHomMatrixAndBColor.maB2DHomMatrix = maGradientInfo.getTextureTransform() * basegfx::utils::createScaleB2DHomMatrix(fWidth, fHeight); aB2DHomMatrixAndBColor.maBColor = interpolate(maStart, maEnd, double(a) / double(maGradientInfo.getSteps() - 1)); rEntries.push_back(aB2DHomMatrixAndBColor); } @@ -533,7 +533,7 @@ namespace drawinglayer void GeoTexSvxGradientRect::modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& /*rfOpacity*/) const { - const double fScaler(basegfx::tools::getRectangularGradientAlpha(rUV, maGradientInfo)); + const double fScaler(basegfx::utils::getRectangularGradientAlpha(rUV, maGradientInfo)); rBColor = basegfx::interpolate(maStart, maEnd, fScaler); } @@ -587,7 +587,7 @@ namespace drawinglayer basegfx::B2DPoint aCenter(0.5, 0.5); aCenter *= maTextureTransform; - maTextureTransform = basegfx::tools::createRotateAroundPoint(aCenter, fAngle) + maTextureTransform = basegfx::utils::createRotateAroundPoint(aCenter, fAngle) * maTextureTransform; } @@ -788,7 +788,7 @@ namespace drawinglayer if(pMatrices) { pMatrices->push_back( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( fWidth, fHeight, fPosX, @@ -811,7 +811,7 @@ namespace drawinglayer if(pMatrices) { pMatrices->push_back( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( fWidth, fHeight, fPosX, diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx index 0f9e0cec26c0..0ffd10a44ffc 100644 --- a/drawinglayer/source/tools/converters.cxx +++ b/drawinglayer/source/tools/converters.cxx @@ -62,7 +62,7 @@ namespace drawinglayer const drawinglayer::primitive2d::Primitive2DReference aEmbed( new drawinglayer::primitive2d::TransformPrimitive2D( - basegfx::tools::createScaleB2DHomMatrix(fReduceFactor, fReduceFactor), + basegfx::utils::createScaleB2DHomMatrix(fReduceFactor, fReduceFactor), rSeq)); aSequence = drawinglayer::primitive2d::Primitive2DContainer { aEmbed }; diff --git a/drawinglayer/source/tools/emfpbrush.cxx b/drawinglayer/source/tools/emfpbrush.cxx index 19b1441ddb1d..28300f767bd3 100644 --- a/drawinglayer/source/tools/emfpbrush.cxx +++ b/drawinglayer/source/tools/emfpbrush.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> @@ -185,7 +185,7 @@ namespace emfplushelper s.Seek(pos + pathLength); - const ::basegfx::B2DRectangle aBounds(::basegfx::tools::getRange(path->GetPolygon(rR, false))); + const ::basegfx::B2DRectangle aBounds(::basegfx::utils::getRange(path->GetPolygon(rR, false))); areaWidth = aBounds.getWidth(); areaHeight = aBounds.getHeight(); SAL_INFO("cppcanvas.emf", "EMF+\t polygon bounding box: " << aBounds.getMinX() << "," << aBounds.getMinY() << " " << aBounds.getWidth() << "x" << aBounds.getHeight()); @@ -202,7 +202,7 @@ namespace emfplushelper s.Seek(pos + 8 * boundaryPointCount); - const ::basegfx::B2DRectangle aBounds(::basegfx::tools::getRange(path->GetPolygon(rR, false))); + const ::basegfx::B2DRectangle aBounds(::basegfx::utils::getRange(path->GetPolygon(rR, false))); areaWidth = aBounds.getWidth(); areaHeight = aBounds.getHeight(); SAL_INFO("cppcanvas.emf", "EMF+\t polygon bounding box: " << aBounds.getMinX() << "," << aBounds.getMinY() << " " << aBounds.getWidth() << "x" << aBounds.getHeight()); diff --git a/drawinglayer/source/tools/emfpcustomlinecap.cxx b/drawinglayer/source/tools/emfpcustomlinecap.cxx index d2d211d62d3e..ee366bcb4aa6 100644 --- a/drawinglayer/source/tools/emfpcustomlinecap.cxx +++ b/drawinglayer/source/tools/emfpcustomlinecap.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> diff --git a/drawinglayer/source/tools/emfpfont.cxx b/drawinglayer/source/tools/emfpfont.cxx index 754e59e94319..62119d7f7cbe 100644 --- a/drawinglayer/source/tools/emfpfont.cxx +++ b/drawinglayer/source/tools/emfpfont.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx index 3208ed82ed32..e95b243f7a0d 100644 --- a/drawinglayer/source/tools/emfphelperdata.cxx +++ b/drawinglayer/source/tools/emfphelperdata.cxx @@ -314,9 +314,9 @@ namespace emfplushelper // To evtl. correct and see where this came from, please compare with the implementations // of EmfPlusHelperData::MapToDevice and EmfPlusHelperData::Map* in prev versions maMapTransform = maWorldTransform; - maMapTransform *= basegfx::tools::createScaleB2DHomMatrix(100.0 * mnMmX / mnPixX, 100.0 * mnMmY / mnPixY); - maMapTransform *= basegfx::tools::createTranslateB2DHomMatrix(double(-mnFrameLeft), double(-mnFrameTop)); - maMapTransform *= basegfx::tools::createScaleB2DHomMatrix(maBaseTransform.get(0, 0), maBaseTransform.get(1, 1)); + maMapTransform *= basegfx::utils::createScaleB2DHomMatrix(100.0 * mnMmX / mnPixX, 100.0 * mnMmY / mnPixY); + maMapTransform *= basegfx::utils::createTranslateB2DHomMatrix(double(-mnFrameLeft), double(-mnFrameTop)); + maMapTransform *= basegfx::utils::createScaleB2DHomMatrix(maBaseTransform.get(0, 0), maBaseTransform.get(1, 1)); } ::basegfx::B2DPoint EmfPlusHelperData::Map(double ix, double iy) @@ -650,7 +650,7 @@ namespace emfplushelper // get the polygon range to be able to map the start/end/center point correctly // therefore, create a mapping and invert it basegfx::B2DRange aPolygonRange= polygon.getB2DRange(); - basegfx::B2DHomMatrix aPolygonTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aPolygonTransformation = basegfx::utils::createScaleTranslateB2DHomMatrix( aPolygonRange.getWidth(),aPolygonRange.getHeight(), aPolygonRange.getMinX(), aPolygonRange.getMinY()); aPolygonTransformation.invert(); @@ -883,7 +883,7 @@ namespace emfplushelper (360.0*startAngle / M_PI) << ", end: " << (360.0*endAngle / M_PI) << " startAngle: " << startAngle << " sweepAngle: " << sweepAngle); - ::basegfx::B2DPolygon polygon = basegfx::tools::createPolygonFromEllipseSegment( + ::basegfx::B2DPolygon polygon = basegfx::utils::createPolygonFromEllipseSegment( mappedCenter, mappedSize.getX(), mappedSize.getY(), startAngle, endAngle); if (type != EmfPlusRecordTypeDrawArc) @@ -939,7 +939,7 @@ namespace emfplushelper ::basegfx::B2DSize mappedSize(MapSize(dw / 2, dh / 2)); ::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( - ::basegfx::tools::createPolygonFromEllipse(mappedCenter, mappedSize.getX(), mappedSize.getY()))); + ::basegfx::utils::createPolygonFromEllipse(mappedCenter, mappedSize.getX(), mappedSize.getY()))); if (type == EmfPlusRecordTypeFillEllipse) { @@ -1163,7 +1163,7 @@ namespace emfplushelper if (aSize.Width() > 0 && aSize.Height() > 0) { // create correct transform matrix - basegfx::B2DHomMatrix aTransformMatrix = basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aTransformMatrix = basegfx::utils::createScaleTranslateB2DHomMatrix( aDstSize.getX(), aDstSize.getY(), aDstPoint.getX(), @@ -1237,7 +1237,7 @@ namespace emfplushelper LanguageTag aLanguageTag(static_cast< LanguageType >(stringFormat->language)); css::lang::Locale locale = aLanguageTag.getLocale(); - basegfx::B2DHomMatrix transformMatrix = basegfx::tools::createScaleTranslateB2DHomMatrix(MapSize(font->emSize,font->emSize),Map(lx,ly+font->emSize)); + basegfx::B2DHomMatrix transformMatrix = basegfx::utils::createScaleTranslateB2DHomMatrix(MapSize(font->emSize,font->emSize),Map(lx,ly+font->emSize)); basegfx::BColor color; if (flags & 0x8000) // we use a color @@ -1504,7 +1504,7 @@ namespace emfplushelper ::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( mappedPoint.getX(), mappedPoint.getY(), @@ -1650,7 +1650,7 @@ namespace emfplushelper aDXArray.push_back(0); // prepare transform matrix - basegfx::B2DHomMatrix transformMatrix = basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::B2DHomMatrix transformMatrix = basegfx::utils::createScaleTranslateB2DHomMatrix( MapSize(font->emSize,font->emSize),Map(charsPosX[pos],charsPosY[pos])); if (hasMatrix) transformMatrix *= transform; diff --git a/drawinglayer/source/tools/emfpimage.cxx b/drawinglayer/source/tools/emfpimage.cxx index 9e1cc8ac3551..3c8409658cf7 100644 --- a/drawinglayer/source/tools/emfpimage.cxx +++ b/drawinglayer/source/tools/emfpimage.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> diff --git a/drawinglayer/source/tools/emfppath.cxx b/drawinglayer/source/tools/emfppath.cxx index 1cd1276f9120..72ccd9409873 100644 --- a/drawinglayer/source/tools/emfppath.cxx +++ b/drawinglayer/source/tools/emfppath.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> @@ -102,7 +102,7 @@ namespace emfplushelper aPolygon.clear (); #if OSL_DEBUG_LEVEL > 1 - const ::basegfx::B2DRectangle aBounds (::basegfx::tools::getRange (GetPolygon (rR))); + const ::basegfx::B2DRectangle aBounds (::basegfx::utils::getRange (GetPolygon (rR))); SAL_INFO ("cppcanvas.emf", "EMF+\tpolygon bounding box: " << aBounds.getMinX () << "," << aBounds.getMinY () << aBounds.getWidth () << "x" << aBounds.getHeight () << " (mapped)"); diff --git a/drawinglayer/source/tools/emfppen.cxx b/drawinglayer/source/tools/emfppen.cxx index 686cac184254..04ab09811156 100644 --- a/drawinglayer/source/tools/emfppen.cxx +++ b/drawinglayer/source/tools/emfppen.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> diff --git a/drawinglayer/source/tools/emfpregion.cxx b/drawinglayer/source/tools/emfpregion.cxx index 65fc1e88b1c8..c610e65d2e6f 100644 --- a/drawinglayer/source/tools/emfpregion.cxx +++ b/drawinglayer/source/tools/emfpregion.cxx @@ -21,9 +21,9 @@ #include <com/sun/star/rendering/PathJoinType.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> -#include <basegfx/tools/canvastools.hxx> -#include <basegfx/tools/gradienttools.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/utils/gradienttools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dsize.hxx> diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx index 39b39071b287..be6c6a272edc 100644 --- a/drawinglayer/source/tools/wmfemfhelper.cxx +++ b/drawinglayer/source/tools/wmfemfhelper.cxx @@ -935,7 +935,7 @@ namespace wmfemfhelper const basegfx::BColor& rColor, PropertyHolder const & rPropertyHolder) { - basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(rRange)); + basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(rRange)); aOutline.transform(rPropertyHolder.getTransformation()); return new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( @@ -1279,7 +1279,7 @@ namespace wmfemfhelper aSequence[1] = drawinglayer::primitive2d::Primitive2DReference(pResult); // prepare filled polygon - basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aTextRange)); + basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aTextRange)); aOutline.transform(aTextTransform); aSequence[0] = drawinglayer::primitive2d::Primitive2DReference( @@ -1626,7 +1626,7 @@ namespace wmfemfhelper if(!aRange.isEmpty()) { - const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aRange)); createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); } } @@ -1664,11 +1664,11 @@ namespace wmfemfhelper fRadiusX = std::max(0.0, std::min(1.0, fRadiusX)); fRadiusY = std::max(0.0, std::min(1.0, fRadiusY)); - aOutline = basegfx::tools::createPolygonFromRect(aRange, fRadiusX, fRadiusY); + aOutline = basegfx::utils::createPolygonFromRect(aRange, fRadiusX, fRadiusY); } else { - aOutline = basegfx::tools::createPolygonFromRect(aRange); + aOutline = basegfx::utils::createPolygonFromRect(aRange); } createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); @@ -1692,7 +1692,7 @@ namespace wmfemfhelper if(!aRange.isEmpty()) { - const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromEllipse( + const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromEllipse( aRange.getCenter(), aRange.getWidth() * 0.5, aRange.getHeight() * 0.5)); createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); @@ -2135,7 +2135,7 @@ namespace wmfemfhelper { const Gradient& rGradient = pA->GetGradient(); const drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient)); - basegfx::B2DPolyPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + basegfx::B2DPolyPolygon aOutline(basegfx::utils::createPolygonFromRect(aRange)); if(aAttribute.getStartColor() == aAttribute.getEndColor()) { @@ -2323,7 +2323,7 @@ namespace wmfemfhelper if(aOriginalPolyPolygon.count()) { - aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnRange( + aClippedPolyPolygon = basegfx::utils::clipPolyPolygonOnRange( aOriginalPolyPolygon, aClipRange, true, @@ -2344,7 +2344,7 @@ namespace wmfemfhelper { // start new clipping with ClipRange const basegfx::B2DPolyPolygon aNewClipPolyPolygon( - basegfx::tools::createPolygonFromRect(aClipRange)); + basegfx::utils::createPolygonFromRect(aClipRange)); HandleNewClipRegion(aNewClipPolyPolygon, rTargetHolders, rPropertyHolders); } @@ -2388,7 +2388,7 @@ namespace wmfemfhelper if(aOriginalPolyPolygon.count()) { - aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon( + aClippedPolyPolygon = basegfx::utils::clipPolyPolygonOnPolyPolygon( aOriginalPolyPolygon, aNewClipPolyPolygon, true, false); } @@ -2430,7 +2430,7 @@ namespace wmfemfhelper basegfx::B2DVector aVector(pA->GetHorzMove(), pA->GetVertMove()); aVector *= rPropertyHolders.Current().getTransformation(); basegfx::B2DHomMatrix aTransform( - basegfx::tools::createTranslateB2DHomMatrix(aVector)); + basegfx::utils::createTranslateB2DHomMatrix(aVector)); // transform existing region basegfx::B2DPolyPolygon aClipPolyPolygon( diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index caa86bcce036..41b8eae938a3 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -33,7 +33,7 @@ namespace { Color lcl_compute3DColor( Color aMain, int nLight, int nMedium, int nDark ) { basegfx::BColor color = aMain.getBColor( ); - basegfx::BColor hsl = basegfx::tools::rgb2hsl( color ); + basegfx::BColor hsl = basegfx::utils::rgb2hsl( color ); int nCoef = 0; if ( hsl.getZ( ) >= 0.5 ) @@ -45,7 +45,7 @@ namespace { double L = hsl.getZ() * 255.0 + nCoef; hsl.setZ( L / 255.0 ); - color = basegfx::tools::hsl2rgb( hsl ); + color = basegfx::utils::hsl2rgb( hsl ); return Color( color ); } @@ -63,9 +63,9 @@ Color SvxBorderLine::lightColor( Color aMain ) // Divide Luminance by 2 basegfx::BColor color = aMain.getBColor( ); - basegfx::BColor hsl = basegfx::tools::rgb2hsl( color ); + basegfx::BColor hsl = basegfx::utils::rgb2hsl( color ); hsl.setZ( hsl.getZ() * 0.5 ); - color = basegfx::tools::hsl2rgb( hsl ); + color = basegfx::utils::hsl2rgb( hsl ); return Color( color ); } diff --git a/emfio/inc/mtftools.hxx b/emfio/inc/mtftools.hxx index d9f9dd62ea22..cc7361a360d7 100644 --- a/emfio/inc/mtftools.hxx +++ b/emfio/inc/mtftools.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_EMFIO_INC_MTFTOOLS_HXX #define INCLUDED_EMFIO_INC_MTFTOOLS_HXX -#include <basegfx/tools/b2dclipstate.hxx> +#include <basegfx/utils/b2dclipstate.hxx> #include <tools/poly.hxx> #include <vcl/font.hxx> #include <vcl/bitmap.hxx> @@ -267,7 +267,7 @@ namespace emfio { class WinMtfClipPath { - basegfx::tools::B2DClipState maClip; + basegfx::utils::B2DClipState maClip; public: WinMtfClipPath() : maClip() {}; diff --git a/emfio/source/emfuno/xemfparser.cxx b/emfio/source/emfuno/xemfparser.cxx index 32a2bc1a86ef..0e96b0515856 100644 --- a/emfio/source/emfuno/xemfparser.cxx +++ b/emfio/source/emfuno/xemfparser.cxx @@ -172,7 +172,7 @@ namespace emfio // use size const basegfx::B2DHomMatrix aMetafileTransform( - basegfx::tools::createScaleB2DHomMatrix( + basegfx::utils::createScaleB2DHomMatrix( aSize.Width(), aSize.Height())); @@ -198,7 +198,7 @@ namespace emfio // // for test, just create some graphic data that will get visualized // const basegfx::B2DRange aRange(1000, 1000, 5000, 5000); // const basegfx::BColor aColor(1.0, 0.0, 0.0); - // const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + // const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aRange)); // // aRetval.push_back(new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aOutline), aColor)); // } diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index 9fec82543f2a..212b93fc5b9f 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -104,7 +104,7 @@ namespace emfio maClip.intersectPolyPolygon(rB2DPoly); break; case RGN_COPY : - maClip = basegfx::tools::B2DClipState(rB2DPoly); + maClip = basegfx::utils::B2DClipState(rB2DPoly); break; } } @@ -119,7 +119,7 @@ namespace emfio void WinMtfClipPath::setDefaultClipPath() { // Empty clip region - everything visible - maClip = basegfx::tools::B2DClipState(); + maClip = basegfx::utils::B2DClipState(); } basegfx::B2DPolyPolygon WinMtfClipPath::getClipPath() const @@ -923,7 +923,7 @@ namespace emfio const basegfx::B2DPolyPolygon& rClipPoly( maClipPath.getClipPath() ); mbComplexClip = rClipPoly.count() > 1 - || !basegfx::tools::isRectangle(rClipPoly); + || !basegfx::utils::isRectangle(rClipPoly); static bool bEnableComplexClipViaRegion = getenv("SAL_WMF_COMPLEXCLIP_VIA_REGION") != nullptr; diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx index 92a2d8627a62..aa288915ae8f 100644 --- a/filter/source/flash/swfwriter.cxx +++ b/filter/source/flash/swfwriter.cxx @@ -222,7 +222,7 @@ void Writer::placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int mpTag->addUI16( nID ); // character Id // #i73264# - const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aMatrix(basegfx::utils::createTranslateB2DHomMatrix( Int16_(static_cast<long>(map100thmm(x)*mnDocXScale)), Int16_(static_cast<long>(map100thmm(y)*mnDocYScale)))); mpTag->addMatrix( aMatrix ); // transformation matrix diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 75b4e4c5904b..429fcb7e1ca2 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -594,7 +594,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon scale = (double)n1 / (double)n2; } - basegfx::B2DHomMatrix m(basegfx::tools::createRotateB2DHomMatrix(static_cast<double>(nOrientation) * F_PI1800)); + basegfx::B2DHomMatrix m(basegfx::utils::createRotateB2DHomMatrix(static_cast<double>(nOrientation) * F_PI1800)); m.translate( double(aPt.X() / scale), double(aPt.Y()) ); m.scale( scale, scale ); diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx index 9fa89c3aa01e..3bbc4afe83bc 100644 --- a/filter/source/flash/swfwriter2.cxx +++ b/filter/source/flash/swfwriter2.cxx @@ -551,7 +551,7 @@ struct GradRecord void FillStyle::Impl_addGradient( Tag* pTag ) const { std::vector< struct GradRecord > aGradientRecords; - basegfx::B2DHomMatrix m(basegfx::tools::createRotateB2DHomMatrix((maGradient.GetAngle() - 900) * F_PI1800)); + basegfx::B2DHomMatrix m(basegfx::utils::createRotateB2DHomMatrix((maGradient.GetAngle() - 900) * F_PI1800)); switch( maGradient.GetStyle() ) { diff --git a/filter/source/graphicfilter/ipict/shape.cxx b/filter/source/graphicfilter/ipict/shape.cxx index c7ab3ba2f8a0..7b74a5a16a02 100644 --- a/filter/source/graphicfilter/ipict/shape.cxx +++ b/filter/source/graphicfilter/ipict/shape.cxx @@ -151,7 +151,7 @@ namespace PictReaderShape { long const X[2] = { oval.Left(), oval.Right() }; long const Y[2] = { oval.Top(), oval.Bottom() }; B2DPoint center(0.5*(X[1]+X[0]), 0.5*(Y[1]+Y[0])); - B2DPolygon poly = basegfx::tools::createPolygonFromEllipse(center, 0.5*(X[1]-X[0]), 0.5*(Y[1]-Y[0])); + B2DPolygon poly = basegfx::utils::createPolygonFromEllipse(center, 0.5*(X[1]-X[0]), 0.5*(Y[1]-Y[0])); if (drawFrame) dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE); else @@ -184,7 +184,7 @@ namespace PictReaderShape { while (angl2 < 0.0) angl2 += F_2PI; while (angl2 >= F_2PI) angl2 -= F_2PI; - B2DPolygon poly = basegfx::tools::createPolygonFromEllipseSegment(center, 0.5*(X[1]-X[0]), 0.5*(Y[1]-Y[0]), angl1, angl2); + B2DPolygon poly = basegfx::utils::createPolygonFromEllipseSegment(center, 0.5*(X[1]-X[0]), 0.5*(Y[1]-Y[0]), angl1, angl2); if (drawFrame) dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE); else { @@ -207,7 +207,7 @@ namespace PictReaderShape { if (ovalH > height) ovalH = static_cast< int >( height ); B2DRectangle rect(B2DPoint(X[0],Y[0]), B2DPoint(X[1],Y[1])); - B2DPolygon poly = basegfx::tools::createPolygonFromRect(rect, (width != 0.0) ? ovalW/width : 0.0, (height != 0.0) ? ovalH/height : 0.0); + B2DPolygon poly = basegfx::utils::createPolygonFromRect(rect, (width != 0.0) ? ovalW/width : 0.0, (height != 0.0) ? ovalH/height : 0.0); if (drawFrame) dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE); diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 818946bd69df..cc5369a61db1 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -1031,7 +1031,7 @@ bool PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData& basegfx::B2DRectangle aB2DRect( aPageRect.Left(), aPageRect.Top(), aPageRect.Right(), aPageRect.Bottom() ); - rWriter.SetClipRegion( basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect( aB2DRect ) ) ); + rWriter.SetClipRegion( basegfx::B2DPolyPolygon( basegfx::utils::createPolygonFromRect( aB2DRect ) ) ); rWriter.PlayMetafile( aMtf, aCtx, &rPDFExtOutDevData ); diff --git a/filter/source/svg/parserfragments.cxx b/filter/source/svg/parserfragments.cxx index 94ccdab42b49..abeac1137442 100644 --- a/filter/source/svg/parserfragments.cxx +++ b/filter/source/svg/parserfragments.cxx @@ -11,7 +11,7 @@ #include "spirit_supplements.hxx" #include "gfxtypes.hxx" -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <com/sun/star/geometry/AffineMatrix2D.hpp> #include <limits.h> diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx index 778dc1a42f45..4bb7afbcc4a8 100644 --- a/filter/source/svg/svgreader.cxx +++ b/filter/source/svg/svgreader.cxx @@ -1459,7 +1459,7 @@ struct ShapeWritingVisitor +OUString::number(y1)+"L"+OUString::number(x2)+"," +OUString::number(y2); basegfx::B2DPolyPolygon aPoly; - basegfx::tools::importFromSvgD(aPoly, sLinePath, false, nullptr); + basegfx::utils::importFromSvgD(aPoly, sLinePath, false, nullptr); writePathShape(xAttrs, xUnoAttrs, @@ -1474,7 +1474,7 @@ struct ShapeWritingVisitor { OUString sPoints = xElem->hasAttribute("points") ? xElem->getAttribute("points") : ""; basegfx::B2DPolygon aPoly; - (void)basegfx::tools::importFromSvgPoints(aPoly, sPoints); + (void)basegfx::utils::importFromSvgPoints(aPoly, sPoints); if( nTokenId == XML_POLYGON || maCurrState.meFillType != NONE ) aPoly.setClosed(true); @@ -1531,7 +1531,7 @@ struct ShapeWritingVisitor rx = ry; basegfx::B2DPolygon aPoly; - aPoly = basegfx::tools::createPolygonFromRect( + aPoly = basegfx::utils::createPolygonFromRect( basegfx::B2DRange(x,y,x+width,y+height), rx/(0.5*width), ry/(0.5*height) ); @@ -1546,7 +1546,7 @@ struct ShapeWritingVisitor { OUString sPath = xElem->hasAttribute("d") ? xElem->getAttribute("d") : ""; basegfx::B2DPolyPolygon aPoly; - basegfx::tools::importFromSvgD(aPoly, sPath, false, nullptr); + basegfx::utils::importFromSvgD(aPoly, sPath, false, nullptr); if ((maCurrState.meStrokeType == NONE) && (maCurrState.meFillType != NONE) && @@ -1831,7 +1831,7 @@ struct ShapeWritingVisitor xAttrs->Clear(); - basegfx::B2DPolygon aPoly = basegfx::tools::createPolygonFromEllipse(rEllipse.getB2DEllipseCenter(), + basegfx::B2DPolygon aPoly = basegfx::utils::createPolygonFromEllipse(rEllipse.getB2DEllipseCenter(), rEllipse.getB2DEllipseRadius().getX(), rEllipse.getB2DEllipseRadius().getY()); writePathShape(xAttrs, xUnoAttrs, rStyleId, basegfx::B2DPolyPolygon(aPoly)); } @@ -1860,9 +1860,9 @@ struct ShapeWritingVisitor { const basegfx::B2DRange aBounds( aPoly.areControlPointsUsed() ? - basegfx::tools::getRange( - basegfx::tools::adaptiveSubdivideByAngle(aPoly)) : - basegfx::tools::getRange(aPoly)); + basegfx::utils::getRange( + basegfx::utils::adaptiveSubdivideByAngle(aPoly)) : + basegfx::utils::getRange(aPoly)); fillShapeProperties(xAttrs, aBounds, "svggraphicstyle"+rStyleId); @@ -1876,7 +1876,7 @@ struct ShapeWritingVisitor aNormalize.scale(2540.0/72.0,2540.0/72.0); aPoly.transform(aNormalize); - xAttrs->AddAttribute( "svg:d", basegfx::tools::exportToSvgD( + xAttrs->AddAttribute( "svg:d", basegfx::utils::exportToSvgD( aPoly, false, // no relative coords. causes rounding errors false, // no quad bezier detection. crashes older versions. diff --git a/include/basegfx/color/bcolortools.hxx b/include/basegfx/color/bcolortools.hxx index 64cdc95fd789..ad19d07c5125 100644 --- a/include/basegfx/color/bcolortools.hxx +++ b/include/basegfx/color/bcolortools.hxx @@ -28,7 +28,7 @@ namespace basegfx { class BColor; - namespace tools + namespace utils { /// Transform from RGB to HSL BASEGFX_DLLPUBLIC BColor rgb2hsl(const BColor& rRGBColor); diff --git a/include/basegfx/matrix/b2dhommatrixtools.hxx b/include/basegfx/matrix/b2dhommatrixtools.hxx index aa3c047a20c5..c60a6ac96c21 100644 --- a/include/basegfx/matrix/b2dhommatrixtools.hxx +++ b/include/basegfx/matrix/b2dhommatrixtools.hxx @@ -29,7 +29,7 @@ namespace basegfx { - namespace tools + namespace utils { /** If the rotation angle is an approximate multiple of pi/2, force fSin/fCos to -1/0/1, to maintain orthogonality (which @@ -140,13 +140,13 @@ namespace basegfx /// get column vector from B2dHomMatrix, e.g. to extract coordinate system origin and x/yaxis BASEGFX_DLLPUBLIC B2DTuple getColumn(const B2DHomMatrix& rMatrix, sal_uInt16 nCol); - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx namespace basegfx { - namespace tools + namespace utils { class BASEGFX_DLLPUBLIC B2DHomMatrixBufferedDecompose { @@ -178,13 +178,13 @@ namespace basegfx double getRotate() const { return mfRotate; } double getShearX() const { return mfShearX; } }; - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx namespace basegfx { - namespace tools + namespace utils { class BASEGFX_DLLPUBLIC B2DHomMatrixBufferedOnDemandDecompose { @@ -223,7 +223,7 @@ namespace basegfx const B2DVector& getTranslate() const { const_cast< B2DHomMatrixBufferedOnDemandDecompose* >(this)->impCheckDecompose(); return maTranslate; } double getRotate() const { const_cast< B2DHomMatrixBufferedOnDemandDecompose* >(this)->impCheckDecompose(); return mfRotate; } }; - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx diff --git a/include/basegfx/polygon/b2dlinegeometry.hxx b/include/basegfx/polygon/b2dlinegeometry.hxx index 60230cc9168c..8a9cef193cd3 100644 --- a/include/basegfx/polygon/b2dlinegeometry.hxx +++ b/include/basegfx/polygon/b2dlinegeometry.hxx @@ -30,7 +30,7 @@ namespace basegfx { - namespace tools + namespace utils { /** Create line start/end geometry element, mostly arrows and things like that. @@ -138,7 +138,7 @@ namespace basegfx double fMaxPartOfEdge = 0.4, double fMiterMinimumAngle = (15.0 * F_PI180)); - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx #endif // INCLUDED_BASEGFX_POLYGON_B2DLINEGEOMETRY_HXX diff --git a/include/basegfx/polygon/b2dpolygonclipper.hxx b/include/basegfx/polygon/b2dpolygonclipper.hxx index f50ac9e8f7f6..472cbf387b98 100644 --- a/include/basegfx/polygon/b2dpolygonclipper.hxx +++ b/include/basegfx/polygon/b2dpolygonclipper.hxx @@ -30,7 +30,7 @@ namespace basegfx // predefinitions class B2DRange; - namespace tools + namespace utils { // This method clips the given tools::PolyPolygon against a horizontal or vertical axis (parallel to X or Y axis). The axis is // defined by bParallelToXAxis (true -> it's parallel to the X-Axis of the coordinate system, else to the Y-Axis) and the @@ -61,7 +61,7 @@ namespace basegfx // to be a simple triangle list. the result is also a simple triangle list. BASEGFX_DLLPUBLIC B2DPolygon clipTriangleListOnRange( const B2DPolygon& rCandidate, const B2DRange& rRange ); - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx #endif // INCLUDED_BASEGFX_POLYGON_B2DPOLYGONCLIPPER_HXX diff --git a/include/basegfx/polygon/b2dpolygoncutandtouch.hxx b/include/basegfx/polygon/b2dpolygoncutandtouch.hxx index 0918e0e1d90d..61a5c5a7a7da 100644 --- a/include/basegfx/polygon/b2dpolygoncutandtouch.hxx +++ b/include/basegfx/polygon/b2dpolygoncutandtouch.hxx @@ -27,7 +27,7 @@ namespace basegfx { - namespace tools + namespace utils { // look for self-intersections and self-touches (points on an edge) in given polygon and add // extra points there. Result will have no touches or intersections on an edge, only on points @@ -47,7 +47,7 @@ namespace basegfx // The mask polygon is assumed to be closed, even when it's not explicitly. BASEGFX_DLLPUBLIC B2DPolygon addPointsAtCuts(const B2DPolygon& rCandidate, const B2DPolyPolygon& rMask); - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx diff --git a/include/basegfx/polygon/b2dpolygontools.hxx b/include/basegfx/polygon/b2dpolygontools.hxx index b96834fc96f6..c20668995d56 100644 --- a/include/basegfx/polygon/b2dpolygontools.hxx +++ b/include/basegfx/polygon/b2dpolygontools.hxx @@ -55,7 +55,7 @@ namespace basegfx class B2DPolygon; class B2DRange; - namespace tools + namespace utils { // B2DPolygon tools @@ -498,7 +498,7 @@ namespace basegfx */ BASEGFX_DLLPUBLIC OUString exportToSvgPoints( const B2DPolygon& rPoly ); - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx #endif // INCLUDED_BASEGFX_POLYGON_B2DPOLYGONTOOLS_HXX diff --git a/include/basegfx/polygon/b2dpolypolygoncutter.hxx b/include/basegfx/polygon/b2dpolypolygoncutter.hxx index b8bf5847dcc4..a84dca8e9ee8 100644 --- a/include/basegfx/polygon/b2dpolypolygoncutter.hxx +++ b/include/basegfx/polygon/b2dpolypolygoncutter.hxx @@ -26,7 +26,7 @@ namespace basegfx { - namespace tools + namespace utils { /** Solve all crossovers (aka self-intersections) in a polyPolygon. @@ -141,7 +141,7 @@ namespace basegfx */ BASEGFX_DLLPUBLIC B2DPolyPolygon mergeToSinglePolyPolygon(const B2DPolyPolygonVector& rInput); - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx diff --git a/include/basegfx/polygon/b2dpolypolygontools.hxx b/include/basegfx/polygon/b2dpolypolygontools.hxx index 90ec04530c52..3f34f8e6f7c5 100644 --- a/include/basegfx/polygon/b2dpolypolygontools.hxx +++ b/include/basegfx/polygon/b2dpolypolygontools.hxx @@ -37,7 +37,7 @@ namespace basegfx class B2DPolyPolygon; class B2DRange; - namespace tools + namespace utils { // B2DPolyPolygon tools @@ -291,7 +291,7 @@ namespace basegfx const B2DPolyPolygon& rPolyPolygon, css::drawing::PolyPolygonBezierCoords& rPolyPolygonBezierCoordsRetval); - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx #endif // INCLUDED_BASEGFX_POLYGON_B2DPOLYPOLYGONTOOLS_HXX diff --git a/include/basegfx/polygon/b2dtrapezoid.hxx b/include/basegfx/polygon/b2dtrapezoid.hxx index d50772874709..a4d8e1d77733 100644 --- a/include/basegfx/polygon/b2dtrapezoid.hxx +++ b/include/basegfx/polygon/b2dtrapezoid.hxx @@ -75,7 +75,7 @@ namespace basegfx namespace basegfx { - namespace tools + namespace utils { // convert SourcePolyPolygon to trapezoids. The trapezoids will be appended to // ro_Result. ro_Result will not be cleared. If SourcePolyPolygon contains curves, @@ -104,7 +104,7 @@ namespace basegfx const B2DPolygon& rPolygon, double fLineWidth); - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx diff --git a/include/basegfx/polygon/b3dpolygontools.hxx b/include/basegfx/polygon/b3dpolygontools.hxx index fa1442f19def..a38ece65f99c 100644 --- a/include/basegfx/polygon/b3dpolygontools.hxx +++ b/include/basegfx/polygon/b3dpolygontools.hxx @@ -34,7 +34,7 @@ namespace basegfx class B3DPolygon; class B3DRange; - namespace tools + namespace utils { // B3DPolygon tools @@ -120,7 +120,7 @@ namespace basegfx */ BASEGFX_DLLPUBLIC B3DPolygon snapPointsOfHorizontalOrVerticalEdges(const B3DPolygon& rCandidate); - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx #endif // INCLUDED_BASEGFX_POLYGON_B3DPOLYGONTOOLS_HXX diff --git a/include/basegfx/polygon/b3dpolypolygontools.hxx b/include/basegfx/polygon/b3dpolypolygontools.hxx index 142058362193..72177230c1e7 100644 --- a/include/basegfx/polygon/b3dpolypolygontools.hxx +++ b/include/basegfx/polygon/b3dpolypolygontools.hxx @@ -35,7 +35,7 @@ namespace basegfx class B3DPolyPolygon; class B3DRange; - namespace tools + namespace utils { // B3DPolyPolygon tools @@ -133,7 +133,7 @@ namespace basegfx const B3DPolyPolygon& rPolyPolygonSource, css::drawing::PolyPolygonShape3D& rPolyPolygonShape3DRetval); - } // end of namespace tools + } // end of namespace utils } // end of namespace basegfx #endif // INCLUDED_BASEGFX_POLYGON_B3DPOLYPOLYGONTOOLS_HXX diff --git a/include/basegfx/range/b2drangeclipper.hxx b/include/basegfx/range/b2drangeclipper.hxx index a196b210e6f1..3e37df1170f1 100644 --- a/include/basegfx/range/b2drangeclipper.hxx +++ b/include/basegfx/range/b2drangeclipper.hxx @@ -26,7 +26,7 @@ namespace basegfx { - namespace tools + namespace utils { /** Extract poly-polygon w/o self-intersections from poly-range diff --git a/include/basegfx/tools/b2dclipstate.hxx b/include/basegfx/utils/b2dclipstate.hxx index 865bdd74c765..5c3f615284ca 100644 --- a/include/basegfx/tools/b2dclipstate.hxx +++ b/include/basegfx/utils/b2dclipstate.hxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_BASEGFX_TOOLS_B2DCLIPSTATE_HXX -#define INCLUDED_BASEGFX_TOOLS_B2DCLIPSTATE_HXX +#ifndef INCLUDED_BASEGFX_UTILS_B2DCLIPSTATE_HXX +#define INCLUDED_BASEGFX_UTILS_B2DCLIPSTATE_HXX #include <sal/types.h> #include <o3tl/cow_wrapper.hxx> @@ -33,7 +33,7 @@ namespace basegfx class B2DPolyPolygon; class B2DHomMatrix; - namespace tools + namespace utils { class ImplB2DClipState; @@ -93,6 +93,6 @@ namespace basegfx } } -#endif // INCLUDED_BASEGFX_TOOLS_B2DCLIPSTATE_HXX +#endif // INCLUDED_BASEGFX_UTILS_B2DCLIPSTATE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/basegfx/tools/canvastools.hxx b/include/basegfx/utils/canvastools.hxx index 9537b649f4d5..688dcd797df3 100644 --- a/include/basegfx/tools/canvastools.hxx +++ b/include/basegfx/utils/canvastools.hxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_BASEGFX_TOOLS_CANVASTOOLS_HXX -#define INCLUDED_BASEGFX_TOOLS_CANVASTOOLS_HXX +#ifndef INCLUDED_BASEGFX_UTILS_CANVASTOOLS_HXX +#define INCLUDED_BASEGFX_UTILS_CANVASTOOLS_HXX #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Sequence.hxx> @@ -170,6 +170,6 @@ namespace basegfx } } -#endif // INCLUDED_BASEGFX_TOOLS_CANVASTOOLS_HXX +#endif // INCLUDED_BASEGFX_UTILS_CANVASTOOLS_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/basegfx/tools/gradienttools.hxx b/include/basegfx/utils/gradienttools.hxx index ab73551143a8..6c754d4ed686 100644 --- a/include/basegfx/tools/gradienttools.hxx +++ b/include/basegfx/utils/gradienttools.hxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_BASEGFX_TOOLS_GRADIENTTOOLS_HXX -#define INCLUDED_BASEGFX_TOOLS_GRADIENTTOOLS_HXX +#ifndef INCLUDED_BASEGFX_UTILS_GRADIENTTOOLS_HXX +#define INCLUDED_BASEGFX_UTILS_GRADIENTTOOLS_HXX #include <basegfx/point/b2dpoint.hxx> #include <basegfx/range/b2drange.hxx> @@ -120,7 +120,7 @@ namespace basegfx } }; - namespace tools + namespace utils { /** Create matrix for ODF's linear gradient definition diff --git a/include/basegfx/tools/keystoplerp.hxx b/include/basegfx/utils/keystoplerp.hxx index a0b5376f0174..57f0b0fe2579 100644 --- a/include/basegfx/tools/keystoplerp.hxx +++ b/include/basegfx/utils/keystoplerp.hxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_BASEGFX_TOOLS_KEYSTOPLERP_HXX -#define INCLUDED_BASEGFX_TOOLS_KEYSTOPLERP_HXX +#ifndef INCLUDED_BASEGFX_UTILS_KEYSTOPLERP_HXX +#define INCLUDED_BASEGFX_UTILS_KEYSTOPLERP_HXX #include <basegfx/numeric/ftools.hxx> #include <vector> @@ -30,7 +30,7 @@ namespace com{ namespace sun{ namespace star{ namespace uno { namespace basegfx { - namespace tools + namespace utils { /** Lerp in a vector of key stops diff --git a/include/basegfx/tools/lerp.hxx b/include/basegfx/utils/lerp.hxx index 6bb292569223..8dd3ca50435f 100644 --- a/include/basegfx/tools/lerp.hxx +++ b/include/basegfx/utils/lerp.hxx @@ -17,14 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_BASEGFX_TOOLS_LERP_HXX -#define INCLUDED_BASEGFX_TOOLS_LERP_HXX +#ifndef INCLUDED_BASEGFX_UTILS_LERP_HXX +#define INCLUDED_BASEGFX_UTILS_LERP_HXX #include <sal/types.h> namespace basegfx { - namespace tools + namespace utils { /** Generic linear interpolator @@ -46,6 +46,6 @@ namespace basegfx } } -#endif // INCLUDED_BASEGFX_TOOLS_LERP_HXX +#endif // INCLUDED_BASEGFX_UTILS_LERP_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/basegfx/tools/rectcliptools.hxx b/include/basegfx/utils/rectcliptools.hxx index 9c4fd78b6b35..5ad90cb6ed81 100644 --- a/include/basegfx/tools/rectcliptools.hxx +++ b/include/basegfx/utils/rectcliptools.hxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_BASEGFX_TOOLS_RECTCLIPTOOLS_HXX -#define INCLUDED_BASEGFX_TOOLS_RECTCLIPTOOLS_HXX +#ifndef INCLUDED_BASEGFX_UTILS_RECTCLIPTOOLS_HXX +#define INCLUDED_BASEGFX_UTILS_RECTCLIPTOOLS_HXX #include <sal/types.h> #include <basegfx/range/b2ibox.hxx> @@ -26,7 +26,7 @@ namespace basegfx { - namespace tools + namespace utils { namespace RectClipFlags { @@ -72,6 +72,6 @@ namespace basegfx } } -#endif // INCLUDED_BASEGFX_TOOLS_RECTCLIPTOOLS_HXX +#endif // INCLUDED_BASEGFX_UTILS_RECTCLIPTOOLS_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/basegfx/tools/tools.hxx b/include/basegfx/utils/tools.hxx index 9aa52b01d9c2..b243d0167c81 100644 --- a/include/basegfx/tools/tools.hxx +++ b/include/basegfx/utils/tools.hxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_BASEGFX_TOOLS_TOOLS_HXX -#define INCLUDED_BASEGFX_TOOLS_TOOLS_HXX +#ifndef INCLUDED_BASEGFX_UTILS_TOOLS_HXX +#define INCLUDED_BASEGFX_UTILS_TOOLS_HXX #include <sal/types.h> #include <basegfx/basegfxdllapi.h> @@ -29,7 +29,7 @@ namespace basegfx class B2DRange; class B2DPolyPolygon; - namespace tools + namespace utils { /** Expand given parallelogram, such that it extends beyond bound rect in a given direction. @@ -122,6 +122,6 @@ namespace basegfx } } -#endif // INCLUDED_BASEGFX_TOOLS_TOOLS_HXX +#endif // INCLUDED_BASEGFX_UTILS_TOOLS_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/basegfx/tools/unopolypolygon.hxx b/include/basegfx/utils/unopolypolygon.hxx index b59d126c6212..afe0fe9efeb8 100644 --- a/include/basegfx/tools/unopolypolygon.hxx +++ b/include/basegfx/utils/unopolypolygon.hxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_BASEGFX_TOOLS_UNOPOLYPOLYGON_HXX -#define INCLUDED_BASEGFX_TOOLS_UNOPOLYPOLYGON_HXX +#ifndef INCLUDED_BASEGFX_UTILS_UNOPOLYPOLYGON_HXX +#define INCLUDED_BASEGFX_UTILS_UNOPOLYPOLYGON_HXX #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase.hxx> @@ -106,6 +106,6 @@ namespace unotools } } -#endif // INCLUDED_BASEGFX_TOOLS_UNOPOLYPOLYGON_HXX +#endif // INCLUDED_BASEGFX_UTILS_UNOPOLYPOLYGON_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/basegfx/tools/unotools.hxx b/include/basegfx/utils/unotools.hxx index fe9d18f191b2..3a58a2068fd9 100644 --- a/include/basegfx/tools/unotools.hxx +++ b/include/basegfx/utils/unotools.hxx @@ -7,8 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_BASEGFX_TOOLS_UNOTOOLS_HXX -#define INCLUDED_BASEGFX_TOOLS_UNOTOOLS_HXX +#ifndef INCLUDED_BASEGFX_UTILS_UNOTOOLS_HXX +#define INCLUDED_BASEGFX_UTILS_UNOTOOLS_HXX #include <cppuhelper/basemutex.hxx> #include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp> @@ -33,6 +33,6 @@ namespace unotools } } -#endif // INCLUDED_BASEGFX_TOOLS_UNOTOOLS_HXX +#endif // INCLUDED_BASEGFX_UTILS_UNOTOOLS_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/basegfx/tools/zoomtools.hxx b/include/basegfx/utils/zoomtools.hxx index 808da8f0ef57..533f25883e75 100644 --- a/include/basegfx/tools/zoomtools.hxx +++ b/include/basegfx/utils/zoomtools.hxx @@ -7,8 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_BASEGFX_TOOLS_ZOOMTOOLS_HXX -#define INCLUDED_BASEGFX_TOOLS_ZOOMTOOLS_HXX +#ifndef INCLUDED_BASEGFX_UTILS_ZOOMTOOLS_HXX +#define INCLUDED_BASEGFX_UTILS_ZOOMTOOLS_HXX #include <sal/types.h> #include <basegfx/basegfxdllapi.h> diff --git a/include/drawinglayer/primitive2d/animatedprimitive2d.hxx b/include/drawinglayer/primitive2d/animatedprimitive2d.hxx index db873c5ccf28..770a0a74baea 100644 --- a/include/drawinglayer/primitive2d/animatedprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/animatedprimitive2d.hxx @@ -149,7 +149,7 @@ namespace drawinglayer { private: /// the transformations - std::vector< basegfx::tools::B2DHomMatrixBufferedDecompose > maMatrixStack; + std::vector< basegfx::utils::B2DHomMatrixBufferedDecompose > maMatrixStack; protected: public: diff --git a/include/drawinglayer/primitive2d/textbreakuphelper.hxx b/include/drawinglayer/primitive2d/textbreakuphelper.hxx index e63c3f61ae0b..1afe12eea5de 100644 --- a/include/drawinglayer/primitive2d/textbreakuphelper.hxx +++ b/include/drawinglayer/primitive2d/textbreakuphelper.hxx @@ -42,7 +42,7 @@ namespace drawinglayer const TextSimplePortionPrimitive2D& mrSource; Primitive2DContainer mxResult; TextLayouterDevice maTextLayouter; - basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose maDecTrans; + basegfx::utils::B2DHomMatrixBufferedOnDemandDecompose maDecTrans; bool mbNoDXArray : 1; diff --git a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx index 25734d6c361d..37643195bfdc 100644 --- a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx @@ -25,7 +25,7 @@ #include <drawinglayer/primitive2d/textprimitive2d.hxx> #include <drawinglayer/primitive2d/textenumsprimitive2d.hxx> -namespace basegfx { namespace tools { +namespace basegfx { namespace utils { class B2DHomMatrixBufferedOnDemandDecompose; }} @@ -65,7 +65,7 @@ namespace drawinglayer /// helper methods void impCreateGeometryContent( std::vector< Primitive2DReference >& rTarget, - basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose const & rDecTrans, + basegfx::utils::B2DHomMatrixBufferedOnDemandDecompose const & rDecTrans, const OUString& rText, sal_Int32 nTextPosition, sal_Int32 nTextLength, diff --git a/include/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx b/include/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx index e9199c4d8087..34b0feb4c8b1 100644 --- a/include/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx +++ b/include/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx @@ -58,7 +58,7 @@ namespace drawinglayer const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B3DHomMatrix& aTransform, SliceType3D aSliceType = SLICETYPE3D_REGULAR) - : maPolyPolygon(basegfx::tools::createB3DPolyPolygonFromB2DPolyPolygon(rPolyPolygon)), + : maPolyPolygon(basegfx::utils::createB3DPolyPolygonFromB2DPolyPolygon(rPolyPolygon)), maSliceType(aSliceType) { maPolyPolygon.transform(aTransform); diff --git a/include/drawinglayer/texture/texture.hxx b/include/drawinglayer/texture/texture.hxx index 105a9240b9a9..6cfe73613baf 100644 --- a/include/drawinglayer/texture/texture.hxx +++ b/include/drawinglayer/texture/texture.hxx @@ -25,7 +25,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/range/b2drange.hxx> #include <basegfx/color/bcolor.hxx> -#include <basegfx/tools/gradienttools.hxx> +#include <basegfx/utils/gradienttools.hxx> #include <vector> diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 0d84f78ff146..77693f874bc4 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -627,7 +627,7 @@ namespace tools::Rectangle lcl_UpdateCalcPoly(basegfx::B2DPolygon &rCalcPoly, int nWhichPoint, const Point &rPos) { rCalcPoly.setB2DPoint(nWhichPoint, basegfx::B2DPoint(rPos.X(), rPos.Y())); - basegfx::B2DRange aRange(basegfx::tools::getRange(rCalcPoly)); + basegfx::B2DRange aRange(basegfx::utils::getRange(rCalcPoly)); return tools::Rectangle(static_cast<long>(aRange.getMinX()), static_cast<long>(aRange.getMinY()), static_cast<long>(aRange.getMaxX()), static_cast<long>(aRange.getMaxY())); } @@ -856,7 +856,7 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati pObj->TRGetBaseGeometry(aOriginalMatrix, aPolyPolygon); aOriginalMatrix.decompose(aScale, aTranslate, fRotate, fShearX); aTranslate += ::basegfx::B2DTuple(aPoint.X(), aPoint.Y()); - aOriginalMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aOriginalMatrix = basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aScale, fShearX, fRotate, diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index c0ea9f4626d0..d8259f12835b 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -161,7 +161,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) : aSquare.append(basegfx::B2DPoint(0.0, 10.0)); aSquare.setClosed(true); - basegfx::B2DPolygon aCircle(basegfx::tools::createPolygonFromEllipse(basegfx::B2DPoint(0.0, 0.0), 100.0, 100.0)); + basegfx::B2DPolygon aCircle(basegfx::utils::createPolygonFromEllipse(basegfx::B2DPoint(0.0, 0.0), 100.0, 100.0)); aCircle.setClosed(true); OUString aName = SC_LINEEND_NAME; diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx index ca0406a5b59d..ba0cddb6de18 100644 --- a/sc/source/ui/drawfunc/fuconrec.cxx +++ b/sc/source/ui/drawfunc/fuconrec.cxx @@ -246,7 +246,7 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, const SdrObject* pObj, sal if( !aCircle.count() ) { ::basegfx::B2DPolygon aNewCircle; - aNewCircle = ::basegfx::tools::createPolygonFromEllipse(::basegfx::B2DPoint(0.0, 0.0), 250.0, 250.0); + aNewCircle = ::basegfx::utils::createPolygonFromEllipse(::basegfx::B2DPoint(0.0, 0.0), 250.0, 250.0); aNewCircle.setClosed(true); aCircle.append(aNewCircle); } diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx index 816bb40281f5..2d9d86527f91 100644 --- a/sc/source/ui/view/hintwin.cxx +++ b/sc/source/ui/view/hintwin.cxx @@ -78,7 +78,7 @@ drawinglayer::primitive2d::Primitive2DContainer ScOverlayHint::createOverlaySequ Point aTextPos(nLeft + aHintMargin.Width() , nTextOffsetY); rRange = basegfx::B2DRange(nLeft, nTop, nLeft + aHintMargin.Width(), nTop + aHintMargin.Height()); - basegfx::B2DHomMatrix aTextMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aTextMatrix(basegfx::utils::createScaleTranslateB2DHomMatrix( aFontSize.getX(), aFontSize.getY(), aTextPos.X(), aTextPos.Y())); @@ -112,7 +112,7 @@ drawinglayer::primitive2d::Primitive2DContainer ScOverlayHint::createOverlaySequ { OUString aLine = m_aMessage.getToken( 0, '\r', nIndex ); - aTextMatrix = basegfx::tools::createScaleTranslateB2DHomMatrix( + aTextMatrix = basegfx::utils::createScaleTranslateB2DHomMatrix( aFontSize.getX(), aFontSize.getY(), aLineStart.X(), aLineStart.Y() + nTextOffsetY); @@ -134,7 +134,7 @@ drawinglayer::primitive2d::Primitive2DContainer ScOverlayHint::createOverlaySequ rRange.expand(basegfx::B2DTuple(rRange.getMaxX() + aHintMargin.Width(), rRange.getMaxY() + aHintMargin.Height())); - basegfx::B2DPolygon aPoly(basegfx::tools::createPolygonFromRect(rRange)); + basegfx::B2DPolygon aPoly(basegfx::utils::createPolygonFromRect(rRange)); const drawinglayer::primitive2d::Primitive2DReference aBg( new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPoly), getBaseColor().getBColor())); diff --git a/sc/source/ui/view/overlayobject.cxx b/sc/source/ui/view/overlayobject.cxx index cc688f4301e0..07ea2d0f5b64 100644 --- a/sc/source/ui/view/overlayobject.cxx +++ b/sc/source/ui/view/overlayobject.cxx @@ -77,7 +77,7 @@ drawinglayer::primitive2d::Primitive2DContainer ScOverlayDashedBorder::createOve if (!mbToggle) ::std::swap(aColorA, aColorB); - const basegfx::B2DPolygon aPoly = basegfx::tools::createPolygonFromRect(maRange); + const basegfx::B2DPolygon aPoly = basegfx::utils::createPolygonFromRect(maRange); B2DPolyPolygon aPolygon(aPoly); const drawinglayer::primitive2d::Primitive2DReference aReference( new drawinglayer::primitive2d::PolyPolygonMarkerPrimitive2D( diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 6d86d188e7fb..adb5b964b01a 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -65,7 +65,7 @@ #include <svx/svxdlg.hxx> #include <svx/dialogs.hrc> -#include <basegfx/tools/zoomtools.hxx> +#include <basegfx/utils/zoomtools.hxx> #include <svx/zoom_def.hxx> #include <com/sun/star/document/XDocumentProperties.hpp> diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index bd963bc0d438..d30b3ed28a06 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -53,7 +53,7 @@ #include <algorithm> -#include <basegfx/tools/zoomtools.hxx> +#include <basegfx/utils/zoomtools.hxx> #define SPLIT_MARGIN 30 #define SPLIT_HANDLE_SIZE 5 diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 451debc49a45..f061437f1208 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -1538,7 +1538,7 @@ SdrPathObj* CustomAnimationEffect::createSdrPathObjFromPath() void CustomAnimationEffect::updateSdrPathObjFromPath( SdrPathObj& rPathObj ) { ::basegfx::B2DPolyPolygon aPolyPoly; - if( ::basegfx::tools::importFromSvgD( aPolyPoly, getPath(), true, nullptr ) ) + if( ::basegfx::utils::importFromSvgD( aPolyPoly, getPath(), true, nullptr ) ) { SdrObject* pObj = GetSdrObjectFromXShape( getTargetShape() ); if( pObj ) @@ -1547,12 +1547,12 @@ void CustomAnimationEffect::updateSdrPathObjFromPath( SdrPathObj& rPathObj ) if( pPage ) { const Size aPageSize( pPage->GetSize() ); - aPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix((double)aPageSize.Width(), (double)aPageSize.Height())); + aPolyPoly.transform(basegfx::utils::createScaleB2DHomMatrix((double)aPageSize.Width(), (double)aPageSize.Height())); } const ::tools::Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); const Point aCenter( aBoundRect.Center() ); - aPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(aCenter.X(), aCenter.Y())); + aPolyPoly.transform(basegfx::utils::createTranslateB2DHomMatrix(aCenter.X(), aCenter.Y())); } } @@ -1581,18 +1581,18 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj const Point aCenter( aBoundRect.Center() ); - aPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(-aCenter.X(), -aCenter.Y())); + aPolyPoly.transform(basegfx::utils::createTranslateB2DHomMatrix(-aCenter.X(), -aCenter.Y())); SdrPage* pPage = pObj->GetPage(); if( pPage ) { const Size aPageSize( pPage->GetSize() ); - aPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix( + aPolyPoly.transform(basegfx::utils::createScaleB2DHomMatrix( 1.0 / (double)aPageSize.Width(), 1.0 / (double)aPageSize.Height())); } } - setPath( ::basegfx::tools::exportToSvgD( aPolyPoly, true, true, true) ); + setPath( ::basegfx::utils::exportToSvgD( aPolyPoly, true, true, true) ); } EffectSequenceHelper::EffectSequenceHelper() diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 57f11cdebf51..e76db0d968b1 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -56,7 +56,7 @@ #include <com/sun/star/xml/dom/XNodeList.hpp> #include <com/sun/star/xml/dom/XNamedNodeMap.hpp> #include <rtl/ustring.hxx> -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/tools.hxx> #include <o3tl/enumarray.hxx> #include <xmloff/autolayout.hxx> diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index cc882a230eff..d6ee8cd82601 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -180,7 +180,7 @@ bool PathDragResize::EndSdrDrag(bool /*bCopy*/) if( pPathObj ) { const Point aRef( DragStat().Ref1() ); - basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-aRef.X(), -aRef.Y())); + basegfx::B2DHomMatrix aTrans(basegfx::utils::createTranslateB2DHomMatrix(-aRef.X(), -aRef.Y())); aTrans.scale(double(aXFact), double(aYFact)); aTrans.translate(aRef.X(), aRef.Y()); basegfx::B2DPolyPolygon aDragPoly(pPathObj->GetPathPoly()); @@ -371,7 +371,7 @@ void MotionPathTag::updatePathAttributes() if( mxPolyPoly.count() ) { aCandidate = mxPolyPoly.getB2DPolygon(0); - ::basegfx::tools::checkClosed( aCandidate ); + ::basegfx::utils::checkClosed( aCandidate ); } if( !aCandidate.isClosed() ) @@ -876,7 +876,7 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList ) aPos = mxOrigin->getPosition(); if( (aPos.X != maOriginPos.X) || (aPos.Y != maOriginPos.Y) ) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix( aPos.X - maOriginPos.X, aPos.Y - maOriginPos.Y)); mxPolyPoly.transform( aTransform ); mpPathObj->SetPathPoly( mxPolyPoly ); diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index 755f4726f34c..34b85b629ae6 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -733,7 +733,7 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, SdrTextObj con aObjectTransform.translate(maOutRect.TopLeft().X(), maOutRect.TopLeft().Y()); // create geometry using unit range and object transform - basegfx::B2DPolyPolygon aGeometry(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolyPolygon aGeometry(basegfx::utils::createUnitPolygon()); aGeometry.transform(aObjectTransform); // apply line pattern if wanted @@ -745,7 +745,7 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, SdrTextObj con aPattern.push_back(1.0 * fFactor); basegfx::B2DPolyPolygon aDashed; - basegfx::tools::applyLineDashing(aGeometry, aPattern, &aDashed); + basegfx::utils::applyLineDashing(aGeometry, aPattern, &aDashed); aGeometry = aDashed; } diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx index ff60c40925e4..43cf1c557788 100644 --- a/sd/source/ui/func/fucon3d.cxx +++ b/sd/source/ui/func/fucon3d.cxx @@ -112,7 +112,7 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape() ::basegfx::B2DPolygon aB2DPolygon(aXPoly.getB2DPolygon()); if(aB2DPolygon.areControlPointsUsed()) { - aB2DPolygon = ::basegfx::tools::adaptiveSubdivideByAngle(aB2DPolygon); + aB2DPolygon = ::basegfx::utils::adaptiveSubdivideByAngle(aB2DPolygon); } p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aB2DPolygon)); @@ -139,7 +139,7 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape() ::basegfx::B2DPolygon aB2DPolygon(aXPoly.getB2DPolygon()); if(aB2DPolygon.areControlPointsUsed()) { - aB2DPolygon = ::basegfx::tools::adaptiveSubdivideByAngle(aB2DPolygon); + aB2DPolygon = ::basegfx::utils::adaptiveSubdivideByAngle(aB2DPolygon); } p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aB2DPolygon)); break; @@ -147,10 +147,10 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape() case SID_3D_TORUS: { - ::basegfx::B2DPolygon aB2DPolygon(::basegfx::tools::createPolygonFromCircle(::basegfx::B2DPoint(1000.0, 0.0), 500.0)); + ::basegfx::B2DPolygon aB2DPolygon(::basegfx::utils::createPolygonFromCircle(::basegfx::B2DPoint(1000.0, 0.0), 500.0)); if(aB2DPolygon.areControlPointsUsed()) { - aB2DPolygon = ::basegfx::tools::adaptiveSubdivideByAngle(aB2DPolygon); + aB2DPolygon = ::basegfx::utils::adaptiveSubdivideByAngle(aB2DPolygon); } p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aB2DPolygon)); break; diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index ce8fbdde05c5..a2227fd96bc9 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -324,7 +324,7 @@ SdrObject* FuConstructBezierPolygon::CreateDefaultObject(const sal_uInt16 nID, c { const sal_Int32 nWdt(rRectangle.GetWidth() / 2); const sal_Int32 nHgt(rRectangle.GetHeight() / 2); - const basegfx::B2DPolygon aInnerPoly(basegfx::tools::createPolygonFromEllipse(basegfx::B2DPoint(rRectangle.Center().X(), rRectangle.Center().Y()), nWdt, nHgt)); + const basegfx::B2DPolygon aInnerPoly(basegfx::utils::createPolygonFromEllipse(basegfx::B2DPoint(rRectangle.Center().X(), rRectangle.Center().Y()), nWdt, nHgt)); aPoly.append(aInnerPoly); break; diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index a78f7fbbd2e2..66cd8bbdb111 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -557,7 +557,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject const * pObj if( !aCircle.count() ) { ::basegfx::B2DPolygon aNewCircle; - aNewCircle = ::basegfx::tools::createPolygonFromEllipse(::basegfx::B2DPoint(0.0, 0.0), 250.0, 250.0); + aNewCircle = ::basegfx::utils::createPolygonFromEllipse(::basegfx::B2DPoint(0.0, 0.0), 250.0, 250.0); aNewCircle.setClosed(true); aCircle.append(aNewCircle); } diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx index b287cdd38dec..ba05725e2016 100644 --- a/sd/source/ui/func/fumorph.cxx +++ b/sd/source/ui/func/fumorph.cxx @@ -126,13 +126,13 @@ void FuMorph::DoExecute( SfxRequest& ) // perform morphing if(aPolyPoly1.count() && aPolyPoly2.count()) { - aPolyPoly1 = ::basegfx::tools::correctOrientations(aPolyPoly1); + aPolyPoly1 = ::basegfx::utils::correctOrientations(aPolyPoly1); aPolyPoly1.removeDoublePoints(); - ::basegfx::B2VectorOrientation eIsClockwise1(::basegfx::tools::getOrientation(aPolyPoly1.getB2DPolygon(0))); + ::basegfx::B2VectorOrientation eIsClockwise1(::basegfx::utils::getOrientation(aPolyPoly1.getB2DPolygon(0))); - aPolyPoly2 = ::basegfx::tools::correctOrientations(aPolyPoly2); + aPolyPoly2 = ::basegfx::utils::correctOrientations(aPolyPoly2); aPolyPoly2.removeDoublePoints(); - ::basegfx::B2VectorOrientation eIsClockwise2(::basegfx::tools::getOrientation(aPolyPoly2.getB2DPolygon(0))); + ::basegfx::B2VectorOrientation eIsClockwise2(::basegfx::utils::getOrientation(aPolyPoly2.getB2DPolygon(0))); // set same orientation if(eIsClockwise1 != eIsClockwise2) @@ -195,7 +195,7 @@ void FuMorph::DoExecute( SfxRequest& ) { // length of step in dest poly ::basegfx::B2DPolygon aRetval; - const double fStep(::basegfx::tools::getLength(rCandidate) / (double)(rCandidate.isClosed() ? nNum : nNum - 1)); + const double fStep(::basegfx::utils::getLength(rCandidate) / (double)(rCandidate.isClosed() ? nNum : nNum - 1)); double fDestPos(0.0); double fSrcPos(0.0); sal_uInt32 nSrcPos(0); @@ -250,12 +250,12 @@ void FuMorph::ImpEqualizePolyPointCount( ::basegfx::B2DPolygon aPoly1(ImpGetExpandedPolygon(rSmall, nCnt)); // create transformation for rBig to do the compare - const ::basegfx::B2DRange aSrcSize(::basegfx::tools::getRange(rBig)); + const ::basegfx::B2DRange aSrcSize(::basegfx::utils::getRange(rBig)); const ::basegfx::B2DPoint aSrcPos(aSrcSize.getCenter()); - const ::basegfx::B2DRange aDstSize(::basegfx::tools::getRange(rSmall)); + const ::basegfx::B2DRange aDstSize(::basegfx::utils::getRange(rSmall)); const ::basegfx::B2DPoint aDstPos(aDstSize.getCenter()); - basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-aSrcPos.getX(), -aSrcPos.getY())); + basegfx::B2DHomMatrix aTrans(basegfx::utils::createTranslateB2DHomMatrix(-aSrcPos.getX(), -aSrcPos.getY())); aTrans.scale(aDstSize.getWidth() / aSrcSize.getWidth(), aDstSize.getHeight() / aSrcSize.getHeight()); aTrans.translate(aDstPos.getX(), aDstPos.getY()); @@ -306,13 +306,13 @@ void FuMorph::ImpAddPolys( while(rSmaller.count() < rBigger.count()) { const ::basegfx::B2DPolygon aToBeCopied(rBigger.getB2DPolygon(rSmaller.count())); - const ::basegfx::B2DRange aToBeCopiedPolySize(::basegfx::tools::getRange(aToBeCopied)); + const ::basegfx::B2DRange aToBeCopiedPolySize(::basegfx::utils::getRange(aToBeCopied)); ::basegfx::B2DPoint aNewPoint(aToBeCopiedPolySize.getCenter()); ::basegfx::B2DPolygon aNewPoly; - const ::basegfx::B2DRange aSrcSize(::basegfx::tools::getRange(rBigger.getB2DPolygon(0))); + const ::basegfx::B2DRange aSrcSize(::basegfx::utils::getRange(rBigger.getB2DPolygon(0))); const ::basegfx::B2DPoint aSrcPos(aSrcSize.getCenter()); - const ::basegfx::B2DRange aDstSize(::basegfx::tools::getRange(rSmaller.getB2DPolygon(0))); + const ::basegfx::B2DRange aDstSize(::basegfx::utils::getRange(rSmaller.getB2DPolygon(0))); const ::basegfx::B2DPoint aDstPos(aDstSize.getCenter()); aNewPoint = aNewPoint - aSrcPos + aDstPos; @@ -488,9 +488,9 @@ bool FuMorph::ImpMorphPolygons( { if(nSteps) { - const ::basegfx::B2DRange aStartPolySize(::basegfx::tools::getRange(rPolyPoly1)); + const ::basegfx::B2DRange aStartPolySize(::basegfx::utils::getRange(rPolyPoly1)); const ::basegfx::B2DPoint aStartCenter(aStartPolySize.getCenter()); - const ::basegfx::B2DRange aEndPolySize(::basegfx::tools::getRange(rPolyPoly2)); + const ::basegfx::B2DRange aEndPolySize(::basegfx::utils::getRange(rPolyPoly2)); const ::basegfx::B2DPoint aEndCenter(aEndPolySize.getCenter()); const ::basegfx::B2DPoint aDelta(aEndCenter - aStartCenter); const double fFactor(1.0 / (nSteps + 1)); @@ -501,12 +501,12 @@ bool FuMorph::ImpMorphPolygons( fValue += fFactor; ::basegfx::B2DPolyPolygon* pNewPolyPoly2D = ImpCreateMorphedPolygon(rPolyPoly1, rPolyPoly2, fValue); - const ::basegfx::B2DRange aNewPolySize(::basegfx::tools::getRange(*pNewPolyPoly2D)); + const ::basegfx::B2DRange aNewPolySize(::basegfx::utils::getRange(*pNewPolyPoly2D)); const ::basegfx::B2DPoint aNewS(aNewPolySize.getCenter()); const ::basegfx::B2DPoint aRealS(aStartCenter + (aDelta * fValue)); const ::basegfx::B2DPoint aDiff(aRealS - aNewS); - pNewPolyPoly2D->transform(basegfx::tools::createTranslateB2DHomMatrix(aDiff)); + pNewPolyPoly2D->transform(basegfx::utils::createTranslateB2DHomMatrix(aDiff)); rPolyPolyList3D.push_back( pNewPolyPoly2D ); } } diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx index 67154a396bc8..4d893c704215 100644 --- a/sd/source/ui/presenter/PresenterCanvas.cxx +++ b/sd/source/ui/presenter/PresenterCanvas.cxx @@ -24,7 +24,7 @@ #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolygonclipper.hxx> #include <basegfx/range/b2drectangle.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <canvas/canvastools.hxx> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase.hxx> @@ -528,7 +528,7 @@ css::rendering::ViewState PresenterCanvas::MergeViewState ( // transformation. aViewState.Clip = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( xDevice, - ::basegfx::B2DPolyPolygon(::basegfx::tools::createPolygonFromRect(aWindowRange))); + ::basegfx::B2DPolyPolygon(::basegfx::utils::createPolygonFromRect(aWindowRange))); } else { @@ -540,7 +540,7 @@ css::rendering::ViewState PresenterCanvas::MergeViewState ( ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D( aViewState.Clip)); const ::basegfx::B2DPolyPolygon aClippedClipPolygon ( - ::basegfx::tools::clipPolyPolygonOnRange( + ::basegfx::utils::clipPolyPolygonOnRange( aClipPolygon, aWindowRange, true, /* bInside */ @@ -646,7 +646,7 @@ Reference<rendering::XPolyPolygon2D> PresenterCanvas::UpdateSpriteClip ( ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(rxOriginalClip)); ::basegfx::B2DRectangle aWindowRange (nMinX, nMinY, nMaxX, nMaxY); const ::basegfx::B2DPolyPolygon aClippedClipPolygon ( - ::basegfx::tools::clipPolyPolygonOnRange( + ::basegfx::utils::clipPolyPolygonOnRange( aOriginalClip, aWindowRange, true, /* bInside */ diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx index 6c910c27a856..cccbaf6ccf37 100644 --- a/sd/source/ui/slideshow/slideshowimpl.hxx +++ b/sd/source/ui/slideshow/slideshowimpl.hxx @@ -48,7 +48,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <vcl/help.hxx> #include <unotools/pathoptions.hxx> #include <unotools/saveopt.hxx> diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx index 1a4f79f81ae8..575caa7fd107 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.cxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx @@ -293,7 +293,7 @@ void SAL_CALL SlideShowView::clear() const Size aWindowSize( mrOutputWindow.GetSizePixel() ); - ::basegfx::B2DPolygon aPoly( ::basegfx::tools::createPolygonFromRect( + ::basegfx::B2DPolygon aPoly( ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle(0.0,0.0, aWindowSize.Width(), aWindowSize.Height() ) ) ); @@ -365,7 +365,7 @@ geometry::AffineMatrix2D SAL_CALL SlideShowView::getTransformation( ) mrOutputWindow.SetPresentationArea( maPresentationArea ); // scale presentation into available window rect (minus 10%); center in the window - const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aMatrix(basegfx::utils::createScaleTranslateB2DHomMatrix( aOutputSize.Width(), aOutputSize.Height(), aOutputOffset.X(), aOutputOffset.Y())); geometry::AffineMatrix2D aRes; diff --git a/sd/source/ui/slideshow/slideshowviewimpl.hxx b/sd/source/ui/slideshow/slideshowviewimpl.hxx index ef6291f644b2..bbd9c15904d9 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.hxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.hxx @@ -37,7 +37,7 @@ #include <com/sun/star/drawing/XDrawPagesSupplier.hpp> #include <com/sun/star/rendering/XSpriteCanvas.hpp> #include <basegfx/matrix/b2dhommatrix.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <cppcanvas/spritecanvas.hxx> #include <vcl/help.hxx> #include <unotools/pathoptions.hxx> diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx index 2da220ed845d..af0323dc5e36 100644 --- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx +++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx @@ -35,7 +35,7 @@ #include <vcl/virdev.hxx> #include <basegfx/range/b2drectangle.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> @@ -214,7 +214,7 @@ Point InsertionIndicatorOverlay::PaintRepresentatives ( rContent.SetFillColor(COL_BLACK); rContent.SetLineColor(); rContent.DrawTransparent( - ::basegfx::B2DPolyPolygon(::basegfx::tools::createPolygonFromRect( + ::basegfx::B2DPolyPolygon(::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle(aBox.Left(), aBox.Top(), aBox.Right()+1, aBox.Bottom()+1), 0, 0)), diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 016206429c1c..a641bd2df90a 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -266,7 +266,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected // create dashed border { // create object polygon - basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aPolygon(basegfx::utils::createUnitPolygon()); aPolygon.transform(aObjectMatrix); // create line and stroke attribute @@ -407,7 +407,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected false)); // fill text matrix - const basegfx::B2DHomMatrix aTextMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aTextMatrix(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aTextSizeAttribute.getX(), aTextSizeAttribute.getY(), fShearX, fRotate, diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 8fea3f44825f..ed5d0bca88ec 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -77,7 +77,7 @@ #include "controller/SlsSelectionObserver.hxx" #include "view/SlideSorterView.hxx" -#include <basegfx/tools/zoomtools.hxx> +#include <basegfx/utils/zoomtools.hxx> #include "Window.hxx" #include "fupoor.hxx" diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx index 578933c07ff1..e35ce444385f 100644 --- a/sdext/source/pdfimport/test/tests.cxx +++ b/sdext/source/pdfimport/test/tests.cxx @@ -43,7 +43,7 @@ #include <com/sun/star/rendering/BlendMode.hpp> #include <basegfx/matrix/b2dhommatrix.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> @@ -231,7 +231,7 @@ namespace const char sExportString[] = "m53570 7650-35430 24100"; CPPUNIT_ASSERT_EQUAL_MESSAGE( "Stroke is m535.7 518.5-354.3-241", - OUString(sExportString), basegfx::tools::exportToSvgD( aPath, true, true, false ) ); + OUString(sExportString), basegfx::utils::exportToSvgD( aPath, true, true, false ) ); m_bGreenStrokeSeen = true; } @@ -253,7 +253,7 @@ namespace const char sExportString[] = "m49890 5670.00000000001-35430 24090"; CPPUNIT_ASSERT_EQUAL_MESSAGE( "Stroke is m49890 5670.00000000001-35430 24090", - OUString(sExportString), basegfx::tools::exportToSvgD( aPath, true, true, false ) ); + OUString(sExportString), basegfx::utils::exportToSvgD( aPath, true, true, false ) ); m_bDashedLineSeen = true; } @@ -311,7 +311,7 @@ namespace const char sExportString[] = "m12050 49610c-4310 0-7800-3490-7800-7800 0-4300 " "3490-7790 7800-7790 4300 0 7790 3490 7790 7790 0 4310-3490 7800-7790 7800z"; CPPUNIT_ASSERT_EQUAL_MESSAGE( "Stroke is a 4-bezier circle", - OUString(sExportString), basegfx::tools::exportToSvgD( aPath, true, true, false ) ); + OUString(sExportString), basegfx::utils::exportToSvgD( aPath, true, true, false ) ); m_bRedCircleSeen = true; } @@ -322,7 +322,7 @@ namespace basegfx::B2DPolyPolygon aCurClip = getCurrentContext().Clip; if( aCurClip.count() ) // #i92985# adapted API from (..., false, false) to (..., true, false) - aNewClip = basegfx::tools::clipPolyPolygonOnPolyPolygon( aCurClip, aNewClip, true, false ); + aNewClip = basegfx::utils::clipPolyPolygonOnPolyPolygon( aCurClip, aNewClip, true, false ); getCurrentContext().Clip = aNewClip; } @@ -333,7 +333,7 @@ namespace basegfx::B2DPolyPolygon aCurClip = getCurrentContext().Clip; if( aCurClip.count() ) // #i92985# adapted API from (..., false, false) to (..., true, false) - aNewClip = basegfx::tools::clipPolyPolygonOnPolyPolygon( aCurClip, aNewClip, true, false ); + aNewClip = basegfx::utils::clipPolyPolygonOnPolyPolygon( aCurClip, aNewClip, true, false ); getCurrentContext().Clip = aNewClip; } diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index ceeda102db2f..aa69b74ef44f 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -329,7 +329,7 @@ void DrawXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* >:: aBuf.append( ' ' ); aBuf.append( convPx2mmPrec2(elem.h)*100.0 ); aProps[ "svg:viewBox" ] = aBuf.makeStringAndClear(); - aProps[ "svg:d" ] = basegfx::tools::exportToSvgD( elem.PolyPoly, false, true, false ); + aProps[ "svg:d" ] = basegfx::utils::exportToSvgD( elem.PolyPoly, false, true, false ); m_rEmitContext.rEmitter.beginTag( "draw:path", aProps ); m_rEmitContext.rEmitter.endTag( "draw:path" ); diff --git a/sdext/source/pdfimport/tree/genericelements.cxx b/sdext/source/pdfimport/tree/genericelements.cxx index cd704ad19adf..31451cd3a00d 100644 --- a/sdext/source/pdfimport/tree/genericelements.cxx +++ b/sdext/source/pdfimport/tree/genericelements.cxx @@ -142,9 +142,9 @@ void PolyPolyElement::updateGeometry() { basegfx::B2DRange aRange; if( PolyPoly.areControlPointsUsed() ) - aRange = basegfx::tools::getRange( basegfx::tools::adaptiveSubdivideByAngle( PolyPoly ) ); + aRange = basegfx::utils::getRange( basegfx::utils::adaptiveSubdivideByAngle( PolyPoly ) ); else - aRange = basegfx::tools::getRange( PolyPoly ); + aRange = basegfx::utils::getRange( PolyPoly ); x = aRange.getMinX(); y = aRange.getMinY(); w = aRange.getWidth(); diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx index 29b8a56b6a0b..d7d5ab756722 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx @@ -33,7 +33,7 @@ #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/polygon/b2dpolygonclipper.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/range/b2irange.hxx> #include <basegfx/range/b2drectangle.hxx> @@ -437,7 +437,7 @@ void PDFIProcessor::intersectClip(const uno::Reference< rendering::XPolyPolygon2 basegfx::B2DPolyPolygon aCurClip = getCurrentContext().Clip; if( aCurClip.count() ) // #i92985# adapted API from (..., false, false) to (..., true, false) - aNewClip = basegfx::tools::clipPolyPolygonOnPolyPolygon( aCurClip, aNewClip, true, false ); + aNewClip = basegfx::utils::clipPolyPolygonOnPolyPolygon( aCurClip, aNewClip, true, false ); getCurrentContext().Clip = aNewClip; } @@ -450,7 +450,7 @@ void PDFIProcessor::intersectEoClip(const uno::Reference< rendering::XPolyPolygo basegfx::B2DPolyPolygon aCurClip = getCurrentContext().Clip; if( aCurClip.count() ) // #i92985# adapted API from (..., false, false) to (..., true, false) - aNewClip = basegfx::tools::clipPolyPolygonOnPolyPolygon( aCurClip, aNewClip, true, false ); + aNewClip = basegfx::utils::clipPolyPolygonOnPolyPolygon( aCurClip, aNewClip, true, false ); getCurrentContext().Clip = aNewClip; } @@ -517,7 +517,7 @@ void PDFIProcessor::startPage( const geometry::RealSize2D& rSize ) { // initial clip is to page bounds getCurrentContext().Clip = basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRange( 0, 0, rSize.Width, rSize.Height ))); sal_Int32 nNextPageNr = m_pCurPage ? m_pCurPage->PageNumber+1 : 1; diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx index 591920e18613..d2d028723ec7 100644 --- a/sdext/source/pdfimport/tree/writertreevisiting.cxx +++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx @@ -287,7 +287,7 @@ void WriterXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* > aBuf.append( ' ' ); aBuf.append( convPx2mmPrec2(elem.h)*100.0 ); aProps[ "svg:viewBox" ] = aBuf.makeStringAndClear(); - aProps[ "svg:d" ] = basegfx::tools::exportToSvgD( elem.PolyPoly, true, true, false ); + aProps[ "svg:d" ] = basegfx::utils::exportToSvgD( elem.PolyPoly, true, true, false ); m_rEmitContext.rEmitter.beginTag( "draw:path", aProps ); m_rEmitContext.rEmitter.endTag( "draw:path" ); diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index 1fa018c5bd31..43cae17bc7df 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -54,8 +54,8 @@ #include "basegfx/point/b2dpoint.hxx" #include "basegfx/polygon/b2dpolypolygon.hxx" #include "basegfx/polygon/b2dpolygon.hxx" -#include "basegfx/tools/canvastools.hxx" -#include "basegfx/tools/unopolypolygon.hxx" +#include "basegfx/utils/canvastools.hxx" +#include "basegfx/utils/unopolypolygon.hxx" #include <vcl/metric.hxx> #include <vcl/font.hxx> diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 03b4da82b2fc..4f80c0d6bff5 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -145,7 +145,7 @@ bool SfxApplication::loadBrandSvg(const char *pName, BitmapEx &rBitmap, int nWid const double fAspectRatio( aRange.getHeight() == 0.0 ? 1.0 : aRange.getWidth()/aRange.getHeight()); basegfx::B2DHomMatrix aTransform( - basegfx::tools::createTranslateB2DHomMatrix( + basegfx::utils::createTranslateB2DHomMatrix( -aRange.getMinX(), -aRange.getMinY())); aTransform.scale( diff --git a/sfx2/source/control/emojiviewitem.cxx b/sfx2/source/control/emojiviewitem.cxx index b7c14e874de8..1408d8d215a7 100644 --- a/sfx2/source/control/emojiviewitem.cxx +++ b/sfx2/source/control/emojiviewitem.cxx @@ -26,7 +26,7 @@ #include <sfx2/strings.hrc> using namespace basegfx; -using namespace basegfx::tools; +using namespace basegfx::utils; using namespace drawinglayer::attribute; using namespace drawinglayer::primitive2d; diff --git a/sfx2/source/control/templateviewitem.cxx b/sfx2/source/control/templateviewitem.cxx index 02c180349cf9..5ebc0ee58d60 100644 --- a/sfx2/source/control/templateviewitem.cxx +++ b/sfx2/source/control/templateviewitem.cxx @@ -27,7 +27,7 @@ #include "bitmaps.hlst" using namespace basegfx; -using namespace basegfx::tools; +using namespace basegfx::utils; using namespace drawinglayer::attribute; using namespace drawinglayer::primitive2d; diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index d6a02103a500..badda16bd1a6 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -42,7 +42,7 @@ #include <memory> using namespace basegfx; -using namespace basegfx::tools; +using namespace basegfx::utils; using namespace drawinglayer::attribute; using namespace drawinglayer::primitive2d; diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index 4baef695440d..852e091ef909 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -40,7 +40,7 @@ #include <vcl/textdata.hxx> using namespace basegfx; -using namespace basegfx::tools; +using namespace basegfx::utils; using namespace ::com::sun::star; using namespace drawinglayer::attribute; using namespace drawinglayer::primitive2d; diff --git a/slideshow/inc/pch/precompiled_slideshow.hxx b/slideshow/inc/pch/precompiled_slideshow.hxx index bea7b8f63a5c..a906763d239d 100644 --- a/slideshow/inc/pch/precompiled_slideshow.hxx +++ b/slideshow/inc/pch/precompiled_slideshow.hxx @@ -159,11 +159,11 @@ #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/range/b2drange.hxx> #include <basegfx/range/basicrange.hxx> -#include <basegfx/tools/canvastools.hxx> #include <basegfx/tuple/b2dtuple.hxx> #include <basegfx/tuple/b2i64tuple.hxx> #include <basegfx/tuple/b2ituple.hxx> #include <basegfx/tuple/b3dtuple.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/vector/b2dsize.hxx> #include <basegfx/vector/b2dvector.hxx> #include <basegfx/vector/b2enums.hxx> diff --git a/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx b/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx index 66271718f36e..abf943ce4597 100644 --- a/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx +++ b/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx @@ -22,7 +22,7 @@ #include "simplecontinuousactivitybase.hxx" -#include <basegfx/tools/keystoplerp.hxx> +#include <basegfx/utils/keystoplerp.hxx> #include <vector> @@ -67,7 +67,7 @@ namespace slideshow sal_uInt32 nRepeatCount ) const override; private: - const ::basegfx::tools::KeyStopLerp maLerper; + const ::basegfx::utils::KeyStopLerp maLerper; }; } } diff --git a/slideshow/source/engine/activities/interpolation.hxx b/slideshow/source/engine/activities/interpolation.hxx index 2418f59c6d10..6da629695eed 100644 --- a/slideshow/source/engine/activities/interpolation.hxx +++ b/slideshow/source/engine/activities/interpolation.hxx @@ -20,11 +20,11 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_ACTIVITIES_INTERPOLATION_HXX #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_ACTIVITIES_INTERPOLATION_HXX -#include <basegfx/tools/lerp.hxx> +#include <basegfx/utils/lerp.hxx> namespace basegfx { - namespace tools + namespace utils { // Interpolator specializations // ============================ @@ -81,7 +81,7 @@ namespace slideshow const ValueType& rTo, double t ) const { - return basegfx::tools::lerp( rFrom, rTo, t ); + return basegfx::utils::lerp( rFrom, rTo, t ); } }; diff --git a/slideshow/source/engine/animationfactory.cxx b/slideshow/source/engine/animationfactory.cxx index 607e79b973af..1d666629302c 100644 --- a/slideshow/source/engine/animationfactory.cxx +++ b/slideshow/source/engine/animationfactory.cxx @@ -223,7 +223,7 @@ namespace slideshow ::basegfx::B2DPolyPolygon aPolyPoly; - ENSURE_OR_THROW( ::basegfx::tools::importFromSvgD( aPolyPoly, rSVGDPath, false, nullptr ), + ENSURE_OR_THROW( ::basegfx::utils::importFromSvgD( aPolyPoly, rSVGDPath, false, nullptr ), "PathAnimation::PathAnimation(): failed to parse SVG:d path" ); ENSURE_OR_THROW( aPolyPoly.count() == 1, "PathAnimation::PathAnimation(): motion path consists of multiple/zero polygon(s)" ); @@ -231,7 +231,7 @@ namespace slideshow // TODO(F2): Since getPositionRelative() currently // cannot handle beziers, have to subdivide. // AW: Should be no longer necessary; getPositionRelative is now bezier-safe - maPathPoly = ::basegfx::tools::adaptiveSubdivideByAngle(aPolyPoly.getB2DPolygon(0) ); + maPathPoly = ::basegfx::utils::adaptiveSubdivideByAngle(aPolyPoly.getB2DPolygon(0) ); } virtual ~PathAnimation() override @@ -302,7 +302,7 @@ namespace slideshow ENSURE_OR_RETURN_FALSE( mpAttrLayer && mpShape, "PathAnimation::operator(): Invalid ShapeAttributeLayer" ); - ::basegfx::B2DPoint rOutPos = ::basegfx::tools::getPositionRelative( maPathPoly, + ::basegfx::B2DPoint rOutPos = ::basegfx::utils::getPositionRelative( maPathPoly, nValue ); // TODO(F1): Determine whether the path is diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx index 00d6925becc1..bff671de8804 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx @@ -639,7 +639,7 @@ void ActivityImpl::updateShapeAttributes( } basegfx::B2DPolygon clipPoly( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRectangle( clipPos.getX(), clipPos.getY(), clipPos.getX() + fScrollWidth, diff --git a/slideshow/source/engine/shapes/viewappletshape.cxx b/slideshow/source/engine/shapes/viewappletshape.cxx index d7a9b8a41644..58ef4c8cdff2 100644 --- a/slideshow/source/engine/shapes/viewappletshape.cxx +++ b/slideshow/source/engine/shapes/viewappletshape.cxx @@ -25,7 +25,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/range/b2irange.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <cppcanvas/spritecanvas.hxx> #include <canvas/canvastools.hxx> diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.cxx b/slideshow/source/engine/shapes/viewbackgroundshape.cxx index c2a3d533b18c..10e5d2c4eb6a 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.cxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.cxx @@ -105,7 +105,7 @@ namespace slideshow aLinearTransform.set( 1, 2, 0.0 ); pBitmapCanvas->setTransformation( aLinearTransform ); - const basegfx::B2DHomMatrix aShapeTransform(basegfx::tools::createScaleTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aShapeTransform(basegfx::utils::createScaleTranslateB2DHomMatrix( maBounds.getWidth(), maBounds.getHeight(), maBounds.getMinX(), maBounds.getMinY())); diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index d08933acc0e1..a518fdae5780 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -32,7 +32,7 @@ #include <vcl/window.hxx> #include <vcl/graph.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/polygon/b2dpolygon.hxx> @@ -198,7 +198,7 @@ namespace slideshow const ::basegfx::B2DVector aScale( rBounds.getWidth() / aBmpSize.Width(), rBounds.getHeight() / aBmpSize.Height() ); - const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createScaleTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aTranslation(basegfx::utils::createScaleTranslateB2DHomMatrix( aScale, rBounds.getMinimum())); ::canvas::tools::setRenderStateTransform( aRenderState, aTranslation ); diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index c88d4e85617f..05f9fb534e7e 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -683,7 +683,7 @@ namespace slideshow aBitmapTransform.invert(); - const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aTranslation(basegfx::utils::createTranslateB2DHomMatrix( aTmpRect.getMinX(), aTmpRect.getMinY())); aBitmapTransform = aBitmapTransform * aTranslation; diff --git a/slideshow/source/engine/slide/layer.cxx b/slideshow/source/engine/slide/layer.cxx index dd2da81ba1e0..5e5008f942ec 100644 --- a/slideshow/source/engine/slide/layer.cxx +++ b/slideshow/source/engine/slide/layer.cxx @@ -215,8 +215,8 @@ namespace slideshow // clipping, and render each shape that intersects with // the calculated update area ::basegfx::B2DPolyPolygon aClip( maUpdateAreas.solveCrossovers() ); - aClip = ::basegfx::tools::stripNeutralPolygons(aClip); - aClip = ::basegfx::tools::stripDispensablePolygons(aClip); + aClip = ::basegfx::utils::stripNeutralPolygons(aClip); + aClip = ::basegfx::utils::stripDispensablePolygons(aClip); // actually, if there happen to be shapes with zero // update area in the maUpdateAreas vector, the diff --git a/slideshow/source/engine/slidebitmap.cxx b/slideshow/source/engine/slidebitmap.cxx index 3dd5a329b022..2accdd74dcb2 100644 --- a/slideshow/source/engine/slidebitmap.cxx +++ b/slideshow/source/engine/slidebitmap.cxx @@ -30,7 +30,7 @@ #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <canvas/canvastools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> using namespace ::com::sun::star; @@ -64,7 +64,7 @@ namespace slideshow rendering::RenderState aRenderState; ::canvas::tools::initRenderState( aRenderState ); - const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createTranslateB2DHomMatrix(maOutputPos)); + const basegfx::B2DHomMatrix aTranslation(basegfx::utils::createTranslateB2DHomMatrix(maOutputPos)); ::canvas::tools::setRenderStateTransform( aRenderState, aTranslation ); try diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 2aa66dc29c1d..fc54b5eecce2 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -44,7 +44,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <vcl/font.hxx> #include "rtl/ref.hxx" diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx index 703c1a5d92a7..6ebe350b9c9c 100644 --- a/slideshow/source/engine/slideview.cxx +++ b/slideshow/source/engine/slideview.cxx @@ -45,7 +45,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolygonclipper.hxx> #include <basegfx/polygon/b2dpolypolygoncutter.hxx> @@ -117,11 +117,11 @@ basegfx::B2DPolyPolygon createClipPolygon( const basegfx::B2DPolyPolygon& rCl if(rClip.count()) { - return basegfx::tools::clipPolyPolygonOnRange(rClip, aClipRange, true, false); + return basegfx::utils::clipPolyPolygonOnRange(rClip, aClipRange, true, false); } else { - return basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(aClipRange)); + return basegfx::B2DPolyPolygon(basegfx::utils::createPolygonFromRect(aClipRange)); } } @@ -139,14 +139,14 @@ basegfx::B2DPolyPolygon prepareClip( const basegfx::B2DPolyPolygon& rClip ) // TODO(P2): unnecessary, once XCanvas is correctly handling this // AW: Should be no longer necessary; tools are now bezier-safe if( aClip.areControlPointsUsed() ) - aClip = basegfx::tools::adaptiveSubdivideByAngle( aClip ); + aClip = basegfx::utils::adaptiveSubdivideByAngle( aClip ); // normalize polygon, preparation for clipping // in updateCanvas() - aClip = basegfx::tools::correctOrientations(aClip); - aClip = basegfx::tools::solveCrossovers(aClip); - aClip = basegfx::tools::stripNeutralPolygons(aClip); - aClip = basegfx::tools::stripDispensablePolygons(aClip); + aClip = basegfx::utils::correctOrientations(aClip); + aClip = basegfx::utils::solveCrossovers(aClip); + aClip = basegfx::utils::stripNeutralPolygons(aClip); + aClip = basegfx::utils::stripDispensablePolygons(aClip); return aClip; } @@ -173,7 +173,7 @@ void clearRect( ::cppcanvas::CanvasSharedPtr const& pCanvas, // depending on the slide content a one pixel wide // line will show to the bottom and the right. const ::basegfx::B2DPolygon aPoly( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( basegfx::B2DRange(rArea))); ::cppcanvas::PolyPolygonSharedPtr pPolyPoly( diff --git a/slideshow/source/engine/tools.cxx b/slideshow/source/engine/tools.cxx index 3061dc485ef7..eaac078f459e 100644 --- a/slideshow/source/engine/tools.cxx +++ b/slideshow/source/engine/tools.cxx @@ -37,7 +37,7 @@ #include <basegfx/vector/b2ivector.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/numeric/ftools.hxx> -#include <basegfx/tools/lerp.hxx> +#include <basegfx/utils/lerp.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <cppcanvas/basegfxfactory.hxx> @@ -464,7 +464,7 @@ namespace slideshow { if( !pAttr ) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleTranslateB2DHomMatrix( rShapeBounds.getWidth(), rShapeBounds.getHeight(), rShapeBounds.getMinX(), rShapeBounds.getMinY())); @@ -580,16 +580,16 @@ namespace slideshow const ::basegfx::B2DRange& rShapeBounds ) { return ::basegfx::B2DRectangle( - basegfx::tools::lerp( rShapeBounds.getMinX(), + basegfx::utils::lerp( rShapeBounds.getMinX(), rShapeBounds.getMaxX(), rUnitBounds.getMinX() ), - basegfx::tools::lerp( rShapeBounds.getMinY(), + basegfx::utils::lerp( rShapeBounds.getMinY(), rShapeBounds.getMaxY(), rUnitBounds.getMinY() ), - basegfx::tools::lerp( rShapeBounds.getMinX(), + basegfx::utils::lerp( rShapeBounds.getMinX(), rShapeBounds.getMaxX(), rUnitBounds.getMaxX() ), - basegfx::tools::lerp( rShapeBounds.getMinY(), + basegfx::utils::lerp( rShapeBounds.getMinY(), rShapeBounds.getMaxY(), rUnitBounds.getMaxY() ) ); } @@ -665,7 +665,7 @@ namespace slideshow ::cppcanvas::Color::IntSRGBA aFillColor ) { const ::basegfx::B2DPolygon aPoly( - ::basegfx::tools::createPolygonFromRect( rRect )); + ::basegfx::utils::createPolygonFromRect( rRect )); ::cppcanvas::PolyPolygonSharedPtr pPolyPoly( ::cppcanvas::BaseGfxFactory::createPolyPolygon( rCanvas, aPoly ) ); diff --git a/slideshow/source/engine/transitions/barndoorwipe.cxx b/slideshow/source/engine/transitions/barndoorwipe.cxx index a2896b3b59a5..ffe799dd1bb3 100644 --- a/slideshow/source/engine/transitions/barndoorwipe.cxx +++ b/slideshow/source/engine/transitions/barndoorwipe.cxx @@ -32,7 +32,7 @@ namespace internal { if (m_doubled) t /= 2.0; - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5)); aTransform.scale( ::basegfx::pruneScaleValue(t), 1.0 ); aTransform.translate( 0.5, 0.5 ); ::basegfx::B2DPolygon poly( m_unitRect ); @@ -40,7 +40,7 @@ namespace internal { ::basegfx::B2DPolyPolygon res(poly); if (m_doubled) { - aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5); aTransform.rotate( M_PI_2 ); aTransform.translate( 0.5, 0.5 ); poly.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/clippingfunctor.cxx b/slideshow/source/engine/transitions/clippingfunctor.cxx index b7e9384a56a4..57fcc38a207e 100644 --- a/slideshow/source/engine/transitions/clippingfunctor.cxx +++ b/slideshow/source/engine/transitions/clippingfunctor.cxx @@ -110,18 +110,18 @@ namespace slideshow break; case TransitionInfo::ReverseMethod::Rotate180: - maStaticTransformation = basegfx::tools::createRotateAroundPoint(0.5, 0.5, M_PI) + maStaticTransformation = basegfx::utils::createRotateAroundPoint(0.5, 0.5, M_PI) * maStaticTransformation; break; case TransitionInfo::ReverseMethod::FlipX: - maStaticTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0) + maStaticTransformation = basegfx::utils::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0) * maStaticTransformation; mbFlip = true; break; case TransitionInfo::ReverseMethod::FlipY: - maStaticTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0) + maStaticTransformation = basegfx::utils::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0) * maStaticTransformation; mbFlip = true; break; @@ -160,7 +160,7 @@ namespace slideshow // currently, clipper cannot cope with curves. Subdivide first // AW: Should be no longer necessary; clipping tools are now bezier-safe // if( aClipPoly.areControlPointsUsed() ) - // aClipPoly = ::basegfx::tools::adaptiveSubdivideByAngle(aClipPoly); + // aClipPoly = ::basegfx::utils::adaptiveSubdivideByAngle(aClipPoly); if( mbSubtractPolygon ) { @@ -178,16 +178,16 @@ namespace slideshow if(aBackgroundRange.isInside(aClipPolyRange)) { // combine polygons; make the clip polygon the hole - aClipPoly = ::basegfx::tools::correctOrientations(aClipPoly); + aClipPoly = ::basegfx::utils::correctOrientations(aClipPoly); aClipPoly.flip(); - aClipPoly.insert(0, basegfx::tools::createPolygonFromRect(aBackgroundRange)); + aClipPoly.insert(0, basegfx::utils::createPolygonFromRect(aBackgroundRange)); } else { // when not completely inside aBackgroundRange clipping is needed // subtract aClipPoly from aBackgroundRange - const basegfx::B2DPolyPolygon aBackgroundPolyPoly(basegfx::tools::createPolygonFromRect(aBackgroundRange)); - aClipPoly = basegfx::tools::solvePolygonOperationDiff(aBackgroundPolyPoly, aClipPoly); + const basegfx::B2DPolyPolygon aBackgroundPolyPoly(basegfx::utils::createPolygonFromRect(aBackgroundRange)); + aClipPoly = basegfx::utils::solvePolygonOperationDiff(aBackgroundPolyPoly, aClipPoly); } } diff --git a/slideshow/source/engine/transitions/clockwipe.cxx b/slideshow/source/engine/transitions/clockwipe.cxx index 647367a5ee57..d274d582856c 100644 --- a/slideshow/source/engine/transitions/clockwipe.cxx +++ b/slideshow/source/engine/transitions/clockwipe.cxx @@ -53,7 +53,7 @@ namespace internal { ::basegfx::B2DPolyPolygon ClockWipe::operator () ( double t ) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); ::basegfx::B2DPolygon poly( calcCenteredClock(t) ); poly.transform( aTransform ); return ::basegfx::B2DPolyPolygon(poly); diff --git a/slideshow/source/engine/transitions/combtransition.cxx b/slideshow/source/engine/transitions/combtransition.cxx index c553256bf89b..4185b5033752 100644 --- a/slideshow/source/engine/transitions/combtransition.cxx +++ b/slideshow/source/engine/transitions/combtransition.cxx @@ -45,7 +45,7 @@ basegfx::B2DPolyPolygon createClipPolygon( for( int i=nOffset; i<nNumStrips; i+=2 ) { aClipPoly.append( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( double(i)/nNumStrips, 0.0, double(i+1)/nNumStrips, 1.0) ) ); @@ -54,7 +54,7 @@ basegfx::B2DPolyPolygon createClipPolygon( // rotate polygons, such that the strips are parallel to // the given direction vector const ::basegfx::B2DVector aUpVec(0.0, 1.0); - basegfx::B2DHomMatrix aMatrix(basegfx::tools::createRotateAroundPoint(0.5, 0.5, aUpVec.angle( rDirection ))); + basegfx::B2DHomMatrix aMatrix(basegfx::utils::createRotateAroundPoint(0.5, 0.5, aUpVec.angle( rDirection ))); // blow up clip polygon to slide size aMatrix.scale( rSlideSize.getX(), @@ -135,14 +135,14 @@ void CombTransition::renderComb( double t, pLeavingBitmap->clip( aClipPolygon1 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin + (t * aPushDirection) ); - pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); + pCanvas->setTransformation(basegfx::utils::createTranslateB2DHomMatrix(p.getX(), p.getY())); pLeavingBitmap->draw( pCanvas ); // render even strips: pLeavingBitmap->clip( aClipPolygon2 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin - (t * aPushDirection) ); - pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); + pCanvas->setTransformation(basegfx::utils::createTranslateB2DHomMatrix(p.getX(), p.getY())); pLeavingBitmap->draw( pCanvas ); } @@ -153,14 +153,14 @@ void CombTransition::renderComb( double t, pEnteringBitmap->clip( aClipPolygon1 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin + ((t - 1.0) * aPushDirection) ); - pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); + pCanvas->setTransformation(basegfx::utils::createTranslateB2DHomMatrix(p.getX(), p.getY())); pEnteringBitmap->draw( pCanvas ); // render even strips: pEnteringBitmap->clip( aClipPolygon2 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin + ((1.0 - t) * aPushDirection) ); - pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); + pCanvas->setTransformation(basegfx::utils::createTranslateB2DHomMatrix(p.getX(), p.getY())); pEnteringBitmap->draw( pCanvas ); } diff --git a/slideshow/source/engine/transitions/ellipsewipe.cxx b/slideshow/source/engine/transitions/ellipsewipe.cxx index d6f968fc1ffc..9cf694683adb 100644 --- a/slideshow/source/engine/transitions/ellipsewipe.cxx +++ b/slideshow/source/engine/transitions/ellipsewipe.cxx @@ -36,14 +36,14 @@ namespace internal { { // oval: ::basegfx::B2DPolygon poly ( - ::basegfx::tools::createPolygonFromEllipse( rCenter, fRadius*2, fRadius ) ); //Horizontal Ellipse is rotated by 90 degress + ::basegfx::utils::createPolygonFromEllipse( rCenter, fRadius*2, fRadius ) ); //Horizontal Ellipse is rotated by 90 degress return ::basegfx::B2DPolyPolygon( poly ); } else { // circle: ::basegfx::B2DPolygon poly( - ::basegfx::tools::createPolygonFromCircle( rCenter, fRadius ) ); + ::basegfx::utils::createPolygonFromCircle( rCenter, fRadius ) ); return ::basegfx::B2DPolyPolygon( poly ); } } diff --git a/slideshow/source/engine/transitions/fanwipe.cxx b/slideshow/source/engine/transitions/fanwipe.cxx index 5071dd62aaa1..2ddca66b0647 100644 --- a/slideshow/source/engine/transitions/fanwipe.cxx +++ b/slideshow/source/engine/transitions/fanwipe.cxx @@ -37,13 +37,13 @@ namespace internal { res.append( poly ); // flip on y-axis: - poly.transform(basegfx::tools::createScaleB2DHomMatrix(-1.0, 1.0)); + poly.transform(basegfx::utils::createScaleB2DHomMatrix(-1.0, 1.0)); poly.flip(); res.append( poly ); if (m_center) { - res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); + res.transform(basegfx::utils::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); if (! m_single) res.append( flipOnXAxis(res) ); @@ -51,7 +51,7 @@ namespace internal { else { SAL_WARN_IF( m_fanIn, "slideshow.opengl", "FanWipe: m_fanIn is true ?" ); - res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 1.0, 0.5, 1.0)); + res.transform(basegfx::utils::createScaleTranslateB2DHomMatrix(0.5, 1.0, 0.5, 1.0)); } return res; } diff --git a/slideshow/source/engine/transitions/figurewipe.cxx b/slideshow/source/engine/transitions/figurewipe.cxx index cc9a2baa0014..a2f3d525c32a 100644 --- a/slideshow/source/engine/transitions/figurewipe.cxx +++ b/slideshow/source/engine/transitions/figurewipe.cxx @@ -32,7 +32,7 @@ namespace internal { ::basegfx::B2DPolyPolygon FigureWipe::operator () ( double t ) { ::basegfx::B2DPolyPolygon res(m_figure); - res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(t, t, 0.5, 0.5)); + res.transform(basegfx::utils::createScaleTranslateB2DHomMatrix(t, t, 0.5, 0.5)); return res; } diff --git a/slideshow/source/engine/transitions/fourboxwipe.cxx b/slideshow/source/engine/transitions/fourboxwipe.cxx index 4df6d8199a7d..49106916950a 100644 --- a/slideshow/source/engine/transitions/fourboxwipe.cxx +++ b/slideshow/source/engine/transitions/fourboxwipe.cxx @@ -34,13 +34,13 @@ namespace internal { const double d = ::basegfx::pruneScaleValue( t / 2.0 ); if (m_cornersOut) { - aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); - aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, -0.25, -0.25) + aTransform = basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5); + aTransform = basegfx::utils::createScaleTranslateB2DHomMatrix(d, d, -0.25, -0.25) * aTransform; } else { - aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, -0.5, -0.5); + aTransform = basegfx::utils::createScaleTranslateB2DHomMatrix(d, d, -0.5, -0.5); } // top left: @@ -65,7 +65,7 @@ namespace internal { square4.flip(); // flip direction res.append( square4 ); - aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.5, 0.5); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(0.5, 0.5); res.transform( aTransform ); return res; } diff --git a/slideshow/source/engine/transitions/iriswipe.cxx b/slideshow/source/engine/transitions/iriswipe.cxx index b14c9236331f..02a9cd333161 100644 --- a/slideshow/source/engine/transitions/iriswipe.cxx +++ b/slideshow/source/engine/transitions/iriswipe.cxx @@ -29,8 +29,8 @@ namespace internal { ::basegfx::B2DPolyPolygon IrisWipe::operator () ( double t ) { const double d = ::basegfx::pruneScaleValue(t); - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); - aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, 0.5, 0.5) * aTransform; + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5)); + aTransform = basegfx::utils::createScaleTranslateB2DHomMatrix(d, d, 0.5, 0.5) * aTransform; ::basegfx::B2DPolyPolygon res( m_unitRect ); res.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/pinwheelwipe.cxx b/slideshow/source/engine/transitions/pinwheelwipe.cxx index 1ee179868049..f529a778cfd1 100644 --- a/slideshow/source/engine/transitions/pinwheelwipe.cxx +++ b/slideshow/source/engine/transitions/pinwheelwipe.cxx @@ -37,10 +37,10 @@ namespace internal { for ( sal_Int32 i = m_blades; i--; ) { ::basegfx::B2DPolygon p(poly); - p.transform(basegfx::tools::createRotateB2DHomMatrix((i * 2.0 * M_PI) / m_blades)); + p.transform(basegfx::utils::createRotateB2DHomMatrix((i * 2.0 * M_PI) / m_blades)); res.append( p ); } - res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); + res.transform(basegfx::utils::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); return res; } diff --git a/slideshow/source/engine/transitions/randomwipe.cxx b/slideshow/source/engine/transitions/randomwipe.cxx index 985f4209f12b..421e1f32c186 100644 --- a/slideshow/source/engine/transitions/randomwipe.cxx +++ b/slideshow/source/engine/transitions/randomwipe.cxx @@ -71,7 +71,7 @@ RandomWipe::RandomWipe( sal_Int32 nElements, bool randomBars ) { ::basegfx::B2DPoint const & point = m_positions[ pos ]; ::basegfx::B2DPolygon poly( m_rect ); - poly.transform(basegfx::tools::createTranslateB2DHomMatrix(point.getX(), point.getY())); + poly.transform(basegfx::utils::createTranslateB2DHomMatrix(point.getX(), point.getY())); res.append( poly ); } return res; diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx index 6a84032408f6..fd9ba2f09abd 100644 --- a/slideshow/source/engine/transitions/slidechangebase.cxx +++ b/slideshow/source/engine/transitions/slidechangebase.cxx @@ -160,7 +160,7 @@ void SlideChangeBase::renderBitmap( pCanvas->clone() ); // render at output position, don't modify bitmap object (no move!): - const basegfx::B2DHomMatrix transform(basegfx::tools::createTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix transform(basegfx::utils::createTranslateB2DHomMatrix( pageOrigin.getX(), pageOrigin.getY())); pDevicePixelCanvas->setTransformation( transform ); diff --git a/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/slideshow/source/engine/transitions/slidetransitionfactory.cxx index 339ce818c519..b673b4912acb 100644 --- a/slideshow/source/engine/transitions/slidetransitionfactory.cxx +++ b/slideshow/source/engine/transitions/slidetransitionfactory.cxx @@ -20,7 +20,7 @@ #include <tools/diagnose_ex.h> #include <basegfx/matrix/b2dhommatrix.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> diff --git a/slideshow/source/engine/transitions/snakewipe.cxx b/slideshow/source/engine/transitions/snakewipe.cxx index 99b34d5d3af6..dd15d1238deb 100644 --- a/slideshow/source/engine/transitions/snakewipe.cxx +++ b/slideshow/source/engine/transitions/snakewipe.cxx @@ -113,12 +113,12 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) if ((static_cast<sal_Int32>(sqrtArea2) & 1) == 1) { // odd line - aTransform = basegfx::tools::createRotateB2DHomMatrix(M_PI_2 + M_PI_4); + aTransform = basegfx::utils::createRotateB2DHomMatrix(M_PI_2 + M_PI_4); aTransform.translate(edge + m_elementEdge, 0.0); } else { - aTransform = basegfx::tools::createTranslateB2DHomMatrix(-a, 0.0); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(-a, 0.0); aTransform.rotate( -M_PI_4 ); aTransform.translate( 0.0, edge ); } @@ -157,13 +157,13 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) if ((static_cast<sal_Int32>(sqrtArea2) & 1) == 1) { // odd line - aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.0, -height); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(0.0, -height); aTransform.rotate( M_PI_2 + M_PI_4 ); aTransform.translate( 1.0, edge ); } else { - aTransform = basegfx::tools::createRotateB2DHomMatrix(-M_PI_4); + aTransform = basegfx::utils::createRotateB2DHomMatrix(-M_PI_4); aTransform.translate( edge, 1.0 ); } poly.transform( aTransform ); @@ -200,7 +200,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) ::basegfx::B2DPolyPolygon half( calcHalfDiagonalSnake( t, false /* out */ ) ); // flip on x axis and rotate 90 degrees: - basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleB2DHomMatrix(1.0, -1.0)); + basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleB2DHomMatrix(1.0, -1.0)); aTransform.translate( -0.5, 0.5 ); aTransform.rotate( M_PI_2 ); aTransform.translate( 0.5, 0.5 ); @@ -209,7 +209,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) res.append( half ); // rotate 180 degrees: - aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5); aTransform.rotate( M_PI ); aTransform.translate( 0.5, 0.5 ); half.transform( aTransform ); @@ -219,7 +219,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) { ::basegfx::B2DPolyPolygon half( calcSnake( t / 2.0 ) ); // rotate 90 degrees: - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5)); aTransform.rotate( M_PI_2 ); aTransform.translate( 0.5, 0.5 ); half.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/spiralwipe.cxx b/slideshow/source/engine/transitions/spiralwipe.cxx index f89ef9fabaff..216c513ff470 100644 --- a/slideshow/source/engine/transitions/spiralwipe.cxx +++ b/slideshow/source/engine/transitions/spiralwipe.cxx @@ -44,7 +44,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis ) const double e = (sqrt(area) / 2.0); const sal_Int32 edge = (static_cast<sal_Int32>(e) * 2); - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5)); const double edge_ = ::basegfx::pruneScaleValue( static_cast<double>(edge) / m_sqrtElements ); aTransform.scale( edge_, edge_ ); @@ -61,7 +61,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis ) const sal_Int32 alen = (len > edge1 ? edge1 : len); len -= alen; poly = createUnitRect(); - aTransform = basegfx::tools::createScaleB2DHomMatrix( + aTransform = basegfx::utils::createScaleB2DHomMatrix( ::basegfx::pruneScaleValue( static_cast<double>(alen) / m_sqrtElements ), ::basegfx::pruneScaleValue( 1.0 / m_sqrtElements ) ); aTransform.translate( diff --git a/slideshow/source/engine/transitions/sweepwipe.cxx b/slideshow/source/engine/transitions/sweepwipe.cxx index bfb4580d6736..bf7d9292e05f 100644 --- a/slideshow/source/engine/transitions/sweepwipe.cxx +++ b/slideshow/source/engine/transitions/sweepwipe.cxx @@ -42,7 +42,7 @@ namespace internal { if (m_center) { - aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.5, 0.0); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(0.5, 0.0); poly.transform( aTransform ); } ::basegfx::B2DPolyPolygon res(poly); @@ -51,14 +51,14 @@ namespace internal { { if (m_oppositeVertical) { - aTransform = basegfx::tools::createScaleB2DHomMatrix(1.0, -1.0); + aTransform = basegfx::utils::createScaleB2DHomMatrix(1.0, -1.0); aTransform.translate( 0.0, 1.0 ); poly.transform( aTransform ); poly.flip(); } else { - aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5); aTransform.rotate( M_PI ); aTransform.translate( 0.5, 0.5 ); poly.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/transitiontools.cxx b/slideshow/source/engine/transitions/transitiontools.cxx index cba22b23f77e..d05b28bf9c0b 100644 --- a/slideshow/source/engine/transitions/transitiontools.cxx +++ b/slideshow/source/engine/transitions/transitiontools.cxx @@ -32,7 +32,7 @@ namespace internal { // TODO(Q2): Move this to basegfx ::basegfx::B2DPolygon createUnitRect() { - return ::basegfx::tools::createPolygonFromRect( + return ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle(0.0,0.0, 1.0,1.0 ) ); } @@ -41,7 +41,7 @@ namespace internal { ::basegfx::B2DPolyPolygon const & polypoly ) { ::basegfx::B2DPolyPolygon res(polypoly); - res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0)); + res.transform(basegfx::utils::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0)); res.flip(); return res; } @@ -50,7 +50,7 @@ namespace internal { ::basegfx::B2DPolyPolygon const & polypoly ) { ::basegfx::B2DPolyPolygon res(polypoly); - res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0)); + res.transform(basegfx::utils::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0)); res.flip(); return res; } diff --git a/slideshow/source/engine/transitions/waterfallwipe.cxx b/slideshow/source/engine/transitions/waterfallwipe.cxx index 5c5286f47acb..eb0ead303c62 100644 --- a/slideshow/source/engine/transitions/waterfallwipe.cxx +++ b/slideshow/source/engine/transitions/waterfallwipe.cxx @@ -54,7 +54,7 @@ WaterfallWipe::WaterfallWipe( sal_Int32 nElements, bool flipOnYAxis ) ::basegfx::B2DPolyPolygon WaterfallWipe::operator () ( double t ) { ::basegfx::B2DPolygon poly( m_waterfall ); - poly.transform(basegfx::tools::createTranslateB2DHomMatrix(0.0, ::basegfx::pruneScaleValue(2.0 * t))); + poly.transform(basegfx::utils::createTranslateB2DHomMatrix(0.0, ::basegfx::pruneScaleValue(2.0 * t))); poly.setB2DPoint( 0, ::basegfx::B2DPoint( 0.0, -1.0 ) ); poly.setB2DPoint( poly.count()-1, ::basegfx::B2DPoint( 1.0, -1.0 ) ); diff --git a/slideshow/source/engine/transitions/zigzagwipe.cxx b/slideshow/source/engine/transitions/zigzagwipe.cxx index 489d11d12938..adfc85c1d224 100644 --- a/slideshow/source/engine/transitions/zigzagwipe.cxx +++ b/slideshow/source/engine/transitions/zigzagwipe.cxx @@ -46,7 +46,7 @@ ZigZagWipe::ZigZagWipe( sal_Int32 nZigs ) : m_zigEdge( 1.0 / nZigs ) ::basegfx::B2DPolyPolygon ZigZagWipe::operator () ( double t ) { ::basegfx::B2DPolyPolygon res(m_stdZigZag); - res.transform(basegfx::tools::createTranslateB2DHomMatrix((1.0 + m_zigEdge) * t, 0.0)); + res.transform(basegfx::utils::createTranslateB2DHomMatrix((1.0 + m_zigEdge) * t, 0.0)); return res; } @@ -55,7 +55,7 @@ ZigZagWipe::ZigZagWipe( sal_Int32 nZigs ) : m_zigEdge( 1.0 / nZigs ) ::basegfx::B2DPolyPolygon res( createUnitRect() ); ::basegfx::B2DPolygon poly( m_stdZigZag ); poly.flip(); - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix( (1.0 + m_zigEdge) * (1.0 - t) / 2.0, 0.0)); poly.transform( aTransform ); res.append( poly ); diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx index d1e2c6005326..a5bd530a04af 100644 --- a/slideshow/test/demoshow.cxx +++ b/slideshow/test/demoshow.cxx @@ -41,7 +41,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/range/b2drectangle.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> @@ -86,7 +86,7 @@ public: { maSize = rNewSize; const sal_Int32 nSize( std::min( rNewSize.Width(), rNewSize.Height() ) - 10); - maTransform = basegfx::tools::createScaleTranslateB2DHomMatrix( + maTransform = basegfx::utils::createScaleTranslateB2DHomMatrix( nSize, nSize, (rNewSize.Width() - nSize) / 2, (rNewSize.Height() - nSize) / 2); lang::EventObject aEvent( *this ); @@ -113,7 +113,7 @@ private: virtual void SAL_CALL clear( ) throw (uno::RuntimeException) { - ::basegfx::B2DPolygon aPoly( ::basegfx::tools::createPolygonFromRect( + ::basegfx::B2DPolygon aPoly( ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle(0.0,0.0, maSize.Width(), maSize.Height() ))); diff --git a/svgio/inc/svgpathnode.hxx b/svgio/inc/svgpathnode.hxx index 9681e7e4b1b7..39a34272821d 100644 --- a/svgio/inc/svgpathnode.hxx +++ b/svgio/inc/svgpathnode.hxx @@ -38,7 +38,7 @@ namespace svgio basegfx::B2DPolyPolygon* mpPolyPolygon; basegfx::B2DHomMatrix* mpaTransform; SvgNumber maPathLength; - basegfx::tools::PointIndexSet maHelpPointIndices; + basegfx::utils::PointIndexSet maHelpPointIndices; public: SvgPathNode( diff --git a/svgio/inc/svgstyleattributes.hxx b/svgio/inc/svgstyleattributes.hxx index 7eb7261f39f5..06b6474f8678 100644 --- a/svgio/inc/svgstyleattributes.hxx +++ b/svgio/inc/svgstyleattributes.hxx @@ -279,7 +279,7 @@ namespace svgio void add_markers( const basegfx::B2DPolyPolygon& rPath, drawinglayer::primitive2d::Primitive2DContainer& rTarget, - const basegfx::tools::PointIndexSet* pHelpPointIndices) const; + const basegfx::utils::PointIndexSet* pHelpPointIndices) const; public: /// local attribute scanner @@ -293,7 +293,7 @@ namespace svgio void add_path( const basegfx::B2DPolyPolygon& rPath, drawinglayer::primitive2d::Primitive2DContainer& rTarget, - const basegfx::tools::PointIndexSet* pHelpPointIndices) const; + const basegfx::utils::PointIndexSet* pHelpPointIndices) const; void add_postProcess( drawinglayer::primitive2d::Primitive2DContainer& rTarget, const drawinglayer::primitive2d::Primitive2DContainer& rSource, diff --git a/svgio/source/svgreader/svgcirclenode.cxx b/svgio/source/svgreader/svgcirclenode.cxx index d71e5d9cdbf0..9bf150e55fa9 100644 --- a/svgio/source/svgreader/svgcirclenode.cxx +++ b/svgio/source/svgreader/svgcirclenode.cxx @@ -123,7 +123,7 @@ namespace svgio if(fR > 0.0) { const basegfx::B2DPolygon aPath( - basegfx::tools::createPolygonFromCircle( + basegfx::utils::createPolygonFromCircle( basegfx::B2DPoint( getCx().isSet() ? getCx().solve(*this, xcoordinate) : 0.0, getCy().isSet() ? getCy().solve(*this, ycoordinate) : 0.0), diff --git a/svgio/source/svgreader/svgclippathnode.cxx b/svgio/source/svgreader/svgclippathnode.cxx index d7db9e99a21b..2986cbe64802 100644 --- a/svgio/source/svgreader/svgclippathnode.cxx +++ b/svgio/source/svgreader/svgclippathnode.cxx @@ -150,7 +150,7 @@ namespace svgio if(nSize > 1) { // merge to single clipPolyPolygon - aClipPolyPolygon = basegfx::tools::mergeToSinglePolyPolygon(rResult); + aClipPolyPolygon = basegfx::utils::mergeToSinglePolyPolygon(rResult); } else { @@ -166,7 +166,7 @@ namespace svgio const basegfx::B2DRange aContentRange(rContent.getB2DRange(aViewInformation2D)); aClipPolyPolygon.transform( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( aContentRange.getRange(), aContentRange.getMinimum())); } @@ -184,7 +184,7 @@ namespace svgio bool bCreateEmbedding(true); bool bAddContent(true); - if(basegfx::tools::isRectangle(aClipPolyPolygon)) + if(basegfx::utils::isRectangle(aClipPolyPolygon)) { // ClipRegion is a rectangle, thus it is not expensive to tell // if the content is completely inside or outside of it; get ranges @@ -207,7 +207,7 @@ namespace svgio basegfx::B2DRange aCommonRange(aContentRange); aCommonRange.intersect(aClipRange); - aClipPolyPolygon = basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(aCommonRange)); + aClipPolyPolygon = basegfx::B2DPolyPolygon(basegfx::utils::createPolygonFromRect(aCommonRange)); } else { diff --git a/svgio/source/svgreader/svgellipsenode.cxx b/svgio/source/svgreader/svgellipsenode.cxx index f685598001ce..d511d9c78ca1 100644 --- a/svgio/source/svgreader/svgellipsenode.cxx +++ b/svgio/source/svgreader/svgellipsenode.cxx @@ -138,7 +138,7 @@ namespace svgio if(fRx > 0.0 && fRy > 0.0) { const basegfx::B2DPolygon aPath( - basegfx::tools::createPolygonFromEllipse( + basegfx::utils::createPolygonFromEllipse( basegfx::B2DPoint( getCx().isSet() ? getCx().solve(*this, xcoordinate) : 0.0, getCy().isSet() ? getCy().solve(*this, ycoordinate) : 0.0), diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx index 47e70177edf4..1fdb843513d5 100644 --- a/svgio/source/svgreader/svgimagenode.cxx +++ b/svgio/source/svgreader/svgimagenode.cxx @@ -306,7 +306,7 @@ namespace svgio aNewTarget.resize(1); aNewTarget[0] = new drawinglayer::primitive2d::BitmapPrimitive2D( aBitmapEx, - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( aViewBox.getRange(), aViewBox.getMinimum())); } @@ -343,7 +343,7 @@ namespace svgio const drawinglayer::primitive2d::Primitive2DReference xMask( new drawinglayer::primitive2d::MaskPrimitive2D( basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect(aTarget)), + basegfx::utils::createPolygonFromRect(aTarget)), aNewTarget)); aNewTarget = drawinglayer::primitive2d::Primitive2DContainer { xMask }; diff --git a/svgio/source/svgreader/svgmasknode.cxx b/svgio/source/svgreader/svgmasknode.cxx index b756e17083d6..872c7e6aa1a9 100644 --- a/svgio/source/svgreader/svgmasknode.cxx +++ b/svgio/source/svgreader/svgmasknode.cxx @@ -245,7 +245,7 @@ namespace svgio // mask is object-relative, embed in content transformation const drawinglayer::primitive2d::Primitive2DReference xTransform( new drawinglayer::primitive2d::TransformPrimitive2D( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( aContentRange.getRange(), aContentRange.getMinimum()), aMaskTarget)); @@ -291,7 +291,7 @@ namespace svgio { xNewContent = new drawinglayer::primitive2d::MaskPrimitive2D( basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( aOffscreenBufferRange)), drawinglayer::primitive2d::Primitive2DContainer { xNewContent }); } diff --git a/svgio/source/svgreader/svgpathnode.cxx b/svgio/source/svgreader/svgpathnode.cxx index a456995373c9..50fe2e52151e 100644 --- a/svgio/source/svgreader/svgpathnode.cxx +++ b/svgio/source/svgreader/svgpathnode.cxx @@ -66,7 +66,7 @@ namespace svgio { basegfx::B2DPolyPolygon aPath; - if(basegfx::tools::importFromSvgD(aPath, aContent, false, &maHelpPointIndices)) + if(basegfx::utils::importFromSvgD(aPath, aContent, false, &maHelpPointIndices)) { if(aPath.count()) { diff --git a/svgio/source/svgreader/svgpolynode.cxx b/svgio/source/svgreader/svgpolynode.cxx index 8f959da10004..5de5fc87cc0d 100644 --- a/svgio/source/svgreader/svgpolynode.cxx +++ b/svgio/source/svgreader/svgpolynode.cxx @@ -69,7 +69,7 @@ namespace svgio { basegfx::B2DPolygon aPath; - if(basegfx::tools::importFromSvgPoints(aPath, aContent)) + if(basegfx::utils::importFromSvgPoints(aPath, aContent)) { if(aPath.count()) { diff --git a/svgio/source/svgreader/svgrectnode.cxx b/svgio/source/svgreader/svgrectnode.cxx index 94864dc92480..e40f925f01db 100644 --- a/svgio/source/svgreader/svgrectnode.cxx +++ b/svgio/source/svgreader/svgrectnode.cxx @@ -194,11 +194,11 @@ namespace svgio frX = std::min(0.5, frX); frY = std::min(0.5, frY); - aPath = basegfx::tools::createPolygonFromRect(aRange, frX * 2.0, frY * 2.0); + aPath = basegfx::utils::createPolygonFromRect(aRange, frX * 2.0, frY * 2.0); } else { - aPath = basegfx::tools::createPolygonFromRect(aRange); + aPath = basegfx::utils::createPolygonFromRect(aRange); } drawinglayer::primitive2d::Primitive2DContainer aNewTarget; diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 7d61bd027caa..b080e7e97f71 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -297,7 +297,7 @@ namespace svgio if(!aTextFillVector.empty()) { - aMergedArea = basegfx::tools::mergeToSinglePolyPolygon(aTextFillVector); + aMergedArea = basegfx::utils::mergeToSinglePolyPolygon(aTextFillVector); } } @@ -677,7 +677,7 @@ namespace svgio { aNewLinePrimitive = new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromCircle( + basegfx::utils::createPolygonFromCircle( aSingle.getB2DPoint(0), fStrokeWidth * (1.44 * 0.5))), pStroke ? *pStroke : basegfx::BColor(0.0, 0.0, 0.0)); @@ -753,7 +753,7 @@ namespace svgio if(!rLineFillVector.empty()) { const basegfx::B2DPolyPolygon aMergedArea( - basegfx::tools::mergeToSinglePolyPolygon( + basegfx::utils::mergeToSinglePolyPolygon( rLineFillVector)); if(aMergedArea.count()) @@ -892,7 +892,7 @@ namespace svgio void SvgStyleAttributes::add_markers( const basegfx::B2DPolyPolygon& rPath, drawinglayer::primitive2d::Primitive2DContainer& rTarget, - const basegfx::tools::PointIndexSet* pHelpPointIndices) const + const basegfx::utils::PointIndexSet* pHelpPointIndices) const { // try to access linked markers const SvgMarkerNode* pStart = accessMarkerStartXLink(); @@ -953,8 +953,8 @@ namespace svgio if(pHelpPointIndices && !pHelpPointIndices->empty()) { - const basegfx::tools::PointIndexSet::const_iterator aFound( - pHelpPointIndices->find(basegfx::tools::PointIndex(a, b))); + const basegfx::utils::PointIndexSet::const_iterator aFound( + pHelpPointIndices->find(basegfx::utils::PointIndex(a, b))); if(aFound != pHelpPointIndices->end()) { @@ -1002,11 +1002,11 @@ namespace svgio // This is not done here, see comment 14 in task #1232379# // or http://www.w3.org/TR/SVG/painting.html#OrientAttribute basegfx::B2DVector aEntering( - basegfx::tools::getTangentEnteringPoint( + basegfx::utils::getTangentEnteringPoint( aSubPolygonPath, nPointIndex)); basegfx::B2DVector aLeaving( - basegfx::tools::getTangentLeavingPoint( + basegfx::utils::getTangentLeavingPoint( aSubPolygonPath, nPointIndex)); const bool bEntering(!aEntering.equalZero()); @@ -1055,7 +1055,7 @@ namespace svgio if(!aPreparedMarkerClipRange.isEmpty()) { // marker needs to be clipped, it's bigger as the mapping - basegfx::B2DPolyPolygon aClipPolygon(basegfx::tools::createPolygonFromRect(aPreparedMarkerClipRange)); + basegfx::B2DPolyPolygon aClipPolygon(basegfx::utils::createPolygonFromRect(aPreparedMarkerClipRange)); aClipPolygon.transform(aCombinedTransform); xMarker = new drawinglayer::primitive2d::MaskPrimitive2D( @@ -1075,7 +1075,7 @@ namespace svgio void SvgStyleAttributes::add_path( const basegfx::B2DPolyPolygon& rPath, drawinglayer::primitive2d::Primitive2DContainer& rTarget, - const basegfx::tools::PointIndexSet* pHelpPointIndices) const + const basegfx::utils::PointIndexSet* pHelpPointIndices) const { if(!rPath.count()) { @@ -1119,9 +1119,9 @@ namespace svgio { if(getFill() || getSvgGradientNodeFill() || getSvgPatternNodeFill()) { // nonzero is wanted, solve geometrically (see description on basegfx) - // basegfx::tools::createNonzeroConform() is expensive for huge paths + // basegfx::utils::createNonzeroConform() is expensive for huge paths // and is only needed if path will be filled later on - aPath = basegfx::tools::createNonzeroConform(aPath); + aPath = basegfx::utils::createNonzeroConform(aPath); } } diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx index 7e03f75cf812..43fa092cd2c1 100644 --- a/svgio/source/svgreader/svgsvgnode.cxx +++ b/svgio/source/svgreader/svgsvgnode.cxx @@ -439,7 +439,7 @@ namespace svgio // need to embed in MaskPrimitive2D, too const drawinglayer::primitive2d::Primitive2DReference xMask( new drawinglayer::primitive2d::MaskPrimitive2D( - basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(aTarget)), + basegfx::B2DPolyPolygon(basegfx::utils::createPolygonFromRect(aTarget)), drawinglayer::primitive2d::Primitive2DContainer { xRef })); rTarget.push_back(xMask); @@ -457,7 +457,7 @@ namespace svgio // embed in transform const drawinglayer::primitive2d::Primitive2DReference xRef( new drawinglayer::primitive2d::TransformPrimitive2D( - basegfx::tools::createTranslateB2DHomMatrix(fX, fY), + basegfx::utils::createTranslateB2DHomMatrix(fX, fY), aSequence)); aSequence = drawinglayer::primitive2d::Primitive2DContainer { xRef, }; @@ -467,7 +467,7 @@ namespace svgio const drawinglayer::primitive2d::Primitive2DReference xMask( new drawinglayer::primitive2d::MaskPrimitive2D( basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRange(fX, fY, fX + fW, fY + fH))), aSequence)); @@ -622,7 +622,7 @@ namespace svgio // real life size const drawinglayer::primitive2d::Primitive2DReference xLine( new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( aSvgCanvasRange), basegfx::BColor(0.0, 0.0, 0.0))); const drawinglayer::primitive2d::Primitive2DReference xHidden( @@ -641,7 +641,7 @@ namespace svgio const drawinglayer::primitive2d::Primitive2DReference xMask( new drawinglayer::primitive2d::MaskPrimitive2D( basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( aSvgCanvasRange)), aSequence)); @@ -660,7 +660,7 @@ namespace svgio // drawinglayer coordinates const double fScaleTo100thmm(25.4 * 100.0 / F_SVG_PIXEL_PER_INCH); const basegfx::B2DHomMatrix aTransform( - basegfx::tools::createScaleB2DHomMatrix( + basegfx::utils::createScaleB2DHomMatrix( fScaleTo100thmm, fScaleTo100thmm)); diff --git a/svgio/source/svgreader/svgtextpathnode.cxx b/svgio/source/svgreader/svgtextpathnode.cxx index e9b00eb2ddec..dae7f4e47bd8 100644 --- a/svgio/source/svgreader/svgtextpathnode.cxx +++ b/svgio/source/svgreader/svgtextpathnode.cxx @@ -341,7 +341,7 @@ namespace svgio return false; } - const double fBasegfxPathLength(basegfx::tools::getLength(aPolygon)); + const double fBasegfxPathLength(basegfx::utils::getLength(aPolygon)); return !basegfx::fTools::equalZero(fBasegfxPathLength); } @@ -368,7 +368,7 @@ namespace svgio aPolygon.transform(*pSvgPathNode->getTransform()); } - const double fBasegfxPathLength(basegfx::tools::getLength(aPolygon)); + const double fBasegfxPathLength(basegfx::utils::getLength(aPolygon)); if(!basegfx::fTools::equalZero(fBasegfxPathLength)) { diff --git a/svgio/source/svgreader/svgtools.cxx b/svgio/source/svgreader/svgtools.cxx index 21257cd6a0d8..d5477d82c8a2 100644 --- a/svgio/source/svgreader/svgtools.cxx +++ b/svgio/source/svgreader/svgtools.cxx @@ -1091,7 +1091,7 @@ namespace svgio skip_char(rCandidate, ' ', ')', nPos, nLen); skip_char(rCandidate, ' ', ',', nPos, nLen); - aMatrix = aMatrix * basegfx::tools::createTranslateB2DHomMatrix( + aMatrix = aMatrix * basegfx::utils::createTranslateB2DHomMatrix( aTransX.solve(rInfoProvider, xcoordinate), aTransY.solve(rInfoProvider, ycoordinate)); } @@ -1115,7 +1115,7 @@ namespace svgio skip_char(rCandidate, ' ', ')', nPos, nLen); skip_char(rCandidate, ' ', ',', nPos, nLen); - aMatrix = aMatrix * basegfx::tools::createScaleB2DHomMatrix( + aMatrix = aMatrix * basegfx::utils::createScaleB2DHomMatrix( aScaleX.solve(rInfoProvider), aScaleY.solve(rInfoProvider)); } @@ -1132,7 +1132,7 @@ namespace svgio skip_char(rCandidate, ' ', ')', nPos, nLen); skip_char(rCandidate, ' ', ',', nPos, nLen); - aMatrix = aMatrix * basegfx::tools::createShearXB2DHomMatrix(tan(fSkewX)); + aMatrix = aMatrix * basegfx::utils::createShearXB2DHomMatrix(tan(fSkewX)); } } else if(rCandidate.match(aStrSkewY, nPos)) @@ -1147,7 +1147,7 @@ namespace svgio skip_char(rCandidate, ' ', ')', nPos, nLen); skip_char(rCandidate, ' ', ',', nPos, nLen); - aMatrix = aMatrix * basegfx::tools::createShearYB2DHomMatrix(tan(fSkewY)); + aMatrix = aMatrix * basegfx::utils::createShearYB2DHomMatrix(tan(fSkewY)); } } break; @@ -1178,12 +1178,12 @@ namespace svgio if(!basegfx::fTools::equalZero(fX) || !basegfx::fTools::equalZero(fY)) { // rotate around point - aMatrix = aMatrix * basegfx::tools::createRotateAroundPoint(fX, fY, fAngle); + aMatrix = aMatrix * basegfx::utils::createRotateAroundPoint(fX, fY, fAngle); } else { // rotate - aMatrix = aMatrix * basegfx::tools::createRotateB2DHomMatrix(fAngle); + aMatrix = aMatrix * basegfx::utils::createRotateB2DHomMatrix(fAngle); } } } diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 5c5205fa965e..43eb29469781 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -390,7 +390,7 @@ basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon, S if (aPattern.empty()) aPolygons.append(rPolygon); else - basegfx::tools::applyLineDashing(rPolygon, aPattern, &aPolygons); + basegfx::utils::applyLineDashing(rPolygon, aPattern, &aPolygons); return aPolygons; } diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index cf33390dea26..dd71997a7a35 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1071,7 +1071,7 @@ Color EnhancedCustomShape2d::GetColorData( const Color& rFillColor, sal_uInt32 n return rFillColor; basegfx::BColor aHSVColor= - basegfx::tools::rgb2hsv( + basegfx::utils::rgb2hsv( basegfx::BColor(rFillColor.GetRed()/255.0, rFillColor.GetGreen()/255.0, rFillColor.GetBlue()/255.0)); @@ -1090,7 +1090,7 @@ Color EnhancedCustomShape2d::GetColorData( const Color& rFillColor, sal_uInt32 n (1.0+nLuminance/100.0)*aHSVColor.getBlue()); } - aHSVColor = basegfx::tools::hsv2rgb(aHSVColor); + aHSVColor = basegfx::utils::hsv2rgb(aHSVColor); return Color( (sal_uInt8)static_cast< sal_Int32 >( basegfx::clamp(aHSVColor.getRed(),0.0,1.0) * 255.0 + 0.5 ), (sal_uInt8)static_cast< sal_Int32 >( basegfx::clamp(aHSVColor.getGreen(),0.0,1.0) * 255.0 + 0.5 ), (sal_uInt8)static_cast< sal_Int32 >( basegfx::clamp(aHSVColor.getBlue(),0.0,1.0) * 255.0 + 0.5 ) ); @@ -1509,7 +1509,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen if(aNewB2DPolygon.count() > 1) { // #i76201# Add conversion to closed polygon when first and last points are equal - basegfx::tools::checkClosed(aNewB2DPolygon); + basegfx::utils::checkClosed(aNewB2DPolygon); aNewB2DPolyPolygon.append(aNewB2DPolygon); } @@ -1566,7 +1566,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen if(aNewB2DPolygon.count() > 1) { // #i76201# Add conversion to closed polygon when first and last points are equal - basegfx::tools::checkClosed(aNewB2DPolygon); + basegfx::utils::checkClosed(aNewB2DPolygon); aNewB2DPolyPolygon.append(aNewB2DPolygon); } aNewB2DPolygon.clear(); @@ -1715,7 +1715,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen basegfx::B2DPoint(aCenter.X(), aRect.Top())); // close, rescue last controlpoint, remove double last point - basegfx::tools::closeWithGeometryChange(aNewB2DPolygon); + basegfx::utils::closeWithGeometryChange(aNewB2DPolygon); } } rSrcPt += 3; @@ -1773,7 +1773,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen if(aNewB2DPolygon.count() > 1) { // #i76201# Add conversion to closed polygon when first and last points are equal - basegfx::tools::checkClosed(aNewB2DPolygon); + basegfx::utils::checkClosed(aNewB2DPolygon); aNewB2DPolyPolygon.append(aNewB2DPolygon); } @@ -1856,7 +1856,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen << " clockwise: " << int(bClockwise)); basegfx::B2DPolygon aArc = CreateArc( aRect, bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, bClockwise, aStartPoint == aEndPoint && ((bClockwise && fSwingAngle > F_PI) || (!bClockwise && fSwingAngle < -F_PI))); // Now that we have the arc, move it to aStartPointB2D. - basegfx::B2DHomMatrix aMatrix = basegfx::tools::createTranslateB2DHomMatrix(aStartPointB2D.getX(), aStartPointB2D.getY()); + basegfx::B2DHomMatrix aMatrix = basegfx::utils::createTranslateB2DHomMatrix(aStartPointB2D.getX(), aStartPointB2D.getY()); aArc.transform(aMatrix); aNewB2DPolygon.append(aArc); } @@ -1954,7 +1954,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen if(aNewB2DPolygon.count() > 1) { // #i76201# Add conversion to closed polygon when first and last points are equal - basegfx::tools::checkClosed(aNewB2DPolygon); + basegfx::utils::checkClosed(aNewB2DPolygon); aNewB2DPolyPolygon.append(aNewB2DPolygon); } diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index 2f5f8abd2d46..09ca5d7d46c7 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -471,10 +471,10 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con { if(aPolyPoly.areControlPointsUsed()) { - aPolyPoly = basegfx::tools::adaptiveSubdivideByAngle(aPolyPoly); + aPolyPoly = basegfx::utils::adaptiveSubdivideByAngle(aPolyPoly); } - const basegfx::B2DRange aTempRange(basegfx::tools::getRange(aPolyPoly)); + const basegfx::B2DRange aTempRange(basegfx::utils::getRange(aPolyPoly)); const tools::Rectangle aBoundRect(basegfx::fround(aTempRange.getMinX()), basegfx::fround(aTempRange.getMinY()), basegfx::fround(aTempRange.getMaxX()), basegfx::fround(aTempRange.getMaxY())); aBoundRect2d.Union( aBoundRect ); diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index fc2f2dc7cb60..3e3f8c88d6f1 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -49,7 +49,7 @@ #include "svx/svditer.hxx" #include <uno/mapping.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/unotools.hxx> +#include <basegfx/utils/unotools.hxx> #include <com/sun/star/document/XActionLockable.hpp> #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index f83cdc4fb66d..0aca12a4667f 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -519,7 +519,7 @@ basegfx::B2DPolyPolygon GetOutlinesFromShape2d( const SdrObject* pShape2d ) basegfx::B2DPolyPolygon aCandidate(static_cast<SdrPathObj*>(pPartObj)->GetPathPoly()); if(aCandidate.areControlPointsUsed()) { - aCandidate = basegfx::tools::adaptiveSubdivideByAngle(aCandidate); + aCandidate = basegfx::utils::adaptiveSubdivideByAngle(aCandidate); } aOutlines2d.append(aCandidate); } @@ -742,7 +742,7 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa if(aCandidate.areControlPointsUsed()) { - aCandidate = basegfx::tools::adaptiveSubdivideByAngle(aCandidate); + aCandidate = basegfx::utils::adaptiveSubdivideByAngle(aCandidate); } // create local polygon copy to work on diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx index b644c3e56fe1..c9cc5ab0346c 100644 --- a/svx/source/dialog/contwnd.cxx +++ b/svx/source/dialog/contwnd.cxx @@ -96,7 +96,7 @@ const tools::PolyPolygon& ContourWindow::GetPolyPolygon() SdrPathObj* pPathObj = static_cast<SdrPathObj*>(pPage->GetObj(0)); // Not sure if subdivision is needed for ContourWindow, but maybe it cannot handle // curves at all. Keeping subdivision here for security - const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::tools::adaptiveSubdivideByAngle(pPathObj->GetPathPoly())); + const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::utils::adaptiveSubdivideByAngle(pPathObj->GetPathPoly())); aPolyPoly = tools::PolyPolygon(aB2DPolyPolygon); } diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index fe8be73d884c..a1c1aec005f3 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -299,8 +299,8 @@ void Svx3DLightControl::Construct2() { // create lamp control object (Yellow lined object) // base circle - const basegfx::B2DPolygon a2DCircle(basegfx::tools::createPolygonFromCircle(basegfx::B2DPoint(0.0, 0.0), RADIUS_LAMP_PREVIEW_SIZE)); - basegfx::B3DPolygon a3DCircle(basegfx::tools::createB3DPolygonFromB2DPolygon(a2DCircle)); + const basegfx::B2DPolygon a2DCircle(basegfx::utils::createPolygonFromCircle(basegfx::B2DPoint(0.0, 0.0), RADIUS_LAMP_PREVIEW_SIZE)); + basegfx::B3DPolygon a3DCircle(basegfx::utils::createB3DPolygonFromB2DPolygon(a2DCircle)); basegfx::B3DHomMatrix aTransform; aTransform.rotate(F_PI2, 0.0, 0.0); @@ -317,9 +317,9 @@ void Svx3DLightControl::Construct2() basegfx::B2DPolygon a2DHalfCircle; a2DHalfCircle.append(basegfx::B2DPoint(RADIUS_LAMP_PREVIEW_SIZE, 0.0)); a2DHalfCircle.append(basegfx::B2DPoint(RADIUS_LAMP_PREVIEW_SIZE, -RADIUS_LAMP_PREVIEW_SIZE)); - a2DHalfCircle.append(basegfx::tools::createPolygonFromEllipseSegment( + a2DHalfCircle.append(basegfx::utils::createPolygonFromEllipseSegment( basegfx::B2DPoint(0.0, 0.0), RADIUS_LAMP_PREVIEW_SIZE, RADIUS_LAMP_PREVIEW_SIZE, F_2PI - F_PI2, F_PI2)); - basegfx::B3DPolygon a3DHalfCircle(basegfx::tools::createB3DPolygonFromB2DPolygon(a2DHalfCircle)); + basegfx::B3DPolygon a3DHalfCircle(basegfx::utils::createB3DPolygonFromB2DPolygon(a2DHalfCircle)); // create object for it mpLampShaftObject = new E3dPolygonObj( diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx index 5d54b493efe3..2dc0b0290345 100644 --- a/svx/source/dialog/framelink.cxx +++ b/svx/source/dialog/framelink.cxx @@ -377,7 +377,7 @@ void getCutSet( const basegfx::B2DPoint& rOtherRight, const basegfx::B2DVector& rOtherX) { - basegfx::tools::findCut( + basegfx::utils::findCut( rLeft, rX, rOtherLeft, @@ -385,7 +385,7 @@ void getCutSet( CutFlagValue::LINE, &rCutSet.mfOLML); - basegfx::tools::findCut( + basegfx::utils::findCut( rRight, rX, rOtherLeft, @@ -393,7 +393,7 @@ void getCutSet( CutFlagValue::LINE, &rCutSet.mfOLMR); - basegfx::tools::findCut( + basegfx::utils::findCut( rLeft, rX, rOtherRight, @@ -401,7 +401,7 @@ void getCutSet( CutFlagValue::LINE, &rCutSet.mfORML); - basegfx::tools::findCut( + basegfx::utils::findCut( rRight, rX, rOtherRight, diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index e01bd4e3394a..c9273c41344f 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -139,7 +139,7 @@ basegfx::B2DHomMatrix Cell::CreateCoordinateSystem(const Array& rArray) const } // use column vectors as coordinate axes, homogen column for translation - const_cast<Cell*>(this)->maCoordinateSystem = basegfx::tools::createCoordinateSystemTransform(aOrigin, aX, aY); + const_cast<Cell*>(this)->maCoordinateSystem = basegfx::utils::createCoordinateSystemTransform(aOrigin, aX, aY); } } @@ -1043,9 +1043,9 @@ void HelperCreateEntry(const Array& rArray, const Style& rStyle, drawinglayer::p if(bL || bR || bT || bB) { const basegfx::B2DHomMatrix aCoordinateSystem(pCell->CreateCoordinateSystem(rArray)); - const basegfx::B2DVector aX(basegfx::tools::getColumn(aCoordinateSystem, 0)); - const basegfx::B2DVector aY(basegfx::tools::getColumn(aCoordinateSystem, 1)); - const basegfx::B2DPoint aOrigin(basegfx::tools::getColumn(aCoordinateSystem, 2)); + const basegfx::B2DVector aX(basegfx::utils::getColumn(aCoordinateSystem, 0)); + const basegfx::B2DVector aY(basegfx::utils::getColumn(aCoordinateSystem, 1)); + const basegfx::B2DPoint aOrigin(basegfx::utils::getColumn(aCoordinateSystem, 2)); if(bL || bR) { @@ -1122,8 +1122,8 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange( { const Cell& rCell = CELL(nCol, nRow); const basegfx::B2DHomMatrix aCoordinateSystem(rCell.CreateCoordinateSystem(*this)); - const basegfx::B2DVector aX(basegfx::tools::getColumn(aCoordinateSystem, 0)); - const basegfx::B2DVector aY(basegfx::tools::getColumn(aCoordinateSystem, 1)); + const basegfx::B2DVector aX(basegfx::utils::getColumn(aCoordinateSystem, 0)); + const basegfx::B2DVector aY(basegfx::utils::getColumn(aCoordinateSystem, 1)); if(!aX.equalZero() && !aY.equalZero()) { @@ -1131,7 +1131,7 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange( size_t _nFirstRow = mxImpl->GetMergedFirstRow(nCol, nRow); size_t _nLastCol = mxImpl->GetMergedLastCol(nCol, nRow); size_t _nLastRow = mxImpl->GetMergedLastRow(nCol, nRow); - const basegfx::B2DPoint aOrigin(basegfx::tools::getColumn(aCoordinateSystem, 2)); + const basegfx::B2DPoint aOrigin(basegfx::utils::getColumn(aCoordinateSystem, 2)); const bool bOverlapX(rCell.mbOverlapX); const bool bOverlapY(rCell.mbOverlapY); diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx index 8bd66e4ecb96..a6153e93a0e5 100644 --- a/svx/source/dialog/pagectrl.cxx +++ b/svx/source/dialog/pagectrl.cxx @@ -369,7 +369,7 @@ void SvxPageWindow::drawFillAttributes(vcl::RenderContext& rRenderContext, { const drawinglayer::primitive2d::Primitive2DReference xOutline( new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( - basegfx::tools::createPolygonFromRect(aPaintRange), GetLineColor().getBColor())); + basegfx::utils::createPolygonFromRect(aPaintRange), GetLineColor().getBColor())); aSequence.push_back(xOutline); } diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx index 4ccf6948bd97..159126fb1f5d 100644 --- a/svx/source/engine3d/dragmt3d.cxx +++ b/svx/source/engine3d/dragmt3d.cxx @@ -230,7 +230,7 @@ void E3dDragMethod::CreateOverlayGeometry(sdr::overlay::OverlayManager& rOverlay const basegfx::B3DHomMatrix aTransform(aWorldToView * rCandidate.maDisplayTransform); // transform to relative scene coordinates - basegfx::B2DPolyPolygon aPolyPolygon(basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon(aCandidate, aTransform)); + basegfx::B2DPolyPolygon aPolyPolygon(basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon(aCandidate, aTransform)); // transform to 2D view coordinates aPolyPolygon.transform(rVCScene.getObjectTransformation()); diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx index a5b88988b6c6..ec58bb16b729 100644 --- a/svx/source/engine3d/extrud3d.cxx +++ b/svx/source/engine3d/extrud3d.cxx @@ -152,15 +152,15 @@ SdrAttrObj* E3dExtrudeObj::GetBreakObj() { basegfx::B2DPolyPolygon aTemp(maExtrudePolygon); aTemp.removeDoublePoints(); - aTemp = basegfx::tools::correctOrientations(aTemp); - const basegfx::B2VectorOrientation aOrient = basegfx::tools::getOrientation(aTemp.getB2DPolygon(0)); + aTemp = basegfx::utils::correctOrientations(aTemp); + const basegfx::B2VectorOrientation aOrient = basegfx::utils::getOrientation(aTemp.getB2DPolygon(0)); if(basegfx::B2VectorOrientation::Positive == aOrient) { aTemp.flip(); } - aFrontSide = basegfx::tools::createB3DPolyPolygonFromB2DPolyPolygon(aTemp); + aFrontSide = basegfx::utils::createB3DPolyPolygonFromB2DPolyPolygon(aTemp); } if(aFrontSide.count()) @@ -175,7 +175,7 @@ SdrAttrObj* E3dExtrudeObj::GetBreakObj() { // scale polygon from center const double fScaleFactor(GetPercentBackScale() / 100.0); - const basegfx::B3DRange aPolyPolyRange(basegfx::tools::getRange(aBackSide)); + const basegfx::B3DRange aPolyPolyRange(basegfx::utils::getRange(aBackSide)); const basegfx::B3DPoint aCenter(aPolyPolyRange.getCenter()); aTransform.translate(-aCenter.getX(), -aCenter.getY(), -aCenter.getZ()); diff --git a/svx/source/engine3d/lathe3d.cxx b/svx/source/engine3d/lathe3d.cxx index 4050088de028..a4a3a013f13a 100644 --- a/svx/source/engine3d/lathe3d.cxx +++ b/svx/source/engine3d/lathe3d.cxx @@ -174,7 +174,7 @@ bool E3dLatheObj::IsBreakObjPossible() SdrAttrObj* E3dLatheObj::GetBreakObj() { // create PathObj - basegfx::B3DPolyPolygon aLathePoly3D(basegfx::tools::createB3DPolyPolygonFromB2DPolyPolygon(maPolyPoly2D)); + basegfx::B3DPolyPolygon aLathePoly3D(basegfx::utils::createB3DPolyPolygonFromB2DPolyPolygon(maPolyPoly2D)); basegfx::B2DPolyPolygon aTransPoly(TransformToScreenCoor(aLathePoly3D)); SdrPathObj* pPathObj = new SdrPathObj(OBJ_PLIN, aTransPoly); diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index f550d1dae7ff..6ea6e5e5f93b 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -653,7 +653,7 @@ void E3dObject::SetTransform(const basegfx::B3DHomMatrix& rMatrix) basegfx::B3DPolyPolygon E3dObject::CreateWireframe() const { const basegfx::B3DRange aBoundVolume(GetBoundVolume()); - return basegfx::tools::createCubePolyPolygonFromB3DRange(aBoundVolume); + return basegfx::utils::createCubePolyPolygonFromB3DRange(aBoundVolume); } // Get the name of the object (singular) @@ -799,7 +799,7 @@ basegfx::B2DPolyPolygon E3dCompoundObject::TakeXorPoly() const { const sdr::contact::ViewContactOfE3dScene& rVCScene = static_cast< sdr::contact::ViewContactOfE3dScene& >(pRootScene->GetViewContact()); const basegfx::B3DPolyPolygon aCubePolyPolygon(CreateWireframe()); - aRetval = basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon(aCubePolyPolygon, + aRetval = basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon(aCubePolyPolygon, aViewInfo3D.getObjectToView() * GetTransform()); aRetval.transform(rVCScene.getObjectTransformation()); } @@ -930,7 +930,7 @@ basegfx::B2DPolyPolygon E3dCompoundObject::TransformToScreenCoor(const basegfx:: if(pRootScene) { - aRetval = basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon(rCandidate, + aRetval = basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon(rCandidate, aViewInfo3D.getObjectToView() * GetTransform()); const sdr::contact::ViewContactOfE3dScene& rVCScene = static_cast< sdr::contact::ViewContactOfE3dScene& >(pRootScene->GetViewContact()); aRetval.transform(rVCScene.getObjectTransformation()); diff --git a/svx/source/engine3d/polygn3d.cxx b/svx/source/engine3d/polygn3d.cxx index 78295eb57df6..037f997f3642 100644 --- a/svx/source/engine3d/polygn3d.cxx +++ b/svx/source/engine3d/polygn3d.cxx @@ -98,7 +98,7 @@ void E3dPolygonObj::CreateDefaultTexture() const basegfx::B3DPolygon& aPolygon(aPolyPoly3D.getB3DPolygon(a)); // Determine the total size of the object - basegfx::B3DRange aVolume(basegfx::tools::getRange(aPolygon)); + basegfx::B3DRange aVolume(basegfx::utils::getRange(aPolygon)); // Get normal basegfx::B3DVector aNormal(aPolygon.getNormal()); diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index bb062a30aa4d..9e2e3ebde355 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -219,7 +219,7 @@ basegfx::B2DPolyPolygon E3dScene::TakeXorPoly() const const drawinglayer::geometry::ViewInformation3D& aViewInfo3D(rVCScene.getViewInformation3D()); const basegfx::B3DPolyPolygon aCubePolyPolygon(CreateWireframe()); - basegfx::B2DPolyPolygon aRetval(basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon(aCubePolyPolygon, + basegfx::B2DPolyPolygon aRetval(basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon(aCubePolyPolygon, aViewInfo3D.getObjectToView())); aRetval.transform(rVCScene.getObjectTransformation()); diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index fd9c5451c2e0..076668af6fcf 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -177,7 +177,7 @@ void Impl3DMirrorConstructOverlay::SetMirrorAxis(Point aMirrorAxisA, Point aMirr // build transformation: translate and rotate so that given edge is // on x axis, them mirror in y and translate back const basegfx::B2DVector aEdge(aMirrorAxisB.X() - aMirrorAxisA.X(), aMirrorAxisB.Y() - aMirrorAxisA.Y()); - basegfx::B2DHomMatrix aMatrixTransform(basegfx::tools::createTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aMatrixTransform(basegfx::utils::createTranslateB2DHomMatrix( -aMirrorAxisA.X(), -aMirrorAxisA.Y())); aMatrixTransform.rotate(-atan2(aEdge.getY(), aEdge.getX())); aMatrixTransform.scale(1.0, -1.0); @@ -873,7 +873,7 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1 if(fRot3D != 0.0) { - aLatheMat = basegfx::tools::createRotateAroundPoint(rPnt2, -fRot3D) + aLatheMat = basegfx::utils::createRotateAroundPoint(rPnt2, -fRot3D) * aLatheMat; } } @@ -1052,7 +1052,7 @@ void E3dView::DoDepthArrange(E3dScene const * pScene, double fDepth) if(pExtrudeObj) { const basegfx::B2DPolyPolygon aExtrudePoly( - basegfx::tools::prepareForPolygonOperation(pExtrudeObj->GetExtrudePolygon())); + basegfx::utils::prepareForPolygonOperation(pExtrudeObj->GetExtrudePolygon())); const SfxItemSet& rLocalSet = pExtrudeObj->GetMergedItemSet(); const drawing::FillStyle eLocalFillStyle = ITEMVALUE(rLocalSet, XATTR_FILLSTYLE, XFillStyleItem); const Color aLocalColor = static_cast<const XFillColorItem&>(rLocalSet.Get(XATTR_FILLCOLOR)).GetColorValue(); @@ -1069,7 +1069,7 @@ void E3dView::DoDepthArrange(E3dScene const * pScene, double fDepth) // do pAct->mpObj and pExtrudeObj overlap? Check by // using logical AND clipping const basegfx::B2DPolyPolygon aAndPolyPolygon( - basegfx::tools::solvePolygonOperationAnd( + basegfx::utils::solvePolygonOperationAnd( aExtrudePoly, pAct->maPreparedPolyPolygon)); @@ -1370,7 +1370,7 @@ void E3dView::Start3DCreation() { SdrObject* pMark = GetMarkedObjectByIndex(nMark); basegfx::B2DPolyPolygon aXPP(pMark->TakeXorPoly()); - aR.expand(basegfx::tools::getRange(aXPP)); + aR.expand(basegfx::utils::getRange(aXPP)); } basegfx::B2DPoint aCenter(aR.getCenter()); diff --git a/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx b/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx index f908782b015c..3036fd96a330 100644 --- a/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx +++ b/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx @@ -46,7 +46,7 @@ namespace drawinglayer maPrimitives.resize(1); maPrimitives[0] = drawinglayer::primitive2d::createPolyPolygonFillPrimitive( basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( maLastPaintRange)), maLastDefineRange, maFillAttribute.get() ? *maFillAttribute.get() : drawinglayer::attribute::SdrFillAttribute(), diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx index aab8310c0388..0567ff65c473 100644 --- a/svx/source/sdr/contact/viewcontact.cxx +++ b/svx/source/sdr/contact/viewcontact.cxx @@ -225,7 +225,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContact::createViewIndepende // Since we have no access to any known model data here, the default implementation creates a yellow placeholder // hairline polygon with a default size of (1000, 1000, 5000, 3000) OSL_FAIL("ViewContact::createViewIndependentPrimitive2DSequence(): Never call the fallback base implementation, this is always an error (!)"); - const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(1000.0, 1000.0, 5000.0, 3000.0))); + const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(basegfx::B2DRange(1000.0, 1000.0, 5000.0, 3000.0))); const basegfx::BColor aYellow(1.0, 1.0, 0.0); const drawinglayer::primitive2d::Primitive2DReference xReference( new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow)); diff --git a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx index 55fe8fd7b5ab..71b973bdb7f9 100644 --- a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx @@ -56,7 +56,7 @@ namespace sdr // calculate texture size; use size of top/bottom cap to get a perfect mapping // for the caps. The in-between geometry will get a stretched size with a // relative factor size of caps to extrude depth - const basegfx::B2DRange aRange(basegfx::tools::getRange(aPolyPolygon)); + const basegfx::B2DRange aRange(basegfx::utils::getRange(aPolyPolygon)); const basegfx::B2DVector aTextureSize(aRange.getWidth(), aRange.getHeight()); // get more data diff --git a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx index 7418cbde07c8..695edc001e4a 100644 --- a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx @@ -62,11 +62,11 @@ namespace sdr for(sal_uInt32 a(0); a < nPolygonCount; a++) { const basegfx::B2DPolygon aCandidate(aPolyPolygon.getB2DPolygon(a)); - const double fPolygonLength(basegfx::tools::getLength(aCandidate)); + const double fPolygonLength(basegfx::utils::getLength(aCandidate)); fPolygonMaxLength = std::max(fPolygonMaxLength, fPolygonLength); } - const basegfx::B2DRange aPolyPolygonRange(basegfx::tools::getRange(aPolyPolygon)); + const basegfx::B2DRange aPolyPolygonRange(basegfx::utils::getRange(aPolyPolygon)); const basegfx::B2DVector aTextureSize( F_PI * fabs(aPolyPolygonRange.getCenter().getX()), // PI * d fPolygonMaxLength); diff --git a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx index 76e2b49d5fd6..67ce76105e7d 100644 --- a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx @@ -108,7 +108,7 @@ namespace sdr { // #i98314# // create texture size from object's size - const basegfx::B3DRange aObjectRange(basegfx::tools::getRange(aPolyPolygon3D)); + const basegfx::B3DRange aObjectRange(basegfx::utils::getRange(aPolyPolygon3D)); double fWidth(0.0); double fHeight(0.0); diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index ce0018aad9d1..04ed83668424 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -128,8 +128,8 @@ namespace sdr { // create the EmptyPresObj fallback visualisation. The fallback graphic // is already provided in rGraphicObject in this case, use it - aSmallerMatrix = basegfx::tools::createScaleTranslateB2DHomMatrix(aPrefSize.getWidth(), aPrefSize.getHeight(), fOffsetX, fOffsetY); - aSmallerMatrix = basegfx::tools::createShearXRotateTranslateB2DHomMatrix(fShearX, fRotate, aTranslate) + aSmallerMatrix = basegfx::utils::createScaleTranslateB2DHomMatrix(aPrefSize.getWidth(), aPrefSize.getHeight(), fOffsetX, fOffsetY); + aSmallerMatrix = basegfx::utils::createShearXRotateTranslateB2DHomMatrix(fShearX, fRotate, aTranslate) * aSmallerMatrix; const GraphicObject& rGraphicObject = GetGrafObject().GetGraphicObject(); @@ -167,7 +167,7 @@ namespace sdr // create a surrounding frame when no linestyle given const Color aColor(Application::GetSettings().GetStyleSettings().GetShadowColor()); const basegfx::BColor aBColor(aColor.getBColor()); - basegfx::B2DPolygon aOutline(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aOutline(basegfx::utils::createUnitPolygon()); aOutline.transform(rObjectMatrix); xRetval.push_back( @@ -217,7 +217,7 @@ namespace sdr && basegfx::fTools::lessOrEqual(fWidth, aScale.getX()) && basegfx::fTools::lessOrEqual(fHeight, aScale.getY())) { - const basegfx::B2DHomMatrix aBitmapMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aBitmapMatrix(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( fWidth, fHeight, fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); xRetval.push_back( @@ -265,7 +265,7 @@ namespace sdr if(pSdrText && pOPO) { // directly use the remaining space as TextRangeTransform - const basegfx::B2DHomMatrix aTextRangeTransform(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aTextRangeTransform(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aScale, fShearX, fRotate, aTranslate)); // directly create temp SdrBlockTextPrimitive2D @@ -359,7 +359,7 @@ namespace sdr // fill object matrix const double fShearX(rGeoStat.nShearAngle ? tan((36000 - rGeoStat.nShearAngle) * F_PI18000) : 0.0); const double fRotate(nRotationAngle ? (36000 - nRotationAngle) * F_PI18000 : 0.0); - const basegfx::B2DHomMatrix aObjectMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aObjectMatrix(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aObjectRange.getWidth(), aObjectRange.getHeight(), fShearX, fRotate, aObjectRange.getMinX(), aObjectRange.getMinY())); diff --git a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx index 5486e7fac5a4..fa79f10b7354 100644 --- a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx +++ b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx @@ -66,7 +66,7 @@ namespace sdr rOwnerPage.GetLeftBorder(), rOwnerPage.GetUpperBorder(), rOwnerPage.GetWidth() - rOwnerPage.GetRightBorder(), rOwnerPage.GetHeight() - rOwnerPage.GetLowerBorder()); - const basegfx::B2DPolygon aInnerPolgon(basegfx::tools::createPolygonFromRect(aInnerRange)); + const basegfx::B2DPolygon aInnerPolgon(basegfx::utils::createPolygonFromRect(aInnerRange)); const drawinglayer::primitive2d::Primitive2DReference xReference( drawinglayer::primitive2d::createPolyPolygonFillPrimitive( basegfx::B2DPolyPolygon(aInnerPolgon), diff --git a/svx/source/sdr/contact/viewcontactofpageobj.cxx b/svx/source/sdr/contact/viewcontactofpageobj.cxx index 9913b4d59391..a79c8e70c073 100644 --- a/svx/source/sdr/contact/viewcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewcontactofpageobj.cxx @@ -71,7 +71,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageObj::createView // which is aOutRect for SdrPageObj. const tools::Rectangle aModelRectangle(GetPageObj().GetLastBoundRect()); const basegfx::B2DRange aModelRange(aModelRectangle.Left(), aModelRectangle.Top(), aModelRectangle.Right(), aModelRectangle.Bottom()); - const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aModelRange)); + const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aModelRange)); const basegfx::BColor aYellow(1.0, 1.0, 0.0); const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow)); diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx index cb4912053bfc..e9345ffcb808 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx @@ -76,7 +76,7 @@ namespace sdr const GeoStat& rGeoStat(rCaptionObj.GetGeoStat()); // fill object matrix - basegfx::B2DHomMatrix aObjectMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aObjectMatrix(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aObjectRange.getWidth(), aObjectRange.getHeight(), rGeoStat.nShearAngle ? tan((36000 - rGeoStat.nShearAngle) * F_PI18000) : 0.0, rGeoStat.nRotationAngle ? (36000 - rGeoStat.nRotationAngle) * F_PI18000 : 0.0, @@ -91,7 +91,7 @@ namespace sdr // Hack for calc, transform position of tail according // to current zoom so as objects relative position to grid // appears stable - aTail.transform( basegfx::tools::createTranslateB2DHomMatrix( aGridOff.X(), aGridOff.Y() ) ); + aTail.transform( basegfx::utils::createTranslateB2DHomMatrix( aGridOff.X(), aGridOff.Y() ) ); // create primitive. Always create one (even if invisible) to let the decomposition // of SdrCaptionPrimitive2D create needed invisible elements for HitTest and BoundRect const drawinglayer::primitive2d::Primitive2DReference xReference( @@ -155,7 +155,7 @@ namespace sdr // emulate that shadow is *not* visible behind the object for // transparent object fill for comments in excel basegfx::B2DPolygon aObjectOutline( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRange(0.0, 0.0, 1.0, 1.0), fCornerRadiusX, fCornerRadiusY)); @@ -164,11 +164,11 @@ namespace sdr // create shadow outline basegfx::B2DPolygon aShadowOutline(aObjectOutline); aShadowOutline.transform( - basegfx::tools::createTranslateB2DHomMatrix(nXDist, nYDist)); + basegfx::utils::createTranslateB2DHomMatrix(nXDist, nYDist)); // clip shadow outline against object outline const basegfx::B2DPolyPolygon aClippedShadow( - basegfx::tools::clipPolygonOnPolyPolygon( + basegfx::utils::clipPolygonOnPolyPolygon( aShadowOutline, basegfx::B2DPolyPolygon(aObjectOutline), false, // take the outside diff --git a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx index 50bc75980a2f..bcc4137f8083 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx @@ -62,7 +62,7 @@ namespace sdr // fill object matrix const basegfx::B2DHomMatrix aObjectMatrix( - basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aObjectRange.getWidth(), aObjectRange.getHeight(), rGeoStat.nShearAngle ? tan((36000 - rGeoStat.nShearAngle) * F_PI18000) : 0.0, rGeoStat.nRotationAngle ? (36000 - rGeoStat.nRotationAngle) * F_PI18000 : 0.0, diff --git a/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx b/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx index 65290881c63f..c22d14e18fa0 100644 --- a/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx @@ -45,7 +45,7 @@ namespace sdr // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable - aEdgeTrack.transform( basegfx::tools::createTranslateB2DHomMatrix( aGridOff.X(), aGridOff.Y() ) ); + aEdgeTrack.transform( basegfx::utils::createTranslateB2DHomMatrix( aGridOff.X(), aGridOff.Y() ) ); // what to do when no EdgeTrack is provided (HitTest and selectability) ? OSL_ENSURE(0 != aEdgeTrack.count(), "Connectors with no geometry are not allowed (!)"); diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx index d70b9b48761a..e6c696601bc7 100644 --- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx @@ -72,7 +72,7 @@ basegfx::B2DHomMatrix ViewContactOfSdrOle2Obj::createObjectTransform() const const double fShearX(rGeoStat.nShearAngle ? tan((36000 - rGeoStat.nShearAngle) * F_PI18000) : 0.0); const double fRotate(rGeoStat.nRotationAngle ? (36000 - rGeoStat.nRotationAngle) * F_PI18000 : 0.0); - return basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + return basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aObjectRange.getWidth(), aObjectRange.getHeight(), fShearX, fRotate, @@ -126,7 +126,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrOle2Obj::createP { // create embedding transformation basegfx::B2DHomMatrix aEmbed( - basegfx::tools::createTranslateB2DHomMatrix( + basegfx::utils::createTranslateB2DHomMatrix( -aChartContentRange.getMinX(), -aChartContentRange.getMinY())); diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx index 1b9d6c903b04..75d6dfe9b7f8 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx @@ -211,7 +211,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfMasterPage::createV const basegfx::B2DRange aInnerRange( rPage.GetLeftBorder(), rPage.GetUpperBorder(), rPage.GetWidth() - rPage.GetRightBorder(), rPage.GetHeight() - rPage.GetLowerBorder()); - const basegfx::B2DPolygon aInnerPolgon(basegfx::tools::createPolygonFromRect(aInnerRange)); + const basegfx::B2DPolygon aInnerPolgon(basegfx::utils::createPolygonFromRect(aInnerRange)); const drawinglayer::primitive2d::Primitive2DReference xReference( drawinglayer::primitive2d::createPolyPolygonFillPrimitive( basegfx::B2DPolyPolygon(aInnerPolgon), @@ -247,7 +247,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageFill::createVie { const SdrPage& rPage = getPage(); const basegfx::B2DRange aPageFillRange(0.0, 0.0, (double)rPage.GetWidth(), (double)rPage.GetHeight()); - const basegfx::B2DPolygon aPageFillPolygon(basegfx::tools::createPolygonFromRect(aPageFillRange)); + const basegfx::B2DPolygon aPageFillPolygon(basegfx::utils::createPolygonFromRect(aPageFillRange)); // We have only the page information, not the view information. Use the // svtools::DOCCOLOR color for initialisation @@ -315,7 +315,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfOuterPageBorder::cr else { xRetval.resize(1); - const basegfx::B2DPolygon aPageBorderPolygon(basegfx::tools::createPolygonFromRect(aPageBorderRange)); + const basegfx::B2DPolygon aPageBorderPolygon(basegfx::utils::createPolygonFromRect(aPageBorderRange)); xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPageBorderPolygon, aRGBBorderColor)); } @@ -345,7 +345,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfInnerPageBorder::cr const basegfx::B2DRange aPageBorderRange( (double)rPage.GetLeftBorder(), (double)rPage.GetUpperBorder(), (double)(rPage.GetWidth() - rPage.GetRightBorder()), (double)(rPage.GetHeight() - rPage.GetLowerBorder())); - const basegfx::B2DPolygon aPageBorderPolygon(basegfx::tools::createPolygonFromRect(aPageBorderRange)); + const basegfx::B2DPolygon aPageBorderPolygon(basegfx::utils::createPolygonFromRect(aPageBorderRange)); // We have only the page information, not the view information. Use the // svtools::FONTCOLOR or svtools::DOCBOUNDARIES color for initialisation diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx index 5433095ad7a6..2f203971ad4f 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx @@ -78,7 +78,7 @@ namespace sdr // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable - aUnitPolyPolygon.transform( basegfx::tools::createTranslateB2DHomMatrix( aGridOff.X(), aGridOff.Y() ) ); + aUnitPolyPolygon.transform( basegfx::utils::createTranslateB2DHomMatrix( aGridOff.X(), aGridOff.Y() ) ); sal_uInt32 nPolyCount(ensureGeometry(aUnitPolyPolygon)); // prepare object transformation and unit polygon (direct model data) @@ -111,7 +111,7 @@ namespace sdr basegfx::B2DRange aClipRange(-nPageWidth, -nPageHeight, nPageWidth*2, nPageHeight*2); - aUnitPolyPolygon = basegfx::tools::clipPolyPolygonOnRange(aUnitPolyPolygon, + aUnitPolyPolygon = basegfx::utils::clipPolyPolygonOnRange(aUnitPolyPolygon, aClipRange, true, true); nPolyCount = ensureGeometry(aUnitPolyPolygon); @@ -139,7 +139,7 @@ namespace sdr aUnitPolyPolygon.setB2DPolygon(0, aNewPolygon); // #i102548# fill objectMatrix with rotation and offset (no shear for lines) - aObjectMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aObjectMatrix = basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aLine.getLength(), 1.0, 0.0, atan2(aLine.getY(), aLine.getX()), @@ -149,14 +149,14 @@ namespace sdr { // #i102548# create unscaled, unsheared, unrotated and untranslated polygon // (unit polygon) by creating the object matrix and back-transforming the polygon - const basegfx::B2DRange aObjectRange(basegfx::tools::getRange(aUnitPolyPolygon)); + const basegfx::B2DRange aObjectRange(basegfx::utils::getRange(aUnitPolyPolygon)); const GeoStat& rGeoStat(GetPathObj().GetGeoStat()); const double fWidth(aObjectRange.getWidth()); const double fHeight(aObjectRange.getHeight()); const double fScaleX(basegfx::fTools::equalZero(fWidth) ? 1.0 : fWidth); const double fScaleY(basegfx::fTools::equalZero(fHeight) ? 1.0 : fHeight); - aObjectMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aObjectMatrix = basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( fScaleX, fScaleY, rGeoStat.nShearAngle ? tan((36000 - rGeoStat.nShearAngle) * F_PI18000) : 0.0, rGeoStat.nRotationAngle ? (36000 - rGeoStat.nRotationAngle) * F_PI18000 : 0.0, diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx index f3d50c23a125..c508f3fc8515 100644 --- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx @@ -59,7 +59,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrRectObj::createV const GeoStat& rGeoStat(GetRectObj().GetGeoStat()); // fill object matrix - basegfx::B2DHomMatrix aObjectMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aObjectMatrix(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aObjectRange.getWidth(), aObjectRange.getHeight(), rGeoStat.nShearAngle ? tan((36000 - rGeoStat.nShearAngle) * F_PI18000) : 0.0, rGeoStat.nRotationAngle ? (36000 - rGeoStat.nRotationAngle) * F_PI18000 : 0.0, diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx index ff3c266bba01..324dc67bf091 100644 --- a/svx/source/sdr/contact/viewobjectcontact.cxx +++ b/svx/source/sdr/contact/viewobjectcontact.cxx @@ -31,7 +31,7 @@ #include <basegfx/numeric/ftools.hxx> #include <basegfx/color/bcolor.hxx> #include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive2d/animatedprimitive2d.hxx> #include <drawinglayer/processor2d/baseprocessor2d.hxx> #include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx> diff --git a/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx b/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx index 2cd53ba26509..a46f0216a9cd 100644 --- a/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx @@ -27,7 +27,7 @@ #include <basegfx/color/bcolormodifier.hxx> #include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx> #include <sdr/contact/viewobjectcontactofe3d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> using namespace com::sun::star; diff --git a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx index cb676b712f7f..0aa5178fd70e 100644 --- a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx @@ -23,7 +23,7 @@ #include <svx/sdr/contact/objectcontact.hxx> #include <basegfx/numeric/ftools.hxx> #include <drawinglayer/primitive2d/groupprimitive2d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <svx/sdr/contact/viewcontact.hxx> #include <svx/svdobj.hxx> #include <vcl/outdev.hxx> diff --git a/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx b/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx index fd19a9d41f36..2188d74afd6d 100644 --- a/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx @@ -123,7 +123,7 @@ namespace sdr // need to create a clip primitive, add clipped list to target const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::MaskPrimitive2D( - basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(aCommonArea)), xMasterPageSequence)); + basegfx::B2DPolyPolygon(basegfx::utils::createPolygonFromRect(aCommonArea)), xMasterPageSequence)); xRetval.push_back(xReference); } } diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index b59a45d5f72d..ccdf9c2a9940 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -233,7 +233,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageObj::crea svtools::ColorConfigValue aBorderConfig = aColorConfig.GetColorValue(svtools::DOCBOUNDARIES); const Color aBorderColor = aBorderConfig.bIsVisible ? aBorderConfig.nColor : aDocColor; const basegfx::B2DRange aPageBound(0.0, 0.0, fPageWidth, fPageHeight); - const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aPageBound)); + const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aPageBound)); // add replacement fill xPageContent[0L] = drawinglayer::primitive2d::Primitive2DReference( @@ -288,7 +288,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageObj::crea if(bCreateGrayFrame) { const Color aFrameColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES).nColor); - basegfx::B2DPolygon aOwnOutline(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aOwnOutline(basegfx::utils::createUnitPolygon()); aOwnOutline.transform(aPageObjectTransform); const drawinglayer::primitive2d::Primitive2DReference xGrayFrame( diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx index 854f88bae6af..3573eecc0d06 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx @@ -111,7 +111,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfSdrOle2Obj::c const basegfx::B2DHomMatrix aObjectMatrix(static_cast< ViewContactOfSdrOle2Obj& >(GetViewContact()).createObjectTransform()); // shade the representation if the object is activated outplace - basegfx::B2DPolygon aObjectOutline(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aObjectOutline(basegfx::utils::createUnitPolygon()); aObjectOutline.transform(aObjectMatrix); // Use a FillHatchPrimitive2D with necessary attributes diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx index 1a57043194df..1022a51f16f7 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx @@ -216,7 +216,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageFill::cre const SdrPage& rPage = getPage(); const basegfx::B2DRange aPageFillRange(0.0, 0.0, (double)rPage.GetWidth(), (double)rPage.GetHeight()); - const basegfx::B2DPolygon aPageFillPolygon(basegfx::tools::createPolygonFromRect(aPageFillRange)); + const basegfx::B2DPolygon aPageFillPolygon(basegfx::utils::createPolygonFromRect(aPageFillRange)); Color aPageFillColor; if(pPageView->GetApplicationDocumentColor() != COL_AUTO) diff --git a/svx/source/sdr/overlay/overlayobjectcell.cxx b/svx/source/sdr/overlay/overlayobjectcell.cxx index 934fc1dd4de8..2508c19dbd81 100644 --- a/svx/source/sdr/overlay/overlayobjectcell.cxx +++ b/svx/source/sdr/overlay/overlayobjectcell.cxx @@ -60,7 +60,7 @@ namespace sdr for(sal_uInt32 a(0); a < nCount; a++) { const basegfx::B2DRange& rRange(maRectangles[a]); - const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(rRange)); + const basegfx::B2DPolygon aPolygon(basegfx::utils::createPolygonFromRect(rRange)); aRetval[a] = drawinglayer::primitive2d::Primitive2DReference( new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( diff --git a/svx/source/sdr/overlay/overlayrollingrectangle.cxx b/svx/source/sdr/overlay/overlayrollingrectangle.cxx index 1f75c8fa9094..9b903fa4658e 100644 --- a/svx/source/sdr/overlay/overlayrollingrectangle.cxx +++ b/svx/source/sdr/overlay/overlayrollingrectangle.cxx @@ -45,7 +45,7 @@ namespace sdr if(mbShowBounds) { // view-independent part, create directly - const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(aRollingRectangle)); + const basegfx::B2DPolygon aPolygon(basegfx::utils::createPolygonFromRect(aRollingRectangle)); aRetval.resize(2); aRetval[0] = new drawinglayer::primitive2d::PolyPolygonMarkerPrimitive2D( diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index 0eb66b097578..13e8e4ad1e16 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -43,7 +43,7 @@ namespace sdr for(sal_uInt32 a(0); a < nCount; a++) { - const basegfx::B2DPolygon aDiscretePolygon(basegfx::tools::createPolygonFromRect(rRanges[a])); + const basegfx::B2DPolygon aDiscretePolygon(basegfx::utils::createPolygonFromRect(rRanges[a])); if(0 == a) { @@ -51,7 +51,7 @@ namespace sdr } else { - aRetval = basegfx::tools::solvePolygonOperationOr(aRetval, basegfx::B2DPolyPolygon(aDiscretePolygon)); + aRetval = basegfx::utils::solvePolygonOperationOr(aRetval, basegfx::B2DPolyPolygon(aDiscretePolygon)); } } @@ -111,7 +111,7 @@ namespace sdr for(sal_uInt32 a(0);a < nCount; a++) { - const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(maRanges[a])); + const basegfx::B2DPolygon aPolygon(basegfx::utils::createPolygonFromRect(maRanges[a])); aRetval[a] = drawinglayer::primitive2d::Primitive2DReference( new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( basegfx::B2DPolyPolygon(aPolygon), diff --git a/svx/source/sdr/overlay/overlaytools.cxx b/svx/source/sdr/overlay/overlaytools.cxx index c0a5acc66fa5..c9f367758261 100644 --- a/svx/source/sdr/overlay/overlaytools.cxx +++ b/svx/source/sdr/overlay/overlaytools.cxx @@ -67,7 +67,7 @@ void OverlayStaticRectanglePrimitive::create2DDecomposition(Primitive2DContainer if (basegfx::fTools::more(getDiscreteUnit(), 0.0) && mfTransparence <= 1.0) { basegfx::B2DPolygon aPolygon( - basegfx::tools::createPolygonFromRect(aRange)); + basegfx::utils::createPolygonFromRect(aRange)); // create filled primitive basegfx::B2DPolyPolygon aPolyPolygon; @@ -315,18 +315,18 @@ namespace drawinglayer const double fRelativeRadiusX(fFullGrow / aOuterRange.getWidth()); const double fRelativeRadiusY(fFullGrow / aOuterRange.getHeight()); basegfx::B2DPolygon aOuterPolygon( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( aOuterRange, fRelativeRadiusX, fRelativeRadiusY)); basegfx::B2DPolygon aInnerPolygon( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( aInnerRange)); // apply evtl. existing rotation if(!basegfx::fTools::equalZero(getRotation())) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createRotateAroundPoint( + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createRotateAroundPoint( getObjectRange().getMinX(), getObjectRange().getMinY(), getRotation())); aOuterPolygon.transform(aTransform); diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx index 62c4133bce57..2010c616b426 100644 --- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx @@ -37,7 +37,7 @@ namespace drawinglayer Primitive2DContainer aRetval; // create unit outline polygon - const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromRect( + const basegfx::B2DPolygon aUnitOutline(basegfx::utils::createPolygonFromRect( basegfx::B2DRange(0.0, 0.0, 1.0, 1.0), getCornerRadiusX(), getCornerRadiusY())); diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx index 5677fb20f86d..06724bfee652 100644 --- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx @@ -40,7 +40,7 @@ namespace drawinglayer // add text if(!getSdrSTAttribute().getText().isDefault()) { - const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createUnitPolygon()); + const basegfx::B2DPolygon aUnitOutline(basegfx::utils::createUnitPolygon()); aRetval.push_back( createTextPrimitive( diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index c07e216964c5..635d0cff112b 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -37,7 +37,7 @@ #include <drawinglayer/primitive2d/animatedprimitive2d.hxx> #include <drawinglayer/animation/animationtiming.hxx> #include <drawinglayer/primitive2d/maskprimitive2d.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/geometry/viewinformation2d.hxx> #include <drawinglayer/primitive2d/texthierarchyprimitive2d.hxx> #include <drawinglayer/attribute/sdrfillattribute.hxx> @@ -63,7 +63,7 @@ namespace drawinglayer { // when we have no given definition range, use the range of the given geometry // also for definition (simplest case) - const basegfx::B2DRange aRange(basegfx::tools::getRange(rPolyPolygon)); + const basegfx::B2DRange aRange(basegfx::utils::getRange(rPolyPolygon)); return createPolyPolygonFillPrimitive( rPolyPolygon, @@ -130,7 +130,7 @@ namespace drawinglayer // create FillGradientPrimitive2D for transparence and add to new sequence // fillGradientPrimitive is enough here (compared to PolyPolygonGradientPrimitive2D) since float transparence will be masked anyways - const basegfx::B2DRange aRange(basegfx::tools::getRange(rPolyPolygon)); + const basegfx::B2DRange aRange(basegfx::utils::getRange(rPolyPolygon)); const Primitive2DReference xRefB( new FillGradientPrimitive2D( aRange, @@ -212,14 +212,14 @@ namespace drawinglayer // scale outline to object's size to allow growing with value relative to that size // and also to keep aspect ratio basegfx::B2DPolyPolygon aScaledUnitPolyPolygon(rUnitPolyPolygon); - aScaledUnitPolyPolygon.transform(basegfx::tools::createScaleB2DHomMatrix( + aScaledUnitPolyPolygon.transform(basegfx::utils::createScaleB2DHomMatrix( fabs(aScale.getX()), fabs(aScale.getY()))); // grow the polygon. To shrink, use negative value (half width) - aScaledUnitPolyPolygon = basegfx::tools::growInNormalDirection(aScaledUnitPolyPolygon, -(rStroke.getWidth() * 0.5)); + aScaledUnitPolyPolygon = basegfx::utils::growInNormalDirection(aScaledUnitPolyPolygon, -(rStroke.getWidth() * 0.5)); // scale back to unit polygon - aScaledUnitPolyPolygon.transform(basegfx::tools::createScaleB2DHomMatrix( + aScaledUnitPolyPolygon.transform(basegfx::utils::createScaleB2DHomMatrix( 0.0 != aScale.getX() ? 1.0 / aScale.getX() : 1.0, 0.0 != aScale.getY() ? 1.0 / aScale.getY() : 1.0)); @@ -271,7 +271,7 @@ namespace drawinglayer aJustScaleTransform.set(1, 1, aScale.getY()); basegfx::B2DPolyPolygon aScaledUnitPolyPolygon(rUnitPolyPolygon); aScaledUnitPolyPolygon.transform(aJustScaleTransform); - const basegfx::B2DRange aSnapRange(basegfx::tools::getRange(aScaledUnitPolyPolygon)); + const basegfx::B2DRange aSnapRange(basegfx::utils::getRange(aScaledUnitPolyPolygon)); // create a range describing the wanted text position and size (aTextAnchorRange). This // means to use the text distance values here @@ -284,7 +284,7 @@ namespace drawinglayer // now create a transformation from this basic range (aTextAnchorRange) // #i121494# if we have no scale use at least 1.0 to have a carrier e.g. for // mirror values, else these will get lost - aAnchorTransform = basegfx::tools::createScaleTranslateB2DHomMatrix( + aAnchorTransform = basegfx::utils::createScaleTranslateB2DHomMatrix( basegfx::fTools::equalZero(aTextAnchorRange.getWidth()) ? 1.0 : aTextAnchorRange.getWidth(), basegfx::fTools::equalZero(aTextAnchorRange.getHeight()) ? 1.0 : aTextAnchorRange.getHeight(), aTextAnchorRange.getMinX(), aTextAnchorRange.getMinY()); @@ -293,7 +293,7 @@ namespace drawinglayer aAnchorTransform.scale(bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0); // apply object's other transforms - aAnchorTransform = basegfx::tools::createShearXRotateTranslateB2DHomMatrix(fShearX, fRotate, aTranslate) + aAnchorTransform = basegfx::utils::createShearXRotateTranslateB2DHomMatrix(fShearX, fRotate, aTranslate) * aAnchorTransform; if(rText.isFitToSize()) @@ -377,7 +377,7 @@ namespace drawinglayer aAnchorTransform.decompose(aScale, aTranslate, fRotate, fShearX); // build transform from scaled only to full AnchorTransform and inverse - const basegfx::B2DHomMatrix aSRT(basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aSRT(basegfx::utils::createShearXRotateTranslateB2DHomMatrix( fShearX, fRotate, aTranslate)); basegfx::B2DHomMatrix aISRT(aSRT); aISRT.invert(); @@ -451,7 +451,7 @@ namespace drawinglayer // scrolling needs an encapsulating clipping primitive const basegfx::B2DRange aClipRange(aClipTopLeft, aClipBottomRight); - basegfx::B2DPolygon aClipPolygon(basegfx::tools::createPolygonFromRect(aClipRange)); + basegfx::B2DPolygon aClipPolygon(basegfx::utils::createPolygonFromRect(aClipRange)); aClipPolygon.transform(aSRT); return Primitive2DReference(new MaskPrimitive2D(basegfx::B2DPolyPolygon(aClipPolygon), aContent)); } diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx index f9a02ff47031..75d2bd8f8aea 100644 --- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx @@ -43,11 +43,11 @@ namespace drawinglayer // Do use createPolygonFromUnitCircle, but let create from first quadrant to mimic old geometry creation. // This is needed to have the same look when stroke is used since the polygon start point defines the // stroke start, too. - basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromUnitCircle(1)); + basegfx::B2DPolygon aUnitOutline(basegfx::utils::createPolygonFromUnitCircle(1)); // scale and move UnitEllipse to UnitObject (-1,-1 1,1) -> (0,0 1,1) const basegfx::B2DHomMatrix aUnitCorrectionMatrix( - basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); + basegfx::utils::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); // apply to the geometry aUnitOutline.transform(aUnitCorrectionMatrix); @@ -150,7 +150,7 @@ namespace drawinglayer Primitive2DContainer aRetval; // create unit outline polygon - basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromUnitEllipseSegment(mfStartAngle, mfEndAngle)); + basegfx::B2DPolygon aUnitOutline(basegfx::utils::createPolygonFromUnitEllipseSegment(mfStartAngle, mfEndAngle)); if(mbCloseSegment) { @@ -166,7 +166,7 @@ namespace drawinglayer // move and scale UnitEllipse to UnitObject (-1,-1 1,1) -> (0,0 1,1) const basegfx::B2DHomMatrix aUnitCorrectionMatrix( - basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); + basegfx::utils::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); // apply to the geometry aUnitOutline.transform(aUnitCorrectionMatrix); diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx index a4d82ac87483..4f0cca8de993 100644 --- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx @@ -37,7 +37,7 @@ namespace drawinglayer Primitive2DContainer aRetval; // create unit outline polygon - basegfx::B2DPolygon aUnitOutline(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aUnitOutline(basegfx::utils::createUnitPolygon()); // add fill, but only when graphic is transparent if(!getSdrLFSTAttribute().getFill().isDefault() && isTransparent()) @@ -82,7 +82,7 @@ namespace drawinglayer double fScaleX(0.0 != aScale.getX() ? fHalfLineWidth / fabs(aScale.getX()) : 1.0); double fScaleY(0.0 != aScale.getY() ? fHalfLineWidth / fabs(aScale.getY()) : 1.0); const basegfx::B2DRange aExpandedRange(-fScaleX, -fScaleY, 1.0 + fScaleX, 1.0 + fScaleY); - basegfx::B2DPolygon aExpandedUnitOutline(basegfx::tools::createPolygonFromRect(aExpandedRange)); + basegfx::B2DPolygon aExpandedUnitOutline(basegfx::utils::createPolygonFromRect(aExpandedRange)); aExpandedUnitOutline.transform(getTransform()); aRetval.push_back( diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index 29eb158b776b..191d7811f7bd 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -23,7 +23,7 @@ #include <sdr/primitive2d/sdrtextprimitive2d.hxx> #include <svx/sdr/attribute/sdrtextattribute.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <drawinglayer/primitive2d/groupprimitive2d.hxx> #include <rtl/ref.hxx> #include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx> @@ -93,7 +93,7 @@ namespace drawinglayer bool bAutoUpsideDown(false); const attribute::SdrTextAttribute rTextAttribute = getSdrLSTAttribute().getText(); const basegfx::B2DHomMatrix aObjectMatrix( - basegfx::tools::createShearXRotateTranslateB2DHomMatrix(0.0, fAngle, getStart())); + basegfx::utils::createShearXRotateTranslateB2DHomMatrix(0.0, fAngle, getStart())); // preapare text, but do not add yet; it needs to be aligned to // the line geometry @@ -154,7 +154,7 @@ namespace drawinglayer { if(rLineStartEnd.isStartActive()) { - const basegfx::B2DRange aArrowRange(basegfx::tools::getRange(rLineStartEnd.getStartPolyPolygon())); + const basegfx::B2DRange aArrowRange(basegfx::utils::getRange(rLineStartEnd.getStartPolyPolygon())); fStartArrowW = rLineStartEnd.getStartWidth(); fStartArrowH = aArrowRange.getHeight() * fStartArrowW / aArrowRange.getWidth(); @@ -166,7 +166,7 @@ namespace drawinglayer if(rLineStartEnd.isEndActive()) { - const basegfx::B2DRange aArrowRange(basegfx::tools::getRange(rLineStartEnd.getEndPolyPolygon())); + const basegfx::B2DRange aArrowRange(basegfx::utils::getRange(rLineStartEnd.getEndPolyPolygon())); fEndArrowW = rLineStartEnd.getEndWidth(); fEndArrowH = aArrowRange.getHeight() * fEndArrowW / aArrowRange.getWidth(); diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx index e69f009db39a..f687ddbe722e 100644 --- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx @@ -76,7 +76,7 @@ namespace drawinglayer Primitive2DContainer aRetval; // create unit outline polygon - const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createUnitPolygon()); + const basegfx::B2DPolygon aUnitOutline(basegfx::utils::createUnitPolygon()); // add fill if(!bBehaveCompatibleToPaintVersion @@ -112,7 +112,7 @@ namespace drawinglayer double fScaleX(0.0 != aScale.getX() ? fHalfLineWidth / fabs(aScale.getX()) : 1.0); double fScaleY(0.0 != aScale.getY() ? fHalfLineWidth / fabs(aScale.getY()) : 1.0); const basegfx::B2DRange aExpandedRange(-fScaleX, -fScaleY, 1.0 + fScaleX, 1.0 + fScaleY); - basegfx::B2DPolygon aExpandedUnitOutline(basegfx::tools::createPolygonFromRect(aExpandedRange)); + basegfx::B2DPolygon aExpandedUnitOutline(basegfx::utils::createPolygonFromRect(aExpandedRange)); aExpandedUnitOutline.transform(getTransform()); aRetval.push_back( diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx index 27bdb899a3ab..ff77dad9b9bb 100644 --- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx @@ -87,9 +87,9 @@ namespace drawinglayer if(basegfx::fTools::moreOrEqual(fOffsetX, 0.0) && basegfx::fTools::moreOrEqual(fOffsetY, 0.0)) { // if content fits into frame, create it - basegfx::B2DHomMatrix aInnerObjectMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aInnerObjectMatrix(basegfx::utils::createScaleTranslateB2DHomMatrix( aPrefSize.getWidth(), aPrefSize.getHeight(), fOffsetX, fOffsetY)); - aInnerObjectMatrix = basegfx::tools::createShearXRotateTranslateB2DHomMatrix(fShearX, fRotate, aTranslate) + aInnerObjectMatrix = basegfx::utils::createShearXRotateTranslateB2DHomMatrix(fShearX, fRotate, aTranslate) * aInnerObjectMatrix; const drawinglayer::primitive2d::Primitive2DReference aGraphicPrimitive( @@ -119,7 +119,7 @@ namespace drawinglayer if(aColor.bIsVisible) { - basegfx::B2DPolygon aOutline(basegfx::tools::createUnitPolygon()); + basegfx::B2DPolygon aOutline(basegfx::utils::createUnitPolygon()); const Color aVclColor(aColor.nColor); aOutline.transform(getObjectTransform()); const drawinglayer::primitive2d::Primitive2DReference xOutline( diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx index 466292606557..7e7cc221a694 100644 --- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx @@ -38,7 +38,7 @@ namespace drawinglayer Primitive2DContainer aRetval; // create unit outline polygon - const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromRect( + const basegfx::B2DPolygon aUnitOutline(basegfx::utils::createPolygonFromRect( basegfx::B2DRange(0.0, 0.0, 1.0, 1.0), getCornerRadiusX(), getCornerRadiusY())); diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index d36b1eb366c5..b4a491319a00 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -26,7 +26,7 @@ #include <svx/zoomslideritem.hxx> #include <svx/dialmgr.hxx> #include <svx/strings.hrc> -#include <basegfx/tools/zoomtools.hxx> +#include <basegfx/utils/zoomtools.hxx> #include "bitmaps.hlst" #include <set> diff --git a/svx/source/svdraw/gradtrns.cxx b/svx/source/svdraw/gradtrns.cxx index 69f73b51d44f..2672d25d700f 100644 --- a/svx/source/svdraw/gradtrns.cxx +++ b/svx/source/svdraw/gradtrns.cxx @@ -69,7 +69,7 @@ void GradTransformer::GradToVec(GradTransGradient const & rG, GradTransVector& r if(rG.aGradient.GetAngle()) { const double fAngle = (double)rG.aGradient.GetAngle() * (F_PI180 / 10.0); - const basegfx::B2DHomMatrix aTransformation(basegfx::tools::createRotateAroundPoint(aCenter, -fAngle)); + const basegfx::B2DHomMatrix aTransformation(basegfx::utils::createRotateAroundPoint(aCenter, -fAngle)); aStartPos *= aTransformation; aEndPos *= aTransformation; @@ -92,7 +92,7 @@ void GradTransformer::GradToVec(GradTransGradient const & rG, GradTransVector& r if(rG.aGradient.GetAngle()) { const double fAngle = (double)rG.aGradient.GetAngle() * (F_PI180 / 10.0); - const basegfx::B2DHomMatrix aTransformation(basegfx::tools::createRotateAroundPoint(aCenter, -fAngle)); + const basegfx::B2DHomMatrix aTransformation(basegfx::utils::createRotateAroundPoint(aCenter, -fAngle)); aStartPos *= aTransformation; aEndPos *= aTransformation; @@ -116,7 +116,7 @@ void GradTransformer::GradToVec(GradTransGradient const & rG, GradTransVector& r if(rG.aGradient.GetAngle()) { const double fAngle = (double)rG.aGradient.GetAngle() * (F_PI180 / 10.0); - const basegfx::B2DHomMatrix aTransformation(basegfx::tools::createRotateAroundPoint(aEndPos, -fAngle)); + const basegfx::B2DHomMatrix aTransformation(basegfx::utils::createRotateAroundPoint(aEndPos, -fAngle)); aStartPos *= aTransformation; aEndPos *= aTransformation; @@ -151,7 +151,7 @@ void GradTransformer::GradToVec(GradTransGradient const & rG, GradTransVector& r if(rG.aGradient.GetAngle()) { const double fAngle = (double)rG.aGradient.GetAngle() * (F_PI180 / 10.0); - const basegfx::B2DHomMatrix aTransformation(basegfx::tools::createRotateAroundPoint(aEndPos, -fAngle)); + const basegfx::B2DHomMatrix aTransformation(basegfx::utils::createRotateAroundPoint(aEndPos, -fAngle)); aStartPos *= aTransformation; aEndPos *= aTransformation; diff --git a/svx/source/svdraw/polypolygoneditor.cxx b/svx/source/svdraw/polypolygoneditor.cxx index 78778eb9062d..a3edb77872e8 100644 --- a/svx/source/svdraw/polypolygoneditor.cxx +++ b/svx/source/svdraw/polypolygoneditor.cxx @@ -138,8 +138,8 @@ bool PolyPolygonEditor::SetPointsSmooth( basegfx::B2VectorContinuity eFlags, con // set continuity in point, make sure there is a curve bool bPolygonChanged(false); - bPolygonChanged = basegfx::tools::expandToCurveInPoint(aCandidate, nPntNum); - bPolygonChanged |= basegfx::tools::setContinuityInPoint(aCandidate, nPntNum, eFlags); + bPolygonChanged = basegfx::utils::expandToCurveInPoint(aCandidate, nPntNum); + bPolygonChanged |= basegfx::utils::setContinuityInPoint(aCandidate, nPntNum, eFlags); if(bPolygonChanged) { diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index 89158a39e425..b727cfdccdc0 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -227,7 +227,7 @@ namespace if(aCandidate.areControlPointsUsed()) { - aCandidate = basegfx::tools::adaptiveSubdivideByAngle(rCandidate); + aCandidate = basegfx::utils::adaptiveSubdivideByAngle(rCandidate); } if(aCandidate.count()) @@ -257,7 +257,7 @@ namespace if(pObjA && dynamic_cast<const SdrPathObj*>( pObjA) != nullptr) { basegfx::B2DPolyPolygon aPolyA(pObjA->GetPathPoly()); - aPolyA = basegfx::tools::correctOrientations(aPolyA); + aPolyA = basegfx::utils::correctOrientations(aPolyA); basegfx::B2DPolyPolygon aPolyB; @@ -268,7 +268,7 @@ namespace if(pObjB && dynamic_cast<const SdrPathObj*>( pObjB) != nullptr) { basegfx::B2DPolyPolygon aCandidate(pObjB->GetPathPoly()); - aCandidate = basegfx::tools::correctOrientations(aCandidate); + aCandidate = basegfx::utils::correctOrientations(aCandidate); aPolyB.append(aCandidate); } } @@ -277,7 +277,7 @@ namespace { // poly A is the clipregion, clip poly b against it. Algo depends on // poly b being closed. - basegfx::B2DPolyPolygon aResult(basegfx::tools::clipPolyPolygonOnPolyPolygon(aPolyB, aPolyA)); + basegfx::B2DPolyPolygon aResult(basegfx::utils::clipPolyPolygonOnPolyPolygon(aPolyB, aPolyA)); for(sal_uInt32 a(0); a < aResult.count(); a++) { diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx index c23a2b54672b..165cfde3e8e1 100644 --- a/svx/source/svdraw/svdcrtv.cxx +++ b/svx/source/svdraw/svdcrtv.cxx @@ -813,7 +813,7 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/) // Hack for calc, transform position of create placeholder // object according to current zoom so as objects relative // position to grid appears stable - aPoly.transform( basegfx::tools::createTranslateB2DHomMatrix( aGridOff.X(), aGridOff.Y() ) ); + aPoly.transform( basegfx::utils::createTranslateB2DHomMatrix( aGridOff.X(), aGridOff.Y() ) ); mpCreateViewExtraData->CreateAndShowOverlay(*this, nullptr, aPoly); } diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index ecb7800273f3..aed40a9f13d1 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -451,9 +451,9 @@ void SdrDragMethod::createSdrDragEntries_PolygonDrag() { const tools::Rectangle aR(getSdrDragView().GetSdrPageView()->MarkSnap()); const basegfx::B2DRange aNewRectangle(aR.Left(), aR.Top(), aR.Right(), aR.Bottom()); - basegfx::B2DPolygon aNewPolygon(basegfx::tools::createPolygonFromRect(aNewRectangle)); + basegfx::B2DPolygon aNewPolygon(basegfx::utils::createPolygonFromRect(aNewRectangle)); - aResult = basegfx::B2DPolyPolygon(basegfx::tools::expandToCurve(aNewPolygon)); + aResult = basegfx::B2DPolyPolygon(basegfx::utils::expandToCurve(aNewPolygon)); } if(aResult.count()) @@ -608,7 +608,7 @@ void SdrDragMethod::applyCurrentTransformationToSdrObject(SdrObject& rTarget) const double fScaleY(fabs(aScale.getY()) / (basegfx::fTools::equalZero(aPolyRange.getHeight()) ? 1.0 : aPolyRange.getHeight())); // prepare transform matrix for polygon - basegfx::B2DHomMatrix aPolyTransform(basegfx::tools::createTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aPolyTransform(basegfx::utils::createTranslateB2DHomMatrix( -aPolyRange.getMinX(), -aPolyRange.getMinY())); aPolyTransform.scale(fScaleX, fScaleY); @@ -1511,7 +1511,7 @@ bool SdrDragMove::BeginSdrDrag() basegfx::B2DHomMatrix SdrDragMove::getCurrentTransformation() { - return basegfx::tools::createTranslateB2DHomMatrix(DragStat().GetDX(), DragStat().GetDY()); + return basegfx::utils::createTranslateB2DHomMatrix(DragStat().GetDX(), DragStat().GetDY()); } void SdrDragMove::ImpCheckSnap(const Point& rPt) @@ -1833,7 +1833,7 @@ bool SdrDragResize::BeginSdrDrag() basegfx::B2DHomMatrix SdrDragResize::getCurrentTransformation() { - basegfx::B2DHomMatrix aRetval(basegfx::tools::createTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aRetval(basegfx::utils::createTranslateB2DHomMatrix( -DragStat().Ref1().X(), -DragStat().Ref1().Y())); aRetval.scale(double(aXFact), double(aYFact)); aRetval.translate(DragStat().Ref1().X(), DragStat().Ref1().Y()); @@ -2114,7 +2114,7 @@ bool SdrDragRotate::BeginSdrDrag() basegfx::B2DHomMatrix SdrDragRotate::getCurrentTransformation() { - return basegfx::tools::createRotateAroundPoint( + return basegfx::utils::createRotateAroundPoint( DragStat().GetRef1().X(), DragStat().GetRef1().Y(), -atan2(nSin, nCos)); } @@ -2261,7 +2261,7 @@ bool SdrDragShear::BeginSdrDrag() basegfx::B2DHomMatrix SdrDragShear::getCurrentTransformation() { - basegfx::B2DHomMatrix aRetval(basegfx::tools::createTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aRetval(basegfx::utils::createTranslateB2DHomMatrix( -DragStat().GetRef1().X(), -DragStat().GetRef1().Y())); if (bResize) @@ -2555,7 +2555,7 @@ basegfx::B2DHomMatrix SdrDragMirror::getCurrentTransformation() const double fDeltaY(DragStat().GetRef2().Y() - DragStat().GetRef1().Y()); const double fRotation(atan2(fDeltaY, fDeltaX)); - aRetval = basegfx::tools::createTranslateB2DHomMatrix(-DragStat().GetRef1().X(), -DragStat().GetRef1().Y()); + aRetval = basegfx::utils::createTranslateB2DHomMatrix(-DragStat().GetRef1().X(), -DragStat().GetRef1().Y()); aRetval.rotate(-fRotation); aRetval.scale(1.0, -1.0); aRetval.rotate(fRotation); @@ -3478,7 +3478,7 @@ void SdrDragDistort::MovAllPoints(basegfx::B2DPolyPolygon& rTarget) const basegfx::B2DPoint aBottomLeft(aDistortedRect[3].X(), aDistortedRect[3].Y()); const basegfx::B2DPoint aBottomRight(aDistortedRect[2].X(), aDistortedRect[2].Y()); - aDragPolygon = basegfx::tools::distort(aDragPolygon, aOriginalRange, aTopLeft, aTopRight, aBottomLeft, aBottomRight); + aDragPolygon = basegfx::utils::distort(aDragPolygon, aOriginalRange, aTopLeft, aTopRight, aBottomLeft, aBottomRight); rTarget = aDragPolygon; } } @@ -3808,7 +3808,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/) if(!basegfx::fTools::equalZero(fShearX)) { bShearCorrected = true; - aOriginalMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aOriginalMatrix = basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aScale, -fShearX, fRotate, @@ -3895,7 +3895,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/) double fRotate(0.0), fShearX(0.0); aNewObjectMatrix.decompose(aScale, aTranslate, fRotate, fShearX); - aNewObjectMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aNewObjectMatrix = basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aScale, -fShearX, fRotate, @@ -3926,7 +3926,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/) // prepare unsheared/unrotated versions of the old and new transformation const basegfx::B2DHomMatrix aMatrixOriginalNoShearNoRotate( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( basegfx::absolute(aScale), aTranslate)); diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index eea63990eff8..4ca76bccc993 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -1379,7 +1379,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const if(nMarkCount > 1) { // multiple objects, range is collected in aRect - aTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix( + aTransformation = basegfx::utils::createScaleTranslateB2DHomMatrix( aRect.Left(), aRect.Top(), aRect.getWidth(), aRect.getHeight()); } diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 8c4d82fd8ed1..8d39724d7356 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -1009,7 +1009,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode) bool bFirstObjectComplete(false); // make sure selected objects are contour objects - // since now basegfx::tools::adaptiveSubdivide() is used, it is no longer + // since now basegfx::utils::adaptiveSubdivide() is used, it is no longer // necessary to use ConvertMarkedToPolyObj which will subdivide curves using the old // mechanisms. In a next step the polygon clipper will even be able to clip curves... // ConvertMarkedToPolyObj(true); @@ -1045,11 +1045,11 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode) // #i76891# unfortunately ConvertMarkedToPathObj has converted all // involved polygon data to curve segments, even if not necessary. // It is better to try to reduce to more simple polygons. - aTmpPoly = basegfx::tools::simplifyCurveSegments(aTmpPoly); + aTmpPoly = basegfx::utils::simplifyCurveSegments(aTmpPoly); // for each part polygon as preparation, remove self-intersections // correct orientations and get rid of possible neutral polygons. - aTmpPoly = basegfx::tools::prepareForPolygonOperation(aTmpPoly); + aTmpPoly = basegfx::utils::prepareForPolygonOperation(aTmpPoly); if(!bFirstObjectComplete) { @@ -1057,7 +1057,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode) // a single polygon is involved if(aMergePolyPolygonA.count()) { - aMergePolyPolygonA = basegfx::tools::solvePolygonOperationOr(aMergePolyPolygonA, aTmpPoly); + aMergePolyPolygonA = basegfx::utils::solvePolygonOperationOr(aMergePolyPolygonA, aTmpPoly); } else { @@ -1071,7 +1071,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode) // to topologically correctly collect the 2nd polygon // group it is necessary to OR the parts (each is seen as // XOR-FillRule polygon and they are drawn over each-other) - aMergePolyPolygonB = basegfx::tools::solvePolygonOperationOr(aMergePolyPolygonB, aTmpPoly); + aMergePolyPolygonB = basegfx::utils::solvePolygonOperationOr(aMergePolyPolygonB, aTmpPoly); } else { @@ -1100,24 +1100,24 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode) static bool bTestXOR(false); if(bTestXOR) { - aMergePolyPolygonA = basegfx::tools::solvePolygonOperationXor(aMergePolyPolygonA, aMergePolyPolygonB); + aMergePolyPolygonA = basegfx::utils::solvePolygonOperationXor(aMergePolyPolygonA, aMergePolyPolygonB); } else { - aMergePolyPolygonA = basegfx::tools::solvePolygonOperationOr(aMergePolyPolygonA, aMergePolyPolygonB); + aMergePolyPolygonA = basegfx::utils::solvePolygonOperationOr(aMergePolyPolygonA, aMergePolyPolygonB); } break; } case SdrMergeMode::Subtract: { // Subtract B from A - aMergePolyPolygonA = basegfx::tools::solvePolygonOperationDiff(aMergePolyPolygonA, aMergePolyPolygonB); + aMergePolyPolygonA = basegfx::utils::solvePolygonOperationDiff(aMergePolyPolygonA, aMergePolyPolygonB); break; } case SdrMergeMode::Intersect: { // AND B and A - aMergePolyPolygonA = basegfx::tools::solvePolygonOperationAnd(aMergePolyPolygonA, aMergePolyPolygonB); + aMergePolyPolygonA = basegfx::utils::solvePolygonOperationAnd(aMergePolyPolygonA, aMergePolyPolygonB); break; } } @@ -1293,7 +1293,7 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly) // unfortunately ConvertMarkedToPathObj has converted all // involved polygon data to curve segments, even if not necessary. // It is better to try to reduce to more simple polygons. - basegfx::B2DPolyPolygon aTmpPoly(basegfx::tools::simplifyCurveSegments(ImpGetPolyPolygon(pObj))); + basegfx::B2DPolyPolygon aTmpPoly(basegfx::utils::simplifyCurveSegments(ImpGetPolyPolygon(pObj))); aPolyPolygon.insert(0L, aTmpPoly); if(!pInsOL) diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index e605acdb721d..11d01ed01c3d 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -487,7 +487,7 @@ void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj, bool bScale) } // when the clip is a rectangle fast check for inside is possible - if(basegfx::tools::isRectangle(maClip) && aClipRange.isInside(aTextRange)) + if(basegfx::utils::isRectangle(maClip) && aClipRange.isInside(aTextRange)) { // completely inside ClipRect break; @@ -546,7 +546,7 @@ void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj, bool bScale) { // clip against ClipRegion const basegfx::B2DPolyPolygon aNewPoly( - basegfx::tools::clipPolyPolygonOnPolyPolygon( + basegfx::utils::clipPolyPolygonOnPolyPolygon( aPoly, maClip, true, @@ -668,7 +668,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaLineAction const & rAct) if(!aStart.equal(aEnd)) { basegfx::B2DPolygon aLine; - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); aLine.append(aStart); aLine.append(aEnd); @@ -867,7 +867,7 @@ void ImpSdrGDIMetaFileImport::checkClip() if(isClip()) { const basegfx::B2DHomMatrix aTransform( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( mfScaleX, mfScaleY, maOfs.X(), @@ -890,7 +890,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaPolyLineAction const & rAct ) if(aSource.count()) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); aSource.transform(aTransform); } @@ -934,7 +934,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaPolygonAction const & rAct ) if(aSource.count()) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); aSource.transform(aTransform); if(!mbLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(basegfx::B2DPolyPolygon(aSource))) @@ -955,7 +955,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaPolyPolygonAction const & rAct) if(aSource.count()) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); aSource.transform(aTransform); if(!mbLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(aSource)) @@ -1110,7 +1110,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaHatchAction const & rAct ) if(aSource.count()) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); aSource.transform(aTransform); if(!mbLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(aSource)) @@ -1375,7 +1375,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaGradientAction const & rAct) if(!aRange.isEmpty()) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); aRange.transform(aTransform); const Gradient& rGradient = rAct.GetGradient(); SdrRectObj* pRect = new SdrRectObj( @@ -1415,7 +1415,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaTransparentAction const & rAct) if(aSource.count()) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); aSource.transform(aTransform); aSource.setClosed(true); @@ -1432,7 +1432,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaGradientExAction const & rAct) if(aSource.count()) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y())); aSource.transform(aTransform); if(!mbLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(aSource)) diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 979255576f5f..78d21f265bfe 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -2548,7 +2548,7 @@ void SdrCropViewHdl::CreateB2dIAObject() // prepare crop PolyPolygon basegfx::B2DPolygon aGraphicOutlinePolygon( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( aCropped)); basegfx::B2DPolyPolygon aCropPolyPolygon(aGraphicOutlinePolygon); @@ -2560,7 +2560,7 @@ void SdrCropViewHdl::CreateB2dIAObject() if(!aOverlap.isEmpty()) { aCropPolyPolygon.append( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( aOverlap)); } diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 4f01a19d8411..0f2946b8a236 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -79,7 +79,7 @@ #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> -#include <basegfx/tools/unotools.hxx> +#include <basegfx/utils/unotools.hxx> #include "svdconv.hxx" #include <svdobjplusdata.hxx> @@ -577,7 +577,7 @@ basegfx::B2DPolyPolygon SdrObjCustomShape::GetLineGeometry( const bool bBezierAl aRetval = basegfx::unotools::polyPolygonBezierToB2DPolyPolygon( aBezierCoords ); if ( !bBezierAllowed && aRetval.areControlPointsUsed()) { - aRetval = basegfx::tools::adaptiveSubdivideByAngle(aRetval); + aRetval = basegfx::utils::adaptiveSubdivideByAngle(aRetval); } } catch ( const css::lang::IllegalArgumentException & ) @@ -3111,7 +3111,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf } // build matrix - rMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + rMatrix = basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aScale, basegfx::fTools::equalZero(fShearX) ? 0.0 : tan(fShearX), basegfx::fTools::equalZero(fRotate) ? 0.0 : -fRotate, diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index e1257be84517..f5f3f269f866 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -1058,7 +1058,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeXorPoly() const basegfx::B2DPolyPolygon aRetval; const tools::Rectangle aR(GetCurrentBoundRect()); const basegfx::B2DRange aRange(aR.Left(), aR.Top(), aR.Right(), aR.Bottom()); - aRetval.append(basegfx::tools::createPolygonFromRect(aRange)); + aRetval.append(basegfx::utils::createPolygonFromRect(aRange)); return aRetval; } @@ -1365,7 +1365,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeCreatePoly(const SdrDragStat& rDrag) cons basegfx::B2DPolyPolygon aRetval; const basegfx::B2DRange aRange(aRect1.Left(), aRect1.Top(), aRect1.Right(), aRect1.Bottom()); - aRetval.append(basegfx::tools::createPolygonFromRect(aRange)); + aRetval.append(basegfx::utils::createPolygonFromRect(aRange)); return aRetval; } @@ -2370,7 +2370,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, bool bForceLineDas if(!aExtractedLineFills.empty()) { // merge to a single tools::PolyPolygon (OR) - aMergedLineFillPolyPolygon = basegfx::tools::mergeToSinglePolyPolygon(aExtractedLineFills); + aMergedLineFillPolyPolygon = basegfx::utils::mergeToSinglePolyPolygon(aExtractedLineFills); } } @@ -2546,7 +2546,7 @@ SdrObject* SdrObject::ConvertToContourObj(SdrObject* pRet, bool bForceLineDash) // bezier geometry got created, even for straight edges since the given // object is a result of DoConvertToPolyObj. For conversion to contour // this is not really needed and can be reduced again AFAP - pPathObj->SetPathPoly(basegfx::tools::simplifyCurveSegments(pPathObj->GetPathPoly())); + pPathObj->SetPathPoly(basegfx::utils::simplifyCurveSegments(pPathObj->GetPathPoly())); } pRet = ImpConvertToContourObj(pRet, bForceLineDash); @@ -2948,7 +2948,7 @@ bool SdrObject::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPo } // build matrix - rMatrix = basegfx::tools::createScaleTranslateB2DHomMatrix(aScale, aTranslate); + rMatrix = basegfx::utils::createScaleTranslateB2DHomMatrix(aScale, aTranslate); return false; } diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index 2977b745f5f5..f28001060498 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -579,7 +579,7 @@ basegfx::B2DPolyPolygon SdrCaptionObj::TakeCreatePoly(const SdrDragStat& /*rDrag { basegfx::B2DPolyPolygon aRetval; const basegfx::B2DRange aRange(maRect.Left(), maRect.Top(), maRect.Right(), maRect.Bottom()); - aRetval.append(basegfx::tools::createPolygonFromRect(aRange)); + aRetval.append(basegfx::utils::createPolygonFromRect(aRange)); aRetval.append(aTailPoly.getB2DPolygon()); return aRetval; } diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 8e65570e6b42..19e54d9f655b 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -211,12 +211,12 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, c // create full circle. Do not use createPolygonFromEllipse; it's necessary // to get the start point to the bottom of the circle to keep compatible to // old geometry creation - aCircPolygon = basegfx::tools::createPolygonFromUnitCircle(1); + aCircPolygon = basegfx::utils::createPolygonFromUnitCircle(1); // needs own scaling and translation from unit circle to target size (same as // would be in createPolygonFromEllipse) const basegfx::B2DPoint aCenter(aRange.getCenter()); - const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aMatrix(basegfx::utils::createScaleTranslateB2DHomMatrix( aRange.getWidth() / 2.0, aRange.getHeight() / 2.0, aCenter.getX(), aCenter.getY())); aCircPolygon.transform(aMatrix); @@ -229,7 +229,7 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, c const double fEnd((((36000 - nStart) % 36000) / 18000.0) * F_PI); // create circle segment. This is not closed by default - aCircPolygon = basegfx::tools::createPolygonFromEllipseSegment( + aCircPolygon = basegfx::utils::createPolygonFromEllipseSegment( aRange.getCenter(), aRange.getWidth() / 2.0, aRange.getHeight() / 2.0, fStart, fEnd); @@ -258,11 +258,11 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, c { // translate top left to (0,0) const basegfx::B2DPoint aTopLeft(aRange.getMinimum()); - basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aMatrix(basegfx::utils::createTranslateB2DHomMatrix( -aTopLeft.getX(), -aTopLeft.getY())); // shear, rotate and back to top left (if needed) - aMatrix = basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + aMatrix = basegfx::utils::createShearXRotateTranslateB2DHomMatrix( aGeo.nShearAngle ? tan((36000 - aGeo.nShearAngle) * F_PI18000) : 0.0, aGeo.nRotationAngle ? (36000 - aGeo.nRotationAngle) * F_PI18000 : 0.0, aTopLeft) * aMatrix; diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 74b1ad82c85d..b20dee08c4aa 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -1524,7 +1524,7 @@ void SdrGrafObj::addCropHandles(SdrHdlList& rTarget) const fShearX = -fShearX; } - aMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aMatrix = basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aScale, fShearX, fRotate, diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index e5446948abee..a0aa17fc7852 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -319,7 +319,7 @@ basegfx::B2DPolyPolygon SdrObjGroup::TakeXorPoly() const if(!aRetval.count()) { const basegfx::B2DRange aRange(aOutRect.Left(), aOutRect.Top(), aOutRect.Right(), aOutRect.Bottom()); - aRetval.append(basegfx::tools::createPolygonFromRect(aRange)); + aRetval.append(basegfx::utils::createPolygonFromRect(aRange)); } return aRetval; diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index b81fadca3811..9d557e38e30f 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -1392,7 +1392,7 @@ bool SdrMeasureObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B } // build return value matrix - rMatrix = basegfx::tools::createScaleTranslateB2DHomMatrix(aScale, aTranslate); + rMatrix = basegfx::utils::createScaleTranslateB2DHomMatrix(aScale, aTranslate); return true; } diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 9c19d014e106..8b4eb625b127 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1676,7 +1676,7 @@ static bool lcl_ImpIsLine(const basegfx::B2DPolyPolygon& rPolyPolygon) static tools::Rectangle lcl_ImpGetBoundRect(const basegfx::B2DPolyPolygon& rPolyPolygon) { - basegfx::B2DRange aRange(basegfx::tools::getRange(rPolyPolygon)); + basegfx::B2DRange aRange(basegfx::utils::getRange(rPolyPolygon)); return tools::Rectangle( FRound(aRange.getMinX()), FRound(aRange.getMinY()), @@ -1783,11 +1783,11 @@ void SdrPathObj::ImpForceKind() // due to OBJ_PATH type if(aCandidate.isClosed()) { - basegfx::tools::openWithGeometryChange(aCandidate); + basegfx::utils::openWithGeometryChange(aCandidate); } else { - basegfx::tools::closeWithGeometryChange(aCandidate); + basegfx::utils::closeWithGeometryChange(aCandidate); } maPathPolygon.setB2DPolygon(a, aCandidate); @@ -2328,7 +2328,7 @@ Pointer SdrPathObj::GetCreatePointer() const void SdrPathObj::NbcMove(const Size& rSiz) { - maPathPolygon.transform(basegfx::tools::createTranslateB2DHomMatrix(rSiz.Width(), rSiz.Height())); + maPathPolygon.transform(basegfx::utils::createTranslateB2DHomMatrix(rSiz.Width(), rSiz.Height())); // #i19871# first modify locally, then call parent (to get correct SnapRect with GluePoints) SdrTextObj::NbcMove(rSiz); @@ -2336,8 +2336,8 @@ void SdrPathObj::NbcMove(const Size& rSiz) void SdrPathObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-rRef.X(), -rRef.Y())); - aTrans = basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aTrans(basegfx::utils::createTranslateB2DHomMatrix(-rRef.X(), -rRef.Y())); + aTrans = basegfx::utils::createScaleTranslateB2DHomMatrix( double(xFact), double(yFact), rRef.X(), rRef.Y()) * aTrans; maPathPolygon.transform(aTrans); @@ -2348,7 +2348,7 @@ void SdrPathObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract void SdrPathObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs) { // Thank JOE, the angles are defined mirrored to the mathematical meanings - const basegfx::B2DHomMatrix aTrans(basegfx::tools::createRotateAroundPoint(rRef.X(), rRef.Y(), -nAngle * nPi180)); + const basegfx::B2DHomMatrix aTrans(basegfx::utils::createRotateAroundPoint(rRef.X(), rRef.Y(), -nAngle * nPi180)); maPathPolygon.transform(aTrans); // #i19871# first modify locally, then call parent (to get correct SnapRect with GluePoints) @@ -2357,7 +2357,7 @@ void SdrPathObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs) void SdrPathObj::NbcShear(const Point& rRefPnt, long nAngle, double fTan, bool bVShear) { - basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-rRefPnt.X(), -rRefPnt.Y())); + basegfx::B2DHomMatrix aTrans(basegfx::utils::createTranslateB2DHomMatrix(-rRefPnt.X(), -rRefPnt.Y())); if(bVShear) { @@ -2381,7 +2381,7 @@ void SdrPathObj::NbcMirror(const Point& rRefPnt1, const Point& rRefPnt2) const double fDiffX(rRefPnt2.X() - rRefPnt1.X()); const double fDiffY(rRefPnt2.Y() - rRefPnt1.Y()); const double fRot(atan2(fDiffY, fDiffX)); - basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-rRefPnt1.X(), -rRefPnt1.Y())); + basegfx::B2DHomMatrix aTrans(basegfx::utils::createTranslateB2DHomMatrix(-rRefPnt1.X(), -rRefPnt1.Y())); aTrans.rotate(-fRot); aTrans.scale(1.0, -1.0); aTrans.rotate(fRot); @@ -2536,7 +2536,7 @@ sal_uInt32 SdrPathObj::NbcInsPointOld(const Point& rPos, bool bNewObj) sal_uInt32 nSmallestPolyIndex(0); sal_uInt32 nSmallestEdgeIndex(0); double fSmallestCut; - basegfx::tools::getSmallestDistancePointToPolyPolygon(GetPathPoly(), aTestPoint, nSmallestPolyIndex, nSmallestEdgeIndex, fSmallestCut); + basegfx::utils::getSmallestDistancePointToPolyPolygon(GetPathPoly(), aTestPoint, nSmallestPolyIndex, nSmallestEdgeIndex, fSmallestCut); nNewHdl = NbcInsPoint(rPos, false); } @@ -2566,7 +2566,7 @@ sal_uInt32 SdrPathObj::NbcInsPoint(const Point& rPos, bool bNewObj) sal_uInt32 nSmallestPolyIndex(0); sal_uInt32 nSmallestEdgeIndex(0); double fSmallestCut; - basegfx::tools::getSmallestDistancePointToPolyPolygon(GetPathPoly(), aTestPoint, nSmallestPolyIndex, nSmallestEdgeIndex, fSmallestCut); + basegfx::utils::getSmallestDistancePointToPolyPolygon(GetPathPoly(), aTestPoint, nSmallestPolyIndex, nSmallestEdgeIndex, fSmallestCut); basegfx::B2DPolygon aCandidate(GetPathPoly().getB2DPolygon(nSmallestPolyIndex)); const bool bBefore(!aCandidate.isClosed() && 0 == nSmallestEdgeIndex && 0.0 == fSmallestCut); const bool bAfter(!aCandidate.isClosed() && aCandidate.count() == nSmallestEdgeIndex + 2 && 1.0 == fSmallestCut); @@ -2679,7 +2679,7 @@ SdrObject* SdrPathObj::RipPoint(sal_uInt32 nHdlNum, sal_uInt32& rNewPt0Index) { // when closed, RipPoint means to open the polygon at the selected point. To // be able to do that, it is necessary to make the selected point the first one - basegfx::B2DPolygon aNewPolygon(basegfx::tools::makeStartPoint(aCandidate, nPnt)); + basegfx::B2DPolygon aNewPolygon(basegfx::utils::makeStartPoint(aCandidate, nPnt)); SetPathPoly(basegfx::B2DPolyPolygon(aNewPolygon)); ToggleClosed(); @@ -2727,7 +2727,7 @@ SdrObject* SdrPathObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const if(!bBezier) { // reduce all bezier curves - pPath->SetPathPoly(basegfx::tools::adaptiveSubdivideByAngle(pPath->GetPathPoly())); + pPath->SetPathPoly(basegfx::utils::adaptiveSubdivideByAngle(pPath->GetPathPoly())); } } else @@ -2735,7 +2735,7 @@ SdrObject* SdrPathObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const if(bBezier) { // create bezier curves - pPath->SetPathPoly(basegfx::tools::expandToCurve(pPath->GetPathPoly())); + pPath->SetPathPoly(basegfx::utils::expandToCurve(pPath->GetPathPoly())); } } } @@ -2844,7 +2844,7 @@ bool SdrPathObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DP // #i72287# use polygon without control points for range calculation. Do not change rPolyPolygon // itself, else this method will no longer return the full polygon information (curve will // be lost) - const basegfx::B2DRange aPolyRangeNoCurve(basegfx::tools::getRange(rPolyPolygon)); + const basegfx::B2DRange aPolyRangeNoCurve(basegfx::utils::getRange(rPolyPolygon)); aScale = aPolyRangeNoCurve.getRange(); aTranslate = aPolyRangeNoCurve.getMinimum(); @@ -2876,7 +2876,7 @@ bool SdrPathObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DP // #i72287# use polygon without control points for range calculation. Do not change rPolyPolygon // itself, else this method will no longer return the full polygon information (curve will // be lost) - const basegfx::B2DRange aCorrectedRangeNoCurve(basegfx::tools::getRange(rPolyPolygon)); + const basegfx::B2DRange aCorrectedRangeNoCurve(basegfx::utils::getRange(rPolyPolygon)); aTranslate = aObjectMatrix * aCorrectedRangeNoCurve.getMinimum(); aScale = aCorrectedRangeNoCurve.getRange(); @@ -2890,7 +2890,7 @@ bool SdrPathObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DP // #i72287# use polygon without control points for range calculation. Do not change rPolyPolygon // itself, else this method will no longer return the full polygon information (curve will // be lost) - const basegfx::B2DRange aPolyRangeNoCurve(basegfx::tools::getRange(rPolyPolygon)); + const basegfx::B2DRange aPolyRangeNoCurve(basegfx::utils::getRange(rPolyPolygon)); aScale = aPolyRangeNoCurve.getRange(); aTranslate = aPolyRangeNoCurve.getMinimum(); @@ -2944,7 +2944,7 @@ bool SdrPathObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DP } // build return value matrix - rMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + rMatrix = basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aScale, basegfx::fTools::equalZero(fShearX) ? 0.0 : tan(fShearX), basegfx::fTools::equalZero(fRotate) ? 0.0 : -fRotate, @@ -3059,7 +3059,7 @@ void SdrPathObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b if(!aTranslate.equalZero()) { // #i39529# absolute positioning, so get current position (without control points (!)) - const basegfx::B2DRange aCurrentRange(basegfx::tools::getRange(aNewPolyPolygon)); + const basegfx::B2DRange aCurrentRange(basegfx::utils::getRange(aNewPolyPolygon)); aTransform.translate(aTranslate.getX() - aCurrentRange.getMinX(), aTranslate.getY() - aCurrentRange.getMinY()); } diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 50a95fe97875..5d05b813d21c 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -577,7 +577,7 @@ void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle& { basegfx::B2DPolyPolygon aXorPolyPolygon(TakeXorPoly()); basegfx::B2DPolyPolygon* pContourPolyPolygon = nullptr; - basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aMatrix(basegfx::utils::createTranslateB2DHomMatrix( -rAnchorRect.Left(), -rAnchorRect.Top())); if(aGeo.nRotationAngle) @@ -1642,7 +1642,7 @@ bool SdrTextObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DP } // build matrix - rMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + rMatrix = basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aScale, basegfx::fTools::equalZero(fShearX) ? 0.0 : tan(fShearX), basegfx::fTools::equalZero(fRotate) ? 0.0 : -fRotate, diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 1ec3d408fb7e..002ae0084394 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -676,7 +676,7 @@ void SdrTextObj::impDecomposeContourTextPrimitive( // prepare contour polygon, force to non-mirrored for laying out basegfx::B2DPolyPolygon aPolyPolygon(rSdrContourTextPrimitive.getUnitPolyPolygon()); - aPolyPolygon.transform(basegfx::tools::createScaleB2DHomMatrix(fabs(aScale.getX()), fabs(aScale.getY()))); + aPolyPolygon.transform(basegfx::utils::createScaleB2DHomMatrix(fabs(aScale.getX()), fabs(aScale.getY()))); // prepare outliner SolarMutexGuard aSolarGuard; @@ -700,7 +700,7 @@ void SdrTextObj::impDecomposeContourTextPrimitive( // in-between the translations of the single primitives will take place. Afterwards, // the object's transformations need to be applied - const basegfx::B2DHomMatrix aNewTransformB(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aNewTransformB(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0, fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); @@ -1080,7 +1080,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( const double fStartInX(bVerticalWriting && bTopToBottom ? aAdjustTranslate.getX() + aOutlinerScale.getX() : aAdjustTranslate.getX()); const double fStartInY(bVerticalWriting && !bTopToBottom ? aAdjustTranslate.getY() + aOutlinerScale.getY() : aAdjustTranslate.getY()); const basegfx::B2DTuple aAdjOffset(fStartInX, fStartInY); - basegfx::B2DHomMatrix aNewTransformA(basegfx::tools::createTranslateB2DHomMatrix(aAdjOffset.getX(), aAdjOffset.getY())); + basegfx::B2DHomMatrix aNewTransformA(basegfx::utils::createTranslateB2DHomMatrix(aAdjOffset.getX(), aAdjOffset.getY())); // mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y, // move the null point which was top left to bottom right. @@ -1089,7 +1089,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( // in-between the translations of the single primitives will take place. Afterwards, // the object's transformations need to be applied - const basegfx::B2DHomMatrix aNewTransformB(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aNewTransformB(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0, fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); @@ -1181,7 +1181,7 @@ void SdrTextObj::impDecomposeStretchTextPrimitive( // in-between the translations of the single primitives will take place. Afterwards, // the object's transformations need to be applied - const basegfx::B2DHomMatrix aNewTransformB(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aNewTransformB(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0, fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index 6ddcc64c79e5..fef622175078 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -260,7 +260,7 @@ namespace { // prepare polygon geometry, take into account as many parameters as possible basegfx::B2DPolygon aPolygonCandidate(rPolygonCandidate); - const double fPolyLength(basegfx::tools::getLength(aPolygonCandidate)); + const double fPolyLength(basegfx::utils::getLength(aPolygonCandidate)); double fPolyEnd(fPolyLength); double fPolyStart(0.0); double fAutosizeScaleFactor(1.0); @@ -365,7 +365,7 @@ namespace // create transformation basegfx::B2DHomMatrix aNewTransformA, aNewTransformB, aNewShadowTransform; - basegfx::B2DPoint aStartPos(basegfx::tools::getPositionAbsolute(aPolygonCandidate, fPolyStart, fPolyLength)); + basegfx::B2DPoint aStartPos(basegfx::utils::getPositionAbsolute(aPolygonCandidate, fPolyStart, fPolyLength)); basegfx::B2DPoint aEndPos(aStartPos); // add font scaling @@ -404,7 +404,7 @@ namespace { case XFormTextStyle::Rotate : { - aEndPos = basegfx::tools::getPositionAbsolute(aPolygonCandidate, fPolyStart + fPortionLength, fPolyLength); + aEndPos = basegfx::utils::getPositionAbsolute(aPolygonCandidate, fPolyStart + fPortionLength, fPolyLength); const basegfx::B2DVector aDirection(aEndPos - aStartPos); aNewTransformB.rotate(atan2(aDirection.getY(), aDirection.getX())); aNewTransformB.translate(aStartPos.getX(), aStartPos.getY()); @@ -419,7 +419,7 @@ namespace } case XFormTextStyle::SlantX : { - aEndPos = basegfx::tools::getPositionAbsolute(aPolygonCandidate, fPolyStart + fPortionLength, fPolyLength); + aEndPos = basegfx::utils::getPositionAbsolute(aPolygonCandidate, fPolyStart + fPortionLength, fPolyLength); const basegfx::B2DVector aDirection(aEndPos - aStartPos); const double fShearValue(atan2(aDirection.getY(), aDirection.getX())); const double fSin(sin(fShearValue)); @@ -437,7 +437,7 @@ namespace } case XFormTextStyle::SlantY : { - aEndPos = basegfx::tools::getPositionAbsolute(aPolygonCandidate, fPolyStart + fPortionLength, fPolyLength); + aEndPos = basegfx::utils::getPositionAbsolute(aPolygonCandidate, fPolyStart + fPortionLength, fPolyLength); const basegfx::B2DVector aDirection(aEndPos - aStartPos); const double fShearValue(atan2(aDirection.getY(), aDirection.getX())); const double fCos(cos(fShearValue)); @@ -462,7 +462,7 @@ namespace { if(aEndPos.equal(aStartPos)) { - aEndPos = basegfx::tools::getPositionAbsolute(aPolygonCandidate, fPolyStart + fPortionLength, fPolyLength); + aEndPos = basegfx::utils::getPositionAbsolute(aPolygonCandidate, fPolyStart + fPortionLength, fPolyLength); } // use back vector (aStartPos - aEndPos) here to get mirrored perpendicular as in old stuff diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx index 7592455c493e..9d04162eb189 100644 --- a/svx/source/svdraw/svdotxdr.cxx +++ b/svx/source/svdraw/svdotxdr.cxx @@ -236,7 +236,7 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeCreatePoly(const SdrDragStat& rDrag) con basegfx::B2DPolyPolygon aRetval; const basegfx::B2DRange aRange(aRect1.Left(), aRect1.Top(), aRect1.Right(), aRect1.Bottom()); - aRetval.append(basegfx::tools::createPolygonFromRect(aRange)); + aRetval.append(basegfx::utils::createPolygonFromRect(aRange)); return aRetval; } diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index c76f138caba3..04f28084af78 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -329,14 +329,14 @@ SdrObject* SdrTextObj::ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const { if(aPolyPolygon.areControlPointsUsed()) { - aPolyPolygon = basegfx::tools::adaptiveSubdivideByAngle(aPolyPolygon); + aPolyPolygon = basegfx::utils::adaptiveSubdivideByAngle(aPolyPolygon); } } else { if(!aPolyPolygon.areControlPointsUsed()) { - aPolyPolygon = basegfx::tools::expandToCurve(aPolyPolygon); + aPolyPolygon = basegfx::utils::expandToCurve(aPolyPolygon); } } @@ -429,7 +429,7 @@ SdrObject* SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPol // #i37011# if(!bBezier) { - aB2DPolyPolygon = basegfx::tools::adaptiveSubdivideByAngle(aB2DPolyPolygon); + aB2DPolyPolygon = basegfx::utils::adaptiveSubdivideByAngle(aB2DPolyPolygon); ePathKind = bClosed ? OBJ_POLY : OBJ_PLIN; } @@ -438,7 +438,7 @@ SdrObject* SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPol if(bBezier) { // create bezier curves - pPathObj->SetPathPoly(basegfx::tools::expandToCurve(pPathObj->GetPathPoly())); + pPathObj->SetPathPoly(basegfx::utils::expandToCurve(pPathObj->GetPathPoly())); } pPathObj->ImpSetAnchorPos(aAnchor); diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx index cbd89c4b69d5..d4d995064424 100644 --- a/svx/source/svdraw/svdovirt.cxx +++ b/svx/source/svdraw/svdovirt.cxx @@ -172,7 +172,7 @@ basegfx::B2DPolyPolygon SdrVirtObj::TakeXorPoly() const if(aAnchor.X() || aAnchor.Y()) { - aPolyPolygon.transform(basegfx::tools::createTranslateB2DHomMatrix(aAnchor.X(), aAnchor.Y())); + aPolyPolygon.transform(basegfx::utils::createTranslateB2DHomMatrix(aAnchor.X(), aAnchor.Y())); } return aPolyPolygon; diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index 4fe03b13a319..55d03f0b8bbb 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -125,7 +125,7 @@ BitmapEx convertMetafileToBitmapEx( { const drawinglayer::primitive2d::Primitive2DReference aMtf( new drawinglayer::primitive2d::MetafilePrimitive2D( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( rTargetRange.getRange(), rTargetRange.getMinimum()), rMtf)); diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx index 7ae722ba82d7..71dbd1c800b5 100644 --- a/svx/source/svdraw/svdpoev.cxx +++ b/svx/source/svdraw/svdpoev.cxx @@ -116,11 +116,11 @@ void SdrPolyEditView::CheckPolyPossibilitiesHelper( SdrMark* pM, bool& b1stSmoot if (b1stSmooth) { b1stSmooth = false; - eSmooth = basegfx::tools::getContinuityInPoint(aLocalPolygon, nPntNum); + eSmooth = basegfx::utils::getContinuityInPoint(aLocalPolygon, nPntNum); } else { - bSmoothFuz = (eSmooth != basegfx::tools::getContinuityInPoint(aLocalPolygon, nPntNum)); + bSmoothFuz = (eSmooth != basegfx::utils::getContinuityInPoint(aLocalPolygon, nPntNum)); } } diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 33bd0dc7e887..dd80fa44dbac 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -2296,7 +2296,7 @@ basegfx::B2DPolyPolygon SdrTableObj::TakeCreatePoly(const SdrDragStat& rDrag) co basegfx::B2DPolyPolygon aRetval; const basegfx::B2DRange aRange(aRect1.Left(), aRect1.Top(), aRect1.Right(), aRect1.Bottom()); - aRetval.append(basegfx::tools::createPolygonFromRect(aRange)); + aRetval.append(basegfx::utils::createPolygonFromRect(aRange)); return aRetval; } diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index ec686e2628c3..13d4f7019667 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -85,7 +85,7 @@ namespace drawinglayer void SdrCellPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*aViewInformation*/) const { // prepare unit polygon - const basegfx::B2DPolyPolygon aUnitPolyPolygon(basegfx::tools::createUnitPolygon()); + const basegfx::B2DPolyPolygon aUnitPolyPolygon(basegfx::utils::createUnitPolygon()); // add fill if(!getSdrFTAttribute().getFill().isDefault()) @@ -419,7 +419,7 @@ namespace sdr const GeoStat& rGeoStat(rTableObj.GetGeoStat()); const double fShearX(rGeoStat.nShearAngle ? tan((36000 - rGeoStat.nShearAngle) * F_PI18000) : 0.0); const double fRotate(rGeoStat.nRotationAngle ? (36000 - rGeoStat.nRotationAngle) * F_PI18000 : 0.0); - const basegfx::B2DHomMatrix aObjectMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aObjectMatrix(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix( aObjectRange.getWidth(), aObjectRange.getHeight(), fShearX, fRotate, aObjectRange.getMinX(), aObjectRange.getMinY())); diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx index 92bf5d6e396b..983f3ab9a671 100644 --- a/svx/source/unodraw/XPropertyTable.cxx +++ b/svx/source/unodraw/XPropertyTable.cxx @@ -37,7 +37,7 @@ #include "svx/unoapi.hxx" #include <editeng/unoprnms.hxx> #include <basegfx/polygon/b2dpolygon.hxx> -#include <basegfx/tools/unotools.hxx> +#include <basegfx/utils/unotools.hxx> using namespace com::sun::star; using namespace ::cppu; diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 5ed67a209371..3a13bdf8dedd 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -58,7 +58,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> -#include <basegfx/tools/unotools.hxx> +#include <basegfx/utils/unotools.hxx> #include <comphelper/servicehelper.hxx> #include <com/sun/star/awt/XBitmap.hpp> #include <svx/svdograf.hxx> @@ -960,7 +960,7 @@ basegfx::B2DPolyPolygon SAL_CALL ImplSvxPointSequenceSequenceToB2DPolyPolygon( c } // check for closed state flag - basegfx::tools::checkClosed(aNewPolygon); + basegfx::utils::checkClosed(aNewPolygon); // add new subpolygon aRetval.append(aNewPolygon); @@ -1018,7 +1018,7 @@ bool SvxShapePolyPolygon::setPropertyValueImpl( const OUString& rName, const Sfx } // check for closed state flag - basegfx::tools::checkClosed(aNewPolygon); + basegfx::utils::checkClosed(aNewPolygon); // set polygon SetPolygon(basegfx::B2DPolyPolygon(aNewPolygon)); diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index db8a29d4a08c..a9604f6b766e 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -722,7 +722,7 @@ bool PolyPolygonShape3D_to_B3dPolyPolygon( // see callers if(bCorrectPolygon) { - basegfx::tools::checkClosed(aNewPolygon); + basegfx::utils::checkClosed(aNewPolygon); } rResultPolygon.append(aNewPolygon); @@ -797,7 +797,7 @@ bool Svx3DLatheObject::setPropertyValueImpl( const OUString& rName, const SfxIte // set polygon const basegfx::B3DHomMatrix aIdentity; - const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon(aNewB3DPolyPolygon, aIdentity)); + const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon(aNewB3DPolyPolygon, aIdentity)); static_cast<E3dLatheObj*>(mpObj.get())->SetPolyPoly2D(aB2DPolyPolygon); const sal_uInt32 nPostVerticalSegs(static_cast<E3dLatheObj*>(mpObj.get())->GetVerticalSegments()); @@ -851,7 +851,7 @@ bool Svx3DLatheObject::getPropertyValueImpl( const OUString& rName, const SfxIte case OWN_ATTR_3D_VALUE_POLYPOLYGON3D: { const basegfx::B2DPolyPolygon& rPolyPoly = static_cast<E3dLatheObj*>(mpObj.get())->GetPolyPoly2D(); - const basegfx::B3DPolyPolygon aB3DPolyPolygon(basegfx::tools::createB3DPolyPolygonFromB2DPolyPolygon(rPolyPoly)); + const basegfx::B3DPolyPolygon aB3DPolyPolygon(basegfx::utils::createB3DPolyPolygonFromB2DPolyPolygon(rPolyPoly)); B3dPolyPolygon_to_PolyPolygonShape3D(aB3DPolyPolygon, rValue); break; @@ -903,7 +903,7 @@ bool Svx3DExtrudeObject::setPropertyValueImpl( const OUString& rName, const SfxI { // set polygon const basegfx::B3DHomMatrix aIdentity; - const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon(aNewB3DPolyPolygon, aIdentity)); + const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon(aNewB3DPolyPolygon, aIdentity)); static_cast<E3dExtrudeObj*>(mpObj.get())->SetExtrudePolygon(aB2DPolyPolygon); return true; } @@ -952,7 +952,7 @@ bool Svx3DExtrudeObject::getPropertyValueImpl( const OUString& rName, const SfxI { // pack polygon definition const basegfx::B2DPolyPolygon& rPolyPoly = static_cast<E3dExtrudeObj*>(mpObj.get())->GetExtrudePolygon(); - const basegfx::B3DPolyPolygon aB3DPolyPolygon(basegfx::tools::createB3DPolyPolygonFromB2DPolyPolygon(rPolyPoly)); + const basegfx::B3DPolyPolygon aB3DPolyPolygon(basegfx::utils::createB3DPolyPolygonFromB2DPolyPolygon(rPolyPoly)); B3dPolyPolygon_to_PolyPolygonShape3D(aB3DPolyPolygon, rValue); break; @@ -1032,7 +1032,7 @@ bool Svx3DPolygonObject::setPropertyValueImpl( const OUString& rName, const SfxI { // set polygon const basegfx::B3DHomMatrix aIdentity; - const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon(aNewB3DPolyPolygon, aIdentity)); + const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon(aNewB3DPolyPolygon, aIdentity)); static_cast<E3dPolygonObj*>(mpObj.get())->SetPolyTexture2D(aB2DPolyPolygon); return true; } @@ -1081,7 +1081,7 @@ bool Svx3DPolygonObject::getPropertyValueImpl( const OUString& rName, const SfxI { // pack texture definition const basegfx::B2DPolyPolygon& rPolyPoly = static_cast<E3dPolygonObj*>(mpObj.get())->GetPolyTexture2D(); - const basegfx::B3DPolyPolygon aB3DPolyPolygon(basegfx::tools::createB3DPolyPolygonFromB2DPolyPolygon(rPolyPoly)); + const basegfx::B3DPolyPolygon aB3DPolyPolygon(basegfx::utils::createB3DPolyPolygonFromB2DPolyPolygon(rPolyPoly)); B3dPolyPolygon_to_PolyPolygonShape3D(aB3DPolyPolygon,rValue); break; diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 3c5b88860df4..031707e1d8d4 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -83,7 +83,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/unotools.hxx> +#include <basegfx/utils/unotools.hxx> #include "gluepts.hxx" #include "shapeimpl.hxx" #include <sal/log.hxx> @@ -2221,13 +2221,13 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl if( auto s = o3tl::tryAccess<drawing::PointSequenceSequence>(rValue) ) { // get polygpon data from PointSequenceSequence - aNewPolyPolygon = basegfx::tools::UnoPointSequenceSequenceToB2DPolyPolygon( + aNewPolyPolygon = basegfx::utils::UnoPointSequenceSequenceToB2DPolyPolygon( *s); } else if( auto cs = o3tl::tryAccess<drawing::PolyPolygonBezierCoords>(rValue) ) { // get polygpon data from PolyPolygonBezierCoords - aNewPolyPolygon = basegfx::tools::UnoPolyPolygonBezierCoordsToB2DPolyPolygon( + aNewPolyPolygon = basegfx::utils::UnoPolyPolygonBezierCoordsToB2DPolyPolygon( *cs); } @@ -2238,7 +2238,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl if( mpModel->IsWriter() ) { Point aPoint( mpObj->GetAnchorPos() ); - aNewPolyPolygon.transform(basegfx::tools::createTranslateB2DHomMatrix(aPoint.X(), aPoint.Y())); + aNewPolyPolygon.transform(basegfx::utils::createTranslateB2DHomMatrix(aPoint.X(), aPoint.Y())); } pEdgeObj->SetEdgeTrackPath( aNewPolyPolygon ); return true; @@ -2682,7 +2682,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl if( mpModel->IsWriter() ) { Point aPoint( mpObj->GetAnchorPos() ); - aPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(-aPoint.X(), -aPoint.Y())); + aPolyPoly.transform(basegfx::utils::createTranslateB2DHomMatrix(-aPoint.X(), -aPoint.Y())); } // Reintroduction of fix for issue #i59051# (#i108851#) ForceMetricTo100th_mm( aPolyPoly ); diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx index d5c4100e1605..e319397ed2f0 100644 --- a/svx/source/xoutdev/_xpoly.cxx +++ b/svx/source/xoutdev/_xpoly.cxx @@ -419,7 +419,7 @@ tools::Rectangle XPolygon::GetBoundRect() const // get a relatively correct BoundRect. Numerically, this is not // correct and never was. - const basegfx::B2DRange aPolygonRange(basegfx::tools::getRange(getB2DPolygon())); + const basegfx::B2DRange aPolygonRange(basegfx::utils::getRange(getB2DPolygon())); aRetval = tools::Rectangle( FRound(aPolygonRange.getMinX()), FRound(aPolygonRange.getMinY()), FRound(aPolygonRange.getMaxX()), FRound(aPolygonRange.getMaxY())); diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index cea1c602de41..b360aded371b 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -55,7 +55,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dvector.hxx> -#include <basegfx/tools/unotools.hxx> +#include <basegfx/utils/unotools.hxx> #include <unotools/intlwrapper.hxx> #include <vcl/gradient.hxx> diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx index 33d02eb45aa6..d690976c69d5 100644 --- a/svx/source/xoutdev/xtabgrdt.cxx +++ b/svx/source/xoutdev/xtabgrdt.cxx @@ -94,7 +94,7 @@ Bitmap XGradientList::CreateBitmap( long nIndex, const Size& rSize ) const const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); // prepare polygon geometry for rectangle const basegfx::B2DPolygon aRectangle( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRange(0.0, 0.0, rSize.Width(), rSize.Height()))); const XGradient& rGradient = GetGradient(nIndex)->GetGradient(); diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx index c336e46e33d9..d7799ac88fdd 100644 --- a/svx/source/xoutdev/xtabhtch.cxx +++ b/svx/source/xoutdev/xtabhtch.cxx @@ -87,7 +87,7 @@ Bitmap XHatchList::CreateBitmap( long nIndex, const Size& rSize) const // prepare polygon geometry for rectangle const basegfx::B2DPolygon aRectangle( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRange(0.0, 0.0, rSize.Width(), rSize.Height()))); const XHatch& rHatch = GetHatch(nIndex)->GetHatch(); diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx index 04ad8fff02eb..d90e37c492ac 100644 --- a/svx/source/xoutdev/xtablend.cxx +++ b/svx/source/xoutdev/xtablend.cxx @@ -73,7 +73,7 @@ bool XLineEndList::Create() aSquare.setClosed(true); Insert( o3tl::make_unique<XLineEndEntry>( basegfx::B2DPolyPolygon(aSquare), SvxResId( RID_SVXSTR_SQUARE ) ) ); - basegfx::B2DPolygon aCircle(basegfx::tools::createPolygonFromCircle(basegfx::B2DPoint(0.0, 0.0), 100.0)); + basegfx::B2DPolygon aCircle(basegfx::utils::createPolygonFromCircle(basegfx::B2DPoint(0.0, 0.0), 100.0)); Insert( o3tl::make_unique<XLineEndEntry>( basegfx::B2DPolyPolygon(aCircle), SvxResId( RID_SVXSTR_CIRCLE ) ) ); return true; diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 2f5f50dc19f6..050f8d27dfa8 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -877,7 +877,7 @@ DECLARE_OOXMLIMPORT_TEST(testFdo76803, "fdo76803.docx") uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY); drawing::PointSequenceSequence rContour = getProperty<drawing::PointSequenceSequence>(xPropertySet, "ContourPolyPolygon"); - basegfx::B2DPolyPolygon aPolyPolygon(basegfx::tools::UnoPointSequenceSequenceToB2DPolyPolygon(rContour)); + basegfx::B2DPolyPolygon aPolyPolygon(basegfx::utils::UnoPointSequenceSequenceToB2DPolyPolygon(rContour)); // We've got exactly one polygon inside CPPUNIT_ASSERT_EQUAL(sal_uInt32(1), aPolyPolygon.count()); diff --git a/sw/source/core/crsr/overlayrangesoutline.cxx b/sw/source/core/crsr/overlayrangesoutline.cxx index 011fc6c393ff..1e025e7e8a5a 100644 --- a/sw/source/core/crsr/overlayrangesoutline.cxx +++ b/sw/source/core/crsr/overlayrangesoutline.cxx @@ -34,7 +34,7 @@ namespace for(sal_uInt32 a(0); a < nCount; a++) { - const basegfx::B2DPolygon aDiscretePolygon(basegfx::tools::createPolygonFromRect(rRanges[a])); + const basegfx::B2DPolygon aDiscretePolygon(basegfx::utils::createPolygonFromRect(rRanges[a])); if(0 == a) { @@ -42,7 +42,7 @@ namespace } else { - aRetval = basegfx::tools::solvePolygonOperationOr(aRetval, basegfx::B2DPolyPolygon(aDiscretePolygon)); + aRetval = basegfx::utils::solvePolygonOperationOr(aRetval, basegfx::B2DPolyPolygon(aDiscretePolygon)); } } diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index c2c4cfae843a..c4791e086d4b 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -186,7 +186,7 @@ static void lcl_ClearArea( const SwFrame &rFrame, if ( rFrame.GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigRect, false ) ) { SwRegionRects const region(rPtArea); - basegfx::tools::B2DClipState aClipState; + basegfx::utils::B2DClipState aClipState; const bool bDone(::DrawFillAttributes(aFillAttributes, aOrigRect, region, aClipState, rOut)); if(!bDone) @@ -723,7 +723,7 @@ bool paintUsingPrimitivesHelper( // the mapping from 1/100th mm content to twips if needed when the target // range is defined in twips const basegfx::B2DHomMatrix aMappingTransform( - basegfx::tools::createSourceRangeTargetRangeTransform( + basegfx::utils::createSourceRangeTargetRangeTransform( rSourceRange, rTargetRange)); @@ -769,7 +769,7 @@ void paintGraphicUsingPrimitivesHelper(vcl::RenderContext & rOutputDevice, rAlignedGrfArea.Left(), rAlignedGrfArea.Top(), rAlignedGrfArea.Right(), rAlignedGrfArea.Bottom()); const basegfx::B2DHomMatrix aTargetTransform( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( aTargetRange.getRange(), aTargetRange.getMinimum())); diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index b5825827cd26..ce830a7ab527 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -2302,7 +2302,7 @@ void SwDrawVirtObj::RecalcBoundRect() basegfx::B2DPolyPolygon SwDrawVirtObj::TakeXorPoly() const { basegfx::B2DPolyPolygon aRetval(rRefObj.TakeXorPoly()); - aRetval.transform(basegfx::tools::createTranslateB2DHomMatrix(GetOffset().X(), GetOffset().Y())); + aRetval.transform(basegfx::utils::createTranslateB2DHomMatrix(GetOffset().X(), GetOffset().Y())); return aRetval; } @@ -2310,7 +2310,7 @@ basegfx::B2DPolyPolygon SwDrawVirtObj::TakeXorPoly() const basegfx::B2DPolyPolygon SwDrawVirtObj::TakeContour() const { basegfx::B2DPolyPolygon aRetval(rRefObj.TakeContour()); - aRetval.transform(basegfx::tools::createTranslateB2DHomMatrix(GetOffset().X(), GetOffset().Y())); + aRetval.transform(basegfx::utils::createTranslateB2DHomMatrix(GetOffset().X(), GetOffset().Y())); return aRetval; } diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index c94f293ed876..0696af0e59d1 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -560,7 +560,7 @@ void SwVirtFlyDrawObj::NbcSetLogicRect(const tools::Rectangle& ) const ::basegfx::B2DRange aSourceRange(aSourceRectangle.Left(), aSourceRectangle.Top(), aSourceRectangle.Right(), aSourceRectangle.Bottom()); ::basegfx::B2DPolyPolygon aRetval; - aRetval.append(::basegfx::tools::createPolygonFromRect(aSourceRange)); + aRetval.append(::basegfx::utils::createPolygonFromRect(aSourceRange)); return aRetval; } diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index a7838151adff..a44468719a36 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -921,7 +921,7 @@ void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject const * pObj, sal_uInt1 if( !aCircle.count() ) { ::basegfx::B2DPolygon aNewCircle; - aNewCircle = ::basegfx::tools::createPolygonFromEllipse(::basegfx::B2DPoint(0.0, 0.0), 250.0, 250.0); + aNewCircle = ::basegfx::utils::createPolygonFromEllipse(::basegfx::B2DPoint(0.0, 0.0), 250.0, 250.0); aNewCircle.setClosed(true); aCircle.append(aNewCircle); } diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index 31f96590cd8b..305c8ffb5495 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -27,7 +27,7 @@ #include <editeng/lrspitem.hxx> #include <swfont.hxx> #include <flyfrm.hxx> -#include <basegfx/tools/b2dclipstate.hxx> +#include <basegfx/utils/b2dclipstate.hxx> class SwPageFrame; class SwFlyFrame; @@ -69,7 +69,7 @@ bool DrawFillAttributes( const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes, const SwRect& rOriginalLayoutRect, const SwRegionRects& rPaintRegion, - const basegfx::tools::B2DClipState& rClipState, + const basegfx::utils::B2DClipState& rClipState, OutputDevice& rOut); void paintGraphicUsingPrimitivesHelper( diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 10647bb3bc49..4ea7dc6c4644 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1410,7 +1410,7 @@ static basegfx::B2DRange lcl_ShrinkFly(const SwRect& rRect) } static void lcl_SubtractFlys( const SwFrame *pFrame, const SwPageFrame *pPage, - const SwRect &rRect, SwRegionRects &rRegion, basegfx::tools::B2DClipState& rClipState, SwPaintProperties const & rProperties) + const SwRect &rRect, SwRegionRects &rRegion, basegfx::utils::B2DClipState& rClipState, SwPaintProperties const & rProperties) { const SwSortedObjs& rObjs = *pPage->GetSortedObjs(); const SwFlyFrame* pSelfFly = pFrame->IsInFly() ? pFrame->FindFlyFrame() : gProp.pSRetoucheFly2; @@ -1734,7 +1734,7 @@ bool DrawFillAttributes( const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes, const SwRect& rOriginalLayoutRect, const SwRegionRects& rPaintRegion, - const basegfx::tools::B2DClipState& rClipState, + const basegfx::utils::B2DClipState& rClipState, vcl::RenderContext& rOut) { if(rFillAttributes.get() && rFillAttributes->isUsed()) @@ -3500,14 +3500,14 @@ static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateDashedIndicator else { // Get a color for the contrast - basegfx::BColor aHslLine = basegfx::tools::rgb2hsl( aColor ); + basegfx::BColor aHslLine = basegfx::utils::rgb2hsl( aColor ); double nLuminance = aHslLine.getZ() * 2.5; if ( nLuminance == 0 ) nLuminance = 0.5; else if ( nLuminance >= 1.0 ) nLuminance = aHslLine.getZ() * 0.4; aHslLine.setZ( nLuminance ); - const basegfx::BColor aOtherColor = basegfx::tools::hsl2rgb( aHslLine ); + const basegfx::BColor aOtherColor = basegfx::utils::hsl2rgb( aHslLine ); // Compute the plain line drawinglayer::primitive2d::PolygonHairlinePrimitive2D * pPlainLine = @@ -3631,12 +3631,12 @@ void SwColumnFrame::PaintBreak( ) const pOut->GetTextBoundRect( aTextRect, aBreakText ); long nTextOff = ( nWidth - aTextRect.GetWidth() ) / 2; - basegfx::B2DHomMatrix aTextMatrix( basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aTextMatrix( basegfx::utils::createScaleTranslateB2DHomMatrix( aFontSize.getX(), aFontSize.getY(), aRect.Left() + nTextOff, aRect.Top() ) ); if ( IsVertical() ) { - aTextMatrix = basegfx::B2DHomMatrix( basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix ( + aTextMatrix = basegfx::B2DHomMatrix( basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix ( aFontSize.getX(), aFontSize.getY(), 0.0, M_PI_2, aRect.Right(), aRect.Top() + nTextOff ) ); } @@ -4471,7 +4471,7 @@ void SwFrame::PaintBorderLine( const SwRect& rRect, pPage->GetFormat()->GetDoc()->getIDocumentSettingAccess().get(DocumentSettingId::SUBTRACT_FLYS)) { SwRegionRects aRegion( aOut, 4 ); - basegfx::tools::B2DClipState aClipState; + basegfx::utils::B2DClipState aClipState; ::lcl_SubtractFlys( this, pPage, aOut, aRegion, aClipState, gProp ); for ( size_t i = 0; i < aRegion.size(); ++i ) gProp.pSLines->AddLineRect( aRegion[i], pColor, nStyle, pTab, nSubCol, gProp ); @@ -6405,7 +6405,7 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage, SwRegionRects aRegion( aRect ); basegfx::B2DPolygon aB2DPolygon{tools::Polygon(aRect.SVRect()).getB2DPolygon()}; - basegfx::tools::B2DClipState aClipState{basegfx::B2DPolyPolygon(aB2DPolygon)}; + basegfx::utils::B2DClipState aClipState{basegfx::B2DPolyPolygon(aB2DPolygon)}; if (pPage->GetSortedObjs() && pSh->GetDoc()->getIDocumentSettingAccess().get(DocumentSettingId::SUBTRACT_FLYS)) { diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index f76260626e28..a112acc2e4b5 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -2670,7 +2670,7 @@ css::drawing::PolyPolygonBezierCoords SwXShape::ConvertPolyPolygonBezierToLayout // apply translation difference to PolyPolygonBezier. if ( aTranslateDiff.X != 0 || aTranslateDiff.Y != 0 ) { - const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aMatrix(basegfx::utils::createTranslateB2DHomMatrix( aTranslateDiff.X, aTranslateDiff.Y)); const sal_Int32 nOuterSequenceCount(aConvertedPath.Coordinates.getLength()); diff --git a/sw/source/uibase/docvw/DashedLine.cxx b/sw/source/uibase/docvw/DashedLine.cxx index b5a641d84672..3ebf738c7f00 100644 --- a/sw/source/uibase/docvw/DashedLine.cxx +++ b/sw/source/uibase/docvw/DashedLine.cxx @@ -60,13 +60,13 @@ void SwDashedLine::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan else { // Get a color for the contrast - basegfx::BColor aHslLine = basegfx::tools::rgb2hsl(aColor); + basegfx::BColor aHslLine = basegfx::utils::rgb2hsl(aColor); double nLuminance = aHslLine.getZ(); nLuminance += (1.0 - nLuminance) * 0.75; if (aHslLine.getZ() > 0.7) nLuminance = aHslLine.getZ() * 0.7; aHslLine.setZ(nLuminance); - const basegfx::BColor aOtherColor = basegfx::tools::hsl2rgb(aHslLine); + const basegfx::BColor aOtherColor = basegfx::utils::hsl2rgb(aHslLine); // Compute the plain line drawinglayer::primitive2d::PolygonHairlinePrimitive2D * pPlainLine = diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 38c0df3a7077..71fd89b66af8 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -54,29 +54,29 @@ #define BUTTON_WIDTH 18 using namespace basegfx; -using namespace basegfx::tools; +using namespace basegfx::utils; using namespace drawinglayer::attribute; namespace { basegfx::BColor lcl_GetFillColor(const basegfx::BColor& rLineColor) { - basegfx::BColor aHslLine = basegfx::tools::rgb2hsl(rLineColor); + basegfx::BColor aHslLine = basegfx::utils::rgb2hsl(rLineColor); double nLuminance = aHslLine.getZ() * 2.5; if ( nLuminance == 0 ) nLuminance = 0.5; else if ( nLuminance >= 1.0 ) nLuminance = aHslLine.getZ() * 0.4; aHslLine.setZ( nLuminance ); - return basegfx::tools::hsl2rgb( aHslLine ); + return basegfx::utils::hsl2rgb( aHslLine ); } basegfx::BColor lcl_GetLighterGradientColor(const basegfx::BColor& rDarkColor) { - basegfx::BColor aHslDark = basegfx::tools::rgb2hsl(rDarkColor); + basegfx::BColor aHslDark = basegfx::utils::rgb2hsl(rDarkColor); double nLuminance = aHslDark.getZ() * 255 + 20; aHslDark.setZ( nLuminance / 255.0 ); - return basegfx::tools::hsl2rgb( aHslDark ); + return basegfx::utils::hsl2rgb( aHslDark ); } B2DPolygon lcl_GetPolygon( const ::tools::Rectangle& rRect, bool bHeader ) diff --git a/sw/source/uibase/docvw/OverlayRanges.cxx b/sw/source/uibase/docvw/OverlayRanges.cxx index 634820eca28f..1218f452d03e 100644 --- a/sw/source/uibase/docvw/OverlayRanges.cxx +++ b/sw/source/uibase/docvw/OverlayRanges.cxx @@ -39,7 +39,7 @@ namespace for(sal_uInt32 a(0); a < nCount; a++) { - const basegfx::B2DPolygon aDiscretePolygon(basegfx::tools::createPolygonFromRect(rRanges[a])); + const basegfx::B2DPolygon aDiscretePolygon(basegfx::utils::createPolygonFromRect(rRanges[a])); if(0 == a) { @@ -47,7 +47,7 @@ namespace } else { - aRetval = basegfx::tools::solvePolygonOperationOr(aRetval, basegfx::B2DPolyPolygon(aDiscretePolygon)); + aRetval = basegfx::utils::solvePolygonOperationOr(aRetval, basegfx::B2DPolyPolygon(aDiscretePolygon)); } } @@ -67,7 +67,7 @@ namespace sw for ( sal_uInt32 a = 0; a < nCount; ++a ) { const basegfx::BColor aRGBColor(getBaseColor().getBColor()); - const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(maRanges[a])); + const basegfx::B2DPolygon aPolygon(basegfx::utils::createPolygonFromRect(maRanges[a])); aRetval[a] = drawinglayer::primitive2d::Primitive2DReference( new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( basegfx::B2DPolyPolygon(aPolygon), diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index 02b5cfcf349f..52971c2af085 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -50,7 +50,7 @@ #define ARROW_WIDTH 9 using namespace basegfx; -using namespace basegfx::tools; +using namespace basegfx::utils; namespace { diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index 4ff6c6edb754..3e234efec6bb 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -46,7 +46,7 @@ #include <IDocumentSettingAccess.hxx> -#include <basegfx/tools/zoomtools.hxx> +#include <basegfx/utils/zoomtools.hxx> #include <comphelper/lok.hxx> // The SetVisArea of the DocShell must not be called from InnerResizePixel. diff --git a/test/source/primitive2dxmldump.cxx b/test/source/primitive2dxmldump.cxx index 563fb75acc19..a9304b89ad07 100644 --- a/test/source/primitive2dxmldump.cxx +++ b/test/source/primitive2dxmldump.cxx @@ -137,7 +137,7 @@ void Primitive2dXmlDump::decomposeAndWrite( rWriter.attribute("maxx", aB2DRange.getMaxX()); rWriter.attribute("maxy", aB2DRange.getMaxY()); rWriter.startElement("polypolygon"); - rWriter.content(basegfx::tools::exportToSvgD(rPolyPolygonColorPrimitive2D.getB2DPolyPolygon(), true, true, false)); + rWriter.content(basegfx::utils::exportToSvgD(rPolyPolygonColorPrimitive2D.getB2DPolyPolygon(), true, true, false)); rWriter.endElement(); rWriter.endElement(); } @@ -159,7 +159,7 @@ void Primitive2dXmlDump::decomposeAndWrite( //getStrokeAttribute() rWriter.startElement("polypolygon"); - rWriter.content(basegfx::tools::exportToSvgD(rPolyPolygonStrokePrimitive2D.getB2DPolyPolygon(), true, true, false)); + rWriter.content(basegfx::utils::exportToSvgD(rPolyPolygonStrokePrimitive2D.getB2DPolyPolygon(), true, true, false)); rWriter.endElement(); rWriter.endElement(); @@ -174,7 +174,7 @@ void Primitive2dXmlDump::decomposeAndWrite( rWriter.attribute("color", convertColorToString(rPolygonHairlinePrimitive2D.getBColor())); rWriter.startElement("polygon"); - rWriter.content(basegfx::tools::exportToSvgPoints(rPolygonHairlinePrimitive2D.getB2DPolygon())); + rWriter.content(basegfx::utils::exportToSvgPoints(rPolygonHairlinePrimitive2D.getB2DPolygon())); rWriter.endElement(); diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx index a58f29e71307..86689502a7c4 100644 --- a/tools/source/generic/color.cxx +++ b/tools/source/generic/color.cxx @@ -273,7 +273,7 @@ void Color::ApplyTintOrShade(sal_Int16 n100thPercent) if (n100thPercent == 0) return; - basegfx::BColor aBColor = basegfx::tools::rgb2hsl(getBColor()); + basegfx::BColor aBColor = basegfx::utils::rgb2hsl(getBColor()); double fFactor = 1.0 - (std::abs(double(n100thPercent)) / 10000.0); double fResult; @@ -287,7 +287,7 @@ void Color::ApplyTintOrShade(sal_Int16 n100thPercent) } aBColor.setBlue(fResult); - aBColor = basegfx::tools::hsl2rgb(aBColor); + aBColor = basegfx::utils::hsl2rgb(aBColor); SetRed(sal_uInt8(( aBColor.getRed() * 255.0) + 0.5)); SetGreen(sal_uInt8((aBColor.getGreen() * 255.0) + 0.5)); diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 217565a1ae60..db15b735e664 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -1775,7 +1775,7 @@ basegfx::B2DPolygon Polygon::getB2DPolygon() const } // if exist, remove double first/last points, set closed and correct control points - basegfx::tools::checkClosed(aRetval); + basegfx::utils::checkClosed(aRetval); if(aRetval.isClosed()) { @@ -1795,7 +1795,7 @@ basegfx::B2DPolygon Polygon::getB2DPolygon() const } // set closed flag - basegfx::tools::checkClosed(aRetval); + basegfx::utils::checkClosed(aRetval); } } diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx index 0c4f7ed9d665..74fd7927cb59 100644 --- a/tools/source/generic/poly2.cxx +++ b/tools/source/generic/poly2.cxx @@ -325,8 +325,8 @@ void PolyPolygon::ImplDoOperation( const tools::PolyPolygon& rPolyPoly, tools::P // normalize the two polypolygons before. Force properly oriented // polygons. - aMergePolyPolygonA = basegfx::tools::prepareForPolygonOperation( aMergePolyPolygonA ); - aMergePolyPolygonB = basegfx::tools::prepareForPolygonOperation( aMergePolyPolygonB ); + aMergePolyPolygonA = basegfx::utils::prepareForPolygonOperation( aMergePolyPolygonA ); + aMergePolyPolygonB = basegfx::utils::prepareForPolygonOperation( aMergePolyPolygonB ); switch( nOperation ) { @@ -335,7 +335,7 @@ void PolyPolygon::ImplDoOperation( const tools::PolyPolygon& rPolyPoly, tools::P case PolyClipOp::UNION: { // merge A and B (OR) - aMergePolyPolygonA = basegfx::tools::solvePolygonOperationOr(aMergePolyPolygonA, aMergePolyPolygonB); + aMergePolyPolygonA = basegfx::utils::solvePolygonOperationOr(aMergePolyPolygonA, aMergePolyPolygonB); break; } @@ -343,7 +343,7 @@ void PolyPolygon::ImplDoOperation( const tools::PolyPolygon& rPolyPoly, tools::P case PolyClipOp::INTERSECT: { // cut poly 1 against polys 2..n (AND) - aMergePolyPolygonA = basegfx::tools::solvePolygonOperationAnd(aMergePolyPolygonA, aMergePolyPolygonB); + aMergePolyPolygonA = basegfx::utils::solvePolygonOperationAnd(aMergePolyPolygonA, aMergePolyPolygonB); break; } } diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 08b6ad2522f9..3e37da8e374f 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -538,7 +538,7 @@ void SvpSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor ) SalColor aOrigFillColor = m_aFillColor; SalColor aOrigLineColor = m_aLineColor; - basegfx::B2DPolygon aRect = basegfx::tools::createPolygonFromRect(basegfx::B2DRectangle(nX, nY, nX+1, nY+1)); + basegfx::B2DPolygon aRect = basegfx::utils::createPolygonFromRect(basegfx::B2DRectangle(nX, nY, nX+1, nY+1)); m_aLineColor = SALCOLOR_NONE; m_aFillColor = nSalColor; @@ -558,7 +558,7 @@ void SvpSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight ) if (aOrigFillColor != SALCOLOR_NONE) { - basegfx::B2DPolygon aRect = basegfx::tools::createPolygonFromRect(basegfx::B2DRectangle(nX, nY, nX+nWidth, nY+nHeight)); + basegfx::B2DPolygon aRect = basegfx::utils::createPolygonFromRect(basegfx::B2DRectangle(nX, nY, nX+nWidth, nY+nHeight)); m_aFillColor = aOrigFillColor; drawPolyPolygon(basegfx::B2DPolyPolygon(aRect)); m_aFillColor = SALCOLOR_NONE; @@ -567,7 +567,7 @@ void SvpSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight ) if (aOrigLineColor != SALCOLOR_NONE) { // need same -1 hack as X11SalGraphicsImpl::drawRect - basegfx::B2DPolygon aRect = basegfx::tools::createPolygonFromRect(basegfx::B2DRectangle( nX, nY, nX+nWidth-1, nY+nHeight-1)); + basegfx::B2DPolygon aRect = basegfx::utils::createPolygonFromRect(basegfx::B2DRectangle( nX, nY, nX+nWidth-1, nY+nHeight-1)); m_aLineColor = aOrigLineColor; drawPolyPolygon(basegfx::B2DPolyPolygon(aRect)); m_aLineColor = SALCOLOR_NONE; @@ -1283,7 +1283,7 @@ void SvpSalGraphics::invert(const basegfx::B2DPolygon &rPoly, SalInvert nFlags) void SvpSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ) { - basegfx::B2DPolygon aRect = basegfx::tools::createPolygonFromRect(basegfx::B2DRectangle(nX, nY, nX+nWidth, nY+nHeight)); + basegfx::B2DPolygon aRect = basegfx::utils::createPolygonFromRect(basegfx::B2DRectangle(nX, nY, nX+nWidth, nY+nHeight)); invert(aRect, nFlags); } diff --git a/vcl/opengl/RenderList.cxx b/vcl/opengl/RenderList.cxx index a0b86c4a9afa..462735c67f4c 100644 --- a/vcl/opengl/RenderList.cxx +++ b/vcl/opengl/RenderList.cxx @@ -290,7 +290,7 @@ void RenderList::addDrawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon, if (nFillColor != SALCOLOR_NONE) { basegfx::B2DTrapezoidVector aTrapezoidVector; - basegfx::tools::trapezoidSubdivide(aTrapezoidVector, rPolyPolygon); + basegfx::utils::trapezoidSubdivide(aTrapezoidVector, rPolyPolygon); if (!aTrapezoidVector.empty()) { diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 4a0153caf509..f24038ee8cc1 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -885,7 +885,7 @@ void OpenGLSalGraphicsImpl::DrawPolygon( sal_uInt32 nPoints, const SalPoint* pPt aPolygon.append( basegfx::B2DPoint( pPtAry[i].mnX, pPtAry[i].mnY ) ); aPolygon.setClosed( true ); - if( basegfx::tools::isConvex( aPolygon ) ) + if( basegfx::utils::isConvex( aPolygon ) ) { if( nPoints > 2 ) DrawConvexPolygon( nPoints, pPtAry ); @@ -899,9 +899,9 @@ void OpenGLSalGraphicsImpl::DrawPolygon( sal_uInt32 nPoints, const SalPoint* pPt void OpenGLSalGraphicsImpl::DrawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, bool blockAA ) { - const basegfx::B2DPolyPolygon& aSimplePolyPolygon = ::basegfx::tools::solveCrossovers( rPolyPolygon ); + const basegfx::B2DPolyPolygon& aSimplePolyPolygon = ::basegfx::utils::solveCrossovers( rPolyPolygon ); basegfx::B2DTrapezoidVector aB2DTrapVector; - basegfx::tools::trapezoidSubdivide( aB2DTrapVector, aSimplePolyPolygon ); + basegfx::utils::trapezoidSubdivide( aB2DTrapVector, aSimplePolyPolygon ); // draw tesselation result if( aB2DTrapVector.size()) { diff --git a/vcl/source/bitmap/BitmapProcessor.cxx b/vcl/source/bitmap/BitmapProcessor.cxx index b6f556b9cdd9..a7870534818a 100644 --- a/vcl/source/bitmap/BitmapProcessor.cxx +++ b/vcl/source/bitmap/BitmapProcessor.cxx @@ -33,7 +33,7 @@ BitmapEx BitmapProcessor::createLightImage(const BitmapEx& rBitmapEx) pRead->GetPaletteColor(pRead->GetPixelIndex(nY, nX)) : pRead->GetPixel(nY, nX); basegfx::BColor aBColor(Color(aColor.Invert()).getBColor()); - aBColor = basegfx::tools::rgb2hsl(aBColor); + aBColor = basegfx::utils::rgb2hsl(aBColor); double fHue = aBColor.getRed(); fHue += 180.0; @@ -41,7 +41,7 @@ BitmapEx BitmapProcessor::createLightImage(const BitmapEx& rBitmapEx) fHue -= 360.0; aBColor.setRed(fHue); - aBColor = basegfx::tools::hsl2rgb(aBColor); + aBColor = basegfx::utils::hsl2rgb(aBColor); aColor.SetRed((aBColor.getRed() * 255.0) + 0.5); aColor.SetGreen((aBColor.getGreen() * 255.0) + 0.5); aColor.SetBlue((aBColor.getBlue() * 255.0) + 0.5); diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index 99186cf04129..99cf6846b243 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -932,7 +932,7 @@ BitmapEx BitmapEx::getTransformed( basegfx::B2DRange aVisibleRange(rVisibleRange); aVisibleRange.transform( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( aOutlineRange.getRange(), aOutlineRange.getMinimum())); @@ -960,7 +960,7 @@ BitmapEx BitmapEx::getTransformed( // Build complete transform from source pixels to target pixels. // Start by scaling from source pixel size to unit coordinates basegfx::B2DHomMatrix aTransform( - basegfx::tools::createScaleB2DHomMatrix( + basegfx::utils::createScaleB2DHomMatrix( 1.0 / nSourceWidth, 1.0 / nSourceHeight)); diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx index 542a9ef6c63c..a5bd77e1b4ab 100644 --- a/vcl/source/gdi/gdimetafiletools.cxx +++ b/vcl/source/gdi/gdimetafiletools.cxx @@ -40,7 +40,7 @@ namespace if(rSource.count() && rClip.count()) { const basegfx::B2DPolyPolygon aResult( - basegfx::tools::clipPolyPolygonOnPolyPolygon( + basegfx::utils::clipPolyPolygonOnPolyPolygon( rSource, rClip, true, // inside @@ -87,7 +87,7 @@ namespace if(rSource.count() && rClip.count()) { const basegfx::B2DPolyPolygon aResult( - basegfx::tools::clipPolyPolygonOnPolyPolygon( + basegfx::utils::clipPolyPolygonOnPolyPolygon( rSource, rClip, true, // inside @@ -131,7 +131,7 @@ namespace rPoint.X(), rPoint.Y(), rPoint.X() + rSize.Width(), rPoint.Y() + rSize.Height()); const basegfx::B2DPolyPolygon aClipOfBitmap( - basegfx::tools::clipPolyPolygonOnRange( + basegfx::utils::clipPolyPolygonOnRange( rClip, aLogicBitmapRange, true, @@ -145,7 +145,7 @@ namespace // inside or overlapping. Use area to find out if it is completely // covering (inside) or overlapping - const double fClipArea(basegfx::tools::getArea(aClipOfBitmap)); + const double fClipArea(basegfx::utils::getArea(aClipOfBitmap)); const double fBitmapArea( aLogicBitmapRange.getWidth() * aLogicBitmapRange.getWidth() + aLogicBitmapRange.getHeight() * aLogicBitmapRange.getHeight()); @@ -196,7 +196,7 @@ namespace basegfx::B2DPolyPolygon aInvertPixelPoly; aInvertPixelPoly.append( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRange( 0.0, 0.0, aSizePixel.Width(), aSizePixel.Height()))); @@ -321,7 +321,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()); - aClips.back() = basegfx::tools::clipPolyPolygonOnRange( + aClips.back() = basegfx::utils::clipPolyPolygonOnRange( aClips.back(), aClipRange, true, // inside @@ -339,7 +339,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) { const basegfx::B2DPolyPolygon aNewClip(rRegion.GetAsB2DPolyPolygon()); - aClips.back() = basegfx::tools::clipPolyPolygonOnPolyPolygon( + aClips.back() = basegfx::utils::clipPolyPolygonOnPolyPolygon( aClips.back(), aNewClip, true, // inside @@ -357,7 +357,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) if((aHorMove || aVerMove) && aClips.size() && aClips.back().count()) { aClips.back().transform( - basegfx::tools::createTranslateB2DHomMatrix( + basegfx::utils::createTranslateB2DHomMatrix( aHorMove, aVerMove)); } @@ -453,7 +453,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) const MetaPixelAction* pA = static_cast< const MetaPixelAction* >(pAction); const Point& rPoint = pA->GetPoint(); - if(!basegfx::tools::isInside( + if(!basegfx::utils::isInside( aClips.back(), basegfx::B2DPoint(rPoint.X(), rPoint.Y()))) { @@ -468,7 +468,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) const MetaPointAction* pA = static_cast< const MetaPointAction* >(pAction); const Point& rPoint = pA->GetPoint(); - if(!basegfx::tools::isInside( + if(!basegfx::utils::isInside( aClips.back(), basegfx::B2DPoint(rPoint.X(), rPoint.Y()))) { @@ -513,7 +513,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) bDone = handleGeometricContent( aClips.back(), basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRange( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()))), @@ -546,11 +546,11 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) fRadiusX = std::max(0.0, std::min(1.0, fRadiusX)); fRadiusY = std::max(0.0, std::min(1.0, fRadiusY)); - aOutline = basegfx::tools::createPolygonFromRect(aRange, fRadiusX, fRadiusY); + aOutline = basegfx::utils::createPolygonFromRect(aRange, fRadiusX, fRadiusY); } else { - aOutline = basegfx::tools::createPolygonFromRect(aRange); + aOutline = basegfx::utils::createPolygonFromRect(aRange); } bDone = handleGeometricContent( @@ -578,7 +578,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) bDone = handleGeometricContent( aClips.back(), basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromEllipse( + basegfx::utils::createPolygonFromEllipse( aRange.getCenter(), aRange.getWidth() * 0.5, aRange.getHeight() * 0.5)), @@ -885,7 +885,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) { const basegfx::B2DPolyPolygon aSource(aPath.getB2DPolyPolygon()); const basegfx::B2DPolyPolygon aResult( - basegfx::tools::clipPolyPolygonOnPolyPolygon( + basegfx::utils::clipPolyPolygonOnPolyPolygon( aSource, aClips.back(), true, // inside @@ -926,7 +926,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) { const basegfx::B2DPolygon aSource(aPath.getB2DPolygon()); const basegfx::B2DPolyPolygon aResult( - basegfx::tools::clipPolygonOnPolyPolygon( + basegfx::utils::clipPolygonOnPolyPolygon( aSource, aClips.back(), true, // inside @@ -975,7 +975,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) bDone = handleGradientContent( aClips.back(), basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRange( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()))), diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx index bb27afed837d..1c9ee4846a72 100644 --- a/vcl/source/gdi/lineinfo.cxx +++ b/vcl/source/gdi/lineinfo.cxx @@ -256,7 +256,7 @@ void LineInfo::applyToB2DPolyPolygon( for(sal_uInt32 c(0); c < io_rLinePolyPolygon.count(); c++) { basegfx::B2DPolyPolygon aLineTraget; - basegfx::tools::applyLineDashing( + basegfx::utils::applyLineDashing( io_rLinePolyPolygon.getB2DPolygon(c), fDotDashArray, &aLineTraget); @@ -273,7 +273,7 @@ void LineInfo::applyToB2DPolyPolygon( for(sal_uInt32 a(0); a < io_rLinePolyPolygon.count(); a++) { - o_rFillPolyPolygon.append(basegfx::tools::createAreaGeometry( + o_rFillPolyPolygon.append(basegfx::utils::createAreaGeometry( io_rLinePolyPolygon.getB2DPolygon(a), fHalfLineWidth, GetLineJoin(), diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index 4fd05336e1f6..015db9888d1c 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -443,7 +443,7 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc if ( bClippingNeeded ) { rWriter.Push(); - basegfx::B2DPolyPolygon aRect( basegfx::tools::createPolygonFromRect( + basegfx::B2DPolyPolygon aRect( basegfx::utils::createPolygonFromRect( basegfx::B2DRectangle( aVisibleOutputRect.Left(), aVisibleOutputRect.Top(), aVisibleOutputRect.Right(), aVisibleOutputRect.Bottom() ) ) ); rWriter.SetClipRegion( aRect); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 00a53d60f5f0..fbf9fa996c3e 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1461,7 +1461,7 @@ void PDFWriterImpl::PDFPage::appendPolygon( const basegfx::B2DPolygon& rPoly, OS m_pWriter->getReferenceDevice(), rPoly ) ); - if( basegfx::tools::isRectangle( aPoly ) ) + if( basegfx::utils::isRectangle( aPoly ) ) { basegfx::B2DRange aRange( aPoly.getB2DRange() ); basegfx::B2DPoint aBL( aRange.getMinX(), aRange.getMaxY() ); @@ -8420,12 +8420,12 @@ void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly, const PDFWriter:: basegfx::B2DPolygon aPoly(rPoly.getB2DPolygon()); basegfx::B2DPolyPolygon aPolyPoly; - basegfx::tools::applyLineDashing(aPoly, rInfo.m_aDashArray, &aPolyPoly); + basegfx::utils::applyLineDashing(aPoly, rInfo.m_aDashArray, &aPolyPoly); // Old applyLineDashing subdivided the polygon. New one will create bezier curve segments. // To mimic old behaviour, apply subdivide here. If beziers shall be written (better quality) // this line needs to be removed and the loop below adapted accordingly - aPolyPoly = basegfx::tools::adaptiveSubdivideByAngle(aPolyPoly); + aPolyPoly = basegfx::utils::adaptiveSubdivideByAngle(aPolyPoly); const sal_uInt32 nPolygonCount(aPolyPoly.count()); @@ -10406,7 +10406,7 @@ void PDFWriterImpl::moveClipRegion( sal_Int32 nX, sal_Int32 nY ) void PDFWriterImpl::intersectClipRegion( const tools::Rectangle& rRect ) { - basegfx::B2DPolyPolygon aRect( basegfx::tools::createPolygonFromRect( + basegfx::B2DPolyPolygon aRect( basegfx::utils::createPolygonFromRect( basegfx::B2DRectangle( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() ) ) ); intersectClipRegion( aRect ); } @@ -10418,9 +10418,9 @@ bool PDFWriterImpl::intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsStateUpdateFlags::ClipRegion; if( m_aGraphicsStack.front().m_bClipRegion ) { - basegfx::B2DPolyPolygon aOld( basegfx::tools::prepareForPolygonOperation( m_aGraphicsStack.front().m_aClipRegion ) ); - aRegion = basegfx::tools::prepareForPolygonOperation( aRegion ); - m_aGraphicsStack.front().m_aClipRegion = basegfx::tools::solvePolygonOperationAnd( aOld, aRegion ); + basegfx::B2DPolyPolygon aOld( basegfx::utils::prepareForPolygonOperation( m_aGraphicsStack.front().m_aClipRegion ) ); + aRegion = basegfx::utils::prepareForPolygonOperation( aRegion ); + m_aGraphicsStack.front().m_aClipRegion = basegfx::utils::solvePolygonOperationAnd( aOld, aRegion ); } else { diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index 94a9494ccb27..75f55716995c 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -775,7 +775,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, { const tools::Polygon aPoly( static_cast<const MetaPolygonAction*>(pCurrAct)->GetPolygon()); - if( !basegfx::tools::isRectangle( + if( !basegfx::utils::isRectangle( aPoly.getB2DPolygon()) || !checkRect( aBackgroundComponent.aBounds, @@ -792,7 +792,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, const tools::PolyPolygon aPoly( static_cast<const MetaPolyPolygonAction*>(pCurrAct)->GetPolyPolygon()); if( aPoly.Count() != 1 || - !basegfx::tools::isRectangle( + !basegfx::utils::isRectangle( aPoly[0].getB2DPolygon()) || !checkRect( aBackgroundComponent.aBounds, diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index aaed62a24e0b..a4163402ea7a 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -439,7 +439,7 @@ void vcl::Region::Move( long nHorzMove, long nVertMove ) { basegfx::B2DPolyPolygon aPoly(*getB2DPolyPolygon()); - aPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(nHorzMove, nVertMove)); + aPoly.transform(basegfx::utils::createTranslateB2DHomMatrix(nHorzMove, nVertMove)); mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : nullptr); mpPolyPolygon.reset(); mpRegionBand.reset(); @@ -486,7 +486,7 @@ void vcl::Region::Scale( double fScaleX, double fScaleY ) { basegfx::B2DPolyPolygon aPoly(*getB2DPolyPolygon()); - aPoly.transform(basegfx::tools::createScaleB2DHomMatrix(fScaleX, fScaleY)); + aPoly.transform(basegfx::utils::createScaleB2DHomMatrix(fScaleX, fScaleY)); mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : nullptr); mpPolyPolygon.reset(); mpRegionBand.reset(); @@ -535,7 +535,7 @@ bool vcl::Region::Union( const tools::Rectangle& rRect ) // get this B2DPolyPolygon, solve on polygon base basegfx::B2DPolyPolygon aThisPolyPoly(GetAsB2DPolyPolygon()); - aThisPolyPoly = basegfx::tools::prepareForPolygonOperation(aThisPolyPoly); + aThisPolyPoly = basegfx::utils::prepareForPolygonOperation(aThisPolyPoly); if(!aThisPolyPoly.count()) { @@ -546,14 +546,14 @@ bool vcl::Region::Union( const tools::Rectangle& rRect ) { // get the other B2DPolyPolygon and use logical Or-Operation const basegfx::B2DPolygon aRectPoly( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRectangle( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()))); const basegfx::B2DPolyPolygon aClip( - basegfx::tools::solvePolygonOperationOr( + basegfx::utils::solvePolygonOperationOr( aThisPolyPoly, basegfx::B2DPolyPolygon(aRectPoly))); *this = vcl::Region(aClip); @@ -624,7 +624,7 @@ bool vcl::Region::Intersect( const tools::Rectangle& rRect ) if(getB2DPolyPolygon()) { const basegfx::B2DPolyPolygon aPoly( - basegfx::tools::clipPolyPolygonOnRange( + basegfx::utils::clipPolyPolygonOnRange( *getB2DPolyPolygon(), basegfx::B2DRange( rRect.Left(), @@ -715,7 +715,7 @@ bool vcl::Region::Exclude( const tools::Rectangle& rRect ) // get this B2DPolyPolygon basegfx::B2DPolyPolygon aThisPolyPoly(GetAsB2DPolyPolygon()); - aThisPolyPoly = basegfx::tools::prepareForPolygonOperation(aThisPolyPoly); + aThisPolyPoly = basegfx::utils::prepareForPolygonOperation(aThisPolyPoly); if(!aThisPolyPoly.count()) { @@ -725,10 +725,10 @@ bool vcl::Region::Exclude( const tools::Rectangle& rRect ) // get the other B2DPolyPolygon const basegfx::B2DPolygon aRectPoly( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()))); const basegfx::B2DPolyPolygon aOtherPolyPoly(aRectPoly); - const basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationDiff(aThisPolyPoly, aOtherPolyPoly); + const basegfx::B2DPolyPolygon aClip = basegfx::utils::solvePolygonOperationDiff(aThisPolyPoly, aOtherPolyPoly); *this = vcl::Region(aClip); @@ -796,7 +796,7 @@ bool vcl::Region::XOr( const tools::Rectangle& rRect ) // get this B2DPolyPolygon basegfx::B2DPolyPolygon aThisPolyPoly(GetAsB2DPolyPolygon()); - aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly ); + aThisPolyPoly = basegfx::utils::prepareForPolygonOperation( aThisPolyPoly ); if(!aThisPolyPoly.count()) { @@ -807,10 +807,10 @@ bool vcl::Region::XOr( const tools::Rectangle& rRect ) // get the other B2DPolyPolygon const basegfx::B2DPolygon aRectPoly( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()))); const basegfx::B2DPolyPolygon aOtherPolyPoly(aRectPoly); - const basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationXor(aThisPolyPoly, aOtherPolyPoly); + const basegfx::B2DPolyPolygon aClip = basegfx::utils::solvePolygonOperationXor(aThisPolyPoly, aOtherPolyPoly); *this = vcl::Region(aClip); @@ -885,7 +885,7 @@ bool vcl::Region::Union( const vcl::Region& rRegion ) // get this B2DPolyPolygon basegfx::B2DPolyPolygon aThisPolyPoly(GetAsB2DPolyPolygon()); - aThisPolyPoly = basegfx::tools::prepareForPolygonOperation(aThisPolyPoly); + aThisPolyPoly = basegfx::utils::prepareForPolygonOperation(aThisPolyPoly); if(!aThisPolyPoly.count()) { @@ -896,10 +896,10 @@ bool vcl::Region::Union( const vcl::Region& rRegion ) // get the other B2DPolyPolygon basegfx::B2DPolyPolygon aOtherPolyPoly(rRegion.GetAsB2DPolyPolygon()); - aOtherPolyPoly = basegfx::tools::prepareForPolygonOperation(aOtherPolyPoly); + aOtherPolyPoly = basegfx::utils::prepareForPolygonOperation(aOtherPolyPoly); // use logical OR operation - basegfx::B2DPolyPolygon aClip(basegfx::tools::solvePolygonOperationOr(aThisPolyPoly, aOtherPolyPoly)); + basegfx::B2DPolyPolygon aClip(basegfx::utils::solvePolygonOperationOr(aThisPolyPoly, aOtherPolyPoly)); *this = vcl::Region( aClip ); return true; @@ -1005,7 +1005,7 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion ) } const basegfx::B2DPolyPolygon aClip( - basegfx::tools::clipPolyPolygonOnPolyPolygon( + basegfx::utils::clipPolyPolygonOnPolyPolygon( aOtherPolyPoly, aThisPolyPoly, true, @@ -1100,13 +1100,13 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion ) return true; } - aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly ); + aThisPolyPoly = basegfx::utils::prepareForPolygonOperation( aThisPolyPoly ); // get the other B2DPolyPolygon basegfx::B2DPolyPolygon aOtherPolyPoly(rRegion.GetAsB2DPolyPolygon()); - aOtherPolyPoly = basegfx::tools::prepareForPolygonOperation( aOtherPolyPoly ); + aOtherPolyPoly = basegfx::utils::prepareForPolygonOperation( aOtherPolyPoly ); - basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationDiff( aThisPolyPoly, aOtherPolyPoly ); + basegfx::B2DPolyPolygon aClip = basegfx::utils::solvePolygonOperationDiff( aThisPolyPoly, aOtherPolyPoly ); *this = vcl::Region( aClip ); return true; } @@ -1187,13 +1187,13 @@ bool vcl::Region::XOr( const vcl::Region& rRegion ) return true; } - aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly ); + aThisPolyPoly = basegfx::utils::prepareForPolygonOperation( aThisPolyPoly ); // get the other B2DPolyPolygon basegfx::B2DPolyPolygon aOtherPolyPoly(rRegion.GetAsB2DPolyPolygon()); - aOtherPolyPoly = basegfx::tools::prepareForPolygonOperation( aOtherPolyPoly ); + aOtherPolyPoly = basegfx::utils::prepareForPolygonOperation( aOtherPolyPoly ); - basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationXor( aThisPolyPoly, aOtherPolyPoly ); + basegfx::B2DPolyPolygon aClip = basegfx::utils::solvePolygonOperationXor( aThisPolyPoly, aOtherPolyPoly ); *this = vcl::Region( aClip ); return true; } @@ -1251,7 +1251,7 @@ tools::Rectangle vcl::Region::GetBoundRect() const // prefer double precision source if(getB2DPolyPolygon()) { - const basegfx::B2DRange aRange(basegfx::tools::getRange(*getB2DPolyPolygon())); + const basegfx::B2DRange aRange(basegfx::utils::getRange(*getB2DPolyPolygon())); if(aRange.isEmpty()) { @@ -1416,7 +1416,7 @@ bool vcl::Region::IsRectangle() const return false; if( getB2DPolyPolygon() ) - return basegfx::tools::isRectangle( *getB2DPolyPolygon() ); + return basegfx::utils::isRectangle( *getB2DPolyPolygon() ); if( getPolyPolygon() ) return getPolyPolygon()->IsRect(); diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 02e0ce27ee69..190044e44693 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -650,7 +650,7 @@ bool SalLayout::GetOutline( SalGraphics& rSalGraphics, { if( aPos.X() || aPos.Y() ) { - aGlyphOutline.transform(basegfx::tools::createTranslateB2DHomMatrix(aPos.X(), aPos.Y())); + aGlyphOutline.transform(basegfx::utils::createTranslateB2DHomMatrix(aPos.X(), aPos.Y())); } // insert outline at correct position diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx index 7b75c586a8ae..ef2732c6443c 100644 --- a/vcl/source/helper/canvastools.cxx +++ b/vcl/source/helper/canvastools.cxx @@ -45,7 +45,7 @@ #include <basegfx/point/b2ipoint.hxx> #include <basegfx/range/b2irectangle.hxx> #include <basegfx/polygon/b2dpolygon.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <tools/poly.hxx> diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index cdebce02a139..97dc646fda5b 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -1295,7 +1295,7 @@ void OutputDevice::DrawTransformedBitmapEx( // get from unified/relative VisibleRange to logoc one aVisibleRange.transform( - basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::utils::createScaleTranslateB2DHomMatrix( aTargetRange.getRange(), aTargetRange.getMinimum())); diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx index b4a78314afcb..d920ffa71e7a 100644 --- a/vcl/source/outdev/line.cxx +++ b/vcl/source/outdev/line.cxx @@ -131,7 +131,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) { - aB2DPolyLine = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyLine); + aB2DPolyLine = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyLine); } if( mpGraphics->DrawPolyLine( @@ -194,7 +194,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin for(sal_uInt32 c(0); c < aLinePolyPolygon.count(); c++) { basegfx::B2DPolyPolygon aLineTarget; - basegfx::tools::applyLineDashing( + basegfx::utils::applyLineDashing( aLinePolyPolygon.getB2DPolygon(c), fDotDashArray, &aLineTarget); @@ -216,12 +216,12 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin // but one that is at least as good as ImplSubdivideBezier was. // There, Polygon::AdaptiveSubdivide was used with default parameter // 1.0 as quality index. - aLinePolyPolygon = basegfx::tools::adaptiveSubdivideByDistance(aLinePolyPolygon, 1.0); + aLinePolyPolygon = basegfx::utils::adaptiveSubdivideByDistance(aLinePolyPolygon, 1.0); } for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) { - aFillPolyPolygon.append(basegfx::tools::createAreaGeometry( + aFillPolyPolygon.append(basegfx::utils::createAreaGeometry( aLinePolyPolygon.getB2DPolygon(a), fHalfLineWidth, rInfo.GetLineJoin(), diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx index e20caaf28d86..cd831794e168 100644 --- a/vcl/source/outdev/polygon.cxx +++ b/vcl/source/outdev/polygon.cxx @@ -87,7 +87,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ) if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) { - aB2DPolyPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyPolygon); + aB2DPolyPolygon = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyPolygon); } for(sal_uInt32 a(0); bSuccess && a < aB2DPolyPolygon.count(); a++) @@ -200,7 +200,7 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly ) if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) { - aB2DPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolygon); + aB2DPolygon = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(aB2DPolygon); } bSuccess = mpGraphics->DrawPolyLine( aB2DPolygon, @@ -303,7 +303,7 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) { - aB2DPolyPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyPolygon); + aB2DPolyPolygon = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyPolygon); } for(sal_uInt32 a(0);bSuccess && a < aB2DPolyPolygon.count(); a++) diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx index b847b8ae17be..9793b497322d 100644 --- a/vcl/source/outdev/polyline.cxx +++ b/vcl/source/outdev/polyline.cxx @@ -69,7 +69,7 @@ void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly ) if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) { - aB2DPolyLine = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyLine); + aB2DPolyLine = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyLine); } if(mpGraphics->DrawPolyLine( @@ -187,7 +187,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon, { const double fHalfLineWidth((fLineWidth * 0.5) + 0.5); const basegfx::B2DPolyPolygon aAreaPolyPolygon( - basegfx::tools::createAreaGeometry( rB2DPolygon, + basegfx::utils::createAreaGeometry( rB2DPolygon, fHalfLineWidth, eLineJoin, eLineCap, @@ -339,7 +339,7 @@ bool OutputDevice::DrawPolyLineDirect( const basegfx::B2DPolygon& rB2DPolygon, // better to remove doubles on device coordinates. Also assume from a given amount // of points that the single edges are not long enough to smooth aB2DPolygon.removeDoublePoints(); - aB2DPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolygon); + aB2DPolygon = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(aB2DPolygon); } // draw the polyline diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index efd25790f00e..8fc0361b0789 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -1468,17 +1468,17 @@ bool X11SalGraphicsImpl::drawPolyPolygon( const basegfx::B2DPolyPolygon& rOrigPo basegfx::B2DPolyPolygon aPolyPoly = rOrigPolyPoly; const bool bSnapToRaster = !mrParent.getAntiAliasB2DDraw(); if( bSnapToRaster ) - aPolyPoly = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges( aPolyPoly ); + aPolyPoly = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges( aPolyPoly ); // don't bother with polygons outside of visible area const basegfx::B2DRange aViewRange( 0, 0, GetGraphicsWidth(), GetGraphicsHeight() ); - aPolyPoly = basegfx::tools::clipPolyPolygonOnRange( aPolyPoly, aViewRange, true, false ); + aPolyPoly = basegfx::utils::clipPolyPolygonOnRange( aPolyPoly, aViewRange, true, false ); if( !aPolyPoly.count() ) return true; // tessellate the polypolygon into trapezoids basegfx::B2DTrapezoidVector aB2DTrapVector; - basegfx::tools::trapezoidSubdivide( aB2DTrapVector, aPolyPoly ); + basegfx::utils::trapezoidSubdivide( aB2DTrapVector, aPolyPoly ); const int nTrapCount = aB2DTrapVector.size(); if( !nTrapCount ) return true; @@ -1577,7 +1577,7 @@ bool X11SalGraphicsImpl::drawPolyLine( // #i101491# if( !bIsHairline && (rPolygon.count() > 1000) ) { - // the used basegfx::tools::createAreaGeometry is simply too + // the used basegfx::utils::createAreaGeometry is simply too // expensive with very big polygons; fallback to caller (who // should use ImplLineConverter normally) // AW: ImplLineConverter had to be removed since it does not even @@ -1597,7 +1597,7 @@ bool X11SalGraphicsImpl::drawPolyLine( // #i122456# This is probably thought to happen to align hairlines to pixel positions, so // it should be a 0.5 translation, not more. It will definitely go wrong with fat lines - aPolygon.transform( basegfx::tools::createTranslateB2DHomMatrix(0.5, 0.5) ); + aPolygon.transform( basegfx::utils::createTranslateB2DHomMatrix(0.5, 0.5) ); // shortcut for hairline drawing to improve performance bool bDrawnOk = true; @@ -1606,7 +1606,7 @@ bool X11SalGraphicsImpl::drawPolyLine( // hairlines can benefit from a simplified tesselation // e.g. for hairlines the linejoin style can be ignored basegfx::B2DTrapezoidVector aB2DTrapVector; - basegfx::tools::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, aPolygon, rLineWidth.getX() ); + basegfx::utils::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, aPolygon, rLineWidth.getX() ); // draw tesselation result const int nTrapCount = aB2DTrapVector.size(); @@ -1623,17 +1623,17 @@ bool X11SalGraphicsImpl::drawPolyLine( && !basegfx::fTools::equalZero( rLineWidth.getY() ) ) { // prepare for createAreaGeometry() with anisotropic linewidth - aPolygon.transform( basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getX() / rLineWidth.getY())); + aPolygon.transform( basegfx::utils::createScaleB2DHomMatrix(1.0, rLineWidth.getX() / rLineWidth.getY())); } // create the area-polygon for the line - const basegfx::B2DPolyPolygon aAreaPolyPoly( basegfx::tools::createAreaGeometry(aPolygon, fHalfWidth, eLineJoin, eLineCap, fMiterMinimumAngle) ); + const basegfx::B2DPolyPolygon aAreaPolyPoly( basegfx::utils::createAreaGeometry(aPolygon, fHalfWidth, eLineJoin, eLineCap, fMiterMinimumAngle) ); if( (rLineWidth.getX() != rLineWidth.getY()) && !basegfx::fTools::equalZero( rLineWidth.getX() ) ) { // postprocess createAreaGeometry() for anisotropic linewidth - aPolygon.transform(basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getY() / rLineWidth.getX())); + aPolygon.transform(basegfx::utils::createScaleB2DHomMatrix(1.0, rLineWidth.getY() / rLineWidth.getX())); } // draw each area polypolygon component individually diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 8e86e1893e52..861232597432 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -602,7 +602,7 @@ bool X11SalGraphics::drawPolyPolygon( const basegfx::B2DPolyPolygon& rOrigPolyPo if(bSnapPoints) { - aPolyPoly = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aPolyPoly); + aPolyPoly = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(aPolyPoly); } cairo_t* cr = getCairoContext(); @@ -788,7 +788,7 @@ bool X11SalGraphics::drawPolyLine( if(nEdgeCount) { const bool bSnapPoints(!getAntiAliasB2DDraw()); - static basegfx::B2DHomMatrix aHalfPointTransform(basegfx::tools::createTranslateB2DHomMatrix(0.5, 0.5)); + static basegfx::B2DHomMatrix aHalfPointTransform(basegfx::utils::createTranslateB2DHomMatrix(0.5, 0.5)); basegfx::B2DCubicBezier aEdge; basegfx::B2DPoint aStart; diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 9b251804dfd2..534115115c54 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -968,7 +968,7 @@ bool FreetypeFont::GetGlyphOutline(const GlyphItem& rGlyph, // convert to basegfx polypolygon // TODO: get rid of the intermediate tools polypolygon rB2DPolyPoly = aToolPolyPolygon.getB2DPolyPolygon(); - rB2DPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix( +1.0/(1<<6), -1.0/(1<<6) )); + rB2DPolyPoly.transform(basegfx::utils::createScaleB2DHomMatrix( +1.0/(1<<6), -1.0/(1<<6) )); return true; } diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index 6eb6782c9154..6e694efafed8 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -1154,13 +1154,13 @@ bool WinSalGraphicsImpl::setClipRegion( const vcl::Region& i_rClip ) { const basegfx::B2DRange aRangeS(aPolyPolygon.getB2DRange()); const basegfx::B2DRange aRangeT(aRangeS.getMinimum(), aRangeS.getMaximum() + basegfx::B2DTuple(1.0, 1.0)); - aExpand = basegfx::B2DHomMatrix(basegfx::tools::createSourceRangeTargetRangeTransform(aRangeS, aRangeT)); + aExpand = basegfx::B2DHomMatrix(basegfx::utils::createSourceRangeTargetRangeTransform(aRangeS, aRangeT)); } for(sal_uInt32 a(0); a < nCount; a++) { const basegfx::B2DPolygon aPoly( - basegfx::tools::adaptiveSubdivideByDistance( + basegfx::utils::adaptiveSubdivideByDistance( aPolyPolygon.getB2DPolygon(a), 1)); const sal_uInt32 nPoints(aPoly.count()); diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index f463ecb20417..f46ace4070a5 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -1524,7 +1524,7 @@ bool WinSalGraphics::GetGlyphOutline(const GlyphItem& rGlyph, if( rB2DPolyPoly.count() ) { const double fFactor(1.0/256); - rB2DPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix(fFactor, fFactor)); + rB2DPolyPoly.transform(basegfx::utils::createScaleB2DHomMatrix(fFactor, fFactor)); } return true; diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx index 490a5238e9b2..291befdaabe5 100644 --- a/xmloff/source/draw/XMLImageMapContext.cxx +++ b/xmloff/source/draw/XMLImageMapContext.cxx @@ -438,12 +438,12 @@ void XMLImageMapPolygonContext::Prepare(Reference<XPropertySet> & rPropertySet) // get polygon sequence basegfx::B2DPolygon aPolygon; - if(basegfx::tools::importFromSvgPoints(aPolygon, sPointsString)) + if(basegfx::utils::importFromSvgPoints(aPolygon, sPointsString)) { if(aPolygon.count()) { css::drawing::PointSequence aPointSequence; - basegfx::tools::B2DPolygonToUnoPointSequence(aPolygon, aPointSequence); + basegfx::utils::B2DPolygonToUnoPointSequence(aPolygon, aPointSequence); rPropertySet->setPropertyValue("Polygon", Any(aPointSequence)); } } diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx index 34c3515ca27d..bc1f66c0d609 100644 --- a/xmloff/source/draw/XMLImageMapExport.cxx +++ b/xmloff/source/draw/XMLImageMapExport.cxx @@ -315,7 +315,7 @@ void XMLImageMapExport::ExportPolygon(const Reference<XPropertySet> & rPropertyS aAny >>= aPoly; const basegfx::B2DPolygon aPolygon( - basegfx::tools::UnoPointSequenceToB2DPolygon( + basegfx::utils::UnoPointSequenceToB2DPolygon( aPoly)); const basegfx::B2DRange aPolygonRange(aPolygon.getB2DRange()); @@ -337,7 +337,7 @@ void XMLImageMapExport::ExportPolygon(const Reference<XPropertySet> & rPropertyS // export point sequence const OUString aPointString( - basegfx::tools::exportToSvgPoints( + basegfx::utils::exportToSvgPoints( aPolygon)); mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_POINTS, aPointString); diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 9aee2b5e8e9b..96f38e27c788 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -2189,13 +2189,13 @@ void XMLShapeExport::ImpExportPolygonShape( // get PolygonBezier uno::Any aAny( xPropSet->getPropertyValue("Geometry") ); const basegfx::B2DPolyPolygon aPolyPolygon( - basegfx::tools::UnoPolyPolygonBezierCoordsToB2DPolyPolygon(*o3tl::doAccess<drawing::PolyPolygonBezierCoords>(aAny))); + basegfx::utils::UnoPolyPolygonBezierCoordsToB2DPolyPolygon(*o3tl::doAccess<drawing::PolyPolygonBezierCoords>(aAny))); if(aPolyPolygon.count()) { // complex polygon shape, write as svg:d const OUString aPolygonString( - basegfx::tools::exportToSvgD( + basegfx::utils::exportToSvgD( aPolyPolygon, true, // bUseRelativeCoordinates false, // bDetectQuadraticBeziers: not used in old, but maybe activated now @@ -2210,13 +2210,13 @@ void XMLShapeExport::ImpExportPolygonShape( // get non-bezier polygon uno::Any aAny( xPropSet->getPropertyValue("Geometry") ); const basegfx::B2DPolyPolygon aPolyPolygon( - basegfx::tools::UnoPointSequenceSequenceToB2DPolyPolygon(*o3tl::doAccess<drawing::PointSequenceSequence>(aAny))); + basegfx::utils::UnoPointSequenceSequenceToB2DPolyPolygon(*o3tl::doAccess<drawing::PointSequenceSequence>(aAny))); if(!aPolyPolygon.areControlPointsUsed() && 1 == aPolyPolygon.count()) { // simple polygon shape, can be written as svg:points sequence const basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(0)); - const OUString aPointString(basegfx::tools::exportToSvgPoints(aPolygon)); + const OUString aPointString(basegfx::utils::exportToSvgPoints(aPolygon)); // write point array mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_POINTS, aPointString); @@ -2228,7 +2228,7 @@ void XMLShapeExport::ImpExportPolygonShape( { // complex polygon shape, write as svg:d const OUString aPolygonString( - basegfx::tools::exportToSvgD( + basegfx::utils::exportToSvgD( aPolyPolygon, true, // bUseRelativeCoordinates false, // bDetectQuadraticBeziers: not used in old, but maybe activated now @@ -2605,10 +2605,10 @@ void XMLShapeExport::ImpExportConnectorShape( if(pSourcePolyPolygon && pSourcePolyPolygon->Coordinates.getLength()) { const basegfx::B2DPolyPolygon aPolyPolygon( - basegfx::tools::UnoPolyPolygonBezierCoordsToB2DPolyPolygon( + basegfx::utils::UnoPolyPolygonBezierCoordsToB2DPolyPolygon( *pSourcePolyPolygon)); const OUString aPolygonString( - basegfx::tools::exportToSvgD( + basegfx::utils::exportToSvgD( aPolyPolygon, true, // bUseRelativeCoordinates false, // bDetectQuadraticBeziers: not used in old, but maybe activated now @@ -3567,13 +3567,13 @@ void XMLShapeExport::ImpExport3DShape( // convert to 3D PolyPolygon const basegfx::B3DPolyPolygon aPolyPolygon3D( - basegfx::tools::UnoPolyPolygonShape3DToB3DPolyPolygon( + basegfx::utils::UnoPolyPolygonShape3DToB3DPolyPolygon( aUnoPolyPolygon3D)); // convert to 2D tools::PolyPolygon using identity 3D transformation (just grep X and Y) const basegfx::B3DHomMatrix aB3DHomMatrixFor2DConversion; const basegfx::B2DPolyPolygon aPolyPolygon( - basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon( + basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon( aPolyPolygon3D, aB3DHomMatrixFor2DConversion)); @@ -3591,7 +3591,7 @@ void XMLShapeExport::ImpExport3DShape( // prepare svg:d string const OUString aPolygonString( - basegfx::tools::exportToSvgD( + basegfx::utils::exportToSvgD( aPolyPolygon, true, // bUseRelativeCoordinates false, // bDetectQuadraticBeziers TTTT: not used in old, but maybe activated now diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx index 1c2c9a7f5e27..084e4db1f2b4 100644 --- a/xmloff/source/draw/xexptran.cxx +++ b/xmloff/source/draw/xexptran.cxx @@ -32,7 +32,7 @@ #include <basegfx/numeric/ftools.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/unotools.hxx> +#include <basegfx/utils/unotools.hxx> using namespace ::com::sun::star; diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx index ebc182936ac4..51949d72ba98 100644 --- a/xmloff/source/draw/ximp3dobject.cxx +++ b/xmloff/source/draw/ximp3dobject.cxx @@ -305,16 +305,16 @@ void SdXML3DPolygonBasedShapeContext::StartElement(const uno::Reference< xml::sa // import 2d tools::PolyPolygon from svg:d basegfx::B2DPolyPolygon aPolyPolygon; - if(basegfx::tools::importFromSvgD(aPolyPolygon, maPoints, GetImport().needFixPositionAfterZ(), nullptr)) + if(basegfx::utils::importFromSvgD(aPolyPolygon, maPoints, GetImport().needFixPositionAfterZ(), nullptr)) { // convert to 3D PolyPolygon const basegfx::B3DPolyPolygon aB3DPolyPolygon( - basegfx::tools::createB3DPolyPolygonFromB2DPolyPolygon( + basegfx::utils::createB3DPolyPolygonFromB2DPolyPolygon( aPolyPolygon)); // convert to UNO API class PolyPolygonShape3D drawing::PolyPolygonShape3D aPolyPolygon3D; - basegfx::tools::B3DPolyPolygonToUnoPolyPolygonShape3D( + basegfx::utils::B3DPolyPolygonToUnoPolyPolygonShape3D( aB3DPolyPolygon, aPolyPolygon3D); diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index a267d57a56f6..eb2a523b5463 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -1296,7 +1296,7 @@ void SdXMLPolygonShapeContext::StartElement(const uno::Reference< xml::sax::XAtt basegfx::B2DPolygon aPolygon; - if(basegfx::tools::importFromSvgPoints(aPolygon, maPoints)) + if(basegfx::utils::importFromSvgPoints(aPolygon, maPoints)) { if(aPolygon.count()) { @@ -1310,13 +1310,13 @@ void SdXMLPolygonShapeContext::StartElement(const uno::Reference< xml::sax::XAtt if(!aSourceRange.equal(aTargetRange)) { aPolygon.transform( - basegfx::tools::createSourceRangeTargetRangeTransform( + basegfx::utils::createSourceRangeTargetRangeTransform( aSourceRange, aTargetRange)); } css::drawing::PointSequenceSequence aPointSequenceSequence; - basegfx::tools::B2DPolyPolygonToUnoPointSequenceSequence(basegfx::B2DPolyPolygon(aPolygon), aPointSequenceSequence); + basegfx::utils::B2DPolyPolygonToUnoPointSequenceSequence(basegfx::B2DPolyPolygon(aPolygon), aPointSequenceSequence); xPropSet->setPropertyValue("Geometry", Any(aPointSequenceSequence)); } } @@ -1383,7 +1383,7 @@ void SdXMLPathShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib basegfx::B2DPolyPolygon aPolyPolygon; - if(basegfx::tools::importFromSvgD(aPolyPolygon, maD, GetImport().needFixPositionAfterZ(), nullptr)) + if(basegfx::utils::importFromSvgD(aPolyPolygon, maD, GetImport().needFixPositionAfterZ(), nullptr)) { if(aPolyPolygon.count()) { @@ -1397,7 +1397,7 @@ void SdXMLPathShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib if(!aSourceRange.equal(aTargetRange)) { aPolyPolygon.transform( - basegfx::tools::createSourceRangeTargetRangeTransform( + basegfx::utils::createSourceRangeTargetRangeTransform( aSourceRange, aTargetRange)); } @@ -1451,7 +1451,7 @@ void SdXMLPathShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib { drawing::PolyPolygonBezierCoords aSourcePolyPolygon; - basegfx::tools::B2DPolyPolygonToUnoPolyPolygonBezierCoords( + basegfx::utils::B2DPolyPolygonToUnoPolyPolygonBezierCoords( aPolyPolygon, aSourcePolyPolygon); aAny <<= aSourcePolyPolygon; @@ -1460,7 +1460,7 @@ void SdXMLPathShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib { drawing::PointSequenceSequence aSourcePolyPolygon; - basegfx::tools::B2DPolyPolygonToUnoPointSequenceSequence( + basegfx::utils::B2DPolyPolygonToUnoPointSequenceSequence( aPolyPolygon, aSourcePolyPolygon); aAny <<= aSourcePolyPolygon; @@ -1864,13 +1864,13 @@ void SdXMLConnectorShapeContext::processAttribute( sal_uInt16 nPrefix, const OUS { basegfx::B2DPolyPolygon aPolyPolygon; - if(basegfx::tools::importFromSvgD(aPolyPolygon, rValue, GetImport().needFixPositionAfterZ(), nullptr)) + if(basegfx::utils::importFromSvgD(aPolyPolygon, rValue, GetImport().needFixPositionAfterZ(), nullptr)) { if(aPolyPolygon.count()) { drawing::PolyPolygonBezierCoords aSourcePolyPolygon; - basegfx::tools::B2DPolyPolygonToUnoPolyPolygonBezierCoords( + basegfx::utils::B2DPolyPolygonToUnoPolyPolygonBezierCoords( aPolyPolygon, aSourcePolyPolygon); maPath <<= aSourcePolyPolygon; diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx index d6eba2a483e5..580c5505efd9 100644 --- a/xmloff/source/style/MarkerStyle.cxx +++ b/xmloff/source/style/MarkerStyle.cxx @@ -98,7 +98,7 @@ void XMLMarkerStyleImport::importXML( { basegfx::B2DPolyPolygon aPolyPolygon; - if(basegfx::tools::importFromSvgD(aPolyPolygon, strPathData, rImport.needFixPositionAfterZ(), nullptr)) + if(basegfx::utils::importFromSvgD(aPolyPolygon, strPathData, rImport.needFixPositionAfterZ(), nullptr)) { if(aPolyPolygon.count()) { @@ -115,7 +115,7 @@ void XMLMarkerStyleImport::importXML( if(!aSourceRange.equal(aTargetRange)) { aPolyPolygon.transform( - basegfx::tools::createSourceRangeTargetRangeTransform( + basegfx::utils::createSourceRangeTargetRangeTransform( aSourceRange, aTargetRange)); } @@ -123,7 +123,7 @@ void XMLMarkerStyleImport::importXML( // always use PolyPolygonBezierCoords here drawing::PolyPolygonBezierCoords aSourcePolyPolygon; - basegfx::tools::B2DPolyPolygonToUnoPolyPolygonBezierCoords( + basegfx::utils::B2DPolyPolygonToUnoPolyPolygonBezierCoords( aPolyPolygon, aSourcePolyPolygon); rValue <<= aSourcePolyPolygon; @@ -173,7 +173,7 @@ void XMLMarkerStyleExport::exportXML( } const basegfx::B2DPolyPolygon aPolyPolygon( - basegfx::tools::UnoPolyPolygonBezierCoordsToB2DPolyPolygon( + basegfx::utils::UnoPolyPolygonBezierCoordsToB2DPolyPolygon( aBezier)); const basegfx::B2DRange aPolyPolygonRange(aPolyPolygon.getB2DRange()); @@ -189,7 +189,7 @@ void XMLMarkerStyleExport::exportXML( // Pathdata const OUString aPolygonString( - basegfx::tools::exportToSvgD( + basegfx::utils::exportToSvgD( aPolyPolygon, true, // bUseRelativeCoordinates false, // bDetectQuadraticBeziers: not used in old, but maybe activated now diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 9a843675371d..7e3131ba634b 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -271,13 +271,13 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl( if( bPath ) { - basegfx::tools::importFromSvgD(aPolyPolygon, sD, GetImport().needFixPositionAfterZ(), nullptr); + basegfx::utils::importFromSvgD(aPolyPolygon, sD, GetImport().needFixPositionAfterZ(), nullptr); } else { basegfx::B2DPolygon aPolygon; - if(basegfx::tools::importFromSvgPoints(aPolygon, sPoints)) + if(basegfx::utils::importFromSvgPoints(aPolygon, sPoints)) { aPolyPolygon = basegfx::B2DPolyPolygon(aPolygon); } @@ -295,13 +295,13 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl( if(!aSourceRange.equal(aTargetRange)) { aPolyPolygon.transform( - basegfx::tools::createSourceRangeTargetRangeTransform( + basegfx::utils::createSourceRangeTargetRangeTransform( aSourceRange, aTargetRange)); } css::drawing::PointSequenceSequence aPointSequenceSequence; - basegfx::tools::B2DPolyPolygonToUnoPointSequenceSequence(aPolyPolygon, aPointSequenceSequence); + basegfx::utils::B2DPolyPolygonToUnoPointSequenceSequence(aPolyPolygon, aPointSequenceSequence); xPropSet->setPropertyValue( sContourPolyPolygon, Any(aPointSequenceSequence) ); } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 481dfe23a3c2..0d6b36403358 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2927,7 +2927,7 @@ void XMLTextParagraphExport::exportContour( PointSequenceSequence aSourcePolyPolygon; rPropSet->getPropertyValue( sContourPolyPolygon ) >>= aSourcePolyPolygon; const basegfx::B2DPolyPolygon aPolyPolygon( - basegfx::tools::UnoPointSequenceSequenceToB2DPolyPolygon( + basegfx::utils::UnoPointSequenceSequenceToB2DPolyPolygon( aSourcePolyPolygon)); const sal_uInt32 nPolygonCount(aPolyPolygon.count()); @@ -2979,7 +2979,7 @@ void XMLTextParagraphExport::exportContour( { // simple polygon shape, can be written as svg:points sequence const OUString aPointString( - basegfx::tools::exportToSvgPoints( + basegfx::utils::exportToSvgPoints( aPolyPolygon.getB2DPolygon(0))); // write point array @@ -2990,7 +2990,7 @@ void XMLTextParagraphExport::exportContour( { // polypolygon, needs to be written as a svg:path sequence const OUString aPolygonString( - basegfx::tools::exportToSvgD( + basegfx::utils::exportToSvgD( aPolyPolygon, true, // bUseRelativeCoordinates false, // bDetectQuadraticBeziers: not used in old, but maybe activated now |