summaryrefslogtreecommitdiff
path: root/dviware/dvisvgm/src/PsSpecialHandler.hpp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-03-16 03:01:06 +0000
committerNorbert Preining <norbert@preining.info>2020-03-16 03:01:06 +0000
commitd50a41b6ab3d05fe5605a3a3b50ff68f61059296 (patch)
tree29468e087e9c19acf30b392dc705a54288d79137 /dviware/dvisvgm/src/PsSpecialHandler.hpp
parent87cddce361c3b477029d13b27bdaa57190b2d74b (diff)
CTAN sync 202003160301
Diffstat (limited to 'dviware/dvisvgm/src/PsSpecialHandler.hpp')
-rw-r--r--dviware/dvisvgm/src/PsSpecialHandler.hpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/dviware/dvisvgm/src/PsSpecialHandler.hpp b/dviware/dvisvgm/src/PsSpecialHandler.hpp
index 6251e20a47..9dcbc2d4ce 100644
--- a/dviware/dvisvgm/src/PsSpecialHandler.hpp
+++ b/dviware/dvisvgm/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