diff options
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.hpp')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.hpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.hpp index 6251e20a47f..9dcbc2d4ce2 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.hpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.hpp @@ -2,7 +2,7 @@ ** PsSpecialHandler.hpp ** ** ** ** This file is part of dvisvgm -- a fast DVI to SVG converter ** -** Copyright (C) 2005-2019 Martin Gieseking <martin.gieseking@uos.de> ** +** Copyright (C) 2005-2020 Martin Gieseking <martin.gieseking@uos.de> ** ** ** ** This program is free software; you can redistribute it and/or ** ** modify it under the terms of the GNU General Public License as ** @@ -95,6 +95,7 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions { static bool SHADING_SEGMENT_OVERLAP; static int SHADING_SEGMENT_SIZE; static double SHADING_SIMPLIFY_DELTA; + static std::string BITMAP_FORMAT; protected: void initialize (); @@ -104,6 +105,7 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions { void processHeaderFile (const char *fname); void imgfile (FileType type, const std::string &fname, const std::map<std::string,std::string> &attr); std::unique_ptr<XMLElement> createImageNode (FileType type, const std::string &fname, int pageno, BoundingBox bbox, bool clip); + void dviBeginPage (unsigned int pageno, SpecialActions &actions) override; void dviEndPage (unsigned pageno, SpecialActions &actions) override; void clip (Path path, bool evenodd); void processSequentialPatchMesh (int shadingTypeID, ColorSpace cspace, VectorIterator<double> &it); @@ -125,6 +127,7 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions { void grestore (std::vector<double> &p) override; void grestoreall (std::vector<double> &p) override; void gsave (std::vector<double> &p) override; + void image (std::vector<double> &p) override; void initclip (std::vector<double> &p) override; void lineto (std::vector<double> &p) override; void makepattern (std::vector<double> &p) override; @@ -136,6 +139,7 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions { void save (std::vector<double> &p) override; void scale (std::vector<double> &p) override; void setblendmode (std::vector<double> &p) override {_blendmode = int(p[0]);} + void setcolorspace (std::vector<double> &p) override {_patternEnabled = bool(p[0]);} void setcmykcolor (std::vector<double> &cmyk) override; void setdash (std::vector<double> &p) override; void setgray (std::vector<double> &p) override; @@ -158,11 +162,11 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions { private: PSInterpreter _psi; - SpecialActions *_actions; + SpecialActions *_actions=nullptr; PSPreviewFilter _previewFilter; ///< filter to extract information generated by the preview package PsSection _psSection=PS_NONE; ///< current section processed (nothing yet, headers, or body specials) - XMLElement *_xmlnode; ///< if != 0, created SVG elements are appended to this node - XMLElement *_savenode; ///< pointer to temporaryly store _xmlnode + XMLElement *_xmlnode=nullptr; ///< if != 0, created SVG elements are appended to this node + XMLElement *_savenode=nullptr; ///< pointer to temporaryly store _xmlnode std::string _headerCode; ///< collected literal PS header code Path _path; DPair _currentpoint; ///< current PS position in bp units @@ -181,6 +185,7 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions { ClippingStack _clipStack; std::map<int, std::unique_ptr<PSPattern>> _patterns; PSTilingPattern *_pattern; ///< current pattern + bool _patternEnabled; ///< true if active color space is a pattern }; #endif |