diff options
author | Norbert Preining <preining@logic.at> | 2019-11-22 02:37:37 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2019-11-22 02:37:37 +0000 |
commit | ed122ac9332b07846c8f32309a90ee20351b89c3 (patch) | |
tree | 1278ed5b65e4815140098fa574e662cd405e25ab /Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.cpp | |
parent | 4d251c1585708a66ebdec74139a6bf13049aa49c (diff) |
dvisvgm update to 2.8.1 (from Martin Gieseking)
git-svn-id: svn://tug.org/texlive/trunk@52883 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.cpp')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.cpp index 70fc6836e9c..3733053e4d0 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.cpp @@ -25,7 +25,7 @@ using namespace std; -void SVGCharHandler::setInitialContextNode (XMLElementNode *node) { +void SVGCharHandler::setInitialContextNode (XMLElement *node) { resetContextNode(); _initialContextNode = node; } @@ -34,9 +34,9 @@ void SVGCharHandler::setInitialContextNode (XMLElementNode *node) { /** Changes the context element. All following nodes will be appended to this node. * @param[in] node the new context node * @return bare pointer to the new context node or 0 if context hasn't changed */ -XMLElementNode* SVGCharHandler::pushContextNode (unique_ptr<XMLElementNode> &&node) { +XMLElement* SVGCharHandler::pushContextNode (unique_ptr<XMLElement> node) { if (node && (_contextNodeStack.empty() || node.get() != _contextNodeStack.top())) { - XMLElementNode *nodeptr = node.get(); + XMLElement *nodeptr = node.get(); contextNode()->append(std::move(node)); _contextNodeStack.push(nodeptr); return nodeptr; @@ -61,11 +61,11 @@ void SVGCharHandler::resetContextNode () { /** Creates and returns a new SVG text element. * @param[in] x current x coordinate * @param[in] y current y coordinate */ -unique_ptr<XMLElementNode> SVGCharTextHandler::createTextNode (double x, double y) const { +unique_ptr<XMLElement> SVGCharTextHandler::createTextNode (double x, double y) const { const Font *font = _font.get(); if (!font) return nullptr; - auto textNode = util::make_unique<XMLElementNode>("text"); + auto textNode = util::make_unique<XMLElement>("text"); if (_selectFontByClass) textNode->addAttribute("class", string("f")+XMLString(_fontnum)); else { @@ -77,7 +77,7 @@ unique_ptr<XMLElementNode> SVGCharTextHandler::createTextNode (double x, double if (_vertical) { textNode->addAttribute("writing-mode", "tb"); // align glyphs designed for horizontal layout properly - if (const PhysicalFont *pf = dynamic_cast<const PhysicalFont*>(font)) { + if (auto pf = dynamic_cast<const PhysicalFont*>(font)) { if (!pf->getMetrics()->verticalLayout()) { // alphabetic text designed for horizontal layout? x += pf->scaledAscent()/2.5; // move vertical baseline to the right by strikethrough offset textNode->addAttribute("glyph-orientation-vertical", 90); // ensure rotation @@ -87,6 +87,6 @@ unique_ptr<XMLElementNode> SVGCharTextHandler::createTextNode (double x, double textNode->addAttribute("x", x); textNode->addAttribute("y", y); if (!_matrix.get().isIdentity()) - textNode->addAttribute("transform", _matrix.get().getSVG()); + textNode->addAttribute("transform", _matrix.get().toSVG()); return textNode; } |