summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvisvgm
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-01-07 10:19:57 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-01-07 10:19:57 +0000
commit5b37fbdc32dc5d4eaaa8ec78a9d86b6670cbbd08 (patch)
tree7105a123421fb2988ead8f1510da124cf43945c5 /Build/source/texk/dvisvgm
parent2ba177dd1229f06f5ba1112df7dcab59a1b16d1a (diff)
dvisvgm 1.9
git-svn-id: svn://tug.org/texlive/trunk@35980 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvisvgm')
-rw-r--r--Build/source/texk/dvisvgm/ChangeLog6
-rw-r--r--Build/source/texk/dvisvgm/Makefile.am5
-rw-r--r--Build/source/texk/dvisvgm/Makefile.in21
-rwxr-xr-xBuild/source/texk/dvisvgm/configure26
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.8.1/doc/README16
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Color.cpp264
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Color.h67
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/psdefs.cpp87
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9-PATCHES/ChangeLog (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1-PATCHES/ChangeLog)4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9-PATCHES/TL-Changes (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1-PATCHES/TL-Changes)5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/AUTHORS (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/AUTHORS)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/COPYING (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/COPYING)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/ChangeLog (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/ChangeLog)166
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/INSTALL (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/INSTALL)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/LGPL-2.1.txt (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/LGPL-2.1.txt)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/Makefile.am (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/Makefile.am)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/NEWS (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/NEWS)16
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/README (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/README)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/clipper/Makefile.am (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/clipper/Makefile.am)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/clipper/clipper.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/clipper/clipper.cpp)49
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/clipper/clipper.hpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/clipper/clipper.hpp)867
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/config.h.in (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/config.h.in)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/configure.ac (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/configure.ac)4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/doc/Makefile.am (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/doc/Makefile.am)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/doc/dvisvgm.1 (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/doc/dvisvgm.1)55
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/doc/dvisvgm.txt.in (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/doc/dvisvgm.txt.in)76
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/BasicDVIReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BasicDVIReader.cpp)74
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/BasicDVIReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BasicDVIReader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Bezier.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Bezier.cpp)94
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Bezier.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Bezier.h)10
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/BgColorSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BgColorSpecialHandler.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/BgColorSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BgColorSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Bitmap.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Bitmap.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Bitmap.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Bitmap.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/BoundingBox.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BoundingBox.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/BoundingBox.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BoundingBox.h)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMap.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMap.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMap.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMap.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMapManager.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMapManager.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMapManager.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMapManager.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMapReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMapReader.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMapReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMapReader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CRC32.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CRC32.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CRC32.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CRC32.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Calculator.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Calculator.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Calculator.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Calculator.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CharMapID.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CharMapID.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CharMapID.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CharMapID.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Character.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Character.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CmdLineParserBase.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CmdLineParserBase.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CmdLineParserBase.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CmdLineParserBase.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Color.cpp509
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Color.h95
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/ColorSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ColorSpecialHandler.cpp)30
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/ColorSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ColorSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CommandLine.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CommandLine.cpp)68
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/CommandLine.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CommandLine.h)40
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/DLLoader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DLLoader.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/DLLoader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DLLoader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIActions.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIActions.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIReader.cpp)10
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIReader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIToSVG.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIToSVG.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIToSVG.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIToSVG.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIToSVGActions.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIToSVGActions.cpp)3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIToSVGActions.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIToSVGActions.h)3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/DependencyGraph.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DependencyGraph.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Directory.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Directory.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Directory.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Directory.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/DvisvgmSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DvisvgmSpecialHandler.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/DvisvgmSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DvisvgmSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/EPSFile.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EPSFile.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/EPSFile.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EPSFile.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/EPSToSVG.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EPSToSVG.cpp)30
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/EPSToSVG.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EPSToSVG.h)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/EmSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EmSpecialHandler.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/EmSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EmSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/EncFile.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EncFile.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/EncFile.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EncFile.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FileFinder.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FileFinder.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FileFinder.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FileFinder.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FilePath.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FilePath.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FilePath.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FilePath.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FileSystem.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FileSystem.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FileSystem.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FileSystem.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Font.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Font.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Font.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Font.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontCache.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontCache.cpp)2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontCache.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontCache.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontEncoding.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontEncoding.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontEncoding.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontEncoding.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontEngine.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontEngine.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontEngine.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontEngine.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontManager.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontManager.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontManager.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontManager.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontMap.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontMap.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontMap.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontMap.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontMetrics.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontMetrics.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontMetrics.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontMetrics.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontStyle.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontStyle.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFGlyphTracer.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFGlyphTracer.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFGlyphTracer.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFGlyphTracer.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFReader.cpp)10
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFReader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFTracer.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFTracer.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFTracer.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFTracer.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Ghostscript.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Ghostscript.cpp)50
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Ghostscript.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Ghostscript.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Glyph.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Glyph.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/GlyphTracerMessages.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GlyphTracerMessages.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/GraphicPath.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GraphicPath.h)26
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/HtmlSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/HtmlSpecialHandler.cpp)4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/HtmlSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/HtmlSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/InputBuffer.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/InputBuffer.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/InputBuffer.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/InputBuffer.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/InputReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/InputReader.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/InputReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/InputReader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/JFM.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/JFM.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/JFM.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/JFM.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Length.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Length.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Length.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Length.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Makefile.am (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Makefile.am)12
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/MapLine.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MapLine.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/MapLine.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MapLine.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Matrix.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Matrix.cpp)4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Matrix.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Matrix.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Message.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Message.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Message.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Message.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/MessageException.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MessageException.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/MetafontWrapper.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MetafontWrapper.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/MetafontWrapper.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MetafontWrapper.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/MiKTeXCom.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MiKTeXCom.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/MiKTeXCom.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MiKTeXCom.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/NoPsSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/NoPsSpecialHandler.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/NoPsSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/NoPsSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/NumericRanges.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/NumericRanges.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSFilter.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSFilter.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSInterpreter.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSInterpreter.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSInterpreter.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSInterpreter.h)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSPattern.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSPattern.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSPattern.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSPattern.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSPreviewFilter.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSPreviewFilter.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSPreviewFilter.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSPreviewFilter.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PageRanges.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PageRanges.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PageRanges.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PageRanges.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PageSize.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PageSize.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PageSize.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PageSize.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Pair.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Pair.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PathClipper.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PathClipper.cpp)9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PathClipper.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PathClipper.h)7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PdfSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PdfSpecialHandler.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PdfSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PdfSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PreScanDVIReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PreScanDVIReader.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PreScanDVIReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PreScanDVIReader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Process.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Process.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Process.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Process.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PsSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PsSpecialHandler.cpp)329
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/PsSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PsSpecialHandler.h)11
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/RangeMap.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/RangeMap.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/RangeMap.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/RangeMap.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/SVGOutputBase.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SVGOutputBase.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/SVGTree.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SVGTree.cpp)9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/SVGTree.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SVGTree.h)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/ShadingPatch.cpp64
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/ShadingPatch.h72
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/SignalHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SignalHandler.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/SignalHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SignalHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/SpecialActions.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SpecialActions.h)2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/SpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/SpecialManager.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SpecialManager.cpp)2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/SpecialManager.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SpecialManager.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/StreamReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/StreamReader.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/StreamReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/StreamReader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/StreamWriter.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/StreamWriter.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/StreamWriter.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/StreamWriter.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Subfont.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Subfont.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Subfont.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Subfont.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/System.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/System.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/System.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/System.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/TFM.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/TFM.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/TFM.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/TFM.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/TensorProductPatch.cpp542
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/TensorProductPatch.h94
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Terminal.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Terminal.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Terminal.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Terminal.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/ToUnicodeMap.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ToUnicodeMap.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/ToUnicodeMap.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ToUnicodeMap.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/TpicSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/TpicSpecialHandler.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/TpicSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/TpicSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/TriangularPatch.cpp207
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/TriangularPatch.h63
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Unicode.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Unicode.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/Unicode.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Unicode.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/VFActions.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/VFActions.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/VFReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/VFReader.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/VFReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/VFReader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/VectorIterator.h116
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/VectorStream.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/VectorStream.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLDocument.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLDocument.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLDocument.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLDocument.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLNode.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLNode.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLNode.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLNode.h)2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLString.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLString.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLString.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLString.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/dvisvgm.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/dvisvgm.cpp)17
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/gzstream.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/gzstream.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/gzstream.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/gzstream.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/iapi.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/iapi.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/ierrors.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ierrors.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/macros.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/macros.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/options.dtd (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/options.dtd)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/options.xml (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/options.xml)16
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/psdefs.cpp95
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.9/src/types.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/types.h)0
-rw-r--r--Build/source/texk/dvisvgm/version.ac4
215 files changed, 3364 insertions, 1111 deletions
diff --git a/Build/source/texk/dvisvgm/ChangeLog b/Build/source/texk/dvisvgm/ChangeLog
index 8b33e329999..1bd1aa7f523 100644
--- a/Build/source/texk/dvisvgm/ChangeLog
+++ b/Build/source/texk/dvisvgm/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Imported release 1.9.
+ * version.ac: Adapted.
+ * Makefile.am: Adjusted.
+
2014-12-02 Peter Breitenlohner <peb@mppmu.mpg.de>
* configure.ac: Drop useless KPSE_COMPILER_VISIBILITY.
diff --git a/Build/source/texk/dvisvgm/Makefile.am b/Build/source/texk/dvisvgm/Makefile.am
index 8d52a750574..83579e54aab 100644
--- a/Build/source/texk/dvisvgm/Makefile.am
+++ b/Build/source/texk/dvisvgm/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am for the TeX Live subdirectory texk/dvisvgm/
##
-## Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org>
+## Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
##
#************************************************************************
@@ -112,6 +112,7 @@ nodist_libdvisvgm_a_SOURCES = \
@DVISVGM_TREE@/src/psdefs.cpp \
@DVISVGM_TREE@/src/RangeMap.cpp \
@DVISVGM_TREE@/src/SVGTree.cpp \
+ @DVISVGM_TREE@/src/ShadingPatch.cpp \
@DVISVGM_TREE@/src/SignalHandler.cpp \
@DVISVGM_TREE@/src/SpecialManager.cpp \
@DVISVGM_TREE@/src/StreamReader.cpp \
@@ -119,9 +120,11 @@ nodist_libdvisvgm_a_SOURCES = \
@DVISVGM_TREE@/src/Subfont.cpp \
@DVISVGM_TREE@/src/System.cpp \
@DVISVGM_TREE@/src/TFM.cpp \
+ @DVISVGM_TREE@/src/TensorProductPatch.cpp \
@DVISVGM_TREE@/src/Terminal.cpp \
@DVISVGM_TREE@/src/ToUnicodeMap.cpp \
@DVISVGM_TREE@/src/TpicSpecialHandler.cpp \
+ @DVISVGM_TREE@/src/TriangularPatch.cpp \
@DVISVGM_TREE@/src/Unicode.cpp \
@DVISVGM_TREE@/src/VFReader.cpp \
@DVISVGM_TREE@/src/XMLDocument.cpp \
diff --git a/Build/source/texk/dvisvgm/Makefile.in b/Build/source/texk/dvisvgm/Makefile.in
index 23eedf95cf6..e8d0efb94d3 100644
--- a/Build/source/texk/dvisvgm/Makefile.in
+++ b/Build/source/texk/dvisvgm/Makefile.in
@@ -200,6 +200,7 @@ nodist_libdvisvgm_a_OBJECTS = \
@DVISVGM_TREE@/src/psdefs.$(OBJEXT) \
@DVISVGM_TREE@/src/RangeMap.$(OBJEXT) \
@DVISVGM_TREE@/src/SVGTree.$(OBJEXT) \
+ @DVISVGM_TREE@/src/ShadingPatch.$(OBJEXT) \
@DVISVGM_TREE@/src/SignalHandler.$(OBJEXT) \
@DVISVGM_TREE@/src/SpecialManager.$(OBJEXT) \
@DVISVGM_TREE@/src/StreamReader.$(OBJEXT) \
@@ -207,9 +208,11 @@ nodist_libdvisvgm_a_OBJECTS = \
@DVISVGM_TREE@/src/Subfont.$(OBJEXT) \
@DVISVGM_TREE@/src/System.$(OBJEXT) \
@DVISVGM_TREE@/src/TFM.$(OBJEXT) \
+ @DVISVGM_TREE@/src/TensorProductPatch.$(OBJEXT) \
@DVISVGM_TREE@/src/Terminal.$(OBJEXT) \
@DVISVGM_TREE@/src/ToUnicodeMap.$(OBJEXT) \
@DVISVGM_TREE@/src/TpicSpecialHandler.$(OBJEXT) \
+ @DVISVGM_TREE@/src/TriangularPatch.$(OBJEXT) \
@DVISVGM_TREE@/src/Unicode.$(OBJEXT) \
@DVISVGM_TREE@/src/VFReader.$(OBJEXT) \
@DVISVGM_TREE@/src/XMLDocument.$(OBJEXT) \
@@ -751,14 +754,18 @@ nodist_libdvisvgm_a_SOURCES = @DVISVGM_TREE@/src/BasicDVIReader.cpp \
@DVISVGM_TREE@/src/PsSpecialHandler.cpp \
@DVISVGM_TREE@/src/psdefs.cpp @DVISVGM_TREE@/src/RangeMap.cpp \
@DVISVGM_TREE@/src/SVGTree.cpp \
+ @DVISVGM_TREE@/src/ShadingPatch.cpp \
@DVISVGM_TREE@/src/SignalHandler.cpp \
@DVISVGM_TREE@/src/SpecialManager.cpp \
@DVISVGM_TREE@/src/StreamReader.cpp \
@DVISVGM_TREE@/src/StreamWriter.cpp \
@DVISVGM_TREE@/src/Subfont.cpp @DVISVGM_TREE@/src/System.cpp \
- @DVISVGM_TREE@/src/TFM.cpp @DVISVGM_TREE@/src/Terminal.cpp \
+ @DVISVGM_TREE@/src/TFM.cpp \
+ @DVISVGM_TREE@/src/TensorProductPatch.cpp \
+ @DVISVGM_TREE@/src/Terminal.cpp \
@DVISVGM_TREE@/src/ToUnicodeMap.cpp \
@DVISVGM_TREE@/src/TpicSpecialHandler.cpp \
+ @DVISVGM_TREE@/src/TriangularPatch.cpp \
@DVISVGM_TREE@/src/Unicode.cpp @DVISVGM_TREE@/src/VFReader.cpp \
@DVISVGM_TREE@/src/XMLDocument.cpp \
@DVISVGM_TREE@/src/XMLNode.cpp \
@@ -1025,6 +1032,9 @@ libclipper.a: $(libclipper_a_OBJECTS) $(libclipper_a_DEPENDENCIES) $(EXTRA_libcl
@DVISVGM_TREE@/src/SVGTree.$(OBJEXT): \
@DVISVGM_TREE@/src/$(am__dirstamp) \
@DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp)
+@DVISVGM_TREE@/src/ShadingPatch.$(OBJEXT): \
+ @DVISVGM_TREE@/src/$(am__dirstamp) \
+ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@DVISVGM_TREE@/src/SignalHandler.$(OBJEXT): \
@DVISVGM_TREE@/src/$(am__dirstamp) \
@DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@@ -1045,6 +1055,9 @@ libclipper.a: $(libclipper_a_OBJECTS) $(libclipper_a_DEPENDENCIES) $(EXTRA_libcl
@DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@DVISVGM_TREE@/src/TFM.$(OBJEXT): @DVISVGM_TREE@/src/$(am__dirstamp) \
@DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp)
+@DVISVGM_TREE@/src/TensorProductPatch.$(OBJEXT): \
+ @DVISVGM_TREE@/src/$(am__dirstamp) \
+ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@DVISVGM_TREE@/src/Terminal.$(OBJEXT): \
@DVISVGM_TREE@/src/$(am__dirstamp) \
@DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@@ -1054,6 +1067,9 @@ libclipper.a: $(libclipper_a_OBJECTS) $(libclipper_a_DEPENDENCIES) $(EXTRA_libcl
@DVISVGM_TREE@/src/TpicSpecialHandler.$(OBJEXT): \
@DVISVGM_TREE@/src/$(am__dirstamp) \
@DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp)
+@DVISVGM_TREE@/src/TriangularPatch.$(OBJEXT): \
+ @DVISVGM_TREE@/src/$(am__dirstamp) \
+ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@DVISVGM_TREE@/src/Unicode.$(OBJEXT): \
@DVISVGM_TREE@/src/$(am__dirstamp) \
@DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@@ -1207,6 +1223,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/PsSpecialHandler.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/RangeMap.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/SVGTree.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/ShadingPatch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/SignalHandler.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/SpecialManager.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/StreamReader.Po@am__quote@
@@ -1214,9 +1231,11 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/Subfont.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/System.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/TFM.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/TensorProductPatch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/Terminal.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/ToUnicodeMap.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/TpicSpecialHandler.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/TriangularPatch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/Unicode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/VFReader.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/XMLDocument.Po@am__quote@
diff --git a/Build/source/texk/dvisvgm/configure b/Build/source/texk/dvisvgm/configure
index a11816603b4..b3bd3b47bc1 100755
--- a/Build/source/texk/dvisvgm/configure
+++ b/Build/source/texk/dvisvgm/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dvisvgm (TeX Live) 1.8.1.
+# Generated by GNU Autoconf 2.69 for dvisvgm (TeX Live) 1.9.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -590,12 +590,12 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='dvisvgm (TeX Live)'
PACKAGE_TARNAME='dvisvgm--tex-live-'
-PACKAGE_VERSION='1.8.1'
-PACKAGE_STRING='dvisvgm (TeX Live) 1.8.1'
+PACKAGE_VERSION='1.9'
+PACKAGE_STRING='dvisvgm (TeX Live) 1.9'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
-ac_unique_file="dvisvgm-1.8.1/src/dvisvgm.cpp"
+ac_unique_file="dvisvgm-1.9/src/dvisvgm.cpp"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -1371,7 +1371,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures dvisvgm (TeX Live) 1.8.1 to adapt to many kinds of systems.
+\`configure' configures dvisvgm (TeX Live) 1.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1442,7 +1442,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dvisvgm (TeX Live) 1.8.1:";;
+ short | recursive ) echo "Configuration of dvisvgm (TeX Live) 1.9:";;
esac
cat <<\_ACEOF
@@ -1583,7 +1583,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-dvisvgm (TeX Live) configure 1.8.1
+dvisvgm (TeX Live) configure 1.9
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2405,7 +2405,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by dvisvgm (TeX Live) $as_me 1.8.1, which was
+It was created by dvisvgm (TeX Live) $as_me 1.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -8041,7 +8041,7 @@ fi
# Define the identity of the package.
PACKAGE='dvisvgm--tex-live-'
- VERSION='1.8.1'
+ VERSION='1.9'
cat >>confdefs.h <<_ACEOF
@@ -18227,7 +18227,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-dvisvgm (TeX Live) config.lt 1.8.1
+dvisvgm (TeX Live) config.lt 1.9
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -19890,7 +19890,7 @@ $as_echo "#define KPSE_CXX_UNSAFE 1" >>confdefs.h
fi
-DVISVGM_TREE=dvisvgm-1.8.1
+DVISVGM_TREE=dvisvgm-1.9
ac_config_files="$ac_config_files Makefile"
@@ -20442,7 +20442,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by dvisvgm (TeX Live) $as_me 1.8.1, which was
+This file was extended by dvisvgm (TeX Live) $as_me 1.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20508,7 +20508,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-dvisvgm (TeX Live) config.status 1.8.1
+dvisvgm (TeX Live) config.status 1.9
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/doc/README b/Build/source/texk/dvisvgm/dvisvgm-1.8.1/doc/README
deleted file mode 100644
index 4ceb62ce402..00000000000
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/doc/README
+++ /dev/null
@@ -1,16 +0,0 @@
-dvisvgm-1.7 (2014-06-18)
-- all DVI files are pre-processed now to allow the implementation of
- advanced features that rely on data not available on the pages being
- converted
-- added support for internal hyperref links across pages
-- added \special command dvisvgm:rawdef to insert raw SVG fragments to
- the <defs> section
-- added the new \special commands dvisvgm:rawset, dvisvgm:endrawset, and
- dvisvgm:rawput to assign and access a sequence of SVG fragments via an
- identifier (LP feature request #1215878)
-- removed redundant <missing-glyph> elements from SVG files
-- fixed support of external fonts containing characters not mapped by the
- embedded unicode tables (LP bug #1276689)
-- fixed incorrect extent values shown in conjunction with the preview package
-- many refactorings and code improvements
-
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Color.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Color.cpp
deleted file mode 100644
index 94514c292a7..00000000000
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Color.cpp
+++ /dev/null
@@ -1,264 +0,0 @@
-/*************************************************************************
-** Color.cpp **
-** **
-** This file is part of dvisvgm -- the DVI to SVG converter **
-** Copyright (C) 2005-2014 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 **
-** published by the Free Software Foundation; either version 3 of **
-** the License, or (at your option) any later version. **
-** **
-** This program is distributed in the hope that it will be useful, but **
-** WITHOUT ANY WARRANTY; without even the implied warranty of **
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
-** GNU General Public License for more details. **
-** **
-** You should have received a copy of the GNU General Public License **
-** along with this program; if not, see <http://www.gnu.org/licenses/>. **
-*************************************************************************/
-
-#include <config.h>
-#include <algorithm>
-#include <cctype>
-#include <cmath>
-#include <cstdlib>
-#include <cstring>
-#include <iomanip>
-#include <sstream>
-#include "Color.h"
-
-using namespace std;
-
-
-const Color Color::BLACK(UInt32(0));
-const Color Color::WHITE(UInt8(255), UInt8(255), UInt8(255));
-const Color Color::TRANSPARENT(UInt32(0xff000000));
-
-
-static inline UInt8 float_to_byte (float v) {
- v = max(0.0f, min(1.0f, v));
- return UInt8(floor(255*v+0.5));
-}
-
-
-static void tolower (string &str) {
- for (size_t i=0; i < str.length(); i++)
- str[i] = tolower(str[i]);
-}
-
-
-Color::Color (const char *name) {
- if (!set(name, false))
- setGray(UInt8(0));
-}
-
-
-Color::Color (const string &name) {
- if (!set(name, false))
- setGray(UInt8(0));
-}
-
-
-void Color::set (float r, float g, float b) {
- set(float_to_byte(r), float_to_byte(g), float_to_byte(b));
-}
-
-
-bool Color::set (string name, bool case_sensitive) {
- if (name[0] == '#') {
- char *p=0;
- _rgb = UInt32(strtol(name.c_str()+1, &p, 16));
- while (isspace(*p))
- p++;
- return (*p == 0 && _rgb <= 0xFFFFFF);
- }
- // converted color constants from color.pro
- static const struct ColorConstant {
- const char *name;
- const UInt32 rgb;
- }
- constants[] = {
- {"Apricot", 0xFFAD7A},
- {"Aquamarine", 0x2DFFB2},
- {"Bittersweet", 0xC10200},
- {"Black", 0x000000},
- {"Blue", 0x0000FF},
- {"BlueGreen", 0x26FFAA},
- {"BlueViolet", 0x190CF4},
- {"BrickRed", 0xB70000},
- {"Brown", 0x660000},
- {"BurntOrange", 0xFF7C00},
- {"CadetBlue", 0x606DC4},
- {"CarnationPink", 0xFF5EFF},
- {"Cerulean", 0x0FE2FF},
- {"CornflowerBlue", 0x59DDFF},
- {"Cyan", 0x00FFFF},
- {"Dandelion", 0xFFB528},
- {"DarkOrchid", 0x9932CC},
- {"Emerald", 0x00FF7F},
- {"ForestGreen", 0x00E000},
- {"Fuchsia", 0x7202EA},
- {"Goldenrod", 0xFFE528},
- {"Gray", 0x7F7F7F},
- {"Green", 0x00FF00},
- {"GreenYellow", 0xD8FF4F},
- {"JungleGreen", 0x02FF7A},
- {"Lavender", 0xFF84FF},
- {"LimeGreen", 0x7FFF00},
- {"Magenta", 0xFF00FF},
- {"Mahogany", 0xA50000},
- {"Maroon", 0xAD0000},
- {"Melon", 0xFF897F},
- {"MidnightBlue", 0x007091},
- {"Mulberry", 0xA314F9},
- {"NavyBlue", 0x0F75FF},
- {"OliveGreen", 0x009900},
- {"Orange", 0xFF6321},
- {"OrangeRed", 0xFF007F},
- {"Orchid", 0xAD5BFF},
- {"Peach", 0xFF7F4C},
- {"Periwinkle", 0x6D72FF},
- {"PineGreen", 0x00BF28},
- {"Plum", 0x7F00FF},
- {"ProcessBlue", 0x0AFFFF},
- {"Purple", 0x8C23FF},
- {"RawSienna", 0x8C0000},
- {"Red", 0xFF0000},
- {"RedOrange", 0xFF3A21},
- {"RedViolet", 0x9600A8},
- {"Rhodamine", 0xFF2DFF},
- {"RoyalBlue", 0x007FFF},
- {"RoyalPurple", 0x3F19FF},
- {"RubineRed", 0xFF00DD},
- {"Salmon", 0xFF779E},
- {"SeaGreen", 0x4FFF7F},
- {"Sepia", 0x4C0000},
- {"SkyBlue", 0x60FFE0},
- {"SpringGreen", 0xBCFF3D},
- {"Tan", 0xDB9370},
- {"TealBlue", 0x1EF9A3},
- {"Thistle", 0xE068FF},
- {"Turquoise", 0x26FFCC},
- {"Violet", 0x351EFF},
- {"VioletRed", 0xFF30FF},
- {"White", 0xFFFFFF},
- {"WildStrawberry", 0xFF0A9B},
- {"Yellow", 0xFFFF00},
- {"YellowGreen", 0x8EFF42},
- {"YellowOrange", 0xFF9300},
- };
- if (!case_sensitive) {
- tolower(name);
- for (size_t i=0; i < sizeof(constants)/sizeof(ColorConstant); i++) {
- string cmpname = constants[i].name;
- tolower(cmpname);
- if (name == cmpname) {
- _rgb = constants[i].rgb;
- return true;
- }
- }
- return false;
- }
-
- // binary search
- int first=0, last=sizeof(constants)/sizeof(ColorConstant)-1;
- while (first <= last) {
- int mid = first+(last-first)/2;
- int cmp = strcmp(constants[mid].name, name.c_str());
- if (cmp > 0)
- last = mid-1;
- else if (cmp < 0)
- first = mid+1;
- else {
- _rgb = constants[mid].rgb;
- return true;
- }
- }
- return false;
-}
-
-
-void Color::setHSB (float h, float s, float b) {
- vector<float> hsb(3), rgb(3);
- hsb[0] = h;
- hsb[1] = s;
- hsb[2] = b;
- HSB2RGB(hsb, rgb);
- set(rgb[0], rgb[1], rgb[2]);
-}
-
-
-void Color::setCMYK (float c, float m, float y, float k) {
- vector<float> cmyk(4), rgb(3);
- cmyk[0] = c;
- cmyk[1] = m;
- cmyk[2] = y;
- cmyk[3] = k;
- CMYK2RGB(cmyk, rgb);
- set(rgb[0], rgb[1], rgb[2]);
-}
-
-
-void Color::operator *= (double c) {
- UInt32 rgb=0;
- for (int i=0; i < 3; i++) {
- rgb |= UInt32(floor((_rgb & 0xff)*c+0.5)) << (8*i);
- _rgb >>= 8;
- }
- _rgb = rgb;
-}
-
-
-string Color::rgbString () const {
- ostringstream oss;
- oss << '#';
- for (int i=2; i >= 0; i--) {
- oss << setbase(16) << setfill('0') << setw(2)
- << (((_rgb >> (8*i)) & 0xff));
- }
- return oss.str();
-}
-
-
-/** Approximates a CMYK color by an RGB triple. The component values
- * are expected to be normalized, i.e. 0 <= cmyk[i],rgb[j] <= 1.
- * @param[in] cmyk color in CMYK space
- * @param[out] rgb RGB approximation */
-void Color::CMYK2RGB (const vector<float> &cmyk, vector<float> &rgb) {
- for (int i=0; i < 3; i++)
- rgb[i] = 1.0f-max(0.0f, min(1.0f, cmyk[i]+cmyk[3]));
-}
-
-
-/** Converts a color given in HSB coordinates to RGB.
- * @param[in] hsb color in HSB space
- * @param[out] rgb color in RGB space */
-void Color::HSB2RGB (const vector<float> &hsb, vector<float> &rgb) {
- if (hsb[1] == 0)
- rgb[0] = rgb[1] = rgb[2] = hsb[2];
- else {
- float h = hsb[0]-floor(hsb[0]);
- int i = int(6*h);
- float f = float(6.0*h-i);
- float p = hsb[2]*(1-hsb[1]);
- float q = hsb[2]*(1-hsb[1]*f);
- float t = hsb[2]*(1-hsb[1]*(1-f));
- switch (i) {
- case 0 : rgb[0]=hsb[2]; rgb[1]=t; rgb[2]=p; break;
- case 1 : rgb[0]=q; rgb[1]=hsb[2]; rgb[2]=p; break;
- case 2 : rgb[0]=p; rgb[1]=hsb[2]; rgb[2]=t; break;
- case 3 : rgb[0]=p; rgb[1]=q; rgb[2]=hsb[2]; break;
- case 4 : rgb[0]=t; rgb[1]=p; rgb[2]=hsb[2]; break;
- case 5 : rgb[0]=hsb[2]; rgb[1]=p; rgb[2]=q; break;
- default: ; // prevent compiler warning
- }
- }
-}
-
-
-void Color::getRGB (float &r, float &g, float &b) const {
- r = float(((_rgb >> 16) & 255) / 255.0);
- g = float(((_rgb >> 8) & 255) / 255.0);
- b = float((_rgb & 255) / 255.0);
-}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Color.h b/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Color.h
deleted file mode 100644
index 99d847560e0..00000000000
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Color.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*************************************************************************
-** Color.h **
-** **
-** This file is part of dvisvgm -- the DVI to SVG converter **
-** Copyright (C) 2005-2014 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 **
-** published by the Free Software Foundation; either version 3 of **
-** the License, or (at your option) any later version. **
-** **
-** This program is distributed in the hope that it will be useful, but **
-** WITHOUT ANY WARRANTY; without even the implied warranty of **
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
-** GNU General Public License for more details. **
-** **
-** You should have received a copy of the GNU General Public License **
-** along with this program; if not, see <http://www.gnu.org/licenses/>. **
-*************************************************************************/
-
-#ifndef DVISVGM_COLOR_H
-#define DVISVGM_COLOR_H
-
-#include <string>
-#include <vector>
-#include "types.h"
-
-#ifdef TRANSPARENT
-#undef TRANSPARENT
-#endif
-
-class Color
-{
- public:
- static const Color BLACK;
- static const Color WHITE;
- static const Color TRANSPARENT;
-
- public:
- Color () : _rgb(0) {}
- Color (UInt32 rgb) : _rgb(rgb) {}
- Color (UInt8 r, UInt8 g, UInt8 b) {set(r,g,b);}
- Color (float r, float g, float b) {set(r,g,b);}
- Color (const std::vector<float> &rgb) {set(rgb[0], rgb[1], rgb[2]);}
- Color (const char *name);
- Color (const std::string &name);
- operator UInt32 () const {return _rgb;}
- bool operator == (const Color &c) const {return _rgb == c._rgb;}
- bool operator != (const Color &c) const {return _rgb != c._rgb;}
- void set (UInt8 r, UInt8 g, UInt8 b) {_rgb = (r << 16) | (g << 8) | b;}
- void set (float r, float g, float b);
- bool set (std::string name, bool case_sensitive=true);
- void setGray (UInt8 g) {set(g,g,g);}
- void setGray (float g) {set(g,g,g);}
- void setHSB (float h, float s, float b);
- void setCMYK (float c, float m, float y, float k);
- void getRGB (float &r, float &g, float &b) const;
- void operator *= (double c);
- std::string rgbString () const;
- static void CMYK2RGB (const std::vector<float> &cmyk, std::vector<float> &rgb);
- static void HSB2RGB (const std::vector<float> &hsb, std::vector<float> &rgb);
-
- private:
- UInt32 _rgb;
-};
-
-#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/psdefs.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/psdefs.cpp
deleted file mode 100644
index 7cdeb50cea8..00000000000
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/psdefs.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*************************************************************************
-** psdefs.cpp **
-** **
-** This file is part of dvisvgm -- the DVI to SVG converter **
-** Copyright (C) 2005-2014 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 **
-** published by the Free Software Foundation; either version 3 of **
-** the License, or (at your option) any later version. **
-** **
-** This program is distributed in the hope that it will be useful, but **
-** WITHOUT ANY WARRANTY; without even the implied warranty of **
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
-** GNU General Public License for more details. **
-** **
-** You should have received a copy of the GNU General Public License **
-** along with this program; if not, see <http://www.gnu.org/licenses/>. **
-*************************************************************************/
-
-#include "PSInterpreter.h"
-
-const char *PSInterpreter::PSDEFS =
-"3 dict dup begin/Install{matrix setmatrix}def/HWResolution[72 72]def/PageSize["
-"10000 10000]def end setpagedevice/@dodraw true store/@patcnt 0 store/@SD syste"
-"mdict def/@UD userdict def true setglobal @SD/:save @SD/save get put @SD/:rest"
-"ore @SD/restore get put @SD/:gsave @SD/gsave get put @SD/:grestore @SD/grestor"
-"e get put @SD/:grestoreall @SD/grestoreall get put @SD/:newpath @SD/newpath ge"
-"t put @SD/:stroke @SD/stroke get put @SD/:fill @SD/fill get put @SD/:eofill @S"
-"D/eofill get put @SD/:clip @SD/clip get put @SD/:eoclip @SD/eoclip get put @SD"
-"/:charpath @SD/charpath get put @SD/:show @SD/show get put @SD/.setopacityalph"
-"a known not{@SD/.setopacityalpha{pop}put}if @SD/prseq{-1 1{-1 roll =only( )pri"
-"nt}for(\\n)print}put @SD/prcmd{( )exch(\\ndvi.)3{print}repeat prseq}put @SD/cv"
-"xall{{cvx}forall}put @SD/defpr{[exch[/copy @SD]cvxall 5 -1 roll dup 6 1 roll[/"
-"get/exec]cvxall 6 -1 roll dup 7 1 roll 4 -1 roll dup 5 1 roll dup length strin"
-"g cvs/prcmd cvx]cvx def}put @SD/querypos{{currentpoint}stopped{$error/newerror"
-" false put}{2(querypos)prcmd}ifelse}put @SD/applyscalevals{1 0 transform 0 0 t"
-"ransform 3 -1 roll sub dup mul 3 1 roll sub dup mul add sqrt 0 1 transform 0 0"
-" transform 3 -1 roll sub dup mul 3 1 roll sub dup mul add sqrt 1 0 transform d"
-"up mul exch dup dup mul 3 -1 roll add sqrt div 3(applyscalevals)prcmd}put @SD/"
-"prpath{{2(moveto)prcmd}{2(lineto)prcmd}{6(curveto)prcmd}{0(closepath)prcmd}pat"
-"hforall}put @SD/charpath{/@dodraw false store :charpath/@dodraw true store}put"
-" @SD/show{@dodraw{dup :gsave currentpoint :newpath moveto true charpath eofill"
-" :grestore/@dodraw false store :show/@dodraw true store}if}put @SD/newpath{:ne"
-"wpath 0 1(newpath)prcmd}put @SD/stroke{@dodraw{1 1(newpath)prcmd prpath 0(stro"
-"ke)prcmd :newpath}{:stroke}ifelse}put @SD/fill{@dodraw{1 1(newpath)prcmd prpat"
-"h 0(fill)prcmd :newpath}{:fill}ifelse}put @SD/eofill{@dodraw{1 1(newpath)prcmd"
-" prpath 0(eofill)prcmd :newpath}{:eofill}ifelse}put @SD/clip{:clip 0 1(newpath"
-")prcmd prpath 0(clip)prcmd}put @SD/eoclip{:eoclip 1 1(newpath)prcmd prpath 0(e"
-"oclip)prcmd}put/@rect{4 -2 roll moveto exch dup 0 rlineto exch 0 exch rlineto "
-"neg 0 rlineto closepath}bind def/@rectcc{4 -2 roll moveto 2 copy 0 lt exch 0 l"
-"t xor{dup 0 exch rlineto exch 0 rlineto neg 0 exch rlineto}{exch dup 0 rlineto"
-" exch 0 exch rlineto neg 0 rlineto}ifelse closepath}bind def @SD/rectclip{:new"
-"path dup type/arraytype eq{aload length 4 idiv{@rectcc}repeat}{@rectcc}ifelse "
-"clip :newpath}put @SD/rectfill{gsave :newpath dup type/arraytype eq{aload leng"
-"th 4 idiv{@rectcc}repeat}{@rectcc}ifelse fill grestore}put @SD/rectstroke{gsav"
-"e :newpath dup type/arraytype eq{aload length 4 idiv{@rect}repeat}{@rect}ifels"
-"e stroke grestore}put false setglobal @SD readonly pop/initclip 0 defpr/clippa"
-"th 0 defpr/sysexec{@SD exch get exec}def/adddot{dup length 1 add string dup 0 "
-"46 put dup 3 -1 roll 1 exch putinterval}def/setlinewidth{dup/setlinewidth syse"
-"xec applyscalevals 1(setlinewidth)prcmd}def/setlinecap 1 defpr/setlinejoin 1 d"
-"efpr/setmiterlimit 1 defpr/setdash{mark 3 1 roll 2 copy/setdash sysexec applys"
-"calevals exch aload length 1 add -1 roll counttomark(setdash)prcmd pop}def/set"
-"gstate{currentlinewidth 1(setlinewidth)prcmd currentlinecap 1(setlinecap)prcmd"
-" currentlinejoin 1(setlinejoin)prcmd currentmiterlimit 1(setmiterlimit)prcmd c"
-"urrentrgbcolor 3(setrgbcolor)prcmd 6 array currentmatrix aload pop 6(setmatrix"
-")prcmd currentdash mark 3 1 roll exch aload length 1 add -1 roll counttomark(s"
-"etdash)prcmd pop}def/save{@UD begin/@saveID vmstatus pop pop def end :save @sa"
-"veID 1(save)prcmd}def/restore{:restore setgstate @UD/@saveID known{@UD begin @"
-"saveID end}{0}ifelse 1(restore)prcmd}def/gsave 0 defpr/grestore{:grestore setg"
-"state 0(grestore)prcmd}def/grestoreall{:grestoreall setstate 0(grestoreall)prc"
-"md}def/rotate{dup type/arraytype ne{dup 1(rotate)prcmd}if/rotate sysexec}def/s"
-"cale{dup type/arraytype ne{2 copy 2(scale)prcmd}if/scale sysexec}def/translate"
-"{dup type/arraytype ne{2 copy 2(translate)prcmd}if/translate sysexec}def/setma"
-"trix{dup/setmatrix sysexec aload pop 6(setmatrix)prcmd}def/initmatrix{matrix s"
-"etmatrix}def/concat{matrix currentmatrix matrix concatmatrix setmatrix}def/mak"
-"epattern{gsave <</mx 3 -1 roll >> begin dup/XUID[1000000 @patcnt]put mx/makepa"
-"ttern sysexec dup dup begin PatternType @patcnt BBox aload pop XStep YStep Pai"
-"ntType mx aload pop 15(makepattern)prcmd :newpath matrix setmatrix PaintProc 0"
-" 1(makepattern)prcmd end/@patcnt @patcnt 1 add store end grestore}def/setpatte"
-"rn{begin PatternType 1 eq{PaintType 1 eq{XUID aload pop exch pop 1}{:gsave[cur"
-"rentcolorspace aload length -1 roll pop]setcolorspace/setcolor sysexec XUID al"
-"oad pop exch pop currentrgbcolor :grestore 4}ifelse(setpattern)prcmd}{/setpatt"
-"ern sysexec}ifelse end}def/setcolor{dup type/dicttype eq{setpattern}{/setcolor"
-" sysexec}ifelse}def/setgray 1 defpr/setcmykcolor 4 defpr/sethsbcolor 3 defpr/s"
-"etrgbcolor 3 defpr/.setopacityalpha{dup/.setopacityalpha sysexec 1(setopacitya"
-"lpha)prcmd}def ";
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1-PATCHES/ChangeLog b/Build/source/texk/dvisvgm/dvisvgm-1.9-PATCHES/ChangeLog
index f6eccb4ec32..2b92f5c3590 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1-PATCHES/ChangeLog
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9-PATCHES/ChangeLog
@@ -1,3 +1,7 @@
+2015-01-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Import release 1.9.
+
2014-09-15 Peter Breitenlohner <peb@mppmu.mpg.de>
* Import release 1.8.1.
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1-PATCHES/TL-Changes b/Build/source/texk/dvisvgm/dvisvgm-1.9-PATCHES/TL-Changes
index 99a521eacbc..2cea176752f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1-PATCHES/TL-Changes
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9-PATCHES/TL-Changes
@@ -4,6 +4,7 @@ Changes applied to the dvisvgm-1.8.1 tree as obtained from:
Removed:
Makefile.in
aclocal.m4
+ compile
config.guess
config.sub
configure
@@ -14,7 +15,3 @@ Removed:
tests/
*/Makefile.in
-Converted Dos/Win line ends to native:
- clipper/clipper.cpp
- clipper/clipper.hpp
-
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/AUTHORS b/Build/source/texk/dvisvgm/dvisvgm-1.9/AUTHORS
index d9b6468421e..d9b6468421e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/AUTHORS
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/AUTHORS
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/COPYING b/Build/source/texk/dvisvgm/dvisvgm-1.9/COPYING
index 94a9ed024d3..94a9ed024d3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/COPYING
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/COPYING
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/ChangeLog b/Build/source/texk/dvisvgm/dvisvgm-1.9/ChangeLog
index 3446d6448e4..a3dde4b9f2c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/ChangeLog
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/ChangeLog
@@ -1,3 +1,158 @@
+2014-12-28 Martin Gieseking <martin.gieseking@uos.de>
+
+ * NEWS:
+ updated NEWS
+
+ * configure.ac, src/Doxyfile:
+ set version to 1.9
+
+ * src/dvisvgm.cpp:
+ clear line before printing the message about user interruption to avoid
+ trailing text fragments
+
+ * src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/EPSToSVG.cpp,
+ src/EPSToSVG.h, src/SpecialActions.h, src/SpecialManager.cpp,
+ src/dvisvgm.cpp:
+ show PS instruction counter when processing EPS files with option
+ --progress
+
+ * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
+ src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/ShadingPatch.h,
+ src/TensorProductPatch.cpp, src/TensorProductPatch.h,
+ src/TriangularPatch.cpp, src/TriangularPatch.h, src/dvisvgm.cpp,
+ src/options.xml:
+ added command-line options --grad-overlap, --grad-segments, and
+ --grad-simplify
+
+2014-12-20 Martin Gieseking <martin.gieseking@uos.de>
+
+ * src/DVIReader.cpp:
+ check validity of DVI file before trying to collect the BOPs
+
+2014-12-18 Martin Gieseking <martin.gieseking@uos.de>
+
+ * src/Color.cpp, src/Color.h, src/Makefile.am, src/PsSpecialHandler.cpp,
+ src/PsSpecialHandler.h, src/VectorIterator.h, src/psdefs.cpp,
+ src/psdefs.ps:
+ extended PS operator 'shfill' to support triangular patch meshes
+
+ * src/Makefile.am, src/PsSpecialHandler.cpp, src/ShadingPatch.cpp,
+ src/ShadingPatch.h, src/TensorProductPatch.cpp, src/TensorProductPatch.h:
+ extracted common interface class ShadingPatch from TensorProductPatch
+
+ * src/Makefile.am, src/TriangularPatch.cpp, src/TriangularPatch.h:
+ added class to compute triangular shading patches
+
+2014-12-16 Martin Gieseking <martin.gieseking@uos.de>
+
+ * src/PsSpecialHandler.cpp, src/PsSpecialHandler.h:
+ added processing of the optional 'BBox' entry in a PS shading dictionary
+
+2014-12-03 Martin Gieseking <martin.gieseking@uos.de>
+
+ * src/Color.cpp, tests/ColorSpecialTest.cpp, tests/ColorTest.cpp:
+ fixed CMYK to RGB approximation
+
+ * src/CommandLine.cpp, src/CommandLine.h, src/dvisvgm.cpp,
+ src/options.xml:
+ disable option --clipjoin if PS support is disabled
+
+2014-11-27 Martin Gieseking <martin.gieseking@uos.de>
+
+ * src/PSInterpreter.cpp, src/PSInterpreter.h, src/PsSpecialHandler.cpp,
+ src/PsSpecialHandler.h, src/psdefs.cpp, src/psdefs.ps,
+ tests/PSInterpreterTest.cpp:
+ added evaluation of PS operator "shfill" (Coons and tensor product
+ patches only)
+
+2014-11-24 Martin Gieseking <martin.gieseking@uos.de>
+
+ * README.md:
+ added list of features and a download button to README.md
+
+2014-11-20 Martin Gieseking <martin.gieseking@uos.de>
+
+ * src/MiKTeXCom.cpp:
+ added missing includes to make MinGW-w64 happy
+
+2014-11-09 Martin Gieseking <martin.gieseking@uos.de>
+
+ * clipper/clipper.cpp, clipper/clipper.hpp:
+ updated clipper library to version 6.2.1
+
+2014-11-08 Martin Gieseking <martin.gieseking@uos.de>
+
+ * src/Bezier.cpp, src/Bezier.h, src/BoundingBox.h, src/GraphicPath.h,
+ src/Makefile.am, src/TensorProductPatch.cpp, src/TensorProductPatch.h,
+ tests/Makefile.am, tests/TensorProductPatchTest.cpp:
+ added code to compute tensor-product patches required for gradient fills
+
+2014-11-06 Martin Gieseking <martin.gieseking@uos.de>
+
+ * src/Matrix.cpp:
+ use constant M_PI rather than defining PI locally
+
+2014-10-23 Martin Gieseking <martin.gieseking@uos.de>
+
+ * src/Color.cpp, src/Color.h, tests/ColorTest.cpp:
+ added deltaE and L*a*b* color space methods to class Color
+
+ * src/Color.cpp, src/Color.h:
+ replaced vectors with valarrays in class Color
+
+ * src/Color.cpp, src/Color.h, src/ColorSpecialHandler.cpp,
+ src/DVIReader.cpp, src/HtmlSpecialHandler.cpp, src/PsSpecialHandler.cpp,
+ tests/ColorTest.cpp:
+ renamed RGB setters/getters of class Color
+
+ * src/Color.cpp, src/Color.h, src/ColorSpecialHandler.cpp,
+ src/PsSpecialHandler.cpp, tests/ColorTest.cpp:
+ replaced float by double in class Color
+
+2014-10-17 Martin Gieseking <martin.gieseking@uos.de>
+
+ * src/GraphicPath.h, src/PathClipper.cpp, src/PathClipper.h,
+ src/XMLNode.h:
+ fixed a couple of doxygen comments; removed redundant
+ PathClipperException
+
+ * clipper/clipper.cpp, clipper/clipper.hpp:
+ updated clipper library to version 6.2.0
+
+2014-10-08 Martin Gieseking <martin.gieseking@uos.de>
+
+ * src/Ghostscript.cpp:
+ try to lookup the location of the GS DLL in the Windows registry
+
+ * src/CommandLine.cpp:
+ updated CommandLine.cpp with description of option --no-merge
+
+2014-10-01 Martin Gieseking <martin.gieseking@uos.de>
+
+ * doc/dvisvgm.txt.in, src/options.xml:
+ added info about option --no-merge to the manpage
+
+2014-09-24 Khaled Hosny <khaled.hosny@hindawi.com>
+
+ * src/Makefile.am:
+ Add an opt2cpp Python script
+
+A very ugly script that should work as a
+ drop in replacement for the
+opt2cpp XSLT.
+
+2014-09-15 Martin Gieseking <martin.gieseking@uos.de>
+
+ * src/PsSpecialHandler.cpp, src/PsSpecialHandler.h:
+ ensure that colors set by a color special are always considered by the
+ PS handler
+
+2014-09-10 Martin Gieseking <martin.gieseking@uos.de>
+
+ * src/BasicDVIReader.cpp, src/DVIReader.cpp, src/FontCache.cpp,
+ src/GFReader.cpp, src/dvisvgm.cpp:
+ replaced namespace 'ios_base' with 'ios'
+
2014-08-29 Martin Gieseking <martin.gieseking@uos.de>
* NEWS:
@@ -12,6 +167,17 @@
* src/PsSpecialHandler.cpp:
added missing whitespace boundaries in PS code
+2014-08-20 Khaled Hosny <khaled.hosny@hindawi.com>
+
+ * src/CommandLine.cpp, src/CommandLine.h, src/SVGTree.cpp, src/SVGTree.h,
+ src/dvisvgm.cpp, src/options.xml:
+ Add an option not to merge adjacent chars
+
+With this option on, each DVI
+ character is put in its own <text> tag.
+Makes post processing the SVG
+ file a bit simpler.
+
2014-08-18 Martin Gieseking <martin.gieseking@uos.de>
* src/DVIToSVG.cpp, src/DependencyGraph.h, src/Makefile.am,
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/INSTALL b/Build/source/texk/dvisvgm/dvisvgm-1.9/INSTALL
index a4b34144dcf..a4b34144dcf 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/INSTALL
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/INSTALL
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/LGPL-2.1.txt b/Build/source/texk/dvisvgm/dvisvgm-1.9/LGPL-2.1.txt
index 602bfc94635..602bfc94635 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/LGPL-2.1.txt
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/LGPL-2.1.txt
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.9/Makefile.am
index c4675c016e0..c4675c016e0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/Makefile.am
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/NEWS b/Build/source/texk/dvisvgm/dvisvgm-1.9/NEWS
index 9f8cf6eb532..72df7be9155 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/NEWS
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/NEWS
@@ -1,3 +1,19 @@
+dvisvgm-1.9 (2014-12-29)
+- added partial implementation of PostScript operator 'shfill' to create color
+ gradient fills (supported shading types: free-form triangular, lattice-form
+ triangular, Coons, and tensor-product patch meshes)
+- added options --grad-segments, --grad-overlap, and --grad-simplify to control
+ the approximation of color gradients
+- added option --no-merge to create separate text elements for each character
+ (patch by Khaled Hosny)
+- added a simple progress counter to the EPS to SVG converter
+- added opt2cpp.py as a free replacement for my non-free opt2cpp.xsl script
+ (thanks to Khaled Hosny for the implementation and for providing it for free)
+- added lookup of Ghostscript library in the Windows registry
+- fixed validity check of DVI files
+- fixed interaction of color specials and PostScript color operators
+- several code refactorings and improvements
+
dvisvgm-1.8.1 (2014-08-29)
- unreferenced clipPath elements are now removed from the SVG files
- fixed side-effectes caused by unexpected bop/eop operators in
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/README b/Build/source/texk/dvisvgm/dvisvgm-1.9/README
index e0d3b3fd6c5..e0d3b3fd6c5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/README
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/README
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/clipper/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.9/clipper/Makefile.am
index a24a478e587..a24a478e587 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/clipper/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/clipper/Makefile.am
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/clipper/clipper.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/clipper/clipper.cpp
index a6dbae285cf..89b7e8e683d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/clipper/clipper.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/clipper/clipper.cpp
@@ -1,8 +1,8 @@
/*******************************************************************************
* *
* Author : Angus Johnson *
-* Version : 6.1.5 *
-* Date : 16 July 2014 *
+* Version : 6.2.1 *
+* Date : 31 October 2014 *
* Website : http://www.angusj.com *
* Copyright : Angus Johnson 2010-2014 *
* *
@@ -168,7 +168,10 @@ PolyNode* PolyTree::GetFirst() const
int PolyTree::Total() const
{
- return (int)AllNodes.size();
+ int result = (int)AllNodes.size();
+ //with negative offsets, ignore the hidden outer polygon ...
+ if (result > 0 && Childs[0] != AllNodes[0]) result--;
+ return result;
}
//------------------------------------------------------------------------------
@@ -966,13 +969,16 @@ TEdge* ClipperBase::ProcessBound(TEdge* E, bool NextIsForward)
EStart = E->Prev;
else
EStart = E->Next;
- if (IsHorizontal(*EStart)) //ie an adjoining horizontal skip edge
+ if (EStart->OutIdx != Skip)
{
- if (EStart->Bot.X != E->Bot.X && EStart->Top.X != E->Bot.X)
+ if (IsHorizontal(*EStart)) //ie an adjoining horizontal skip edge
+ {
+ if (EStart->Bot.X != E->Bot.X && EStart->Top.X != E->Bot.X)
+ ReverseHorizontal(*E);
+ }
+ else if (EStart->Bot.X != E->Bot.X)
ReverseHorizontal(*E);
}
- else if (EStart->Bot.X != E->Bot.X)
- ReverseHorizontal(*E);
}
EStart = E;
@@ -1347,7 +1353,7 @@ Clipper::~Clipper() //destructor
//------------------------------------------------------------------------------
#ifdef use_xyz
-void Clipper::ZFillFunction(TZFillCallback zFillFunc)
+void Clipper::ZFillFunction(ZFillCallback zFillFunc)
{
m_ZFill = zFillFunc;
}
@@ -1430,7 +1436,7 @@ bool Clipper::ExecuteInternal()
ProcessHorizontals(false);
if (m_Scanbeam.empty()) break;
cInt topY = PopScanbeam();
- succeeded = ProcessIntersections(botY, topY);
+ succeeded = ProcessIntersections(topY);
if (!succeeded) break;
ProcessEdgesAtTopOfScanbeam(topY);
botY = topY;
@@ -2695,11 +2701,11 @@ void Clipper::UpdateEdgeIntoAEL(TEdge *&e)
}
//------------------------------------------------------------------------------
-bool Clipper::ProcessIntersections(const cInt botY, const cInt topY)
+bool Clipper::ProcessIntersections(const cInt topY)
{
if( !m_ActiveEdges ) return true;
try {
- BuildIntersectList(botY, topY);
+ BuildIntersectList(topY);
size_t IlSize = m_IntersectList.size();
if (IlSize == 0) return true;
if (IlSize == 1 || FixupIntersectionOrder()) ProcessIntersectList();
@@ -2724,7 +2730,7 @@ void Clipper::DisposeIntersectNodes()
}
//------------------------------------------------------------------------------
-void Clipper::BuildIntersectList(const cInt botY, const cInt topY)
+void Clipper::BuildIntersectList(const cInt topY)
{
if ( !m_ActiveEdges ) return;
@@ -3768,6 +3774,7 @@ void ClipperOffset::Execute(PolyTree& solution, double delta)
PolyNode* outerNode = solution.Childs[0];
solution.Childs.reserve(outerNode->ChildCount());
solution.Childs[0] = outerNode->Childs[0];
+ solution.Childs[0]->Parent = outerNode->Parent;
for (int i = 1; i < outerNode->ChildCount(); ++i)
solution.AddChild(*outerNode->Childs[i]);
}
@@ -4019,7 +4026,7 @@ void ClipperOffset::DoRound(int j, int k)
{
double a = std::atan2(m_sinA,
m_normals[k].X * m_normals[j].X + m_normals[k].Y * m_normals[j].Y);
- int steps = (int)Round(m_StepsPerRad * std::fabs(a));
+ int steps = std::max((int)Round(m_StepsPerRad * std::fabs(a)), 1);
double X = m_normals[k].X, Y = m_normals[k].Y, X2;
for (int i = 0; i < steps; ++i)
@@ -4047,7 +4054,7 @@ void Clipper::DoSimplePolygons()
{
OutRec* outrec = m_PolyOuts[i++];
OutPt* op = outrec->Pts;
- if (!op) continue;
+ if (!op || outrec->IsOpen) continue;
do //for each Pt in Polygon until duplicate found do ...
{
OutPt* op2 = op->Next;
@@ -4447,18 +4454,4 @@ std::ostream& operator <<(std::ostream &s, const Paths &p)
}
//------------------------------------------------------------------------------
-#ifdef use_deprecated
-
-void OffsetPaths(const Paths &in_polys, Paths &out_polys,
- double delta, JoinType jointype, EndType_ endtype, double limit)
-{
- ClipperOffset co(limit, limit);
- co.AddPaths(in_polys, jointype, (EndType)endtype);
- co.Execute(out_polys, delta);
-}
-//------------------------------------------------------------------------------
-
-#endif
-
-
} //ClipperLib namespace
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/clipper/clipper.hpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/clipper/clipper.hpp
index 313484dbb23..4919bc0ec0f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/clipper/clipper.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/clipper/clipper.hpp
@@ -1,438 +1,429 @@
-/*******************************************************************************
-* *
-* Author : Angus Johnson *
-* Version : 6.1.5 *
-* Date : 16 July 2014 *
-* Website : http://www.angusj.com *
-* Copyright : Angus Johnson 2010-2014 *
-* *
-* License: *
-* Use, modification & distribution is subject to Boost Software License Ver 1. *
-* http://www.boost.org/LICENSE_1_0.txt *
-* *
-* Attributions: *
-* The code in this library is an extension of Bala Vatti's clipping algorithm: *
-* "A generic solution to polygon clipping" *
-* Communications of the ACM, Vol 35, Issue 7 (July 1992) pp 56-63. *
-* http://portal.acm.org/citation.cfm?id=129906 *
-* *
-* Computer graphics and geometric modeling: implementation and algorithms *
-* By Max K. Agoston *
-* Springer; 1 edition (January 4, 2005) *
-* http://books.google.com/books?q=vatti+clipping+agoston *
-* *
-* See also: *
-* "Polygon Offsetting by Computing Winding Numbers" *
-* Paper no. DETC2005-85513 pp. 565-575 *
-* ASME 2005 International Design Engineering Technical Conferences *
-* and Computers and Information in Engineering Conference (IDETC/CIE2005) *
-* September 24-28, 2005 , Long Beach, California, USA *
-* http://www.me.berkeley.edu/~mcmains/pubs/DAC05OffsetPolygon.pdf *
-* *
-*******************************************************************************/
-
-#ifndef clipper_hpp
-#define clipper_hpp
-
-#define CLIPPER_VERSION "6.1.5"
-
-//use_int32: When enabled 32bit ints are used instead of 64bit ints. This
-//improve performance but coordinate values are limited to the range +/- 46340
-//#define use_int32
-
-//use_xyz: adds a Z member to IntPoint. Adds a minor cost to perfomance.
-#define use_xyz
-
-//use_lines: Enables line clipping. Adds a very minor cost to performance.
-#define use_lines
-
-//use_deprecated: Enables support for the obsolete OffsetPaths() function
-//which has been replace with the ClipperOffset class.
-//#define use_deprecated
-
-#include <vector>
-#include <set>
-#include <stdexcept>
-#include <cstring>
-#include <cstdlib>
-#include <ostream>
-#include <functional>
-#include <queue>
-#include "../src/types.h"
-
-namespace ClipperLib {
-
-enum ClipType { ctIntersection, ctUnion, ctDifference, ctXor };
-enum PolyType { ptSubject, ptClip };
-//By far the most widely used winding rules for polygon filling are
-//EvenOdd & NonZero (GDI, GDI+, XLib, OpenGL, Cairo, AGG, Quartz, SVG, Gr32)
-//Others rules include Positive, Negative and ABS_GTR_EQ_TWO (only in OpenGL)
-//see http://glprogramming.com/red/chapter11.html
-enum PolyFillType { pftEvenOdd, pftNonZero, pftPositive, pftNegative };
-
-struct ZLabel {
- ZLabel () : id(0), t(0) {}
- ZLabel (Int32 ii) : id(ii), t(0) {}
- ZLabel (Int32 ii, double tt) : id(ii), t(tt) {}
- bool operator == (const ZLabel &l) const {return id == l.id;}
- Int32 id;
- double t;
-};
-
-inline std::ostream& operator << (std::ostream &os, const ZLabel &l) {
- return os << l.id << ':' << l.t;
-}
-
-struct ZType {
- ZType (UInt64 v) : label1(v >> 32), label2(v & 0xffffffff) {}
- ZType (Int32 id1, Int32 id2) : label1(id1), label2(id2) {}
- ZType (const ZLabel &l1, const ZLabel &l2) : label1(l1), label2(l2) {}
- const ZLabel& minLabel () const {return (label1.id < label2.id) ? label1 : label2;}
- const ZLabel& maxLabel () const {return (label1.id > label2.id) ? label1 : label2;}
-
- const ZLabel& otherLabel (const ZLabel &l) const {
- return (l.id == label1.id && l.t == label1.t) ? label2 : label1;
- }
-
- bool operator == (const ZType &p) const {return minLabel() == p.minLabel() && maxLabel() == p.maxLabel();}
- operator UInt64 () const {return (UInt64(label1.id) << 32) & label2.id;}
- ZLabel label1, label2;
-};
-
-inline std::ostream& operator << (std::ostream &os, const ZType &z) {
- return os << '[' << z.label1 << '|' << z.label2 << ']';
-}
-
-#ifdef use_int32
- typedef int cInt;
- static cInt const loRange = 46340;
- static cInt const hiRange = 46340;
-#else
- typedef Int64 cInt;
- static cInt const loRange = 0x3FFFFFFF;
- static cInt const hiRange = 0x3FFFFFFFFFFFFFFFLL;
- typedef signed long long long64; //used by Int128 class
- typedef unsigned long long ulong64;
-
-#endif
-
-struct IntPoint {
- cInt X;
- cInt Y;
-#ifdef use_xyz
- ZType Z;
- IntPoint(cInt x = 0, cInt y = 0, ZType z = 0): X(x), Y(y), Z(z) {};
-#else
- IntPoint(cInt x = 0, cInt y = 0): X(x), Y(y) {};
-#endif
-
- friend inline bool operator== (const IntPoint& a, const IntPoint& b)
- {
- return a.X == b.X && a.Y == b.Y;
- }
- friend inline bool operator!= (const IntPoint& a, const IntPoint& b)
- {
- return a.X != b.X || a.Y != b.Y;
- }
-};
-//------------------------------------------------------------------------------
-
-typedef std::vector< IntPoint > Path;
-typedef std::vector< Path > Paths;
-
-inline Path& operator <<(Path& poly, const IntPoint& p) {poly.push_back(p); return poly;}
-inline Paths& operator <<(Paths& polys, const Path& p) {polys.push_back(p); return polys;}
-
-std::ostream& operator <<(std::ostream &s, const IntPoint &p);
-std::ostream& operator <<(std::ostream &s, const Path &p);
-std::ostream& operator <<(std::ostream &s, const Paths &p);
-
-struct DoublePoint
-{
- double X;
- double Y;
- DoublePoint(double x = 0, double y = 0) : X(x), Y(y) {}
- DoublePoint(IntPoint ip) : X((double)ip.X), Y((double)ip.Y) {}
-};
-//------------------------------------------------------------------------------
-
-#ifdef use_xyz
-typedef void (*TZFillCallback)(IntPoint& e1bot, IntPoint& e1top, IntPoint& e2bot, IntPoint& e2top, IntPoint& pt);
-#endif
-
-enum InitOptions {ioReverseSolution = 1, ioStrictlySimple = 2, ioPreserveCollinear = 4};
-enum JoinType {jtSquare, jtRound, jtMiter};
-enum EndType {etClosedPolygon, etClosedLine, etOpenButt, etOpenSquare, etOpenRound};
-#ifdef use_deprecated
- enum EndType_ {etClosed, etButt = 2, etSquare, etRound};
-#endif
-
-class PolyNode;
-typedef std::vector< PolyNode* > PolyNodes;
-
-class PolyNode
-{
-public:
- PolyNode();
- virtual ~PolyNode () {}
- Path Contour;
- PolyNodes Childs;
- PolyNode* Parent;
- PolyNode* GetNext() const;
- bool IsHole() const;
- bool IsOpen() const;
- int ChildCount() const;
-private:
- unsigned Index; //node index in Parent.Childs
- bool m_IsOpen;
- JoinType m_jointype;
- EndType m_endtype;
- PolyNode* GetNextSiblingUp() const;
- void AddChild(PolyNode& child);
- friend class Clipper; //to access Index
- friend class ClipperOffset;
-};
-
-class PolyTree: public PolyNode
-{
-public:
- ~PolyTree(){Clear();};
- PolyNode* GetFirst() const;
- void Clear();
- int Total() const;
-private:
- PolyNodes AllNodes;
- friend class Clipper; //to access AllNodes
-};
-
-bool Orientation(const Path &poly);
-double Area(const Path &poly);
-int PointInPolygon(const IntPoint &pt, const Path &path);
-
-#ifdef use_deprecated
- void OffsetPaths(const Paths &in_polys, Paths &out_polys,
- double delta, JoinType jointype, EndType_ endtype, double limit = 0);
-#endif
-
-void SimplifyPolygon(const Path &in_poly, Paths &out_polys, PolyFillType fillType = pftEvenOdd);
-void SimplifyPolygons(const Paths &in_polys, Paths &out_polys, PolyFillType fillType = pftEvenOdd);
-void SimplifyPolygons(Paths &polys, PolyFillType fillType = pftEvenOdd);
-
-void CleanPolygon(const Path& in_poly, Path& out_poly, double distance = 1.415);
-void CleanPolygon(Path& poly, double distance = 1.415);
-void CleanPolygons(const Paths& in_polys, Paths& out_polys, double distance = 1.415);
-void CleanPolygons(Paths& polys, double distance = 1.415);
-
-void MinkowskiSum(const Path& pattern, const Path& path, Paths& solution, bool pathIsClosed);
-void MinkowskiSum(const Path& pattern, const Paths& paths, Paths& solution, bool pathIsClosed);
-void MinkowskiDiff(const Path& poly1, const Path& poly2, Paths& solution);
-
-void PolyTreeToPaths(const PolyTree& polytree, Paths& paths);
-void ClosedPathsFromPolyTree(const PolyTree& polytree, Paths& paths);
-void OpenPathsFromPolyTree(PolyTree& polytree, Paths& paths);
-
-void ReversePath(Path& p);
-void ReversePaths(Paths& p);
-
-struct IntRect { cInt left; cInt top; cInt right; cInt bottom; };
-
-//enums that are used internally ...
-enum EdgeSide { esLeft = 1, esRight = 2};
-
-//forward declarations (for stuff used internally) ...
-struct TEdge;
-struct IntersectNode;
-struct LocalMinimum;
-struct Scanbeam;
-struct OutPt;
-struct OutRec;
-struct Join;
-
-typedef std::vector < OutRec* > PolyOutList;
-typedef std::vector < TEdge* > EdgeList;
-typedef std::vector < Join* > JoinList;
-typedef std::vector < IntersectNode* > IntersectList;
-
-//------------------------------------------------------------------------------
-
-//ClipperBase is the ancestor to the Clipper class. It should not be
-//instantiated directly. This class simply abstracts the conversion of sets of
-//polygon coordinates into edge objects that are stored in a LocalMinima list.
-class ClipperBase
-{
-public:
- ClipperBase();
- virtual ~ClipperBase();
- bool AddPath(const Path &pg, PolyType PolyTyp, bool Closed);
- bool AddPaths(const Paths &ppg, PolyType PolyTyp, bool Closed);
- virtual void Clear();
- IntRect GetBounds();
- bool PreserveCollinear() {return m_PreserveCollinear;};
- void PreserveCollinear(bool value) {m_PreserveCollinear = value;};
-protected:
- void DisposeLocalMinimaList();
- TEdge* AddBoundsToLML(TEdge *e, bool IsClosed);
- void PopLocalMinima();
- virtual void Reset();
- TEdge* ProcessBound(TEdge* E, bool IsClockwise);
- void DoMinimaLML(TEdge* E1, TEdge* E2, bool IsClosed);
- TEdge* DescendToMin(TEdge *&E);
- void AscendToMax(TEdge *&E, bool Appending, bool IsClosed);
-
- typedef std::vector<LocalMinimum> MinimaList;
- MinimaList::iterator m_CurrentLM;
- MinimaList m_MinimaList;
-
- bool m_UseFullRange;
- EdgeList m_edges;
- bool m_PreserveCollinear;
- bool m_HasOpenPaths;
-};
-//------------------------------------------------------------------------------
-
-class Clipper : public virtual ClipperBase
-{
-public:
- Clipper(int initOptions = 0);
- ~Clipper();
- bool Execute(ClipType clipType,
- Paths &solution,
- PolyFillType subjFillType = pftEvenOdd,
- PolyFillType clipFillType = pftEvenOdd);
- bool Execute(ClipType clipType,
- PolyTree &polytree,
- PolyFillType subjFillType = pftEvenOdd,
- PolyFillType clipFillType = pftEvenOdd);
- bool ReverseSolution() {return m_ReverseOutput;};
- void ReverseSolution(bool value) {m_ReverseOutput = value;};
- bool StrictlySimple() {return m_StrictSimple;};
- void StrictlySimple(bool value) {m_StrictSimple = value;};
- //set the callback function for z value filling on intersections (otherwise Z is 0)
-#ifdef use_xyz
- void ZFillFunction(TZFillCallback zFillFunc);
-#endif
-protected:
- void Reset();
- virtual bool ExecuteInternal();
-private:
- PolyOutList m_PolyOuts;
- JoinList m_Joins;
- JoinList m_GhostJoins;
- IntersectList m_IntersectList;
- ClipType m_ClipType;
- typedef std::priority_queue<cInt> ScanbeamList;
- ScanbeamList m_Scanbeam;
- TEdge *m_ActiveEdges;
- TEdge *m_SortedEdges;
- bool m_ExecuteLocked;
- PolyFillType m_ClipFillType;
- PolyFillType m_SubjFillType;
- bool m_ReverseOutput;
- bool m_UsingPolyTree;
- bool m_StrictSimple;
-#ifdef use_xyz
- TZFillCallback m_ZFill; //custom callback
-#endif
- void SetWindingCount(TEdge& edge);
- bool IsEvenOddFillType(const TEdge& edge) const;
- bool IsEvenOddAltFillType(const TEdge& edge) const;
- void InsertScanbeam(const cInt Y);
- cInt PopScanbeam();
- void InsertLocalMinimaIntoAEL(const cInt botY);
- void InsertEdgeIntoAEL(TEdge *edge, TEdge* startEdge);
- void AddEdgeToSEL(TEdge *edge);
- void CopyAELToSEL();
- void DeleteFromSEL(TEdge *e);
- void DeleteFromAEL(TEdge *e);
- void UpdateEdgeIntoAEL(TEdge *&e);
- void SwapPositionsInSEL(TEdge *edge1, TEdge *edge2);
- bool IsContributing(const TEdge& edge) const;
- bool IsTopHorz(const cInt XPos);
- void SwapPositionsInAEL(TEdge *edge1, TEdge *edge2);
- void DoMaxima(TEdge *e);
- void ProcessHorizontals(bool IsTopOfScanbeam);
- void ProcessHorizontal(TEdge *horzEdge, bool isTopOfScanbeam);
- void AddLocalMaxPoly(TEdge *e1, TEdge *e2, const IntPoint &pt);
- OutPt* AddLocalMinPoly(TEdge *e1, TEdge *e2, const IntPoint &pt);
- OutRec* GetOutRec(int idx);
- void AppendPolygon(TEdge *e1, TEdge *e2);
- void IntersectEdges(TEdge *e1, TEdge *e2, IntPoint &pt);
- OutRec* CreateOutRec();
- OutPt* AddOutPt(TEdge *e, const IntPoint &pt);
- void DisposeAllOutRecs();
- void DisposeOutRec(PolyOutList::size_type index);
- bool ProcessIntersections(const cInt botY, const cInt topY);
- void BuildIntersectList(const cInt botY, const cInt topY);
- void ProcessIntersectList();
- void ProcessEdgesAtTopOfScanbeam(const cInt topY);
- void BuildResult(Paths& polys);
- void BuildResult2(PolyTree& polytree);
- void SetHoleState(TEdge *e, OutRec *outrec);
- void DisposeIntersectNodes();
- bool FixupIntersectionOrder();
- void FixupOutPolygon(OutRec &outrec);
- bool IsHole(TEdge *e);
- bool FindOwnerFromSplitRecs(OutRec &outRec, OutRec *&currOrfl);
- void FixHoleLinkage(OutRec &outrec);
- void AddJoin(OutPt *op1, OutPt *op2, const IntPoint offPt);
- void ClearJoins();
- void ClearGhostJoins();
- void AddGhostJoin(OutPt *op, const IntPoint offPt);
- bool JoinPoints(Join *j, OutRec* outRec1, OutRec* outRec2);
- void JoinCommonEdges();
- void DoSimplePolygons();
- void FixupFirstLefts1(OutRec* OldOutRec, OutRec* NewOutRec);
- void FixupFirstLefts2(OutRec* OldOutRec, OutRec* NewOutRec);
-#ifdef use_xyz
- void SetZ(IntPoint& pt, TEdge& e1, TEdge& e2);
-#endif
-};
-//------------------------------------------------------------------------------
-
-class ClipperOffset
-{
-public:
- ClipperOffset(double miterLimit = 2.0, double roundPrecision = 0.25);
- ~ClipperOffset();
- void AddPath(const Path& path, JoinType joinType, EndType endType);
- void AddPaths(const Paths& paths, JoinType joinType, EndType endType);
- void Execute(Paths& solution, double delta);
- void Execute(PolyTree& solution, double delta);
- void Clear();
- double MiterLimit;
- double ArcTolerance;
-private:
- Paths m_destPolys;
- Path m_srcPoly;
- Path m_destPoly;
- std::vector<DoublePoint> m_normals;
- double m_delta, m_sinA, m_sin, m_cos;
- double m_miterLim, m_StepsPerRad;
- IntPoint m_lowest;
- PolyNode m_polyNodes;
-
- void FixOrientations();
- void DoOffset(double delta);
- void OffsetPoint(int j, int& k, JoinType jointype);
- void DoSquare(int j, int k);
- void DoMiter(int j, int k, double r);
- void DoRound(int j, int k);
-};
-//------------------------------------------------------------------------------
-
-class clipperException : public std::exception
-{
- public:
- clipperException(const char* description): m_descr(description) {}
- virtual ~clipperException() throw() {}
- virtual const char* what() const throw() {return m_descr.c_str();}
- private:
- std::string m_descr;
-};
-//------------------------------------------------------------------------------
-
-} //ClipperLib namespace
-
-#endif //clipper_hpp
-
-
+/*******************************************************************************
+* *
+* Author : Angus Johnson *
+* Version : 6.2.1 *
+* Date : 31 October 2014 *
+* Website : http://www.angusj.com *
+* Copyright : Angus Johnson 2010-2014 *
+* *
+* License: *
+* Use, modification & distribution is subject to Boost Software License Ver 1. *
+* http://www.boost.org/LICENSE_1_0.txt *
+* *
+* Attributions: *
+* The code in this library is an extension of Bala Vatti's clipping algorithm: *
+* "A generic solution to polygon clipping" *
+* Communications of the ACM, Vol 35, Issue 7 (July 1992) pp 56-63. *
+* http://portal.acm.org/citation.cfm?id=129906 *
+* *
+* Computer graphics and geometric modeling: implementation and algorithms *
+* By Max K. Agoston *
+* Springer; 1 edition (January 4, 2005) *
+* http://books.google.com/books?q=vatti+clipping+agoston *
+* *
+* See also: *
+* "Polygon Offsetting by Computing Winding Numbers" *
+* Paper no. DETC2005-85513 pp. 565-575 *
+* ASME 2005 International Design Engineering Technical Conferences *
+* and Computers and Information in Engineering Conference (IDETC/CIE2005) *
+* September 24-28, 2005 , Long Beach, California, USA *
+* http://www.me.berkeley.edu/~mcmains/pubs/DAC05OffsetPolygon.pdf *
+* *
+*******************************************************************************/
+
+#ifndef clipper_hpp
+#define clipper_hpp
+
+#define CLIPPER_VERSION "6.2.1"
+
+//use_int32: When enabled 32bit ints are used instead of 64bit ints. This
+//improve performance but coordinate values are limited to the range +/- 46340
+//#define use_int32
+
+//use_xyz: adds a Z member to IntPoint. Adds a minor cost to perfomance.
+#define use_xyz
+
+//use_lines: Enables line clipping. Adds a very minor cost to performance.
+#define use_lines
+
+//use_deprecated: Enables temporary support for the obsolete functions
+//#define use_deprecated
+
+#include <vector>
+#include <set>
+#include <stdexcept>
+#include <cstring>
+#include <cstdlib>
+#include <ostream>
+#include <functional>
+#include <queue>
+#include "../src/types.h"
+
+namespace ClipperLib {
+
+enum ClipType { ctIntersection, ctUnion, ctDifference, ctXor };
+enum PolyType { ptSubject, ptClip };
+//By far the most widely used winding rules for polygon filling are
+//EvenOdd & NonZero (GDI, GDI+, XLib, OpenGL, Cairo, AGG, Quartz, SVG, Gr32)
+//Others rules include Positive, Negative and ABS_GTR_EQ_TWO (only in OpenGL)
+//see http://glprogramming.com/red/chapter11.html
+enum PolyFillType { pftEvenOdd, pftNonZero, pftPositive, pftNegative };
+
+struct ZLabel {
+ ZLabel () : id(0), t(0) {}
+ ZLabel (Int32 ii) : id(ii), t(0) {}
+ ZLabel (Int32 ii, double tt) : id(ii), t(tt) {}
+ bool operator == (const ZLabel &l) const {return id == l.id;}
+ Int32 id;
+ double t;
+};
+
+inline std::ostream& operator << (std::ostream &os, const ZLabel &l) {
+ return os << l.id << ':' << l.t;
+}
+
+struct ZType {
+ ZType (UInt64 v) : label1(v >> 32), label2(v & 0xffffffff) {}
+ ZType (Int32 id1, Int32 id2) : label1(id1), label2(id2) {}
+ ZType (const ZLabel &l1, const ZLabel &l2) : label1(l1), label2(l2) {}
+ const ZLabel& minLabel () const {return (label1.id < label2.id) ? label1 : label2;}
+ const ZLabel& maxLabel () const {return (label1.id > label2.id) ? label1 : label2;}
+
+ const ZLabel& otherLabel (const ZLabel &l) const {
+ return (l.id == label1.id && l.t == label1.t) ? label2 : label1;
+ }
+
+ bool operator == (const ZType &p) const {return minLabel() == p.minLabel() && maxLabel() == p.maxLabel();}
+ operator UInt64 () const {return (UInt64(label1.id) << 32) & label2.id;}
+ ZLabel label1, label2;
+};
+
+inline std::ostream& operator << (std::ostream &os, const ZType &z) {
+ return os << '[' << z.label1 << '|' << z.label2 << ']';
+}
+
+#ifdef use_int32
+ typedef int cInt;
+ static cInt const loRange = 0x7FFF;
+ static cInt const hiRange = 0x7FFF;
+#else
+ typedef signed long long cInt;
+ static cInt const loRange = 0x3FFFFFFF;
+ static cInt const hiRange = 0x3FFFFFFFFFFFFFFFLL;
+ typedef signed long long long64; //used by Int128 class
+ typedef unsigned long long ulong64;
+
+#endif
+
+struct IntPoint {
+ cInt X;
+ cInt Y;
+#ifdef use_xyz
+ ZType Z;
+ IntPoint(cInt x = 0, cInt y = 0, ZType z = 0): X(x), Y(y), Z(z) {};
+#else
+ IntPoint(cInt x = 0, cInt y = 0): X(x), Y(y) {};
+#endif
+
+ friend inline bool operator== (const IntPoint& a, const IntPoint& b)
+ {
+ return a.X == b.X && a.Y == b.Y;
+ }
+ friend inline bool operator!= (const IntPoint& a, const IntPoint& b)
+ {
+ return a.X != b.X || a.Y != b.Y;
+ }
+};
+//------------------------------------------------------------------------------
+
+typedef std::vector< IntPoint > Path;
+typedef std::vector< Path > Paths;
+
+inline Path& operator <<(Path& poly, const IntPoint& p) {poly.push_back(p); return poly;}
+inline Paths& operator <<(Paths& polys, const Path& p) {polys.push_back(p); return polys;}
+
+std::ostream& operator <<(std::ostream &s, const IntPoint &p);
+std::ostream& operator <<(std::ostream &s, const Path &p);
+std::ostream& operator <<(std::ostream &s, const Paths &p);
+
+struct DoublePoint
+{
+ double X;
+ double Y;
+ DoublePoint(double x = 0, double y = 0) : X(x), Y(y) {}
+ DoublePoint(IntPoint ip) : X((double)ip.X), Y((double)ip.Y) {}
+};
+//------------------------------------------------------------------------------
+
+#ifdef use_xyz
+typedef void (*ZFillCallback)(IntPoint& e1bot, IntPoint& e1top, IntPoint& e2bot, IntPoint& e2top, IntPoint& pt);
+#endif
+
+enum InitOptions {ioReverseSolution = 1, ioStrictlySimple = 2, ioPreserveCollinear = 4};
+enum JoinType {jtSquare, jtRound, jtMiter};
+enum EndType {etClosedPolygon, etClosedLine, etOpenButt, etOpenSquare, etOpenRound};
+
+class PolyNode;
+typedef std::vector< PolyNode* > PolyNodes;
+
+class PolyNode
+{
+public:
+ PolyNode();
+ virtual ~PolyNode(){};
+ Path Contour;
+ PolyNodes Childs;
+ PolyNode* Parent;
+ PolyNode* GetNext() const;
+ bool IsHole() const;
+ bool IsOpen() const;
+ int ChildCount() const;
+private:
+ unsigned Index; //node index in Parent.Childs
+ bool m_IsOpen;
+ JoinType m_jointype;
+ EndType m_endtype;
+ PolyNode* GetNextSiblingUp() const;
+ void AddChild(PolyNode& child);
+ friend class Clipper; //to access Index
+ friend class ClipperOffset;
+};
+
+class PolyTree: public PolyNode
+{
+public:
+ ~PolyTree(){Clear();};
+ PolyNode* GetFirst() const;
+ void Clear();
+ int Total() const;
+private:
+ PolyNodes AllNodes;
+ friend class Clipper; //to access AllNodes
+};
+
+bool Orientation(const Path &poly);
+double Area(const Path &poly);
+int PointInPolygon(const IntPoint &pt, const Path &path);
+
+void SimplifyPolygon(const Path &in_poly, Paths &out_polys, PolyFillType fillType = pftEvenOdd);
+void SimplifyPolygons(const Paths &in_polys, Paths &out_polys, PolyFillType fillType = pftEvenOdd);
+void SimplifyPolygons(Paths &polys, PolyFillType fillType = pftEvenOdd);
+
+void CleanPolygon(const Path& in_poly, Path& out_poly, double distance = 1.415);
+void CleanPolygon(Path& poly, double distance = 1.415);
+void CleanPolygons(const Paths& in_polys, Paths& out_polys, double distance = 1.415);
+void CleanPolygons(Paths& polys, double distance = 1.415);
+
+void MinkowskiSum(const Path& pattern, const Path& path, Paths& solution, bool pathIsClosed);
+void MinkowskiSum(const Path& pattern, const Paths& paths, Paths& solution, bool pathIsClosed);
+void MinkowskiDiff(const Path& poly1, const Path& poly2, Paths& solution);
+
+void PolyTreeToPaths(const PolyTree& polytree, Paths& paths);
+void ClosedPathsFromPolyTree(const PolyTree& polytree, Paths& paths);
+void OpenPathsFromPolyTree(PolyTree& polytree, Paths& paths);
+
+void ReversePath(Path& p);
+void ReversePaths(Paths& p);
+
+struct IntRect { cInt left; cInt top; cInt right; cInt bottom; };
+
+//enums that are used internally ...
+enum EdgeSide { esLeft = 1, esRight = 2};
+
+//forward declarations (for stuff used internally) ...
+struct TEdge;
+struct IntersectNode;
+struct LocalMinimum;
+struct Scanbeam;
+struct OutPt;
+struct OutRec;
+struct Join;
+
+typedef std::vector < OutRec* > PolyOutList;
+typedef std::vector < TEdge* > EdgeList;
+typedef std::vector < Join* > JoinList;
+typedef std::vector < IntersectNode* > IntersectList;
+
+//------------------------------------------------------------------------------
+
+//ClipperBase is the ancestor to the Clipper class. It should not be
+//instantiated directly. This class simply abstracts the conversion of sets of
+//polygon coordinates into edge objects that are stored in a LocalMinima list.
+class ClipperBase
+{
+public:
+ ClipperBase();
+ virtual ~ClipperBase();
+ bool AddPath(const Path &pg, PolyType PolyTyp, bool Closed);
+ bool AddPaths(const Paths &ppg, PolyType PolyTyp, bool Closed);
+ virtual void Clear();
+ IntRect GetBounds();
+ bool PreserveCollinear() {return m_PreserveCollinear;};
+ void PreserveCollinear(bool value) {m_PreserveCollinear = value;};
+protected:
+ void DisposeLocalMinimaList();
+ TEdge* AddBoundsToLML(TEdge *e, bool IsClosed);
+ void PopLocalMinima();
+ virtual void Reset();
+ TEdge* ProcessBound(TEdge* E, bool IsClockwise);
+ void DoMinimaLML(TEdge* E1, TEdge* E2, bool IsClosed);
+ TEdge* DescendToMin(TEdge *&E);
+ void AscendToMax(TEdge *&E, bool Appending, bool IsClosed);
+
+ typedef std::vector<LocalMinimum> MinimaList;
+ MinimaList::iterator m_CurrentLM;
+ MinimaList m_MinimaList;
+
+ bool m_UseFullRange;
+ EdgeList m_edges;
+ bool m_PreserveCollinear;
+ bool m_HasOpenPaths;
+};
+//------------------------------------------------------------------------------
+
+class Clipper : public virtual ClipperBase
+{
+public:
+ Clipper(int initOptions = 0);
+ ~Clipper();
+ bool Execute(ClipType clipType,
+ Paths &solution,
+ PolyFillType subjFillType = pftEvenOdd,
+ PolyFillType clipFillType = pftEvenOdd);
+ bool Execute(ClipType clipType,
+ PolyTree &polytree,
+ PolyFillType subjFillType = pftEvenOdd,
+ PolyFillType clipFillType = pftEvenOdd);
+ bool ReverseSolution() {return m_ReverseOutput;};
+ void ReverseSolution(bool value) {m_ReverseOutput = value;};
+ bool StrictlySimple() {return m_StrictSimple;};
+ void StrictlySimple(bool value) {m_StrictSimple = value;};
+ //set the callback function for z value filling on intersections (otherwise Z is 0)
+#ifdef use_xyz
+ void ZFillFunction(ZFillCallback zFillFunc);
+#endif
+protected:
+ void Reset();
+ virtual bool ExecuteInternal();
+private:
+ PolyOutList m_PolyOuts;
+ JoinList m_Joins;
+ JoinList m_GhostJoins;
+ IntersectList m_IntersectList;
+ ClipType m_ClipType;
+ typedef std::priority_queue<cInt> ScanbeamList;
+ ScanbeamList m_Scanbeam;
+ TEdge *m_ActiveEdges;
+ TEdge *m_SortedEdges;
+ bool m_ExecuteLocked;
+ PolyFillType m_ClipFillType;
+ PolyFillType m_SubjFillType;
+ bool m_ReverseOutput;
+ bool m_UsingPolyTree;
+ bool m_StrictSimple;
+#ifdef use_xyz
+ ZFillCallback m_ZFill; //custom callback
+#endif
+ void SetWindingCount(TEdge& edge);
+ bool IsEvenOddFillType(const TEdge& edge) const;
+ bool IsEvenOddAltFillType(const TEdge& edge) const;
+ void InsertScanbeam(const cInt Y);
+ cInt PopScanbeam();
+ void InsertLocalMinimaIntoAEL(const cInt botY);
+ void InsertEdgeIntoAEL(TEdge *edge, TEdge* startEdge);
+ void AddEdgeToSEL(TEdge *edge);
+ void CopyAELToSEL();
+ void DeleteFromSEL(TEdge *e);
+ void DeleteFromAEL(TEdge *e);
+ void UpdateEdgeIntoAEL(TEdge *&e);
+ void SwapPositionsInSEL(TEdge *edge1, TEdge *edge2);
+ bool IsContributing(const TEdge& edge) const;
+ bool IsTopHorz(const cInt XPos);
+ void SwapPositionsInAEL(TEdge *edge1, TEdge *edge2);
+ void DoMaxima(TEdge *e);
+ void ProcessHorizontals(bool IsTopOfScanbeam);
+ void ProcessHorizontal(TEdge *horzEdge, bool isTopOfScanbeam);
+ void AddLocalMaxPoly(TEdge *e1, TEdge *e2, const IntPoint &pt);
+ OutPt* AddLocalMinPoly(TEdge *e1, TEdge *e2, const IntPoint &pt);
+ OutRec* GetOutRec(int idx);
+ void AppendPolygon(TEdge *e1, TEdge *e2);
+ void IntersectEdges(TEdge *e1, TEdge *e2, IntPoint &pt);
+ OutRec* CreateOutRec();
+ OutPt* AddOutPt(TEdge *e, const IntPoint &pt);
+ void DisposeAllOutRecs();
+ void DisposeOutRec(PolyOutList::size_type index);
+ bool ProcessIntersections(const cInt topY);
+ void BuildIntersectList(const cInt topY);
+ void ProcessIntersectList();
+ void ProcessEdgesAtTopOfScanbeam(const cInt topY);
+ void BuildResult(Paths& polys);
+ void BuildResult2(PolyTree& polytree);
+ void SetHoleState(TEdge *e, OutRec *outrec);
+ void DisposeIntersectNodes();
+ bool FixupIntersectionOrder();
+ void FixupOutPolygon(OutRec &outrec);
+ bool IsHole(TEdge *e);
+ bool FindOwnerFromSplitRecs(OutRec &outRec, OutRec *&currOrfl);
+ void FixHoleLinkage(OutRec &outrec);
+ void AddJoin(OutPt *op1, OutPt *op2, const IntPoint offPt);
+ void ClearJoins();
+ void ClearGhostJoins();
+ void AddGhostJoin(OutPt *op, const IntPoint offPt);
+ bool JoinPoints(Join *j, OutRec* outRec1, OutRec* outRec2);
+ void JoinCommonEdges();
+ void DoSimplePolygons();
+ void FixupFirstLefts1(OutRec* OldOutRec, OutRec* NewOutRec);
+ void FixupFirstLefts2(OutRec* OldOutRec, OutRec* NewOutRec);
+#ifdef use_xyz
+ void SetZ(IntPoint& pt, TEdge& e1, TEdge& e2);
+#endif
+};
+//------------------------------------------------------------------------------
+
+class ClipperOffset
+{
+public:
+ ClipperOffset(double miterLimit = 2.0, double roundPrecision = 0.25);
+ ~ClipperOffset();
+ void AddPath(const Path& path, JoinType joinType, EndType endType);
+ void AddPaths(const Paths& paths, JoinType joinType, EndType endType);
+ void Execute(Paths& solution, double delta);
+ void Execute(PolyTree& solution, double delta);
+ void Clear();
+ double MiterLimit;
+ double ArcTolerance;
+private:
+ Paths m_destPolys;
+ Path m_srcPoly;
+ Path m_destPoly;
+ std::vector<DoublePoint> m_normals;
+ double m_delta, m_sinA, m_sin, m_cos;
+ double m_miterLim, m_StepsPerRad;
+ IntPoint m_lowest;
+ PolyNode m_polyNodes;
+
+ void FixOrientations();
+ void DoOffset(double delta);
+ void OffsetPoint(int j, int& k, JoinType jointype);
+ void DoSquare(int j, int k);
+ void DoMiter(int j, int k, double r);
+ void DoRound(int j, int k);
+};
+//------------------------------------------------------------------------------
+
+class clipperException : public std::exception
+{
+ public:
+ clipperException(const char* description): m_descr(description) {}
+ virtual ~clipperException() throw() {}
+ virtual const char* what() const throw() {return m_descr.c_str();}
+ private:
+ std::string m_descr;
+};
+//------------------------------------------------------------------------------
+
+} //ClipperLib namespace
+
+#endif //clipper_hpp
+
+
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/config.h.in b/Build/source/texk/dvisvgm/dvisvgm-1.9/config.h.in
index fcd8cf41872..fcd8cf41872 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/config.h.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/config.h.in
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/configure.ac b/Build/source/texk/dvisvgm/dvisvgm-1.9/configure.ac
index 5232cae7540..1842171551e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/configure.ac
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/configure.ac
@@ -4,8 +4,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([dvisvgm],[1.8.1],[martin.gieseking@uos.de])
-DATE="August 2014"
+AC_INIT([dvisvgm],[1.9],[martin.gieseking@uos.de])
+DATE="December 2014"
AC_CONFIG_SRCDIR(src)
AC_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/doc/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.9/doc/Makefile.am
index 13254cb773a..13254cb773a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/doc/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/doc/Makefile.am
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/doc/dvisvgm.1 b/Build/source/texk/dvisvgm/dvisvgm-1.9/doc/dvisvgm.1
index 046aa5eaf42..cb9cc87a96e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/doc/dvisvgm.1
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/doc/dvisvgm.1
@@ -2,12 +2,12 @@
.\" Title: dvisvgm
.\" Author: Martin Gieseking <martin.gieseking@uos.de>
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 08/29/2014
+.\" Date: 12/29/2014
.\" Manual: dvisvgm Manual
-.\" Source: dvisvgm 1.8.1
+.\" Source: dvisvgm 1.9
.\" Language: English
.\"
-.TH "DVISVGM" "1" "08/29/2014" "dvisvgm 1\&.8\&.1" "dvisvgm Manual"
+.TH "DVISVGM" "1" "12/29/2014" "dvisvgm 1\&.9" "dvisvgm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -268,6 +268,28 @@ For further information about the map file formats and the mode specifiers, see
.RE
.RE
.PP
+\fB\-\-grad\-overlap\fR
+.RS 4
+Tells dvisvgm to create overlapping grid segments when approximating color gradient fills (also see option
+\fB\-\-grad\-segments\fR
+below)\&. By default, adjacent segments don\(cqt overlap but only touch each other like separate tiles\&. Unfortunately, this alignment can lead to visible gaps between the segments because the background influences the color at the boundary of the segments if the SVG renderer uses anti\-aliasing to create smooth contours\&. One way to avoid this and to create seamlessly touching color regions is to enlarge the segments so that they extent into the area of their right and bottom neighbors\&. Since the latter are drawn on top of the overlapping parts, the visible size of all segments keeps unchanged\&. Just the former gaps disappear as the background is now completely covered by the correct colors\&. Currently, dvisvgm computes the overlapping segments separately for each patch of the mesh (a patch mesh may consist of multiple patches of the same type)\&. Therefore, there still might be visible gaps at the seam of two adjacent patches\&.
+.RE
+.PP
+\fB\-\-grad\-segments\fR=\fInumber\fR
+.RS 4
+Determines the maximal number of segments per column and row used to approximate gradient color fills\&. Since SVG 1\&.1 only supports a small subset of the shading algorithms available in PostScript, dvisvgm approximates some of them by subdividing the area to be filled into smaller, monochromatic segments\&. Each of these segments gets the average color of the region it covers\&. Thus, increasing the number of segments leads to smaller monochromatic areas and therefore results in a better approximation of the actual color gradient\&. As a drawback, more segments imply bigger SVG files because every segment is represented by a separate path element\&.
+.sp
+Currently, dvisvgm supports free\- and lattice\-form triangular patch meshes as well as Coons and tensor\-product patch meshes\&. They are approximated by subdividing the area of each patch into a
+\fIn\fR\(mu\fIn\fR
+grid of smaller segments\&. The maximal number of segments per column and row can be changed with option
+\fB\-\-grad\-segments\fR\&.
+.RE
+.PP
+\fB\-\-grad\-simplify\fR=\fIdelta\fR
+.RS 4
+If the size of the segments created to approximate gradient color fills falls below the given delta value, dvisvgm reduces their level of detail\&. For example, Bézier curves are replaced by straight lines, and triangular segments are combined to tetragons\&. For a small delta these simplifications are usually not noticeable but reduce the size of the generated SVG files\&.
+.RE
+.PP
\fB\-h, \-\-help\fR[=\fImode\fR]
.RS 4
Prints a short summary of all available command\-line options\&. The optional
@@ -285,7 +307,11 @@ Disables the removal of temporary files as created by Metafont (usually \&.gf, \
This option is only available if the Ghostscript library is not directly linked to dvisvgm and if PostScript support was not completely disabled during compilation\&. In this case, dvisvgm tries to load the shared GS library dynamically during runtime\&. By default, it expects the library\(cqs name to be libgs\&.so\&.X (on Unix\-like systems, where X is the ABI version of the library) or gsdll32\&.dll/gsdll64\&.dll (Windows)\&. Option
\fB\-\-libgs\fR
can be used to give a different name\&. Alternatively, it\(cqs also possible to set the GS library name by the environment variable
-LIBGS\&. The latter has less precedence than the command\-line option\&.
+LIBGS\&. The latter has less precedence than the command\-line option, i\&.e\&. dvisvgm ignores variable
+LIBGS
+if
+\fB\-\-libgs\fR
+is given\&.
.RE
.PP
\fB\-L, \-\-linkmark\fR=\fIstyle\fR
@@ -335,6 +361,21 @@ or
Sets the magnification factor applied in conjunction with Metafont calls prior tracing the glyphs\&. The larger this value, the better the tracing results\&. Nevertheless, large magnification values can cause Metafont arithmetic errors due to number overflows\&. So, use this option with care\&. The default setting usually produces nice results\&.
.RE
.PP
+\fB\-\-no\-merge\fR
+.RS 4
+Puts every single character in a separate
+\fItext\fR
+element with corresponding
+\fIx\fR
+and
+\fIy\fR
+attributes\&. By default, new
+\fItext\fR
+or
+\fItspan\fR
+elements are only created if a string starts at a location that differs from the regular position defined by the characters\*(Aq advance values\&.
+.RE
+.PP
\fB\-\-no\-mktexmf\fR
.RS 4
Suppresses the generation of missing font files\&. If dvisvgm can\(cqt find a font file through the kpathsea lookup mechanism, it calls the external tools mktextfm or mktexmf by\&. This option disables these calls\&.
@@ -906,7 +947,7 @@ are supported by dvisvgm\&. These specials allow modifying the font map tree dur
.PP
\fBps\fR
.RS 4
-The famous DVI driver dvips introduced its own set of specials in order to embed PostScript code into DVI files, which greatly improves the capabilities of DVI documents\&. One aim of dvisvgm is to completely evaluate all PostScript snippets and to convert a large amount of it to SVG\&. However, in contrast to dvips, dvisvgm uses floating point arithmetics to compute the precise position of each graphic element, i\&.e\&. it doesn\(cqt round the coordinates\&. Therefore, the relative locations of the graphic elements may slightly differ from those computed by dvips\&.
+The famous DVI driver dvips introduced its own set of specials in order to embed PostScript code into DVI files, which greatly improves the capabilities of DVI documents\&. One aim of dvisvgm is to completely evaluate all PostScript snippets and to convert as many of them as possible to SVG\&. In contrast to dvips, dvisvgm uses floating point arithmetics to compute the precise position of each graphic element, i\&.e\&. it doesn\(cqt round the coordinates\&. Therefore, the relative locations of the graphic elements may slightly differ from those computed by dvips\&.
.sp
Since PostScript is a rather complex language, dvisvgm does not try to implement its own PostScript interpreter but relies on Ghostscript instead\&. If the Ghostscript library was not linked to the dvisvgm binary, it is looked up and loaded dynamically during runtime\&. In this case, dvisvgm looks for
\fIlibgs\&.so\&.X\fR
@@ -917,9 +958,9 @@ or
on Windows\&. You can override the default file names with environment variable
LIBGS
or the command\-line option
-\fB\-\-libgs\fR\&. The library must be reachable through the ld search path (*nix) or the PATH environment variable (Windows)\&. Alternatively, the absolute file path can be specified\&. If the library cannot be found, dvisvgm disables the processing of PostScript specials\&. Use option
+\fB\-\-libgs\fR\&. The library must be reachable through the ld search path (*nix) or the PATH environment variable (Windows)\&. Alternatively, the absolute file path can be specified\&. If the library cannot be found, dvisvgm disables the processing of PostScript specials and prints a warning message\&. Use option
\fB\-\-list\-specials\fR
-to check whether PS support is available, i\&.e\&. entry
+to check whether PostScript support is available, i\&.e\&. entry
\fIps\fR
is present\&.
.sp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/doc/dvisvgm.txt.in b/Build/source/texk/dvisvgm/dvisvgm-1.9/doc/dvisvgm.txt.in
index 173b0e5d39a..d307568c202 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/doc/dvisvgm.txt.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/doc/dvisvgm.txt.in
@@ -173,7 +173,7 @@ font file names and encodings. dvisvgm does not provide its own map files but tr
available ones coming with dvips or dvipdfm. If option *--fontmap* is omitted, dvisvgm looks for the
default map files +ps2pk.map+, +dvipdfm.map+, and +psfonts.map+ (in this order). Otherwise, the
listed files are used. Multiple filenames must be separated by commas without leading and/or trailing
-whitespace.
+whitespace.
The map files are evaluated in the given order. By default, redefined mappings do not replace previous ones.
However, each filename can be preceded by an optional mode specifier (*+*, *-*, or *=*) to change this behavior:
@@ -182,7 +182,7 @@ However, each filename can be preceded by an optional mode specifier (*+*, *-*,
That's also the default mode if no mode specifier is given.
-mapfile;;
- Ensures that none of the font mappings defined in the given map file are used, i.e. previously
+ Ensures that none of the font mappings defined in the given map file are used, i.e. previously
defined mappings for the specified fonts are removed.
=mapfile;;
@@ -202,6 +202,43 @@ given in `myfile2.map` are removed from the font map tree.
For further information about the map file formats and the mode specifiers, see the manuals of dvips and dvipdfm.
+*--grad-overlap*::
+Tells dvisvgm to create overlapping grid segments when approximating color gradient fills (also see
+option *--grad-segments* below). By default, adjacent segments don't overlap but only touch each other
+like separate tiles. Unfortunately, this alignment can lead to visible gaps between the segments
+because the background influences the color at the boundary of the segments if the SVG renderer uses
+anti-aliasing to create smooth contours.
+One way to avoid this and to create seamlessly touching color regions is to enlarge the segments so
+that they extent into the area of their right and bottom neighbors. Since the latter are drawn on top
+of the overlapping parts, the visible size of all segments keeps unchanged. Just the former gaps
+disappear as the background is now completely covered by the correct colors.
+Currently, dvisvgm computes the overlapping segments separately for each patch of the mesh (a patch mesh
+may consist of multiple patches of the same type). Therefore, there still might be visible gaps
+at the seam of two adjacent patches.
+
+
+*--grad-segments*='number'::
+Determines the maximal number of segments per column and row used to approximate gradient color fills.
+Since SVG 1.1 only supports a small subset of the shading algorithms available in PostScript,
+dvisvgm approximates some of them by subdividing the area to be filled into smaller, monochromatic
+segments. Each of these segments gets the average color of the region it covers. Thus, increasing the
+number of segments leads to smaller monochromatic areas and therefore results in a better approximation
+of the actual color gradient. As a drawback, more segments imply bigger SVG files because every
+segment is represented by a separate path element.
++
+Currently, dvisvgm supports free- and lattice-form triangular patch meshes as well as Coons and
+tensor-product patch meshes. They are approximated by subdividing the area of each patch into a
+__n__&#215;__n__ grid of smaller segments. The maximal number of segments per column and row can be
+changed with option *--grad-segments*.
+
+
+*--grad-simplify*='delta'::
+If the size of the segments created to approximate gradient color fills falls below the given delta
+value, dvisvgm reduces their level of detail. For example, Bézier curves are replaced by straight
+lines, and triangular segments are combined to tetragons. For a small delta these simplifications
+are usually not noticeable but reduce the size of the generated SVG files.
+
+
*-h, --help*[='mode']::
Prints a short summary of all available command-line options. The optional 'mode' parameter is
an integer value between 0 and 2. It selects the display variant of the help text. Mode 0
@@ -221,7 +258,8 @@ to load the shared GS library dynamically during runtime. By default, it expects
to be libgs.so.X (on Unix-like systems, where X is the ABI version of the library) or
gsdll32.dll/gsdll64.dll (Windows). Option *--libgs* can be used to give a different name.
Alternatively, it's also possible to set the GS library name by the environment variable +LIBGS+.
-The latter has less precedence than the command-line option.
+The latter has less precedence than the command-line option, i.e. dvisvgm ignores variable +LIBGS+
+if *--libgs* is given.
*-L, --linkmark*='style'::
@@ -256,6 +294,12 @@ can cause Metafont arithmetic errors due to number overflows. So, use this optio
The default setting usually produces nice results.
+*--no-merge*::
+Puts every single character in a separate 'text' element with corresponding 'x' and 'y' attributes.
+By default, new 'text' or 'tspan' elements are only created if a string starts at a location that
+differs from the regular position defined by the characters' advance values.
+
+
*--no-mktexmf*::
Suppresses the generation of missing font files. If dvisvgm can't find a font file
through the kpathsea lookup mechanism, it calls the external tools mktextfm or mktexmf by.
@@ -574,24 +618,26 @@ dvipdfm font map format. For further information on the command syntax and seman
*ps*::
The famous DVI driver dvips introduced its own set of specials in order to embed PostScript code into DVI files,
which greatly improves the capabilities of DVI documents. One aim of dvisvgm is to completely evaluate all
-PostScript snippets and to convert a large amount of it to SVG. However, in contrast to dvips, dvisvgm uses floating point
-arithmetics to compute the precise position of each graphic element, i.e. it doesn't round the coordinates. Therefore,
-the relative locations of the graphic elements may slightly differ from those computed by dvips.
+PostScript snippets and to convert as many of them as possible to SVG. In contrast to dvips, dvisvgm uses
+floating point arithmetics to compute the precise position of each graphic element, i.e. it doesn't round the
+coordinates. Therefore, the relative locations of the graphic elements may slightly differ from those computed
+by dvips.
+
-Since PostScript is a rather complex language, dvisvgm does not try to implement its own PostScript interpreter but relies on
-Ghostscript instead. If the Ghostscript library was not linked to the dvisvgm binary, it is looked up and loaded dynamically
-during runtime. In this case, dvisvgm looks for 'libgs.so.X' on Unix-like systems (supported ABI versions: 7,8,9),
-and for 'gsdll32.dll' or 'gsdll64.dll' on Windows.
+Since PostScript is a rather complex language, dvisvgm does not try to implement its own PostScript interpreter
+but relies on Ghostscript instead. If the Ghostscript library was not linked to the dvisvgm binary, it is looked up
+and loaded dynamically during runtime. In this case, dvisvgm looks for 'libgs.so.X' on Unix-like systems
+(supported ABI versions: 7,8,9), and for 'gsdll32.dll' or 'gsdll64.dll' on Windows.
You can override the default file names with environment variable +LIBGS+ or the command-line option *--libgs*.
-The library must be reachable through the ld search path (\*nix) or the PATH environment variable (Windows). Alternatively,
-the absolute file path can be specified. If the library cannot be found, dvisvgm disables the processing of PostScript specials.
-Use option *--list-specials* to check whether PS support is available, i.e. entry 'ps' is present.
+The library must be reachable through the ld search path (\*nix) or the PATH environment variable (Windows).
+Alternatively, the absolute file path can be specified. If the library cannot be found, dvisvgm disables the
+processing of PostScript specials and prints a warning message.
+Use option *--list-specials* to check whether PostScript support is available, i.e. entry 'ps' is present.
+
The PostScript handler also recognizes and evaluates bounding box data generated by the 'preview' package with
option 'tightpage'. If the data is present in a DVI file, dvisvgm adapts the bounding box of the generated SVG file
accordingly, and prints a message showing the width, height, and depth of the box in TeX point units. Especially,
-the depth value can be used to vertically align the SVG graphics with the baseline of surrounding text in HTML or XSL-FO
-documents, for example.
+the depth value can be used to vertically align the SVG graphics with the baseline of surrounding text in HTML
+or XSL-FO documents, for example.
*tpic*::
The TPIC special set defines instructions for drawing simple geometric objects. Some LaTeX packages, like
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BasicDVIReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/BasicDVIReader.cpp
index 155e729c2e9..199d570ea6d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BasicDVIReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/BasicDVIReader.cpp
@@ -143,10 +143,10 @@ void BasicDVIReader::executePostPost () {
if (!isStreamValid())
throw DVIException("invalid DVI file");
- seek(-1, ios_base::end); // stream pointer to last byte
+ seek(-1, ios::end); // stream pointer to last byte
int count=0;
while (peek() == 223) { // count trailing fill bytes
- seek(-1, ios_base::cur);
+ seek(-1, ios::cur);
count++;
}
if (count < 4) // the standard requires at least 4 trailing fill bytes
@@ -185,23 +185,23 @@ void BasicDVIReader::setDVIFormat (DVIFormat format) {
* Format: pre i[1] num[4] den[4] mag[4] k[1] x[k] */
void BasicDVIReader::cmdPre (int) {
setDVIFormat((DVIFormat)readUnsigned(1)); // identification number
- seek(12, ios_base::cur); // skip numerator, denominator, and mag factor
+ seek(12, ios::cur); // skip numerator, denominator, and mag factor
UInt32 k = readUnsigned(1); // length of following comment
- seek(k, ios_base::cur); // skip comment
+ seek(k, ios::cur); // skip comment
}
/** Executes postamble command.
* Format: post p[4] num[4] den[4] mag[4] l[4] u[4] s[2] t[2] */
void BasicDVIReader::cmdPost (int) {
- seek(28, ios_base::cur);
+ seek(28, ios::cur);
}
/** Executes postpost command.
* Format: postpost q[4] i[1] 223’s[>= 4] */
void BasicDVIReader::cmdPostPost (int) {
- seek(4, ios_base::cur);
+ seek(4, ios::cur);
setDVIFormat((DVIFormat)readUnsigned(1)); // identification byte
while (readUnsigned(1) == 223); // skip fill bytes (223), eof bit should be set now
}
@@ -209,83 +209,83 @@ void BasicDVIReader::cmdPostPost (int) {
/** Executes bop (begin of page) command.
* Format: bop c0[+4] ... c9[+4] p[+4] */
-void BasicDVIReader::cmdBop (int) {seek(44, ios_base::cur);}
+void BasicDVIReader::cmdBop (int) {seek(44, ios::cur);}
void BasicDVIReader::cmdEop (int) {}
void BasicDVIReader::cmdPush (int) {}
void BasicDVIReader::cmdPop (int) {}
void BasicDVIReader::cmdSetChar0 (int) {}
-void BasicDVIReader::cmdSetChar (int len) {seek(len, ios_base::cur);}
-void BasicDVIReader::cmdPutChar (int len) {seek(len, ios_base::cur);}
-void BasicDVIReader::cmdSetRule (int) {seek(8, ios_base::cur);}
-void BasicDVIReader::cmdPutRule (int) {seek(8, ios_base::cur);}
-void BasicDVIReader::cmdRight (int len) {seek(len, ios_base::cur);}
-void BasicDVIReader::cmdDown (int len) {seek(len, ios_base::cur);}
+void BasicDVIReader::cmdSetChar (int len) {seek(len, ios::cur);}
+void BasicDVIReader::cmdPutChar (int len) {seek(len, ios::cur);}
+void BasicDVIReader::cmdSetRule (int) {seek(8, ios::cur);}
+void BasicDVIReader::cmdPutRule (int) {seek(8, ios::cur);}
+void BasicDVIReader::cmdRight (int len) {seek(len, ios::cur);}
+void BasicDVIReader::cmdDown (int len) {seek(len, ios::cur);}
void BasicDVIReader::cmdX0 (int) {}
void BasicDVIReader::cmdY0 (int) {}
void BasicDVIReader::cmdW0 (int) {}
void BasicDVIReader::cmdZ0 (int) {}
-void BasicDVIReader::cmdX (int len) {seek(len, ios_base::cur);}
-void BasicDVIReader::cmdY (int len) {seek(len, ios_base::cur);}
-void BasicDVIReader::cmdW (int len) {seek(len, ios_base::cur);}
-void BasicDVIReader::cmdZ (int len) {seek(len, ios_base::cur);}
+void BasicDVIReader::cmdX (int len) {seek(len, ios::cur);}
+void BasicDVIReader::cmdY (int len) {seek(len, ios::cur);}
+void BasicDVIReader::cmdW (int len) {seek(len, ios::cur);}
+void BasicDVIReader::cmdZ (int len) {seek(len, ios::cur);}
void BasicDVIReader::cmdNop (int) {}
-void BasicDVIReader::cmdDir (int) {seek(1, ios_base::cur);}
+void BasicDVIReader::cmdDir (int) {seek(1, ios::cur);}
void BasicDVIReader::cmdFontNum0 (int) {}
-void BasicDVIReader::cmdFontNum (int len) {seek(len, ios_base::cur);}
-void BasicDVIReader::cmdXXX (int len) {seek(readUnsigned(len), ios_base::cur);}
+void BasicDVIReader::cmdFontNum (int len) {seek(len, ios::cur);}
+void BasicDVIReader::cmdXXX (int len) {seek(readUnsigned(len), ios::cur);}
/** Executes fontdef command.
* Format fontdef k[len] c[4] s[4] d[4] a[1] l[1] n[a+l]
* @param[in] len size of font number variable (in bytes) */
void BasicDVIReader::cmdFontDef (int len) {
- seek(len+12, ios_base::cur); // skip font number
- UInt32 pathlen = readUnsigned(1); // length of font path
- UInt32 namelen = readUnsigned(1); // length of font name
- seek(pathlen+namelen, ios_base::cur);
+ seek(len+12, ios::cur); // skip font number
+ UInt32 pathlen = readUnsigned(1); // length of font path
+ UInt32 namelen = readUnsigned(1); // length of font name
+ seek(pathlen+namelen, ios::cur);
}
/** XDV extension: include image or pdf file.
* parameters: box[1] matrix[4][6] p[2] len[2] path[l] */
void BasicDVIReader::cmdXPic (int) {
- seek(1+24+2, ios_base::cur);
+ seek(1+24+2, ios::cur);
UInt16 len = readUnsigned(2);
- seek(len, ios_base::cur);
+ seek(len, ios::cur);
}
void BasicDVIReader::cmdXFontDef (int) {
- seek(4+4, ios_base::cur);
+ seek(4+4, ios::cur);
UInt16 flags = readUnsigned(2);
UInt8 psname_len = readUnsigned(1);
UInt8 fmname_len = readUnsigned(1);
UInt8 stname_len = readUnsigned(1);
- seek(psname_len+fmname_len+stname_len, ios_base::cur);
+ seek(psname_len+fmname_len+stname_len, ios::cur);
if (flags & 0x0200) // colored?
- seek(4, ios_base::cur);
+ seek(4, ios::cur);
if (flags & 0x1000) // extend?
- seek(4, ios_base::cur);
+ seek(4, ios::cur);
if (flags & 0x2000) // slant?
- seek(4, ios_base::cur);
+ seek(4, ios::cur);
if (flags & 0x4000) // embolden?
- seek(4, ios_base::cur);
+ seek(4, ios::cur);
if (flags & 0x0800) { // variations?
UInt16 num_variations = readSigned(2);
- seek(4*num_variations, ios_base::cur);
+ seek(4*num_variations, ios::cur);
}
}
void BasicDVIReader::cmdXGlyphA (int) {
- seek(4, ios_base::cur);
+ seek(4, ios::cur);
UInt16 num_glyphs = readUnsigned(2);
- seek(10*num_glyphs, ios_base::cur);
+ seek(10*num_glyphs, ios::cur);
}
void BasicDVIReader::cmdXGlyphS (int) {
- seek(4, ios_base::cur);
+ seek(4, ios::cur);
UInt16 num_glyphs = readUnsigned(2);
- seek(6*num_glyphs, ios_base::cur);
+ seek(6*num_glyphs, ios::cur);
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BasicDVIReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/BasicDVIReader.h
index 0b810f6c1cd..0b810f6c1cd 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BasicDVIReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/BasicDVIReader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Bezier.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Bezier.cpp
index 10201fa5062..bb2142afa21 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Bezier.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Bezier.cpp
@@ -30,18 +30,12 @@ Bezier::Bezier () {
/** Creates a quadratic Bézier curve. internally, it's represented as a cubic one. */
Bezier::Bezier (const DPair &p0, const DPair &p1, const DPair &p2) {
- _points[0] = p0;
- _points[1] = p0+(p1-p0)*2.0/3.0;
- _points[2] = p2+(p1-p2)*2.0/3.0;
- _points[3] = p2;
+ setPoints(p0, p0+(p1-p0)*2.0/3.0, p2+(p1-p2)*2.0/3.0, p2);
}
Bezier::Bezier (const DPair &p0, const DPair &p1, const DPair &p2, const DPair &p3) {
- _points[0] = p0;
- _points[1] = p1;
- _points[2] = p2;
- _points[3] = p3;
+ setPoints(p0, p1, p2, p3);
}
@@ -68,6 +62,14 @@ Bezier::Bezier (const Bezier &source, double t0, double t1) {
}
+void Bezier::setPoints(const DPair &p0, const DPair &p1, const DPair &p2, const DPair &p3) {
+ _points[0] = p0;
+ _points[1] = p1;
+ _points[2] = p2;
+ _points[3] = p3;
+}
+
+
void Bezier::reverse() {
swap(_points[0], _points[3]);
swap(_points[1], _points[2]);
@@ -80,6 +82,19 @@ DPair Bezier::pointAt (double t) const {
}
+/** Returns a value of the Bézier curve's blossom representation. */
+DPair Bezier::blossomValue (double u, double v, double w) const {
+ const double uv = u*v;
+ const double uw = u*w;
+ const double vw = v*w;
+ const double uvw = u*v*w;
+ return _points[0]*(1.0-u-v-w+uv+uw+vw-uvw)
+ +_points[1]*(u+v+w-2.0*(uv+uw+vw)+3.0*uvw)
+ +_points[2]*(uv+uw+vw-3.0*uvw)
+ +_points[3]*uvw;
+}
+
+
/** Splits the curve at t into two sub-curves. */
void Bezier::subdivide (double t, Bezier *bezier1, Bezier *bezier2) const {
const double s = 1-t;
@@ -89,18 +104,10 @@ void Bezier::subdivide (double t, Bezier *bezier1, Bezier *bezier2) const {
DPair p012 = p01*s + p12*t;
DPair p123 = p12*s + p23*t;
DPair p0123 = p012*s + p123*t;
- if (bezier1) {
- bezier1->_points[0] = _points[0];
- bezier1->_points[1] = p01;
- bezier1->_points[2] = p012;
- bezier1->_points[3] = p0123;
- }
- if (bezier2) {
- bezier2->_points[0] = p0123;
- bezier2->_points[1] = p123;
- bezier2->_points[2] = p23;
- bezier2->_points[3] = _points[3];
- }
+ if (bezier1)
+ bezier1->setPoints(_points[0], p01, p012, p0123);
+ if (bezier2)
+ bezier2->setPoints(p0123, p123, p23, _points[3]);
}
@@ -186,3 +193,50 @@ int Bezier::reduceDegree (double delta, vector<DPair> &p) const {
}
return p.size()-1;
}
+
+
+/** Try to solve the quadratic equation ax^2 + bx + c = 0. */
+static bool solve_quadratic_equation (double a, double b, double c, double &x1, double &x2) {
+ if (a == 0) {
+ if (b == 0)
+ return false;
+ x1 = x2 = -c/b;
+ }
+ else {
+ double discr = b*b - 4*a*c;
+ if (discr < 0)
+ return false;
+ double p = -b/a/2;
+ double r = sqrt(discr)/a/2;
+ x1 = p+r;
+ x2 = p-r;
+ }
+ return true;
+}
+
+
+/** Returns a tight bounding box parallel to the x- and y-axis. */
+void Bezier::getBBox (BoundingBox &bbox) const {
+ bbox.invalidate();
+ // coefficients of the derivative
+ DPair pa = _points[3] - _points[2]*3.0 + _points[1]*3.0 - _points[0];
+ DPair pb = (_points[2]-_points[1]*2.0+_points[0])*2.0;
+ DPair pc = _points[1]-_points[0];
+
+ // compute extrema for t > 0 and t < 1
+ double t1, t2;
+ if (solve_quadratic_equation(pa.x(), pb.x(), pc.x(), t1, t2)) {
+ if (t1 > 0.001 && t1 < 0.999)
+ bbox.embed(pointAt(t1));
+ if (t1 != t2 && t2 > 0.001 && t2 < 0.999)
+ bbox.embed(pointAt(t2));
+ }
+ if (solve_quadratic_equation(pa.y(), pb.y(), pc.y(), t1, t2)) {
+ if (t1 > 0.001 && t1 < 0.999)
+ bbox.embed(pointAt(t1));
+ if (t1 != t2 && t2 > 0.001 && t2 < 0.999)
+ bbox.embed(pointAt(t2));
+ }
+ bbox.embed(_points[0]);
+ bbox.embed(_points[3]);
+} \ No newline at end of file
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Bezier.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Bezier.h
index ee763ede172..b20578b87b0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Bezier.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Bezier.h
@@ -22,23 +22,27 @@
#define DVISVGM_BEZIER_H
#include <vector>
+#include "BoundingBox.h"
#include "Pair.h"
class Bezier
{
- public:
+ public:
+ Bezier ();
Bezier (const DPair &p0, const DPair &p1, const DPair &p2);
- Bezier (const DPair &p0, const DPair &p1, const DPair &p2, const DPair &p3);
+ Bezier (const DPair &p0, const DPair &p1, const DPair &p2, const DPair &p3);
Bezier (const Bezier &source, double t0, double t1);
+ void setPoints (const DPair &p0, const DPair &p1, const DPair &p2, const DPair &p3);
void reverse ();
DPair pointAt (double t) const;
+ DPair blossomValue (double u, double v, double w) const;
void subdivide (double t, Bezier *bezier1, Bezier *bezier2) const;
int approximate (double delta, std::vector<DPair> &p, std::vector<double> *t=0) const;
const DPair& point (int i) const {return _points[i];}
int reduceDegree (double delta, std::vector<DPair> &p) const;
+ void getBBox (BoundingBox &bbox) const;
protected:
- Bezier ();
int approximate (double delta, double t0, double t1, std::vector<DPair> &p, std::vector<double> *t) const;
private:
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BgColorSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/BgColorSpecialHandler.cpp
index dd19e4b5f53..dd19e4b5f53 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BgColorSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/BgColorSpecialHandler.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BgColorSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/BgColorSpecialHandler.h
index edd764e86b2..edd764e86b2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BgColorSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/BgColorSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Bitmap.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Bitmap.cpp
index 265533b1ef5..265533b1ef5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Bitmap.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Bitmap.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Bitmap.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Bitmap.h
index 0883688bd9a..0883688bd9a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Bitmap.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Bitmap.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BoundingBox.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/BoundingBox.cpp
index f6c5d0b3b9b..f6c5d0b3b9b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BoundingBox.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/BoundingBox.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BoundingBox.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/BoundingBox.h
index 6d38edf6e3b..84ab3eb022e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/BoundingBox.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/BoundingBox.h
@@ -67,6 +67,7 @@ class BoundingBox
double height () const {return _lry-_uly;}
void lock () {_locked = true;}
void unlock () {_locked = false;}
+ void invalidate () {_valid = false;}
void operator += (const BoundingBox &bb);
void scale (double sx, double sy);
void transform (const Matrix &tm);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMap.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMap.cpp
index 6b940300f8e..6b940300f8e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMap.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMap.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMap.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMap.h
index 324c51800fa..324c51800fa 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMap.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMap.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMapManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMapManager.cpp
index eb73d72f3c4..eb73d72f3c4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMapManager.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMapManager.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMapManager.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMapManager.h
index 6918ed93e98..6918ed93e98 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMapManager.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMapManager.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMapReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMapReader.cpp
index 502e42ef2e0..502e42ef2e0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMapReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMapReader.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMapReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMapReader.h
index d9567e79433..d9567e79433 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CMapReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CMapReader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CRC32.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CRC32.cpp
index 3f85710c6b7..3f85710c6b7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CRC32.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CRC32.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CRC32.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CRC32.h
index 35cd4d4399a..35cd4d4399a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CRC32.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CRC32.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Calculator.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Calculator.cpp
index 12a35a35edd..12a35a35edd 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Calculator.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Calculator.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Calculator.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Calculator.h
index fdd4ed177d5..fdd4ed177d5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Calculator.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Calculator.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CharMapID.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CharMapID.cpp
index 4c15abde98f..4c15abde98f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CharMapID.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CharMapID.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CharMapID.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CharMapID.h
index acc1a8482de..acc1a8482de 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CharMapID.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CharMapID.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Character.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Character.h
index a9d0f6a2d6d..a9d0f6a2d6d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Character.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Character.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CmdLineParserBase.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CmdLineParserBase.cpp
index 2c8d133cc97..2c8d133cc97 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CmdLineParserBase.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CmdLineParserBase.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CmdLineParserBase.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CmdLineParserBase.h
index 855186f9d4b..855186f9d4b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CmdLineParserBase.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CmdLineParserBase.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Color.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Color.cpp
new file mode 100644
index 00000000000..b131074ada4
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Color.cpp
@@ -0,0 +1,509 @@
+/*************************************************************************
+** Color.cpp **
+** **
+** This file is part of dvisvgm -- the DVI to SVG converter **
+** Copyright (C) 2005-2014 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 **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#define _USE_MATH_DEFINES
+#include <config.h>
+#include <algorithm>
+#include <cctype>
+#include <cmath>
+#include <cstdlib>
+#include <cstring>
+#include <iomanip>
+#include <sstream>
+#include "Color.h"
+
+using namespace std;
+
+
+const Color Color::BLACK(UInt32(0));
+const Color Color::WHITE(UInt8(255), UInt8(255), UInt8(255));
+const Color Color::TRANSPARENT(UInt32(0xff000000));
+
+
+static inline UInt8 double_to_byte (double v) {
+ v = max(0.0, min(1.0, v));
+ return UInt8(floor(255*v+0.5));
+}
+
+
+static void tolower (string &str) {
+ for (size_t i=0; i < str.length(); i++)
+ str[i] = tolower(str[i]);
+}
+
+
+Color::Color (const char *name) {
+ if (!setName(name, false))
+ setGray(UInt8(0));
+}
+
+
+Color::Color (const string &name) {
+ if (!setName(name, false))
+ setGray(UInt8(0));
+}
+
+
+void Color::setRGB (double r, double g, double b) {
+ setRGB(double_to_byte(r), double_to_byte(g), double_to_byte(b));
+}
+
+
+bool Color::setName (string name, bool case_sensitive) {
+ if (name[0] == '#') {
+ char *p=0;
+ _rgb = UInt32(strtol(name.c_str()+1, &p, 16));
+ while (isspace(*p))
+ p++;
+ return (*p == 0 && _rgb <= 0xFFFFFF);
+ }
+ // converted color constants from color.pro
+ static const struct ColorConstant {
+ const char *name;
+ const UInt32 rgb;
+ }
+ constants[] = {
+ {"Apricot", 0xFFAD7A},
+ {"Aquamarine", 0x2DFFB2},
+ {"Bittersweet", 0xC10200},
+ {"Black", 0x000000},
+ {"Blue", 0x0000FF},
+ {"BlueGreen", 0x26FFAA},
+ {"BlueViolet", 0x190CF4},
+ {"BrickRed", 0xB70000},
+ {"Brown", 0x660000},
+ {"BurntOrange", 0xFF7C00},
+ {"CadetBlue", 0x606DC4},
+ {"CarnationPink", 0xFF5EFF},
+ {"Cerulean", 0x0FE2FF},
+ {"CornflowerBlue", 0x59DDFF},
+ {"Cyan", 0x00FFFF},
+ {"Dandelion", 0xFFB528},
+ {"DarkOrchid", 0x9932CC},
+ {"Emerald", 0x00FF7F},
+ {"ForestGreen", 0x00E000},
+ {"Fuchsia", 0x7202EA},
+ {"Goldenrod", 0xFFE528},
+ {"Gray", 0x7F7F7F},
+ {"Green", 0x00FF00},
+ {"GreenYellow", 0xD8FF4F},
+ {"JungleGreen", 0x02FF7A},
+ {"Lavender", 0xFF84FF},
+ {"LimeGreen", 0x7FFF00},
+ {"Magenta", 0xFF00FF},
+ {"Mahogany", 0xA50000},
+ {"Maroon", 0xAD0000},
+ {"Melon", 0xFF897F},
+ {"MidnightBlue", 0x007091},
+ {"Mulberry", 0xA314F9},
+ {"NavyBlue", 0x0F75FF},
+ {"OliveGreen", 0x009900},
+ {"Orange", 0xFF6321},
+ {"OrangeRed", 0xFF007F},
+ {"Orchid", 0xAD5BFF},
+ {"Peach", 0xFF7F4C},
+ {"Periwinkle", 0x6D72FF},
+ {"PineGreen", 0x00BF28},
+ {"Plum", 0x7F00FF},
+ {"ProcessBlue", 0x0AFFFF},
+ {"Purple", 0x8C23FF},
+ {"RawSienna", 0x8C0000},
+ {"Red", 0xFF0000},
+ {"RedOrange", 0xFF3A21},
+ {"RedViolet", 0x9600A8},
+ {"Rhodamine", 0xFF2DFF},
+ {"RoyalBlue", 0x007FFF},
+ {"RoyalPurple", 0x3F19FF},
+ {"RubineRed", 0xFF00DD},
+ {"Salmon", 0xFF779E},
+ {"SeaGreen", 0x4FFF7F},
+ {"Sepia", 0x4C0000},
+ {"SkyBlue", 0x60FFE0},
+ {"SpringGreen", 0xBCFF3D},
+ {"Tan", 0xDB9370},
+ {"TealBlue", 0x1EF9A3},
+ {"Thistle", 0xE068FF},
+ {"Turquoise", 0x26FFCC},
+ {"Violet", 0x351EFF},
+ {"VioletRed", 0xFF30FF},
+ {"White", 0xFFFFFF},
+ {"WildStrawberry", 0xFF0A9B},
+ {"Yellow", 0xFFFF00},
+ {"YellowGreen", 0x8EFF42},
+ {"YellowOrange", 0xFF9300},
+ };
+ if (!case_sensitive) {
+ tolower(name);
+ for (size_t i=0; i < sizeof(constants)/sizeof(ColorConstant); i++) {
+ string cmpname = constants[i].name;
+ tolower(cmpname);
+ if (name == cmpname) {
+ _rgb = constants[i].rgb;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ // binary search
+ int first=0, last=sizeof(constants)/sizeof(ColorConstant)-1;
+ while (first <= last) {
+ int mid = first+(last-first)/2;
+ int cmp = strcmp(constants[mid].name, name.c_str());
+ if (cmp > 0)
+ last = mid-1;
+ else if (cmp < 0)
+ first = mid+1;
+ else {
+ _rgb = constants[mid].rgb;
+ return true;
+ }
+ }
+ return false;
+}
+
+
+void Color::setHSB (double h, double s, double b) {
+ valarray<double> hsb(3), rgb(3);
+ hsb[0] = h;
+ hsb[1] = s;
+ hsb[2] = b;
+ HSB2RGB(hsb, rgb);
+ setRGB(rgb);
+}
+
+
+void Color::setCMYK (double c, double m, double y, double k) {
+ valarray<double> cmyk(4), rgb(3);
+ cmyk[0] = c;
+ cmyk[1] = m;
+ cmyk[2] = y;
+ cmyk[3] = k;
+ CMYK2RGB(cmyk, rgb);
+ setRGB(rgb);
+}
+
+
+void Color::setCMYK (const std::valarray<double> &cmyk) {
+ valarray<double> rgb(3);
+ CMYK2RGB(cmyk, rgb);
+ setRGB(rgb);
+}
+
+
+void Color::set (ColorSpace colorSpace, VectorIterator<double> &it) {
+ switch (colorSpace) {
+ case GRAY_SPACE: setGray(*it++); break;
+ case RGB_SPACE : setRGB(*it, *(it+1), *(it+2)); it+=3; break;
+ case LAB_SPACE : setLab(*it, *(it+1), *(it+2)); it+=3; break;
+ case CMYK_SPACE: setCMYK(*it, *(it+1), *(it+2), *(it+3)); it+=4; break;
+ }
+}
+
+
+void Color::operator *= (double c) {
+ UInt32 rgb=0;
+ for (int i=0; i < 3; i++) {
+ rgb |= UInt32(floor((_rgb & 0xff)*c+0.5)) << (8*i);
+ _rgb >>= 8;
+ }
+ _rgb = rgb;
+}
+
+
+string Color::rgbString () const {
+ ostringstream oss;
+ oss << '#';
+ for (int i=2; i >= 0; i--) {
+ oss << setbase(16) << setfill('0') << setw(2)
+ << (((_rgb >> (8*i)) & 0xff));
+ }
+ return oss.str();
+}
+
+
+/** Approximates a CMYK color by an RGB triple. The component values
+ * are expected to be normalized, i.e. 0 <= cmyk[i],rgb[j] <= 1.
+ * @param[in] cmyk color in CMYK space
+ * @param[out] rgb RGB approximation */
+void Color::CMYK2RGB (const valarray<double> &cmyk, valarray<double> &rgb) {
+ double kc = 1.0-cmyk[3];
+ for (int i=0; i < 3; i++)
+ rgb[i] = min(1.0, max(0.0, (1.0-cmyk[i])*kc));
+}
+
+
+void Color::RGB2CMYK (const valarray<double> &rgb, valarray<double> &cmyk) {
+ double c = 1-rgb[0];
+ double m = 1-rgb[1];
+ double y = 1-rgb[2];
+ cmyk[3] = min(min(c, m), y);
+ cmyk[0] = c-cmyk[3];
+ cmyk[1] = m-cmyk[3];
+ cmyk[2] = y-cmyk[3];
+}
+
+
+/** Converts a color given in HSB coordinates to RGB.
+ * @param[in] hsb color in HSB space
+ * @param[out] rgb color in RGB space */
+void Color::HSB2RGB (const valarray<double> &hsb, valarray<double> &rgb) {
+ if (hsb[1] == 0)
+ rgb[0] = rgb[1] = rgb[2] = hsb[2];
+ else {
+ double h = hsb[0]-floor(hsb[0]);
+ int i = int(6*h);
+ double f = 6*h-i;
+ double p = hsb[2]*(1-hsb[1]);
+ double q = hsb[2]*(1-hsb[1]*f);
+ double t = hsb[2]*(1-hsb[1]*(1-f));
+ switch (i) {
+ case 0 : rgb[0]=hsb[2]; rgb[1]=t; rgb[2]=p; break;
+ case 1 : rgb[0]=q; rgb[1]=hsb[2]; rgb[2]=p; break;
+ case 2 : rgb[0]=p; rgb[1]=hsb[2]; rgb[2]=t; break;
+ case 3 : rgb[0]=p; rgb[1]=q; rgb[2]=hsb[2]; break;
+ case 4 : rgb[0]=t; rgb[1]=p; rgb[2]=hsb[2]; break;
+ case 5 : rgb[0]=hsb[2]; rgb[1]=p; rgb[2]=q; break;
+ default: ; // prevent compiler warning
+ }
+ }
+}
+
+
+double Color::getGray () const {
+ double r, g, b;
+ getRGB(r, g, b);
+ return r*0.3 + g*0.59 + b*0.11; // gray value according to NTSC video standard
+}
+
+
+void Color::getGray (valarray<double> &gray) const {
+ gray.resize(1);
+ gray[0] = getGray();
+}
+
+
+void Color::getRGB (double &r, double &g, double &b) const {
+ r = ((_rgb >> 16) & 255) / 255.0;
+ g = ((_rgb >> 8) & 255) / 255.0;
+ b = (_rgb & 255) / 255.0;
+}
+
+
+void Color::getRGB (valarray<double> &rgb) const {
+ rgb.resize(3);
+ double r, g, b;
+ getRGB(r, g, b);
+ rgb[0] = r;
+ rgb[1] = g;
+ rgb[2] = b;
+}
+
+
+void Color::getCMYK (double &c, double &m, double &y, double &k) const {
+ valarray<double> rgb(3), cmyk(4);
+ getRGB(rgb);
+ RGB2CMYK(rgb, cmyk);
+ c = cmyk[0];
+ m = cmyk[1];
+ y = cmyk[2];
+ k = cmyk[3];
+}
+
+
+void Color::getCMYK (std::valarray<double> &cmyk) const {
+ cmyk.resize(4);
+ valarray<double> rgb(3);
+ getRGB(rgb);
+ RGB2CMYK(rgb, cmyk);
+}
+
+
+void Color::getXYZ (double &x, double &y, double &z) const {
+ valarray<double> rgb(3), xyz(3);
+ getRGB(rgb);
+ RGB2XYZ(rgb, xyz);
+ x = xyz[0];
+ y = xyz[1];
+ z = xyz[2];
+}
+
+
+void Color::setXYZ (double x, double y, double z) {
+ valarray<double> xyz(3), rgb(3);
+ xyz[0] = x;
+ xyz[1] = y;
+ xyz[2] = z;
+ XYZ2RGB(xyz, rgb);
+ setRGB(rgb);
+}
+
+
+void Color::setXYZ (const valarray<double> &xyz) {
+ valarray<double> rgb(3);
+ XYZ2RGB(xyz, rgb);
+ setRGB(rgb);
+}
+
+
+void Color::setLab (double l, double a, double b) {
+ valarray<double> lab(3), xyz(3);
+ lab[0] = l;
+ lab[1] = a;
+ lab[2] = b;
+ Lab2XYZ(lab, xyz);
+ setXYZ(xyz);
+}
+
+
+void Color::setLab (const valarray<double> &lab) {
+ valarray<double> xyz(3);
+ Lab2XYZ(lab, xyz);
+ setXYZ(xyz);
+}
+
+
+/** Get the color in CIELAB color space using the sRGB working space and reference white D65. */
+void Color::getLab (double &l, double &a, double &b) const {
+ valarray<double> rgb(3), lab(3);
+ getRGB(rgb);
+ RGB2Lab(rgb, lab);
+ l = lab[0];
+ a = lab[1];
+ b = lab[2];
+}
+
+
+void Color::getLab (std::valarray<double> &lab) const {
+ lab.resize(3);
+ valarray<double> rgb(3);
+ getRGB(rgb);
+ RGB2Lab(rgb, lab);
+}
+
+
+static inline double sqr (double x) {return x*x;}
+static inline double cube (double x) {return x*x*x;}
+
+
+void Color::Lab2XYZ (const valarray<double> &lab, valarray<double> &xyz) {
+ xyz.resize(3);
+ double wx=0.95047, wy=1.00, wz=1.08883; // reference white D65
+ double eps = 0.008856;
+ double kappa = 903.3;
+ double fy = (lab[0]+16)/116;
+ double fx = lab[1]/500 + fy;
+ double fz = fy - lab[2]/200;
+ double xr = (cube(fx) > eps ? cube(fx) : (116*fx-16)/kappa);
+ double yr = (lab[0] > kappa*eps ? cube((lab[0]+16)/116) : lab[0]/kappa);
+ double zr = (cube(fz) > eps ? cube(fz) : (116*fz-16)/kappa);
+ xyz[0] = xr*wx;
+ xyz[1] = yr*wy;
+ xyz[2] = zr*wz;
+}
+
+
+void Color::XYZ2RGB (const valarray<double> &xyz, valarray<double> &rgb) {
+ rgb.resize(3);
+ rgb[0] = 3.2404542*xyz[0] - 1.5371385*xyz[1] - 0.4985314*xyz[2];
+ rgb[1] = -0.9692660*xyz[0] + 1.8760108*xyz[1] + 0.0415560*xyz[2];
+ rgb[2] = 0.0556434*xyz[0] - 0.2040259*xyz[1] + 1.0572252*xyz[2];
+ for (int i=0; i < 3; i++)
+ rgb[i] = (rgb[i] <= 0.0031308 ? 12.92*rgb[i] : 1.055*pow(rgb[i], 1/2.4)-0.055);
+}
+
+
+void Color::RGB2XYZ (valarray<double> rgb, valarray<double> &xyz) {
+ xyz.resize(3);
+ for (int i=0; i < 3; i++)
+ rgb[i] = (rgb[i] <= 0.04045 ? rgb[i]/12.92 : pow((rgb[i]+0.055)/1.055, 2.4));
+ xyz[0] = 0.4124564*rgb[0] + 0.3575761*rgb[1] + 0.1804375*rgb[2];
+ xyz[1] = 0.2126729*rgb[0] + 0.7151522*rgb[1] + 0.0721750*rgb[2];
+ xyz[2] = 0.0193339*rgb[0] + 0.1191920*rgb[1] + 0.9503041*rgb[2];
+}
+
+
+void Color::RGB2Lab (const valarray<double> &rgb, valarray<double> &lab) {
+ double wx=0.95047, wy=1.00, wz=1.08883; // reference white D65
+ double eps = 0.008856;
+ double kappa = 903.3;
+ valarray<double> xyz(3);
+ RGB2XYZ(rgb, xyz);
+ xyz[0] /= wx;
+ xyz[1] /= wy;
+ xyz[2] /= wz;
+ double fx = (xyz[0] > eps ? pow(xyz[0], 1.0/3) : (kappa*xyz[0]+16)/116);
+ double fy = (xyz[1] > eps ? pow(xyz[1], 1.0/3) : (kappa*xyz[1]+16)/116);
+ double fz = (xyz[2] > eps ? pow(xyz[2], 1.0/3) : (kappa*xyz[2]+16)/116);
+ lab[0] = 116*fy-16;
+ lab[1] = 500*(fx-fy);
+ lab[2] = 200*(fy-fz);
+}
+
+
+/** Returns the Delta E difference (CIE 2000) between this and another color. */
+double Color::deltaE (const Color &c) const {
+ double l1, a1, b1;
+ double l2, a2, b2;
+ getLab(l1, a1, b1);
+ c.getLab(l2, a2, b2);
+ double dl = l2-l1;
+ double lm = (l1+l2)/2;
+ double c1 = sqrt(a1*a1 + b1*b1);
+ double c2 = sqrt(a2*a2 + b2*b2);
+ double cm = (c1+c2)/2;
+ double g = (1-sqrt(pow(cm, 7)/(pow(cm, 7)+pow(25, 7))))/2;
+ double aa1 = a1*(1+g);
+ double aa2 = a2*(1+g);
+ double cc1 = sqrt(aa1*aa1 + b1*b1);
+ double cc2 = sqrt(aa2*aa2 + b2*b2);
+ double ccm = (cc1+cc2)/2;
+ double dcc = cc2-cc1;
+ double h1 = atan2(b1, aa1)*180/M_PI;
+ if (h1 < 0) h1 += 360;
+ double h2 = atan2(b2, aa2)*180/M_PI;
+ if (h2 < 0) h2 += 360;
+ double hm = (abs(h1-h2) > 180 ? (h1+h2+360) : (h1+h2))/2;
+ double t = 1 - 0.17*cos(hm-30) + 0.24*cos(2*hm) + 0.32*cos(3*hm+6) - 0.2*cos(4*hm-63);
+ double dh = h2-h1;
+ if (h2-h1 < -180)
+ dh += 360;
+ else if (h2-h1 > 180)
+ dh -= 360;
+ double dhh = 2*sqrt(cc1*cc2)*sin(dh/2);
+ double sl = 1 + 0.015*(lm-50.0)*(lm-50.0)/sqrt(20.0+(lm-50.0));
+ double sc = 1 + 0.045*ccm;
+ double sh = 1 + 0.015*ccm*t;
+ double dtheta = 30*exp(-sqr(hm-275)/25);
+ double rc = 2*sqrt(pow(ccm, 7)/(pow(ccm, 7)+pow(25, 7)));
+ double rt = -rc*sin(2*dtheta);
+ return sqrt(sqr(dl/sl) + sqr(dcc/sc) + sqr(dhh/sh) + rt*dcc/sc*dhh/sh);
+}
+
+
+int Color::numComponents (ColorSpace colorSpace) {
+ switch (colorSpace) {
+ case GRAY_SPACE: return 1;
+ case LAB_SPACE:
+ case RGB_SPACE: return 3;
+ case CMYK_SPACE: return 4;
+ }
+ return 0;
+} \ No newline at end of file
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Color.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Color.h
new file mode 100644
index 00000000000..5657be84892
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Color.h
@@ -0,0 +1,95 @@
+/*************************************************************************
+** Color.h **
+** **
+** This file is part of dvisvgm -- the DVI to SVG converter **
+** Copyright (C) 2005-2014 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 **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#ifndef DVISVGM_COLOR_H
+#define DVISVGM_COLOR_H
+
+#include <string>
+#include <valarray>
+#include <vector>
+#include "types.h"
+#include "VectorIterator.h"
+
+#ifdef TRANSPARENT
+#undef TRANSPARENT
+#endif
+
+class Color
+{
+ public:
+ static const Color BLACK;
+ static const Color WHITE;
+ static const Color TRANSPARENT;
+
+ enum ColorSpace {GRAY_SPACE, RGB_SPACE, CMYK_SPACE, LAB_SPACE};
+
+ public:
+ Color () : _rgb(0) {}
+ Color (UInt32 rgb) : _rgb(rgb) {}
+ Color (UInt8 r, UInt8 g, UInt8 b) {setRGB(r,g,b);}
+ Color (double r, double g, double b) {setRGB(r,g,b);}
+ Color (const std::valarray<double> &rgb) {setRGB(rgb);}
+ Color (const char *name);
+ Color (const std::string &name);
+// Color (ColorSpace colorSpace, std::vector<double>::const_iterator &it) {set(colorSpace, it);}
+ operator UInt32 () const {return _rgb;}
+ bool operator == (const Color &c) const {return _rgb == c._rgb;}
+ bool operator != (const Color &c) const {return _rgb != c._rgb;}
+ void setRGB (UInt8 r, UInt8 g, UInt8 b) {_rgb = (r << 16) | (g << 8) | b;}
+ void setRGB (double r, double g, double b);
+ void setRGB (const std::valarray<double> &rgb) {setRGB(rgb[0], rgb[1], rgb[2]);}
+ bool setName (std::string name, bool case_sensitive=true);
+ void setGray (UInt8 g) {setRGB(g,g,g);}
+ void setGray (double g) {setRGB(g,g,g);}
+ void setGray (const std::valarray<double> &gray) {setRGB(gray[0], gray[0], gray[0]);}
+ void setHSB (double h, double s, double b);
+ void setCMYK (double c, double m, double y, double k);
+ void setCMYK (const std::valarray<double> &cmyk);
+ void setXYZ (double x, double y, double z);
+ void setXYZ (const std::valarray<double> &xyz);
+ void setLab (double l, double a, double b);
+ void setLab (const std::valarray<double> &lab);
+ void set (ColorSpace colorSpace, VectorIterator<double> &it);
+ double getGray () const;
+ void getGray (std::valarray<double> &gray) const;
+ void getRGB (double &r, double &g, double &b) const;
+ void getRGB (std::valarray<double> &rgb) const;
+ void getCMYK (double &c, double &m, double &y, double &k) const;
+ void getCMYK (std::valarray<double> &cmyk) const;
+ void getXYZ (double &x, double &y, double &z) const;
+ void getLab (double &l, double &a, double &b) const;
+ void getLab (std::valarray<double> &lab) const;
+ void operator *= (double c);
+ double deltaE (const Color &c) const;
+ std::string rgbString () const;
+ static void CMYK2RGB (const std::valarray<double> &cmyk, std::valarray<double> &rgb);
+ static void RGB2CMYK (const std::valarray<double> &rgb, std::valarray<double> &cmyk);
+ static void HSB2RGB (const std::valarray<double> &hsb, std::valarray<double> &rgb);
+ static void RGB2XYZ (std::valarray<double> rgb, std::valarray<double> &xyz);
+ static void XYZ2RGB (const std::valarray<double> &xyz, std::valarray<double> &rgb);
+ static void RGB2Lab (const std::valarray<double> &rgb, std::valarray<double> &lab);
+ static void Lab2XYZ (const std::valarray<double> &lab, std::valarray<double> &xyz);
+ static int numComponents (ColorSpace colorSpace);
+
+ private:
+ UInt32 _rgb;
+};
+
+#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ColorSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ColorSpecialHandler.cpp
index 937c0f42877..b44cf5ec011 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ColorSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ColorSpecialHandler.cpp
@@ -31,9 +31,9 @@
using namespace std;
-static float read_float (istream &is) {
+static double read_double (istream &is) {
is.clear();
- float v;
+ double v;
is >> v;
if (is.fail())
throw SpecialException("number expected");
@@ -41,13 +41,13 @@ static float read_float (istream &is) {
}
-/** Reads multiple float values from a given stream. The number of
+/** Reads multiple double values from a given stream. The number of
* values read is determined by the size of the result vector.
* @param[in] is stream to be read from
- * @param[out] v the resulting floats */
-static void read_floats (istream &is, vector<float> &v) {
+ * @param[out] v the resulting values */
+static void read_doubles (istream &is, vector<double> &v) {
for (size_t i=0; i < v.size(); i++)
- v[i] = read_float(is);
+ v[i] = read_double(is);
}
@@ -64,23 +64,23 @@ static void read_color (string model, istream &is, Color &color) {
if (model.empty())
is >> model;
if (model == "rgb") {
- vector<float> rgb(3);
- read_floats(is, rgb);
- color.set(rgb[0], rgb[1], rgb[2]);
+ vector<double> rgb(3);
+ read_doubles(is, rgb);
+ color.setRGB(rgb[0], rgb[1], rgb[2]);
}
else if (model == "cmyk") {
- vector<float> cmyk(4);
- read_floats(is, cmyk);
+ vector<double> cmyk(4);
+ read_doubles(is, cmyk);
color.setCMYK(cmyk[0], cmyk[1], cmyk[2], cmyk[3]);
}
else if (model == "hsb") {
- vector<float> hsb(3);
- read_floats(is, hsb);
+ vector<double> hsb(3);
+ read_doubles(is, hsb);
color.setHSB(hsb[0], hsb[1], hsb[2]);
}
else if (model == "gray")
- color.setGray(read_float(is));
- else if (!color.set(model, true))
+ color.setGray(read_double(is));
+ else if (!color.setName(model, true))
throw SpecialException("unknown color statement");
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ColorSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ColorSpecialHandler.h
index 6e7b0edf0f3..6e7b0edf0f3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ColorSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ColorSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CommandLine.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CommandLine.cpp
index 9395e9b770b..680f46cf797 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CommandLine.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CommandLine.cpp
@@ -16,13 +16,24 @@ using namespace std;
const CmdLineParserBase::Option CommandLine::_options[] = {
{'b', "bbox", ARG_REQUIRED, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_bbox)},
{'C', "cache", ARG_OPTIONAL, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_cache)},
+#if !defined(DISABLE_GS)
{'j', "clipjoin", ARG_NONE, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_clipjoin)},
+#endif
{'\0', "color", ARG_NONE, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_color)},
#if !defined(DISABLE_GS)
{'E', "eps", ARG_NONE, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_eps)},
#endif
{'e', "exact", ARG_NONE, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_exact)},
{'m', "fontmap", ARG_REQUIRED, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_fontmap)},
+#if !defined(DISABLE_GS)
+ {'\0', "grad-overlap", ARG_NONE, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_grad_overlap)},
+#endif
+#if !defined(DISABLE_GS)
+ {'\0', "grad-segments", ARG_REQUIRED, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_grad_segments)},
+#endif
+#if !defined(DISABLE_GS)
+ {'\0', "grad-simplify", ARG_REQUIRED, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_grad_simplify)},
+#endif
{'h', "help", ARG_OPTIONAL, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_help)},
{'\0', "keep", ARG_NONE, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_keep)},
#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS)
@@ -32,6 +43,7 @@ const CmdLineParserBase::Option CommandLine::_options[] = {
{'l', "list-specials", ARG_NONE, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_list_specials)},
{'M', "mag", ARG_REQUIRED, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_mag)},
{'n', "no-fonts", ARG_OPTIONAL, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_no_fonts)},
+ {'\0', "no-merge", ARG_NONE, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_no_merge)},
{'\0', "no-mktexmf", ARG_NONE, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_no_mktexmf)},
{'S', "no-specials", ARG_OPTIONAL, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_no_specials)},
{'\0', "no-styles", ARG_NONE, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_no_styles)},
@@ -63,13 +75,24 @@ void CommandLine::init () {
// disable all options by default
_bbox_given = false;
_cache_given = false;
+#if !defined(DISABLE_GS)
_clipjoin_given = false;
+#endif
_color_given = false;
#if !defined(DISABLE_GS)
_eps_given = false;
#endif
_exact_given = false;
_fontmap_given = false;
+#if !defined(DISABLE_GS)
+ _grad_overlap_given = false;
+#endif
+#if !defined(DISABLE_GS)
+ _grad_segments_given = false;
+#endif
+#if !defined(DISABLE_GS)
+ _grad_simplify_given = false;
+#endif
_help_given = false;
_keep_given = false;
#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS)
@@ -79,6 +102,7 @@ void CommandLine::init () {
_list_specials_given = false;
_mag_given = false;
_no_fonts_given = false;
+ _no_merge_given = false;
_no_mktexmf_given = false;
_no_specials_given = false;
_no_styles_given = false;
@@ -102,6 +126,12 @@ void CommandLine::init () {
_bbox_arg = "min";
_cache_arg.clear();
_fontmap_arg.clear();
+#if !defined(DISABLE_GS)
+ _grad_segments_arg = 20;
+#endif
+#if !defined(DISABLE_GS)
+ _grad_simplify_arg = 0.05;
+#endif
_help_arg = 0;
#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS)
_libgs_arg.clear();
@@ -136,13 +166,25 @@ const char** CommandLine::helplines (size_t *numlines) const {
#endif
"sSVG output options:",
"o-b, --bbox=size set size of bounding box [min]",
+#if !defined(DISABLE_GS)
"o-j, --clipjoin compute intersection of clipping paths",
+#endif
+#if !defined(DISABLE_GS)
+ "o --grad-overlap create operlapping color gradient segments",
+#endif
+#if !defined(DISABLE_GS)
+ "o --grad-segments=number number of color gradient segments per row [20]",
+#endif
+#if !defined(DISABLE_GS)
+ "o --grad-simplify=delta reduce level of detail for small segments [0.05]",
+#endif
"o-L, --linkmark=style select how to mark hyperlinked areas [box]",
"o-o, --output=pattern set name pattern of output files",
"o-d, --precision=number set number of decimal points (0-6) [0]",
"o-R, --relative create relative path commands",
"o-s, --stdout write SVG output to stdout",
"o-n, --no-fonts[=variant] draw glyphs by using path elements [0]",
+ "o --no-merge don't merge adjacent text elements",
"o --no-styles don't use styles to reference fonts",
"o-z, --zip[=level] create compressed .svgz file [9]",
"sSVG transformations:",
@@ -184,9 +226,11 @@ void CommandLine::handle_cache (InputReader &ir, const Option &opt, bool longopt
_cache_given = true;
}
+#if !defined(DISABLE_GS)
void CommandLine::handle_clipjoin (InputReader &ir, const Option &opt, bool longopt) {
_clipjoin_given = true;
}
+#endif
void CommandLine::handle_color (InputReader &ir, const Option &opt, bool longopt) {
_color_given = true;
@@ -207,6 +251,26 @@ void CommandLine::handle_fontmap (InputReader &ir, const Option &opt, bool longo
_fontmap_given = true;
}
+#if !defined(DISABLE_GS)
+void CommandLine::handle_grad_overlap (InputReader &ir, const Option &opt, bool longopt) {
+ _grad_overlap_given = true;
+}
+#endif
+
+#if !defined(DISABLE_GS)
+void CommandLine::handle_grad_segments (InputReader &ir, const Option &opt, bool longopt) {
+ if (getIntArg(ir, opt, longopt, _grad_segments_arg))
+ _grad_segments_given = true;
+}
+#endif
+
+#if !defined(DISABLE_GS)
+void CommandLine::handle_grad_simplify (InputReader &ir, const Option &opt, bool longopt) {
+ if (getDoubleArg(ir, opt, longopt, _grad_simplify_arg))
+ _grad_simplify_given = true;
+}
+#endif
+
void CommandLine::handle_help (InputReader &ir, const Option &opt, bool longopt) {
if (ir.eof() || getIntArg(ir, opt, longopt, _help_arg))
_help_given = true;
@@ -242,6 +306,10 @@ void CommandLine::handle_no_fonts (InputReader &ir, const Option &opt, bool long
_no_fonts_given = true;
}
+void CommandLine::handle_no_merge (InputReader &ir, const Option &opt, bool longopt) {
+ _no_merge_given = true;
+}
+
void CommandLine::handle_no_mktexmf (InputReader &ir, const Option &opt, bool longopt) {
_no_mktexmf_given = true;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CommandLine.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CommandLine.h
index 9c86e2feb9c..56b2afed0e1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/CommandLine.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/CommandLine.h
@@ -19,7 +19,9 @@ class CommandLine : public CmdLineParserBase
const std::string& bbox_arg () const {return _bbox_arg;}
bool cache_given () const {return _cache_given;}
const std::string& cache_arg () const {return _cache_arg;}
+#if !defined(DISABLE_GS)
bool clipjoin_given () const {return _clipjoin_given;}
+#endif
bool color_given () const {return _color_given;}
#if !defined(DISABLE_GS)
bool eps_given () const {return _eps_given;}
@@ -27,6 +29,17 @@ class CommandLine : public CmdLineParserBase
bool exact_given () const {return _exact_given;}
bool fontmap_given () const {return _fontmap_given;}
const std::string& fontmap_arg () const {return _fontmap_arg;}
+#if !defined(DISABLE_GS)
+ bool grad_overlap_given () const {return _grad_overlap_given;}
+#endif
+#if !defined(DISABLE_GS)
+ bool grad_segments_given () const {return _grad_segments_given;}
+ int grad_segments_arg () const {return _grad_segments_arg;}
+#endif
+#if !defined(DISABLE_GS)
+ bool grad_simplify_given () const {return _grad_simplify_given;}
+ double grad_simplify_arg () const {return _grad_simplify_arg;}
+#endif
bool help_given () const {return _help_given;}
int help_arg () const {return _help_arg;}
bool keep_given () const {return _keep_given;}
@@ -41,6 +54,7 @@ class CommandLine : public CmdLineParserBase
double mag_arg () const {return _mag_arg;}
bool no_fonts_given () const {return _no_fonts_given;}
int no_fonts_arg () const {return _no_fonts_arg;}
+ bool no_merge_given () const {return _no_merge_given;}
bool no_mktexmf_given () const {return _no_mktexmf_given;}
bool no_specials_given () const {return _no_specials_given;}
const std::string& no_specials_arg () const {return _no_specials_arg;}
@@ -79,13 +93,24 @@ class CommandLine : public CmdLineParserBase
const char** helplines (size_t *numlines) const;
void handle_bbox (InputReader &ir, const Option &opt, bool longopt);
void handle_cache (InputReader &ir, const Option &opt, bool longopt);
+#if !defined(DISABLE_GS)
void handle_clipjoin (InputReader &ir, const Option &opt, bool longopt);
+#endif
void handle_color (InputReader &ir, const Option &opt, bool longopt);
#if !defined(DISABLE_GS)
void handle_eps (InputReader &ir, const Option &opt, bool longopt);
#endif
void handle_exact (InputReader &ir, const Option &opt, bool longopt);
void handle_fontmap (InputReader &ir, const Option &opt, bool longopt);
+#if !defined(DISABLE_GS)
+ void handle_grad_overlap (InputReader &ir, const Option &opt, bool longopt);
+#endif
+#if !defined(DISABLE_GS)
+ void handle_grad_segments (InputReader &ir, const Option &opt, bool longopt);
+#endif
+#if !defined(DISABLE_GS)
+ void handle_grad_simplify (InputReader &ir, const Option &opt, bool longopt);
+#endif
void handle_help (InputReader &ir, const Option &opt, bool longopt);
void handle_keep (InputReader &ir, const Option &opt, bool longopt);
#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS)
@@ -95,6 +120,7 @@ class CommandLine : public CmdLineParserBase
void handle_list_specials (InputReader &ir, const Option &opt, bool longopt);
void handle_mag (InputReader &ir, const Option &opt, bool longopt);
void handle_no_fonts (InputReader &ir, const Option &opt, bool longopt);
+ void handle_no_merge (InputReader &ir, const Option &opt, bool longopt);
void handle_no_mktexmf (InputReader &ir, const Option &opt, bool longopt);
void handle_no_specials (InputReader &ir, const Option &opt, bool longopt);
void handle_no_styles (InputReader &ir, const Option &opt, bool longopt);
@@ -120,7 +146,9 @@ class CommandLine : public CmdLineParserBase
std::string _bbox_arg;
bool _cache_given;
std::string _cache_arg;
+#if !defined(DISABLE_GS)
bool _clipjoin_given;
+#endif
bool _color_given;
#if !defined(DISABLE_GS)
bool _eps_given;
@@ -128,6 +156,17 @@ class CommandLine : public CmdLineParserBase
bool _exact_given;
bool _fontmap_given;
std::string _fontmap_arg;
+#if !defined(DISABLE_GS)
+ bool _grad_overlap_given;
+#endif
+#if !defined(DISABLE_GS)
+ bool _grad_segments_given;
+ int _grad_segments_arg;
+#endif
+#if !defined(DISABLE_GS)
+ bool _grad_simplify_given;
+ double _grad_simplify_arg;
+#endif
bool _help_given;
int _help_arg;
bool _keep_given;
@@ -142,6 +181,7 @@ class CommandLine : public CmdLineParserBase
double _mag_arg;
bool _no_fonts_given;
int _no_fonts_arg;
+ bool _no_merge_given;
bool _no_mktexmf_given;
bool _no_specials_given;
std::string _no_specials_arg;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DLLoader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DLLoader.cpp
index 8f03d1a0b83..8f03d1a0b83 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DLLoader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DLLoader.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DLLoader.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DLLoader.h
index de14be50495..de14be50495 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DLLoader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DLLoader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIActions.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIActions.h
index 7a82d4456f1..7a82d4456f1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIActions.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIActions.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIReader.cpp
index 925efe0407b..2c375a1cb2e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIReader.cpp
@@ -53,8 +53,8 @@ DVIReader::DVIReader (istream &is, DVIActions *a) : BasicDVIReader(is), _actions
_currPageNum = 0;
_pagePos = 0;
_mag = 1;
- collectBopOffsets();
executePreamble();
+ collectBopOffsets();
executePostamble();
}
@@ -149,16 +149,16 @@ static void to_postamble (StreamReader &reader) {
if (!reader.isStreamValid())
throw DVIException("invalid DVI file");
- reader.seek(-1, ios_base::end); // stream pointer to last byte
+ reader.seek(-1, ios::end); // stream pointer to last byte
int count=0;
while (reader.peek() == 223) {
- reader.seek(-1, ios_base::cur); // skip fill bytes
+ reader.seek(-1, ios::cur); // skip fill bytes
count++;
}
if (count < 4) // the standard requires at least 4 trailing fill bytes
throw DVIException("missing fill bytes at end of file");
- reader.seek(-4, ios_base::cur); // now on first byte of q (pointer to begin of postamble)
+ reader.seek(-4, ios::cur); // now on first byte of q (pointer to begin of postamble)
UInt32 q = reader.readUnsigned(4); // pointer to begin of postamble
reader.seek(q); // now on begin of postamble
}
@@ -623,7 +623,7 @@ void DVIReader::cmdXFontDef (int) {
// all color specials should be ignored, i.e. glyphs of a non-black fonts have a fixed color
// that can't be changed by color specials.
UInt32 rgba = readUnsigned(4);
- color.set(UInt8(rgba >> 24), UInt8((rgba >> 16) & 0xff), UInt8((rgba >> 8) & 0xff));
+ color.setRGB(UInt8(rgba >> 24), UInt8((rgba >> 16) & 0xff), UInt8((rgba >> 8) & 0xff));
}
if (flags & 0x1000) // extend?
style.extend = _dvi2bp*readSigned(4);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIReader.h
index 366a110f531..366a110f531 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIReader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIToSVG.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIToSVG.cpp
index 539dabdad7f..539dabdad7f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIToSVG.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIToSVG.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIToSVG.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIToSVG.h
index 39f335a2907..39f335a2907 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIToSVG.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIToSVG.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIToSVGActions.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIToSVGActions.cpp
index ca716bf88f5..afdaf58b5c0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIToSVGActions.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIToSVGActions.cpp
@@ -36,9 +36,6 @@
using namespace std;
-double DVIToSVGActions::PROGRESSBAR_DELAY=1000; // initial delay in seconds (values >= 1000 disable the progressbar)
-
-
DVIToSVGActions::DVIToSVGActions (DVIToSVG &dvisvg, SVGTree &svg)
: _svg(svg), _dvireader(&dvisvg), _pageMatrix(0), _bgcolor(Color::TRANSPARENT), _boxes(0)
{
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIToSVGActions.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIToSVGActions.h
index 2980fa2c657..6b234c51666 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DVIToSVGActions.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DVIToSVGActions.h
@@ -88,9 +88,6 @@ class DVIToSVGActions : public DVIActions, public SpecialActions
void embed (const DPair &p, double r=0);
std::string getSVGFilename (unsigned pageno) const;
- public:
- static double PROGRESSBAR_DELAY; ///< progress bar doesn't appear before this time has elapsed (in sec)
-
private:
SVGTree &_svg;
BasicDVIReader *_dvireader;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DependencyGraph.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DependencyGraph.h
index 00c467bb0c2..00c467bb0c2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DependencyGraph.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DependencyGraph.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Directory.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Directory.cpp
index 925b3065c8d..925b3065c8d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Directory.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Directory.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Directory.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Directory.h
index a10a26bd39c..a10a26bd39c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Directory.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Directory.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DvisvgmSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DvisvgmSpecialHandler.cpp
index a3b2233e5b2..a3b2233e5b2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DvisvgmSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DvisvgmSpecialHandler.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DvisvgmSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DvisvgmSpecialHandler.h
index 13c52718011..13c52718011 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/DvisvgmSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/DvisvgmSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EPSFile.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EPSFile.cpp
index aea2c9114c9..aea2c9114c9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EPSFile.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EPSFile.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EPSFile.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EPSFile.h
index 19b60a42797..19b60a42797 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EPSFile.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EPSFile.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EPSToSVG.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EPSToSVG.cpp
index 6e0188d1d6f..f2c1a76fb1e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EPSToSVG.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EPSToSVG.cpp
@@ -28,6 +28,7 @@
#include "MessageException.h"
#include "PsSpecialHandler.h"
#include "SVGOutputBase.h"
+#include "System.h"
using namespace std;
@@ -58,6 +59,7 @@ void EPSToSVG::convert () {
"ury=" << bbox.maxY();
PsSpecialHandler pshandler;
pshandler.process("psfile=", ss, this);
+ progress(0);
// output SVG file
_svg.setBBox(_bbox);
_svg.appendToDoc(new XMLCommentNode(" This file was generated by dvisvgm " VERSION " "));
@@ -77,4 +79,30 @@ string EPSToSVG::getSVGFilename (unsigned pageno) const {
if (pageno == 1)
return _out.filename(1, 1);
return "";
-} \ No newline at end of file
+}
+
+
+void EPSToSVG::progress (const char *id) {
+ static double time=0;
+ static bool draw=false; // show progress indicator?
+ static size_t count=0;
+ count++;
+ // don't show the progress indicator before the given time has elapsed
+ if (!draw && System::time()-time > PROGRESSBAR_DELAY) {
+ draw = true;
+ Terminal::cursor(false);
+ Message::mstream(false) << "\n";
+ }
+ if (draw && ((System::time() - time > 0.05) || id == 0)) {
+ const size_t DIGITS=6;
+ Message::mstream(false, Message::MC_PROGRESS)
+ << string(DIGITS-min(DIGITS, static_cast<size_t>(log10(count))), ' ')
+ << count << " PostScript instructions processed\r";
+ // overprint indicator when finished
+ if (id == 0) {
+ Message::estream().clearline();
+ Terminal::cursor(true);
+ }
+ time = System::time();
+ }
+}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EPSToSVG.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EPSToSVG.h
index e6d654f595f..0948e541f4f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EPSToSVG.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EPSToSVG.h
@@ -55,6 +55,7 @@ class EPSToSVG : protected SpecialActions
void popContextElement () {_svg.popContextElement();}
void embed (const BoundingBox &bbox) {_bbox.embed(bbox);}
void embed (const DPair &p, double r=0) {if (r==0) _bbox.embed(p); else _bbox.embed(p, r);}
+ void progress (const char *id);
unsigned getCurrentPageNumber() const {return 0;}
BoundingBox& bbox () {return _bbox;}
BoundingBox& bbox (const std::string &name, bool reset=false) {return _bbox;}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EmSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EmSpecialHandler.cpp
index 2d944e9433d..2d944e9433d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EmSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EmSpecialHandler.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EmSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EmSpecialHandler.h
index 000277f6909..000277f6909 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EmSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EmSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EncFile.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EncFile.cpp
index 103090bc3e3..103090bc3e3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EncFile.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EncFile.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EncFile.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EncFile.h
index 5d15a48cfff..5d15a48cfff 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/EncFile.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/EncFile.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FileFinder.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FileFinder.cpp
index e8269991053..e8269991053 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FileFinder.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FileFinder.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FileFinder.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FileFinder.h
index e4a59c2346a..e4a59c2346a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FileFinder.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FileFinder.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FilePath.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FilePath.cpp
index 92922d99354..92922d99354 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FilePath.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FilePath.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FilePath.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FilePath.h
index c1c1bab7064..c1c1bab7064 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FilePath.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FilePath.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FileSystem.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FileSystem.cpp
index 398878853cd..398878853cd 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FileSystem.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FileSystem.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FileSystem.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FileSystem.h
index f60fcd0ac86..f60fcd0ac86 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FileSystem.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FileSystem.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Font.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Font.cpp
index 1fc51600929..1fc51600929 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Font.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Font.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Font.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Font.h
index beba335793a..beba335793a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Font.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Font.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontCache.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontCache.cpp
index e617bc9fd34..7267de65898 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontCache.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontCache.cpp
@@ -338,7 +338,7 @@ bool FontCache::fontinfo (std::istream &is, FontInfo &info) {
}
info.numbytes += bc+1; // command length + command
info.numcmds++;
- is.seekg(bc, ios_base::cur);
+ is.seekg(bc, ios::cur);
}
info.numbytes += 6; // number of path commands + char code
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontCache.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontCache.h
index 3afed5485a2..3afed5485a2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontCache.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontCache.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontEncoding.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontEncoding.cpp
index a0fca850a98..a0fca850a98 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontEncoding.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontEncoding.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontEncoding.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontEncoding.h
index 4c366182632..4c366182632 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontEncoding.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontEncoding.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontEngine.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontEngine.cpp
index 0abe6a33c61..0abe6a33c61 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontEngine.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontEngine.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontEngine.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontEngine.h
index 79a0916d04d..79a0916d04d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontEngine.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontEngine.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontManager.cpp
index bb4288c57a4..bb4288c57a4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontManager.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontManager.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontManager.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontManager.h
index c5ed1a35a97..c5ed1a35a97 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontManager.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontManager.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontMap.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontMap.cpp
index e885e0a38fa..e885e0a38fa 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontMap.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontMap.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontMap.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontMap.h
index bee44d8e6e7..bee44d8e6e7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontMap.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontMap.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontMetrics.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontMetrics.cpp
index 3920e4e6e76..3920e4e6e76 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontMetrics.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontMetrics.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontMetrics.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontMetrics.h
index 50207211d2c..50207211d2c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontMetrics.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontMetrics.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontStyle.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontStyle.h
index 932c09291cc..932c09291cc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/FontStyle.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/FontStyle.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFGlyphTracer.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFGlyphTracer.cpp
index e1d3f916241..e1d3f916241 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFGlyphTracer.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFGlyphTracer.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFGlyphTracer.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFGlyphTracer.h
index 57ed0362cc0..57ed0362cc0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFGlyphTracer.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFGlyphTracer.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFReader.cpp
index 9b0a319733b..d901cdbe3d7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFReader.cpp
@@ -160,10 +160,10 @@ bool GFReader::executePostamble () {
_in.clear();
if (!_in)
return false;
- _in.seekg(-1, ios_base::end);
- while (_in.peek() == 223) // skip fill bytes
- _in.seekg(-1, ios_base::cur);
- _in.seekg(-4, ios_base::cur);
+ _in.seekg(-1, ios::end);
+ while (_in.peek() == 223) // skip fill bytes
+ _in.seekg(-1, ios::cur);
+ _in.seekg(-4, ios::cur);
UInt32 q = readUnsigned(4); // pointer to begin of postamble
_in.seekg(q); // now on begin of postamble
while (executeCommand() != 249); // execute all commands until postpost is reached
@@ -215,7 +215,7 @@ void GFReader::cmdPost (int) {
_checksum = readUnsigned(4); // checksum
_hppp = readUnsigned(4); // horizontal pixels per point (scaled int)
_vppp = readUnsigned(4); // vertical pixels per point (scaled int)
- _in.seekg(16, ios_base::cur); // skip x and y bounds
+ _in.seekg(16, ios::cur); // skip x and y bounds
postamble();
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFReader.h
index 1706acea126..1706acea126 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFReader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFTracer.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFTracer.cpp
index 89ff4359fda..89ff4359fda 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFTracer.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFTracer.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFTracer.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFTracer.h
index 617580636f0..617580636f0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GFTracer.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GFTracer.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Ghostscript.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Ghostscript.cpp
index e204842bab9..0576769dbf8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Ghostscript.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Ghostscript.cpp
@@ -36,8 +36,50 @@ using namespace std;
// name of Ghostscript shared library set by the user
string Ghostscript::LIBGS_NAME;
-
#ifndef HAVE_LIBGS
+
+#ifdef __WIN32__
+/** Looks up the path of the Ghostscript DLL in the Windows registry and returns it.
+ * If there is no proper registry entry, the returned string is empty. */
+static string get_path_from_registry () {
+ REGSAM mode = KEY_READ|KEY_QUERY_VALUE;
+#ifdef KEY_WOW64_64KEY
+#ifdef __WIN64__
+ mode |= KEY_WOW64_64KEY;
+#else
+ mode |= KEY_WOW64_32KEY;
+#endif
+#endif
+ static const char *gs_companies[] = {"GPL", "GNU", "AFPL", "Aladdin"};
+ for (size_t i=0; i < sizeof(gs_companies)/sizeof(char*); i++) {
+ const string reg_path = string("SOFTWARE\\") + gs_companies[i] + " Ghostscript";
+ static HKEY reg_roots[] = {HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE};
+ for (size_t j=0; j < sizeof(reg_roots)/sizeof(HKEY); j++) {
+ HKEY hkey;
+ if (RegOpenKeyExA(reg_roots[j], reg_path.c_str(), 0, mode, &hkey) == ERROR_SUCCESS) {
+ char subkey[16];
+ for (int k=0; RegEnumKeyA(hkey, k, subkey, 16) == ERROR_SUCCESS; k++) {
+ istringstream iss(subkey);
+ int major_version;
+ iss >> major_version;
+ if (major_version >= 7) {
+ char dll_path[256]; // path to Ghostscript DLL stored in the registry
+ DWORD length;
+ if (RegGetValueA(hkey, subkey, "GS_DLL", RRF_RT_REG_SZ, 0, dll_path, &length) == ERROR_SUCCESS) {
+ RegCloseKey(hkey);
+ return dll_path;
+ }
+ }
+ }
+ RegCloseKey(hkey);
+ }
+ }
+ }
+ return "";
+}
+#endif
+
+
/** Try to detect name of the Ghostscript shared library depending on the user settings.
* @param[in] fname path/filename given by the user
* @return name of Ghostscript shared library */
@@ -54,6 +96,12 @@ static string get_libgs (const string &fname) {
if (const char *gsdll_path = FileFinder::lookup(gsdll))
return gsdll_path;
#endif // MIKTEX
+#if defined(__WIN32__)
+ // try to look up the path of the Ghostscript DLL in the Windows registry
+ string gsdll_path = get_path_from_registry();
+ if (!gsdll_path.empty())
+ return gsdll_path;
+#endif
#if defined(__WIN64__)
return "gsdll64.dll";
#elif defined(__WIN32__)
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Ghostscript.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Ghostscript.h
index 6200fa8d0a1..6200fa8d0a1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Ghostscript.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Ghostscript.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Glyph.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Glyph.h
index 5a003a2196b..5a003a2196b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Glyph.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Glyph.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GlyphTracerMessages.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GlyphTracerMessages.h
index 6256bb843a0..6256bb843a0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GlyphTracerMessages.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GlyphTracerMessages.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GraphicPath.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GraphicPath.h
index dc3cb46852d..883abfc62e6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/GraphicPath.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/GraphicPath.h
@@ -193,6 +193,7 @@ class GraphicPath
/** Writes the path data as SVG path drawing command to a given output stream.
* @param[in] os output stream used to write the SVG commands to
+ * @param[in] relative if true, create relative rather than absolute coordinate values
* @param[in] sx horizontal scale factor
* @param[in] sy vertical scale factor
* @param[in] dx horizontal translation in PS point units
@@ -235,6 +236,31 @@ class GraphicPath
iterate(actions, true);
}
+#if 0
+ void writePS (std::ostream &os, double sx=1.0, double sy=1.0, double dx=0.0, double dy=0.0) const {
+ struct WriteActions : Actions {
+ WriteActions (std::ostream &os, double sx, double sy, double dx, double dy)
+ : _os(os), _sx(sx), _sy(sy), _dx(dx), _dy(dy) {}
+ void draw (char cmd, const Point *points, int n) {
+ for (int i=0; i < n; i++)
+ _os << _sx*points[i].x()+_dx << ' ' << _sy*points[i].y()+_dy << ' ';
+ switch (cmd) {
+ case 'M': _os << "moveto"; break;
+ case 'L': _os << "lineto"; break;
+ case 'C': _os << "curveto"; break;
+ case 'Z': _os << "closepath"; break;
+ default: ;
+ }
+ _os << '\n';
+ }
+ std::ostream &_os;
+ bool _relative;
+ double _sx, _sy, _dx, _dy;
+ } actions(os, sx, sy, dx, dy);
+ iterate(actions, false);
+ }
+#endif
+
/** Computes the bounding box of the current path.
* @param[out] bbox the computed bounding box */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/HtmlSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/HtmlSpecialHandler.cpp
index dc419e8ebb8..dd26055276b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/HtmlSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/HtmlSpecialHandler.cpp
@@ -286,13 +286,13 @@ bool HtmlSpecialHandler::setLinkMarker (const string &marker) {
else if (type == "box")
MARKER_TYPE = MT_BOX;
else {
- if (!LINK_BGCOLOR.set(type, false))
+ if (!LINK_BGCOLOR.setName(type, false))
return false;
MARKER_TYPE = MT_BGCOLOR;
}
USE_LINECOLOR = false;
if (MARKER_TYPE != MT_NONE && !color.empty()) {
- if (!LINK_LINECOLOR.set(color, false))
+ if (!LINK_LINECOLOR.setName(color, false))
return false;
USE_LINECOLOR = true;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/HtmlSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/HtmlSpecialHandler.h
index 221c325185f..221c325185f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/HtmlSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/HtmlSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/InputBuffer.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/InputBuffer.cpp
index 154c60511bd..154c60511bd 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/InputBuffer.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/InputBuffer.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/InputBuffer.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/InputBuffer.h
index efcbc36ed74..efcbc36ed74 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/InputBuffer.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/InputBuffer.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/InputReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/InputReader.cpp
index 8a8709fe0f7..8a8709fe0f7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/InputReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/InputReader.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/InputReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/InputReader.h
index d2eb5703211..d2eb5703211 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/InputReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/InputReader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/JFM.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/JFM.cpp
index 89c4796616c..89c4796616c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/JFM.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/JFM.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/JFM.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/JFM.h
index 297ad6df710..297ad6df710 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/JFM.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/JFM.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Length.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Length.cpp
index 09951489ff6..09951489ff6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Length.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Length.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Length.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Length.h
index 109cc2d2898..109cc2d2898 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Length.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Length.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Makefile.am
index da6a7292453..aa9b43b50c3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Makefile.am
@@ -151,6 +151,8 @@ libdvisvgm_a_SOURCES = \
PsSpecialHandler.h \
RangeMap.cpp \
RangeMap.h \
+ ShadingPatch.cpp \
+ ShadingPatch.h \
SignalHandler.cpp \
SignalHandler.h \
SpecialActions.h \
@@ -168,6 +170,8 @@ libdvisvgm_a_SOURCES = \
SVGTree.h \
System.cpp \
System.h \
+ TensorProductPatch.cpp \
+ TensorProductPatch.h \
Terminal.cpp \
Terminal.h \
TFM.cpp \
@@ -176,9 +180,12 @@ libdvisvgm_a_SOURCES = \
ToUnicodeMap.h \
TpicSpecialHandler.cpp \
TpicSpecialHandler.h \
+ TriangularPatch.cpp \
+ TriangularPatch.h \
types.h \
Unicode.cpp \
Unicode.h \
+ VectorIterator.h \
VectorStream.h \
VFActions.h \
VFReader.cpp \
@@ -198,10 +205,13 @@ AM_CXXFLAGS = -Wall -Wnon-virtual-dtor \
$(ZLIB_CFLAGS)
# the command-line parser is generated from options.xml by opt2cpp
-CommandLine.cpp: options.xml
+$(srcdir)/CommandLine.cpp: options.xml
if test -f opt2cpp.xsl; then \
rm -f $@ $*.h; \
xsltproc opt2cpp.xsl $<; \
+ elif test -f $(srcdir)/opt2cpp.py; then \
+ rm -f $@ $*.h; \
+ python2 $(srcdir)/opt2cpp.py $< $@ $*.h; \
fi
# Create a C string definition containing the PostScript routines psdefs.ps needed by class PSInterpreter
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MapLine.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MapLine.cpp
index d571d094890..d571d094890 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MapLine.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MapLine.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MapLine.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MapLine.h
index 2c1a53518fa..2c1a53518fa 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MapLine.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MapLine.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Matrix.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Matrix.cpp
index e0e301d281d..2ae1b8e2115 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Matrix.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Matrix.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#define _USE_MATH_DEFINES
#include <config.h>
#include <algorithm>
#include <cmath>
@@ -60,8 +61,7 @@ double det (const Matrix &m, int row, int col) {
static inline double deg2rad (double deg) {
- const double PI = acos(-1.0);
- return PI*deg/180.0;
+ return M_PI*deg/180.0;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Matrix.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Matrix.h
index bcff8a57bad..bcff8a57bad 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Matrix.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Matrix.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Message.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Message.cpp
index c875109633f..c875109633f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Message.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Message.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Message.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Message.h
index 7c39127dbd4..7c39127dbd4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Message.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Message.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MessageException.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MessageException.h
index 446c2e1282f..446c2e1282f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MessageException.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MessageException.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MetafontWrapper.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MetafontWrapper.cpp
index 6e955faeec5..6e955faeec5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MetafontWrapper.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MetafontWrapper.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MetafontWrapper.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MetafontWrapper.h
index 8a59dc9d5d7..8a59dc9d5d7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MetafontWrapper.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MetafontWrapper.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MiKTeXCom.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MiKTeXCom.cpp
index bb4353f8ee4..eaf848b25cb 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MiKTeXCom.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MiKTeXCom.cpp
@@ -19,6 +19,7 @@
*************************************************************************/
#include <config.h>
+#include <stdio.h>
#include <comdef.h>
#include <string>
#include "MessageException.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MiKTeXCom.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MiKTeXCom.h
index dcb6271a4bc..dcb6271a4bc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/MiKTeXCom.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/MiKTeXCom.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/NoPsSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/NoPsSpecialHandler.cpp
index 0a5119f6938..0a5119f6938 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/NoPsSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/NoPsSpecialHandler.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/NoPsSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/NoPsSpecialHandler.h
index 8af05f889a3..8af05f889a3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/NoPsSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/NoPsSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/NumericRanges.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/NumericRanges.h
index 7d810fb2a5d..7d810fb2a5d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/NumericRanges.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/NumericRanges.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSFilter.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSFilter.h
index e2c5c092dd3..e2c5c092dd3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSFilter.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSFilter.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSInterpreter.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSInterpreter.cpp
index b1fa641fe46..4945c475d25 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSInterpreter.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSInterpreter.cpp
@@ -295,6 +295,7 @@ void PSInterpreter::callActions (InputReader &in) {
{"setopacityalpha", 1, &PSActions::setopacityalpha},
{"setpattern", -1, &PSActions::setpattern},
{"setrgbcolor", 3, &PSActions::setrgbcolor},
+ {"shfill", -1, &PSActions::shfill},
{"stroke", 0, &PSActions::stroke},
{"translate", 2, &PSActions::translate},
};
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSInterpreter.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSInterpreter.h
index 6d1794e5065..4a2c99d3b18 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSInterpreter.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSInterpreter.h
@@ -74,6 +74,7 @@ struct PSActions
virtual void setopacityalpha (std::vector<double> &p) =0;
virtual void setpattern (std::vector<double> &p) =0;
virtual void setrgbcolor (std::vector<double> &rgb) =0;
+ virtual void shfill (std::vector<double> &rgb) =0;
virtual void stroke (std::vector<double> &p) =0;
virtual void translate (std::vector<double> &p) =0;
virtual void executed () {} // triggered if one of the above PS operators has been executed
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSPattern.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSPattern.cpp
index e566f1a34e0..e566f1a34e0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSPattern.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSPattern.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSPattern.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSPattern.h
index 96911b921da..96911b921da 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSPattern.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSPattern.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSPreviewFilter.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSPreviewFilter.cpp
index c9b3b080118..c9b3b080118 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSPreviewFilter.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSPreviewFilter.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSPreviewFilter.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSPreviewFilter.h
index 3e65ac9ba4c..3e65ac9ba4c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PSPreviewFilter.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PSPreviewFilter.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PageRanges.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PageRanges.cpp
index e19e679c67e..e19e679c67e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PageRanges.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PageRanges.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PageRanges.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PageRanges.h
index 3292986226d..3292986226d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PageRanges.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PageRanges.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PageSize.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PageSize.cpp
index 2cc3f36512d..2cc3f36512d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PageSize.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PageSize.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PageSize.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PageSize.h
index d63079ae784..d63079ae784 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PageSize.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PageSize.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Pair.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Pair.h
index 6183b3b97e3..6183b3b97e3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Pair.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Pair.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PathClipper.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PathClipper.cpp
index fcc231fb5fe..f7b445da60c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PathClipper.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PathClipper.cpp
@@ -229,9 +229,8 @@ inline ZLabel division_label (const IntPoint &p1, const IntPoint &p2, const IntP
* @param[in] e1bot first endpoint of edge 1
* @param[in] e1top second endpoint of edge 1
* @param[in] e2bot first endpoint of edge 2
- * @param[in] e1top second endpoint of edge 2
- * @param[in] ip intersection point of edge 1 and 2
- * @param[in] userval pointer to PathClipper object set by ZFillFunction() */
+ * @param[in] e2top second endpoint of edge 2
+ * @param[in] ip intersection point of edge 1 and 2 */
void PathClipper::callback (IntPoint &e1bot, IntPoint &e1top, IntPoint &e2bot, IntPoint &e2top, IntPoint &ip) {
ZLabel label1 = division_label(e1bot, e1top, ip);
ZLabel label2 = division_label(e2bot, e2top, ip);
@@ -241,7 +240,7 @@ void PathClipper::callback (IntPoint &e1bot, IntPoint &e1top, IntPoint &e2bot, I
/** Iterates along the polygon edges until the endpoint of the current
* path segment is found and returns its vector index afterwards.
- * @param[in] points the vertices of the polygon
+ * @param[in] polygon the polygon to be processed
* @param[in] start index of the vertex where the iteration starts
* @param[out] label if not 0, retrieves the label of the endpoint
* @param[in] startLabel if true, the found endpoint is treated as start point and
@@ -322,9 +321,7 @@ inline PolyFillType polyFillType (CurvedPath::WindingRule wr) {
/** Computes the intersection of to curved path.
* @param[in] p1 first curved path
- * @param[in] wr1 winding rule to be applied to p1
* @param[in] p2 second curved path
- * @param[in] wr2 winding rule to be applied to p2
* @param[out] result intersection of p1 and p2 */
void PathClipper::intersect (const CurvedPath &p1, const CurvedPath &p2, CurvedPath &result) {
if (p1.size() < 2 || p2.size() < 2)
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PathClipper.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PathClipper.h
index c8aca25dbc1..e45d5d5917d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PathClipper.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PathClipper.h
@@ -28,11 +28,6 @@
#include "GraphicPath.h"
#include "MessageException.h"
-struct PathClipperException : public MessageException
-{
- PathClipperException (const std::string &msg) : MessageException(msg) {}
-};
-
using ClipperLib::IntPoint;
@@ -50,7 +45,7 @@ class PathClipper
// void divide (IntPoint &p1, IntPoint &p2, IntPoint &ip);
void reconstruct (const ClipperLib::Path &polygon, CurvedPath &path);
void reconstruct (const ClipperLib::Paths &polygons, CurvedPath &path);
- static void callback (IntPoint &e1bot, IntPoint &e1top, IntPoint &e2bot, IntPoint &e2top, IntPoint &pt);
+ static void callback (IntPoint &e1bot, IntPoint &e1top, IntPoint &e2bot, IntPoint &e2top, IntPoint &ip);
private:
std::vector<Bezier> _curves;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PdfSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PdfSpecialHandler.cpp
index fb8e775759f..fb8e775759f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PdfSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PdfSpecialHandler.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PdfSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PdfSpecialHandler.h
index 6865a21d9be..6865a21d9be 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PdfSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PdfSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PreScanDVIReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PreScanDVIReader.cpp
index f88010b89ed..f88010b89ed 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PreScanDVIReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PreScanDVIReader.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PreScanDVIReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PreScanDVIReader.h
index 1e033e73fa6..1e033e73fa6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PreScanDVIReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PreScanDVIReader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Process.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Process.cpp
index 41c3bec0daa..41c3bec0daa 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Process.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Process.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Process.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Process.h
index 54f4ec611c3..54f4ec611c3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Process.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Process.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PsSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PsSpecialHandler.cpp
index a6cc0ca38da..a507ca1eabc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PsSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PsSpecialHandler.cpp
@@ -22,6 +22,7 @@
#include <cmath>
#include <fstream>
#include <iostream>
+#include <memory>
#include <sstream>
#include "EPSFile.h"
#include "FileFinder.h"
@@ -33,8 +34,12 @@
#include "PsSpecialHandler.h"
#include "SpecialActions.h"
#include "SVGTree.h"
+#include "TensorProductPatch.h"
+#include "VectorIterator.h"
#include "XMLNode.h"
#include "XMLString.h"
+#include "TriangularPatch.h"
+
using namespace std;
@@ -48,6 +53,9 @@ static inline double str2double (const string &str) {
bool PsSpecialHandler::COMPUTE_CLIPPATHS_INTERSECTIONS = false;
+bool PsSpecialHandler::SHADING_SEGMENT_OVERLAP = false;
+int PsSpecialHandler::SHADING_SEGMENT_SIZE = 20;
+double PsSpecialHandler::SHADING_SIMPLIFY_DELTA = 0.01;
PsSpecialHandler::PsSpecialHandler () : _psi(this), _actions(0), _previewFilter(_psi), _psSection(PS_NONE), _xmlnode(0)
@@ -112,11 +120,6 @@ void PsSpecialHandler::enterBodySection () {
// push dictionary "TeXDict" with dvips definitions on dictionary stack
// and initialize basic dvips PostScript variables
oss << "\nTeXDict begin 0 0 1000 72 72 () @start 0 0 moveto ";
- if (_actions) {
- float r, g, b;
- _actions->getColor().getRGB(r, g, b);
- oss << r << ' ' << g << ' ' << b << " setrgbcolor ";
- }
_psi.execute(oss.str(), false);
// Check for information generated by preview.sty. If the tightpage options
// was set, don't execute the bop-hook but allow the PS filter to read
@@ -142,18 +145,27 @@ void PsSpecialHandler::moveToDVIPos () {
}
-/** Executes a PS snippet and moves the DVI cursor to the current DVI position afterwards.
- * It's just a shorthand function as this action sequence is required several times.
- * @param[in] psi PS interpreter instance
+/** Executes a PS snippet and optionally synchronizes the DVI cursor position
+ * with the current PS point.
* @param[in] is stream to read the PS code from
- * @param[in] pos current PS graphic position
- * @param[in] actions special actions */
-static void exec_and_syncpos (PSInterpreter &psi, istream &is, const DPair &pos, SpecialActions *actions) {
- psi.execute(is);
- psi.execute("\nquerypos "); // retrieve current PS position (stored in 'pos')
- if (actions) {
- actions->setX(pos.x());
- actions->setY(pos.y());
+ * @param[in] updatePos if true, move the DVI drawing position to the current PS point */
+void PsSpecialHandler::executeAndSync (istream &is, bool updatePos) {
+ if (_actions && _actions->getColor() != _currentcolor) {
+ // update the PS graphics state if the color has been changed by a color special
+ double r, g, b;
+ _actions->getColor().getRGB(r, g, b);
+ ostringstream oss;
+ oss << '\n' << r << ' ' << g << ' ' << b << " setrgbcolor ";
+ _psi.execute(oss.str(), false);
+ }
+ _psi.execute(is);
+ if (updatePos) {
+ // retrieve current PS position (stored in _currentpoint)
+ _psi.execute("\nquerypos ");
+ if (_actions) {
+ _actions->setX(_currentpoint.x());
+ _actions->setY(_currentpoint.y());
+ }
}
}
@@ -191,7 +203,7 @@ bool PsSpecialHandler::process (const char *prefix, istream &is, SpecialActions
// read and execute literal PostScript code (isolated by a wrapping save/restore pair)
moveToDVIPos();
_psi.execute("\n@beginspecial @setspecial ");
- _psi.execute(is);
+ executeAndSync(is, false);
_psi.execute("\n@endspecial ");
}
else if (strcmp(prefix, "psfile=") == 0 || strcmp(prefix, "PSfile=") == 0) {
@@ -216,18 +228,18 @@ bool PsSpecialHandler::process (const char *prefix, istream &is, SpecialActions
if (code == "[begin]" || code == "[nobreak]") {
moveToDVIPos();
- exec_and_syncpos(_psi, is, _currentpoint, _actions);
+ executeAndSync(is, true);
}
else {
// no move to DVI position here
if (code != "[end]") // PS array?
_psi.execute(code);
- exec_and_syncpos(_psi, is, _currentpoint, _actions);
+ executeAndSync(is, true);
}
}
else { // ps::<code> behaves like ps::[end]<code>
// no move to DVI position here
- exec_and_syncpos(_psi, is, _currentpoint, _actions);
+ executeAndSync(is, true);
}
}
else { // ps: ...
@@ -246,7 +258,7 @@ bool PsSpecialHandler::process (const char *prefix, istream &is, SpecialActions
else {
// ps:<code> is almost identical to ps::[begin]<code> but does
// a final repositioning to the current DVI location
- exec_and_syncpos(_psi, is, _currentpoint, _actions);
+ executeAndSync(is, true);
moveToDVIPos();
}
}
@@ -655,7 +667,7 @@ void PsSpecialHandler::setpattern (vector<double> &p) {
int pattern_id = p[0];
Color color;
if (p.size() == 4)
- color.set((float)p[1], (float)p[2], (float)p[3]);
+ color.setRGB(p[1], p[2], p[3]);
map<int,PSPattern*>::iterator it = _patterns.find(pattern_id);
if (it == _patterns.end())
_pattern = 0;
@@ -694,29 +706,39 @@ void PsSpecialHandler::clippath (std::vector<double>&) {
* @param[in] p not used
* @param[in] evenodd true: use even-odd fill algorithm, false: use nonzero fill algorithm */
void PsSpecialHandler::clip (vector<double> &, bool evenodd) {
- // when this method is called, _path contains the clipping path
- if (_path.empty() || !_actions)
+ clip(_path, evenodd);
+}
+
+
+/** Assigns a new clipping path to the graphics state using the current path.
+ * If the graphics state already contains a clipping path, the new one is
+ * computed by intersecting the current one with the given path.
+ * @param[in] path path used to restrict the clipping region
+ * @param[in] evenodd true: use even-odd fill algorithm, false: use nonzero fill algorithm */
+void PsSpecialHandler::clip (Path &path, bool evenodd) {
+ // when this method is called, _path contains the clipping path
+ if (path.empty() || !_actions)
return;
Path::WindingRule windingRule = evenodd ? Path::WR_EVEN_ODD : Path::WR_NON_ZERO;
- _path.setWindingRule(windingRule);
+ path.setWindingRule(windingRule);
if (!_actions->getMatrix().isIdentity())
- _path.transform(_actions->getMatrix());
+ path.transform(_actions->getMatrix());
int oldID = _clipStack.topID();
ostringstream oss;
if (!COMPUTE_CLIPPATHS_INTERSECTIONS || oldID < 1) {
- _clipStack.replace(_path);
- _path.writeSVG(oss, SVGTree::RELATIVE_PATH_CMDS);
+ _clipStack.replace(path);
+ path.writeSVG(oss, SVGTree::RELATIVE_PATH_CMDS);
}
else {
// compute the intersection of the current clipping path with the current graphics path
Path *oldPath = _clipStack.getPath(oldID);
Path intersectedPath(windingRule);
PathClipper clipper;
- clipper.intersect(*oldPath, _path, intersectedPath);
+ clipper.intersect(*oldPath, path, intersectedPath);
_clipStack.replace(intersectedPath);
intersectedPath.writeSVG(oss, SVGTree::RELATIVE_PATH_CMDS);
}
@@ -737,6 +759,228 @@ void PsSpecialHandler::clip (vector<double> &, bool evenodd) {
}
+/** Applies a gradient fill to the current graphics path. Vector p contains the shading parameters
+ * in the following order:
+ * - shading type (6=Coons, 7=tensor product)
+ * - color space (1=gray, 3=rgb, 4=cmyk)
+ * - 1.0 followed by the background color components based on the declared color space, or 0.0
+ * - 1.0 followed by the bounding box coordinates, or 0.0
+ * - geometry and color parameters depending on the shading type */
+void PsSpecialHandler::shfill (vector<double> &params) {
+ if (params.size() < 9)
+ return;
+
+ // collect common data relevant for all shading types
+ int shadingTypeID = static_cast<int>(params[0]);
+ ColorSpace colorSpace = Color::RGB_SPACE;
+ switch (static_cast<int>(params[1])) {
+ case 1: colorSpace = Color::GRAY_SPACE; break;
+ case 3: colorSpace = Color::RGB_SPACE; break;
+ case 4: colorSpace = Color::CMYK_SPACE; break;
+ }
+ VectorIterator<double> it = params;
+ it += 2; // skip shading type and color space
+ // Get color to fill the whole mesh area before drawing the gradient colors on top of that background.
+ // This is an optional parameter to shfill.
+ bool bgcolorGiven = static_cast<bool>(*it++);
+ Color bgcolor;
+ if (bgcolorGiven)
+ bgcolor.set(colorSpace, it);
+ // Get clipping rectangle to limit the drawing area of the gradient mesh.
+ // This is an optional parameter to shfill too.
+ bool bboxGiven = static_cast<bool>(*it++);
+ if (bboxGiven) { // bounding box given
+ Path bboxPath;
+ const double &x1 = *it++;
+ const double &y1 = *it++;
+ const double &x2 = *it++;
+ const double &y2 = *it++;
+ bboxPath.moveto(x1, y1);
+ bboxPath.lineto(x2, y1);
+ bboxPath.lineto(x2, y2);
+ bboxPath.lineto(x1, y2);
+ bboxPath.closepath();
+ clip(bboxPath, false);
+ }
+ try {
+ if (shadingTypeID == 5)
+ processLatticeTriangularPatchMesh(colorSpace, it);
+ else
+ processSequentialPatchMesh(shadingTypeID, colorSpace, it);
+ }
+ catch (ShadingException &e) {
+ Message::estream(false) << "PostScript error: " << e.what() << '\n';
+ it.invalidate(); // stop processing the remaining patch data
+ }
+ catch (IteratorException &e) {
+ Message::estream(false) << "PostScript error: incomplete shading data\n";
+ }
+ if (bboxGiven)
+ _clipStack.pop();
+}
+
+
+/** Reads position and color data of a single shading patch from the data vector.
+ * @param[in] shadingTypeID PS shading type ID identifying the format of the subsequent patch data
+ * @param[in] edgeflag edge flag specifying how to connect the current patch to the preceding one
+ * @param[in] cspace color space used to compute the color gradient
+ * @param[in,out] it iterator used to sequentially access the patch data
+ * @param[out] points the points defining the geometry of the patch
+ * @param[out] colors the colors assigned to the vertices of the patch */
+static void read_patch_data (ShadingPatch &patch, int edgeflag,
+ VectorIterator<double> &it, vector<DPair> &points, vector<Color> &colors)
+{
+ // number of control points and colors required to define a single patch
+ int numPoints = patch.numPoints(edgeflag);
+ int numColors = patch.numColors(edgeflag);
+ points.resize(numPoints);
+ colors.resize(numColors);
+ if (patch.psShadingType() == 4) {
+ // format of a free-form triangular patch definition, where eN denotes
+ // the edge of the corresponding vertex:
+ // edge flag = 0, x1, y1, {color1}, e2, x2, y2, {color2}, e3, x3, y3, {color3}
+ // edge flag > 0, x1, y1, {color1}
+ for (int i=0; i < numPoints; i++) {
+ if (i > 0) ++it; // skip redundant edge flag from free-form triangular patch
+ double x = *it++;
+ double y = *it++;
+ points[i] = DPair(x, y);
+ colors[i].set(patch.colorSpace(), it);
+ }
+ }
+ else if (patch.psShadingType() == 6 || patch.psShadingType() == 7) {
+ // format of each Coons/tensor product patch definition:
+ // edge flag = 0, x1, y1, ... , xn, yn, {color1}, {color2}, {color3}, {color4}
+ // edge flag > 0, x5, y5, ... , xn, yn, {color3}, {color4}
+ for (int i=0; i < numPoints; i++) {
+ double x = *it++;
+ double y = *it++;
+ points[i] = DPair(x, y);
+ }
+ for (int i=0; i < numColors; i++)
+ colors[i].set(patch.colorSpace(), it);
+ }
+}
+
+
+class ShadingCallback : public ShadingPatch::Callback {
+ public:
+ ShadingCallback (SpecialActions *actions, XMLElementNode *parent, int clippathID)
+ : _actions(actions), _group(new XMLElementNode("g"))
+ {
+ if (parent)
+ parent->append(_group);
+ else
+ actions->appendToPage(_group);
+ if (clippathID > 0)
+ _group->addAttribute("clip-path", XMLString("url(#clip")+XMLString(clippathID)+")");
+ }
+
+ void patchSegment (GraphicPath<double> &path, const Color &color) {
+ if (!_actions->getMatrix().isIdentity())
+ path.transform(_actions->getMatrix());
+
+ // draw a single patch segment
+ ostringstream oss;
+ path.writeSVG(oss, SVGTree::RELATIVE_PATH_CMDS);
+ XMLElementNode *pathElem = new XMLElementNode("path");
+ pathElem->addAttribute("d", oss.str());
+ pathElem->addAttribute("fill", color.rgbString());
+ _group->append(pathElem);
+ }
+
+ private:
+ SpecialActions *_actions;
+ XMLElementNode *_group;
+};
+
+
+/** Handle all patch meshes whose patches and their connections can be processed sequentially.
+ * This comprises free-form triangular, Coons, and tensor-product patch meshes. */
+void PsSpecialHandler::processSequentialPatchMesh (int shadingTypeID, ColorSpace colorSpace, VectorIterator<double> &it) {
+ auto_ptr<ShadingPatch> previousPatch;
+ while (it.valid()) {
+ int edgeflag = static_cast<int>(*it++);
+ vector<DPair> points;
+ vector<Color> colors;
+ auto_ptr<ShadingPatch> patch;
+
+ patch = auto_ptr<ShadingPatch>(ShadingPatch::create(shadingTypeID, colorSpace));
+ read_patch_data(*patch, edgeflag, it, points, colors);
+ patch->setPoints(points, edgeflag, previousPatch.get());
+ patch->setColors(colors, edgeflag, previousPatch.get());
+ ShadingCallback callback(_actions, _xmlnode, _clipStack.topID());
+#if 0
+ if (bgcolorGiven) {
+ // fill whole patch area with given background color
+ GraphicPath<double> outline;
+ patch->getBoundaryPath(outline);
+ callback.patchSegment(outline, bgcolor);
+ }
+#endif
+ patch->approximate(SHADING_SEGMENT_SIZE, SHADING_SEGMENT_OVERLAP, SHADING_SIMPLIFY_DELTA, callback);
+ if (!_xmlnode) {
+ // update bounding box
+ BoundingBox bbox;
+ patch->getBBox(bbox);
+ bbox.transform(_actions->getMatrix());
+ _actions->embed(bbox);
+ }
+ previousPatch = patch;
+ }
+}
+
+
+struct PatchVertex {
+ DPair point;
+ Color color;
+};
+
+
+void PsSpecialHandler::processLatticeTriangularPatchMesh (ColorSpace colorSpace, VectorIterator<double> &it) {
+ int verticesPerRow = static_cast<int>(*it++);
+ if (verticesPerRow < 2)
+ return;
+
+ // hold two adjacent rows of vertices and colors
+ vector<PatchVertex> row1(verticesPerRow);
+ vector<PatchVertex> row2(verticesPerRow);
+ vector<PatchVertex> *rowptr1 = &row1;
+ vector<PatchVertex> *rowptr2 = &row2;
+ // read data of first row
+ for (int i=0; i < verticesPerRow; i++) {
+ PatchVertex &vertex = (*rowptr1)[i];
+ vertex.point.x(*it++);
+ vertex.point.y(*it++);
+ vertex.color.set(colorSpace, it);
+ }
+ LatticeTriangularPatch patch(colorSpace);
+ ShadingCallback callback(_actions, _xmlnode, _clipStack.topID());
+ while (it.valid()) {
+ // read next row
+ for (int i=0; i < verticesPerRow; i++) {
+ PatchVertex &vertex = (*rowptr2)[i];
+ vertex.point.x(*it++);
+ vertex.point.y(*it++);
+ vertex.color.set(colorSpace, it);
+ }
+ // create triangular patches for the vertices of the two rows
+ for (int i=0; i < verticesPerRow-1; i++) {
+ const PatchVertex &v1 = (*rowptr1)[i], &v2 = (*rowptr1)[i+1];
+ const PatchVertex &v3 = (*rowptr2)[i], &v4 = (*rowptr2)[i+1];
+ patch.setPoints(v1.point, v2.point, v3.point);
+ patch.setColors(v1.color, v2.color, v3.color);
+ patch.approximate(SHADING_SEGMENT_SIZE, SHADING_SEGMENT_OVERLAP, SHADING_SIMPLIFY_DELTA, callback);
+
+ patch.setPoints(v2.point, v3.point, v4.point);
+ patch.setColors(v2.color, v3.color, v4.color);
+ patch.approximate(SHADING_SEGMENT_SIZE, SHADING_SEGMENT_OVERLAP, SHADING_SIMPLIFY_DELTA, callback);
+ }
+ swap(rowptr1, rowptr2);
+ }
+}
+
+
/** Clears current path */
void PsSpecialHandler::newpath (vector<double> &p) {
bool drawing = (p[0] > 0);
@@ -793,38 +1037,33 @@ void PsSpecialHandler::rotate (vector<double> &p) {
void PsSpecialHandler::setgray (vector<double> &p) {
_pattern = 0;
- if (_actions) {
- Color c;
- c.setGray((float)p[0]);
- _actions->setColor(c);
- }
+ _currentcolor.setGray(p[0]);
+ if (_actions)
+ _actions->setColor(_currentcolor);
}
void PsSpecialHandler::setrgbcolor (vector<double> &p) {
_pattern= 0;
+ _currentcolor.setRGB(p[0], p[1], p[2]);
if (_actions)
- _actions->setColor(Color((float)p[0], (float)p[1], (float)p[2]));
+ _actions->setColor(_currentcolor);
}
void PsSpecialHandler::setcmykcolor (vector<double> &p) {
_pattern = 0;
- if (_actions) {
- Color c;
- c.setCMYK((float)p[0], (float)p[1], (float)p[2], (float)p[3]);
- _actions->setColor(c);
- }
+ _currentcolor.setCMYK(p[0], p[1], p[2], p[3]);
+ if (_actions)
+ _actions->setColor(_currentcolor);
}
void PsSpecialHandler::sethsbcolor (vector<double> &p) {
_pattern = 0;
- if (_actions) {
- Color c;
- c.setHSB((float)p[0], (float)p[1], (float)p[2]);
- _actions->setColor(c);
- }
+ _currentcolor.setHSB(p[0], p[1], p[2]);
+ if (_actions)
+ _actions->setColor(_currentcolor);
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PsSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PsSpecialHandler.h
index 10d091aa688..b8569c52b9a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/PsSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/PsSpecialHandler.h
@@ -38,6 +38,8 @@ class XMLElementNode;
class PsSpecialHandler : public SpecialHandler, public DVIEndPageListener, protected PSActions
{
typedef GraphicPath<double> Path;
+ typedef std::vector<double>::const_iterator DoubleVecIt;
+ typedef Color::ColorSpace ColorSpace;
class ClippingStack
{
@@ -81,13 +83,20 @@ class PsSpecialHandler : public SpecialHandler, public DVIEndPageListener, prote
public:
static bool COMPUTE_CLIPPATHS_INTERSECTIONS;
+ static bool SHADING_SEGMENT_OVERLAP;
+ static int SHADING_SEGMENT_SIZE;
+ static double SHADING_SIMPLIFY_DELTA;
protected:
void initialize ();
void moveToDVIPos ();
+ void executeAndSync (std::istream &is, bool updatePos);
void processHeaderFile (const char *fname);
void psfile (const std::string &fname, const std::map<std::string,std::string> &attr);
void dviEndPage (unsigned pageno);
+ void clip (Path &path, bool evenodd);
+ void processSequentialPatchMesh (int shadingTypeID, ColorSpace cspace, VectorIterator<double> &it);
+ void processLatticeTriangularPatchMesh (ColorSpace colorSpace, VectorIterator<double> &it);
/// scale given value by current PS scale factors
double scale (double v) const {return v*(_sx*_cos*_cos + _sy*(1-_cos*_cos));}
@@ -127,6 +136,7 @@ class PsSpecialHandler : public SpecialHandler, public DVIEndPageListener, prote
void setopacityalpha (std::vector<double> &p){_opacityalpha = p[0];}
void setpattern (std::vector<double> &p);
void setrgbcolor (std::vector<double> &rgb);
+ void shfill (std::vector<double> &p);
void stroke (std::vector<double> &p);
void translate (std::vector<double> &p);
void executed ();
@@ -141,6 +151,7 @@ class PsSpecialHandler : public SpecialHandler, public DVIEndPageListener, prote
std::string _headerCode; ///< collected literal PS header code
Path _path;
DPair _currentpoint; ///< current PS position in bp units
+ Color _currentcolor; ///< current stroke/fill color
double _sx, _sy; ///< horizontal and vertical scale factors retrieved by operator "applyscalevals"
double _cos; ///< cosine of angle between (1,0) and transform(1,0)
double _linewidth; ///< current linewidth
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/RangeMap.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/RangeMap.cpp
index e3bfea44eef..e3bfea44eef 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/RangeMap.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/RangeMap.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/RangeMap.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/RangeMap.h
index 60bf071aff0..60bf071aff0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/RangeMap.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/RangeMap.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SVGOutputBase.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SVGOutputBase.h
index cad892ea068..cad892ea068 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SVGOutputBase.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SVGOutputBase.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SVGTree.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SVGTree.cpp
index b902cb1b423..f220fb5352a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SVGTree.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SVGTree.cpp
@@ -40,6 +40,7 @@ bool SVGTree::CREATE_STYLE=true;
bool SVGTree::USE_FONTS=true;
bool SVGTree::CREATE_USE_ELEMENTS=false;
bool SVGTree::RELATIVE_PATH_CMDS=false;
+bool SVGTree::MERGE_CHARS=true;
double SVGTree::ZOOM_FACTOR=1.0;
@@ -136,12 +137,12 @@ void SVGTree::appendChar (int c, double x, double y, const Font &font) {
XMLElementNode *node=_span;
if (USE_FONTS) {
// changes of fonts and transformations require a new text element
- if (!_text || _font.changed() || _matrix.changed() || _vertical.changed()) {
+ if (!MERGE_CHARS || !_text || _font.changed() || _matrix.changed() || _vertical.changed()) {
newTextNode(x, y);
node = _text;
_color.changed(true);
}
- if (_xchanged || _ychanged || (_color.changed() && _color.get() != Color::BLACK)) {
+ if (MERGE_CHARS && (_xchanged || _ychanged || (_color.changed() && _color.get() != Color::BLACK))) {
// if drawing position was explicitly changed, create a new tspan element
_span = new XMLElementNode("tspan");
if (_xchanged) {
@@ -171,6 +172,10 @@ void SVGTree::appendChar (int c, double x, double y, const Font &font) {
node = _text;
}
node->append(XMLString(font.unicode(c), false));
+ if (!MERGE_CHARS && _color.get() != font.color()) {
+ node->addAttribute("fill", _color.get().rgbString());
+ _color.changed(false);
+ }
}
else {
if (_color.changed() || _matrix.changed()) {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SVGTree.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SVGTree.h
index 765d5340dcb..abbf3798ded 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SVGTree.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SVGTree.h
@@ -93,6 +93,7 @@ class SVGTree
static bool CREATE_STYLE; ///< use style elements and class attributes to reference fonts?
static bool CREATE_USE_ELEMENTS; ///< allow generation of <use/> elements?
static bool RELATIVE_PATH_CMDS; ///< relative path commands rather than absolute ones?
+ static bool MERGE_CHARS; ///< whether to merge chars with common properties into the same <text> tag
static double ZOOM_FACTOR; ///< factor applied to width/height attribute
protected:
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ShadingPatch.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ShadingPatch.cpp
new file mode 100644
index 00000000000..ff806b2a24b
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ShadingPatch.cpp
@@ -0,0 +1,64 @@
+/*************************************************************************
+** ShadingPatch.cpp **
+** **
+** This file is part of dvisvgm -- the DVI to SVG converter **
+** Copyright (C) 2005-2014 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 **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#include <sstream>
+#include "ShadingPatch.h"
+#include "TensorProductPatch.h"
+#include "TriangularPatch.h"
+
+using namespace std;
+
+/** Get functions to get/set the current color depending on the assigned color space. */
+void ShadingPatch::colorQueryFuncs (ColorGetter &getter, ColorSetter &setter) const {
+ switch (_colorspace) {
+ case Color::CMYK_SPACE:
+ getter = &Color::getCMYK;
+ setter = &Color::setCMYK;
+ break;
+ case Color::LAB_SPACE:
+ getter = &Color::getLab;
+ setter = &Color::setLab;
+ break;
+ case Color::RGB_SPACE:
+ getter = &Color::getRGB;
+ setter = &Color::setRGB;
+ break;
+ case Color::GRAY_SPACE:
+ getter = &Color::getGray;
+ setter = &Color::setGray;
+ }
+}
+
+
+/** Factory method: Creates a shading patch object depending on the given PostScript shading type. */
+ShadingPatch* ShadingPatch::create (int psShadingType, Color::ColorSpace cspace) {
+ switch (psShadingType) {
+ case 4: return new TriangularPatch(cspace);
+ case 5: return new LatticeTriangularPatch(cspace);
+ case 6: return new CoonsPatch(cspace);
+ case 7: return new TensorProductPatch(cspace);
+ }
+ ostringstream oss;
+ if (psShadingType > 0 && psShadingType < 4)
+ oss << "shading type " << psShadingType << " not supported";
+ else
+ oss << "invalid shading type " << psShadingType;
+ throw ShadingException(oss.str());
+}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ShadingPatch.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ShadingPatch.h
new file mode 100644
index 00000000000..08b8ba20da5
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ShadingPatch.h
@@ -0,0 +1,72 @@
+/*************************************************************************
+** ShadingPatch.h **
+** **
+** This file is part of dvisvgm -- the DVI to SVG converter **
+** Copyright (C) 2005-2014 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 **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#ifndef DVISVGM_SHADINGPATCH_H
+#define DVISVGM_SHADINGPATCH_H
+
+#include "Color.h"
+#include "GraphicPath.h"
+#include "MessageException.h"
+
+
+class ShadingPatch
+{
+ public:
+ struct Callback {
+ virtual ~Callback () {}
+ virtual void patchSegment (GraphicPath<double> &path, const Color &color) =0;
+ };
+
+ typedef std::vector<DPair> PointVec;
+ typedef std::vector<Color> ColorVec;
+
+ public:
+ ShadingPatch (Color::ColorSpace colorSpace) : _colorspace(colorSpace) {}
+ virtual ~ShadingPatch () {}
+ virtual int psShadingType () const =0;
+ virtual void approximate (int gridsize, bool overlap, double delta, Callback &callback) const =0;
+ virtual void getBBox (BoundingBox &bbox) const =0;
+ virtual void getBoundaryPath (GraphicPath<double> &path) const =0;
+ virtual void setPoints (const PointVec &points) {setPoints(points, 0, 0);}
+ virtual void setPoints (const PointVec &points, int edgeflag, ShadingPatch *patch) =0;
+ virtual void setColors (const ColorVec &colors) {setColors(colors, 0, 0);}
+ virtual void setColors (const ColorVec &colors, int edgeflag, ShadingPatch *patch) =0;
+ virtual int numPoints (int edgeflag) const =0;
+ virtual int numColors (int edgeflag) const =0;
+ Color::ColorSpace colorSpace () const {return _colorspace;}
+ static ShadingPatch* create (int psShadingType, Color::ColorSpace cspace);
+
+ protected:
+ typedef void (Color::*ColorGetter)(std::valarray<double> &va) const;
+ typedef void (Color::*ColorSetter)(const std::valarray<double> &va);
+ void colorQueryFuncs (ColorGetter &getter, ColorSetter &setter) const;
+
+ private:
+ Color::ColorSpace _colorspace; ///< color space used to compute the shading values
+};
+
+
+struct ShadingException : public MessageException
+{
+ ShadingException (const std::string &msg) : MessageException(msg) {}
+};
+
+#endif
+
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SignalHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SignalHandler.cpp
index 6e91a05442d..6e91a05442d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SignalHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SignalHandler.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SignalHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SignalHandler.h
index fa69e4129ed..fa69e4129ed 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SignalHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SignalHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SpecialActions.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SpecialActions.h
index 0222a977955..8f22eda1028 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SpecialActions.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SpecialActions.h
@@ -57,6 +57,8 @@ struct SpecialActions
virtual std::string getSVGFilename (unsigned pageno) const =0;
virtual void progress (const char *id) {}
virtual int getDVIStackDepth () const {return 0;}
+
+ static double PROGRESSBAR_DELAY; ///< progress bar doesn't appear before this time has elapsed (in sec)
};
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SpecialHandler.h
index c9779836106..c9779836106 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SpecialManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SpecialManager.cpp
index f10946b1d1e..1921b71b514 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SpecialManager.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SpecialManager.cpp
@@ -29,6 +29,8 @@
using namespace std;
+double SpecialActions::PROGRESSBAR_DELAY=1000; // initial delay in seconds (values >= 1000 disable the progressbar)
+
SpecialManager::~SpecialManager () {
unregisterHandlers();
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SpecialManager.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SpecialManager.h
index 2ea14da992b..2ea14da992b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/SpecialManager.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/SpecialManager.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/StreamReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/StreamReader.cpp
index 35a1cb1a583..35a1cb1a583 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/StreamReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/StreamReader.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/StreamReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/StreamReader.h
index 82679254cdc..82679254cdc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/StreamReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/StreamReader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/StreamWriter.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/StreamWriter.cpp
index 203a1788f87..203a1788f87 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/StreamWriter.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/StreamWriter.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/StreamWriter.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/StreamWriter.h
index f3ba391b044..f3ba391b044 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/StreamWriter.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/StreamWriter.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Subfont.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Subfont.cpp
index c37cd7e7eb6..c37cd7e7eb6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Subfont.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Subfont.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Subfont.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Subfont.h
index eafa683e30b..eafa683e30b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Subfont.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Subfont.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/System.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/System.cpp
index 6769f843cae..6769f843cae 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/System.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/System.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/System.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/System.h
index 7200c93f291..7200c93f291 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/System.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/System.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/TFM.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TFM.cpp
index db36b7f50b6..db36b7f50b6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/TFM.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TFM.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/TFM.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TFM.h
index a7941874b30..a7941874b30 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/TFM.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TFM.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TensorProductPatch.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TensorProductPatch.cpp
new file mode 100644
index 00000000000..2392e2c4ca7
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TensorProductPatch.cpp
@@ -0,0 +1,542 @@
+/*************************************************************************
+** TensorProductPatch.cpp **
+** **
+** This file is part of dvisvgm -- the DVI to SVG converter **
+** Copyright (C) 2005-2014 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 **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#include <iostream>
+#include <valarray>
+#include "TensorProductPatch.h"
+
+using namespace std;
+
+
+TensorProductPatch::TensorProductPatch (const PointVec &points, const ColorVec &colors, Color::ColorSpace cspace, int edgeflag, TensorProductPatch *patch)
+ : ShadingPatch(cspace)
+{
+ setPoints(points, edgeflag, patch);
+ setColors(colors, edgeflag, patch);
+}
+
+
+void TensorProductPatch::setFirstMatrixColumn (const DPair source[4], bool reverse) {
+ for (int i=0; i < 4; i++)
+ _points[i][0] = source[reverse ? 3-i : i];
+}
+
+
+void TensorProductPatch::setFirstMatrixColumn (DPair source[4][4], int col, bool reverse) {
+ for (int i=0; i < 4; i++)
+ _points[i][0] = source[reverse ? 3-i : i][col];
+}
+
+
+/*void TensorProductPatch::setPoints (const DPair points[4][4]) {
+ for (int i=0; i < 4; i++)
+ for (int j=0; j < 4; j++)
+ _points[i][j] = points[i][j];
+}*/
+
+
+/** Sets the control points defining the structure of the patch. If the edge flag is 0,
+ * the point vector must contain all 16 control points of the 4x4 matrix in "spiral" order:
+ * 0 11 10 9
+ * 1 12 15 8
+ * 2 13 14 7
+ * 3 4 5 6
+ * If the edge flag is 1,2, or 3, the points of the first matrix collumn
+ * are omitted, and taken from a reference patch instead.
+ * @param[in] points the control points in "spiral" order as described in the PS reference, p. 286
+ * @param[in] edgeflag defines how to connect this patch with another one
+ * @param[in] patch reference patch required if edgeflag > 0 */
+void TensorProductPatch::setPoints (const PointVec &points, int edgeflag, ShadingPatch *patch) {
+ TensorProductPatch *tpPatch = dynamic_cast<TensorProductPatch*>(patch);
+ if (edgeflag > 0 && !tpPatch)
+ throw ShadingException("missing preceding data in definition of tensor-product patch");
+ if ((edgeflag == 0 && points.size() != 16) || (edgeflag > 0 && points.size() != 12))
+ throw ShadingException("invalid number of control points in tensor-product patch definition");
+
+ // assign the 12 control points that are invariant for all edge flag values
+ int i = (edgeflag == 0 ? 4 : 0);
+ _points[3][1] = points[i++];
+ _points[3][2] = points[i++];
+ _points[3][3] = points[i++];
+ _points[2][3] = points[i++];
+ _points[1][3] = points[i++];
+ _points[0][3] = points[i++];
+ _points[0][2] = points[i++];
+ _points[0][1] = points[i++];
+ _points[1][1] = points[i++];
+ _points[2][1] = points[i++];
+ _points[2][2] = points[i++];
+ _points[1][2] = points[i];
+ // populate the first column of the control point matrix
+ switch (edgeflag) {
+ case 0: setFirstMatrixColumn(&points[0], false); break;
+ case 1: setFirstMatrixColumn(tpPatch->_points[3], false); break;
+ case 2: setFirstMatrixColumn(tpPatch->_points, 3, true); break;
+ case 3: setFirstMatrixColumn(tpPatch->_points[0], true); break;
+ }
+}
+
+
+/** Sets the vertex colors of the patch. If the edge flag is 0,
+ * the color vector must contain all 4 colors in the following order:
+ * c00, c30, c33, c03, where cXY belongs to the vertex pXY of the control
+ * point matrix.
+ * c00 ---- c03
+ * | |
+ * | |
+ * c30 ---- c33
+ * If the edge flag is 1,2, or 3, the colors c00 and c30 are omitted,
+ * and taken from a reference patch instead.
+ * @param[in] points the color values in the order c00, c30, c33, c03
+ * @param[in] edgeflag defines how to connect this patch with another one
+ * @param[in] patch reference patch required if edgeflag > 0 */
+void TensorProductPatch::setColors(const ColorVec &colors, int edgeflag, ShadingPatch* patch) {
+ TensorProductPatch *tpPatch = dynamic_cast<TensorProductPatch*>(patch);
+ if (edgeflag > 0 && !tpPatch)
+ throw ShadingException("missing preceding data in definition of tensor-product patch");
+ if ((edgeflag == 0 && colors.size() != 4) || (edgeflag > 0 && colors.size() != 2))
+ throw ShadingException("invalid number of colors in tensor-product patch definition");
+
+ int i = (edgeflag == 0 ? 2 : 0);
+ _colors[3] = colors[i];
+ _colors[1] = colors[i+1];
+ switch (edgeflag) {
+ case 0: _colors[0] = colors[0]; _colors[2] = colors[1]; break;
+ case 1: _colors[0] = tpPatch->_colors[2]; _colors[2] = tpPatch->_colors[3]; break;
+ case 2: _colors[0] = tpPatch->_colors[3]; _colors[2] = tpPatch->_colors[1]; break;
+ case 3: _colors[0] = tpPatch->_colors[1]; _colors[2] = tpPatch->_colors[0]; break;
+ }
+}
+
+
+/** Returns the point P(u,v) of the patch. */
+DPair TensorProductPatch::valueAt (double u, double v) const {
+ // check if we can return one of the vertices
+ if (u == 0) {
+ if (v == 0)
+ return _points[0][0];
+ else if (v == 1)
+ return _points[3][0];
+ }
+ else if (u == 1) {
+ if (v == 0)
+ return _points[0][3];
+ else if (v == 1)
+ return _points[3][3];
+ }
+ // compute tensor product
+ DPair p[4];
+ for (int i=0; i < 4; i++) {
+ Bezier bezier(_points[i][0], _points[i][1], _points[i][2], _points[i][3]);
+ p[i] = bezier.pointAt(u);
+ }
+ Bezier bezier(p[0], p[1], p[2], p[3]);
+ return bezier.pointAt(v);
+}
+
+
+/** Returns the color at point P(u,v) which is bilinearly interpolated from
+ * the colors assigned to vertices of the patch. */
+Color TensorProductPatch::colorAt (double u, double v) const {
+ // check if we can return one of the vertex colors
+ if (u == 0) {
+ if (v == 0)
+ return _colors[0];
+ else if (v == 1)
+ return _colors[2];
+ }
+ else if (u == 1) {
+ if (v == 0)
+ return _colors[1];
+ else if (v == 1)
+ return _colors[3];
+ }
+ // interpolate color
+ ColorGetter getComponents;
+ ColorSetter setComponents;
+ colorQueryFuncs(getComponents, setComponents);
+ valarray<double> comp[4];
+ for (int i=0; i < 4; i++)
+ (_colors[i].*getComponents)(comp[i]);
+ Color color;
+ (color.*setComponents)((1-u)*(1-v)*comp[0] + u*(1-v)*comp[1] + (1-u)*v*comp[2] + u*v*comp[3]);
+ return color;
+}
+
+
+/** Compute the average of four given colors depending on the assigned color space. */
+Color TensorProductPatch::averageColor (const Color &c1, const Color &c2, const Color &c3, const Color &c4) const {
+ ColorGetter getComponents;
+ ColorSetter setComponents;
+ colorQueryFuncs(getComponents, setComponents);
+ valarray<double> va1, va2, va3, va4;
+ (c1.*getComponents)(va1);
+ (c2.*getComponents)(va2);
+ (c3.*getComponents)(va3);
+ (c4.*getComponents)(va4);
+ Color averageColor;
+ (averageColor.*setComponents)((va1+va2+va3+va4)/4.0);
+ return averageColor;
+}
+
+
+void TensorProductPatch::getBoundaryPath (GraphicPath<double> &path) const {
+ // Simple approach: Use the outer curves as boundary path. This doesn't always lead
+ // to correct results since, depending on the control points, P(u,v) might exceed
+ // the simple boundary.
+ path.moveto(_points[0][0]);
+ path.cubicto(_points[0][1], _points[0][2], _points[0][3]);
+ path.cubicto(_points[1][3], _points[2][3], _points[3][3]);
+ path.cubicto(_points[3][2], _points[3][1], _points[3][0]);
+ path.cubicto(_points[2][0], _points[1][0], _points[0][0]);
+ path.closepath();
+}
+
+
+/** Computes the bicubically interpolated isoparametric Bézier curve P(u,t) that
+ * runs "vertically" from P(u,0) to P(u,1) through the patch P.
+ * @param[in] u "horizontal" parameter in the range from 0 to 1
+ * @param[out] bezier the resulting Bézier curve */
+void TensorProductPatch::verticalCurve (double u, Bezier &bezier) const {
+ // check for simple cases (boundary curves) first
+ if (u == 0)
+ bezier.setPoints(_points[0][0], _points[1][0], _points[2][0], _points[3][0]);
+ else if (u == 1)
+ bezier.setPoints(_points[0][3], _points[1][3], _points[2][3], _points[3][3]);
+ else {
+ // compute "inner" curve
+ DPair p[4];
+ for (int i=0; i < 4; i++) {
+ Bezier bezier(_points[i][0], _points[i][1], _points[i][2], _points[i][3]);
+ p[i] = bezier.pointAt(u);
+ }
+ bezier.setPoints(p[0], p[1], p[2], p[3]);
+ }
+}
+
+
+/** Computes the bicubically interpolated isoparametric Bézier curve P(t,v) that
+ * runs "horizontally" from P(0,v) to P(1,v) through the patch P.
+ * @param[in] v "vertical" parameter in the range from 0 to 1
+ * @param[out] bezier the resulting Bézier curve */
+void TensorProductPatch::horizontalCurve (double v, Bezier &bezier) const {
+ // check for simple cases (boundary curves) first
+ if (v == 0)
+ bezier.setPoints(_points[0][0], _points[0][1], _points[0][2], _points[0][3]);
+ else if (v == 1)
+ bezier.setPoints(_points[3][0], _points[3][1], _points[3][2], _points[3][3]);
+ else {
+ // compute "inner" curve
+ DPair p[4];
+ for (int i=0; i < 4; i++) {
+ Bezier bezier(_points[0][i], _points[1][i], _points[2][i], _points[3][i]);
+ p[i] = bezier.pointAt(v);
+ }
+ bezier.setPoints(p[0], p[1], p[2], p[3]);
+ }
+}
+
+
+/** Computes the sub-patch that maps the unit square [0,1]x[0,1] to
+ * the area P([u1,u2],[v1,v2]) of patch P. The control points of the sub-patch
+ * can easily be calculated using the tensor product blossom of patch P.
+ * See G. Farin: Curves and Surfaces for CAGD, p. 259 for example. */
+void TensorProductPatch::subpatch (double u1, double u2, double v1, double v2, TensorProductPatch &patch) const {
+ if (u1 > u2) swap(u1, u2);
+ if (v1 > v2) swap(v1, v2);
+ // compute control points
+ double u[] = {u1, u1, u1, 0}; // blossom parameters of the "horizontal" domain (plus dummy value 0)
+ for (int i=0; i < 4; i++) {
+ u[3-i] = u2;
+ double v[] = {v1, v1, v1, 0}; // blossom parameters of the "vertical" domain (plus dummy value 0)
+ for (int j=0; j < 4; j++) {
+ v[3-j] = v2;
+ patch._points[i][j] = blossomValue(u, v);
+ }
+ }
+ // assign color values
+ patch._colors[0] = colorAt(u1, v1);
+ patch._colors[1] = colorAt(u2, v1);
+ patch._colors[2] = colorAt(u1, v2);
+ patch._colors[3] = colorAt(u2, v2);
+}
+
+
+/** Computes the value b(u1,u2,u3;v1,v2,v3) where b is tensor product blossom of the patch. */
+DPair TensorProductPatch::blossomValue (double u1, double u2, double u3, double v1, double v2, double v3) const {
+ DPair p[4];
+ for (int i=0; i < 4; i++) {
+ Bezier bezier(_points[i][0], _points[i][1], _points[i][2], _points[i][3]);
+ p[i] = bezier.blossomValue(u1, u2, u3);
+ }
+ Bezier bezier(p[0], p[1], p[2], p[3]);
+ return bezier.blossomValue(v1, v2, v3);
+}
+
+
+static inline double clip (double x) {
+ if (fabs(x) < 0.001)
+ return 0;
+ if (fabs(1-x) < 0.001)
+ return 1;
+ return x;
+}
+
+
+/** Computes a single row of segments approximating the patch region between v1 and v1+inc. */
+void TensorProductPatch::approximateRow (double v1, double inc, bool overlap, double delta, const vector<Bezier> &vbeziers, Callback &callback) const {
+ double v2 = clip(v1+inc);
+ double ov2 = (overlap && v2 < 1) ? clip(v2+inc) : v2;
+ Bezier hbezier1, hbezier2;
+ horizontalCurve(v1, hbezier1);
+ horizontalCurve(ov2, hbezier2);
+ double u1 = 0;
+ for (size_t i=1; i < vbeziers.size(); i++) {
+ double u2 = clip(u1+inc);
+ double ou2 = (overlap && u2 < 1) ? clip(u2+inc) : u2;
+ // compute segment boundaries
+ Bezier b1(hbezier1, u1, ou2);
+ Bezier b2(vbeziers[i + (overlap && i < vbeziers.size()-1 ? 1 : 0)], v1, ov2);
+ Bezier b3(hbezier2, u1, ou2);
+ Bezier b4(vbeziers[i-1], v1, ov2);
+ GraphicPath<double> path;
+ path.moveto(b1.point(0));
+ if (inc > delta) {
+ path.cubicto(b1.point(1), b1.point(2), b1.point(3));
+ path.cubicto(b2.point(1), b2.point(2), b2.point(3));
+ path.cubicto(b3.point(2), b3.point(1), b3.point(0));
+ path.cubicto(b4.point(2), b4.point(1), b4.point(0));
+ }
+ else {
+ path.lineto(b1.point(3));
+ path.lineto(b2.point(3));
+ path.lineto(b3.point(0));
+ }
+ path.closepath();
+ callback.patchSegment(path, averageColor(colorAt(u1, v1), colorAt(u2, v1), colorAt(u1, v2), colorAt(u2, v2)));
+ u1 = u2;
+ }
+}
+
+
+/** Approximate the patch by dividing it into a grid of segments that are filled with the
+ * average color of the corresponding region. The boundary of each segment consists of
+ * four Bézier curves, too. In order to prevent visual gaps between neighbored segments due
+ * to anti-aliasing, the flag 'overlap' can be set. It enlarges the segments so that they overlap
+ * with their right and bottom neighbors (which are drawn on top of the overlapping regions).
+ * @param[in] gridsize number of segments per row/column
+ * @param[in] overlap if true, enlarge each segment to overlap with its right and bottom neighbors
+ * @param[in] delta reduce level of detail if the segment size is smaller than the given value
+ * @param[in] callback object notified */
+void TensorProductPatch::approximate (int gridsize, bool overlap, double delta, Callback &callback) const {
+ if (_colors[0] == _colors[1] && _colors[1] == _colors[2] && _colors[2] == _colors[3]) {
+ // simple case: monochromatic patch
+ GraphicPath<double> path;
+ getBoundaryPath(path);
+ callback.patchSegment(path, _colors[0]);
+ }
+ else {
+ const double inc = 1.0/gridsize;
+ // collect curves dividing the patch into several columns (curved vertical stripes)
+ vector<Bezier> vbeziers(gridsize+1);
+ double u=0;
+ for (int i=0; i <= gridsize; i++) {
+ verticalCurve(u, vbeziers[i]);
+ u = clip(u+inc);
+ }
+ // compute the segments row by row
+ double v=0;
+ for (int i=0; i < gridsize; i++) {
+ approximateRow(v, inc, overlap, delta, vbeziers, callback);
+ v = clip(v+inc);
+ }
+ }
+}
+
+
+void TensorProductPatch::getBBox (BoundingBox &bbox) const {
+ Bezier bezier;
+ BoundingBox bezierBox;
+ for (int i=0; i <= 1; i++) {
+ horizontalCurve(i, bezier);
+ bezier.getBBox(bezierBox);
+ bbox.embed(bezierBox);
+ verticalCurve(i, bezier);
+ bezier.getBBox(bezierBox);
+ bbox.embed(bezierBox);
+ }
+}
+
+
+#if 0
+void TensorProductPatch::approximate (int gridsize, Callback &callback) const {
+ const double inc = 1.0/gridsize;
+ Bezier ubezier0; verticalCurve(0, ubezier0);
+ Bezier ubezier1; verticalCurve(1, ubezier1);
+ Bezier vbezier0; horizontalCurve(0, vbezier0);
+ Bezier vbezier1; horizontalCurve(1, vbezier1);
+ for (double v1=0; v1 < 1; v1=clip(v1+inc)) {
+ double v2 = clip(v1+inc);
+ DPair p0 = valueAt(0, v1);
+ DPair p2 = valueAt(0, v2);
+ Color c0 = colorAt(0, v1);
+ Color c2 = colorAt(0, v2);
+ double u1 = 0;
+ for (double u2=inc; u2 <= 1; u2=clip(u2+inc)) {
+ DPair p1 = valueAt(u2, v1);
+ DPair p3 = valueAt(u2, v2);
+ Color c1 = colorAt(u2, v1);
+ Color c3 = colorAt(u2, v2);
+ // Compute a single patch segment. Only those segment edges that lay on the
+ // patch boundary are drawn as Bézier curves, all other edges are approximated
+ // with straight lines. This ensures a smooth outline and reduces the number of
+ // time consuming computations.
+ GraphicPath<double> path;
+ path.moveto(p0);
+ if (v1 > 0)
+ path.lineto(p1);
+ else {
+ Bezier bezier(vbezier0, u1, u2);
+ path.cubicto(bezier.point(1), bezier.point(2), bezier.point(3));
+ }
+ if (u2 < 1)
+ path.lineto(p3);
+ else {
+ Bezier bezier(ubezier1, v1, v2);
+ path.cubicto(bezier.point(1), bezier.point(2), bezier.point(3));
+ }
+ if (v2 < 1)
+ path.lineto(p2);
+ else {
+ Bezier bezier(vbezier1, u1, u2);
+ path.cubicto(bezier.point(2), bezier.point(1), bezier.point(0));
+ }
+ if (u1 > 0)
+ path.closepath();
+ else {
+ Bezier bezier(ubezier0, v1, v2);
+ path.cubicto(bezier.point(2), bezier.point(1), bezier.point(0));
+ path.closepath();
+ }
+ callback.patchSegment(path, averageColor(c0, c1, c2, c3));
+ p0 = p1;
+ p2 = p3;
+ c0 = c1;
+ c2 = c3;
+ u1 = u2;
+ }
+ }
+}
+#endif
+
+
+/////////////////////////////////////////////////////////////////////////////////////
+
+
+CoonsPatch::CoonsPatch (const PointVec &points, const ColorVec &colors, Color::ColorSpace cspace, int edgeflag, CoonsPatch *patch)
+ : TensorProductPatch(cspace)
+{
+ setPoints(points, edgeflag, patch);
+ setColors(colors, edgeflag, patch);
+}
+
+
+DPair CoonsPatch::valueAt (double u, double v) const {
+ // Compute the value of P(u,v) using the Coons equation rather than the
+ // tensor product since the "inner" control points of the tensor matrix
+ // might not be set yet.
+ Bezier bezier1(_points[3][0], _points[3][1], _points[3][2], _points[3][3]);
+ Bezier bezier2(_points[0][0], _points[0][1], _points[0][2], _points[0][3]);
+ Bezier bezier3(_points[3][0], _points[2][0], _points[1][0], _points[0][0]);
+ Bezier bezier4(_points[3][3], _points[2][3], _points[1][3], _points[0][3]);
+ DPair ph = bezier1.pointAt(u)*(1-v) + bezier2.pointAt(u)*v;
+ DPair pv = bezier3.pointAt(v)*(1-u) + bezier4.pointAt(v)*u;
+ DPair pc = (_points[3][0]*(1-u) + _points[3][3]*u)*(1-v) + (_points[0][0]*(1-u) + _points[0][3]*u)*v;
+ return ph+pv-pc;
+}
+
+
+/** Sets the 12 control points defining the geometry of the coons patch. The points
+ * must be given in the following order:
+ * 3 4 5 6
+ * 2 7
+ * 1 8
+ * 0 11 10 9
+ * where each edge of the square represents the four control points of a cubic Bézier curve.
+ * If the edge flag is 1, 2, or 3, the points 0 to 3 are omitted, and taken from a reference
+ * patch instead.
+ * @param[in] points the control points in cyclic order as described in the PS reference, p. 281
+ * @param[in] edgeflag defines how to connect this patch to another one
+ * @param[in] patch reference patch required if edgeflag > 0 */
+void CoonsPatch::setPoints (const PointVec &points, int edgeflag, ShadingPatch *patch) {
+ CoonsPatch *coonsPatch = dynamic_cast<CoonsPatch*>(patch);
+ if (edgeflag > 0 && !coonsPatch)
+ throw ShadingException("missing preceding data in definition of relative Coons patch");
+ if ((edgeflag == 0 && points.size() != 12) || (edgeflag > 0 && points.size() != 8))
+ throw ShadingException("invalid number of control points in Coons patch definition");
+
+ // Since a Coons patch is a special tensor product patch, we only have to reorder the
+ // control points and compute the additional "inner" points of the 4x4 point tensor matrix.
+
+ // set outer control points of the tensor matrix except those of the first column
+ // because these points depend on the edge flag
+ int i = (edgeflag == 0 ? 4 : 0);
+ _points[3][1] = points[i++];
+ _points[3][2] = points[i++];
+ _points[3][3] = points[i++];
+ _points[2][3] = points[i++];
+ _points[1][3] = points[i++];
+ _points[0][3] = points[i++];
+ _points[0][2] = points[i++];
+ _points[0][1] = points[i];
+
+ // set control points of first matrix column
+ switch (edgeflag) {
+ case 0: setFirstMatrixColumn(&points[0], false); break;
+ case 1: setFirstMatrixColumn(coonsPatch->_points[3], false); break;
+ case 2: setFirstMatrixColumn(coonsPatch->_points, 3, true); break;
+ case 3: setFirstMatrixColumn(coonsPatch->_points[0], true); break;
+ }
+ // compute inner control points of the tensor matrix
+ _points[1][1] = valueAt(1.0/3.0, 2.0/3.0);
+ _points[1][2] = valueAt(2.0/3.0, 2.0/3.0);
+ _points[2][1] = valueAt(1.0/3.0, 1.0/3.0);
+ _points[2][2] = valueAt(2.0/3.0, 1.0/3.0);
+}
+
+
+void CoonsPatch::setColors (const ColorVec &colors, int edgeflag, ShadingPatch *patch) {
+ CoonsPatch *coonsPatch = dynamic_cast<CoonsPatch*>(patch);
+ if (edgeflag > 0 && !coonsPatch)
+ throw ShadingException("missing preceding data in definition of relative Coons patch");
+ if ((edgeflag == 0 && colors.size() != 4) || (edgeflag > 0 && colors.size() != 2))
+ throw ShadingException("invalid number of colors in Coons patch definition");
+
+ int i = (edgeflag == 0 ? 2 : 0);
+ _colors[3] = colors[i];
+ _colors[1] = colors[i+1];
+ switch (edgeflag) {
+ case 0: _colors[0] = colors[0]; _colors[2] = colors[1]; break;
+ case 1: _colors[0] = coonsPatch->_colors[2]; _colors[2] = coonsPatch->_colors[3]; break;
+ case 2: _colors[0] = coonsPatch->_colors[3]; _colors[2] = coonsPatch->_colors[1]; break;
+ case 3: _colors[0] = coonsPatch->_colors[1]; _colors[2] = coonsPatch->_colors[0]; break;
+ }
+}
+
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TensorProductPatch.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TensorProductPatch.h
new file mode 100644
index 00000000000..25ac585b8b6
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TensorProductPatch.h
@@ -0,0 +1,94 @@
+/*************************************************************************
+** TensorProductPatch.h **
+** **
+** This file is part of dvisvgm -- the DVI to SVG converter **
+** Copyright (C) 2005-2014 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 **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#ifndef TENSORPRODUCTPATCH_H
+#define TENSORPRODUCTPATCH_H
+
+#include <map>
+#include <ostream>
+#include <vector>
+#include "Bezier.h"
+#include "Color.h"
+#include "MessageException.h"
+#include "Pair.h"
+#include "ShadingPatch.h"
+
+
+/** This class represents a single tensor product patch P which is defined by 16 control points
+ * and 4 color values. The mapping of the unit square to the patch surface is defined as the sum
+ * \f[P(u,v):=\sum_{i=0}^3\sum_{j=0}^3 p_{ij} B_i(u) B_j(v)\f]
+ * where \f$B_k(t)={3\choose k}(1-t)^k t^k\f$ and \f$u,v \in [0,1]\f$. The four colors assigned
+ * to the vertices are interpolated bilinearily over the unit square. */
+class TensorProductPatch : public ShadingPatch
+{
+ friend class CoonsPatch;
+
+ public:
+ TensorProductPatch () : ShadingPatch(Color::RGB_SPACE) {}
+ TensorProductPatch (Color::ColorSpace &cspace) : ShadingPatch(cspace) {}
+ TensorProductPatch (const PointVec &points, const ColorVec &colors, Color::ColorSpace cspace, int edgeflag, TensorProductPatch *patch);
+ int psShadingType() const {return 7;}
+ void setPoints (const DPair points[4][4], int edgeflag, TensorProductPatch *patch);
+ void setPoints (const PointVec &points, int edgeflag, ShadingPatch *patch);
+ void setColors (const ColorVec &colors, int edgeflag, ShadingPatch *patch);
+ virtual DPair valueAt (double u, double v) const;
+ Color colorAt (double u, double v) const;
+ void horizontalCurve (double v, Bezier &bezier) const;
+ void verticalCurve (double u, Bezier &bezier) const;
+ void getBoundaryPath (GraphicPath<double> &path) const;
+ void subpatch (double u1, double u2, double v1, double v2, TensorProductPatch &patch) const;
+ DPair blossomValue (double u1, double u2, double u3, double v1, double v2, double v3) const;
+ DPair blossomValue (double u[3], double v[3]) const {return blossomValue(u[0], u[1], u[2], v[0], v[1], v[2]);}
+ void approximate (int gridsize, bool overlap, double delta, Callback &callback) const;
+ void getBBox (BoundingBox &bbox) const;
+ int numPoints (int edgeflag) const {return edgeflag == 0 ? 16 : 12;}
+ int numColors (int edgeflag) const {return edgeflag == 0 ? 4 : 2;}
+
+ protected:
+ Color averageColor (const Color &c1, const Color &c2, const Color &c3, const Color &c4) const;
+ void approximateRow (double v1, double inc, bool overlap, double delta, const std::vector<Bezier> &beziers, Callback &callback) const;
+ void setFirstMatrixColumn (const DPair source[4], bool reverse);
+ void setFirstMatrixColumn (DPair source[4][4], int col, bool reverse);
+
+ private:
+ DPair _points[4][4]; ///< control point matrix defining the patch surface
+ Color _colors[4]; ///< vertex colors cK (c0->p00, c1->p03, c2->p30, c3->p33)
+};
+
+
+/** Coons patches are special tensor product patches where the four "inner" control points
+ * depend on the outer ones, i.e. they are computed automatically and can't be set by the user.
+ * Thus, a Coons patch is defined by 12 control points, 4 vertex colors and a corresponding
+ * color space. */
+class CoonsPatch : public TensorProductPatch
+{
+ public:
+ CoonsPatch () {}
+ CoonsPatch (Color::ColorSpace cspace) : TensorProductPatch(cspace) {}
+ CoonsPatch (const PointVec &points, const ColorVec &colors, Color::ColorSpace cspace, int edgeflag, CoonsPatch *patch);
+ int psShadingType() const {return 6;}
+ virtual void setPoints (const PointVec &points, int edgeflag, ShadingPatch *patch);
+ virtual void setColors (const ColorVec &colors, int edgeflag, ShadingPatch *patch);
+ virtual DPair valueAt (double u, double v) const;
+ int numPoints (int edgeflag) const {return edgeflag == 0 ? 12 : 8;}
+ int numColors (int edgeflag) const {return edgeflag == 0 ? 4 : 2;}
+};
+
+#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Terminal.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Terminal.cpp
index e95111d196b..e95111d196b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Terminal.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Terminal.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Terminal.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Terminal.h
index 08ac7e6300a..08ac7e6300a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Terminal.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Terminal.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ToUnicodeMap.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ToUnicodeMap.cpp
index 5d5f1b23b76..5d5f1b23b76 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ToUnicodeMap.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ToUnicodeMap.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ToUnicodeMap.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ToUnicodeMap.h
index 80ad10dc874..80ad10dc874 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ToUnicodeMap.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ToUnicodeMap.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/TpicSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TpicSpecialHandler.cpp
index c460542ca8e..c460542ca8e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/TpicSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TpicSpecialHandler.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/TpicSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TpicSpecialHandler.h
index 424721dbffc..424721dbffc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/TpicSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TpicSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TriangularPatch.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TriangularPatch.cpp
new file mode 100644
index 00000000000..8003d33e4d5
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TriangularPatch.cpp
@@ -0,0 +1,207 @@
+/*************************************************************************
+** TriangularPatch.cpp **
+** **
+** This file is part of dvisvgm -- the DVI to SVG converter **
+** Copyright (C) 2005-2014 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 **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#include "TriangularPatch.h"
+
+using namespace std;
+
+TriangularPatch::TriangularPatch (const PointVec &points, const ColorVec &colors, Color::ColorSpace cspace, int edgeflag, TriangularPatch *patch)
+ : ShadingPatch(cspace)
+{
+ setPoints(points, edgeflag, patch);
+ setColors(colors, edgeflag, patch);
+}
+
+
+void TriangularPatch::setPoints (const PointVec &points, int edgeflag, ShadingPatch *patch) {
+ TriangularPatch *triangularPatch = dynamic_cast<TriangularPatch*>(patch);
+ if (edgeflag > 0 && !triangularPatch)
+ throw ShadingException("missing preceding data in definition of triangular patch");
+ if ((edgeflag == 0 && points.size() != 3) || (edgeflag > 0 && points.size() != 1))
+ throw ShadingException("invalid number of vertices in triangular patch definition");
+
+ _points[0] = points[0];
+ switch (edgeflag) {
+ case 0:
+ _points[1] = points[1];
+ _points[2] = points[2];
+ break;
+ case 1:
+ _points[1] = triangularPatch->_points[1];
+ _points[2] = triangularPatch->_points[2];
+ break;
+ case 2:
+ _points[1] = triangularPatch->_points[2];
+ _points[2] = triangularPatch->_points[0];
+ }
+}
+
+
+void TriangularPatch::setPoints (const DPair &p1, const DPair &p2, const DPair &p3) {
+ _points[0] = p1;
+ _points[1] = p2;
+ _points[2] = p3;
+}
+
+
+void TriangularPatch::setColors (const ColorVec &colors, int edgeflag, ShadingPatch *patch) {
+ TriangularPatch *triangularPatch = dynamic_cast<TriangularPatch*>(patch);
+ if (edgeflag > 0 && !triangularPatch)
+ throw ShadingException("missing preceding data in definition of triangular patch");
+ if ((edgeflag == 0 && colors.size() != 3) || (edgeflag > 0 && colors.size() != 1))
+ throw ShadingException("invalid number of colors in triangular patch definition");
+
+ _colors[0] = colors[0];
+ switch (edgeflag) {
+ case 0:
+ _colors[1] = colors[1];
+ _colors[2] = colors[2];
+ break;
+ case 1:
+ _colors[1] = triangularPatch->_colors[1];
+ _colors[2] = triangularPatch->_colors[2];
+ break;
+ case 2:
+ _colors[1] = triangularPatch->_colors[2];
+ _colors[2] = triangularPatch->_colors[0];
+ }
+}
+
+
+void TriangularPatch::setColors (const Color &c1, const Color &c2, const Color &c3) {
+ _colors[0] = c1;
+ _colors[1] = c2;
+ _colors[2] = c3;
+}
+
+
+/** Returns the Cartesian coordinates for the barycentric coordinates \f$(u, v, 1-u-v)\f$
+ * of a point of the triangle, where \f$u, v \in [0,1]\f$ and \f$u+v \le 1\f$.
+ * The relation between the vertices of the triangle and their barycentric coordinates
+ * is as follows: \f$(1,0,0)=p_1, (0,1,0)=p_2, (0,0,1)=p_0\f$. */
+DPair TriangularPatch::pointAt (double u, double v) const {
+ return _points[0] + (_points[1]-_points[0])*u + (_points[2]-_points[0])*v;
+}
+
+
+/** Returns the color at a given point of the triangle. The point must be given
+ * in barycentric coordinates \f$(u, v, 1-u-v)\f$, where \f$u, v \in [0,1]\f$
+ * and \f$u+v \le 1\f$.
+ * The relation between the vertices of the triangle and their barycentric coordinates
+ * is as follows: \f$(1,0,0)=p_1, (0,1,0)=p_2, (0,0,1)=p_0\f$. */
+Color TriangularPatch::colorAt (double u, double v) const {
+ ColorGetter getComponents;
+ ColorSetter setComponents;
+ colorQueryFuncs(getComponents, setComponents);
+ valarray<double> comp[3];
+ for (int i=0; i < 3; i++)
+ (_colors[i].*getComponents)(comp[i]);
+ Color color;
+ (color.*setComponents)(comp[0]*(1-u-v) + comp[1]*u + comp[2]*v);
+ return color;
+}
+
+
+/** Compute the average of three given colors depending on the assigned color space. */
+Color TriangularPatch::averageColor (const Color &c1, const Color &c2, const Color &c3) const {
+ ColorGetter getComponents;
+ ColorSetter setComponents;
+ colorQueryFuncs(getComponents, setComponents);
+ valarray<double> va1, va2, va3;
+ (c1.*getComponents)(va1);
+ (c2.*getComponents)(va2);
+ (c3.*getComponents)(va3);
+ Color averageColor;
+ (averageColor.*setComponents)((va1+va2+va3)/3.0);
+ return averageColor;
+}
+
+
+static inline double clip (double x) {
+ if (fabs(x) < 0.001)
+ return 0;
+ if (fabs(1-x) < 0.001)
+ return 1;
+ return x;
+}
+
+
+/** Approximate the patch by dividing it into a grid of triangular segments that are filled
+ * with the average color of the corresponding region. In order to prevent visual gaps between
+ * adjacent segments due to anti-aliasing, the flag 'overlap' can be set. It enlarges the
+ * segments so that they overlap with their right and bottom neighbors (which are drawn on
+ * top of the overlapping regions).
+ * @param[in] gridsize number of segments per row/column
+ * @param[in] overlap if true, enlarge each segment to overlap with its right and bottom neighbors
+ * @param[in] delta reduce level of detail if the segment size is smaller than the given value
+ * @param[in] callback object notified */
+void TriangularPatch::approximate (int gridsize, bool overlap, double delta, Callback &callback) const {
+ if (_colors[0] == _colors[1] && _colors[1] == _colors[2]) {
+ GraphicPath<double> path;
+ getBoundaryPath(path);
+ callback.patchSegment(path, _colors[0]);
+ }
+ else {
+ const double inc = 1.0/gridsize;
+ for (double u1=0; u1 < 1; u1=clip(u1+inc)) {
+ double u2 = clip(u1+inc);
+ double ou2 = (overlap && clip(u2+inc) <= 1 ? clip(u2+inc) : u2);
+ for (double v1=0; clip(u1+v1) < 1; v1=clip(v1+inc)) {
+ double v2 = clip(v1+inc);
+ double ov2 = (overlap && clip(v2+inc) <= 1 ? clip(v2+inc) : v2);
+ if (!overlap || (clip(u1+ov2) <= 1 && clip(ou2+v1) <= 1)) {
+ // create triangular segments pointing in the same orientation as the whole patch
+ GraphicPath<double> path;
+ path.moveto(pointAt(u1, v1));
+ path.lineto(pointAt(ou2, v1));
+ path.lineto(pointAt(u1, ov2));
+ path.closepath();
+ callback.patchSegment(path, averageColor(colorAt(u1, v1), colorAt(u2, v1), colorAt(u1, v2)));
+ if (clip(u2+v2) <= 1 && (!overlap || inc > delta)) {
+ // create triangular segments pointing in the opposite direction as the whole patch
+ path.clear();
+ path.moveto(pointAt(u1, v2));
+ path.lineto(pointAt(u2, v1));
+ path.lineto(pointAt(u2, v2));
+ path.closepath();
+ callback.patchSegment(path, averageColor(colorAt(u1, v2), colorAt(u2, v1), colorAt(u2, v2)));
+ }
+ }
+ }
+ }
+ }
+}
+
+
+void TriangularPatch::getBoundaryPath(GraphicPath<double> &path) const {
+ path.clear();
+ path.moveto(_points[0]);
+ path.lineto(_points[1]);
+ path.lineto(_points[2]);
+ path.closepath();
+}
+
+
+void TriangularPatch::getBBox (BoundingBox &bbox) const {
+ bbox.invalidate();
+ bbox.embed(_points[0]);
+ bbox.embed(_points[1]);
+ bbox.embed(_points[2]);
+} \ No newline at end of file
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TriangularPatch.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TriangularPatch.h
new file mode 100644
index 00000000000..451f83614e8
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/TriangularPatch.h
@@ -0,0 +1,63 @@
+/*************************************************************************
+** TriangularPatch.h **
+** **
+** This file is part of dvisvgm -- the DVI to SVG converter **
+** Copyright (C) 2005-2014 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 **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#ifndef DVISVGM_TRIANGULARPATCH_H
+#define DVISVGM_TRIANGULARPATCH_H
+
+#include "Color.h"
+#include "Pair.h"
+#include "ShadingPatch.h"
+
+class TriangularPatch : public ShadingPatch
+{
+ public:
+ TriangularPatch ();
+ TriangularPatch (Color::ColorSpace cspace) : ShadingPatch(cspace) {}
+ TriangularPatch (const PointVec &points, const ColorVec &colors, Color::ColorSpace cspace, int edgeflag, TriangularPatch *patch);
+ int psShadingType() const {return 4;}
+ DPair pointAt (double u, double v) const;
+ Color colorAt (double u, double v) const;
+ void setPoints (const PointVec &points, int edgeflag, ShadingPatch *patch);
+ void setPoints (const DPair &p1, const DPair &p2, const DPair &p3);
+ void setColors (const ColorVec &colors, int edgeflag, ShadingPatch *patch);
+ void setColors (const Color &c1, const Color &c2, const Color &c3);
+ void approximate (int gridsize, bool overlap, double delta, Callback &listener) const;
+ void getBBox (BoundingBox &bbox) const;
+ void getBoundaryPath(GraphicPath<double> &path) const;
+ int numPoints (int edgeflag) const {return edgeflag == 0 ? 3 : 1;}
+ int numColors (int edgeflag) const {return edgeflag == 0 ? 3 : 1;}
+
+ protected:
+ Color averageColor (const Color &c1, const Color &c2, const Color &c3) const;
+
+ private:
+ DPair _points[3];
+ Color _colors[3];
+};
+
+
+class LatticeTriangularPatch : public TriangularPatch
+{
+ public:
+ LatticeTriangularPatch (Color::ColorSpace cspace) : TriangularPatch(cspace) {}
+ int psShadingType() const {return 5;}
+};
+
+#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Unicode.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Unicode.cpp
index f0fdde17898..f0fdde17898 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Unicode.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Unicode.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Unicode.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Unicode.h
index 41be47749cd..41be47749cd 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/Unicode.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/Unicode.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/VFActions.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/VFActions.h
index a8e86831fe9..a8e86831fe9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/VFActions.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/VFActions.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/VFReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/VFReader.cpp
index 45d0ed7da27..45d0ed7da27 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/VFReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/VFReader.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/VFReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/VFReader.h
index f6d9474ccbe..f6d9474ccbe 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/VFReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/VFReader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.9/src/VectorIterator.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/VectorIterator.h
new file mode 100644
index 00000000000..c7235b82fdd
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/VectorIterator.h
@@ -0,0 +1,116 @@
+/*************************************************************************
+** VectorIterator.h **
+** **
+** This file is part of dvisvgm -- the DVI to SVG converter **
+** Copyright (C) 2005-2014 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 **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#ifndef VECTORITERATOR_H
+#define VECTORITERATOR_H
+
+#include <vector>
+#include "MessageException.h"
+
+
+struct IteratorException : public MessageException
+{
+ IteratorException (const std::string &msg) : MessageException(msg) {}
+};
+
+
+template <typename T>
+class VectorIterator
+{
+ public:
+ VectorIterator (std::vector<T> &vec) : _vector(vec), _pos(0) {}
+
+ VectorIterator operator ++ () {
+ _pos++;
+ return *this;
+ }
+
+ VectorIterator operator ++ (int) {
+ VectorIterator it = *this;
+ _pos++;
+ return it;
+ }
+
+ VectorIterator operator -- () {
+ _pos--;
+ return *this;
+ }
+
+ VectorIterator operator -- (int) {
+ VectorIterator it = *this;
+ _pos--;
+ return it;
+ }
+
+ VectorIterator operator += (int n) {
+ _pos += n;
+ return *this;
+ }
+
+ VectorIterator operator -= (int n) {
+ _pos -= n;
+ return *this;
+ }
+
+ VectorIterator operator + (int n) {
+ return VectorIterator(_vector, _pos+n);
+ }
+
+ VectorIterator operator - (int n) {
+ return VectorIterator(_vector, _pos-n);
+ }
+
+ T& operator * () {
+ if (valid())
+ return _vector[_pos];
+ throw IteratorException("invalid access");
+ }
+
+ T* operator -> () {
+ if (valid())
+ return &_vector[_pos];
+ throw IteratorException("invalid access");
+ }
+
+ bool operator == (const VectorIterator &it) const {return _pos == it._pos;}
+ bool operator != (const VectorIterator &it) const {return _pos != it._pos;}
+ bool operator <= (const VectorIterator &it) const {return _pos <= it._pos;}
+ bool operator >= (const VectorIterator &it) const {return _pos >= it._pos;}
+ bool operator < (const VectorIterator &it) const {return _pos < it._pos;}
+ bool operator > (const VectorIterator &it) const {return _pos > it._pos;}
+
+ size_t distanceToLast () const {
+ if (valid)
+ return _vector.size()-_pos-1;
+ return 0;
+ }
+
+ bool valid () const {return _pos >= 0 && _pos < _vector.size();}
+ void invalidate () {_pos = _vector.size();}
+
+ protected:
+ VectorIterator (std::vector<T> &vec, size_t pos) : _vector(vec), _pos(pos) {}
+
+ private:
+ std::vector<T> &_vector;
+ size_t _pos;
+};
+
+#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/VectorStream.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/VectorStream.h
index 92ce8a68437..92ce8a68437 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/VectorStream.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/VectorStream.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLDocument.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLDocument.cpp
index b9cb243dbc9..b9cb243dbc9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLDocument.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLDocument.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLDocument.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLDocument.h
index 02800f6b3b6..02800f6b3b6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLDocument.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLDocument.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLNode.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLNode.cpp
index 5b2252a28db..5b2252a28db 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLNode.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLNode.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLNode.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLNode.h
index a90a5a6a391..4660ab23c05 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLNode.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLNode.h
@@ -60,7 +60,7 @@ class XMLElementNode : public XMLNode
bool insertBefore (XMLNode *child, XMLNode *sibling);
bool hasAttribute (const std::string &name) const;
const char* getAttributeValue (const std::string &name) const;
- bool getDescendants (const char *name, const char *attr_name, std::vector<XMLElementNode*> &descendants) const;
+ bool getDescendants (const char *name, const char *attrName, std::vector<XMLElementNode*> &descendants) const;
XMLElementNode* getFirstDescendant (const char *name, const char *attrName, const char *attrValue) const;
std::ostream& write (std::ostream &os) const;
bool empty () const {return _children.empty();}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLString.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLString.cpp
index 4911b6c6a19..4911b6c6a19 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLString.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLString.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLString.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLString.h
index 311d7e535b9..311d7e535b9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/XMLString.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/XMLString.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/dvisvgm.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/dvisvgm.cpp
index ca4bffd92f9..f9f36fe71f4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/dvisvgm.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/dvisvgm.cpp
@@ -344,29 +344,33 @@ int main (int argc, char *argv[]) {
if (args.progress_given()) {
DVIReader::COMPUTE_PROGRESS = args.progress_given();
- DVIToSVGActions::PROGRESSBAR_DELAY = args.progress_arg();
+ SpecialActions::PROGRESSBAR_DELAY = args.progress_arg();
}
SVGTree::CREATE_STYLE = !args.no_styles_given();
SVGTree::USE_FONTS = !args.no_fonts_given();
SVGTree::CREATE_USE_ELEMENTS = args.no_fonts_arg() < 1;
SVGTree::ZOOM_FACTOR = args.zoom_arg();
SVGTree::RELATIVE_PATH_CMDS = args.relative_given();
+ SVGTree::MERGE_CHARS = !args.no_merge_given();
DVIToSVG::TRACE_MODE = args.trace_all_given() ? (args.trace_all_arg() ? 'a' : 'm') : 0;
Message::LEVEL = args.verbosity_arg();
PhysicalFont::EXACT_BBOX = args.exact_given();
PhysicalFont::KEEP_TEMP_FILES = args.keep_given();
- PhysicalFont::METAFONT_MAG = args.mag_arg();
- PsSpecialHandler::COMPUTE_CLIPPATHS_INTERSECTIONS = args.clipjoin_given();
+ PhysicalFont::METAFONT_MAG = max(1.0, args.mag_arg());
XMLString::DECIMAL_PLACES = max(0, min(6, args.precision_arg()));
if (!HtmlSpecialHandler::setLinkMarker(args.linkmark_arg()))
Message::wstream(true) << "invalid argument '"+args.linkmark_arg()+"' supplied for option --linkmark\n";
double start_time = System::time();
bool eps_given=false;
-#if defined(HAVE_LIBGS) || !defined(DISABLE_GS)
+#ifndef DISABLE_GS
eps_given = args.eps_given();
+ PsSpecialHandler::COMPUTE_CLIPPATHS_INTERSECTIONS = args.clipjoin_given();
+ PsSpecialHandler::SHADING_SEGMENT_OVERLAP = args.grad_overlap_given();
+ PsSpecialHandler::SHADING_SEGMENT_SIZE = max(1, args.grad_segments_arg());
+ PsSpecialHandler::SHADING_SIMPLIFY_DELTA = args.grad_simplify_arg();
#endif
string inputfile = ensure_suffix(args.file(0), eps_given);
- ifstream ifs(inputfile.c_str(), ios_base::binary|ios_base::in);
+ ifstream ifs(inputfile.c_str(), ios::binary|ios::in);
if (!ifs) {
Message::estream(true) << "can't open file '" << inputfile << "' for reading\n";
return 0;
@@ -374,7 +378,7 @@ int main (int argc, char *argv[]) {
try {
SVGOutput out(args.stdout_given() ? 0 : inputfile.c_str(), args.output_arg(), args.zip_given() ? args.zip_arg() : 0);
SignalHandler::instance().start();
-#if defined(HAVE_LIBGS) || !defined(DISABLE_GS)
+#ifndef DISABLE_GS
if (args.eps_given()) {
EPSToSVG eps2svg(inputfile, out);
eps2svg.convert();
@@ -408,6 +412,7 @@ int main (int argc, char *argv[]) {
Message::estream() << "\nPostScript error: " << e.what() << '\n';
}
catch (SignalException &e) {
+ Message::wstream().clearline();
Message::wstream(true) << "execution interrupted by user\n";
}
catch (MessageException &e) {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/gzstream.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/gzstream.cpp
index 2893c299891..2893c299891 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/gzstream.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/gzstream.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/gzstream.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/gzstream.h
index 60f38c4fac7..60f38c4fac7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/gzstream.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/gzstream.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/iapi.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/iapi.h
index 8e29d938d03..8e29d938d03 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/iapi.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/iapi.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ierrors.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ierrors.h
index 3184341177e..3184341177e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/ierrors.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/ierrors.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/macros.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/macros.h
index 73217c763e0..73217c763e0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/macros.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/macros.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/options.dtd b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/options.dtd
index d8444c94c9f..d8444c94c9f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/options.dtd
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/options.dtd
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/options.xml b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/options.xml
index 35b8618ff54..61c917a682d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/options.xml
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/options.xml
@@ -46,9 +46,20 @@
<arg type="string" name="size" default="min"/>
<description>set size of bounding box</description>
</option>
- <option long="clipjoin" short="j">
+ <option long="clipjoin" short="j" if="!defined(DISABLE_GS)">
<description>compute intersection of clipping paths</description>
</option>
+ <option long="grad-overlap" if="!defined(DISABLE_GS)">
+ <description>create operlapping color gradient segments</description>
+ </option>
+ <option long="grad-segments" if="!defined(DISABLE_GS)">
+ <arg type="int" name="number" default="20"/>
+ <description>number of color gradient segments per row</description>
+ </option>
+ <option long="grad-simplify" if="!defined(DISABLE_GS)">
+ <arg type="double" name="delta" default="0.05"/>
+ <description>reduce level of detail for small segments</description>
+ </option>
<option long="linkmark" short="L">
<arg type="string" name="style" default="box"/>
<description>select how to mark hyperlinked areas</description>
@@ -71,6 +82,9 @@
<arg type="int" name="variant" default="0" optional="yes"/>
<description>draw glyphs by using path elements</description>
</option>
+ <option long="no-merge">
+ <description>don't merge adjacent text elements</description>
+ </option>
<option long="no-styles">
<description>don't use styles to reference fonts</description>
</option>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.9/src/psdefs.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/psdefs.cpp
new file mode 100644
index 00000000000..e4a8d286a39
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/psdefs.cpp
@@ -0,0 +1,95 @@
+/*************************************************************************
+** psdefs.cpp **
+** **
+** This file is part of dvisvgm -- the DVI to SVG converter **
+** Copyright (C) 2005-2014 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 **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#include "PSInterpreter.h"
+
+const char *PSInterpreter::PSDEFS =
+"3 dict dup begin/Install{matrix setmatrix}def/HWResolution[72 72]def/PageSize["
+"10000 10000]def end setpagedevice/@dodraw true store/@patcnt 0 store/@SD syste"
+"mdict def/@UD userdict def true setglobal @SD/:save @SD/save get put @SD/:rest"
+"ore @SD/restore get put @SD/:gsave @SD/gsave get put @SD/:grestore @SD/grestor"
+"e get put @SD/:grestoreall @SD/grestoreall get put @SD/:newpath @SD/newpath ge"
+"t put @SD/:stroke @SD/stroke get put @SD/:fill @SD/fill get put @SD/:eofill @S"
+"D/eofill get put @SD/:clip @SD/clip get put @SD/:eoclip @SD/eoclip get put @SD"
+"/:charpath @SD/charpath get put @SD/:show @SD/show get put @SD/.setopacityalph"
+"a known not{@SD/.setopacityalpha{pop}put}if @SD/prseq{-1 1{-1 roll =only( )pri"
+"nt}for(\\n)print}put @SD/prcmd{( )exch(\\ndvi.)3{print}repeat prseq}put @SD/cv"
+"xall{{cvx}forall}put @SD/defpr{[exch[/copy @SD]cvxall 5 -1 roll dup 6 1 roll[/"
+"get/exec]cvxall 6 -1 roll dup 7 1 roll 4 -1 roll dup 5 1 roll dup length strin"
+"g cvs/prcmd cvx]cvx def}put @SD/querypos{{currentpoint}stopped{$error/newerror"
+" false put}{2(querypos)prcmd}ifelse}put @SD/applyscalevals{1 0 transform 0 0 t"
+"ransform 3 -1 roll sub dup mul 3 1 roll sub dup mul add sqrt 0 1 transform 0 0"
+" transform 3 -1 roll sub dup mul 3 1 roll sub dup mul add sqrt 1 0 transform d"
+"up mul exch dup dup mul 3 -1 roll add sqrt div 3(applyscalevals)prcmd}put @SD/"
+"prpath{{2(moveto)prcmd}{2(lineto)prcmd}{6(curveto)prcmd}{0(closepath)prcmd}pat"
+"hforall}put @SD/charpath{/@dodraw false store :charpath/@dodraw true store}put"
+" @SD/show{@dodraw{dup :gsave currentpoint :newpath moveto true charpath eofill"
+" :grestore/@dodraw false store :show/@dodraw true store}if}put @SD/newpath{:ne"
+"wpath 0 1(newpath)prcmd}put @SD/stroke{@dodraw{1 1(newpath)prcmd prpath 0(stro"
+"ke)prcmd :newpath}{:stroke}ifelse}put @SD/fill{@dodraw{1 1(newpath)prcmd prpat"
+"h 0(fill)prcmd :newpath}{:fill}ifelse}put @SD/eofill{@dodraw{1 1(newpath)prcmd"
+" prpath 0(eofill)prcmd :newpath}{:eofill}ifelse}put @SD/clip{:clip 0 1(newpath"
+")prcmd prpath 0(clip)prcmd}put @SD/eoclip{:eoclip 1 1(newpath)prcmd prpath 0(e"
+"oclip)prcmd}put @SD/shfill{begin currentdict/ShadingType known currentdict/Col"
+"orSpace known and currentdict/DataSource known and currentdict/Function known "
+"not and ShadingType 4 ge and DataSource type/arraytype eq and{<</DeviceGray 1/"
+"DeviceRGB 3/DeviceCMYK 4/bgknown currentdict/Background known/bbknown currentd"
+"ict/BBox known>>begin currentdict ColorSpace known{ShadingType ColorSpace load"
+" bgknown{1 Background aload pop}{0}ifelse bbknown{1 BBox aload pop}{0}ifelse S"
+"hadingType 5 eq{VerticesPerRow}if DataSource aload length 4 add bgknown{ColorS"
+"pace load add}if bbknown{4 add}if ShadingType 5 eq{1 add}if(shfill)prcmd}if en"
+"d}if end}put/@rect{4 -2 roll moveto exch dup 0 rlineto exch 0 exch rlineto neg"
+" 0 rlineto closepath}bind def/@rectcc{4 -2 roll moveto 2 copy 0 lt exch 0 lt x"
+"or{dup 0 exch rlineto exch 0 rlineto neg 0 exch rlineto}{exch dup 0 rlineto ex"
+"ch 0 exch rlineto neg 0 rlineto}ifelse closepath}bind def @SD/rectclip{:newpat"
+"h dup type/arraytype eq{aload length 4 idiv{@rectcc}repeat}{@rectcc}ifelse cli"
+"p :newpath}put @SD/rectfill{gsave :newpath dup type/arraytype eq{aload length "
+"4 idiv{@rectcc}repeat}{@rectcc}ifelse fill grestore}put @SD/rectstroke{gsave :"
+"newpath dup type/arraytype eq{aload length 4 idiv{@rect}repeat}{@rect}ifelse s"
+"troke grestore}put false setglobal @SD readonly pop/initclip 0 defpr/clippath "
+"0 defpr/sysexec{@SD exch get exec}def/adddot{dup length 1 add string dup 0 46 "
+"put dup 3 -1 roll 1 exch putinterval}def/setlinewidth{dup/setlinewidth sysexec"
+" applyscalevals 1(setlinewidth)prcmd}def/setlinecap 1 defpr/setlinejoin 1 defp"
+"r/setmiterlimit 1 defpr/setdash{mark 3 1 roll 2 copy/setdash sysexec applyscal"
+"evals exch aload length 1 add -1 roll counttomark(setdash)prcmd pop}def/setgst"
+"ate{currentlinewidth 1(setlinewidth)prcmd currentlinecap 1(setlinecap)prcmd cu"
+"rrentlinejoin 1(setlinejoin)prcmd currentmiterlimit 1(setmiterlimit)prcmd curr"
+"entrgbcolor 3(setrgbcolor)prcmd 6 array currentmatrix aload pop 6(setmatrix)pr"
+"cmd currentdash mark 3 1 roll exch aload length 1 add -1 roll counttomark(setd"
+"ash)prcmd pop}def/save{@UD begin/@saveID vmstatus pop pop def end :save @saveI"
+"D 1(save)prcmd}def/restore{:restore setgstate @UD/@saveID known{@UD begin @sav"
+"eID end}{0}ifelse 1(restore)prcmd}def/gsave 0 defpr/grestore{:grestore setgsta"
+"te 0(grestore)prcmd}def/grestoreall{:grestoreall setstate 0(grestoreall)prcmd}"
+"def/rotate{dup type/arraytype ne{dup 1(rotate)prcmd}if/rotate sysexec}def/scal"
+"e{dup type/arraytype ne{2 copy 2(scale)prcmd}if/scale sysexec}def/translate{du"
+"p type/arraytype ne{2 copy 2(translate)prcmd}if/translate sysexec}def/setmatri"
+"x{dup/setmatrix sysexec aload pop 6(setmatrix)prcmd}def/initmatrix{matrix setm"
+"atrix}def/concat{matrix currentmatrix matrix concatmatrix setmatrix}def/makepa"
+"ttern{gsave<</mx 3 -1 roll>>begin dup/XUID[1000000 @patcnt]put mx/makepattern "
+"sysexec dup dup begin PatternType @patcnt BBox aload pop XStep YStep PaintType"
+" mx aload pop 15(makepattern)prcmd :newpath matrix setmatrix PaintProc 0 1(mak"
+"epattern)prcmd end/@patcnt @patcnt 1 add store end grestore}def/setpattern{beg"
+"in PatternType 1 eq{PaintType 1 eq{XUID aload pop exch pop 1}{:gsave[currentco"
+"lorspace aload length -1 roll pop]setcolorspace/setcolor sysexec XUID aload po"
+"p exch pop currentrgbcolor :grestore 4}ifelse(setpattern)prcmd}{/setpattern sy"
+"sexec}ifelse end}def/setcolor{dup type/dicttype eq{setpattern}{/setcolor sysex"
+"ec}ifelse}def/setgray 1 defpr/setcmykcolor 4 defpr/sethsbcolor 3 defpr/setrgbc"
+"olor 3 defpr/.setopacityalpha{dup/.setopacityalpha sysexec 1(setopacityalpha)p"
+"rcmd}def ";
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/types.h b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/types.h
index 1e1daef928c..1e1daef928c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.8.1/src/types.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.9/src/types.h
diff --git a/Build/source/texk/dvisvgm/version.ac b/Build/source/texk/dvisvgm/version.ac
index ff43db7888a..724c6e2e236 100644
--- a/Build/source/texk/dvisvgm/version.ac
+++ b/Build/source/texk/dvisvgm/version.ac
@@ -1,5 +1,5 @@
dnl
-dnl Copyright (C) 2011-2014 Peter Breitenlohner <tex-live@tug.org>
+dnl Copyright (C) 2011-2015 Peter Breitenlohner <tex-live@tug.org>
dnl
dnl This file is free software; the copyright holder
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,4 +8,4 @@ dnl
dnl --------------------------------------------------------
dnl
dnl m4-include this file to define the current dvisvgm version
-m4_define([dvisvgm_version], [1.8.1])
+m4_define([dvisvgm_version], [1.9])