summaryrefslogtreecommitdiff
path: root/svgio
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-09-22 14:12:07 +0300
committerTor Lillqvist <tml@collabora.com>2017-09-26 14:18:41 +0200
commit8e7897588d7185ef1964e8120669c1de3d1ce734 (patch)
tree8f48598670a5dc22703371943c05789d60b9a07d /svgio
parent0b4135ec9945ea627318ecf5fccc4b7d0940ff0d (diff)
Rename the basegfx::tools namespace to basegfx::utils
Reduce potential confusion with the global tools namespace. Will hopefully make it possible to remove the annoying initial :: when referring to the global tools namespace. Unless we have even more tools subnamespaces somewhere. Thorsten said it was OK. Change-Id: Id088dfe8f4244cb79df9aa988995b31a1758c996 Reviewed-on: https://gerrit.libreoffice.org/42644 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'svgio')
-rw-r--r--svgio/inc/svgpathnode.hxx2
-rw-r--r--svgio/inc/svgstyleattributes.hxx4
-rw-r--r--svgio/source/svgreader/svgcirclenode.cxx2
-rw-r--r--svgio/source/svgreader/svgclippathnode.cxx8
-rw-r--r--svgio/source/svgreader/svgellipsenode.cxx2
-rw-r--r--svgio/source/svgreader/svgimagenode.cxx4
-rw-r--r--svgio/source/svgreader/svgmasknode.cxx4
-rw-r--r--svgio/source/svgreader/svgpathnode.cxx2
-rw-r--r--svgio/source/svgreader/svgpolynode.cxx2
-rw-r--r--svgio/source/svgreader/svgrectnode.cxx4
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx24
-rw-r--r--svgio/source/svgreader/svgsvgnode.cxx12
-rw-r--r--svgio/source/svgreader/svgtextpathnode.cxx4
-rw-r--r--svgio/source/svgreader/svgtools.cxx12
14 files changed, 43 insertions, 43 deletions
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);
}
}
}