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/SpecialActions.hpp | |
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/SpecialActions.hpp')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.hpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.hpp index 5e32f84413b..7e53303792b 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.hpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.hpp @@ -25,10 +25,12 @@ #include <memory> #include "BoundingBox.hpp" #include "Color.hpp" +#include "FilePath.hpp" #include "Matrix.hpp" +#include "SVGTree.hpp" +class XMLElement; class XMLNode; -class XMLElementNode; class SpecialActions { public: @@ -44,20 +46,20 @@ class SpecialActions { virtual const Matrix& getMatrix () const =0; virtual Matrix getPageTransformation () const {return Matrix(1);} virtual void setBgColor (const Color &color) =0; - virtual void appendToPage(std::unique_ptr<XMLNode> &&node) =0; - virtual void appendToDefs(std::unique_ptr<XMLNode> &&node) =0; - virtual void prependToPage(std::unique_ptr<XMLNode> &&node) =0; - virtual void pushContextElement (std::unique_ptr<XMLElementNode> &&node) =0; - virtual void popContextElement () =0; + virtual const SVGTree& svgTree () const =0; + SVGTree& svgTree () {return const_cast<SVGTree&>(const_cast<const SpecialActions*>(this)->svgTree());} virtual BoundingBox& bbox () =0; virtual BoundingBox& bbox (const std::string &name, bool reset=false) =0; virtual void embed (const BoundingBox &bbox) =0; virtual void embed (const DPair &p, double r=0) =0; virtual unsigned getCurrentPageNumber () const =0; - virtual std::string getSVGFilename (unsigned pageno) const =0; + virtual FilePath getSVGFilePath (unsigned pageno) const =0; virtual std::string getBBoxFormatString () const =0; virtual void progress (const char *id) {} virtual int getDVIStackDepth () const {return 0;} + virtual void lockOutput () {} + virtual void unlockOutput () {} + virtual bool outputLocked () const {return false;} static double PROGRESSBAR_DELAY; ///< progress bar doesn't appear before this time has elapsed (in sec) }; @@ -65,6 +67,7 @@ class SpecialActions { class EmptySpecialActions : public SpecialActions { public: + EmptySpecialActions () : _matrix(1) {_svg.newPage(1);} double getX () const override {return 0;} double getY () const override {return 0;} void setX (double x) override {} @@ -75,22 +78,19 @@ class EmptySpecialActions : public SpecialActions { Color getColor () const override {return Color::BLACK;} void setMatrix (const Matrix &m) override {} const Matrix& getMatrix () const override {return _matrix;} - void appendToPage(std::unique_ptr<XMLNode> &&node) override {} - void appendToDefs(std::unique_ptr<XMLNode> &&node) override {} - void prependToPage(std::unique_ptr<XMLNode> &&node) override {} - void pushContextElement (std::unique_ptr<XMLElementNode> &&node) override {} - void popContextElement () override {} + const SVGTree& svgTree () const override {return _svg;} BoundingBox& bbox () override {return _bbox;} BoundingBox& bbox (const std::string &name, bool reset=false) override {return _bbox;} void embed (const BoundingBox &bbox) override {} void embed (const DPair &p, double r=0) override {} unsigned getCurrentPageNumber() const override {return 0;} - std::string getSVGFilename (unsigned pageno) const override {return "";} + FilePath getSVGFilePath (unsigned pageno) const override {return FilePath();} std::string getBBoxFormatString () const override {return "";} private: BoundingBox _bbox; Matrix _matrix; + SVGTree _svg; }; #endif |