summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/systemlayer
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:46:03 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:46:03 +0000
commit873660d1a83ece926fe7206288dda9c36b349c1b (patch)
treea48f77125c309a355b5d0eb58d6b24446abe9d62 /Master/texmf-dist/tex/generic/pgf/systemlayer
parent2939242967231097459df0fc3150fabc2f639111 (diff)
generic 1
git-svn-id: svn://tug.org/texlive/trunk@613 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/systemlayer')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg23
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def91
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def155
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def353
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfm.def131
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def244
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def169
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def165
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex763
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex68
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex128
11 files changed, 2290 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg
new file mode 100644
index 00000000000..a719fda2380
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg
@@ -0,0 +1,23 @@
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgf.cfg,v 1.1.1.1 2005/06/29 12:14:04 tantau Exp $
+
+% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+%
+% This program can be redistributed and/or modified under the terms
+% of the GNU Public License, version 2.
+
+
+
+% Default driver:
+\ifx\pgfsysdriver\@undefined
+ \def\pgfsysdriver{pgfsys-\Gin@driver}
+\fi
+
+
+% Uncomment the following if you use dvipdfm and plain tex:
+% \def\pgfsysdriver{pgfsys-dvipdfm.def}
+
+\endinput
+
+%%% Local Variables:
+%%% mode: latex
+%%% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
new file mode 100644
index 00000000000..3f2c726beb8
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
@@ -0,0 +1,91 @@
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-pdf.def,v 1.4 2005/10/18 18:03:38 tantau Exp $
+
+% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+%
+% This program can be redistributed and/or modified under the terms
+% of the GNU Public License, version 2.
+
+
+
+
+% Driver commands for pdf
+
+% Path construction:
+\def\pgfsys@lineto#1#2{\pgf@sys@bp{#1}\pgf@sys@bp{#2}\pgfsysprotocol@literal{l}}
+\def\pgfsys@moveto#1#2{\pgf@sys@bp{#1}\pgf@sys@bp{#2}\pgfsysprotocol@literal{m}}
+\def\pgfsys@curveto#1#2#3#4#5#6{%
+ \pgf@sys@bp{#1}\pgf@sys@bp{#2}\pgf@sys@bp{#3}\pgf@sys@bp{#4}\pgf@sys@bp{#5}\pgf@sys@bp{#6}\pgfsysprotocol@literal{c}}
+\def\pgfsys@rect#1#2#3#4{\pgf@sys@bp{#1}\pgf@sys@bp{#2}\pgf@sys@bp{#3}\pgf@sys@bp{#4}\pgfsysprotocol@literal{re}}
+\def\pgfsys@closepath{\pgfsysprotocol@literal{h}}
+
+% Path usage:
+\def\pgfsys@stroke{\pgfsysprotocol@literal{S}}
+\def\pgfsys@closestroke{\pgfsysprotocol@literal{s}}
+\def\pgfsys@fill{\ifpgfsys@eorule\pgfsysprotocol@literal{f*}\else\pgfsysprotocol@literal{f}\fi}
+\def\pgfsys@fillstroke{\ifpgfsys@eorule\pgfsysprotocol@literal{B*}\else\pgfsysprotocol@literal{B}\fi}
+\def\pgfsys@clipnext{\ifpgfsys@eorule\pgfsysprotocol@literal{W*}\else\pgfsysprotocol@literal{W}\fi}
+\def\pgfsys@discardpath{\pgfsysprotocol@literal{n}}
+
+% Transformation:
+\def\pgfsys@transformcm#1#2#3#4#5#6{%
+ \pgfsysprotocol@literalbuffered{#1 #2 #3 #4}\pgf@sys@bp{#5}\pgf@sys@bp{#6}\pgfsysprotocol@literal{cm}}
+
+% Scopes
+\def\pgfsys@beginscope{\pgfsysprotocol@literal{q}}
+\def\pgfsys@endscope{\pgfsysprotocol@literal{Q}}
+
+% Graphics state
+\def\pgfsys@setdash#1#2{%
+ \pgfsysprotocol@literalbuffered{[}%
+ \@for\pgf@sys@temp:={#1}\do{\pgf@sys@bp{\pgf@sys@temp}}%
+ \pgfsysprotocol@literalbuffered{]}%
+ \pgf@sys@bp{#2}\pgfsysprotocol@literal{d}}
+\def\pgfsys@setlinewidth#1{\pgf@sys@bp{#1}\pgfsysprotocol@literal{w}}
+\def\pgfsys@setmiterlimit#1{\pgfsysprotocol@literal{#1 M}}
+\def\pgfsys@buttcap{\pgfsysprotocol@literal{0 J}}
+\def\pgfsys@roundcap{\pgfsysprotocol@literal{1 J}}
+\def\pgfsys@rectcap{\pgfsysprotocol@literal{2 J}}
+\def\pgfsys@miterjoin{\pgfsysprotocol@literal{0 j}}
+\def\pgfsys@roundjoin{\pgfsysprotocol@literal{1 j}}
+\def\pgfsys@beveljoin{\pgfsysprotocol@literal{2 j}}
+\def\pgfsys@color@rgb@stroke#1#2#3{\pgfsysprotocol@literal{#1 #2 #3 RG}}
+\def\pgfsys@color@rgb@fill#1#2#3{\pgfsysprotocol@literal{#1 #2 #3 rg}}
+\def\pgfsys@color@cmyk@stroke#1#2#3#4{\pgfsysprotocol@literal{#1 #2 #3 #4 K}}
+\def\pgfsys@color@cmyk@fill#1#2#3#4{\pgfsysprotocol@literal{#1 #2 #3 #4 k}}
+\def\pgfsys@color@cmy@stroke#1#2#3{\pgfsysprotocol@literal{#1 #2 #3 0 K}}
+\def\pgfsys@color@cmy@fill#1#2#3{\pgfsysprotocol@literal{#1 #2 #3 0 k}}
+\def\pgfsys@color@gray@stroke#1{\pgfsysprotocol@literal{#1 G}}
+\def\pgfsys@color@gray@fill#1{\pgfsysprotocol@literal{#1 g}}
+
+% Opacity
+\def\pgf@sys@pdf@addtopageresources#1{\pgf@sys@fail{adding to page resources}}
+\def\pgf@sys@pdf@readdtopageresources#1{}% not always used
+\def\pgfsys@stroke@opacity#1{%
+ \expandafter\ifx\csname pgf@sys@pdf@so@#1\endcsname\relax%
+ % Hmm... define...
+ \expandafter\gdef\csname pgf@sys@pdf@so@#1\endcsname{/pgf@CA#1}%
+ \pgf@sys@pdf@addtopageresources{/pgf@CA#1 << /CA #1 >>}%
+ \else%
+ \pgf@sys@pdf@readdtopageresources{/pgf@CA#1 << /CA #1 >>}%
+ \fi%
+ \pgfsysprotocol@literal{\csname pgf@sys@pdf@so@#1\endcsname\space gs}%
+}
+\def\pgfsys@fill@opacity#1{%
+ \expandafter\ifx\csname pgf@sys@pdf@fo@#1\endcsname\relax%
+ % Hmm... define...
+ \expandafter\gdef\csname pgf@sys@pdf@fo@#1\endcsname{/pgf@ca#1}%
+ \pgf@sys@pdf@addtopageresources{/pgf@ca#1 << /ca #1 >>}%
+ \else%
+ \pgf@sys@pdf@readdtopageresources{/pgf@ca#1 << /ca #1 >>}%
+ \fi%
+ \pgfsysprotocol@literal{\csname pgf@sys@pdf@fo@#1\endcsname\space gs}%
+}
+
+
+
+\endinput
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def
new file mode 100644
index 00000000000..0f6981d04da
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def
@@ -0,0 +1,155 @@
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-postscript.def,v 1.6 2005/10/18 18:03:38 tantau Exp $
+
+% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+%
+% This program can be redistributed and/or modified under the terms
+% of the GNU Public License, version 2.
+
+
+
+
+% Driver commands for postscript
+
+\newif\ifpgf@fillcolor
+\newif\ifpgf@strokecolor
+\newif\ifpgfsys@@clipnext
+
+% Path construction:
+\def\pgfsys@lineto#1#2{\pgf@sys@bp{#1}\pgf@sys@bp{#2}\pgfsysprotocol@literal{lineto}}
+\def\pgfsys@moveto#1#2{\pgf@sys@bp{#1}\pgf@sys@bp{#2}\pgfsysprotocol@literal{moveto}}
+\def\pgfsys@curveto#1#2#3#4#5#6{%
+ \pgf@sys@bp{#1}\pgf@sys@bp{#2}\pgf@sys@bp{#3}\pgf@sys@bp{#4}\pgf@sys@bp{#5}\pgf@sys@bp{#6}\pgfsysprotocol@literal{curveto}}
+\def\pgfsys@rect#1#2#3#4{\pgf@sys@bp{#4}\pgf@sys@bp{#3}\pgf@sys@bp{#1}\pgf@sys@bp{#2}\pgfsysprotocol@literal{pgfe}}
+\def\pgfsys@closepath{\pgfsysprotocol@literal{closepath}}
+
+% Path usage:
+\def\pgfsys@stroke{%
+ \ifpgfsys@@clipnext%
+ \ifpgfsys@eorule%
+ \pgfsysprotocol@literal{gsave pgfsc pgfstr grestore eoclip newpath}%
+ \else%
+ \pgfsysprotocol@literal{gsave pgfsc pgfstr grestore clip newpath}%
+ \fi%
+ \pgfsys@@clipnextfalse%
+ \else%
+ \ifpgf@strokecolor%
+ \pgfsysprotocol@literal{gsave pgfsc pgfstr grestore newpath}%
+ \else%
+ \pgfsysprotocol@literal{pgfstr}%
+ \fi%
+ \fi}
+\def\pgfsys@fill{%
+ \ifpgfsys@@clipnext%
+ \ifpgfsys@eorule%
+ \pgfsysprotocol@literal{gsave pgffc pgfeofill grestore eoclip newpath}%
+ \else%
+ \pgfsysprotocol@literal{gsave pgffc pgffill grestore clip newpath}%
+ \fi%
+ \pgfsys@@clipnextfalse%
+ \else%
+ \ifpgf@fillcolor%
+ \ifpgfsys@eorule%
+ \pgfsysprotocol@literal{gsave pgffc pgfeofill grestore newpath}%
+ \else%
+ \pgfsysprotocol@literal{gsave pgffc pgffill grestore newpath}%
+ \fi%
+ \else%
+ \ifpgfsys@eorule%
+ \pgfsysprotocol@literal{pgfeofill}%
+ \else%
+ \pgfsysprotocol@literal{pgffill}%
+ \fi%
+ \fi%
+ \fi}
+\def\pgfsys@fillstroke{%
+ \ifpgfsys@eorule%
+ \pgfsysprotocol@literal{gsave pgffc pgfeofill grestore gsave pgfsc pgfstr grestore}%
+ \else%
+ \pgfsysprotocol@literal{gsave pgffc pgffill grestore gsave pgfsc pgfstr grestore}%
+ \fi%
+ \ifpgfsys@@clipnext%
+ \ifpgfsys@eorule%
+ \pgfsysprotocol@literal{eoclip}%
+ \else%
+ \pgfsysprotocol@literal{clip}%
+ \fi%
+ \pgfsys@@clipnextfalse%
+ \fi%
+ \pgfsysprotocol@literal{newpath}}
+\def\pgfsys@clipnext{\pgfsys@@clipnexttrue}
+\def\pgfsys@discardpath{%
+ \ifpgfsys@@clipnext%
+ \ifpgfsys@eorule%
+ \pgfsysprotocol@literal{eoclip}%
+ \else%
+ \pgfsysprotocol@literal{clip}%
+ \fi%
+ \pgfsys@@clipnextfalse%
+ \fi%
+ \pgfsysprotocol@literal{newpath}}
+
+% Transformation:
+\def\pgfsys@transformshift#1#2{\pgf@sys@bp{#1}\pgf@sys@bp{#2}\pgfsysprotocol@literal{translate}}
+\def\pgfsys@transformxyscale#1#2{\pgfsysprotocol@literal{#1 #2 scale}}
+\def\pgfsys@transformcm#1#2#3#4#5#6{%
+ \pgfsysprotocol@literalbuffered{[#1 #2 #3 #4}\pgf@sys@bp{#5}\pgf@sys@bp{#6}\pgfsysprotocol@literal{] concat}}
+
+% Scopes
+\def\pgfsys@beginscope{\pgfsysprotocol@literal{save}}
+\def\pgfsys@endscope{\pgfsysprotocol@literal{restore}}
+
+% Graphics state
+\def\pgfsys@setdash#1#2{%
+ \pgfsysprotocol@literalbuffered{[}%
+ \@for\pgf@sys@temp:={#1}\do{\pgf@sys@bp{\pgf@sys@temp}}%
+ \pgfsysprotocol@literalbuffered{]}%
+ \pgf@sys@bp{#2}\pgfsysprotocol@literal{setdash}}
+\def\pgfsys@setlinewidth#1{\pgf@sys@bp{#1}\pgfsysprotocol@literal{pgfw}}
+\def\pgfsys@setmiterlimit#1{\pgfsysprotocol@literal{#1 setmiterlimit}}
+\def\pgfsys@buttcap{\pgfsysprotocol@literal{0 setlinecap}}
+\def\pgfsys@roundcap{\pgfsysprotocol@literal{1 setlinecap}}
+\def\pgfsys@rectcap{\pgfsysprotocol@literal{2 setlinecap}}
+\def\pgfsys@miterjoin{\pgfsysprotocol@literal{0 setlinejoin}}
+\def\pgfsys@roundjoin{\pgfsysprotocol@literal{1 setlinejoin}}
+\def\pgfsys@beveljoin{\pgfsysprotocol@literal{2 setlinejoin}}
+\def\pgfsys@color@rgb@stroke#1#2#3{\pgfsysprotocol@literal{/pgfsc{#1 #2 #3 setrgbcolor}def}\pgf@strokecolortrue}
+\def\pgfsys@color@rgb@fill#1#2#3{\pgfsysprotocol@literal{/pgffc{#1 #2 #3 setrgbcolor}def}\pgf@fillcolortrue}
+\def\pgfsys@color@rgb#1#2#3{\pgfsys@color@reset\pgfsysprotocol@literal{#1 #2 #3 setrgbcolor}}
+\def\pgfsys@color@cmyk@stroke#1#2#3#4{\pgfsysprotocol@literal{/pgfsc{#1 #2 #3 #4 setcmykcolor}def}\pgf@strokecolortrue}
+\def\pgfsys@color@cmyk@fill#1#2#3#4{\pgfsysprotocol@literal{/pgffc{#1 #2 #3 #4 setcmykcolor}def}\pgf@fillcolortrue}
+\def\pgfsys@color@cmyk#1#2#3#4{\pgfsys@color@reset\pgfsysprotocol@literal{#1 #2 #3 #4 setcmykcolor}}
+\def\pgfsys@color@cmy@stroke#1#2#3{\pgfsysprotocol@literal{/pgfsc{#1 #2 #3 0 setcmykcolor}def}\pgf@strokecolortrue}
+\def\pgfsys@color@cmy@fill#1#2#3{\pgfsysprotocol@literal{/pgffc{#1 #2 #3 0 setcmykcolor}def}\pgf@fillcolortrue}
+\def\pgfsys@color@cmy#1#2#3{\pgfsys@color@reset\pgfsysprotocol@literal{#1 #2 #3 0 setcmykcolor}}
+\def\pgfsys@color@gray@stroke#1{\pgfsysprotocol@literal{/pgfsc{#1 setgray}def}\pgf@strokecolortrue}
+\def\pgfsys@color@gray@fill#1{\pgfsysprotocol@literal{/pgffc{#1 setgray}def}\pgf@fillcolortrue}
+\def\pgfsys@color@gray#1{\pgfsys@color@reset\pgfsysprotocol@literal{#1 setgray}}
+\def\pgfsysps@color@resetnow{\pgfsysprotocol@literal{/pgfsc{}def/pgffc{}def}\pgf@strokecolorfalse\pgf@fillcolorfalse}%
+\def\pgfsys@color@reset{%
+ \ifpgfsys@color@reset@inorder%
+ \ifpgf@strokecolor%
+ \pgfsysps@color@resetnow%
+ \else%
+ \ifpgf@fillcolor%
+ \pgfsysps@color@resetnow%
+ \fi%
+ \fi%
+ \else%
+ \pgfsysps@color@resetnow%
+ \fi}
+
+
+% Opacity
+
+\def\pgfsys@fill@opacity#1{%
+ \pgfsysprotocol@literal{#1 .pgfsetfillopacityalpha}
+}
+\def\pgfsys@stroke@opacity#1{%
+ \pgfsysprotocol@literal{#1 .pgfsetstrokeopacityalpha}
+}
+
+\endinput
+
+%%% Local Variables:
+%%% mode: latex
+%%% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def
new file mode 100644
index 00000000000..19a98a6bf60
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def
@@ -0,0 +1,353 @@
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-svg.def,v 1.12 2005/10/06 13:16:09 tantau Exp $
+
+% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+%
+% This program can be redistributed and/or modified under the terms
+% of the GNU Public License, version 2.
+
+
+
+
+% Driver commands for svg
+
+
+% Helping functions:
+\let\pgf@sys@svgpath=\@empty
+\def\pgf@sys@svgnum#1{%
+ {%
+ \pgf@x=#1\relax%
+ \edef\temp{\expandafter\Pgf@geT\the\pgf@x\space}%
+ \toks@\expandafter\expandafter\expandafter{\expandafter\pgf@sys@svgpath\temp}%
+ \xdef\pgf@sys@svgpath{\the\toks@}%
+ }%
+}
+\def\pgf@sys@addtosvgpath#1{\g@addto@macro\pgf@sys@svgpath{#1\space}}
+\def\pgf@sys@flushsvgpath{\pgfsysprotocol@literal{\pgf@sys@svgpath}\global\let\pgf@sys@svgpath=\@empty}
+\def\pgf@sys@svg@gs#1{%
+ {\pgfsysprotocol@literal{<g #1>\Hnewline }}\global\advance\pgf@sys@svg@scopecount by1\relax%
+}
+\newcount\pgf@sys@svg@objectcount
+\let\Hnewline=\@empty
+
+% Path construction:
+\def\pgfsys@lineto#1#2{\pgf@sys@addtosvgpath{L }\pgf@sys@svgnum{#1}\pgf@sys@svgnum{#2}}
+\def\pgfsys@moveto#1#2{\pgf@sys@addtosvgpath{M }\pgf@sys@svgnum{#1}\pgf@sys@svgnum{#2}}
+\def\pgfsys@curveto#1#2#3#4#5#6{%
+ \pgf@sys@addtosvgpath{C }%
+ \pgf@sys@svgnum{#1}\pgf@sys@svgnum{#2}%
+ \pgf@sys@svgnum{#3}\pgf@sys@svgnum{#4}%
+ \pgf@sys@svgnum{#5}\pgf@sys@svgnum{#6}}
+\def\pgfsys@rect#1#2#3#4{%
+ \pgfsys@moveto{#1}{#2}%
+ \pgf@sys@addtosvgpath{h }\pgf@sys@svgnum{#3}%
+ \pgf@sys@addtosvgpath{v }\pgf@sys@svgnum{#4}%
+ \pgf@sys@addtosvgpath{h }{\pgf@x=#3\pgf@x=-\pgf@x\pgf@sys@svgnum{\pgf@x}}%
+ \pgfsys@closepath}
+\def\pgfsys@closepath{\pgf@sys@addtosvgpath{Z}}
+
+% Path usage:
+\newif\ifpgf@sys@svg@clipnext
+\def\pgf@sys@svg@possiblyclippedpath#1{%
+ \ifpgf@sys@svg@clipnext%
+ \global\advance\pgf@sys@svg@objectcount by1\relax%
+ \pgfsysprotocol@literal{<clipPath id="pgfcp\the\pgf@sys@svg@objectcount">
+ <path id="pgfpath\the\pgf@sys@svg@objectcount" d="}%
+ \pgf@sys@flushsvgpath%
+ \pgfsysprotocol@literal{"/>\Hnewline </clipPath>\Hnewline }
+ \pgfsysprotocol@literal{<use xlink:href="\#pgfpath\the\pgf@sys@svg@objectcount" #1/>\Hnewline }%
+ \pgf@sys@svg@gs{clip-path="url(\#pgfcp\the\pgf@sys@svg@objectcount)"}
+ \pgf@sys@svg@clipnextfalse%
+ \else%
+ \pgfsysprotocol@literal{<path d="}%
+ \pgf@sys@flushsvgpath%
+ \pgfsysprotocol@literal{" #1/>\Hnewline }
+ \fi%
+}
+\def\pgfsys@stroke{\pgf@sys@svg@possiblyclippedpath{style="fill:none"}}
+\def\pgfsys@fill{\pgf@sys@svg@possiblyclippedpath{style="stroke:none"}}
+\def\pgfsys@fillstroke{\pgf@sys@svg@possiblyclippedpath{}}
+\def\pgfsys@clipnext{\pgf@sys@svg@clipnexttrue}
+\def\pgfsys@discardpath{%
+ \ifpgf@sys@svg@clipnext%
+ \global\advance\pgf@sys@svg@objectcount by1\relax%
+ \pgfsysprotocol@literal{<clipPath id="pgfcp\the\pgf@sys@svg@objectcount">
+ <path d="}%
+ \pgf@sys@flushsvgpath%
+ \pgfsysprotocol@literal{"/>\Hnewline </clipPath>\Hnewline }
+ \pgf@sys@svg@gs{clip-path="url(\#pgfcp\the\pgf@sys@svg@objectcount)"}
+ \pgf@sys@svg@clipnextfalse%
+ \else%
+ \global\let\pgf@sys@svgpath=\@empty
+ \fi}
+
+% Fill rules:
+\def\pgfsys@eoruletrue{\pgf@sys@svg@gs{fill-rule="evenodd"}}
+\def\pgfsys@eorulefalse{\pgf@sys@svg@gs{fill-rule="nonzero"}}
+
+% Transparency:
+\def\pgfsys@stroke@opacity#1{\pgf@sys@svg@gs{stroke-opacity="#1"}}
+\def\pgfsys@fill@opacity#1{\pgf@sys@svg@gs{fill-opacity="#1"}}
+
+% Transformation:
+\def\pgfsys@transformcm#1#2#3#4#5#6{%
+ {\pgf@x=#5\pgf@y=#6%
+ \pgf@sys@svg@gs{transform="matrix(#1,#2,#3,#4,\pgf@sys@tonumber{\pgf@x},\pgf@sys@tonumber{\pgf@y})"}}}
+
+% Scopes
+\newcount\pgf@sys@svg@scopecount
+\def\pgfsys@beginscope{%
+ \edef\pgf@sys@svg@thescopecount{\the\pgf@sys@svg@scopecount}%
+ \begingroup%
+ \pgf@sys@svg@scopecount=1\relax%
+ \pgfsysprotocol@literal{<g>\Hnewline }%
+ }
+\def\pgfsys@endscope{%
+ \loop%
+ \pgfsysprotocol@literal{</g>\Hnewline }%
+ \advance\pgf@sys@svg@scopecount by-1\relax%
+ \ifnum\pgf@sys@svg@scopecount>0\relax%
+ \repeat%
+ \endgroup%
+ \global\pgf@sys@svg@scopecount=\pgf@sys@svg@thescopecount\relax%
+}
+
+% Graphics state
+\def\pgfsys@setdash#1#2{%
+ \edef\pgf@test@dashpattern{#1}%
+ \ifx\pgf@test@dashpattern\@empty%
+ \pgf@sys@svg@gs{stroke-dasharray="none" stroke-dashoffset="#2"}%
+ \else%
+ \pgf@sys@svg@gs{stroke-dasharray="#1" stroke-dashoffset="#2"}%
+ \fi}
+\def\pgfsys@setlinewidth#1{\pgf@sys@svg@gs{stroke-width="#1"}}
+\def\pgfsys@setmiterlimit#1{\pgf@sys@svg@gs{stroke-miterlimit="#1"}}
+\def\pgfsys@buttcap{\pgf@sys@svg@gs{stroke-linecap="butt"}}
+\def\pgfsys@roundcap{\pgf@sys@svg@gs{stroke-linecap="round"}}
+\def\pgfsys@rectcap{\pgf@sys@svg@gs{stroke-linecap="square"}}
+\def\pgfsys@miterjoin{\pgf@sys@svg@gs{stroke-linejoin="miter"}}
+\def\pgfsys@roundjoin{\pgf@sys@svg@gs{stroke-linejoin="round"}}
+\def\pgfsys@beveljoin{\pgf@sys@svg@gs{stroke-linejoin="bevel"}}
+
+
+%
+% Color management
+%
+
+\def\XC@mcolor{\ifpgfpicture\pgfsetcolor{.}\fi}
+
+\def\pgf@sys@svg@color@rgb#1,#2,#3\relax{%
+ {%
+ \pgf@xa=#1pt%
+ \pgf@xa=100\pgf@xa%
+ \pgf@xb=#2pt%
+ \pgf@xb=100\pgf@xb%
+ \pgf@xc=#3pt%
+ \pgf@xc=100\pgf@xc%
+ \xdef\pgf@sys@svg@prepared{rgb(\pgf@sys@tonumber\pgf@xa\%,\pgf@sys@tonumber\pgf@xb\%,\pgf@sys@tonumber\pgf@xc\%)}%
+ }%
+}
+\def\pgf@sys@svg@color@cmy#1,#2,#3\relax{%
+ {%
+ \pgf@xa=1pt%
+ \advance\pgf@xa by-#1pt%
+ \pgf@xa=100\pgf@xa%
+ \pgf@xb=1pt%
+ \advance\pgf@xb by-#2pt%
+ \pgf@xb=100\pgf@xb%
+ \pgf@xc=1pt%
+ \advance\pgf@xc by-#3pt%
+ \pgf@xc=100\pgf@xc%
+ \xdef\pgf@sys@svg@prepared{rgb(\pgf@sys@tonumber\pgf@xa\%,\pgf@sys@tonumber\pgf@xb\%,\pgf@sys@tonumber\pgf@xc\%)}%
+ }%
+}
+\def\pgf@sys@svg@color@cmyk#1,#2,#3,#4\relax{%
+ {%
+ \pgf@xa=1pt%
+ \advance\pgf@xa by-#4pt%
+ \pgf@xa=#1\pgf@xa%
+ \advance\pgf@xa by#4pt%
+ \advance\pgf@xa by-1pt%
+ \pgf@xa=-100\pgf@xa%
+ \pgf@xb=1pt%
+ \advance\pgf@xb by-#4pt%
+ \pgf@xb=#2\pgf@xb%
+ \advance\pgf@xb by#4pt%
+ \advance\pgf@xb by-1pt%
+ \pgf@xb=-100\pgf@xb%
+ \pgf@xc=1pt%
+ \advance\pgf@xc by-#4pt%
+ \pgf@xc=#3\pgf@xc%
+ \advance\pgf@xc by#4pt%
+ \advance\pgf@xc by-1pt%
+ \pgf@xc=-100\pgf@xc%
+ \xdef\pgf@sys@svg@prepared{rgb(\pgf@sys@tonumber\pgf@xa\%,\pgf@sys@tonumber\pgf@xb\%,\pgf@sys@tonumber\pgf@xc\%)}%
+ }%
+}
+\def\pgf@sys@svg@color@gray#1\relax{%
+ {%
+ \pgf@xa=#1pt%
+ \pgf@xa=100\pgf@xa%
+ \xdef\pgf@sys@svg@prepared{rgb(\pgf@sys@tonumber\pgf@xa\%,\pgf@sys@tonumber\pgf@xa\%,\pgf@sys@tonumber\pgf@xa\%)}%
+ }%
+}
+
+\def\pgfsys@color@rgb@stroke#1#2#3{%
+ \pgf@sys@svg@color@rgb#1,#2,#3\relax%
+ \pgf@sys@svg@gs{stroke="\pgf@sys@svg@prepared"}}
+\def\pgfsys@color@rgb@fill#1#2#3{%
+ \pgf@sys@svg@color@rgb#1,#2,#3\relax%
+ \pgf@sys@svg@gs{fill="\pgf@sys@svg@prepared"}}
+\def\pgfsys@color@cmyk@stroke#1#2#3#4{%
+ \pgf@sys@svg@color@cmyk#1,#2,#3,#4\relax%
+ \pgf@sys@svg@gs{stroke="\pgf@sys@svg@prepared"}}
+\def\pgfsys@color@cmyk@fill#1#2#3#4{%
+ \pgf@sys@svg@color@cmyk#1,#2,#3,#4\relax%
+ \pgf@sys@svg@gs{fill="\pgf@sys@svg@prepared"}}
+\def\pgfsys@color@cmy@stroke#1#2#3{%
+ \pgf@sys@svg@color@cmy#1,#2,#3\relax%
+ \pgf@sys@svg@gs{stroke="\pgf@sys@svg@prepared"}}
+\def\pgfsys@color@cmy@fill#1#2#3{%
+ \pgf@sys@svg@color@cmy#1,#2,#3\relax%
+ \pgf@sys@svg@gs{fill="\pgf@sys@svg@prepared"}}
+\def\pgfsys@color@gray@stroke#1{%
+ \pgf@sys@svg@color@gray#1\relax%
+ \pgf@sys@svg@gs{stroke="\pgf@sys@svg@prepared"}}
+\def\pgfsys@color@gray@fill#1{%
+ \pgf@sys@svg@color@gray#1\relax%
+ \pgf@sys@svg@gs{fill="\pgf@sys@svg@prepared"}}
+
+
+% Shadings:
+\def\pgf@sys@svg@shading@stops{%
+ % Step 1: Compute 1/\pgf@sys@shading@end@pos
+ \pgf@x=\pgf@sys@shading@end@pos\relax%
+ \c@pgf@counta=\pgf@x\relax%
+ \divide\c@pgf@counta by4096\relax%
+ % Step 2: Insert stops.
+ \expandafter\pgf@sys@svg@shading@dostops\pgf@sys@shading@ranges%
+ % dummy for end:
+ {{\pgf@sys@shading@end@pos}{\pgf@sys@shading@end@pos}{\pgf@sys@shading@end@rgb}{\pgf@sys@shading@end@rgb}}%
+ {}% end
+}
+\def\pgf@sys@svg@shading@dostops#1{%
+ \edef\pgf@test{#1}%
+ \ifx\pgf@test\@empty%
+ \else%
+ \expandafter\pgf@sys@svg@shading@dostop\pgf@test%
+ \expandafter\pgf@sys@svg@shading@dostops%
+ \fi%
+}
+\def\pgf@sys@svg@shading@dostop#1#2#3#4{%
+ % #1 start pos
+ % #2 end pos
+ % #3 start rgb
+ % #4 end rgb
+ \pgf@sys@svg@addtostops{<stop offset="}%
+ \pgf@x=#1%
+ \pgf@x=16\pgf@x%
+ \divide\pgf@x by \c@pgf@counta\relax%
+ \pgf@sys@svg@addtostops{\pgf@sys@tonumber\pgf@x" stop-color="}%
+ \pgf@sys@svg@shading@dorgb#3%
+ \pgf@sys@svg@addtostops{"/>\noexpand\Hnewline}%
+}
+\def\pgf@sys@svg@shading@dorgb#1#2#3{%
+ \pgf@sys@svg@color@rgb#1,#2,#3\relax%
+ \pgf@sys@svg@addtostops{\pgf@sys@svg@prepared}%
+}
+
+\let\pgf@sys@svg@thestops=\@empty
+\def\pgf@sys@svg@addtostops#1{%
+ \edef\pgf@temp{#1}%
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter\pgf@sys@svg@thestops
+ \expandafter\expandafter\expandafter{\expandafter\pgf@sys@svg@thestops\expandafter\space\pgf@temp}%
+}
+
+
+\def\pgfsys@horishading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \global\advance\pgf@sys@svg@objectcount by1\relax%
+ \pgf@sys@svg@addtostops{<linearGradient id="pgfsh\the\pgf@sys@svg@objectcount">\noexpand\Hnewline}
+ \pgf@sys@svg@shading@stops%
+ \pgf@sys@svg@addtostops{</linearGradient>\noexpand\Hnewline}%
+ \pgf@process{\pgfpoint{\pgf@sys@shading@end@pos}{#2}}%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{%
+ \def\noexpand\pgf@sys@svg@sh@defs{\noexpand\pgfsysprotocol@literal{\pgf@sys@svg@thestops}}%
+ \def\noexpand\pgf@sys@svg@sh{\noexpand\pgfsysprotocol@literal{<rect
+ width="\the\pgf@x"
+ height="\the\pgf@y"
+ style="fill:url(\noexpand\#pgfsh\the\pgf@sys@svg@objectcount);
+ stroke:none"/>\noexpand\Hnewline}}%
+ \def\noexpand\pgf@sys@svg@pos{\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}%
+ }%
+ }%
+}
+
+
+\def\pgfsys@vertshading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \global\advance\pgf@sys@svg@objectcount by1\relax%
+ \pgf@sys@svg@addtostops{<linearGradient
+ id="pgfsh\the\pgf@sys@svg@objectcount"
+ gradientTransform="rotate(90)">\noexpand\Hnewline}
+ \pgf@sys@svg@shading@stops%
+ \pgf@sys@svg@addtostops{</linearGradient>\noexpand\Hnewline}%
+ \pgf@process{\pgfpoint{\pgf@sys@shading@end@pos}{#2}}%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{%
+ \def\noexpand\pgf@sys@svg@sh@defs{\noexpand\pgfsysprotocol@literal{\pgf@sys@svg@thestops}}%
+ \def\noexpand\pgf@sys@svg@sh{\noexpand\pgfsysprotocol@literal{<rect
+ width="\the\pgf@y"
+ height="\the\pgf@x"
+ style="fill:url(\noexpand\#pgfsh\the\pgf@sys@svg@objectcount);
+ stroke:none"/>\noexpand\Hnewline}}%
+ \def\noexpand\pgf@sys@svg@pos{\noexpand\pgfpoint{\the\pgf@y}{\the\pgf@x}}%
+ }%
+ }%
+}
+
+\def\pgfsys@radialshading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \pgf@x=\pgf@sys@shading@end@pos\relax%
+ \c@pgf@counta=\pgf@x\relax%
+ \divide\c@pgf@counta by4096\relax%
+ \global\advance\pgf@sys@svg@objectcount by1\relax%
+ \pgf@process{#2}%
+ % Divide by 2\pgf@sys@shading@end@pos%
+ \pgf@x=8\pgf@x%
+ \divide\pgf@x by \c@pgf@counta\relax%
+ \pgf@y=8\pgf@y%
+ \divide\pgf@y by \c@pgf@counta\relax%
+ \advance\pgf@x by.5pt%
+ \advance\pgf@y by.5pt%
+ \pgf@sys@svg@addtostops{<radialGradient
+ id="pgfsh\the\pgf@sys@svg@objectcount"
+ fx="\pgf@sys@tonumber\pgf@x"
+ fy="\pgf@sys@tonumber\pgf@y"
+ >\noexpand\Hnewline}
+ \pgf@sys@svg@shading@stops%
+ \pgf@sys@svg@addtostops{</radialGradient>\noexpand\Hnewline}%
+ \pgf@xa=\pgf@sys@shading@end@pos%
+ \pgf@xb=2\pgf@xa%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{%
+ \def\noexpand\pgf@sys@svg@sh@defs{\noexpand\pgfsysprotocol@literal{\pgf@sys@svg@thestops}}%
+ \def\noexpand\pgf@sys@svg@sh{\noexpand\pgfsysprotocol@literal{<circle
+ cx="\the\pgf@xa"
+ cy="\the\pgf@xa"
+ r="\the\pgf@xa"
+ style="fill:url(\noexpand\#pgfsh\the\pgf@sys@svg@objectcount);
+ stroke:none"/>\noexpand\Hnewline}}%
+ \def\noexpand\pgf@sys@svg@pos{\noexpand\pgfpoint{\the\pgf@xb}{\the\pgf@xb}}%
+ }%
+ }%
+}
+
+
+\endinput
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfm.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfm.def
new file mode 100644
index 00000000000..224197f9b51
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfm.def
@@ -0,0 +1,131 @@
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvipdfm.def,v 1.7 2005/09/30 07:14:03 tantau Exp $
+
+% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+%
+% This program can be redistributed and/or modified under the terms
+% of the GNU Public License, version 2.
+
+
+
+
+% Driver commands for dvipdfm
+
+%
+% Load common pdf commands:
+%
+\input pgfsys-common-pdf.def
+
+%
+% dvipdfm-specific stuff:
+%
+\def\pgfsys@invoke#1{\special{pdf: content Q #1 q}}
+
+\def\pgfsys@hbox#1{%
+ \special{pdf: content Q q -1 0 0 -1 0 0 cm q}%
+ \special{pdf: content -1 0 0 -1 0 0 cm q}% translate to original coordinate system
+ \special{pdf: content 0 0 m W n q}% clip next stuff
+ {\hbox to 0pt{\pgf@selectfontorig.\hss}}% enforce font change
+ \special{pdf: content Q}% end of font change enforcement.
+ \wd#1=0pt%
+ \ht#1=0pt%
+ \dp#1=0pt%
+ \box#1
+ \special{pdf: content Q n Q}%
+}
+\def\pgfsys@beginpicture{%
+ \pgfsys@invoke{1 0 0 1 2000 2000 cm}%
+ \hbox to 0pt{\selectfont.\hss}%
+ \pgfsys@invoke{1 0 0 1 -2000 -2000 cm}%
+ \special{pdf: content q}}
+\def\pgfsys@endpicture{%
+ \special{pdf: content n Q}%
+}
+\def\pgfsys@beginpurepicture{\special{pdf: content q}}
+
+
+\def\pgf@sys@pdf@addtopageresources#1{%
+ \ifx\pgf@sys@pdf@obj\@undefined%
+ \global\let\pgf@sys@pdf@obj=\relax%
+ \special{pdf: obj @pgfopacities << >>}%
+ \fi%
+ \special{pdf: put @pgfopacities << #1 >>}%
+ \special{pdf: put @resources << /ExtGState @pgfopacities >>}%
+}
+\def\pgf@sys@pdf@readdtopageresources#1{%
+ \special{pdf: put @resources << /ExtGState @pgfopacities >>}%
+}
+
+\def\pgfsys@imagesuffixlist{pdf:jpg:jpeg:png}
+\def\pgfsys@horishading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \pgf@process{\pgfpoint{\pgf@max}{#2}}%
+ \edef\@temp{\noexpand\pgf@sys@atbeginpage{\special{pdf: beginxobj @pgfshade#1 width \the\pgf@max\space height \the\pgf@y}}}\@temp%
+ \edef\@temp{\noexpand\pgf@sys@atbeginpage{\special{pdf: put @resources <<
+ /Shading << /Sh << /ShadingType 2
+ /ColorSpace /DeviceRGB
+ /Domain [\pgf@pdfparseddomain]
+ /Coords [\pgf@doma\space0 \pgf@domb\space0]
+ /Function \pgf@pdfparsedfunction
+ /Extend [false false] >> >> >>}}}\@temp%
+ \pgf@sys@atbeginpage{\special{pdf: content /Sh sh}%
+ \special{pdf: endxobj}}%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{%
+ \hbox to\the\pgf@max{\vbox to#2{\vfil\special{pdf: usexobj @pgfshade#1}}\hfil}}%
+ }%
+}
+\def\pgfsys@vertshading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \pgf@process{\pgfpoint{\pgf@max}{#2}}%
+ \edef\@temp{\noexpand\pgf@sys@atbeginpage{\special{pdf: beginxobj @pgfshade#1 width \the\pgf@y\space height \the\pgf@max\space}}}\@temp%
+ \edef\@temp{\noexpand\pgf@sys@atbeginpage{\special{pdf: put @resources <<
+ /Shading << /Sh << /ShadingType 2
+ /ColorSpace /DeviceRGB
+ /Domain [\pgf@pdfparseddomain]
+ /Coords [0 \pgf@doma\space0 \pgf@domb]
+ /Function \pgf@pdfparsedfunction
+ /Extend [false false] >> >> >>}}}\@temp%
+ \pgf@sys@atbeginpage{\special{pdf: content /Sh sh}%
+ \special{pdf: endxobj}}%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{%
+ \hbox to#2{\vbox to\the\pgf@max{\vfil\special{pdf: usexobj @pgfshade#1}}\hfil}}%
+ }%
+}
+\def\pgfsys@radialshading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \pgf@process{#2}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\pgfpoint{\pgf@max}{\pgf@max}}%
+ \advance\pgf@xa by \pgf@x\relax%
+ \advance\pgf@ya by \pgf@y\relax%
+ \@tempdima=2\pgf@max\relax%
+ \edef\@temp{\noexpand\pgf@sys@atbeginpage{\special{pdf: beginxobj @pgfshade#1 width \the\@tempdima\space height \the\@tempdima}}}\@temp%
+ \edef\@temp{\noexpand\pgf@sys@atbeginpage{\special{pdf: put @resources <<
+ /Shading << /Sh << /ShadingType 3
+ /ColorSpace /DeviceRGB
+ /Domain [\pgf@pdfparseddomain]
+ /Coords [\pgf@sys@tonumber{\pgf@xa} \pgf@sys@tonumber{\pgf@ya} \pgf@doma\space \pgf@sys@tonumber{\pgf@x} \pgf@sys@tonumber{\pgf@y} \pgf@domb]
+ /Function \pgf@pdfparsedfunction
+ /Extend [true false] >> >> >>}}}\@temp%
+ \pgf@sys@atbeginpage{\special{pdf: content /Sh sh}%
+ \special{pdf: endxobj}}%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{%
+ \hbox to\the\@tempdima{\vbox to\the\@tempdima{\vfil\special{pdf: usexobj @pgfshade#1}}\hfil}}%
+ }%
+}%
+
+
+\def\pgf@sys@atbeginpage#1{\AtBeginDvi{#1}}
+\AtBeginDocument{% hyperref hack
+ \providecommand\HyPL@EveryPage{}
+ \def\@begindvi{\unvbox\@begindvibox\HyPL@EveryPage}
+}
+
+\endinput
+
+%%% Local Variables:
+%%% mode: latex
+%%% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def
new file mode 100644
index 00000000000..e6ef83b5ade
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def
@@ -0,0 +1,244 @@
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvips.def,v 1.9 2005/10/18 18:03:38 tantau Exp $
+
+% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+%
+% This program can be redistributed and/or modified under the terms
+% of the GNU Public License, version 2.
+
+
+
+
+% Driver commands for dvips
+
+%
+% Load common postscript commands:
+%
+\input pgfsys-common-postscript.def
+
+
+%
+% dvips-specific stuff:
+%
+\def\pgfsys@invoke#1{\special{ps:: #1}}
+\def\pgfsys@outerinvoke#1{\special{ps: #1}}
+
+\def\pgfsys@beginpicture{\special{ps: }\special{ps::[begin]}\pgfsys@invoke{pgfo}}
+\def\pgfsys@endpicture{\pgfsys@invoke{pgfc}\special{ps::[end]}}
+\def\pgfsys@hbox#1{%
+ \pgfsys@invoke{pgfs}%
+ \special{ps::[end]}%
+ \wd#1=0pt%
+ \ht#1=0pt%
+ \dp#1=0pt%
+ \box#1
+ \special{ps::[begin]}%
+ \pgfsys@invoke{pgfr}%
+}
+\def\pgfsys@begininvisible{%
+ \special{ps::[begin]}%
+ \pgfsys@invoke{gsave nulldevice}%
+ \special{ps::[end]}}
+\def\pgfsys@endinvisible{%
+ \special{ps::[begin]}%
+ \pgfsys@invoke{grestore}%
+ \special{ps::[end]}%
+}
+\def\pgfsys@color@unstacked#1{\special{ps: \XC@usecolor{#1}}}
+\newcount\pgf@objectcount
+\def\pgfsys@defobject#1#2#3#4{%
+ \global\advance\pgf@objectcount by 1
+ \expandafter\xdef\csname#1\endcsname{\the\pgf@objectcount}
+ \pgfsysprotocol@getcurrentprotocol\pgfsys@temp%
+ {%
+ \pgfsysprotocol@setcurrentprotocol\@empty%
+ \pgfsysprotocol@bufferedtrue%
+ #4%
+ \pgfsysprotocol@getcurrentprotocol\pgfsys@@temp%
+ \special{! /pgf\csname#1\endcsname{gsave exec \pgfsys@@temp\space grestore} bind def}%
+ }%
+ \pgfsysprotocol@setcurrentprotocol\pgfsys@temp%
+}
+\def\pgfsys@useobject#1#2{%
+ \pgfsysprotocol@getcurrentprotocol\pgfsys@temp%
+ {%
+ \pgfsysprotocol@setcurrentprotocol\@empty%
+ \pgfsysprotocol@bufferedfalse%
+ #2%
+ \pgfsysprotocol@invokecurrentprotocol%
+ \pgfsys@invoke{pgf\csname#1\endcsname}%
+ }%
+ \pgfsysprotocol@setcurrentprotocol\pgfsys@temp}
+\def\pgfsys@imagesuffixlist{epsi:eps:ps}
+\def\pgfsys@horishading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \setlength\pgf@x{#2}%
+ \pgf@xa=\pgf@x%
+ \pgf@sys@bp@correct{\pgf@x}%
+ \pgf@y=\pgf@max%
+ \pgf@sys@bp@correct{\pgf@y}%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{\hbox to \the\pgf@max{%
+ \noexpand\vrule width0pt height\the\pgf@xa%
+ \noexpand\pgfsys@beginpurepicture%
+ \noexpand\pgfsys@rect{0pt}{0pt}{\the\pgf@y}{\the\pgf@x}%
+ \noexpand\pgfsys@clipnext%
+ \noexpand\pgfsys@discardpath%
+ \noexpand\pgfsys@invoke{\pgf@domb\space \pgf@sys@tonumber{\pgf@x} pgfH \pgf@psfuncs\space pop}%
+ \hss%
+ \noexpand\pgfsys@endpurepicture}}%
+ }%
+}
+\def\pgfsys@vertshading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \setlength\pgf@x{#2}%
+ \pgf@xa=\pgf@x%
+ \pgf@sys@bp@correct{\pgf@x}%
+ \pgf@y=\pgf@max%
+ \pgf@sys@bp@correct{\pgf@y}%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{\hbox to\the\pgf@xa{%
+ \noexpand\vrule width0pt height\the\pgf@max%
+ \noexpand\pgfsys@beginpurepicture%
+ \noexpand\pgfsys@rect{0pt}{0pt}{\the\pgf@x}{\the\pgf@y}%
+ \noexpand\pgfsys@clipnext%
+ \noexpand\pgfsys@discardpath%
+ \noexpand\pgfsys@invoke{\pgf@domb\space \pgf@sys@tonumber{\pgf@x} pgfV \pgf@psfuncs\space pop}%
+ \hss%
+ \noexpand\pgfsys@endpurepicture}}%
+ }%
+}
+\def\pgfsys@radialshading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \pgf@process{#2}%
+ \pgf@xa=2\pgf@max%
+ \pgf@sys@bp@correct{\pgf@max}%
+ \advance\pgf@x by \pgf@max%
+ \advance\pgf@y by \pgf@max%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{\hbox to \the\pgf@xa{%
+ \noexpand\vrule width0pt height\the\pgf@xa%
+ \noexpand\pgfsys@beginpurepicture%
+ \noexpand\pgfsys@invoke{%
+ \pgf@domb\space \pgf@sys@tonumber{\pgf@y} \pgf@sys@tonumber{\pgf@x} \pgf@sys@tonumber{\pgf@max} pgfR1
+ \pgf@psfuncs\space \pgf@firstcolor\space \pgf@doma\space pgfR2}%
+ \hss%
+ \noexpand\pgfsys@endpurepicture}}%
+ }%
+}
+
+\AtBeginDocument{
+ % Always present specials.
+ \special{!
+ /pgfsc{}B% stroke color is empty by default
+ /pgffc{}B% fill color is empty by default
+ /pgfstr{stroke}B%
+ /pgffill{fill}B%
+ /pgfeofill{eofill}B%
+ /pgfe{a dup 0 rlineto exch 0 exch rlineto neg 0 rlineto closepath}B% rectangle
+ /pgfw{setlinewidth}B% setlinewidth
+ /pgfs{save pgfpd 72 Resolution div 72 VResolution div neg scale
+ magscale{1 DVImag div dup scale}if
+ pgfx neg pgfy neg translate pgffoa .setopacityalpha}B% save
+ /pgfr{pgfsd restore}B %restore
+ userdict begin%
+ /pgfo{pgfsd /pgfx currentpoint /pgfy exch def def @beginspecial}B %open
+ /pgfc{newpath @endspecial pgfpd}B %close
+ /pgfsd{globaldict /pgfdelta /delta where {pop delta} {0} ifelse put}B% save delta
+ /pgfpd{/delta globaldict /pgfdelta get def}B % put delta
+ /.setopacityalpha where {pop} {/.setopacityalpha{pop}def} ifelse % install .setopacityalpha
+ /.pgfsetfillopacityalpha{/pgffoa exch def
+ /pgffill{gsave pgffoa .setopacityalpha fill 1 .setopacityalpha newpath fill grestore}B
+ /pgfeofill{gsave pgffoa .setopacityalpha eofill1 .setopacityalpha newpath eofill grestore}B}B
+ /.pgfsetstrokeopacityalpha{/pgfsoa exch def
+ /pgfstr{gsave pgfsoa .setopacityalpha stroke grestore}B}B
+ /pgffoa 1 def
+ /pgfsoa 1 def
+ end
+ }
+
+ % Parameters to horizontal pre axishade: \pgf@domb x
+ \special{! /pgfH{%
+ /pgfheight exch def 0.75 setlinewidth [] 0 setdash
+ /pgfshade {pgfA} def /pgfdir { dup 0 moveto
+ dup 5 index lineto } bind def} B}%
+
+ % Parameters to vertical pre axishade: \pgf@domb x
+ \special{! /pgfV{%
+ /pgfheight exch def 0.75 setlinewidth [] 0 setdash
+ /pgfshade {pgfA} def /pgfdir { dup 0 exch moveto dup 5 index
+ exch lineto } bind def} B}%
+
+ % Parameters to axishade: end x, start x, r-, g-, b- of first color, r-, g-, b- of second color
+ % Stack afterwards: end x
+ \special{! /pgfA{
+ /pgfdiff 8 index round cvi 8 index round cvi sub 2 mul 1 add def
+ 2 index 6 index sub pgfdiff div % put red-step on stack
+ 2 index 6 index sub pgfdiff div % put green-step on stack
+ 2 index 6 index sub pgfdiff div % put green-step on stack
+ pgfheight 9 index 9 index 9 index 14 index
+ pgfdiff {
+ 3 index 3 index 3 index setrgbcolor % Set color
+ pgfdir
+ stroke
+ 4 -1 roll 7 index add % red += incred
+ 4 -1 roll 6 index add % green += incgreen
+ 4 -1 roll 5 index add % blue += incblue
+ 4 -1 roll .5 sub % x += 0.5
+ } repeat
+ mark 15 1 roll cleartomark exch pop % leave only start x on stack
+ }B }
+
+ % Parameters to radialshade pre: \pgf@domb y x max
+ \special{! /pgfR1{
+ newpath dup dup dup 0 360 arc clip newpath
+ dup /pgfendx exch def
+ /pgfendy exch def
+ 0.875 setlinewidth
+ [] 0 setdash
+ /pgfshade {pgfR} def
+ /pgfstartx exch def
+ /pgfstarty exch def
+ /pgfdiffx pgfendx pgfstartx sub def
+ /pgfdiffy pgfendy pgfstarty sub def
+ dup /pgfdomb exch def
+ }B }
+
+ % Parameters to radialshade post: \pgf@firstcolor \pgf@doma
+ \special{! /pgfR2{
+ newpath 0.5 add pgfcircx pgfcircy 3 2 roll 0 360 arc
+ setrgbcolor fill pop}B }%
+
+ % Parameters to radialshade: end x, start x, r-, g-, b- of first color, r-, g-, b- of second color
+ % Stack afterwards: end x
+ \special{! /pgfR{
+ /pgfdiff 8 index round cvi 8 index round cvi sub 4 mul 1 add def
+ /pgfcircx pgfstartx 9 index pgfdiffx pgfdomb div mul add def
+ /pgfcircy pgfstarty 9 index pgfdiffy pgfdomb div mul add def
+ /pgfcircxe pgfstartx 8 index pgfdiffx pgfdomb div mul add def
+ /pgfcircye pgfstarty 8 index pgfdiffy pgfdomb div mul add def
+ /pgfxstep pgfcircxe pgfcircx sub pgfdiff div def
+ /pgfystep pgfcircye pgfcircy sub pgfdiff div def
+ 2 index 6 index sub pgfdiff div % put red-step on stack
+ 2 index 6 index sub pgfdiff div % put green-step on stack
+ 2 index 6 index sub pgfdiff div % put green-step on stack
+ 8 index 8 index 8 index 13 index
+ pgfdiff {
+ 3 index 3 index 3 index setrgbcolor % Set color
+ pgfcircx pgfcircy 2 index 0 360 arc closepath
+ stroke
+ 4 -1 roll 6 index add % red += incred
+ 4 -1 roll 5 index add % green += incgreen
+ 4 -1 roll 4 index add % blue += incblue
+ 4 -1 roll .25 sub % x += 0.25
+ /pgfcircx pgfcircx pgfxstep add def
+ /pgfcircy pgfcircy pgfystep add def
+ } repeat
+ mark 14 1 roll cleartomark exch pop % leave only start x on stack
+ }B}
+}
+
+\endinput
+
+%%% Local Variables:
+%%% mode: latex
+%%% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
new file mode 100644
index 00000000000..79697fbb9f6
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
@@ -0,0 +1,169 @@
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-pdftex.def,v 1.4 2005/10/06 13:16:09 tantau Exp $
+
+% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+%
+% This program can be redistributed and/or modified under the terms
+% of the GNU Public License, version 2.
+
+
+
+
+% Driver commands for pdf
+
+%
+% Load common pdf commands:
+%
+\input pgfsys-common-pdf.def
+
+%
+% pdftex-specific stuff:
+%
+\def\pgfsys@invoke#1{\pdfliteral{#1}}
+
+\def\pgfsys@hboxsynced#1{%
+ {%
+ \pgfsys@beginscope%
+ \setbox\pgf@hbox=\hbox{%
+ \hskip\pgf@pt@x%
+ \raise\pgf@pt@y\hbox{%
+ \pgf@pt@x=0pt%
+ \pgf@pt@y=0pt%
+ \pgflowlevelsynccm%
+ \pgfsys@hbox#1}%
+ \hss%
+ }%
+ \wd\pgf@hbox=0pt%
+ \ht\pgf@hbox=0pt%
+ \dp\pgf@hbox=0pt%
+ \box\pgf@hbox%
+ \pgfsys@endscope%
+ }%
+}
+
+\let\pgf@sys@pgf@resource@list=\@empty%
+\def\pgf@sys@pdf@addtopageresources#1{%
+ \xdef\pgf@sys@pgf@resource@list{\pgf@sys@pgf@resource@list\space#1}%
+ \edef\pgf@temp{{<<\pgf@sys@pgf@resource@list>>}}%
+ \expandafter\immediate\expandafter\pdfobj\pgf@temp%
+ \edef\pgf@temp{{/ExtGState \the\pdflastobj\space 0 R}}
+ \expandafter\global\expandafter\pdfpageresources\pgf@temp%
+}
+
+
+\def\pgfsys@imagesuffixlist{pdf:jpg:jpeg:png}
+\def\pgfsys@defineimage{% width, height, page number
+ \ifx\pgf@imagewidth\@empty\else\edef\pgf@imagewidth{ width \pgf@imagewidth }\fi%
+ \ifx\pgf@imageheight\@empty\else\edef\pgf@imageheight{ height \pgf@imageheight }\fi%
+ \ifx\pgf@imagepage\@empty\else\edef\pgf@imagepage{ page \pgf@imagepage }\fi%
+ \ifx\pdfximage\@undefined% old version of pdflatex
+ \ifx\pgf@imagepage\@empty\else%
+ \PackageWarning{pgf}{Page selection not supported. Ignoring
+ page selection}%
+ \fi%
+ \setbox\@tempboxa=\hbox{%
+ \pdfimage \pgf@imageheight \pgf@imagewidth {\pgf@filename}}%
+ \pdfform\@tempboxa%
+ \edef\pgf@image{\noexpand\pdfrefform\the\pdflastform}%
+ \else% new version
+ {\pdfximage \pgf@imageheight \pgf@imagewidth attr
+ {\pgf@imageinterpolate\space\pgf@imagemask} \pgf@imagepage
+ {\pgf@filename}}%
+ \edef\pgf@image{\noexpand\pdfrefximage\the\pdflastximage}%
+ \fi
+}%
+\def\pgfsys@definemask{%
+ \ifx\pgf@maskmatte\@empty%
+ \else%
+ \edef\pgf@maskmatte{/Matte [\pgf@maskmatte]}%
+ \fi%
+ \edef\pgf@attr{{\pgf@maskmatte\space /Decode [1 0]}}%
+ \immediate\pdfximage attr \pgf@attr {\pgf@filename}%
+ \edef\pgf@mask{\the\pdflastximage}%
+}
+\def\pgfsys@horishading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \setbox\@tempboxa=\hbox to\pgf@max{\vbox to#2{\vfil\pdfliteral{/Sh sh}}\hfil}%
+ \pgf@process{\pgfpoint{\pgf@max}{#2}}%
+ \pdfxform resources {%
+ /Shading << /Sh << /ShadingType 2
+ /ColorSpace /DeviceRGB
+ /Domain [\pgf@pdfparseddomain]
+ /Coords [\pgf@doma\space0 \pgf@domb\space0]
+ /Function \pgf@pdfparsedfunction
+ /Extend [false false] >> >>}\@tempboxa%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\pdfrefxform\the\pdflastxform}%
+ }%
+}
+\def\pgfsys@vertshading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \setbox\@tempboxa=\hbox to#2{\vbox to\pgf@max{\vfil\pdfliteral{/Sh sh}}\hfil}%
+ \pgf@process{\pgfpoint{#2}{\pgf@max}}%
+ \pdfxform resources {%
+ /Shading << /Sh << /ShadingType 2
+ /ColorSpace /DeviceRGB
+ /Domain [\pgf@pdfparseddomain]
+ /Coords [0 \pgf@doma\space0 \pgf@domb]
+ /Function \pgf@pdfparsedfunction
+ /Extend [false false] >> >>}\@tempboxa%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\pdfrefxform\the\pdflastxform}%
+ }%
+}
+\def\pgfsys@radialshading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \setbox\@tempboxa=\hbox to2\pgf@max{\vbox to2\pgf@max{\vfil\pdfliteral{/Sh sh}}\hfil}%
+ \pgf@process{#2}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\pgfpoint{\pgf@max}{\pgf@max}}%
+ \advance\pgf@xa by \pgf@x%
+ \advance\pgf@ya by \pgf@y%
+ \pdfxform resources {%
+ /Shading << /Sh << /ShadingType 3
+ /ColorSpace /DeviceRGB
+ /Domain [\pgf@pdfparseddomain]
+ /Coords [\pgf@sys@tonumber{\pgf@xa} \pgf@sys@tonumber{\pgf@ya} \pgf@doma\space \pgf@sys@tonumber{\pgf@x} \pgf@sys@tonumber{\pgf@y} \pgf@domb]
+ /Function \pgf@pdfparsedfunction
+ /Extend [true false] >> >>}\@tempboxa%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\pdfrefxform\the\pdflastxform}%
+ }%
+}%
+
+ % XForm version, crashes ghostview.
+ %\def\pgfsys@defobject#1#2#3#4{%
+ % \pgf@process{#2}
+ % \setbox\pgfobjectbox\hbox{\raise-\pgf@y\hbox{\hskip-\pgf@x\relax#4}}
+ % \pgf@process{#3}
+ % \pgf@xa=\pgf@x
+ % \pgf@ya=\pgf@y
+ % \pgf@process{#2}
+ % \advance\pgf@xa by-\pgf@x
+ % \advance\pgf@ya by-\pgf@y
+ % \wd\pgfobjectbox=\pgf@xa
+ % \dp\pgfobjectbox=0pt
+ % \ht\pgfobjectbox=\pgf@ya
+ % \pdfxform\pgfobjectbox
+ % \expandafter\xdef\csname#1\endcsname{\the\pdflastxform}
+ % \expandafter\xdef\csname pgf@trans#1\endcsname
+ % {{\pgfget x}{\pgfget y}}}
+ %\def\pgfsys@useobject#1#2{%
+ % \setbox\pgfobjectbox\hbox{\pdfrefxform \csname#1\endcsname}%
+ % \dp\pgfobjectbox=0pt%
+ % \ht\pgfobjectbox=0pt%
+ % \wd\pgfobjectbox=0pt%
+ % \pgfsys@discardpath%
+ % \pgfsys@beginscope%
+ % #2%
+ % \edef\pgf@temp{{1}{0}{0}{1}\csname pgf@trans#1\endcsname}%
+ % \expandafter\pgfsys@transform\pgf@temp%
+ % \box\pgfobjectbox%
+ % \pgfsys@endscope}
+
+\endinput
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def
new file mode 100644
index 00000000000..f7864d34070
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def
@@ -0,0 +1,165 @@
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-tex4ht.def,v 1.8 2005/08/13 18:59:56 tantau Exp $
+
+% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+%
+% This program can be redistributed and/or modified under the terms
+% of the GNU Public License, version 2.
+
+
+\RequirePackage{xcolor}
+
+
+% Driver commands for tex4ht
+
+%
+% Load common pdf commands:
+%
+\input pgfsys-common-svg.def
+
+%
+% tex4ht-specific stuff:
+%
+\def\pgfsys@invoke#1{\HCode{#1}}
+
+\newcount\pgf@sys@svg@picnum
+
+
+\def\pgfsys@beginpicture{%
+ \Configure{[]}{$}{$}
+ \Configure{()}{$}{$}
+ \Configure{$$}{}{}{}%$$
+ \Configure{$}{}{}{}%$
+ \Configure{SUB}{\HCode{<tspan baseline-shift="sub">}}{\HCode{</tspan>}}
+ \Configure{SUP}{\HCode{<tspan baseline-shift="sub">}}{\HCode{</tspan>}}
+ \Configure{SUBSUP}{}{}{}
+ \Configure{htf}
+ {0}{+}{<tspan font-family="}
+ {\%s}{" font-size="\%s}{}{}
+ {">}{</tspan>}
+}
+\def\pgfsys@endpicture{%
+ % undo:
+ \Configure{htf}{0}{+}{<span\Hnewline
+ class="}{\%s}{-\%s}{x-x-\%d}{}{">}{</span>}
+}
+
+\def\pgfsys@typesetpicturebox#1{%
+ \global\advance\pgf@sys@svg@picnum by 1\relax%
+ % Ok, compute width/height
+ \pgf@xa=\pgf@picminx%
+ \pgf@ya=\pgf@picminy%
+ \pgf@xb=\pgf@picmaxx%
+ \pgf@yb=\pgf@picmaxy%
+ \pgf@x=\pgf@xb%
+ \advance\pgf@x by-\pgf@xa%
+ \pgf@y=\pgf@yb%
+ \advance\pgf@y by-\pgf@ya%
+ \ifdim\pgf@y<1pt%
+ \pgf@y=1pt%
+ \fi%
+ \HCode{<object data="\jobname-\the\pgf@sys@svg@picnum.svg"
+ width="\the\pgf@x" height="\the\pgf@y"
+ type="image/svg+xml"><p>SVG-Viewer needed.</p></object>}%
+ \special{t4ht>\jobname-\the\pgf@sys@svg@picnum.svg}%
+ \pgfsys@invoke{<svg width="\the\pgf@x" height="\the\pgf@y" viewBox="}%
+ \pgf@sys@pt{\pgf@xa}\pgf@sys@pt{\pgf@ya}\pgf@sys@pt{\pgf@x}\pgf@sys@pt{\pgf@y}%
+ \pgfsysprotocol@flushcurrentprotocol%
+ \pgf@ya=-\pgf@ya%
+ \pgfsys@invoke{">\Hnewline <g transform="translate(0,\the\pgf@yb) scale(1,-1)
+ translate(0,\the\pgf@ya)">\Hnewline }%
+ \setlength\pgf@x{\pgf@shift@baseline}%
+ \advance\pgf@x by-\pgf@picminy\relax%
+ \advance\pgf@picmaxy by-\pgf@picminy\relax% maxy is now the height
+ \advance\pgf@picmaxx by-\pgf@picminx\relax% maxx is now the width
+ \setbox#1=\hbox{\hskip-\pgf@picminx\lower\pgf@picminy\box#1}%
+ \ht#1=\pgf@picmaxy%
+ \wd#1=\pgf@picmaxx%
+ \dp#1=0pt%
+ \leavevmode\raise-\pgf@x\box#1%
+ \pgfsys@invoke{</g>\Hnewline </svg>\Hnewline }%
+ \special{t4ht<\jobname-\the\pgf@sys@svg@picnum.svg}%
+}
+
+\def\pgfsys@hbox#1{%
+ \pgf@x=.5\wd#1%
+ \ifx\tikz@textcolor\relax%
+ \else%
+ \ifx\tikz@textcolor\@empty%
+ \pgfsetfillcolor{.}%
+ \else%
+ \pgfsetfillcolor{\tikz@textcolor}%
+ \fi%
+ \fi% tweak for TikZ
+ \HCode{<text
+ style="stroke:none"
+ transform="scale(1,-1) translate(\the\pgf@x,0pt)"
+ text-anchor="middle"
+ }%
+ \ifx\f@size\@empty%
+ \else%
+ \HCode{ font-size="\f@size"}%
+ \fi%
+ \HCode{>\Hnewline }%
+ \wd#1=0pt%
+ \ht#1=0pt%
+ \dp#1=0pt%
+ \box#1
+ \HCode{</text>\Hnewline }%
+}
+
+\def\pgfsys@outerinvoke{\ifpgfpicture\expandafter\pgfsys@invoke\else\expandafter\@gobble\fi}
+
+
+\def\pgfsys@shadingoutsidepgfpicture#1{%
+ \begingroup%
+ #1%
+ \setbox\pgfpic=\hbox to0pt{%
+ \pgfsys@beginpicture%
+ \pgfsys@beginscope%
+ \pgf@sys@svg@sh@defs%
+ \pgf@sys@svg@sh%
+ \pgfsys@endscope%
+ \pgfsys@endpicture%
+ \hss%
+ }%
+ \pgf@process{\pgf@sys@svg@pos}%
+ \pgf@picminx=0pt%
+ \pgf@picminy=0pt%
+ \pgf@picmaxx=\pgf@x%
+ \pgf@picmaxy=\pgf@y%
+ \pgf@baseline=0pt%
+ \pgfsys@typesetpicturebox\pgfpic%
+ \endgroup%
+}
+
+\def\pgfsys@shadinginsidepgfpicture#1{%
+ #1%
+ \pgf@sys@svg@sh@defs% hmmm....
+ \pgf@process{\pgf@sys@svg@pos}
+ \pgf@xa=-.5\pgf@x%
+ \pgf@ya=-.5\pgf@y%
+ \pgfsysprotocol@literal{<g transform="translate(\pgf@sys@tonumber{\pgf@xa},\pgf@sys@tonumber{\pgf@ya})">\Hnewline}%
+ \pgf@sys@svg@sh%
+ \pgfsysprotocol@literal{</g>\Hnewline}%
+}
+
+
+
+% Protect against color.4ht evil meddling with xcolor:
+\let\pgf@xcolor@declaredcolor=\@declaredcolor
+\let\pgf@xcolor@undeclaredcolor=\@undeclaredcolor
+
+\AtBeginDocument{
+ \let\pgf@texht@declaredcolor=\@declaredcolor
+ \let\pgf@texht@undeclaredcolor=\@undeclaredcolor
+ \def\@declaredcolor{\ifpgfpicture\expandafter\pgf@xcolor@declaredcolor\else\expandafter\pgf@texht@declaredcolor\fi}
+ \def\@undeclaredcolor{\ifpgfpicture\expandafter\pgf@xcolor@undeclaredcolor\else\expandafter\pgf@texht@undeclaredcolor\fi}
+ \ConfigureEnv{pgfpicture}{}{}{}{}
+}
+
+\endinput
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
new file mode 100644
index 00000000000..22b257f7448
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
@@ -0,0 +1,763 @@
+\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys.code.tex,v 1.9 2005/10/18 18:03:38 tantau Exp $
+
+% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+%
+% This program can be redistributed and/or modified under the terms
+% of the GNU Public License, version 2.
+
+
+
+
+%
+% The following conversion functions are used to convert from TeX
+% dimensions to postscript/pdf points.
+%
+{\catcode`\p=12\catcode`\t=12\gdef\Pgf@geT#1pt{#1}}
+
+\def\pgf@sys@tonumber#1{\expandafter\Pgf@geT\the#1}
+
+\def\pgf@sys@bp@correct#1{#1=0.99627#1}
+
+\def\pgf@sys@bp#1{%
+ {%
+ \pgf@x=#1\relax%
+ \pgf@x=0.99627\pgf@x%
+ \edef\temp{\expandafter\Pgf@geT\the\pgf@x\space}%
+ \toks@\expandafter\expandafter\expandafter{\expandafter\pgfsysprotocol@currentprotocol\temp}%
+ \xdef\pgfsysprotocol@currentprotocol{\the\toks@}%
+ }%
+}
+\def\pgf@sys@pt#1{%
+ {%
+ \pgf@x=#1\relax%
+ \edef\temp{\expandafter\Pgf@geT\the\pgf@x\space}%
+ \toks@\expandafter\expandafter\expandafter{\expandafter\pgfsysprotocol@currentprotocol\temp}%
+ \xdef\pgfsysprotocol@currentprotocol{\the\toks@}%
+ }%
+}
+
+% internal dimensions that are always present when pgsys is loaded.
+\newdimen\pgf@x
+\newdimen\pgf@y
+\newdimen\pgf@xa
+\newdimen\pgf@ya
+\newdimen\pgf@xb
+\newdimen\pgf@yb
+\newdimen\pgf@xc
+\newdimen\pgf@yc
+
+
+% The following \if decides, whether even-odd filling and clipping is
+% to be used or normal the non-zero winding number rule. See the
+% pdf-documentation for details on what these rules are.
+
+\newif\ifpgfsys@eorule
+
+
+
+% In the following dummy definitions of the pgf system commands are
+% given. The individual drivers must overwrite these definitions,
+% preferably all of them. If some system command is used that has not
+% been overwritten, the command fails with a warning.
+%
+% In some cases, some pgf system commands are just shorthands for a
+% series of more complicated commands. In this case, a default
+% implementation is given in this file, but a driver may choose to
+% overwrite this default implementation with a more effecient
+% version. For example, a closestroke is the same as a closepath
+% followed by a stroking, but in pdf there is a special shorthand for
+% this. So, the pdf driver overwrites \pgfsys@closestroke, while the
+% postscript driver does not.
+%
+% The commands for which default implementations are available are
+% given at the end.
+
+\def\pgf@sys@fail#1{%
+ \expandafter\ifx\csname pgf@sys@fail@#1\endcsname\@empty%
+ \else%
+ \expandafter\global\expandafter\let\csname pgf@sys@fail@#1\endcsname=\@empty%
+ \PackageWarning{pgf}{%
+ Your graphic driver \pgfsysdriver\space does not supported #1. This warning is given only once}%
+ \fi%
+}
+
+
+
+\def\pgfsys@invoke{\pgf@sys@fail{invoking specials}}
+% This command is used whenever some literal text needs to be inserted
+% into the resulting .pdf, .ps, or .dvi file. Note that most
+% \pgfsys@xxxx commands will not directly call this command, but,
+% rather, use the protocolling mechanism to record their literal
+% text. It is then left to the discretion of the protocolling
+% mechansim to insert the literal text at some appropriate, later
+% time.
+%
+% This command should only be called when \pgfsys@beginpicture has
+% been called previously and when the picture has not been suspended
+% using \pgfsys@beginhbox.
+
+
+\def\pgfsys@outerinvoke{\pgfsys@invoke}
+% This command can be used to insert protocolled graphic commands
+% outside any picture. This is extremely dangerous, but sometimes
+% useful. By default, this command does the same as inside pictures.
+
+
+
+%
+%
+% Path construction commands
+%
+%
+
+\def\pgfsys@moveto#1#2{\pgf@sys@fail{path constructions}}
+% This command is used to start a path at a specific point (#1bp,#2bp)
+% or to move the current point of the current path to (#1bp,#2bp)
+% without drawing anything upon stroking (the current path is
+% `interrupted').
+%
+% Here (and in the following) the coordinates are in TeX's big points
+% (bp), unless the coordinate system has been scaled. A big point is
+% 1/72 inches. Note that TeX's point pt is 1/72.27 inches.
+%
+% Example:
+%
+% \pgfsys@moveto{10}{10}
+% \pgfsys@lineto{0}{0}
+% \pgfsys@stroke
+%
+% This will draw a line from (10bp,10bp) to the origin of the picture.
+
+\def\pgfsys@lineto#1#2{\pgf@sys@fail{path constructions}}
+% Continue the current path to (#1bp,#2bp) with a line.
+
+\def\pgfsys@curveto#1#2#3#4#5#6{\pgf@sys@fail{path constructions}}
+% Continue the current path with a bezier curver to (#5bp,#6bp). The
+% control points of the curve are at (#1bp,#2bp) and (#3bp,#4bp).
+
+\def\pgfsys@rect#1#2#3#4{\pgf@sys@fail{path constructions}}
+% Append a rectangle to the current path whose lower left corner is at
+% (#1bp,#2bp) and whose width/height is given by (#3bp,#4bp).
+%
+% This command can be `mapped back' to moveto and lineto commands, but
+% it is included since pdf has a special, quick version of this command.
+
+\def\pgfsys@closepath{\pgf@sys@fail{path constructions}}
+% Close the current path. This results in joining the current point of
+% the path with the point specified by the last moveto
+% operation. Typically, this is preferable over using lineto to the
+% last point specified by a moveto, since the line starting at this
+% point and the line ending at this point will be smoothly joined by
+% closepath.
+%
+% Example:
+%
+% \pgfsys@moveto{0}{0}
+% \pgfsys@lineto{10}{10}
+% \pgfsys@lineto{0}{10}
+% \pgfsys@closepath
+% \pgfsys@stroke
+%
+% versus
+%
+% \pgfsys@moveto{0}{0}
+% \pgfsys@lineto{10}{10}
+% \pgfsys@lineto{0}{10}
+% \pgfsys@lineto{0}{0}
+% \pgfsys@stroke
+%
+% The difference between the above will be that in the second triangle
+% the corner at the origin will be wrong; it will just be the overlay
+% of two lines going in different directions, not a sharp pointed
+% corner.
+
+
+
+
+
+
+%
+%
+% Stroking and filling commands
+%
+%
+
+\def\pgfsys@stroke{\pgf@sys@fail{path usage}}
+% Stroke the current path (as if it were drawn with a pen). A number
+% of so-called graphic state parameters influence this, which can be
+% set in different ways:
+%
+% - linewidth
+% The `thickness' of the line. A width of 0 is the thinnest width
+% renderable on the device. On a high-resolution printer this may
+% become invisible and should be avoided. A good choice is 0.4pt,
+% which is the default.
+%
+% - stroke color
+% This special color is used for stroking. If it is not set, the
+% current color is used.
+%
+% - cap
+% The cap describes how the endings of lines a drawn. A round cap
+% adds a little half circle to these endings. A butt cap ends the
+% lines exactly at the end (or start) point without anything
+% added. A rectangular cap ends the lines like the butt cap, but the
+% lines protrude over the endpoint by the line thickness. (See also
+% the pdf or postscript manual). If the path has been closed, no cap
+% is drawn.
+%
+% - join
+% This describes how a bend (a join) in a path is rendered. A round
+% join draws bends using small arcs. A bevel join just draws the two
+% lines and then fills the join minimally so that it becomes
+% convex. A miter join extends the lines so that they form a single
+% sharp corner, but only up to a certain miter limit. (See the pdf
+% or postscript manual once more).
+%
+% - dash
+% The line may be dashed according to a dashing pattern.
+%
+% - clipping area
+% If a clipping area is established, only those parts of the path
+% that are inside the clipping area will be drawn.
+%
+% In addition to stroking a path, the path may also be used for
+% clipping after it has been stroked. This will happen if the
+% \pgfsys@clipnext is used prior to this command, see there for
+% details.
+
+\def\pgfsys@fill{\pgf@sys@fail{path usage}}
+% This command fills the area surrounded by the current path. If the
+% path has not yet been closed, it is closed prior to filling. The
+% path itself is not stroked. For self-intersecting paths or paths
+% consisting of multiple parts, the nonzero winding number rule is
+% used to determine whether a point is inside or outside the
+% path, except if \ifpgfsys@eorule holds -- in which case the even-odd
+% rule should be used. (See the pdf or postscript manual for details.)
+%
+% The following graphic state parameters influence the filling:
+%
+% - fill color
+% If the fill color is not especially set, the current color is
+% used.
+%
+% - clipping area
+% If a clipping area is established, only those parts of the filling
+% area that are inside the clipping area will be drawn.
+%
+% In addition to filling the path, the path will also be used for
+% clipping if \pgfsys@clipnext is used prior to this command.
+
+\def\pgfsys@fillstroke{\pgf@sys@fail{path usage}}
+% First, the path is filled, then the path is stroked. If the fill and
+% stroke colors are the same (or if they are not specified and the
+% current color is used), this yields almost the same as a
+% \pgfsys@fill. However, due to the line thickness of the stroked
+% path, the fillstroked area will be slightly larger.
+%
+% In addition to stroking and filling the path, the path will also be
+% used for clipping if \pgfsys@clipnext is used prior to this command.
+
+\def\pgfsys@clipnext{\pgf@sys@fail{path usage}}
+% This command should be issued after a path has been constructed, but
+% before it has been stroked and/or filled or discarded. When the
+% command is used, the next stroking/filling/discarding command will
+% first be executed normally. Then, afterwards, the just-used path
+% will be used for subsequent clipping. If there has already been a
+% clipping region, this region is intersected with the new clipping
+% path (the clipping cannot get bigger). The nonzero winding number
+% rule is used to determine whether a point is inside or outside the
+% clipping area or the even-odd rule, depending on whether
+% \ifpgfsys@eorule holds.
+
+\def\pgfsys@discardpath{\pgf@sys@fail{path usage}}
+% Normally, this command should `throw away' the current path.
+% However, after \pgfsys@clipnext has been called, the current path
+% should subsequently be used for clipping. See \pgfsys@clipnext for
+% details.
+
+
+
+
+
+%
+%
+% Stroking options
+%
+%
+\def\pgfsys@setlinewidth#1{\pgf@sys@fail{setting the line width}}
+% Sets the width of lines, when stroked, to #1bp.
+
+\def\pgfsys@buttcap{\pgf@sys@fail{setting the line cap}}
+% Sets the cap to a butt cap. See \pgfsys@stroke.
+
+\def\pgfsys@roundcap{\pgf@sys@fail{setting the line cap}}
+% Sets the cap to a round cap. See \pgfsys@stroke.
+
+\def\pgfsys@rectcap{\pgf@sys@fail{setting the line cap}}
+% Sets the cap to a rectangular cap. See \pgfsys@stroke.
+
+\def\pgfsys@miterjoin{\pgf@sys@fail{setting the line join}}
+% Sets the join to a miter join. See \pgfsys@stroke.
+
+\def\pgfsys@setmiterlimit#1{\pgf@sys@fail{setting the line cap}}
+% Sets the miter limit of lines to #1. See the pdf or postscript
+% documentation.
+
+\def\pgfsys@roundjoin{\pgf@sys@fail{setting the line cap}}
+% Sets the join to a round join. See \pgfsys@stroke.
+
+\def\pgfsys@beveljoin{\pgf@sys@fail{setting the line cap}}
+% Sets the join to a bevel join. See \pgfsys@stroke.
+
+\def\pgfsys@setdash#1#2{\pgf@sys@fail{setting the dashing pattern}}
+% Sets the dashing patter. #1 should be a list of lengths given in big
+% points (bp) separated by spaces. #2 should be a single value given
+% in bp.
+%
+% The list of values in #1 is used to determine the lengths of the
+% `on' phases of the dashing and of the `off' phases. For example, if
+% #1 is `3 4', then the dashing pattern is `3bp on followed by 4bp
+% off, followed by 3bp on, followed by 4bp off, and so on'. A pattern
+% of `.5 4 3 1.5' means `.5bp on, 4bp off, 3bp on, 1.5bp off, .5bp on,
+% ...'. If the number of entries is odd, the last one is used twice,
+% so `3' means `3bp on, 3bp off, 3bp on, 3bp off,...'. An empty list
+% means `always on'.
+%
+% The second argument determines the `phase' of the pattern. For
+% example, for a pattern of `3 4' and a phase of `1', the pattern
+% would start: `2bp on, 4bp off, 3bp on, 4bp off, 3bp on, 4bp off...'.
+
+
+
+
+%
+%
+% Opacity stuff
+%
+%
+
+\def\pgfsys@stroke@opacity#1{\pgf@sys@fail{opacity}}
+% Sets the opacity of stroking operations. 1 means fully opaque, 0
+% means fully transparent.
+
+\def\pgfsys@fill@opacity#1{\pgf@sys@fail{opacity}}
+% Sets the opacity of filling operations. 1 means fully opaque, 0
+% means fully transparent.
+
+
+
+
+%
+%
+% Color stuff
+%
+%
+
+\def\pgfsys@color@rgb@stroke#1#2#3{\pgf@sys@fail{color}}
+% Sets the color used for stroking operations to the given rgb tuple
+% (numbers between 0 and 1).
+%
+% Example: Make stroked text dark red: \pgfsys@color@rgb@stroke{0.5}{0}{0}
+%
+% The special stroking color is only used if the stroking color has
+% been set since the last \color command. Thus, each \color command
+% should reset both the stroking and filling colors.
+
+\def\pgfsys@color@rgb@fill#1#2#3{\pgf@sys@fail{color}}
+% Sets the color used for filling operations to the given rgb tuple
+% (numbers between 0 and 1). This color may be different from the
+% stroking color.
+
+\def\pgfsys@color@rgb#1#2#3{\pgfsys@color@rgb@stroke{#1}{#2}{#3}\pgfsys@color@rgb@fill{#1}{#2}{#3}}
+% Sets the color used for filling and stroking operations. This is a
+% ``low-level'' version of the \color command. It is currently only
+% used by the plain tex version to support colors.
+
+\def\pgfsys@color@cmyk@stroke#1#2#3#4{\pgf@sys@fail{color}}
+% Sets the color used for stroking operations to the given cymk tuple
+% (numbers between 0 and 1).
+
+\def\pgfsys@color@cmyk@fill#1#2#3#4{\pgf@sys@fail{color}}
+% Sets the color used for filling operations to the given cymk tuple
+% (numbers between 0 and 1).
+
+\def\pgfsys@color@cmyk#1#2#3#4{\pgfsys@color@cmyk@stroke{#1}{#2}{#3}{#4}\pgfsys@color@cmyk@fill{#1}{#2}{#3}{#4}}
+% Sets the color used for filling and stroking operations.
+
+\def\pgfsys@color@cmy@stroke#1#2#3{\pgf@sys@fail{color}}
+% Sets the color used for stroking operations to the given cym tuple
+% (numbers between 0 and 1).
+
+\def\pgfsys@color@cmy@fill#1#2#3{\pgf@sys@fail{color}}
+% Sets the color used for filling operations to the given cym tuple
+% (numbers between 0 and 1).
+
+\def\pgfsys@color@cmy#1#2#3{\pgfsys@color@cmy@stroke{#1}{#2}{#3}\pgfsys@color@cmy@fill{#1}{#2}{#3}}
+% Sets the color used for filling and stroking operations.
+
+\def\pgfsys@color@gray@stroke#1{\pgf@sys@fail{color}}
+% Sets the color used for stroking operations to the given gray level
+% (number between 0 and 1).
+
+\def\pgfsys@color@gray@fill#1{\pgf@sys@fail{color}}
+% Sets the color used for filling operations to the given gray level
+% (number between 0 and 1).
+
+\def\pgfsys@color@gray#1{\pgfsys@color@gray@stroke{#1}\pgfsys@color@gray@fill{#1}}
+% Sets the color used for filling and stroking operations.
+
+\newif\ifpgfsys@color@reset@inorder
+% This if decides whether the color resetting of the
+% \pgfsys@color@reset command may assume that all color commands are
+% given ``in order.'' This means that this command will not be called,
+% say, at the beginning of a box that is later inserted at a point
+% where a fill color was actively set. This may allow the command to
+% produce more compact code when it ``knows'' that no special fill or
+% stroke color has been set.
+\pgfsys@color@reset@inordertrue
+
+
+\def\pgfsys@color@reset{}
+% This command will be called when the \color command is used. It
+% should purge any internal settings of stroking and filling
+% color. After this call, till the next use of a command like
+% \pgfsys@color@rgb@fill, the current color installed by the \color
+% command should be used.
+
+\def\pgfsys@color@unstacked#1{}
+% This slightly obscure command causes the color stack to be
+% tricked. When called, this command should set the current color to
+% #1 without causing any change in the color stack.
+
+
+
+%
+%
+% Coordinate system transformations
+%
+%
+
+\def\pgfsys@transformcm#1#2#3#4#5#6{\pgf@sys@fail{transformations}}
+% Perform a concatenation of the low-level current transformation
+% matrix with the matrix given by the values #1 to #6. The
+% transformation matrix is a transformation on a homogeneous
+% 2D-coordinate system. See the pdf or postscript manual for details.
+
+
+
+
+%
+%
+% Graphic state saving and restoring.
+%
+%
+
+\def\pgfsys@beginscope{\pgf@sys@fail{scoping}}
+% Saves the current graphic state on a graphic state stack. All
+% changes to the graphic state parameters mentioned for \pgfsys@stroke
+% and \pgfsys@fill will be local to the current graphic state and will
+% the old values will be restored after endscope is used.
+%
+% WARNING: pdf and postscript differ with respect to the question of
+% whether the current path is part of the graphic state or not. For
+% this reason, you should never use this command unless the path is
+% currently empty. For example, it might be a good idea to use
+% discardpath prior to calling this command.
+
+\def\pgfsys@endscope{\pgf@sys@fail{scoping}}
+% Restores the last saved graphic state.
+
+
+
+
+%
+%
+% Special commands
+%
+%
+
+\def\pgfsys@imagesuffixlist{}
+% A list of suffixes, separated by `:', that will be tried when
+% searching for an image.
+
+
+
+%
+%
+% Special commands
+%
+%
+
+
+\def\pgfsys@definemask{\pgf@sys@fail{masking}}
+% This command declares a mask for usage with images. It works similar
+% to \pgfsys@defineimage: Certain macros are set when the command is
+% called. The result should be to set the macro \pgf@mask to a pdf
+% object count that can subsequently be used as a soft mask. The
+% following macros will be set when this command is invoked:
+%
+% - \pgf@filename
+% File name of the mask to be defined.
+%
+% - \pgf@maskmatte
+% The so-called matte of the mask (see the pdf documentation for
+% details). The matte is a color specification consisting of 1, 3 or
+% 4 numbers between 0 and 1. The number of numbers depends on the
+% number of color channels in the image (not in the mask!). It will
+% be assumed that the image has been preblended with this color.
+
+
+
+
+%
+%
+% Shading commands
+%
+%
+
+\def\pgfsys@horishading#1#2#3{\pgf@sys@fail{shadings}}
+% Declares a horizontal shading for later use. The effect of this
+% command should be the definition of a macro called `@pgfshading#1!'
+% (or \csname @pdfshading#1!\endcsname, to be precise). When invoked,
+% this new macro should insert a shading at the current position.
+%
+% #1 is the name of the shading, which is also used in the output
+% macro name. #2 is the height of the shading and must be given as a
+% TeX dimension like `2cm' or `10pt'. #3 is a shading color
+% specification as specified in the pgfuserguide. The shading
+% specification implicitly fixes the width of the shading.
+%
+% When `@pgfshading#1!' is invoked, it should insert a box of height
+% #2 and the width implicit in the shading declaration.
+
+\def\pgfsys@vertshading#1#2#3{\pgf@sys@fail{shadings}}
+% Like horishading, only for vertical shadings. This time, the height
+% of the shading is implicit in #3 and the width is given as #2.
+
+\def\pgfsys@radialshading#1#2#3{\pgf@sys@fail{shadings}}
+% Declares a radial shading. Like the previous macros, this command
+% should setup the macro `@pgfshading#1!', which upon invocation
+% should insert a radial shading whose size is implicit in #3.
+%
+% The parameter #2 is a pgf point specification if the starting point
+% of the shading. See the pgfuserguide for details.
+
+\def\pgfsys@shadingoutsidepgfpicture#1{%
+ #1%
+}
+% This command gets the definition of a shading (@pgfshadingxxxx!) as
+% an argument and should insert this shading into the normal text.
+%
+% This command has a default implementation.
+
+
+\def\pgfsys@shadinginsidepgfpicture#1{%
+ \pgf@makehbox{#1}%
+ \setbox\pgf@hbox=\hbox{\hskip-.5\wd\pgf@hbox\lower.5\ht\pgf@hbox\hbox{\box\pgf@hbox}}%
+ \pgfqbox{\pgf@hbox}%
+}
+% This command works like \pgfsys@shadingoutsidepgfpicture, only it is
+% called when a shading should be inserted inside a picture. This
+% command should insert the shading centered on the origin (which will
+% typically have been low-level translated somewhere else.)
+%
+% This command has a default implementation.
+
+
+
+
+
+%
+%
+% Commands having a default implementation. These commands only need
+% not be implemented by drivers if this results in a better
+% preformance.
+%
+%
+
+
+\def\pgfsys@closestroke{\pgfsys@closepath\pgfsys@stroke}
+% This command should have the same effect as first closing the path
+% and then stroking it.
+
+
+\def\pgfsys@transformshift#1#2{\pgfsys@transformcm{1}{0}{0}{1}{#1}{#2}}
+% This command will change the origin of the low-level coordinate
+% system to (#1bp,#2bp).
+
+\def\pgfsys@transformxyscale#1#2{\pgfsys@transformcm{#1}{0}{0}{#2}{0bp}{0bp}}
+% This command will scale the low-level coordinate system (and
+% everything that is drawn) by a factor of #1 in x-directed and #2 in
+% y-direction. Note that this applies to everything, including
+% lines. So a scaled line will have a different width and may even
+% have a different width when going along the x-axis and when going
+% along the y-axis, if the scaling is different in these directions.
+
+\def\pgfsys@hbox#1{%
+ \pgfsys@beginscope%
+ \wd#1=0pt%
+ \ht#1=0pt%
+ \dp#1=0pt%
+ \box#1%
+ \pgfsys@endscope%
+}
+% Called to insert a TeX hbox into a pgfpicture.
+
+\def\pgfsys@hboxsynced#1{%
+ {\pgfsys@beginscope\pgflowlevelsynccm\pgfsys@hbox#1\pgfsys@endscope}%
+}
+% Called to insert a TeX hbox into a pgfpicture, but with the current
+% coordiante transformation matrix synced with the canvas
+% transformation matrix.
+%
+% In essence, this command does the same as if you first said
+% \pgflowlevelsynccm and then \pgfsys@hbox. However, a driver may
+% choose to use a ``TeX-translation'' for the translation part of the
+% transformation cm. This will ensure that hyperlinks ``survive'' at
+% least translations.
+
+\def\pgfsys@beginpicture{}
+% Called at the beginning of a pgfpicture. Used to setup things.
+
+\def\pgfsys@endpicture{}
+% Called at the end of a pgfpicture.
+
+\def\pgfsys@typesetpicturebox#1{%
+ \setlength\pgf@x{\pgf@shift@baseline}%
+ \advance\pgf@x by-\pgf@picminy\relax%
+ \advance\pgf@picmaxy by-\pgf@picminy\relax% maxy is now the height
+ \advance\pgf@picmaxx by-\pgf@picminx\relax% maxx is now the width
+ \setbox#1=\hbox{\hskip-\pgf@picminx\lower\pgf@picminy\box#1}%
+ \ht#1=\pgf@picmaxy%
+ \wd#1=\pgf@picmaxx%
+ \dp#1=0pt%
+ \leavevmode\raise-\pgf@x\box#1%
+}
+% Called after a picture has been typeset in box #1. This
+% command should insert the box into the normal TeX code. The box #1
+% will still be a ``raw'' box that contains only the \special's. The
+% job of this command is to resize and shift this box according to the
+% baseline shift and the size of the box.
+%
+% This command has a default implementation.
+
+\def\pgfsys@beginpurepicture{\pgfsys@beginpicture}
+% This version of the beginpicture command can be used for pictures
+% that are guaranteed not to contain any hboxes. In this case, a
+% driver might provide a more compact version of the command.
+
+\def\pgfsys@endpurepicture{\pgfsys@endpicture}
+% Called at the end of a ``pure'' pgfpicture.
+
+\def\pgfsys@defineimage{%
+ \ifx\pgf@imagewidth\@empty\else\edef\pgf@imagewidth{width=\pgf@imagewidth,}\fi%
+ \ifx\pgf@imageheight\@empty\else\edef\pgf@imageheight{height=\pgf@imageheight,}\fi%
+ \ifx\pgf@imagepage\@empty\else\edef\pgf@imagepage{page=\pgf@imagepage,}\fi%
+ \edef\pgf@image{\noexpand\includegraphics[\pgf@imageheight\pgf@imagewidth]{\pgf@filename}}%
+}
+% Called, when an image should be defined.
+%
+% This command does not take any parameters. Instead, certain macros
+% will be preinstalled with appropriate values when this command is
+% invoked. These are:
+%
+% - \pgf@filename
+% File name of the image to be defined.
+%
+% - \pgf@imagewidth
+% Will be set to the desired (scaled) width of the image.
+%
+% - \pgf@imageheight
+% Will be set to the desired (scaled) height of the image.
+%
+% If this macro and also the height macro are empty, the image
+% should have its `natural' size.
+%
+% If exactly only of them is specified, the undefined value the
+% image is scaled so that the aspect ratio is kept.
+%
+% If both are set, the image is scaled in both directions
+% independently, possibly changing the aspect ratio.
+%
+%
+% The following macros presumable mostly make sense for drivers that
+% can handle pdf:
+%
+% - \pgf@imagepage
+% The desired page number to be extracted from a multi-page
+% `image'.
+%
+% - \pgf@imagemask
+% If set, it will be set to `/SMask x 0 R', where x is the pdf
+% object number of a soft mask to be applied to the image.
+%
+% - \pgf@imageinterpolate
+% If set, it will be set to `/Interpolate true' or `/Interpolate
+% false', indicating whether the image should be interpolated in
+% pdf.
+%
+%
+% The command should now setup the macro \pgf@image such that calling
+% this macro will result in typesetting the image. Thus, \pgf@image is
+% the `return value' of the command.
+
+
+\def\pgfsys@defobject#1#2#3#4{%
+ \pgfsysprotocol@getcurrentprotocol\pgfsys@temp%
+ {%
+ \pgfsysprotocol@setcurrentprotocol\@empty%
+ \pgfsysprotocol@bufferedtrue%
+ #4%
+ \pgfsysprotocol@getcurrentprotocol\pgfsys@@temp%
+ \expandafter\global\expandafter\let\csname #1\endcsname=\pgfsys@@temp%
+ }%
+ \pgfsysprotocol@setcurrentprotocol\pgfsys@temp%
+}
+% Declares an object for later use. The idea is that the object can be
+% precached in some way and then be rendered more quickly when used
+% several times. For example, an arrow head might be defined and
+% prerendered in this way.
+%
+% The parameter #1 is the name for later use. #2 and #3 are pgf points
+% specifying a bounding box for the object. #4 is the code for the
+% object. The code may only contain protocollable code.
+
+
+\def\pgfsys@useobject#1#2{%
+ \pgfsysprotocol@getcurrentprotocol\pgfsys@temp%
+ {%
+ \pgfsysprotocol@setcurrentprotocol\@empty%
+ \pgfsysprotocol@bufferedfalse%
+ #2%
+ \expandafter\pgfsysprotocol@setcurrentprotocol\csname #1\endcsname%
+ \pgfsysprotocol@invokecurrentprotocol%
+ }%
+ \pgfsysprotocol@setcurrentprotocol\pgfsys@temp%
+}
+% Renders a previously declared object. The first parameter is the
+% name of the the object. The second parameter is extra code that
+% should be executed right *before* the object is rendered. Typically,
+% this will be some transformation code.
+
+
+\def\pgfsys@begininvisible{\pgfsys@transformcm{1}{0}{0}{1}{2000bp}{2000bp}}
+% Between this command and the closing endinvisible, all output should
+% be suppressed. Nothing should be drawn at all, which includes all
+% paths, images and shadings.
+
+\def\pgfsys@endinvisible{\pgfsys@transformcm{1}{0}{0}{1}{-2000bp}{-2000bp}}
+% Ends the invisibilty section, unless invisibility blocks have been
+% nested. In this case, only the `last' one restores visibility.
+
+
+
+
+% Discern the driver:
+\input pgf.cfg
+
+\PackageInfo{pgfsys}{Driver file for pgf: \pgfsysdriver}
+\InputIfFileExists{\pgfsysdriver}{}{%
+ \PackageError{pgfsys}{Driver file ``\pgfsysdriver'' not found.}{}}
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
new file mode 100644
index 00000000000..119fc5d7128
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
@@ -0,0 +1,68 @@
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsysprotocol.code.tex,v 1.1.1.1 2005/06/29 12:14:04 tantau Exp $
+
+% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+%
+% This program can be redistributed and/or modified under the terms
+% of the GNU Public License, version 2.
+
+
+
+
+
+% This package provides the pgf system protcol layer. Protocolling is
+% used to record a bunch of graphic operations so that they can be
+% reused quickly at a later point.
+%
+% Basically, all ``recordable'' \pgfsys@xxxx commands call
+% \pgfsysprotocol@protocol for their protocolable literal
+% specials. The literal text will either be stored in the current
+% protocol. At a later point (actually, normally this happens
+% immediately afterwards), the accumulated protocolled text is invoked
+% using pgfsys@invokeprotocol.
+
+
+
+\let\pgfsysprotocol@currentprotocol=\@empty
+\newif\ifpgfsysprotocol@buffered
+
+
+% Add to the protocol buffered
+\def\pgfsysprotocol@literalbuffered#1{%
+ \edef\pgfsysprotocol@temp{{#1\space}}%
+ \expandafter\g@addto@macro\expandafter\pgfsysprotocol@currentprotocol\pgfsysprotocol@temp%
+}
+
+% Add to the protocol
+\def\pgfsysprotocol@literal#1{%
+ \pgfsysprotocol@literalbuffered{#1}%
+ \ifpgfsysprotocol@buffered%
+ \else%
+ \pgfsysprotocol@flushcurrentprotocol%
+ \fi%
+}
+
+% Getting and setting the current protocol
+\def\pgfsysprotocol@getcurrentprotocol#1{%
+ \let#1=\pgfsysprotocol@currentprotocol%
+}
+
+\def\pgfsysprotocol@setcurrentprotocol#1{%
+ \global\let\pgfsysprotocol@currentprotocol=#1%
+}
+
+
+% Invoking the current protocol
+\def\pgfsysprotocol@invokecurrentprotocol{%
+ \ifx\pgfsysprotocol@currentprotocol\@empty%
+ \else%
+ \expandafter\pgfsys@invoke\expandafter{\pgfsysprotocol@currentprotocol}%
+ \fi%
+}
+
+\def\pgfsysprotocol@flushcurrentprotocol{%
+ \pgfsysprotocol@invokecurrentprotocol%
+ \pgfsysprotocol@setcurrentprotocol\@empty%
+}
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
new file mode 100644
index 00000000000..1eecaf431e9
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
@@ -0,0 +1,128 @@
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsyssoftpath.code.tex,v 1.1.1.1 2005/06/29 12:14:05 tantau Exp $
+
+% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+%
+% This program can be redistributed and/or modified under the terms
+% of the GNU Public License, version 2.
+
+
+
+% This package provides the pgf system path abstraction layer. This
+% layer is used to construct paths first ``abstractly.'' These
+% abstract paths can still be modified, before they are ``made
+% concrete.''
+%
+% An abstract path consists of a sequence of basic building blocks,
+% each of which is a tuple consisting of two numbers (specifying a
+% coordinate) and a token. Possible tokens are:
+%
+% 1. moveto
+% 2. lineto
+% 3. rectcorner
+% 4. rectsize
+% 5. curvetosupporta
+% 6. curvetosupportb
+% 7. curveto
+% 8. closepath
+% 9. specialround
+%
+% A curveto must always be preceeded by a curvetosupporta and a
+% curvetosupportb. A non-empty path must always begin with a
+% moveto. The coordinates of a closepath are non-specified, currently,
+% but they might be set to the coordinate of the path segment start,
+% in the future.
+
+
+
+\let\pgfsyssoftpath@currentpath=\@empty
+% The current path
+
+\def\pgfsyssoftpath@lastmoveto{{0pt}{0pt}}
+
+% Add a moveto element to the current path
+\def\pgfsyssoftpath@moveto#1#2{%
+ \edef\pgfsyssoftpath@temp{{%
+ \noexpand\pgfsyssoftpath@movetotoken{#1}{#2}%
+ }}%
+ \expandafter\g@addto@macro\expandafter\pgfsyssoftpath@currentpath\pgfsyssoftpath@temp%
+ \xdef\pgfsyssoftpath@lastmoveto{{#1}{#2}}%
+}
+
+% Add a lineto element to the current path
+\def\pgfsyssoftpath@lineto#1#2{%
+ \edef\pgfsyssoftpath@temp{{%
+ \noexpand\pgfsyssoftpath@linetotoken{#1}{#2}%
+ }}%
+ \expandafter\g@addto@macro\expandafter\pgfsyssoftpath@currentpath\pgfsyssoftpath@temp%
+}
+
+% Add curveto elements to the current path
+\def\pgfsyssoftpath@curveto#1#2#3#4#5#6{%
+ \edef\pgfsyssoftpath@temp{{%
+ \noexpand\pgfsyssoftpath@curvetosupportatoken{#1}{#2}%
+ \noexpand\pgfsyssoftpath@curvetosupportbtoken{#3}{#4}%
+ \noexpand\pgfsyssoftpath@curvetotoken{#5}{#6}%
+ }}%
+ \expandafter\g@addto@macro\expandafter\pgfsyssoftpath@currentpath\pgfsyssoftpath@temp%
+}
+
+% Add rectanlge elements to the current path
+\def\pgfsyssoftpath@rect#1#2#3#4{%
+ \edef\pgfsyssoftpath@temp{{%
+ \noexpand\pgfsyssoftpath@rectcornertoken{#1}{#2}%
+ \noexpand\pgfsyssoftpath@rectsizetoken{#3}{#4}%
+ }}%
+ \expandafter\g@addto@macro\expandafter\pgfsyssoftpath@currentpath\pgfsyssoftpath@temp%
+}
+
+% Add closepath element to the current path
+\def\pgfsyssoftpath@closepath{%
+ \edef\pgfsyssoftpath@temp{{%
+ \noexpand\pgfsyssoftpath@closepathtoken\pgfsyssoftpath@lastmoveto%
+ }}%
+ \expandafter\g@addto@macro\expandafter\pgfsyssoftpath@currentpath\pgfsyssoftpath@temp%
+}
+
+% Add special element to the current path
+\def\pgfsyssoftpath@specialround#1#2{%
+ \edef\pgfsyssoftpath@temp{{%
+ \noexpand\pgfsyssoftpath@specialroundtoken{#1}{#2}%
+ }}%
+ \expandafter\g@addto@macro\expandafter\pgfsyssoftpath@currentpath\pgfsyssoftpath@temp%
+}
+
+
+% Getting and setting the current path
+\def\pgfsyssoftpath@getcurrentpath#1{%
+ \let#1=\pgfsyssoftpath@currentpath%
+}
+
+\def\pgfsyssoftpath@setcurrentpath#1{%
+ \global\let\pgfsyssoftpath@currentpath=#1%
+}
+
+
+% Invoking the current path
+\def\pgfsyssoftpath@invokecurrentpath{%
+ \pgfsyssoftpath@currentpath%
+}
+
+\def\pgfsyssoftpath@flushcurrentpath{%
+ \pgfsyssoftpath@invokecurrentpath%
+ \pgfsyssoftpath@setcurrentpath\@empty%
+}
+
+% Marshallers
+\def\pgfsyssoftpath@movetotoken#1#2{\pgfsys@moveto{#1}{#2}}
+\def\pgfsyssoftpath@linetotoken#1#2{\pgfsys@lineto{#1}{#2}}
+\def\pgfsyssoftpath@rectcornertoken#1#2#3#4#5{\pgfsys@rect{#1}{#2}{#4}{#5}} % #3 = \pgfsyssoftpath@rectsizetoken
+\def\pgfsyssoftpath@curvetosupportatoken#1#2#3#4#5#6#7#8{\pgfsys@curveto{#1}{#2}{#4}{#5}{#7}{#8}}
+\def\pgfsyssoftpath@closepathtoken#1#2{\pgfsys@closepath}
+\let\pgfsyssoftpath@specialroundtoken=\@gobbletwo
+
+
+\endinput
+
+%%% Local Variables:
+%%% mode: latex
+%%% End: