summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-02-23 00:49:54 +0000
committerKarl Berry <karl@freefriends.org>2008-02-23 00:49:54 +0000
commit4fc1af1461e934c39f8f5e10d5d8788681d82223 (patch)
tree7716e8a3e8787a3d11c5ce728d21b808f786ce7d /Master/texmf-dist/tex/generic/pgf
parent6f5a4edf390b6e05291d7a4b816782b14122a205 (diff)
tikz/pgf 2.0 first attempt (22feb08)
git-svn-id: svn://tug.org/texlive/trunk@6741 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex28
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex513
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex258
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaseimage.code.tex)68
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaselayers.code.tex)5
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex101
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex857
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex506
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex224
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbasepatterns.code.tex)2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex999
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex134
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex535
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex440
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex589
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex222
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary3d.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikz3d.code.tex)16
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryarrows.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzarrows.code.tex)2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryautomata.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzautomata.code.tex)6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybackgrounds.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzbackgrounds.code.tex)15
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex549
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzcalendar.code.tex)34
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarychains.code.tex212
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.code.tex186
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.footprints.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.arrows.code.tex)5
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.fractals.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzsnakes.code.tex)7
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.markings.code.tex31
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathmorphing.code.tex13
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathreplacing.code.tex13
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.shapes.code.tex13
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.text.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)7
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryer.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzer.code.tex)3
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfadings.code.tex47
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfit.code.tex77
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzfolding.code.tex)4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzmatrix.code.tex)24
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzmindmap.code.tex)168
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.code.tex31
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypetri.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzpetri.code.tex)2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplothandlers.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzplothandlers.code.tex)2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplotmarks.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzplotmarks.code.tex)2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypositioning.code.tex117
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryscopes.code.tex38
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadows.code.tex147
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.arrows.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.arrows.code.tex)4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.callouts.code.tex35
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.code.tex)3
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.IEC.code.tex40
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.US.code.tex40
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.geometric.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzpatterns.code.tex)4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.misc.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.misc.code.tex)2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.multipart.code.tex36
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.symbols.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.symbols.code.tex)5
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysnakes.code.tex77
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarythrough.code.tex36
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikztopaths.code.tex)2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytrees.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikztrees.code.tex)30
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex3909
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex842
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.footprints.code.tex230
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.fractals.code.tex65
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.markings.code.tex114
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathmorphing.code.tex299
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathreplacing.code.tex177
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.shapes.code.tex468
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.text.code.tex233
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex57
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.tex140
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex520
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex212
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.callouts.code.tex951
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.code.tex18
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.IEC.code.tex814
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.US.code.tex2587
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.geometric.code.tex1229
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.misc.code.tex70
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.multipart.code.tex165
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.symbols.code.tex50
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex424
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzcoordinatesystems.code.tex24
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.geometric.code.tex23
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.multipart.code.tex14
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathbase.code.tex263
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex194
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathoperations.code.tex781
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex912
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathrnd.code.tex213
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathtrig.code.tex1932
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex198
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex1946
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbasematrix.code.tex)37
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaseplot.code.tex)2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaseshapes.code.tex)229
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesnakes.code.tex (renamed from Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbasesnakes.code.tex)109
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg34
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf-via-dvi.def (renamed from Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfm.def)89
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def92
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def389
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def411
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvi.def392
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx.def40
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def126
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def272
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def189
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-textures.def87
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def99
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def40
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex866
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex70
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex136
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex723
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfexternal.tex32
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex224
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex699
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex94
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex125
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def297
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def62
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def281
119 files changed, 15061 insertions, 18825 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
deleted file mode 100644
index 8cbb060e1c1..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
+++ /dev/null
@@ -1,28 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcore.code.tex,v 1.5 2007/03/09 17:49:32 tantau Exp $
-
-\newif\ifpgf@draftmode
-
-\input pgfmath.code.tex
-
-\input pgfcorepoints.code.tex
-\input pgfcorepathconstruct.code.tex
-\input pgfcorepathusage.code.tex
-\input pgfcorescopes.code.tex
-\input pgfcoregraphicstate.code.tex
-\input pgfcoretransformations.code.tex
-\input pgfcorequick.code.tex
-\input pgfcoreobjects.code.tex
-\input pgfcorepathprocessing.code.tex
-\input pgfcorearrows.code.tex
-\input pgfcoreshade.code.tex
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
deleted file mode 100644
index bdf4906c1be..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
+++ /dev/null
@@ -1,513 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorearrows.code.tex,v 1.8 2007/06/07 07:41:10 tantau Exp $
-
-
-% Sets the end arrow
-%
-% #1 = An arrow name
-%
-% Example:
-%
-% \pgfsetarrowsend{stealth}
-
-\def\pgfsetarrowsend#1{\pgf@arrowset{end}{#1}}
-\def\pgf@arrowset#1#2{%
- \pgfutil@ifundefined{pgf@arrow@code@#2}
- {\PackageError{pgf}{Arrow #1 type ``#2'' unknown}{}}
- {%
- \edef\pgf@arrow@temp{#2}%
- \ifx\pgf@arrow@temp\pgfutil@empty% ah. clear!
- \expandafter\let\csname pgf@#1arrow\endcsname=\pgfutil@empty%
- \expandafter\let\csname pgf@shorten@#1\endcsname=\pgfutil@empty%
- \else%
- %\pgf@arrow@prepare{#2}%
- \expandafter\def\csname pgf@#1arrow\endcsname{\pgf@arrow@call{#2}}%
- \expandafter\edef\csname pgf@shorten@#1\endcsname{\expandafter\noexpand\csname pgf@arrow@right@#2\endcsname}%
- \fi%
- }%
-}
-
-
-% Sets the start arrow
-%
-% #1 = An arrow name
-%
-% Example:
-%
-% \pgfsetarrowsstart{stealth}
-
-\def\pgfsetarrowsstart#1{\pgf@arrowset{start}{\csname pgf@arrows@invert#1\endcsname}}
-
-\def\pgf@arrows@invname#1#2{\expandafter\def\csname pgf@arrows@invert#1\endcsname{#2}}
-\pgf@arrows@invname{}{}
-
-
-
-
-% Sets arrows
-%
-% #1 = An arrow specification of the form ``left''-``right''. The last
-% and right should be arrow types that have been defined using
-% the \pgfarrowsdef command
-%
-% Example:
-%
-% \pgfsetarrows{-to}
-
-\def\pgfsetarrows#1{\pgf@arrows#1\pgf@stop}
-\def\pgf@arrows#1-#2\pgf@stop{%
- \pgfsetarrowsstart{#1}
- \pgfsetarrowsend{#2}
-}
-
-\def\pgf@arrows@checked#1#2#3{%
- \pgfutil@ifundefined{pgf@arrow@code@#2}%
- {%
- \PackageError{pgf}{Arrow end type ``#2'' unknown}{}}%
- {%
- \pgfutil@ifundefined{pgf@arrow@code@\csname pgf@arrows@invert#1\endcsname}
- {\PackageError{pgf}{Arrow start type ``#1'' unknown}{}}%
- {#3}%
- }%
-}
-
-\def\pgf@arrows@check@already#1#2#3{%
- \pgfutil@ifundefined{pgf@arrow@code@#2}
- {#3}%
- {\PackageError{pgf}{Arrow end type ``#2'' already defined}{}}%
-}
-
-
-% Called when an arrow needs to be rendered
-
-\def\pgf@arrow@call#1{%
- \expandafter\ifx\csname pgf@arrow@prot@#1@\the\pgflinewidth\endcsname\relax%
- \pgfsysprotocol@getcurrentprotocol\pgf@arrow@temp%
- {%
- \pgfinterruptpath%
- \let\pgfusepath=\pgf@nousepath@here%
- \pgf@relevantforpicturesizefalse%
- \pgftransformreset%
- \pgfsysprotocol@setcurrentprotocol\pgfutil@empty%
- \pgfsysprotocol@bufferedtrue%
- \pgfsys@beginscope%
- \csname pgf@arrow@code@#1\endcsname%
- \pgfsys@endscope%
- \pgfsysprotocol@getcurrentprotocol\pgf@@arrow@temp%
- \global\let\pgf@@arrow@temp=\pgf@@arrow@temp%
- \endpgfinterruptpath%
- \expandafter\def\expandafter\pgf@temp\expandafter{\expandafter\pgfsys@invoke\expandafter{\pgf@@arrow@temp}}%
- \expandafter\global\expandafter\let\csname pgf@arrow@prot@#1@\the\pgflinewidth\endcsname=\pgf@temp%
- }%
- \pgfsysprotocol@setcurrentprotocol\pgf@arrow@temp%
- \fi%
- \csname pgf@arrow@prot@#1@\the\pgflinewidth\endcsname%
-}
-
-\def\pgf@arrow@code@{} % dummy
-
-\def\pgf@nousepath@here#1{%
- \PackageError{pgf}{The definition of an arrow may not use \string\pgfusepath}{}
-}
-
-
-
-% Define an arrow type.
-%
-% #1 = name or mnemonic for arrow when used at the start (examples: ``to'' or ``<'')
-% #2 = name or mnemonic for arrow when used at the end (examples: ``to'' or ``>'')
-% #3 = code to setup the left and right extend of the arrow. To set
-% the left extend, call \pgfarrowsleftextend, for the right \pgfarrowsrightextend.
-% #4 = protocolable code
-%
-% Description:
-%
-% When you define an arrow using this command, you must give two
-% names. The first is used for the arrow when it is ``at the start'',
-% the other when it is at the end. For example, a simple arrow might
-% have the names ``<'' and ``>'', though these particular names are
-% not used by pgf and left for the user.
-%
-% The code should be ``protocolable'' code. This means that it uses
-% only pretty simple commands.
-%
-% The arrow code will be protocolled once for each line width at which
-% the arrow is used. Thus, the code can (and often should) depend on
-% the line width.
-%
-% The arrow should ``point right'' in the coordinate system. The end
-% of the line at which the arrow should be drawn will be at the origin
-% of the coordinate system. The coordinate system will be scaled and
-% rotated appropriately before the arrow is drawn.
-%
-% The right extend of the arrow should be set to how much the arrow
-% ``protrudes over the right''. Prior to drawing the arrow, the line
-% will be shortened by this amount so that the arrow tip will exactly
-% touch the original right end of the unshortened line.
-%
-% The left extend specifies the leftmost point of the arrow. This is
-% important only if you use the swapping command, when this end is
-% used to compute the shortening.
-%
-% The definition of an arrow should normally take care of the fact
-% that the line cap of the main line may be a butt cap, a round cap or
-% a rect cap. In all cases, the arrow should ``cover'' the cap
-% completely or not at all.
-%
-% Example:
-%
-% \pgfarrowsdeclare{stealth}{stealth}
-% {
-% \pgfarrowsleftextend{-6\pgflinewidth}
-% \pgfarrowsrightextend{2\pgflinewidth}
-% {
-% \pgfpathmoveto{\pgfpoint{2\pgflinewidth}{0pt}}
-% \pgfpathlineto{\pgfpoint{-6\pgflinewidth}{4\pgflinewidth}}
-% \pgfpathlineto{\pgfpoint{-3\pgflinewidth}{0pt}}
-% \pgfpathlineto{\pgfpoint{-6\pgflinewidth}{-4\pgflinewidth}}
-% \pgfusepathqfill
-% }
-
-\def\pgfarrowsdeclare#1#2#3#4{%
- \pgf@arrows@check@already{#1}{#2}
- {%
- \expandafter\def\csname pgf@arrow@code@#2\endcsname{#4}%
- \expandafter\def\csname pgf@arrow@left@#2\endcsname{#3\advance\pgf@x by-\pgf@xa}%
- \expandafter\def\csname pgf@arrow@right@#2\endcsname{#3\advance\pgf@x by\pgf@xb}%
- \pgf@arrows@invname{#1}{#2}%
- }%
-}
-
-\def\pgfarrowsleftextend#1{\pgfmathsetlength\pgf@xa{#1}}
-\def\pgfarrowsrightextend#1{\pgfmathsetlength\pgf@xb{#1}}
-
-\def\pgf@arrows@repeat#1#2{%
- \edef\pgf@arrows@marshal{\noexpand\let\expandafter\noexpand\csname#2\endcsname=\expandafter\noexpand\csname#1\endcsname}%
- \pgf@arrows@marshal}
-
-
-
-% Declare a new arrow type to be the same as another one.
-%
-% #1 = name of new start
-% #2 = name or new end
-% #3 = name or old start
-% #4 = name or old end
-%
-% Example:
-%
-% \pgfarrowsdeclarealias{<}{>}{to}{to}
-
-\def\pgfarrowsdeclarealias#1#2#3#4{%
- \pgf@arrows@check@already{#1}{#2}
- {%
- \pgf@arrows@checked{#3}{#4}%
- {%
- \pgf@arrows@repeat{pgf@arrow@code@#4}{pgf@arrow@code@#2}%
- \pgf@arrows@repeat{pgf@arrow@left@#4}{pgf@arrow@left@#2}%
- \pgf@arrows@repeat{pgf@arrow@right@#4}{pgf@arrow@right@#2}%
- \pgf@arrows@invname{#1}{#2}%
- }%
- }%
-}
-
-
-
-
-% Creates a new arrows by ``swapping'' an existing arrow.
-%
-% #1 = name of new start
-% #2 = name of new end
-% #3 = name of old start
-% #4 = name of old end
-%
-% Example:
-%
-% \pgfarrowsdeclarealias{]}{[}{[}{]}
-
-\def\pgfarrowsdeclarereversed#1#2#3#4{%
- \pgf@arrows@check@already{#1}{#2}%
- {%
- \pgf@arrows@checked{#3}{#4}%
- {%
- \expandafter\def\csname pgf@arrow@code@#2\endcsname{%
- \pgflowlevel{\pgftransformxscale{-1}}%
- \csname pgf@arrow@code@#4\endcsname}%
- \pgf@arrows@repeat{pgf@arrow@right@#4}{pgf@arrow@left@#2}%
- \pgf@arrows@repeat{pgf@arrow@left@#4}{pgf@arrow@right@#2}%
- \pgf@arrows@invname{#1}{#2}%
- }%
- }%
-}
-
-
-
-% Creates new arrows by combining two existing arrows.
-%
-% #1 = optional additional space
-% #2 = name of new start
-% #3 = name of new end
-% #4 = name of second (innermost) start
-% #5 = name of second end
-% #6 = name of first (outermost) start
-% #7 = name of first end
-%
-% In the star form, the line will end at the innermost arrows,
-% otherwise the line will end at the outermost arrows.
-%
-% Example:
-%
-% \pgfarrowsdeclarecombine*{|<}{>|}{|}{|}{<}{>}
-% \pgfarrowsdeclarecombine{<<}{>>}{<}{>}{<}{>}
-
-\def\pgfarrowsdeclarecombine{\pgfutil@ifnextchar*{\pgfarrowsdeclarecombine@star}{\pgf@@arrowsdeclarecombine}}
-
-\def\pgf@@arrowsdeclarecombine{\pgfutil@ifnextchar[{\pgf@arrowsdeclarecombine}{\pgf@arrowsdeclarecombine[0pt]}}
-\def\pgf@arrowsdeclarecombine[#1]#2#3#4#5#6#7{%
- \pgf@arrows@check@already{#2}{#3}%
- {%
- \pgf@arrows@checked{#4}{#5}%
- {%
- \pgf@arrows@checked{#6}{#7}%
- {%
- \expandafter\edef\csname pgf@arrow@code@#3\endcsname{%
- \noexpand\pgfscope%
- {\expandafter\noexpand\csname pgf@arrow@code@#7\endcsname}%
- \noexpand\endpgfscope%
- {%
- \noexpand\pgfmathsetlength\pgf@x{#1}%
- \noexpand\pgf@process{\expandafter\noexpand\csname pgf@arrow@left@#7\endcsname}%
- \noexpand\pgf@process{\expandafter\noexpand\csname pgf@arrow@right@#5\endcsname}%
- \pgf@x=-\pgf@x%
- \noexpand\pgflowlevel{\noexpand\pgftransformxshift{\pgf@x}}%
- \expandafter\noexpand\csname pgf@arrow@code@#5\endcsname}%
- }%
- \pgf@arrows@repeat{pgf@arrow@right@#7}{pgf@arrow@right@#3}%
- \expandafter\def\csname pgf@arrow@left@#3\endcsname{%
- \pgf@process{%
- \pgfmathsetlength\pgf@y{#1}%
- \advance\pgf@x by\pgf@y%
- \pgf@process{\csname pgf@arrow@left@#7\endcsname}%
- \pgf@process{\csname pgf@arrow@right@#5\endcsname}%
- \pgf@process{\csname pgf@arrow@left@#5\endcsname}%
- }%
- }%
- \pgf@arrows@invname{#2}{#3}%
- }%
- }%
- }%
-}
-
-\def\pgfarrowsdeclarecombine@star*{\pgfutil@ifnextchar[{\pgf@arrowsdeclarecombine@star}{\pgf@arrowsdeclarecombine@star[0pt]}}
-\def\pgf@arrowsdeclarecombine@star[#1]#2#3#4#5#6#7{%
- \pgf@arrows@check@already{#2}{#3}%
- {%
- \pgf@arrows@checked{#4}{#5}%
- {%
- \pgf@arrows@checked{#6}{#7}%
- {%
- \expandafter\edef\csname pgf@arrow@code@#3\endcsname{%
- \noexpand\pgfscope%
- {%
- \noexpand\pgfmathsetlength\pgf@x{#1}%
- \pgf@process{\expandafter\noexpand\csname pgf@arrow@left@#7\endcsname}%
- \pgf@process{\expandafter\noexpand\csname pgf@arrow@right@#5\endcsname}%
- \noexpand\pgflowlevel{\noexpand\pgftransformxshift{\pgf@x}}%
- }%
- {\expandafter\noexpand\csname pgf@arrow@code@#7\endcsname}%
- \noexpand\endpgfscope%
- \expandafter\noexpand\csname pgf@arrow@code@#5\endcsname%
- }%
- \pgf@arrows@repeat{pgf@arrow@left@#7}{pgf@arrow@left@#3}%
- \expandafter\def\csname pgf@arrow@right@#3\endcsname{%
- \pgf@process{%
- \pgfmathsetlength\pgf@y{#1}%
- \advance\pgf@x by\pgf@y%
- \pgf@process{\csname pgf@arrow@left@#7\endcsname}%
- \pgf@process{\csname pgf@arrow@right@#5\endcsname}%
- \pgf@process{\csname pgf@arrow@right@#7\endcsname}%
- }%
- }%
- \pgf@arrows@invname{#2}{#3}%
- }%
- }%
- }%
-}
-
-
-
-% Creates new arrows by doubling/tripling existing arrows.
-%
-% #1 = optional additional space in multiples of line width
-% #2 = name of new start
-% #3 = name of new end
-% #4 = name of old start
-% #5 = name of old end
-%
-% Example:
-%
-% \pgfarrowsdeclaredouble{<<}{>>}{<}{>}
-
-\def\pgfarrowsdeclaredouble{\pgfutil@ifnextchar[{\pgf@arrowsdeclaredouble}{\pgf@arrowsdeclaredouble[0pt]}}
-\def\pgf@arrowsdeclaredouble[#1]#2#3#4#5{\pgfarrowsdeclarecombine[#1]{#2}{#3}{#4}{#5}{#4}{#5}}
-\def\pgfarrowsdeclaretriple{\pgfutil@ifnextchar[{\pgf@arrowsdeclaretriple}{\pgf@arrowsdeclaretriple[0pt]}}
-\def\pgf@arrowsdeclaretriple[#1]#2#3#4#5{%
- \pgfarrowsdeclarecombine[#1]{pgf@trip@#2}{pgf@trip@#3}{#4}{#5}{#4}{#5}%
- \pgfarrowsdeclarecombine[#1]{#2}{#3}{pgf@trip@#2}{pgf@trip@#3}{#4}{#5}%
-}
-
-
-% A stealth-fighter-like pointed arrow
-%
-% Example:
-%
-% \pgfsetarrows{-stealth}
-
-\pgfarrowsdeclare{stealth}{stealth}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfarrowsleftextend{+-3\pgfutil@tempdima}
- \pgfarrowsrightextend{+5\pgfutil@tempdima}
-}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfpathmoveto{\pgfqpoint{5\pgfutil@tempdima}{0pt}}
- \pgfpathlineto{\pgfqpoint{-3\pgfutil@tempdima}{4\pgfutil@tempdima}}
- \pgfpathlineto{\pgfpointorigin}
- \pgfpathlineto{\pgfqpoint{-3\pgfutil@tempdima}{-4\pgfutil@tempdima}}
- \pgfusepathqfill
-}
-
-\pgfarrowsdeclarereversed{stealth reversed}{stealth reversed}{stealth}{stealth}
-
-
-% An arrow similar to the $\to$ arrow
-%
-% Example:
-%
-% \pgfsetarrow{-to}
-
-\pgfarrowsdeclare{to}{to}
-{
- \pgfutil@tempdima=-0.84pt%
- \advance\pgfutil@tempdima by-1.3\pgflinewidth%
- \pgfutil@tempdimb=0.21pt%
- \advance\pgfutil@tempdimb by.625\pgflinewidth%
- \pgfarrowsleftextend{+\pgfutil@tempdima}
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfsetlinewidth{0.8\pgflinewidth}
- \pgfsetdash{}{+0pt}
- \pgfsetroundcap
- \pgfsetroundjoin
- \pgfpathmoveto{\pgfqpoint{-3\pgfutil@tempdima}{4\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{-2.75\pgfutil@tempdima}{2.5\pgfutil@tempdima}}
- {\pgfqpoint{0pt}{0.25\pgfutil@tempdima}}
- {\pgfqpoint{0.75\pgfutil@tempdima}{0pt}}
- \pgfpathcurveto
- {\pgfqpoint{0pt}{-0.25\pgfutil@tempdima}}
- {\pgfqpoint{-2.75\pgfutil@tempdima}{-2.5\pgfutil@tempdima}}
- {\pgfqpoint{-3\pgfutil@tempdima}{-4\pgfutil@tempdima}}
- \pgfusepathqstroke
-}
-
-\pgfarrowsdeclare{to reversed}{to reversed}
-{
- \pgfutil@tempdima=-0.21pt%
- \advance\pgfutil@tempdima by-0.475\pgflinewidth%
- \pgfutil@tempdimb=0.98pt%
- \advance\pgfutil@tempdimb by1.45\pgflinewidth%
- \pgfarrowsleftextend{+\pgfutil@tempdima}
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfsetlinewidth{+0.8\pgflinewidth}
- \pgfsetdash{}{+0pt}
- \pgfsetroundcap
- \pgfsetroundjoin
- \pgfpathmoveto{\pgfqpoint{3.5\pgfutil@tempdima}{4\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{3.25\pgfutil@tempdima}{2.5\pgfutil@tempdima}}
- {\pgfqpoint{0.5\pgfutil@tempdima}{0.25\pgfutil@tempdima}}
- {\pgfqpoint{-0.25\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{0.5\pgfutil@tempdima}{-0.25\pgfutil@tempdima}}
- {\pgfqpoint{3.25\pgfutil@tempdima}{-2.5\pgfutil@tempdima}}
- {\pgfqpoint{3.5\pgfutil@tempdima}{-4\pgfutil@tempdima}}
- \pgfusepathqstroke
-}
-
-
-
-% LaTeX's orginal arrow type
-%
-% Example:
-%
-% \pgfsetarrows{-latex}
-
-\pgfarrowsdeclare{latex}{latex}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfarrowsleftextend{+-1\pgfutil@tempdima}
- \pgfarrowsrightextend{+9\pgfutil@tempdima}
-}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfpathmoveto{\pgfqpoint{9\pgfutil@tempdima}{0pt}}
- \pgfpathcurveto
- {\pgfqpoint{6.3333\pgfutil@tempdima}{.5\pgfutil@tempdima}}
- {\pgfqpoint{2\pgfutil@tempdima}{2\pgfutil@tempdima}}
- {\pgfqpoint{-1\pgfutil@tempdima}{3.75\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{-1\pgfutil@tempdima}{-3.75\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{2\pgfutil@tempdima}{-2\pgfutil@tempdima}}
- {\pgfqpoint{6.3333\pgfutil@tempdima}{-.5\pgfutil@tempdima}}
- {\pgfqpoint{9\pgfutil@tempdima}{0pt}}
- \pgfusepathqfill
-}
-\pgfarrowsdeclarereversed{latex reversed}{latex reversed}{latex}{latex}
-
-
-
-% A bar shaped arrow
-%
-% Example:
-%
-% \pgfsetarrows{-|}
-
-\pgfarrowsdeclare{|}{|}
-{
- \pgfarrowsleftextend{+-0.25\pgflinewidth}
- \pgfarrowsrightextend{+.75\pgflinewidth}
-}
-{
- \pgfutil@tempdima=2pt%
- \advance\pgfutil@tempdima by1.5\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetrectcap
- \pgfpathmoveto{\pgfqpoint{0.25\pgflinewidth}{-\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{0.25\pgflinewidth}{\pgfutil@tempdima}}
- \pgfusepathqstroke
-}
-
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
deleted file mode 100644
index 38f60266178..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
+++ /dev/null
@@ -1,258 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex,v 1.7 2007/03/09 17:49:32 tantau Exp $
-
-% Globals
-
-\newdimen\pgflinewidth
-
-
-% Set the line width to #1.
-%
-% #1 = new line width.
-%
-% Example:
-%
-% \pgfsetlinewidth{3pt}
-
-\def\pgfsetlinewidth#1{%
- \pgfmathsetlength\pgflinewidth{#1}%
- \global\pgflinewidth=\pgflinewidth%
- \pgfsys@setlinewidth{\the\pgflinewidth}%
- \ignorespaces}
-
-
-% Set the miter limit to #1.
-%
-% #1 = new miter limit factor.
-%
-% Example:
-%
-% \pgfsetmiterlimit{3}
-
-\def\pgfsetmiterlimit#1{%
- \pgfsys@setmiterlimit{#1}%
- \ignorespaces}
-
-
-% Set the dash pattern to #1 with phase #2/
-%
-% #1 = a row of numbers of length of ``on'' and ``off'' points.
-% #2 = a phase
-%
-% Example:
-%
-% \pgfsetdash{} {0pt} % solid line
-% \pgfsetdash{{.1cm}} {0pt} % long dashes
-% \pgfsetdash{{1pt}{1ex}}{0pt} % dotted
-
-\def\pgfsetdash#1#2{%
- \def\pgf@temp{}%
- \def\pgf@next{\pgf@strip}%
- \pgf@strip#1{pgf@stop}%
- \pgfmathsetlength\pgf@x{#2}%
- \pgfsys@setdash{\pgf@temp}{\the\pgf@x}%
- \ignorespaces}
-
-\def\pgf@strip#1{%
- \def\pgf@@temp{#1}%
- \ifx\pgf@@temp\pgf@stop%
- \let\pgf@next=\relax%
- \else%
- \pgfmathsetlength\pgf@x{#1}%
- \ifx\pgf@temp\pgfutil@empty%
- \edef\pgf@temp{\the\pgf@x}%
- \else%
- \edef\pgf@temp{\pgf@temp,\the\pgf@x}%
- \fi%
- \fi\pgf@next}
-
-\def\pgf@stop{pgf@stop}
-
-
-% Set color of strokes. This will overrule the normal color.
-%
-% Example:
-%
-% \pgfsetstrokecolor{red}
-
-\def\pgfsetstrokecolor#1{%
- \pgfutil@colorlet{pgf@tempcolor}{#1}%
- \pgfutil@ifundefined{applycolormixins}{}{\applycolormixins{pgf@tempcolor}}%
- \expandafter\expandafter\expandafter\pgf@setstrokecolor\csname\string\color@pgf@tempcolor\endcsname%
-}
-\def\pgf@setstrokecolor#1#2#3#4#5{%
- \expandafter\ifx\csname pgfsys@color@#4@stroke\endcsname\relax%
- \PackageError{pgfbase}{Unsupported color model `#4'. Sorry}{}%
- \else%
- \edef\pgf@colmarshal{\expandafter\noexpand\csname pgfsys@color@#4@stroke\endcsname}%
- \pgf@uncomma#5,,%
- \pgf@colmarshal%
- \fi}
-
-\def\pgf@uncomma#1,{%
- \def\pgf@coltest{#1}%
- \ifx\pgf@coltest\pgfutil@empty%
- \let\pgf@colnext=\relax%
- \else%
- \expandafter\def\expandafter\pgf@colmarshal\expandafter{\pgf@colmarshal{#1}}%
- \let\pgf@colnext=\pgf@uncomma%
- \fi%
- \pgf@colnext%
-}
-
-
-% Set color of fills. This will overrule the normal color.
-%
-% Example:
-%
-% \pgfsetfillcolor{gray}
-
-\def\pgfsetfillcolor#1{%
- \pgfutil@colorlet{pgf@tempcolor}{#1}%
- \pgfutil@ifundefined{applycolormixins}{}{\applycolormixins{pgf@tempcolor}}%
- \expandafter\expandafter\expandafter\pgf@setfillcolor\csname\string\color@pgf@tempcolor\endcsname%
-}
-\def\pgf@setfillcolor#1#2#3#4#5{%
- \expandafter\ifx\csname pgfsys@color@#4@fill\endcsname\relax%
- \PackageError{pgfbase}{Unsupported color model `#4'. Sorry}{}%
- \else%
- \edef\pgf@colmarshal{\expandafter\noexpand\csname pgfsys@color@#4@fill\endcsname}%
- \pgf@uncomma#5,,%
- \pgf@colmarshal%
- \fi}
-
-
-
-% Sets both the stroke and fill color.
-%
-% Example:
-%
-% \pgfsetcolor{blue}
-
-\def\pgfsetcolor#1{%
- \pgfutil@colorlet{pgf@tempcolor}{#1}%
- \pgfutil@ifundefined{applycolormixins}{}{\applycolormixins{pgf@tempcolor}}%
- \expandafter\expandafter\expandafter\pgf@setcolor\csname\string\color@pgf@tempcolor\endcsname%
-}
-\def\pgf@setcolor#1#2#3#4#5{%
- \expandafter\ifx\csname pgfsys@color@#4\endcsname\relax%
- \PackageError{pgfbase}{Unsupported color model `#4'. Sorry}{}%
- \else%
- \edef\pgf@colmarshal{\expandafter\noexpand\csname pgfsys@color@#4\endcsname}%
- \pgf@uncomma#5,,%
- \pgf@colmarshal%
- \fi}
-
-% Code for ensuring the stroke/fill colors are correctly reset.
-\def\XC@bcolor{\pgfsys@color@reset}
-
-% Set a butt line cap.
-%
-% Example:
-%
-% \pgfsetbuttcap
-
-\def\pgfsetbuttcap{\pgfsys@buttcap\ignorespaces}
-
-
-% Set a round line cap.
-%
-% Example:
-%
-% \pgfsetroundcap
-
-\def\pgfsetroundcap{\pgfsys@roundcap\ignorespaces}
-
-
-% Set a rectangular line cap.
-%
-% Example:
-%
-% \pgfsetrectcap
-
-\def\pgfsetrectcap{\pgfsys@rectcap\ignorespaces}
-
-
-% Set a miter line join.
-%
-% Example:
-%
-% \pgfsetmiterjoin
-
-\def\pgfsetmiterjoin{\pgfsys@miterjoin\ignorespaces}
-
-
-% Set a bevel line join.
-%
-% Example:
-%
-% \pgfsetbeveljoin
-
-\def\pgfsetbeveljoin{\pgfsys@beveljoin\ignorespaces}
-
-
-% Set a round line join.
-%
-% Example:
-%
-% \pgfsetroundjoin
-
-\def\pgfsetroundjoin{\pgfsys@roundjoin\ignorespaces}
-
-
-% Sets the even-odd rule for filling and clipping.
-%
-% Example:
-%
-% \pgfseteorule
-
-\def\pgfseteorule{\pgfsys@eoruletrue\ignorespaces}
-
-
-% Sets the non-zero winding number rule for filling and clipping.
-%
-% Example:
-%
-% \pgfsetnonzerorule
-
-\def\pgfsetnonzerorule{\pgfsys@eorulefalse\ignorespaces}
-
-
-% Sets the opacity of stroking operations.
-%
-% #1 = opacity, where 1 means fully opaque and 0 means fully
-% transparent.
-%
-% Example:
-%
-% \pgfsetstrokeopacity{0.5}
-
-\def\pgfsetstrokeopacity#1{%
- \edef\pgf@temp{{#1}}%
- \expandafter\pgfsys@stroke@opacity\pgf@temp}
-
-
-% Sets the opacity of stroking operations.
-%
-% #1 = opacity, where 1 means fully opaque and 0 means fully
-% transparent.
-%
-% Example:
-%
-% \pgfsetfillopacity{0.5}
-
-\def\pgfsetfillopacity#1{%
- \edef\pgf@temp{{#1}}%
- \expandafter\pgfsys@fill@opacity\pgf@temp}
-
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaseimage.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
index b83c41b3f96..d74d3d1f84f 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaseimage.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
@@ -7,7 +7,8 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfbaseimage.code.tex,v 1.7 2007/05/31 10:31:50 tantau Exp $
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreimage.code.tex,v 1.1 2008/01/15 10:27:34 tantau Exp $
+
% Declare an image
@@ -29,8 +30,7 @@
\def\pgfdeclareimage{\pgfutil@ifnextchar[{\pgf@declareimage}{\pgf@declareimage[]}}
\def\pgf@declareimage[#1]#2#3{%
- \setkeys{pgfimage}{height=,width=,page=,interpolate=false,mask=}% defaults
- \setkeys{pgfimage}{#1}%
+ \pgfqkeys{/pgf/images}{height=,width=,page=,interpolate=false,mask=,#1}%
% Try to find the file
\gdef\pgf@filename{}%
% If page= parameter is not empty, try that file first:
@@ -41,7 +41,7 @@
\ifx\pgf@filename\pgfutil@empty%
\expandafter\pgf@findfile\pgfsys@imagesuffixlist:+{#3}%
\else%
- \setkeys{pgfimage}{page=}% make page empty
+ \pgfkeys{/pgf/images/page=}% make page empty
\fi%
\ifx\pgf@filename\pgfutil@empty%
\PackageWarning{pgf}%
@@ -58,27 +58,31 @@
\expandafter\global\expandafter\let\csname pgf@image@#2!\endcsname=\pgf@image%
}
-\define@key{pgfimage}{width}{\edef\pgf@imagewidth{#1}}
-\define@key{pgfimage}{height}{\edef\pgf@imageheight{#1}}
-\define@key{pgfimage}{page}{\edef\pgf@imagepage{#1}}
-\define@key{pgfimage}{interpolate}[true]{\edef\pgf@imageinterpolate{/Interpolate #1}}
-\define@key{pgfimage}{mask}{%
- \edef\pgf@imagemask{#1}%
- \ifx\pgf@imagemask\pgfutil@empty%
- \else%
- \pgfutil@ifundefined{pgf@mask@#1}%
- {\PackageError{pgf}{Undefined mask "#1".}{}%
- \edef\pgf@imagemask{}}%
- {\edef\pgf@imagemask{\csname pgf@mask@#1\endcsname}%
- \ifx\pgf@imagemask\pgfutil@empty%
- \else
- \edef\pgf@imagemask{/SMask \pgf@imagemask\space 0 R}%
- \fi}%
- \fi}
+\pgfkeys{/pgf/images/width/.estore in=\pgf@imagewidth}
+\pgfkeys{/pgf/images/height/.estore in=\pgf@imageheight}
+\pgfkeys{/pgf/images/page/.estore in=\pgf@imagepage}
+\pgfkeys{/pgf/images/interpolate/.cd,.code=\edef\pgf@imageinterpolate{/Interpolate #1},.default=true}
+\pgfkeys{/pgf/images/mask/.code=%
+ {%
+ \edef\pgf@imagemask{#1}%
+ \ifx\pgf@imagemask\pgfutil@empty%
+ \else%
+ \pgfutil@ifundefined{pgf@mask@#1}%
+ {\PackageError{pgf}{Undefined mask "#1".}{}%
+ \edef\pgf@imagemask{}}%
+ {\edef\pgf@imagemask{\csname pgf@mask@#1\endcsname}%
+ \ifx\pgf@imagemask\pgfutil@empty%
+ \else
+ \edef\pgf@imagemask{/SMask \pgf@imagemask\space 0 R}%
+ \fi%
+ }%
+ \fi%
+ }}
+
\def\pgf@findfile#1:#2+#3{%
- \pgfutil@IfFileExists{#3.#1}%
- {\xdef\pgf@filename{#3.#1}}%
+ \pgfutil@IfFileExists{#3#1}%
+ {\xdef\pgf@filename{#3#1}}%
{\def\pgf@mightbeempty{#2}%
\ifx\pgf@mightbeempty\pgfutil@empty\else%
\pgf@findfile#2+{#3}%
@@ -129,8 +133,7 @@
\def\pgfdeclaremask{\pgfutil@ifnextchar[\pgf@declaremask{\pgf@declaremask[]}}
\def\pgf@declaremask[#1]#2#3{%
- \setkeys{pgfmask}{matte={1 1 1}}% defaults
- \setkeys{pgfmask}{#1}%
+ \pgfqkeys{/pgf/images/mask}{matte={1 1 1},#1}% defaults
\def\pgf@mask{}%
% Try to find the file
\gdef\pgf@filename{}%
@@ -145,8 +148,7 @@
\expandafter\global\expandafter\let\csname pgf@mask@#2\endcsname=\pgf@mask%
}
-\define@key{pgfmask}{matte}{\edef\pgf@maskmatte{#1}}
-
+\pgfkeys{/pgf/images/mask/matte/.cd,.estore in=\pgf@maskmatte,.value required}
@@ -185,14 +187,14 @@
\def\pgf@tryextensions#1#2{%
\edef\pgf@args{[#2!]}\expandafter\pgf@@tryextensions\pgf@args{#1}}
\def\pgf@@tryextensions[#1!#2]#3{%
- \expandafter\pgfutil@ifundefined\expandafter{#3.#1!#2}%
+ \expandafter\pgfutil@ifundefined\expandafter{#3#1!#2}%
{\def\pgf@temp{#2}%
\ifx\pgf@temp\pgfutil@empty%
\edef#3{#3!}%
\else%
\pgf@@tryextensions[#2]{#3}%
\fi}%
- {\edef#3{#3.#1!#2}}}
+ {\edef#3{#3#1!#2}}}
% Alternate image
@@ -296,7 +298,7 @@
\edef\pgf@tempb{\expandafter\string\csname\jobname\endcsname}%
\ifx\pgf@tempa\pgf@tempb%
\else%
- \pgf@external@grabshipouttrue
+ \pgf@external@grabshipouttrue%
\fi%
}
@@ -305,9 +307,9 @@
\newbox\pgfexternal@startupbox
\AtBeginDocument{%
- \ifpgf@external@grabshipout
+ \ifpgf@external@grabshipout%
\global\let\pgfexternal@originalshipout=\shipout%
- \global\def\shipout{\setbox\pgfpic=}
+ \global\def\shipout{\setbox\pgfpic=}%
\maxdeadcycles=10000%
% Ok, gather everything we have seen up to now in a box. This box
% will contain any specials that have been used.
@@ -334,7 +336,7 @@
\def\pgf@externalbegin#1{%
% First, check whether we wish to grab this graphic:
\let\pgf@next=\pgf@external@normal%
- \ifpgf@external@grabshipout
+ \ifpgf@external@grabshipout%
\edef\pgf@tempa{\expandafter\string\csname #1\endcsname}%
\edef\pgf@tempb{\expandafter\string\csname\jobname\endcsname}%
\ifx\pgf@tempa\pgf@tempb%
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaselayers.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
index d05672009e6..d1e464fb7b7 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaselayers.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfbaselayers.code.tex,v 1.5 2006/10/16 22:32:58 tantau Exp $
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorelayers.code.tex,v 1.1 2008/01/15 10:27:34 tantau Exp $
% Creates a new pgf layer
@@ -71,6 +71,9 @@
\egroup%
}
+\let\startpgfonlayer=\pgfonlayer
+\let\stoppgfonlayer=\endpgfonlayer
+
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
deleted file mode 100644
index 557558d82ef..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
+++ /dev/null
@@ -1,101 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreobjects.code.tex,v 1.2 2006/10/11 15:22:25 tantau Exp $
-
-
-% Object reuse
-
-
-% Define a pgf object for reuse. Such objects will be stored
-% efficiently internally.
-%
-% #1 = name for later reuse
-% #2 = lower left corner point of bounding box
-% #3 = upper right left corner point of bounding box
-% #4 = pure pgf code (nothing too fancy!)
-%
-% Description:
-%
-% Used to define reusable objects. The object must be composed of
-% basic pgf graphic primitives. Nothing fancy can be used. The
-% created object will be stored as an xform object in pdf or as a
-% postscript procedure in postscript.
-%
-% Example:
-%
-% \pgfdefobject{myrect}{\pgfpoint{-1pt}{-1pt}}{\pgfpoint{11pt}{11pt}}
-% {\pgfpathqmoveto{0pt}{0pt}
-% \pgfpathqmoveto{10pt}{0pt}
-% \pgfpathqmoveto{10pt}{10pt}
-% \pgfpathqmoveto{0pt}{10pt}
-% \pgfpathclose
-% \pgfusepath{stroke}}
-%
-% \begin{pgfpicture}{0cm}{0cm}{1cm}{1cm}
-% \pgfuseobject{myrect}
-% \end{pgfpicture}
-
-\def\pgfdefobject#1#2#3#4{%
- \pgfinterruptpath%
- \pgf@relevantforpicturesizefalse%
- \pgfsys@defobject{#1}{#2}{#3}{#4}%
- \endpgfinterruptpath%
- \ignorespaces%
-}
-
-
-% Use an object that was previously defined using pgfdefobject
-%
-% #1 = name of previously defined object
-%
-% Example:
-%
-% \pgfdefobject{myrect}{\pgfpoint{-1pt}{-1pt}}{\pgfpoint{11pt}{11pt}}
-% {\pgfqmoveto{0}{0}
-% \pgfqmoveto{10}{0}
-% \pgfqmoveto{10}{10}
-% \pgfqmoveto{0}{10}
-% \pgfclosestroke}
-%
-% \begin{pgfpicture}{0cm}{0cm}{1cm}{1cm}
-% \pgfuseobject{myrect}
-% \end{pgfpicture}
-
-\def\pgfuseobject#1{\pgfsys@beginscope\pgfsys@useobject{#1}{}\pgfsys@endscope}
-
-
-% Use an object that was previously defined using pgfdefobject, but
-% magnify the object by the current x and y register values
-%
-% #1 = name of previously defined object
-%
-% Example:
-%
-% \pgfdefobject{myrect}{\pgfpoint{-1pt}{-1pt}}{\pgfpoint{11pt}{11pt}}
-% {\pgfqmoveto{0}{0}
-% \pgfqmoveto{10}{0}
-% \pgfqmoveto{10}{10}
-% \pgfqmoveto{0}{10}
-% \pgfclosestroke}
-%
-% \begin{pgfpicture}{0cm}{0cm}{1cm}{1cm}
-% \pgf@x=2pt% Scale by factor two in x-direction
-% \pgf@y=2pt% Scale by factor two in y-direction
-% \pgfuseobjectmagnify{myrect}
-% \end{pgfpicture}
-
-\def\pgfuseobjectmagnify#1{%
- \pgfsys@beginscope%
- \pgfsys@useobject{#1}{\pgfsys@transformxyscale{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}}%
- \pgfsys@endscope%
-}
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
deleted file mode 100644
index 2886ffa8a53..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
+++ /dev/null
@@ -1,857 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex,v 1.9 2007/06/07 07:41:10 tantau Exp $
-
-
-\newdimen\pgf@path@lastx
-\newdimen\pgf@path@lasty
-
-
-
-% Replace corners by arcs.
-%
-% #1 = in-size of arc
-% #2 = out-size of arc
-%
-% Description:
-%
-% This command influences path construction command like
-% \pgfpathlineto or \pgfpatharc. It will cause the corners at the end
-% of these commands to be replaced by little arcs. If the
-% corner is a 90 degrees corner and if #1=#2, a quarter-circle of
-% radius #1 is put in place of the corner. If #1 and #2 are different,
-% the quarter circle will instead by a quarter ellipse. If the angle
-% is different from 90 degrees, a deformed quarter circle will
-% result, which may or may not be desirable. For a ``perfect'' arc you
-% must use the \pgfpatharc command.
-%
-%
-% Example: One rounded corner.
-%
-% \pgfpathmoveto{\pgfpointxy{0}{0}}
-% \pgfsetcornersarced{4pt}{4pt}
-% \pgfpathlineto{\pgfpointxy{0}{1}}
-% \pgfpathlineto{\pgfpointxy{1}{1}}
-% \pgfstroke
-%
-% Example: A rounded rectangle
-%
-% \pgfsetcornersarced{4pt}{4pt}
-% \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{1cm}{1cm}}
-% \pgfstroke
-%
-% Example: A rounded triangles
-%
-% \pgfsetcornersarced{4pt}{4pt}
-% \pgfpathmoveto{\pgfpointorigin}
-% \pgfpathlineto{\pgfpoint{1cm}{0cm}}
-% \pgfpathlineto{\pgfpoint{1cm}{1cm}}
-% \pgfpathclose
-% \pgfstroke
-
-\newif\ifpgf@arccorners
-
-\def\pgfsetcornersarced#1{%
- \pgf@process{#1}%
- \edef\pgf@corner@arc{{\the\pgf@x}{\the\pgf@y}}%
- \pgf@arccornerstrue%
- \ifdim\pgf@x=0pt%
- \ifdim\pgf@y=0pt\relax%
- \pgf@arccornersfalse%
- \fi%
- \fi%
-}
-
-\def\pgf@roundcornerifneeded{%
- \ifpgf@arccorners\expandafter\pgfsyssoftpath@specialround\pgf@corner@arc\fi%
-}
-
-
-% Move current point to #1.
-%
-% #1 = new current point
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfxy(0,0)}
-% \pgfpathlineto{\pgfxy(0,1)}
-% \pgfstroke
-
-\def\pgfpathmoveto#1{%
- \pgfpointtransformed{#1}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgfsyssoftpath@moveto{\the\pgf@x}{\the\pgf@y}%
- \global\pgf@path@lastx=\pgf@x%
- \global\pgf@path@lasty=\pgf@y%
-}
-
-\def\pgf@protocolsizes#1#2{%
- \ifpgf@relevantforpicturesize%
- \ifdim#1<\pgf@picminx\global\pgf@picminx#1\fi%
- \ifdim#1>\pgf@picmaxx\global\pgf@picmaxx#1\fi%
- \ifdim#2<\pgf@picminy\global\pgf@picminy#2\fi%
- \ifdim#2>\pgf@picmaxy\global\pgf@picmaxy#2\fi%
- \fi%
- \ifdim#1<\pgf@pathminx\global\pgf@pathminx#1\fi%
- \ifdim#1>\pgf@pathmaxx\global\pgf@pathmaxx#1\fi%
- \ifdim#2<\pgf@pathminy\global\pgf@pathminy#2\fi%
- \ifdim#2>\pgf@pathmaxy\global\pgf@pathmaxy#2\fi%
-}
-
-
-\def\pgf@resetpathsizes{%
- \global\pgf@pathmaxx=-16000pt\relax%
- \global\pgf@pathminx=16000pt\relax%
- \global\pgf@pathmaxy=-16000pt\relax%
- \global\pgf@pathminy=16000pt\relax%
-}
-
-\def\pgf@getpathsizes#1{%
- \edef#1{{\the\pgf@pathmaxx}{\the\pgf@pathminx}{\the\pgf@pathmaxy}{\the\pgf@pathminy}}%
-}
-\def\pgf@setpathsizes#1{%
- \expandafter\pgf@@setpathsizes#1%
-}
-\def\pgf@@setpathsizes#1#2#3#4{%
- \global\pgf@pathmaxx=#1\relax%
- \global\pgf@pathminx=#2\relax%
- \global\pgf@pathmaxy=#3\relax%
- \global\pgf@pathminy=#4\relax%
-}
-
-
-
-
-
-% Append a line from the current point to #1 to the current path.
-%
-% #1 = end of line
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfxy(0,0)}
-% \pgfpathlineto{\pgfxy(0,1)}
-% \pgfstroke
-
-\def\pgfpathlineto#1{%
- \pgfpointtransformed{#1}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@roundcornerifneeded%
- \pgfsyssoftpath@lineto{\the\pgf@x}{\the\pgf@y}%
- \global\pgf@path@lastx=\pgf@x%
- \global\pgf@path@lasty=\pgf@y%
-}
-
-
-
-% Close the current path.
-%
-% Example:
-%
-% % Draws two triangles
-% \pgfpathmoveto{\pgfxy(0,0)}
-% \pgfpathlineto{\pgfxy(0,1)}
-% \pgfpathlineto{\pgfxy(1,0)}
-% \pgfclosepath
-% \pgfpathmoveto{\pgfxy(2,0)}
-% \pgfpathlineto{\pgfxy(2,1)}
-% \pgfpathlineto{\pgfxy(3,0)}
-% \pgfpathclose
-% \pgfstroke
-
-\def\pgfpathclose{%
- \pgf@roundcornerifneeded%
- \pgfsyssoftpath@closepath%
-}
-
-
-% Append a bezier spline from the current point to #3 with control
-% points #1 and #2 to the current path.
-%
-% #1 = first control point
-% #2 = second control point
-% #3 = end point
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfxy(0,0)}
-% \pgfpathcurveto{\pgfxy(0,1)}{\pgfxy(1,1)}{\pgfxy(1,2)}
-% \pgfstroke
-
-\def\pgfpathcurveto#1#2#3{%
- \pgfpointtransformed{#3}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- \pgfpointtransformed{#2}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgfpointtransformed{#1}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@roundcornerifneeded%
- \pgfsyssoftpath@curveto{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}{\the\pgf@xb}{\the\pgf@yb}%
- \global\pgf@path@lastx=\pgf@xb%
- \global\pgf@path@lasty=\pgf@yb%
-}
-
-
-% Append an arc to the current point, where the current point is at
-% angle #1 and the end is at angle #2. If #2 > #1, the arc is drawn
-% counter-clockwise, otherwise it is clockwise.
-%
-% #1 = angle of first point
-% #2 = angle of second point
-% #3 = radius or x-radius/y-radius
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfxy(0,0)}
-% \pgfpatharc{0}{90}{2cm}
-% \pgfstroke
-
-\def\pgfpatharc#1#2#3{%
- \pgfmathsetcounter{pgf@countc}{#1}%
- \pgfmathsetcounter{pgf@countd}{#2}%
- \ifnum\c@pgf@countc>360\relax%
- \advance\c@pgf@countc by-360\relax%
- \fi%
- \ifnum\c@pgf@countc<-360\relax%
- \advance\c@pgf@countc by360\relax%
- \fi%
- \ifnum\c@pgf@countd>360\relax%
- \advance\c@pgf@countd by-360\relax%
- \fi%
- \ifnum\c@pgf@countd<-360\relax%
- \advance\c@pgf@countd by360\relax%
- \fi%
- \loop%
- \pgfutil@tempcnta=\c@pgf@countc\relax%
- \advance\pgfutil@tempcnta by-\c@pgf@countd\relax%
- \ifnum\pgfutil@tempcnta<0\relax%
- \pgfutil@tempcnta=-\pgfutil@tempcnta\relax%
- \fi%
- \ifnum\pgfutil@tempcnta>90\relax%
- \ifnum\c@pgf@countd>\c@pgf@countc\relax%
- \pgfutil@tempcnta=\c@pgf@countc\relax%
- \advance\pgfutil@tempcnta by 90\relax%
- \expandafter\pgf@arc\expandafter{\expandafter\c@pgf@countc\expandafter}\expandafter{\the\pgfutil@tempcnta}{#3}%
- \advance\c@pgf@countc by 90\relax%
- \else
- \pgfutil@tempcnta=\c@pgf@countc\relax%
- \advance\pgfutil@tempcnta by -90\relax%
- \expandafter\pgf@arc\expandafter{\expandafter\c@pgf@countc\expandafter}\expandafter{\the\pgfutil@tempcnta}{#3}%
- \advance\c@pgf@countc by -90\relax%
- \fi%
- \repeat%
- \pgf@roundcornerifneeded%
- \pgf@arc{\c@pgf@countc}{\c@pgf@countd}{#3}%
-}
-
-\def\pgf@arc#1#2#3{%
- \pgfutil@in@{and }{#3}%
- \ifpgfutil@in@%
- \pgf@@arc{#1}{#2}#3\@@%
- \else
- \pgf@@arc{#1}{#2}#3and #3\@@%
- \fi%
-}
-
-\def\pgf@@arc#1#2#3and #4\@@{%
- \pgfmathsetlength{\pgfutil@tempdima}{#3}%
- \pgfmathsetlength{\pgfutil@tempdimb}{#4}%
- \pgfutil@tempcnta=#1\relax%
- \pgfutil@tempcntb=#2\relax%
- \advance\pgfutil@tempcntb by-\pgfutil@tempcnta\relax%
- \ifnum\pgfutil@tempcntb<0\relax%
- \pgfutil@tempcntb=-\pgfutil@tempcntb\relax%
- \fi%
- \ifnum\pgfutil@tempcntb>85\relax% hackery to correct the control points
- \pgfutil@tempdima=0.0555\pgfutil@tempdima\relax%
- \pgfutil@tempdimb=0.0555\pgfutil@tempdimb\relax%
- \else%
- \ifnum\pgfutil@tempcntb>75\relax%
- \pgfutil@tempdima=0.055\pgfutil@tempdima\relax%
- \pgfutil@tempdimb=0.055\pgfutil@tempdimb\relax%
- \else%
- \ifnum\pgfutil@tempcntb>60\relax%
- \pgfutil@tempdima=0.0545\pgfutil@tempdima\relax%
- \pgfutil@tempdimb=0.0545\pgfutil@tempdimb\relax%
- \else%
- \pgfutil@tempdima=0.054\pgfutil@tempdima\relax%
- \pgfutil@tempdimb=0.054\pgfutil@tempdimb\relax%
- \fi%
- \fi%
- \fi
- \pgfutil@tempdima=\pgfutil@tempcntb\pgfutil@tempdima\relax%
- \divide\pgfutil@tempdima by 9\relax%
- \pgfutil@tempdimb=\pgfutil@tempcntb\pgfutil@tempdimb\relax%
- \divide\pgfutil@tempdimb by 9\relax%
- %.. controls +(\pgfutil@tempcnta+90:\pgfutil@tempdima) and +(\pgfutil@tempcntb-90:\pgfutil@tempdima) .. +(-(#1:#3)+(#2:#3))%
- % store first support vector in xa/ya:
- \pgfutil@tempcnta=#1\relax%
- \ifnum#2>#1\relax%
- \advance\pgfutil@tempcnta by 90\relax%
- \else%
- \advance\pgfutil@tempcnta by -90\relax%
- \fi%
- \pgfpointtransformed{\pgfpointpolar{\pgfutil@tempcnta}{\pgfutil@tempdima and \pgfutil@tempdimb}}%
- \advance\pgf@x by-\pgf@pt@x%
- \advance\pgf@y by-\pgf@pt@y%
- \pgf@xa=\pgf@path@lastx%
- \pgf@ya=\pgf@path@lasty%
- \advance\pgf@xa by \pgf@x%
- \advance\pgf@ya by \pgf@y%
- % store target in xb/yb:
- \pgfutil@tempcnta=#1\relax%
- \pgfpointtransformed{\pgfpointpolar{\pgfutil@tempcnta}{#3and #4}}%
- \pgf@xb=\pgf@path@lastx%
- \pgf@yb=\pgf@path@lasty%
- \advance\pgf@xb by -\pgf@x%
- \advance\pgf@yb by -\pgf@y%
- \pgfutil@tempcnta=#2\relax%
- \pgfpointtransformed{\pgfpointpolar{\pgfutil@tempcnta}{#3and #4}}%
- \advance\pgf@xb by \pgf@x%
- \advance\pgf@yb by \pgf@y%
- % store second support xc/yc:
- \pgfutil@tempcnta=#2\relax%
- \ifnum#2>#1\relax%
- \advance\pgfutil@tempcnta by -90\relax%
- \else%
- \advance\pgfutil@tempcnta by 90\relax%
- \fi%
- \pgfpointtransformed{\pgfpointpolar{\pgfutil@tempcnta}{\pgfutil@tempdima and \pgfutil@tempdimb}}%
- \advance\pgf@x by-\pgf@pt@x%
- \advance\pgf@y by-\pgf@pt@y%
- \pgf@xc=\pgf@xb\relax%
- \pgf@yc=\pgf@yb\relax%
- \advance \pgf@xc by \pgf@x\relax%
- \advance \pgf@yc by \pgf@y\relax%
- \pgfsyssoftpath@curveto{\the\pgf@xa}{\the\pgf@ya}{\the\pgf@xc}{\the\pgf@yc}{\the\pgf@xb}{\the\pgf@yb}%
- \global\pgf@path@lastx=\pgf@xb%
- \global\pgf@path@lasty=\pgf@yb%
- \pgf@protocolsizes{\pgf@xa}{\pgf@ya}%
- \pgf@protocolsizes{\pgf@xb}{\pgf@yb}%
- \pgf@protocolsizes{\pgf@xc}{\pgf@yc}%
-}
-
-% Append an arc to the current point, where the arc is on an ellipse
-% given by two axis vectors.
-%
-% #1 = angle of first point
-% #2 = angle of second point
-% #3 = first axis
-% #4 = second axis
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfxy(0,0)}
-% \pgfpatharcaxes{0}{90}{\pgfpointxy{2}{0}}{\pgfpointxy{0}{2}}
-% \pgfstroke
-
-\def\pgfpatharcaxes#1#2#3#4{%
- {%
- \pgftransformtriangle{\pgfpointorigin}{#3}{#4}%
- \pgfpatharc{#1}{#2}{1pt}%
- }%
-}
-
-
-
-
-% Append an ellipse to the current path.
-%
-% #1 = center
-% #2 = first axis
-% #3 = second axis
-%
-% Example:
-%
-% % Add a circle of radius 3cm around the origin
-% \pgfpathellipse{\pgforigin}{\pgfxy(2,0)}{\pgfxy(0,1)}
-%
-% % Draw a non-filled circle of radius 1cm around the point (1,1)
-% \pgfpathellipse{\pgfxy(1,1)}{\pgfxy(1,1)}{\pgfxy(-2,2)}
-% \pgfstroke
-
-\def\pgfpathellipse#1#2#3{%
- \pgfpointtransformed{#1}% store center in xc/yc
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \pgfpointtransformed{#2}%
- \pgf@xa=\pgf@x% store first axis in xa/ya
- \pgf@ya=\pgf@y%
- \advance\pgf@xa by-\pgf@pt@x%
- \advance\pgf@ya by-\pgf@pt@y%
- \pgfpointtransformed{#3}%
- \pgf@xb=\pgf@x% store second axis in xb/yb
- \pgf@yb=\pgf@y%
- \advance\pgf@xb by-\pgf@pt@x%
- \advance\pgf@yb by-\pgf@pt@y%
- {%
- \advance\pgf@xa by\pgf@xc%
- \advance\pgf@ya by\pgf@yc%
- \pgfsyssoftpath@moveto{\the\pgf@xa}{\the\pgf@ya}%
- \pgf@protocolsizes{\pgf@xa}{\pgf@ya}%
- }%
- \pgf@x=0.555\pgf@xb% first arc
- \pgf@y=0.555\pgf@yb%
- \advance\pgf@x by\pgf@xa%
- \advance\pgf@y by\pgf@ya%
- \advance\pgf@x by\pgf@xc%
- \advance\pgf@y by\pgf@yc%
- \edef\pgf@temp{{\the\pgf@x}{\the\pgf@y}}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@x=0.555\pgf@xa%
- \pgf@y=0.555\pgf@ya%
- \advance\pgf@x by\pgf@xb%
- \advance\pgf@y by\pgf@yb%
- {%
- \advance\pgf@x by\pgf@xc%
- \advance\pgf@y by\pgf@yc%
- \advance\pgf@xb by\pgf@xc%
- \advance\pgf@yb by\pgf@yc%
- \expandafter\pgfsyssoftpath@curveto\pgf@temp{\the\pgf@x}{\the\pgf@y}{\the\pgf@xb}{\the\pgf@yb}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@protocolsizes{\pgf@xb}{\pgf@yb}%
- }%
- \pgf@xa=-\pgf@xa% flip first axis
- \pgf@ya=-\pgf@ya%
- \pgf@x=0.555\pgf@xa% second arc
- \pgf@y=0.555\pgf@ya%
- \advance\pgf@x by\pgf@xb%
- \advance\pgf@y by\pgf@yb%
- \advance\pgf@x by\pgf@xc%
- \advance\pgf@y by\pgf@yc%
- \edef\pgf@temp{{\the\pgf@x}{\the\pgf@y}}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@x=0.555\pgf@xb%
- \pgf@y=0.555\pgf@yb%
- \advance\pgf@x by\pgf@xa%
- \advance\pgf@y by\pgf@ya%
- {%
- \advance\pgf@x by\pgf@xc%
- \advance\pgf@y by\pgf@yc%
- \advance\pgf@xa by\pgf@xc%
- \advance\pgf@ya by\pgf@yc%
- \expandafter\pgfsyssoftpath@curveto\pgf@temp{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@protocolsizes{\pgf@xa}{\pgf@ya}%
- }%
- \pgf@xb=-\pgf@xb% flip second axis
- \pgf@yb=-\pgf@yb%
- \pgf@x=0.555\pgf@xb% third arc
- \pgf@y=0.555\pgf@yb%
- \advance\pgf@x by\pgf@xa%
- \advance\pgf@y by\pgf@ya%
- \advance\pgf@x by\pgf@xc%
- \advance\pgf@y by\pgf@yc%
- \edef\pgf@temp{{\the\pgf@x}{\the\pgf@y}}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@x=0.555\pgf@xa%
- \pgf@y=0.555\pgf@ya%
- \advance\pgf@x by\pgf@xb%
- \advance\pgf@y by\pgf@yb%
- {%
- \advance\pgf@x by\pgf@xc%
- \advance\pgf@y by\pgf@yc%
- \advance\pgf@xb by\pgf@xc%
- \advance\pgf@yb by\pgf@yc%
- \expandafter\pgfsyssoftpath@curveto\pgf@temp{\the\pgf@x}{\the\pgf@y}{\the\pgf@xb}{\the\pgf@yb}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@protocolsizes{\pgf@xb}{\pgf@yb}%
- }%
- \pgf@xa=-\pgf@xa% flip first axis once more
- \pgf@ya=-\pgf@ya%
- \pgf@x=0.555\pgf@xa% fourth arc
- \pgf@y=0.555\pgf@ya%
- \advance\pgf@x by\pgf@xb%
- \advance\pgf@y by\pgf@yb%
- \advance\pgf@x by\pgf@xc%
- \advance\pgf@y by\pgf@yc%
- \edef\pgf@temp{{\the\pgf@x}{\the\pgf@y}}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@x=0.555\pgf@xb%
- \pgf@y=0.555\pgf@yb%
- \advance\pgf@x by\pgf@xa%
- \advance\pgf@y by\pgf@ya%
- {%
- \advance\pgf@x by\pgf@xc%
- \advance\pgf@y by\pgf@yc%
- \advance\pgf@xa by\pgf@xc%
- \advance\pgf@ya by\pgf@yc%
- \expandafter\pgfsyssoftpath@curveto\pgf@temp{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@protocolsizes{\pgf@xa}{\pgf@ya}%
- }%
- \pgfsyssoftpath@closepath%
- \pgfsyssoftpath@moveto{\the\pgf@xc}{\the\pgf@yc}%
-}
-
-
-
-% Append a circle to the current path
-%
-% #1 = center
-% #2 = radius
-%
-% Example:
-%
-% % Append a circle of radius 3cm around the the point (1,1)
-% \pgfpathcircle{\pgxy(1,1)}{3cm}
-
-\def\pgfpathcircle#1#2{\pgfpathellipse{#1}{\pgfpoint{#2}{0pt}}{\pgfpoint{0pt}{#2}}}
-
-
-
-
-% Append a rectangle to the current path
-%
-% #1 = lower left corner point of rectangle
-% #2 = width and height vector
-%
-% Example:
-%
-% % A rectangle with corners (2,2) and (3,3)
-% \pgfpathrectangle{\pgfpointxy{2}{2}}{\pgfpointxy{1}{1}}
-
-\def\pgfpathrectangle{%
- \let\pgfrect@next=\pgf@specialrect%
- \ifpgf@pt@identity%
- \ifpgf@arccorners%
- \else%
- \let\pgfrect@next=\pgf@normalrect%
- \fi%
- \fi%
- \pgfrect@next%
-}
-
-\def\pgf@normalrect#1#2{%
- \pgf@process{#2}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgfpointtransformed{#1}%
- \pgfsyssoftpath@rect{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \advance\pgf@x by\pgf@xa\relax%
- \advance\pgf@y by\pgf@ya\relax%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
-}
-
-\def\pgf@specialrect#1#2{%
- \pgf@process{#2}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{#1}%
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- \advance\pgf@xa by\pgf@xb%
- \advance\pgf@ya by\pgf@yb%
- \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
- \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@ya}}%
- \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}}%
- \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}}%
- \pgfpathclose%
- \pgfpathmoveto{\pgfqpoint{\pgf@xb}{\pgf@yb}}%
-}
-
-% Append a rectangle to the current path
-%
-% #1 = one corner of the rectangle
-% #2 = opposite corner of the rectangle
-%
-% Example:
-%
-% % A rectangle with corners (2,2) and (3,3)
-% \pgfpathrectanglecorners{\pgfpointxy{2}{2}}{\pgfpointxy{3}{3}}
-
-\def\pgfpathrectanglecorners#1#2{%
- \pgf@process{#2}%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \pgf@process{#1}%
- \advance\pgf@xc by-\pgf@x%
- \advance\pgf@yc by-\pgf@y%
- \pgfpathrectangle{#1}{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
-}
-
-
-% Append a grid to the current path.
-%
-% #1 = lower left point of grid
-% #2 = upper right point of grid
-%
-% Options:
-%
-% stepx = x-step dimension (default 1cm)
-% stepy = y-step dimension (default 1cm)
-% step = dimesion vector
-%
-% Example:
-%
-% \pgfsetlinewidth{0.8pt}
-% \pgfgrid{\pgfxy(0,0)}{\pgfxy(3,2)}
-% \pgfsetlinewidth{0.4pt}
-% \pgfgrid[stepx=1cm,stepy=1cm]{\pgfxy(0,0)}{\pgfxy(3,2)}
-
-\define@key{pgfbase}{stepx}{\pgfmathsetlength{\pgf@x}{#1}\relax}
-\define@key{pgfbase}{stepy}{\pgfmathsetlength{\pgf@y}{#1}\relax}
-\define@key{pgfbase}{step}{\pgf@process{#1}}
-
-\def\pgfpathgrid{\pgfutil@ifnextchar[{\pgf@pathgrid}{\pgf@pathgrid[]}}
-\def\pgf@pathgrid[#1]#2#3{%
- \setkeys{pgfbase}{stepx=1cm,stepy=1cm}%
- \setkeys{pgfbase}{#1}%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \pgf@process{#3}%
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- \pgf@process{#2}%
- \pgf@xa=\pgf@x\relax%
- \pgf@ya=\pgf@y\relax%
- {%
- % compute bounding box
- % first corner
- \pgf@x=\pgf@xb%
- \pgf@y=\pgf@yb%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- % second corner
- \pgf@x=\pgf@xb%
- \pgf@y=\pgf@ya%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- % third corner
- \pgf@x=\pgf@xa%
- \pgf@y=\pgf@yb%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- % fourth corner
- \pgf@x=\pgf@xa%
- \pgf@y=\pgf@ya%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- }%
- \c@pgf@counta=\pgf@y\relax%
- \c@pgf@countb=\pgf@yc\relax%
- \divide\c@pgf@counta by\c@pgf@countb\relax%
- \pgf@y=\c@pgf@counta\pgf@yc\relax%
- \ifdim\pgf@y<\pgf@ya%
- \advance\pgf@y by\pgf@yc%
- \fi%
- \loop% horizontal lines
- {%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@pos@transform{\pgf@xa}{\pgf@ya}
- \pgfsyssoftpath@moveto{\the\pgf@xa}{\the\pgf@ya}%
- \pgf@xa=\pgf@xb%
- \pgf@ya=\pgf@y%
- \pgf@pos@transform{\pgf@xa}{\pgf@ya}
- \pgfsyssoftpath@lineto{\the\pgf@xa}{\the\pgf@ya}%
- }%
- \advance\pgf@y by\pgf@yc%
- \ifdim\pgf@y<\pgf@yb%
- \repeat%
- \advance\pgf@y by-0.01pt\relax%
- \ifdim\pgf@y<\pgf@yb%
- {%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@pos@transform{\pgf@xa}{\pgf@ya}
- \pgfsyssoftpath@moveto{\the\pgf@xa}{\the\pgf@ya}%
- \pgf@xa=\pgf@xb%
- \pgf@ya=\pgf@y%
- \pgf@pos@transform{\pgf@xa}{\pgf@ya}
- \pgfsyssoftpath@lineto{\the\pgf@xa}{\the\pgf@ya}%
- }%
- \fi%
- \c@pgf@counta=\pgf@x\relax%
- \c@pgf@countb=\pgf@xc\relax%
- \divide\c@pgf@counta by\c@pgf@countb\relax%
- \pgf@x=\c@pgf@counta\pgf@xc\relax%
- \ifdim\pgf@x<\pgf@xa%
- \advance\pgf@x by\pgf@xc%
- \fi%
- \loop% vertical lines
- {%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@ya%
- \pgf@pos@transform{\pgf@xc}{\pgf@yc}
- \pgfsyssoftpath@moveto{\the\pgf@xc}{\the\pgf@yc}%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@yb%
- \pgf@pos@transform{\pgf@xc}{\pgf@yc}
- \pgfsyssoftpath@lineto{\the\pgf@xc}{\the\pgf@yc}%
- }%
- \advance\pgf@x by\pgf@xc%
- \ifdim\pgf@x<\pgf@xb%
- \repeat%
- \advance\pgf@x by-0.01pt\relax%
- \ifdim\pgf@x<\pgf@xb%
- {%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@ya%
- \pgf@pos@transform{\pgf@xc}{\pgf@yc}
- \pgfsyssoftpath@moveto{\the\pgf@xc}{\the\pgf@yc}%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@yb%
- \pgf@pos@transform{\pgf@xc}{\pgf@yc}
- \pgfsyssoftpath@lineto{\the\pgf@xc}{\the\pgf@yc}%
- }%
- \fi%
-}
-
-
-
-% Append two half-parabolas to the path
-%
-% #1 = bend (relative to current point)
-% #2 = end point (relative to bend point)
-%
-% Description:
-%
-% This command appends a half-parabola that starts at the current point
-% and has its bend at #1+current point. Then, a second parabola is
-% appended that starts at #1+current point, where it also has its
-% minimum/maximum, and ends at #1+current point+#2, which becomes the
-% new current point.
-%
-% By setting #2 = (0,0) you draw only a half parabola that goes from the
-% current point to the bend; by setting #1 = (0,0)
-% you draw a half parabola that going to current point + #2 and has its
-% bend at the current point.
-%
-% Examples:
-%
-% % Half-parabola going ``up and right''
-% \pgfpathmoveto{\pgfpointorigin}
-% \pgfpathparabola{\pgfpointorigin}{\pgfpoint{2cm}{4cm}}
-%
-% % Half-parabola going ``down and right''
-% \pgfpathmoveto{\pgfpointorigin}
-% \pgfpathparabola{\pgfpoint{-2cm}{4cm}}}{\pgfpointorigin}
-%
-% % Full parabola
-% \pgfpathmoveto{\pgfpointorigin}
-% \pgfpathparabola{\pgfpoint{-2cm}{4cm}}{\pgfpoint{2cm}{4cm}}
-
-\def\pgfpathparabola#1#2{%
- {%
- \pgf@process{#2}% untransformed
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- \pgf@process{#1}% untransformed
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \pgfutil@tempswatrue%
- \ifdim\pgf@xb=0pt\relax%
- \ifdim\pgf@yb=0pt\relax%
- \pgfutil@tempswafalse%
- \fi%
- \fi%
- {%
- \ifpgfutil@tempswa%
- \pgf@arccornersfalse
- \else%
- \fi%
- \pgfutil@tempswatrue%
- \ifdim\pgf@xc=0pt\relax%
- \ifdim\pgf@yc=0pt\relax%
- \pgfutil@tempswafalse%
- \fi%
- \fi%
- \ifpgfutil@tempswa
- {%
- \pgf@pt@x=\pgf@path@lastx%
- \pgf@pt@y=\pgf@path@lasty%
- \pgfpathcurveto%
- {\pgfqpoint{.1125\pgf@xc}{.225\pgf@yc}}% found by trial and error
- {\pgfqpoint{.5\pgf@xc}{\pgf@yc}}% found by trial and error
- {\pgfqpoint{\pgf@xc}{\pgf@yc}}%
- }%
- \fi%
- }%
- \ifpgfutil@tempswa%
- \pgf@xc=\pgf@xb%
- \pgf@yc=\pgf@yb%
- {%
- \pgf@pt@x=\pgf@path@lastx%
- \pgf@pt@y=\pgf@path@lasty%
- \pgfpathcurveto%
- {\pgfqpoint{.5\pgf@xc}{0\pgf@yc}}% found by trial and error
- {\pgfqpoint{.8875\pgf@xc}{.775\pgf@yc}}% found by trial and error
- {\pgfqpoint{\pgf@xc}{\pgf@yc}}%
- }%
- \fi%
- }%
-}
-
-
-
-
-% Append a sine curve between 0 and \pi/2 to the path.
-%
-% #1 = vector, describing the width and height of the curve
-%
-% Description:
-%
-% This command appends a sine curve in the interval 0 and \pi/2 to the
-% current path. The sine curve ends at currentpoint+#1.
-%
-% Examples:
-%
-% % One complete sine in the interval [0,\pi]
-% \pgfpathmoveto{\pgfpointorigin}
-% \pgfpathsine{\pgfpoint{1.57cm}{1cm}}
-% \pgfpathcosine{\pgfpoint{3.141cm}{0cm}}
-
-\def\pgfpathsine#1{%
- {%
- \pgf@process{#1}% untransformed
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \pgf@pt@x=\pgf@path@lastx% evil trickery to transform to the last point
- \pgf@pt@y=\pgf@path@lasty%
- \pgfpathcurveto%
- {\pgfqpoint{.31831\pgf@xc}{.5\pgf@yc}}% found by trial and error
- {\pgfqpoint{.63503\pgf@xc}{\pgf@yc}}% found by trial and error
- {\pgfqpoint{\pgf@xc}{\pgf@yc}}%
- }%
-}
-
-% Append a cosine curve between 0 and \pi/2 to the path.
-%
-% #1 = vector, describing the width and height of the curve
-%
-% Examples:
-%
-% % One complete sine in the interval [0,\pi]
-% \pgfpathmoveto{\pgfpointorigin}
-% \pgfpathsine{\pgfpoint{1.57cm}{1cm}}
-% \pgfpathcosine{\pgfpoint{3.141cm}{0cm}}
-
-\def\pgfpathcosine#1{%
- {%
- \pgf@process{#1}% untransformed
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \pgf@pt@x=\pgf@path@lastx% evil trickery to transform to the last point
- \pgf@pt@y=\pgf@path@lasty%
- \pgfpathcurveto%
- {\pgfqpoint{.36497\pgf@xc}{0pt}}% found by trial and error
- {\pgfqpoint{.68169\pgf@xc}{.5\pgf@yc}}% found by trial and error
- {\pgfqpoint{\pgf@xc}{\pgf@yc}}%
- }%
-}
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
deleted file mode 100644
index 072585ba3a8..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
+++ /dev/null
@@ -1,506 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex,v 1.6 2007/03/09 17:49:32 tantau Exp $
-
-
-
-% Cleanup path
-%
-% #1 = a macro name that stores a path
-%
-% Description:
-%
-% This command will remove superfluous parts from a path. Movetos with
-% a moveto following are removed.
-%
-% Example:
-%
-% \pgfsyssoftpath@moveto{0}{0}
-% \pgfsyssoftpath@moveto{10}{10}
-% \pgfsyssoftpath@lineto{0}{0}
-% \pgfsyssoftpath@getcurrentpath\mypath
-% \pgfprocesspathcleanup\mypath
-
-\def\pgfprocesspathcleanup#1{%
- {%
- \let\pgf@newpath=\pgfutil@empty%
- \expandafter\pgf@cleanupprocessor#1\pgf@stop%
- }%
- \let#1=\pgf@newpath%
-}
-
-\def\pgf@cleanupprocessor#1{%
- \ifx#1\pgf@stop%
- \let\next=\pgfutil@gobble% ok, done
- \else%
- \ifx#1\pgfsyssoftpath@movetotoken%
- \let\next=\pgf@cleanupmoveto%
- \else%
- \let\next=\pgf@cleanupredo%
- \fi%
- \fi%
- \next#1%
-}
-
-\def\pgf@cleanupredo#1#2#3{%
- \pgfutil@g@addto@macro\pgf@newpath{#1{#2}{#3}}%
- \pgf@cleanupprocessor%
-}
-
-\def\pgf@cleanupmoveto#1#2#3#4{%
- \ifx#4\pgfsyssoftpath@movetotoken%
- % Ok, skip
- \else%
- \pgfutil@g@addto@macro\pgf@newpath{#1{#2}{#3}}%
- \fi%
- \pgf@cleanupprocessor#4%
-}
-
-
-
-% Extract start and end vectors of a path
-%
-% #1 = a macro that stores a path
-%
-% Description:
-%
-% This command will extract the first and second coordinate on the
-% path as well as the last and second-last. These coordinates will be
-% put in the pgfpoint-macros \pgfpointfirstonpath,
-% \pgfpointsecondonpath, \pgfpointsecondlastonpath, and
-% \pgfpointlastonpath. If the path is empty, these macros are set to
-% \pgfpointorigin.
-%
-% Example:
-%
-% \pgfsyssoftpath@moveto{0}{0}
-% \pgfsyssoftpath@lineto{10}{10}
-% \pgfsyssoftpath@curveto{20}{20}{30}{30}{40}{40}
-% \pgfsyssoftpath@getcurrentpath\mypath
-% \pgfprocesspathextractpoints\mypath
-%
-% % \pgfpointfirstonpath is now \pgfpoint{0}{0}
-% % \pgfpointsecondonpath is now \pgfpoint{10bp}{10bp}
-% % \pgfpointsecondlastonpath is now \pgfpoint{30bp}{30bp}
-% % \pgfpointlastonpath is now \pgfpoint{40bp}{40bp}
-
-\def\pgfprocesspathextractpoints#1{%
- \ifx#1\pgfutil@empty%
- \let\pgfpointfirstonpath=\pgfpointorigin%
- \let\pgfpointsecondonpath=\pgfpointorigin%
- \let\pgfpointsecondlastonpath=\pgfpointorigin%
- \let\pgfpointlastonpath=\pgfpointorigin%
- \else%
- \expandafter\pgf@extractprocessorfirst#1\pgf@stop%
- \fi%
-}
-
-\def\pgf@extractprocessorfirst#1#2#3#4{%
- \def\pgfpointfirstonpath{\pgfqpoint{#2}{#3}}%
- \ifx#4\pgf@stop%
- % pretty short path...
- \let\pgfpointsecondonpath=\pgfpointfirstonpath%
- \let\pgfpointsecondlastonpath=\pgfpointfirstonpath%
- \let\pgfpointlastonpath=\pgfpointfirstonpath%
- \let\next=\pgfutil@gobble%
- \else
- \let\next=\pgf@extractprocessorsecond%
- \fi%
- \next#4%
-}
-
-\def\pgf@extractprocessorsecond#1{%
- \ifx#1\pgfsyssoftpath@movetotoken%
- % Reset things...
- \let\pgf@next=\pgf@extractprocessorfirst%
- \else%
- \let\pgf@next=\pgf@@extractprocessorsecond%
- \fi%
- \pgf@next#1%
-}
-\def\pgf@@extractprocessorsecond#1#2#3#4{%
- \def\pgfpointsecondonpath{\pgfqpoint{#2}{#3}}%
- \let\pgfpointsecondlastonpath=\pgfpointfirstonpath%
- \let\pgfpointlastonpath=\pgfpointsecondonpath%
- \ifx#4\pgf@stop%
- % short path...
- \let\next=\pgfutil@gobble%
- \else
- \let\next=\pgf@extractprocessorother%
- \fi%
- \next#4%
-}
-
-\def\pgf@extractprocessorother#1{%
- \ifx#1\pgfsyssoftpath@movetotoken%
- % Reset things...
- \let\pgf@next=\pgf@extractprocessorfirst%
- \else%
- \let\pgf@next=\pgf@@extractprocessorother%
- \fi%
- \pgf@next#1%
-}
-\def\pgf@@extractprocessorother#1#2#3#4{%
- \let\pgfpointsecondlastonpath=\pgfpointlastonpath%
- \def\pgfpointlastonpath{\pgfqpoint{#2}{#3}}%
- \ifx#4\pgf@stop%
- % end!
- \let\next=\pgfutil@gobble%
- \fi%
- \next#4%
-}
-
-
-
-% Check for closepath and rectangles
-%
-% #1 = a macro that stores a path
-% #2 = command to be executed when a closepath or a rectangle is encountered
-%
-% Example:
-%
-% \pgfsyssoftpath@moveto{0}{0}
-% \pgfsyssoftpath@lineto{10}{10}
-% \pgfsyssoftpath@curveto{20}{20}{30}{30}{40}{40}
-% \pgfsyssoftpath@getcurrentpath\mypath
-% \pgfprocesscheckclosed{\mypath}{\pgf@drawarrowsfalse}
-
-\def\pgfprocesscheckclosed#1#2{%
- {%
- \global\let\pgf@proc@todo=\relax%
- \let\pgfsyssoftpath@movetotoken=\pgfutil@gobbletwo%
- \let\pgfsyssoftpath@linetotoken=\pgfutil@gobbletwo%
- \let\pgfsyssoftpath@curvetosupportatoken=\pgfutil@gobbletwo%
- \let\pgfsyssoftpath@curvetosupportbtoken=\pgfutil@gobbletwo%
- \let\pgfsyssoftpath@curvetotoken=\pgfutil@gobbletwo%
- \def\pgfsyssoftpath@rectcornertoken{\gdef\pgf@proc@todo{#2}\pgfutil@gobbletwo}%
- \def\pgfsyssoftpath@rectsizetoken{\gdef\pgf@proc@todo{#2}\pgfutil@gobbletwo}%
- \def\pgfsyssoftpath@closepathtoken{\gdef\pgf@proc@todo{#2}\pgfutil@gobbletwo}%
- #1%
- }%
- \pgf@proc@todo%
-}
-
-
-% Resolve specialround
-%
-% #1 = a macro that stores a path
-% #2 = a macro that stores the new path
-%
-% Description:
-%
-% Resolves all specialround tokens. When such a token is encountered,
-% the objective is to replace the next corner by a rounded corner.
-%
-
-\def\pgfprocessround#1#2{%
- % first, check whether #1 contains \pgfsyssoftpath@specialroundtoken.
- % if not, do quick assignment!
- \expandafter\pgf@processroundcheck\expandafter#1\expandafter#2#1\pgfsyssoftpath@specialroundtoken\pgf@stop%
-}
-
-\def\pgf@processroundcheck#1#2#3\pgfsyssoftpath@specialroundtoken#4\pgf@stop{%
- \def\pgf@test{#4}%
- \ifx\pgf@test\pgfutil@empty%
- % ok, nothing to be done!
- \let#2=#1%
- \else%
- % very well...
- \pgf@@processround#1#2%
- \fi%
-}
-
-
-\def\pgf@@processround#1#2{%
- \let\pgfprocess@newpath\pgfutil@empty%
- \let\pgfprocess@moveto\pgfutil@empty%
- \let\pgfprocess@firstto\pgfutil@empty%
- \let\pgfprocess@segment\pgfutil@empty%
- \pgf@xa=0pt%
- \pgf@ya=0pt%
- \expandafter\pgfprocess@round#1\pgf@stop{0pt}{0pt}%
- \expandafter\pgfutil@g@addto@macro\expandafter\pgfprocess@newpath\expandafter{\pgfprocess@moveto}%
- \expandafter\pgfutil@g@addto@macro\expandafter\pgfprocess@newpath\expandafter{\pgfprocess@segment}%
- \let#2=\pgfprocess@newpath%
-}
-
-\def\pgfprocess@round#1#2#3{%
- \ifx#1\pgf@stop%
- \let\next=\relax%
- \else%
- \ifx#1\pgfsyssoftpath@specialroundtoken%
- \def\pgfprocess@savex{#2}%
- \def\pgfprocess@savey{#3}%
- \let\next=\pgfprocess@specialround%
- \ifdim#2=0pt%
- \ifdim#3=0pt%
- \let\next=\pgfprocess@round% skip!
- \fi%
- \fi%
- \else%
- \ifx\pgfprocess@firstto\pgfutil@empty%
- \def\pgfprocess@firstto{{#2}{#3}}%
- \fi%
- \pgf@xa=#2%
- \pgf@ya=#3%
- \ifx#1\pgfsyssoftpath@movetotoken%
- % ok, move old segment to newpath
- \expandafter\pgfutil@g@addto@macro\expandafter\pgfprocess@newpath\expandafter{\pgfprocess@moveto}%
- \expandafter\pgfutil@g@addto@macro\expandafter\pgfprocess@newpath\expandafter{\pgfprocess@segment}%
- \def\pgfprocess@moveto{#1{#2}{#3}}%
- \let\pgfprocess@firstto=\pgfutil@empty%
- \let\pgfprocess@segment=\pgfutil@empty%
- \else%
- \pgfutil@g@addto@macro\pgfprocess@segment{#1{#2}{#3}}%
- \fi%
- \let\next=\pgfprocess@round%
- \fi%
- \fi%
- \next%
-}
-
-\def\pgfprocess@specialround#1#2#3{%
- \ifx\pgfprocess@firstto\pgfutil@empty%
- \def\pgfprocess@firstto{{#2}{#3}}%
- \fi%
- \let\next=\pgfprocess@round% default: do nothing
- \ifx#1\pgfsyssoftpath@linetotoken%
- % Ok, round a lineto
- \let\next=\pgfprocess@specialroundcope%
- \else%
- \ifx#1\pgfsyssoftpath@curvetosupportatoken%
- % Ok, round a curveto.
- \let\next=\pgfprocess@specialroundcurveto%
- \else%
- \ifx#1\pgfsyssoftpath@closepathtoken%
- % Ok, round a closepath (this is tricky...)
- \let\next=\pgfprocess@specialroundclose%
- \fi%
- \fi%
- \fi%
- \next#1{#2}{#3}%
-}%
-
-\def\pgfprocess@specialroundcope#1#2#3#4#5#6{%
- \let\next=\pgfprocess@round% do nothing by default
- \let\pgfprocess@continueafterrounding=\pgfprocess@round%
- \ifx#4\pgfsyssoftpath@linetotoken%
- % ok, let's get kicking...
- \pgf@xc=#5%
- \pgf@yc=#6%
- \let\next=\pgfprocess@@specialround%
- \else%
- \ifx#4\pgfsyssoftpath@curvetosupportatoken%
- \pgf@xc=#5%
- \pgf@yc=#6%
- \let\next=\pgfprocess@@specialround%
- \else%
- \ifx#4\pgfsyssoftpath@closepathtoken%
- \pgf@xc=#5%
- \pgf@yc=#6%
- \let\next=\pgfprocess@@specialround%
- \else
- \ifx#4\pgfsyssoftpath@specialroundtoken%
- \let\next=\pgfprocess@@findrightcoordinates%
- \fi%
- \fi%
- \fi%
- \fi%
- \next#1{#2}{#3}#4{#5}{#6}%
-}
-
-\def\pgfprocess@@findrightcoordinates#1#2#3#4#5#6#7#8#9{%
- \pgf@xc=#8%
- \pgf@yc=#9%
- \pgfprocess@@specialround#1{#2}{#3}#4{#5}{#6}#7{#8}{#9}%
-}
-
-\def\pgfprocess@@specialround#1#2#3{%
- \pgfutil@g@addto@macro\pgfprocess@segment{#1}%
- % calculate start coordinate of the curve
- \pgf@xb=#2%
- \pgf@yb=#3%
- %
- \edef\pgf@marshal%
- {\noexpand\pgfpointlineatdistance{\pgfprocess@savex}%
- {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}%
- {\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}}%
- \pgf@process{\pgf@marshal}%
- \pgf@xa=\pgf@x% save start point of added curve
- \pgf@ya=\pgf@y%
- \edef\pgfprocess@addition{{\the\pgf@x}{\the\pgf@y}}%
- \expandafter\pgfutil@g@addto@macro\expandafter\pgfprocess@segment\expandafter{\pgfprocess@addition}%
- %
- % now add curve
- %
- \edef\pgf@marshal%
- {\noexpand\pgfpointlineatdistance{\pgfprocess@savey}%
- {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}%
- {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}}%
- \pgf@process{\pgf@marshal}%
- \pgf@xc=\pgf@x% save end point of added curve
- \pgf@yc=\pgf@y%
- % calculate first support:
- {%
- \pgf@x=\pgf@xb%
- \pgf@y=\pgf@yb%
- \advance\pgf@x by-\pgf@xa%
- \advance\pgf@y by-\pgf@ya%
- \advance\pgf@xa by 0.555\pgf@x%
- \advance\pgf@ya by 0.555\pgf@y%
- \edef\pgfprocess@addition{\noexpand\pgfsyssoftpath@curvetosupportatoken{\the\pgf@xa}{\the\pgf@ya}}%
- \expandafter\pgfutil@g@addto@macro\expandafter\pgfprocess@segment\expandafter{\pgfprocess@addition}%
- }%
- % calculate second support:
- {%
- \pgf@x=\pgf@xb%
- \pgf@y=\pgf@yb%
- \advance\pgf@x by-\pgf@xc%
- \advance\pgf@y by-\pgf@yc%
- \advance\pgf@xc by 0.555\pgf@x%
- \advance\pgf@yc by 0.555\pgf@y%
- \edef\pgfprocess@addition{\noexpand\pgfsyssoftpath@curvetosupportbtoken{\the\pgf@xc}{\the\pgf@yc}}%
- \expandafter\pgfutil@g@addto@macro\expandafter\pgfprocess@segment\expandafter{\pgfprocess@addition}%
- }%
- % add end:
- \edef\pgfprocess@addition{\noexpand\pgfsyssoftpath@curvetotoken{\the\pgf@xc}{\the\pgf@yc}}%
- \expandafter\pgfutil@g@addto@macro\expandafter\pgfprocess@segment\expandafter{\pgfprocess@addition}%
- %
- % continue!
- %
- \pgf@xa=#2%
- \pgf@ya=#3%
- \pgfprocess@continueafterrounding%
-}
-
-\def\pgfprocess@specialroundcurveto#1#2#3#4#5#6{%
- \pgfutil@g@addto@macro\pgfprocess@segment{#1{#2}{#3}#4{#5}{#6}}% supports
- \pgf@xa=#5%
- \pgf@ya=#6%
- \pgfprocess@specialroundcope}
-
-\def\pgfprocess@specialroundclose{%
- \let\next=\pgfprocess@round%
- \ifx\pgfprocess@moveto\pgfutil@empty%
- \else%
- \ifx\pgfprocess@firstto\pgfutil@empty%
- \else%
- \expandafter\pgfprocess@@specialclosetarget\pgfprocess@firstto%
- \let\pgfprocess@continueafterrounding=\pgfprocess@cleanupafterclose%
- \edef\next{%
- \noexpand\pgfprocess@@specialround%
- \expandafter\expandafter\expandafter\noexpand\expandafter\pgfprocess@@specialclosemoveto\pgfprocess@moveto%
- }%
- \fi%
- \fi%
- \next%
-}
-
-\def\pgfprocess@@specialclosetarget#1#2{%
- \pgf@xc=#1%
- \pgf@yc=#2%
-}
-
-\def\pgfprocess@@specialclosemoveto#1#2#3{%
- \pgfsyssoftpath@linetotoken{#2}{#3}%
-}
-
-
-\def\pgfprocess@cleanupafterclose#1#2#3{%
- \edef\pgfprocess@moveto{\noexpand\pgfsyssoftpath@movetotoken{\the\pgf@xc}{\the\pgf@yc}}%
- \edef\pgf@marshal{\noexpand\pgfprocess@round\noexpand\pgfsyssoftpath@closepathtoken{\the\pgf@xc}{\the\pgf@yc}}%
- \pgf@marshal%
-}
-
-
-% Replace start and end coordinates of a path
-%
-% #1 = new start coordinate
-% #2 = new end coordinate
-%
-% Description:
-%
-% This command will replace the first and last coordinates on a path
-% by the given coordinates.
-%
-% Example:
-%
-% \pgfsyssoftpath@moveto{0}{0}
-% \pgfsyssoftpath@lineto{10}{10}
-% \pgfsyssoftpath@curveto{20}{20}{30}{10}{40}{0}
-% \pgfsyssoftpath@getcurrentpath\mypath
-% \pgfsetlinewidth{2pt}
-% \pgfusepath{stroke}
-% \pgfprocesspathextractpoints{\mypath}
-% \pgfprocesspathreplacestartandend{\mypath}
-% {\pgfpointlineatdistance{2pt}{\pgfpointfirstonpath}{\pgfpointsecondonpath}}%
-% {\pgfpointlineatdistance{2pt}{\pgfpointlastonpath}{\pgfpointsecondlastonpath}}%
-% \pgfsyssoftpath@setcurrentpath\mypath
-% \pgfsetlinewidth{1pt}
-% \color{red}
-% \pgfusepath{stroke}
-
-\def\pgfprocesspathreplacestartandend#1#2#3{%
- {%
- \let\pgf@newpath=\pgfutil@empty%
- \let\pgf@prepath=\pgfutil@empty%
- \ifx#1\pgfutil@empty%
- \else%
- \pgf@process{#3}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{#2}%
- \expandafter\pgf@replaceprocessfirst#1\pgf@stop%
- \fi%
- \expandafter\expandafter\expandafter\def
- \expandafter\expandafter\expandafter\pgf@newpath
- \expandafter\expandafter\expandafter{\expandafter\pgf@prepath\pgf@newpath}%
- \global\let#1=\pgf@newpath%
- }%
-}
-
-\def\pgf@replaceprocessfirst#1#2#3#4{%
- \def\pgf@temppath{#1{#2}{#3}}%
- \edef\pgf@newpath{\noexpand#1{\the\pgf@x}{\the\pgf@y}}%
- \ifx#4\pgf@stop%
- \let\next=\pgfutil@gobble%
- \else%
- \let\next=\pgf@replaceprocessother%
- \fi%
- \next#4%
-}
-
-\def\pgf@replaceprocessother#1{%
- \ifx#1\pgfsyssoftpath@movetotoken%
- % Arggghh! Must reset everything!
- \expandafter\expandafter\expandafter\def
- \expandafter\expandafter\expandafter\pgf@prepath
- \expandafter\expandafter\expandafter{\expandafter\pgf@prepath\pgf@temppath}%
- % Redo first.
- \let\pgf@next=\pgf@replaceprocessfirst%
- \else%
- \let\pgf@next=\pgf@@replaceprocessother%
- \fi%
- \pgf@next#1%
-}
-\def\pgf@@replaceprocessother#1#2#3#4{%
- \ifx#4\pgf@stop%
- \edef\pgf@newpathaddition{{\noexpand#1{\the\pgf@xa}{\the\pgf@ya}}}%
- \expandafter\pgfutil@g@addto@macro\expandafter\pgf@newpath\pgf@newpathaddition%
- \let\next=\pgfutil@gobble%
- \else%
- \pgfutil@g@addto@macro\pgf@temppath{#1{#2}{#3}}%
- \pgfutil@g@addto@macro\pgf@newpath{#1{#2}{#3}}%
- \let\next=\pgf@replaceprocessother%
- \fi%
- \next#4%
-}
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
deleted file mode 100644
index e7d918f5210..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
+++ /dev/null
@@ -1,224 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepathusage.code.tex,v 1.8 2007/03/09 17:49:32 tantau Exp $
-
-
-% Stroke/fill/clip/etc. the current path. Depending on the options,
-% the current path will be stroked/filled/clipped/etc. If no options
-% are given, the path is stroked. If multiple options are given, all
-% of them are performed (in a sensible order).
-%
-% #1 = action(s) to be applied to the current path. Valid actions are:
-% stroke - strokes the path. If no options are given, this is the
-% default.
-% draw - same as stroke.
-% fill - fills the path.
-% clip - clip the path.
-% discard - Discards the path. Same effect as having an empty
-% options list.
-%
-% Example:
-%
-% % Draws an edge.
-% \pgfpathmoveto{\pgfxy(0,0)}
-% \pgfpathlineto{\pgfxy(0,1)}
-% \pgfpathlineto{\pgfxy(1,0)}
-% \pgfusepath{stroke}
-
-\define@key{pgfup}{stroke}[]{\def\pgf@up@stroke{stroke}}
-\define@key{pgfup}{draw}[]{\def\pgf@up@stroke{stroke}}
-\define@key{pgfup}{fill}[]{\def\pgf@up@fill{fill}}
-\define@key{pgfup}{clip}[]{\def\pgf@up@clip{clip}}
-\define@key{pgfup}{discard}[]{}
-\define@key{pgfup}{use as bounding box}[]{\def\pgf@up@bb{\pgf@relevantforpicturesizefalse}}
-
-\def\pgfusepath#1{%
- \let\pgf@up@stroke\pgfutil@empty%
- \let\pgf@up@fill\pgfutil@empty%
- \let\pgf@up@clip\pgfutil@empty%
- \let\pgf@up@discard\pgfutil@empty%
- \let\pgf@up@bb\pgfutil@empty%
- \setkeys{pgfup}{#1}%
- \expandafter\def\expandafter\pgf@up@action\expandafter{\csname pgfsys@\pgf@up@fill\pgf@up@stroke\endcsname}%
- \ifx\pgf@up@stroke\pgfutil@empty%
- \ifx\pgf@up@fill\pgfutil@empty%
- \ifx\pgf@up@clip\pgfutil@empty%
- \let\pgf@up@action=\pgfutil@empty%
- \pgfsyssoftpath@setcurrentpath\pgfutil@empty%
- \else%
- % only clipping
- \let\pgf@up@action=\pgfsys@discardpath%
- \fi%
- \fi%
- \fi%
- \pgfprocessround{\pgfsyssoftpath@currentpath}{\pgfsyssoftpath@currentpath}% change the current path
- %
- % Check whether the path is stroked. If so, add half the line width
- % to the bounding box.
- %
- \ifpgf@relevantforpicturesize%
- \ifx\pgf@up@stroke\pgfutil@empty%
- \else%
- \ifdim\pgf@picmaxx=-16000pt\relax%
- \else%
- \pgf@x=\pgf@pathminx\advance\pgf@x by-.5\pgflinewidth%
- \ifdim\pgf@x<\pgf@picminx\global\pgf@picminx\pgf@x\fi%
- \pgf@y=\pgf@pathminy\advance\pgf@y by-.5\pgflinewidth%
- \ifdim\pgf@y<\pgf@picminy\global\pgf@picminy\pgf@y\fi%
- \pgf@x=\pgf@pathmaxx\advance\pgf@x by.5\pgflinewidth%
- \ifdim\pgf@x>\pgf@picmaxx\global\pgf@picmaxx\pgf@x\fi%
- \pgf@y=\pgf@pathmaxy\advance\pgf@y by.5\pgflinewidth%
- \ifdim\pgf@y>\pgf@picmaxy\global\pgf@picmaxy\pgf@y\fi%
- \fi%
- \fi%
- \fi%
- %
- \ifx\pgf@up@clip\pgfutil@empty%
- \ifx\pgf@up@stroke\pgfutil@empty%
- \pgfsyssoftpath@invokecurrentpath%
- \pgfsyssoftpath@getcurrentpath\pgf@last@used@path%
- \pgf@up@action%
- \else%
- \pgf@check@for@arrows%
- \ifpgf@drawarrows%
- \pgf@shorten@path@as@needed%
- \pgfsyssoftpath@invokecurrentpath%
- \pgfsyssoftpath@getcurrentpath\pgf@last@used@path%
- \pgf@up@action%
- \pgfsyssoftpath@setcurrentpath\pgfutil@empty%
- \pgf@add@arrows@as@needed%
- \else%
- \pgfsyssoftpath@invokecurrentpath%
- \pgfsyssoftpath@getcurrentpath\pgf@last@used@path%
- \pgf@up@action%
- \fi%
- \fi%
- \else%
- \pgfsyssoftpath@invokecurrentpath%
- \pgfsyssoftpath@getcurrentpath\pgf@last@used@path%
- \pgfsys@clipnext%
- \pgf@up@action%
- \pgf@relevantforpicturesizefalse%
- \fi%
- \pgf@up@bb%
- \pgfsyssoftpath@setcurrentpath\pgfutil@empty%
- \pgf@resetpathsizes%
- \ignorespaces%
-}
-
-
-% Shorten start/end of paths by a certain amount.
-%
-% #1 = amount by which paths should be shortened.
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfpointorigin}
-% \pgfpathlineto{\pgfpoint{10pt}{0pt}
-%
-% % The following has the same effect:
-% \pgfsetshortenstart{1pt}
-% \pgfpathmoveto{\pgfpointorigin}
-% \pgfpathlineto{\pgfpoint{11pt}{0pt}
-
-\def\pgfsetshortenstart#1{\pgfmathsetlength\pgf@shorten@start@additional{#1}}
-\def\pgfsetshortenend#1{\pgfmathsetlength\pgf@shorten@end@additional{#1}}
-
-\newif\ifpgf@drawarrows
-
-\def\pgf@check@for@arrows{%
- \pgf@drawarrowsfalse%
- \ifx\pgf@startarrow\pgfutil@empty\else\pgf@drawarrowstrue\fi%
- \ifx\pgf@endarrow\pgfutil@empty\else\pgf@drawarrowstrue\fi%
- \ifdim\pgf@shorten@end@additional=0pt\relax\else\pgf@drawarrowstrue\fi%
- \ifdim\pgf@shorten@start@additional=0pt\relax\else\pgf@drawarrowstrue\fi%
- \ifpgf@drawarrows%
- \pgfsyssoftpath@getcurrentpath\pgf@arrowpath%
- \ifx\pgf@arrowpath\pgfutil@empty%
- \pgf@drawarrowsfalse%
- \else%
- \pgfprocesscheckclosed{\pgf@arrowpath}{\pgf@drawarrowsfalse}%
- \fi%
- \fi%
-}
-
-\newdimen\pgf@shorten@end@additional
-\newdimen\pgf@shorten@start@additional
-
-\let\pgf@shorten@end=\pgfutil@empty
-\let\pgf@shorten@start=\pgfutil@empty
-
-\def\pgf@shorten@path@as@needed{%
- \pgfprocesspathextractpoints{\pgf@arrowpath}%
- \let\pgf@arrow@next=\pgf@shorten@now%
- \ifx\pgf@shorten@start\pgfutil@empty%
- \ifx\pgf@shorten@end\pgfutil@empty%
- \ifdim\pgf@shorten@end@additional=0pt\relax%
- \ifdim\pgf@shorten@start@additional=0pt\relax%
- \let\pgf@arrow@next=\relax%
- \fi%
- \fi%
- \fi%
- \fi%
- \pgf@arrow@next%
-}
-
-\def\pgf@shorten@now{%
- {%
- \pgf@x=0pt%
- \pgf@shorten@start%
- \advance\pgf@x by\pgf@shorten@start@additional%
- \pgf@xc=\pgf@x%
- \pgfpointlineatdistance{\pgf@xc}{\pgfpointfirstonpath}{\pgfpointsecondonpath}%
- \global\pgf@xb=\pgf@x%
- \global\pgf@yb=\pgf@y%
- \pgf@process{\pgfpointsecondonpath}%
- \global\advance\pgf@x by\pgf@xa%
- \global\advance\pgf@y by\pgf@ya%
- }%
- \edef\pgfpointfirstonpath{\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}%
- \edef\pgfpointsecondonpath{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
- {%
- \pgf@x=0pt%
- \pgf@shorten@end%
- \advance\pgf@x by\pgf@shorten@end@additional%
- \pgf@xc=\pgf@x%
- \pgfpointlineatdistance{\pgf@xc}{\pgfpointlastonpath}{\pgfpointsecondlastonpath}%
- \global\pgf@xb=\pgf@x%
- \global\pgf@yb=\pgf@y%
- \pgf@process{\pgfpointsecondlastonpath}%
- \global\advance\pgf@x by\pgf@xa%
- \global\advance\pgf@y by\pgf@ya%
- }%
- \edef\pgfpointlastonpath{\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}%
- \edef\pgfpointsecondlastonpath{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
- \pgfprocesspathreplacestartandend{\pgf@arrowpath}{\pgfpointfirstonpath}{\pgfpointlastonpath}%
- \pgfsyssoftpath@setcurrentpath\pgf@arrowpath%
-}
-
-\def\pgf@add@arrows@as@needed{%
- \ifx\pgf@startarrow\pgfutil@empty%
- \else%
- \pgflowlevelobj%
- {\pgftransformarrow{\pgfpointsecondonpath}{\pgfpointfirstonpath}}
- {\pgf@startarrow}%
- \fi%
- \ifx\pgf@endarrow\pgfutil@empty%
- \else%
- \pgflowlevelobj%
- {\pgftransformarrow{\pgfpointsecondlastonpath}{\pgfpointlastonpath}}
- {\pgf@endarrow}%
- \fi%
-}
-
-\let\pgf@startarrow=\pgfutil@empty
-\let\pgf@endarrow=\pgfutil@empty
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbasepatterns.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
index 199d38e3b7b..a3f6eb12502 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbasepatterns.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfbasepatterns.code.tex,v 1.10 2007/02/05 11:23:22 tantau Exp $
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepatterns.code.tex,v 1.1 2008/01/15 10:27:34 tantau Exp $
% Creates a new uncolored pattern
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
deleted file mode 100644
index 0edcd6d7b2c..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
+++ /dev/null
@@ -1,999 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepoints.code.tex,v 1.9 2007/04/19 11:57:08 tantau Exp $
-
-\newdimen\pgf@picminx
-\newdimen\pgf@picmaxx
-\newdimen\pgf@picminy
-\newdimen\pgf@picmaxy
-
-\newdimen\pgf@pathminx
-\newdimen\pgf@pathmaxx
-\newdimen\pgf@pathminy
-\newdimen\pgf@pathmaxy
-
-\newif\ifpgf@relevantforpicturesize
-
-\def\pgf@process#1{{#1\global\pgf@x=\pgf@x\global\pgf@y=\pgf@y}}
-
-
-
-
-% Return a point
-%
-% #1 = x-coordinate of the point
-% #2 = y-coordinate of the point
-%
-% x = #1
-% y = #2
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfpoint{2pt+3cm}{3cm}}
-
-\def\pgfpoint#1#2{%
- \pgfmathsetlength\pgf@x{#1}%
- \pgfmathsetlength\pgf@y{#2}\ignorespaces}
-
-
-% Quickly a point
-%
-% #1 = x-coordinate of the point (no calculations done)
-% #2 = y-coordinate of the point (no calculations done)
-%
-% x = #1
-% y = #2
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfqpoint{2pt}{3cm}}
-
-\def\pgfqpoint#1#2{\pgf@x=#1\pgf@y=#2}
-
-
-
-% Return the origin.
-%
-% x = 0
-% y = 0
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfpointorigin}
-
-\def\pgfpointorigin{\pgf@x=0pt\pgf@y=\pgf@x\ignorespaces}
-
-
-
-% Return a transformed point
-%
-% #1 = a point
-%
-% Description:
-%
-% This command applies pgf's current transformation matrix to the
-% given point. Normally, this is done automatically by commands like
-% lineto or moveto, but sometimes you may wish to access a transformed
-% point yourself. For example, this command is useful for a low level
-% coordinate system shift:
-%
-% Example:
-%
-% \begin{pgflowleveltransformshiftscope}{\pgfpointtransformed{\pgfpointorigin}}
-% \pgfbox[center,center]{Hi!}
-% \end{pgflowleveltransformshiftscope}
-
-\def\pgfpointtransformed#1{%
- \pgf@process{%
- #1%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
- }%
-}
-
-
-% Return the difference vector of two points.
-%
-% #1 = start of vector
-% #2 = end of vector
-%
-% x = x-component of difference
-% y = y-component of difference
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfpointdiff{\pgfpointxy{1}{1}}{\pgfpointxy{2}{3}}}
-
-\def\pgfpointdiff#1#2{%
- \pgf@process{#1}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{#2}%
- \advance\pgf@x by-\pgf@xa\relax%
- \advance\pgf@y by-\pgf@ya\relax\ignorespaces}
-
-% Add two vectors.
-%
-% #1 = first vector
-% #2 = second vector
-%
-% x = x-component of addition
-% y = y-component of addition
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfpointadd{\pgfpointxy{0}{1}}{\pgfpointxy{2}{3}}}
-
-\def\pgfpointadd#1#2{%
- \pgf@process{#1}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{#2}%
- \advance\pgf@x by\pgf@xa%
- \advance\pgf@y by\pgf@ya}
-
-
-
-% Multiply a vector by a factor.
-%
-% #1 = factor
-% #2 = vector
-%
-% Example:
-%
-% \pgfpointscale{2}{\pgfpointxy{0}{1}}
-
-\def\pgfpointscale#1#2{%
- \pgf@process{#2}%
- \pgf@x=#1\pgf@x%
- \pgf@y=#1\pgf@y%
-}
-
-
-% The intersection of two lines
-%
-% #1 = point on first line
-% #2 = another point on first line
-% #3 = point on second line
-% #4 = another point on second line
-%
-% Returns the intersection of the two lines. If there is no
-% intersection or if the points #1 and #2 or the points #3 and #4 are
-% identical, the behaviour is not specified.
-%
-% Example:
-%
-% \pgfpointintersectionoflines{\pgfpointxy{0}{1}}{\pgfpointxy{1}{0}}{\pgfpointxy{2}{2}}{\pgfpointxy{3}{4}}
-
-\def\pgfpointintersectionoflines#1#2#3#4{%
- {
- %
- % Compute orthogonal vector to #1--#2
- %
- \pgf@process{#2}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{#1}%
- \advance\pgf@xa by-\pgf@x%
- \advance\pgf@ya by-\pgf@y%
- \pgf@ya=-\pgf@ya%
- % Normalise a bit
- \c@pgf@counta=\pgf@xa%
- \ifnum\c@pgf@counta<0\relax%
- \c@pgf@counta=-\c@pgf@counta\relax%
- \fi%
- \c@pgf@countb=\pgf@ya%
- \ifnum\c@pgf@countb<0\relax%
- \c@pgf@countb=-\c@pgf@countb\relax%
- \fi%
- \advance\c@pgf@counta by\c@pgf@countb\relax%
- \divide\c@pgf@counta by 65536\relax%
- \ifnum\c@pgf@counta>0\relax%
- \divide\pgf@xa by\c@pgf@counta\relax%
- \divide\pgf@ya by\c@pgf@counta\relax%
- \fi%
- %
- % Compute projection
- %
- \pgf@xc=\pgf@sys@tonumber{\pgf@ya}\pgf@x%
- \advance\pgf@xc by\pgf@sys@tonumber{\pgf@xa}\pgf@y%
- %
- % The orthogonal vector is (\pgf@ya,\pgf@xa)
- %
- %
- % Compute orthogonal vector to #3--#4
- %
- \pgf@process{#4}%
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- \pgf@process{#3}%
- \advance\pgf@xb by-\pgf@x%
- \advance\pgf@yb by-\pgf@y%
- \pgf@yb=-\pgf@yb%
- % Normalise a bit
- \c@pgf@counta=\pgf@xb%
- \ifnum\c@pgf@counta<0\relax%
- \c@pgf@counta=-\c@pgf@counta\relax%
- \fi%
- \c@pgf@countb=\pgf@yb%
- \ifnum\c@pgf@countb<0\relax%
- \c@pgf@countb=-\c@pgf@countb\relax%
- \fi%
- \advance\c@pgf@counta by\c@pgf@countb\relax%
- \divide\c@pgf@counta by 65536\relax%
- \ifnum\c@pgf@counta>0\relax%
- \divide\pgf@xb by\c@pgf@counta\relax%
- \divide\pgf@yb by\c@pgf@counta\relax%
- \fi%
- %
- % Compute projection
- %
- \pgf@yc=\pgf@sys@tonumber{\pgf@yb}\pgf@x%
- \advance\pgf@yc by\pgf@sys@tonumber{\pgf@xb}\pgf@y%
- %
- % The orthogonal vector is (\pgf@yb,\pgf@xb)
- %
- % Setup transformation matrx (this is just to use the matrix
- % inversion)
- %
- \pgfsettransform{{\pgf@sys@tonumber\pgf@ya}{\pgf@sys@tonumber\pgf@yb}{\pgf@sys@tonumber\pgf@xa}{\pgf@sys@tonumber\pgf@xb}{0pt}{0pt}}%
- \pgftransforminvert%
- \pgf@process{\pgfpointtransformed{\pgfpoint{\pgf@xc}{\pgf@yc}}}%
- }%
-}
-
-
-% Returns point on a line from #2 to #3 at time #1.
-%
-% #1 = a time, where 0 is the start and 1 is the end
-% #2 = start point
-% #3 = end point
-%
-% x = x-component of #1*start + (1-#1)*end
-% y = y-component of #1*start + (1-#1)*end
-%
-% Example:
-%
-% % Middle of (1,1) and (2,3)
-% \pgfpathmoveto{\pgfpointlineattime{0.5}{\pgfpointxy{0}{1}}{\pgfpointxy{2}{3}}}
-
-\def\pgfpointlineattime#1#2#3{%
- \pgf@process{#3}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{#2}%
- \advance\pgf@xa by-\pgf@x\relax%
- \advance\pgf@ya by-\pgf@y\relax%
- \advance\pgf@x by #1\pgf@xa\relax%
- \advance\pgf@y by #1\pgf@ya\relax%
- \ignorespaces}
-
-
-% Move point #2 #1 many units in the direction of #3.
-%
-% #1 = a distance
-% #2 = start point
-% #3 = end point
-%
-% x = x-component of start + #1*(normalise(end-start))
-% y = y-component of start + #1*(normalise(end-start))
-% xa = #1*(normalise(end-start))
-% ya = #1*(normalise(end-start))
-%
-% Example:
-%
-%
-% \pgfpathmoveto{\pgfpointlineatdistance{2pt}{\pgfpointxy{0}{1}}{\pgfpointxy{2}{3}}}
-% \pgfpathlineto{\pgfpointlineatdistance{3pt}{\pgfpointxy{2}{3}}{\pgfpointxy{0}{1}}}
-
-\def\pgfpointlineatdistance#1#2#3{%
- \pgf@process{#2}%
- \pgf@xb=\pgf@x\relax% xb/yb = start point
- \pgf@yb=\pgf@y\relax%
- \pgf@process{#3}%
- \advance\pgf@x by-\pgf@xb\relax%
- \advance\pgf@y by-\pgf@yb\relax%
- \pgf@process{\pgfpointnormalised{}}% x/y = normalised vector
- \pgfmathsetlength\pgf@xa{#1}%
- \pgf@ya=\pgf@xa\relax%
- \pgf@xa=\pgf@sys@tonumber{\pgf@x}\pgf@xa%
- \pgf@ya=\pgf@sys@tonumber{\pgf@y}\pgf@ya%
- \pgf@x=\pgf@xb\relax%
- \pgf@y=\pgf@yb\relax%
- \advance\pgf@x by\pgf@xa\relax%
- \advance\pgf@y by\pgf@ya\relax%
- \ignorespaces}
-
-
-% Returns point on a curve from #2 to #5 with controls #3 and #4 at time #1.
-%
-% #1 = a time
-% #2 = start point
-% #3 = first control point
-% #4 = second control point
-% #5 = end point
-%
-% x = x-component of place on the curve at time t
-% y = y-component of place on the curve at time t
-%
-% Additionally, (\pgf@xa,\pgf@ya) and (\pgf@xb,\pgf@yb) will be on a
-% tangent to the point on the curve (this can be useful for computing
-% a label rotation).
-%
-% Example:
-%
-% % Middle of (1,1) and (2,3)
-% \pgfpathmoveto{\pgfpointcurveattime{0.5}{\pgfpointxy{0}{1}}{\pgfpointxy{1}{1}}{\pgfpointxy{1}{1}}{\pgfpointxy{2}{3}}}
-
-\def\pgfpointcurveattime#1#2#3#4#5{%
- \pgfmathparse{#1}%
- \let\pgf@time@s=\pgfmathresult%
- \pgf@x=\pgfmathresult pt%
- \pgf@x=-\pgf@x%
- \advance\pgf@x by 1pt%
- \edef\pgf@time@t{\pgf@sys@tonumber{\pgf@x}}%
- \pgf@process{#5}%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \pgf@process{#4}%
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- \pgf@process{#3}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{#2}%
- % First iteration:
- \pgf@x=\pgf@time@t\pgf@x\advance\pgf@x by\pgf@time@s\pgf@xa%
- \pgf@y=\pgf@time@t\pgf@y\advance\pgf@y by\pgf@time@s\pgf@ya%
- \pgf@xa=\pgf@time@t\pgf@xa\advance\pgf@xa by\pgf@time@s\pgf@xb%
- \pgf@ya=\pgf@time@t\pgf@ya\advance\pgf@ya by\pgf@time@s\pgf@yb%
- \pgf@xb=\pgf@time@t\pgf@xb\advance\pgf@xb by\pgf@time@s\pgf@xc%
- \pgf@yb=\pgf@time@t\pgf@yb\advance\pgf@yb by\pgf@time@s\pgf@yc%
- % Second iteration:
- \pgf@x=\pgf@time@t\pgf@x\advance\pgf@x by\pgf@time@s\pgf@xa%
- \pgf@y=\pgf@time@t\pgf@y\advance\pgf@y by\pgf@time@s\pgf@ya%
- \pgf@xa=\pgf@time@t\pgf@xa\advance\pgf@xa by\pgf@time@s\pgf@xb%
- \pgf@ya=\pgf@time@t\pgf@ya\advance\pgf@ya by\pgf@time@s\pgf@yb%
- % Save x/y
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- % Third iteration:
- \pgf@x=\pgf@time@t\pgf@x\advance\pgf@x by\pgf@time@s\pgf@xa%
- \pgf@y=\pgf@time@t\pgf@y\advance\pgf@y by\pgf@time@s\pgf@ya%
-}
-
-
-
-
-
-
-% Internal registers
-\newdimen\pgf@xx
-\newdimen\pgf@xy
-\newdimen\pgf@yx
-\newdimen\pgf@yy
-\newdimen\pgf@zx
-\newdimen\pgf@zy
-
-
-
-% A polar coordinate
-%
-% #1 = a degree
-% #2 = a radius -- either a dimension or two dimensions separated by
-% " and ".
-%
-% x = (first dimension in #2) * cos(#1)
-% y = (second dimension in #2) * sin(#2)
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfpointpolar{30}{1cm}}
-% \pgfpathlineto{\pgfpointpolar{30}{1cm and 2cm}}
-
-\def\pgfpointpolar#1#2{%
- \pgfutil@in@{and }{#2}%
- \ifpgfutil@in@%
- \pgf@polar@#2\@@%
- \else%
- \pgf@polar@#2 and #2\@@%
- \fi%
- \pgfmathparse{#1}%
- \let\pgfpoint@angle=\pgfmathresult%
- \pgfmathcos@{\pgfpoint@angle}%
- \pgf@x=\pgfmathresult\pgf@x%
- \pgfmathsin@{\pgfpoint@angle}%
- \pgf@y=\pgfmathresult\pgf@y%
-}
-
-\def\pgf@polar@#1and #2\@@{%
- \pgfmathsetlength{\pgf@y}{#2}%
- \pgfmathsetlength{\pgf@x}{#1}%
-}
-
-% Quick version of the polar coordinate method
-
-\def\pgfqpointpolar#1#2{%
- \pgf@x=#2%
- \pgf@y=\pgf@x%
- \pgfmathcos@{#1}%
- \pgf@x=\pgfmathresult\pgf@x%
- \pgfmathsin@{#1}%
- \pgf@y=\pgfmathresult\pgf@y\relax%
-}
-
-
-
-
-% A polar coordinate in the xy plane.
-%
-% #1 = a degree
-% #2 = a radius given as a number or two radi
-%
-% result = (first dim in #2) * x-vector * cos(#1) +
-% (second dim in #2) * y-vector * sin(#1)
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfpointpolarxy{30}{2}}
-
-\def\pgfpointpolarxy#1#2{%
- \pgfutil@in@{and }{#2}%
- \ifpgfutil@in@%
- \pgf@polarxy@#2\@@%
- \else%
- \pgf@polarxy@#2and #2\@@%
- \fi%
- \pgfmathparse{#1}%
- \let\pgfpoint@angle=\pgfmathresult%
- \pgfmathcos@{\pgfpoint@angle}%
- \pgf@xa=\pgfmathresult\pgf@xa%
- \pgfmathsin@{\pgfpoint@angle}%
- \pgf@ya=\pgfmathresult\pgf@ya%
- \pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@xx%
- \advance\pgf@x by \pgf@sys@tonumber{\pgf@ya}\pgf@yx%
- \pgf@y=\pgf@sys@tonumber{\pgf@xa}\pgf@xy%
- \advance\pgf@y by \pgf@sys@tonumber{\pgf@ya}\pgf@yy}
-
-\def\pgf@polarxy@#1and #2\@@{%
- \pgfmathsetlength{\pgf@xa}{#1}%
- \pgfmathsetlength{\pgf@ya}{#2}%
-}
-
-
-
-% A cylindrical coordinate.
-%
-% #1 = a degree
-% #2 = a radius given as a number
-% #3 = a height given as a number
-%
-% result = #2*(x-vector * cos(#1) + y-vector * sin(#1)) + #3*z-vector
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfpointcylindrical{30}{2}{1}}
-
-\def\pgfpointcylindrical#1#2#3{%
- \pgfpointpolarxy{#1}{#2}%
- \pgfmathparse{#3}%
- \advance\pgf@x by \pgfmathresult\pgf@zx%
- \advance\pgf@y by \pgfmathresult\pgf@zy}
-
-
-% A spherical coordinate.
-%
-% #1 = a longitude
-% #2 = a latitude
-% #3 = a radius
-%
-% result = #3*(cos(#2)*(x-vector * cos(#1) + y-vector * sin(#1)) + sin(#2)*z-vector)
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfpointspherical{30}{30}{2}}
-
-\def\pgfpointspherical#1#2#3{%
- \pgfmathparse{#1}%
- \let\pgfpoint@angle=\pgfmathresult%
- \pgfmathsin@{\pgfpoint@angle}%
- \pgf@xb=\pgfmathresult\pgf@xx%
- \pgf@yb=\pgfmathresult\pgf@xy%
- \pgfmathcos@{\pgfpoint@angle}%
- \advance\pgf@xb by \pgfmathresult\pgf@yx%
- \advance\pgf@yb by \pgfmathresult\pgf@yy%
- %
- \pgfmathparse{#2}%
- \let\pgfpoint@angle=\pgfmathresult%
- \pgfmathcos@{\pgfpoint@angle}%
- \pgf@xc=\pgfmathresult\pgf@xb%
- \pgf@yc=\pgfmathresult\pgf@yb%
- \pgfmathsin@{\pgfpoint@angle}%
- \advance\pgf@xc by \pgfmathresult\pgf@zx%
- \advance\pgf@yc by \pgfmathresult\pgf@zy%
- \pgfmathparse{#3}%
- \pgf@x=\pgfmathresult\pgf@xc%
- \pgf@y=\pgfmathresult\pgf@yc\relax%
-}
-
-
-% Store the vector #1 * x-vec + #2 * y-vec
-%
-% #1 = a factor for the x-vector
-% #2 = a factor fot the y-vector
-%
-% x = x-component of result vector
-% y = y-component of result vector
-%
-% Description:
-%
-% This command can be used to create a new coordinate system
-% without using the rotate/translate/scale commands. This
-% may be useful, if you do not want arrows and line width to
-% be scaled/transformed together with the coordinate system.
-%
-% Example:
-%
-% % Create a slanted rectangle
-%
-% \pgfsetxvec{\pgfpoint{1cm}{1cm}}
-% \pgfsetyvec{\pgfpoint{0cm}{1cm}}
-%
-% \pgfpathmoveto{\pgfpointxy{0}{0}}
-% \pgfpathlineto{\pgfpointxy{1}{0}}
-% \pgfpathlineto{\pgfpointxy{1}{1}}
-% \pgfpathlineto{\pgfpointxy{0}{1}}
-% \pgfclosestroke
-
-\def\pgfpointxy#1#2{%
- \pgfmathparse{#1}%
- \let\pgftemp@x=\pgfmathresult%
- \pgfmathparse{#2}%
- \let\pgftemp@y=\pgfmathresult%
- \pgf@x=\pgftemp@x\pgf@xx%
- \advance\pgf@x by \pgftemp@y\pgf@yx%
- \pgf@y=\pgftemp@x\pgf@xy%
- \advance\pgf@y by \pgftemp@y\pgf@yy}
-
-
-% Store the vector #1 * x-vec + #2 * y-vec + #3 * z-vec
-%
-% #1 = a factor for the x-vector
-% #2 = a factor fot the y-vector
-% #3 = a factor fot the z-vector
-%
-% x = x-component of result vector
-% y = y-component of result vector
-%
-%
-% Description:
-%
-% This command allows you to use a 3d coordinate system.
-%
-%
-% Example:
-%
-% % Draw a cubus
-%
-% \pgfline{\pgfpointxyz{0}{0}{0}}{\pgfpointxyz{0}{0}{1}}
-% \pgfline{\pgfpointxyz{0}{1}{0}}{\pgfpointxyz{0}{1}{1}}
-% \pgfline{\pgfpointxyz{1}{0}{0}}{\pgfpointxyz{1}{0}{1}}
-% \pgfline{\pgfpointxyz{1}{1}{0}}{\pgfpointxyz{1}{1}{1}}
-% \pgfline{\pgfpointxyz{0}{0}{0}}{\pgfpointxyz{0}{1}{0}}
-% \pgfline{\pgfpointxyz{0}{0}{1}}{\pgfpointxyz{0}{1}{1}}
-% \pgfline{\pgfpointxyz{1}{0}{0}}{\pgfpointxyz{1}{1}{0}}
-% \pgfline{\pgfpointxyz{1}{0}{1}}{\pgfpointxyz{1}{1}{1}}
-% \pgfline{\pgfpointxyz{0}{0}{0}}{\pgfpointxyz{1}{0}{0}}
-% \pgfline{\pgfpointxyz{0}{0}{1}}{\pgfpointxyz{1}{0}{1}}
-% \pgfline{\pgfpointxyz{0}{1}{0}}{\pgfpointxyz{1}{1}{0}}
-% \pgfline{\pgfpointxyz{0}{1}{1}}{\pgfpointxyz{1}{1}{1}}
-
-\def\pgfpointxyz#1#2#3{%
- \pgfmathparse{#1}%
- \let\pgftemp@x=\pgfmathresult%
- \pgfmathparse{#2}%
- \let\pgftemp@y=\pgfmathresult%
- \pgfmathparse{#3}%
- \let\pgftemp@z=\pgfmathresult%
- \pgf@x=\pgftemp@x\pgf@xx%
- \advance\pgf@x by \pgftemp@y\pgf@yx%
- \advance\pgf@x by \pgftemp@z\pgf@zx%
- \pgf@y=\pgftemp@x\pgf@xy%
- \advance\pgf@y by \pgftemp@y\pgf@yy%
- \advance\pgf@y by \pgftemp@z\pgf@zy}
-
-
-
-
-% Set the x-vector
-%
-% #1 = a point the is the new x-vector
-%
-% Example:
-%
-% \pgfsetxvec{\pgfpoint{1cm}{0cm}}
-
-\def\pgfsetxvec#1{%
- \pgf@process{#1}%
- \pgf@xx=\pgf@x%
- \pgf@xy=\pgf@y%
- \ignorespaces}
-
-
-% Set the y-vector
-%
-% #1 = a point the is the new y-vector
-%
-% Example:
-%
-% \pgfsetyvec{\pgfpoint{0cm}{1cm}}
-
-\def\pgfsetyvec#1{%
- \pgf@process{#1}%
- \pgf@yx=\pgf@x%
- \pgf@yy=\pgf@y%
- \ignorespaces}
-
-
-% Set the z-vector
-%
-% #1 = a point the is the new z-vector
-%
-% Example:
-%
-% \pgfsetzvec{\pgfpoint{-0.385cm}{-0.385cm}}
-
-\def\pgfsetzvec#1{%
- \pgf@process{#1}%
- \pgf@zx=\pgf@x%
- \pgf@zy=\pgf@y%
- \ignorespaces}
-
-
-
-% Default values
-\pgfsetxvec{\pgfpoint{1cm}{0cm}}
-\pgfsetyvec{\pgfpoint{0cm}{1cm}}
-\pgfsetzvec{\pgfpoint{-0.385cm}{-0.385cm}}
-
-
-
-
-% Normalise a point.
-%
-% #1 = point with coordinates (a,b)
-%
-% x = a/\sqrt(a*a+b*b)
-% y = b/\sqrt(a*a+b*b)
-%
-% Example:
-%
-% \pgfpointnormalised{\pgfpointxy{2}{1}}
-
-\def\pgfpointnormalised#1{%
- \pgf@process{#1}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \ifdim\pgf@x<0pt\relax% move into first quadrant
- \pgf@x=-\pgf@x%
- \fi%
- \ifdim\pgf@y<0pt\relax%
- \pgf@y=-\pgf@y%
- \fi%
- \ifdim\pgf@x>\pgf@y% x > y
- % make point small
- \c@pgf@counta=\pgf@x%
- \divide\c@pgf@counta by 65536\relax%
- \ifnum\c@pgf@counta=0\relax%
- \c@pgf@counta=1\relax%
- \fi%
- \divide\pgf@x by\c@pgf@counta%
- \divide\pgf@y by\c@pgf@counta%
- \divide\pgf@xa by\c@pgf@counta%
- \divide\pgf@ya by\c@pgf@counta%
- % ok.
- \pgf@x=.125\pgf@x%
- \pgf@y=.125\pgf@y%
- \c@pgf@counta=\pgf@x%
- \c@pgf@countb=\pgf@y%
- \multiply\c@pgf@countb by 100%
- \ifnum\c@pgf@counta<64\relax%
- \pgf@x=1pt\relax%
- \pgf@y=0pt\relax%
- \else%
- \divide\c@pgf@countb by \c@pgf@counta%
- \pgf@x=\csname pgf@cosfrac\the\c@pgf@countb\endcsname pt%
- \pgf@xc=8192pt%
- \divide\pgf@xc by\c@pgf@counta%
- \pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@ya%
- \pgf@y=\pgf@sys@tonumber{\pgf@x}\pgf@y%
- \fi%
- \ifdim\pgf@xa<0pt%
- \pgf@x=-\pgf@x%
- \fi%
- \else% x <= y
- % make point small
- \c@pgf@counta=\pgf@y%
- \divide\c@pgf@counta by 65536\relax%
- \ifnum\c@pgf@counta=0\relax%
- \c@pgf@counta=1\relax%
- \fi%
- \divide\pgf@x by\c@pgf@counta%
- \divide\pgf@y by\c@pgf@counta%
- \divide\pgf@xa by\c@pgf@counta%
- \divide\pgf@ya by\c@pgf@counta%
- % ok.
- \pgf@x=.125\pgf@x%
- \pgf@y=.125\pgf@y%
- \c@pgf@counta=\pgf@y%
- \c@pgf@countb=\pgf@x%
- \multiply\c@pgf@countb by 100%
- \ifnum\c@pgf@counta<64\relax%
- \pgf@y=1pt\relax%
- \pgf@x=0pt\relax%
- \else%
- \divide\c@pgf@countb by \c@pgf@counta%
- \pgf@y=\csname pgf@cosfrac\the\c@pgf@countb\endcsname pt%
- \pgf@xc=8192pt%
- \divide\pgf@xc by\c@pgf@counta%
- \pgf@x=\pgf@sys@tonumber{\pgf@xc}\pgf@xa%
- \pgf@x=\pgf@sys@tonumber{\pgf@y}\pgf@x%
- \fi%
- \ifdim\pgf@ya<0pt%
- \pgf@y=-\pgf@y%
- \fi%
- \fi\ignorespaces%
-}
-
-
-
-
-
-% A point on a rectangle in a certain direction.
-%
-% #1 = a point pointing in some direction (length should be about 1pt,
-% but need not be exact)
-% #2 = upper right corner of a rectangle centered at the origin
-%
-% Returns the intersection of a line starting at the origin going in
-% the given direction and the rectangle's border.
-%
-% Example:
-%
-% \pgfpointborderrectangle{\pgfpointnormalised{\pgfpointxy{2}{1}}
-% {\pgfpoint{1cm}{2cm}}
-
-\def\pgfpointborderrectangle#1#2{%
- \pgf@process{#2}%
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- \pgf@process{#1}%
- % Ok, let's find out about the direction:
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \ifnum\pgf@xa<0\relax% move into first quadrant
- \pgf@x=-\pgf@x%
- \fi%
- \ifnum\pgf@ya<0\relax%
- \pgf@y=-\pgf@y%
- \fi%
- \pgf@xc=.125\pgf@x%
- \pgf@yc=.125\pgf@y%
- \c@pgf@counta=\pgf@xc%
- \c@pgf@countb=\pgf@yc%
- \ifnum\c@pgf@countb<\c@pgf@counta%
- \ifnum\c@pgf@counta<255\relax%
- \pgf@y=\pgf@yb\relax%
- \pgf@x=0pt\relax%
- \else%
- \pgf@xc=8192pt%
- \divide\pgf@xc by\c@pgf@counta% \pgf@xc = 1/\pgf@x
- \pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@y%
- \pgf@y=\pgf@sys@tonumber{\pgf@xb}\pgf@y%
- \ifnum\pgf@y<\pgf@yb%
- \pgf@x=\pgf@xb%
- \else% rats, calculate intersection on upper side
- \ifnum\c@pgf@countb<255\relax%
- \pgf@x=\pgf@xb\relax%
- \pgf@y=0pt\relax%
- \else%
- \pgf@yc=8192pt%
- \divide\pgf@yc by\c@pgf@countb% \pgf@xc = 1/\pgf@x
- \pgf@x=\pgf@sys@tonumber{\pgf@yc}\pgf@x%
- \pgf@x=\pgf@sys@tonumber{\pgf@yb}\pgf@x%
- \pgf@y=\pgf@yb%
- \fi%
- \fi%
- \fi%
- \else%
- \ifnum\c@pgf@countb<255\relax%
- \pgf@x=\pgf@xb\relax%
- \pgf@y=0pt\relax%
- \else%
- \pgf@yc=8192pt%
- \divide\pgf@yc by\c@pgf@countb% \pgf@xc = 1/\pgf@x
- \pgf@x=\pgf@sys@tonumber{\pgf@yc}\pgf@x%
- \pgf@x=\pgf@sys@tonumber{\pgf@yb}\pgf@x%
- \ifnum\pgf@x<\pgf@xb%
- \pgf@y=\pgf@yb%
- \else%
- \ifnum\c@pgf@counta<255\relax%
- \pgf@y=\pgf@yb\relax%
- \pgf@x=0pt\relax%
- \else%
- \pgf@xc=8192pt%
- \divide\pgf@xc by\c@pgf@counta% \pgf@xc = 1/\pgf@x
- \pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@y%
- \pgf@y=\pgf@sys@tonumber{\pgf@xb}\pgf@y%
- \pgf@x=\pgf@xb%
- \fi%
- \fi%
- \fi%
- \fi%
- \ifnum\pgf@xa<0\relax\pgf@x=-\pgf@x\fi%
- \ifnum\pgf@ya<0\relax\pgf@y=-\pgf@y\fi%
-}
-
-
-
-
-% An approximation to a point on an ellipse in a certain
-% direction. Will be exact only if the ellipse is a circle.
-%
-% #1 = a point pointing in some direction
-% #2 = upper right corner of a bounding box for the ellipse
-%
-% Returns the intersection of a line starting at the origin going in
-% the given direction and the ellipses border.
-%
-% Example:
-%
-% \pgfpointborderellipse{\pgfpointnormalised{\pgfpointxy{2}{1}}
-% {\pgfpoint{1cm}{2cm}}
-
-\def\pgfpointborderellipse#1#2{%
- \pgf@process{#2}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \ifdim\pgf@xa=\pgf@ya% circle. that's easy!
- \pgf@process{\pgfpointnormalised{#1}}%
- \pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@x%
- \pgf@y=\pgf@sys@tonumber{\pgf@xa}\pgf@y%
- \else%
- \ifdim\pgf@xa<\pgf@ya%
- % Ok, first, let's compute x/y:
- \c@pgf@countb=\pgf@ya%
- \divide\c@pgf@countb by65536\relax%
- \divide\pgf@x by\c@pgf@countb%
- \divide\pgf@y by\c@pgf@countb%
- \pgf@xc=\pgf@x%
- \pgf@yc=8192pt%
- \pgf@y=.125\pgf@y%
- \c@pgf@countb=\pgf@y%
- \divide\pgf@yc by\c@pgf@countb%
- \pgf@process{#1}%
- \pgf@y=\pgf@sys@tonumber{\pgf@yc}\pgf@y%
- \pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@y%
- \pgf@process{\pgfpointnormalised{}}%
- \pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@x%
- \pgf@y=\pgf@sys@tonumber{\pgf@ya}\pgf@y%
- \else%
- % Ok, now let's compute y/x:
- \c@pgf@countb=\pgf@xa%
- \divide\c@pgf@countb by65536\relax%
- \divide\pgf@x by\c@pgf@countb%
- \divide\pgf@y by\c@pgf@countb%
- \pgf@yc=\pgf@y%
- \pgf@xc=8192pt%
- \pgf@x=.125\pgf@x%
- \c@pgf@countb=\pgf@x%
- \divide\pgf@xc by\c@pgf@countb%
- \pgf@process{#1}%
- \pgf@x=\pgf@sys@tonumber{\pgf@yc}\pgf@x%
- \pgf@x=\pgf@sys@tonumber{\pgf@xc}\pgf@x%
- \pgf@process{\pgfpointnormalised{}}%
- \pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@x%
- \pgf@y=\pgf@sys@tonumber{\pgf@ya}\pgf@y%
- \fi%
- \fi%
-}
-
-
-
-
-
-% Extract the x-coordinate of a point to a dimensions
-%
-% #1 = a TeX dimension
-% #2 = a point
-%
-% Example:
-%
-% \newdimen\mydim
-% \pgfextractx{\mydim}{\pgfpoint{2cm}{4pt}}
-% % \mydim is now 2cm
-
-\def\pgfextractx#1#2{%
- \pgf@process{#2}%
- #1=\pgf@x\relax}
-
-
-% Extract the y-coordinate of a point to a dimensions
-%
-% #1 = a TeX dimension
-% #2 = a point
-%
-% Example:
-%
-% \newdimen\mydim
-% \pgfextracty{\mydim}{\pgfpoint{2cm}{4pt}}
-% % \mydim is now 4pt
-
-\def\pgfextracty#1#2{%
- \pgf@process{#2}%
- #1=\pgf@y\relax}
-
-
-
-\def\pgf@def#1#2#3{\expandafter\def\csname pgf@#1#2\endcsname{#3}}
-\pgf@def{cosfrac}{0}{1}
-\pgf@def{cosfrac}{1}{0.99995} \pgf@def{cosfrac}{2}{0.9998}
-\pgf@def{cosfrac}{3}{0.99955} \pgf@def{cosfrac}{4}{0.999201}
-\pgf@def{cosfrac}{5}{0.998752} \pgf@def{cosfrac}{6}{0.998205}
-\pgf@def{cosfrac}{7}{0.997559} \pgf@def{cosfrac}{8}{0.996815}
-\pgf@def{cosfrac}{9}{0.995974} \pgf@def{cosfrac}{10}{0.995037}
-\pgf@def{cosfrac}{11}{0.994004} \pgf@def{cosfrac}{12}{0.992877}
-\pgf@def{cosfrac}{13}{0.991656} \pgf@def{cosfrac}{14}{0.990342}
-\pgf@def{cosfrac}{15}{0.988936} \pgf@def{cosfrac}{16}{0.987441}
-\pgf@def{cosfrac}{17}{0.985856} \pgf@def{cosfrac}{18}{0.984183}
-\pgf@def{cosfrac}{19}{0.982424} \pgf@def{cosfrac}{20}{0.980581}
-\pgf@def{cosfrac}{21}{0.978653} \pgf@def{cosfrac}{22}{0.976644}
-\pgf@def{cosfrac}{23}{0.974555} \pgf@def{cosfrac}{24}{0.972387}
-\pgf@def{cosfrac}{25}{0.970143} \pgf@def{cosfrac}{26}{0.967823}
-\pgf@def{cosfrac}{27}{0.965429} \pgf@def{cosfrac}{28}{0.962964}
-\pgf@def{cosfrac}{29}{0.960429} \pgf@def{cosfrac}{30}{0.957826}
-\pgf@def{cosfrac}{31}{0.955157} \pgf@def{cosfrac}{32}{0.952424}
-\pgf@def{cosfrac}{33}{0.949629} \pgf@def{cosfrac}{34}{0.946773}
-\pgf@def{cosfrac}{35}{0.943858} \pgf@def{cosfrac}{36}{0.940887}
-\pgf@def{cosfrac}{37}{0.937862} \pgf@def{cosfrac}{38}{0.934784}
-\pgf@def{cosfrac}{39}{0.931655} \pgf@def{cosfrac}{40}{0.928477}
-\pgf@def{cosfrac}{41}{0.925252} \pgf@def{cosfrac}{42}{0.921982}
-\pgf@def{cosfrac}{43}{0.918669} \pgf@def{cosfrac}{44}{0.915315}
-\pgf@def{cosfrac}{45}{0.911922} \pgf@def{cosfrac}{46}{0.90849}
-\pgf@def{cosfrac}{47}{0.905024} \pgf@def{cosfrac}{48}{0.901523}
-\pgf@def{cosfrac}{49}{0.89799} \pgf@def{cosfrac}{50}{0.894427}
-\pgf@def{cosfrac}{51}{0.890835} \pgf@def{cosfrac}{52}{0.887217}
-\pgf@def{cosfrac}{53}{0.883573} \pgf@def{cosfrac}{54}{0.879905}
-\pgf@def{cosfrac}{55}{0.876216} \pgf@def{cosfrac}{56}{0.872506}
-\pgf@def{cosfrac}{57}{0.868777} \pgf@def{cosfrac}{58}{0.865031}
-\pgf@def{cosfrac}{59}{0.861269} \pgf@def{cosfrac}{60}{0.857493}
-\pgf@def{cosfrac}{61}{0.853704} \pgf@def{cosfrac}{62}{0.849903}
-\pgf@def{cosfrac}{63}{0.846092} \pgf@def{cosfrac}{64}{0.842271}
-\pgf@def{cosfrac}{65}{0.838444} \pgf@def{cosfrac}{66}{0.834609}
-\pgf@def{cosfrac}{67}{0.83077} \pgf@def{cosfrac}{68}{0.826927}
-\pgf@def{cosfrac}{69}{0.82308} \pgf@def{cosfrac}{70}{0.819232}
-\pgf@def{cosfrac}{71}{0.815383} \pgf@def{cosfrac}{72}{0.811534}
-\pgf@def{cosfrac}{73}{0.807687} \pgf@def{cosfrac}{74}{0.803842}
-\pgf@def{cosfrac}{75}{0.8} \pgf@def{cosfrac}{76}{0.796162}
-\pgf@def{cosfrac}{77}{0.792329} \pgf@def{cosfrac}{78}{0.788502}
-\pgf@def{cosfrac}{79}{0.784682} \pgf@def{cosfrac}{80}{0.780869}
-\pgf@def{cosfrac}{81}{0.777064} \pgf@def{cosfrac}{82}{0.773268}
-\pgf@def{cosfrac}{83}{0.769481} \pgf@def{cosfrac}{84}{0.765705}
-\pgf@def{cosfrac}{85}{0.761939} \pgf@def{cosfrac}{86}{0.758185}
-\pgf@def{cosfrac}{87}{0.754443} \pgf@def{cosfrac}{88}{0.750714}
-\pgf@def{cosfrac}{89}{0.746997} \pgf@def{cosfrac}{90}{0.743294}
-\pgf@def{cosfrac}{91}{0.739605} \pgf@def{cosfrac}{92}{0.735931}
-\pgf@def{cosfrac}{93}{0.732272} \pgf@def{cosfrac}{94}{0.728628}
-\pgf@def{cosfrac}{95}{0.724999} \pgf@def{cosfrac}{96}{0.721387}
-\pgf@def{cosfrac}{97}{0.717792} \pgf@def{cosfrac}{98}{0.714213}
-\pgf@def{cosfrac}{99}{0.710651} \pgf@def{cosfrac}{100}{0.707107}
-
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
deleted file mode 100644
index 84a432ceadb..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
+++ /dev/null
@@ -1,134 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorequick.code.tex,v 1.2 2006/10/11 15:22:25 tantau Exp $
-
-% Quick version of basic drawing commands. Most high-level commands
-% are not available if these commands are used.
-
-% Move current point to (#1,#2).
-%
-% #1 = x dimension of new current point
-% #2 = y dimension of new current point
-%
-% Example:
-%
-% \pgfpathqmoveto{0pt}{0pt}
-% \pgfpathqlineto{1pt}{1pt}
-% \pgfpathqcurveto{2pt}{1pt}{2pt}{2pt}{3pt}{2pt}
-% \pgfqstroke
-
-\def\pgfpathqmoveto#1#2{\pgfsyssoftpath@moveto{#1}{#2}}
-
-
-% Append a line to (#1,#2) to the current path.
-%
-% #1 = x dimension of target
-% #2 = y dimension of target
-%
-% Example:
-%
-% \pgfpathqmoveto{0pt}{0pt}
-% \pgfpathqlineto{1pt}{1pt}
-% \pgfpathqcurveto{2pt}{1pt}{2pt}{2pt}{3pt}{2pt}
-% \pgfqstroke
-
-\def\pgfpathqlineto#1#2{\pgfsyssoftpath@lineto{#1}{#2}}
-
-
-% Append a bezier spline to the current path.
-%
-% #1 = x dimension of first support point
-% #2 = y dimension of first support point
-% #3 = x dimension of second support point
-% #4 = y dimension of second support point
-% #5 = x dimension of target point
-% #6 = y dimension of target point
-%
-% Example:
-%
-% \pgfpathqmoveto{0pt}{0pt}
-% \pgfpathqlineto{1pt}{1pt}
-% \pgfpathqcurveto{2pt}{1pt}{2pt}{2pt}{3pt}{2pt}
-% \pgfqstroke
-
-\def\pgfpathqcurveto#1#2#3#4#5#6{\pgfsyssoftpath@curveto{#1}{#2}{#3}{#4}{#5}{#6}}
-
-
-
-
-% Append a circle of the given radius around the origin.
-%
-% #1 = radius
-%
-% Example:
-%
-% \pgfpathqcircle{10pt}
-% is quicker than
-% \pgfpathcircle{\pgforigin}{10pt}
-
-\def\pgfpathqcircle#1{%
- {%
- \pgf@x=#1%
- \pgf@y=0.555\pgf@x%
- \pgfsyssoftpath@moveto{\the\pgf@x}{0pt}%
- \pgfsyssoftpath@curveto{\the\pgf@x}{\the\pgf@y}{\the\pgf@y}{\the\pgf@x}{0pt}{\the\pgf@x}%
- \pgfsyssoftpath@curveto{-\the\pgf@y}{\the\pgf@x}{-\the\pgf@x}{\the\pgf@y}{-\the\pgf@x}{0pt}%
- \pgfsyssoftpath@curveto{-\the\pgf@x}{-\the\pgf@y}{-\the\pgf@y}{-\the\pgf@x}{0pt}{-\the\pgf@x}%
- \pgfsyssoftpath@curveto{\the\pgf@y}{-\the\pgf@x}{\the\pgf@x}{-\the\pgf@y}{\the\pgf@x}{0pt}%
- \pgfsyssoftpath@closepath%
- }%
-}
-
-
-
-% Stroke current path. No hooks called.
-%
-% Example:
-%
-% \pgfpathqmoveto{0cm}{0cm}
-% \pgfpathqlineto{1cm}{1cm}
-% \pgfpathqcurveto{2cm}{1cm}{2cm}{2cm}{3cm}{2cm}
-% \pgfqstroke
-
-\def\pgfusepathqstroke{%
- \pgfsyssoftpath@flushcurrentpath%
- \pgfsys@stroke%
- \pgf@resetpathsizes%
-}
-
-
-% Quickly fill current path.
-
-\def\pgfusepathqfill{%
- \pgfsyssoftpath@flushcurrentpath%
- \pgfsys@fill%
- \pgf@resetpathsizes%
-}
-
-
-% Quickly fill and stroke current path.
-
-\def\pgfusepathqfillstroke{%
- \pgfsyssoftpath@flushcurrentpath%
- \pgfsys@fillstroke%
- \pgf@resetpathsizes%
-}
-
-% Quickly clip current path.
-
-\def\pgfusepathqclip{%
- \pgfsyssoftpath@flushcurrentpath%
- \pgfsys@clipnext%
- \pgfsys@discardpath%
- \pgf@resetpathsizes%
-}
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
deleted file mode 100644
index 286ac78c216..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
+++ /dev/null
@@ -1,535 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorescopes.code.tex,v 1.24 2007/06/07 07:41:10 tantau Exp $
-
-% Globals
-
-\newbox\pgfpic
-\newbox\pgf@hbox
-
-\newbox\pgf@layerbox@main
-
-\newcount\pgf@picture@serial@count
-
-
-
-% This if decides whether the position of pictures on the page is
-% protocolled or not. Normally,
-% this is switched off as it works only with certain drivers and it
-% causes external files to be written. When switched on, the position
-% of pgfpictures are protocolled and can be referenced using
-% \pgfsys@getposition{XXX} where XXX is the value of \pgfpictureid
-% inside the picture.
-\newif\ifpgfrememberpicturepositiononpage
-
-
-
-% Library files inclusion
-
-
-% Include a library file.
-%
-% #1 = List of names of library file.
-%
-% Description:
-%
-% This command includes a list of library files. For each file X in the
-% list, the file pgflibraryX.code.tex is included, provided this has
-% not been done earlier.
-%
-% For the convenience of Context users, both round and square brackets
-% are possible for the argument.
-%
-% Example:
-%
-% \usepgflibrary{arrows}
-% \usepgflibrary[patterns,snakes]
-
-\def\usepgflibrary{\pgfutil@ifnextchar[{\use@pgflibrary}{\use@@pgflibrary}}%}
-\def\use@pgflibrary[#1]{\use@@pgflibrary{#1}}
-\def\use@@pgflibrary#1{%
- \edef\pgf@list{#1}%
- \pgfutil@for\pgf@temp:=\pgf@list\do{%
- \expandafter\ifx\csname pgf@library@\pgf@temp @loaded\endcsname\relax%
- \expandafter\let\csname pgf@library@\pgf@temp @loaded\endcsname=\pgfutil@empty%
- \expandafter\edef\csname pgf@library@#1@atcode\endcsname{\the\catcode`\@}
- \expandafter\edef\csname pgf@library@#1@barcode\endcsname{\the\catcode`\|}
- \catcode`\@=11
- \catcode`\|=12
- \input pgflibrary\pgf@temp.code.tex
- \catcode`\@=\csname pgf@library@#1@atcode\endcsname
- \catcode`\|=\csname pgf@library@#1@barcode\endcsname
- \fi%
- }%
-}
-
-
-
-% Scopes
-
-
-% Pgf scope environment. All changes of the graphic state are local to
-% the scope.
-%
-% Example:
-%
-% \begin{pgfscope}
-% \pgfsetlinewidth{3pt}
-% \pgfline{\pgfxy(0,0)}{\pgfxy(3,3)}
-% \end{pgfscope}
-
-\def\pgfscope{%
- \pgfsyssoftpath@setcurrentpath\pgfutil@empty%
- \pgfsys@beginscope%
- \pgf@resetpathsizes%
- \edef\pgfscope@linewidth{\the\pgflinewidth}%
- \begingroup}
-\def\endpgfscope{%
- \endgroup%
- \global\pgflinewidth=\pgfscope@linewidth%
- \pgfsys@endscope}
-
-
-
-
-% Quickly insert a box can contain normal TeX text at the origin.
-%
-% #1 = box of width/height and depth 0pt
-%
-% Example:
-%
-% \pgfqbox{\mybox}
-
-\def\pgfqbox#1{%
- \pgfsys@hbox#1%
-}
-
-
-% Insert a box that can contain normal TeX text at the origin, but
-% with the current coordinate transformation matrix synced with the
-% low-level transformation matrix.
-%
-% #1 = box of width/height and depth 0pt
-%
-% In essence, this command does the same as if you first said
-% \pgflowlevelsynccm and then \pgfqbox. However, pgf will use a
-% ``TeX-translation'' for the translation part of the transformation
-% cm. This will ensure that hyperlinks ``survive'' at least
-% translations.
-%
-% Example:
-%
-% \pgfqboxsynced{\mybox}
-
-\def\pgfqboxsynced#1{%
- \pgfsys@hboxsynced#1%
-}
-
-
-% Puts some text in a box and inserts it with the current
-% transformations applied.
-%
-% #1 = List of optional positioning. Possible values are ``left'', ``right'',
-% ``top'', ``bottom'' and ``base''.
-% #2 = TeX text. May contain verbatims.
-%
-% Example:
-%
-% \pgftransformshift{\pgfpoint{1cm}{0cm}}
-% \pgftext{Hello World!}
-
-\def\pgftext{\pgfutil@ifnextchar[\pgf@text{\pgf@text[]}}%
-\def\pgf@text[#1]{%
- \def\pgf@text@options{#1}%
- \pgf@maketext\pgf@after@text}
-\def\pgf@after@text{%
- {%
- \def\pgf@text@hshift{center}%
- \def\pgf@text@vshift{center}%
- \def\pgf@marshal{\setkeys{pgfbox}}%
- \expandafter\pgf@marshal\expandafter{\pgf@text@options}%
- \csname pgf@halign\pgf@text@hshift\endcsname%
- \csname pgf@valign\pgf@text@vshift\endcsname%
- % Protocol sizes:
- \pgf@process{\pgfpointtransformed{\pgfqpoint{0pt}{\dp\pgf@hbox}}}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@process{\pgfpointtransformed{\pgfqpoint{\wd\pgf@hbox}{\dp\pgf@hbox}}}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@process{\pgfpointtransformed{\pgfqpoint{0pt}{\ht\pgf@hbox}}}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgf@process{\pgfpointtransformed{\pgfqpoint{\wd\pgf@hbox}{\ht\pgf@hbox}}}%
- \pgf@protocolsizes{\pgf@x}{\pgf@y}%
- \pgfqboxsynced{\pgf@hbox}%
- }%
-}
-
-\define@key{pgfbox}{left}[]{\def\pgf@text@hshift{left}}
-\define@key{pgfbox}{center}[]{}
-\define@key{pgfbox}{right}[]{\def\pgf@text@hshift{right}}
-\define@key{pgfbox}{top}[]{\def\pgf@text@vshift{top}}
-\define@key{pgfbox}{bottom}[]{\def\pgf@text@vshift{bottom}}
-\define@key{pgfbox}{base}[]{\def\pgf@text@vshift{base}}
-\define@key{pgfbox}{at}{\pgftransformshift{#1}}
-\define@key{pgfbox}{x}{\pgftransformxshift{#1}}
-\define@key{pgfbox}{y}{\pgftransformyshift{#1}}
-\define@key{pgfbox}{rotate}{\pgftransformrotate{#1}}
-
-\def\pgf@halignleft{}% do nothing
-\def\pgf@haligncenter{\pgftransformxshift{+-.5\wd\pgf@hbox}}
-\def\pgf@halignright{\pgftransformxshift{+-\wd\pgf@hbox}}%
-\def\pgf@valignbase{}% do nothing
-\def\pgf@valignbottom{\pgftransformyshift{+\dp\pgf@hbox}}%
-\def\pgf@valigncenter{\pgftransformyshift{+.5\dp\pgf@hbox}\pgftransformyshift{+-.5\ht\pgf@hbox}}%
-\def\pgf@valigntop{\pgftransformyshift{+-\ht\pgf@hbox}}%
-
-
-% Internal function for creating a hbox.
-\def\pgf@maketext#1{%
- \def\pgf@@maketextafter{#1}%
- \setbox\pgf@hbox=\hbox\bgroup%
- \pgfinterruptpicture%
- \bgroup%
- \aftergroup\pgf@collectresetcolor%
- \let\next=%
-}
-\def\pgf@collectresetcolor{%
- \pgfutil@ifnextchar\reset@color%
- {\reset@color\afterassignment\pgf@collectresetcolor\let\pgf@temp=}%
- {\pgf@textdone}%
-}
-\def\pgf@textdone{%
- \endpgfinterruptpicture%
- \egroup%
- \pgf@@maketextafter%
-}
-
-\long\def\pgf@makehbox#1{%
- \setbox\pgf@hbox=\hbox{{%
- \pgfinterruptpicture%
- #1%
- \endpgfinterruptpicture%
- }}}
-
-
-
-% Picture environment
-%
-% Example:
-%
-% \begin{pgfpicture}
-% \pgfsetendarrow{\pgfarrowto}
-% \pgfpathmoveto{\pgfpointxy{-0.9}{0.2}}
-% \pgfpathlineto{\pgfpointxy{0.9}{0.4}}
-% \pgfusepath{stroke}
-% \end{pgfpicture}
-
-\newif\ifpgfpicture
-
-\def\pgfpicture{%
- \begingroup%
- \pgfpicturetrue%
- \global\advance\pgf@picture@serial@count by1\relax%
- \edef\pgfpictureid{pgfid\the\pgf@picture@serial@count}%
- \let\pgf@nodecallback=\pgfutil@gobble%
- \pgf@picmaxx=-16000pt\relax%
- \pgf@picminx=16000pt\relax%
- \pgf@picmaxy=-16000pt\relax%
- \pgf@picminy=16000pt\relax%
- \pgf@relevantforpicturesizetrue%
- \pgf@resetpathsizes%
- \pgfutil@ifnextchar\bgroup\pgf@oldpicture\pgf@picture}
-\def\pgf@oldpicture#1#2#3#4{%
- \pgfmathsetlength\pgf@picminx{#1}%
- \pgfmathsetlength\pgf@picminy{#2}%
- \pgfmathsetlength\pgf@picmaxx{#3}%
- \pgfmathsetlength\pgf@picmaxy{#4}%
- \pgf@relevantforpicturesizefalse%
- \pgf@picture}
-
-\def\pgf@picture{%
- \setbox\pgfpic\hbox to0pt\bgroup%
- \begingroup%
- \pgfsys@beginpicture%
- \pgfsys@beginscope%
- \begingroup%
- \pgfsetcolor{.}%
- \pgfsetlinewidth{0.4pt}%
- \pgftransformreset%
- \pgfsyssoftpath@setcurrentpath\pgfutil@empty%
- \begingroup%
- \let\pgf@setlengthorig=\setlength%
- \let\pgf@addtolengthorig=\addtolength%
- \let\pgf@selectfontorig=\selectfont%
- \let\setlength=\pgf@setlength%
- \let\addtolength=\pgf@addtolength%
- \let\selectfont=\pgf@selectfont%
- \nullfont\spaceskip\z@\xspaceskip\z@%
- \setbox\pgf@layerbox@main\hbox to0pt\bgroup%
- \begingroup%
- }
-\def\endpgfpicture{%
- \ifpgfrememberpicturepositiononpage%
- \hbox to0pt{\pgfsys@markposition{\pgfpictureid}}%
- \fi%
- % ok, now let's position the box
- \ifdim\pgf@picmaxx=-16000pt\relax%
- % empty picture. make size 0.
- \global\pgf@picmaxx=0pt\relax%
- \global\pgf@picminx=0pt\relax%
- \global\pgf@picmaxy=0pt\relax%
- \global\pgf@picminy=0pt\relax%
- \fi%
- % Shift baseline outside:
- \pgf@relevantforpicturesizefalse%
- \pgf@process{\pgf@baseline}%
- \gdef\pgf@shift@baseline{\the\pgf@y}%
- \endgroup%
- \hss%
- \egroup%
- \pgf@insertlayers%
- \endgroup%
- \pgfsys@discardpath%
- \endgroup%
- \pgfsys@endscope%
- \pgfsys@endpicture%
- \endgroup%
- \hss
- \egroup%
- \pgfsys@typesetpicturebox\pgfpic%
- \endgroup%
-}
-
-\def\pgf@insertlayers{%
- \box\pgf@layerbox@main%
-}
-
-\def\pgf@selectfont{\pgf@selectfontorig\nullfont}
-
-\def\pgf@setlength#1#2{% these will be used only when \nullfont is active
- \begingroup% keep font setting local
- \pgfutil@selectfont% restore font
- \pgf@setlengthorig#1{#2}% calculate dimension (possibly using calc)
- \expandafter%
- \endgroup%
- \expandafter#1\expandafter=\the#1\relax}
-\def\pgf@addtolength#1#2{%
- \begingroup% keep font setting local
- \pgfutil@selectfont% restore font
- \pgf@addtolengthorig#1{#2}% calculate dimension (possibly using calc)
- \expandafter%
- \endgroup%
- \expandafter#1\expandafter=\the#1\relax}
-
-
-% Sets the baseline at the y-coordinate of a given point
-%
-% #1 = point
-%
-% Sets the baseline of the picture to the y-coordinate of a given
-% point. However, the point will be evaluated *at the end of the
-% picture*.
-%
-% Example:
-%
-% \pgfsetbaselinepointlater{\pgfpointanchor{mynode}{base}}
-
-\def\pgfsetbaselinepointlater#1{\def\pgf@baseline{#1}}
-
-
-% Sets the baseline at the y-coordinate of a given point, now
-%
-% #1 = point
-%
-% Sets the baseline of the picture to the y-coordinate of a given
-% point.
-%
-% Example:
-%
-% \pgfsetbaselinepointnow{\pgfpoint{1cm}{2pt}}
-
-\def\pgfsetbaselinepointnow#1{%
- \pgf@process{#1}%
- \edef\pgf@setter@baseline{\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}%
- \pgfsetbaselinepointlater{\pgf@setter@baseline}%
-}
-
-
-% Sets the baseline
-%
-% #1 = baseline
-%
-% Sets the baseline of the picture. Default is the lower border, which
-% is the same as \pgf@picminy
-%
-% Example:
-%
-% \pgfsetbaseline{1cm+2pt}
-
-\def\pgfsetbaseline#1{\pgfsetbaselinepointlater{\pgfpoint{0pt}{#1}}}
-\pgfsetbaseline{\pgf@picminy}
-
-
-
-
-% Interrupt path
-%
-% Description:
-%
-% The environment can be used to insert some drawing commands while
-% constructing a path. The drawing commands inside the environment
-% will not interfere with the path being constructed ``outside.''
-% However, you must ward against graphic state changes using a scope.
-%
-% Example: Draw two parallel lines
-%
-% \pgfmoveto{\pgfpoint{0cm}{0cm}}
-% \begin{pgfinterruptpath}
-% \pgfmoveto{\pgfpoint{1cm}{0cm}}
-% \pgfmoveto{\pgfpoint{1cm}{1cm}}
-% \pgfusepath{stroke}
-% \end{pgfinterruptpath}
-% \pgflineto{\pgfpoint{0cm}{1cm}}
-% \pgfusepath{stroke}
-
-\def\pgfinterruptpath
-{%
- \begingroup%
- % save all sorts of things...
- \edef\pgf@interrupt@savex{\the\pgf@path@lastx}%
- \edef\pgf@interrupt@savey{\the\pgf@path@lasty}%
- \pgf@getpathsizes\pgf@interrupt@pathsizes%
- \pgfsyssoftpath@getcurrentpath\pgf@interrupt@path%
- \pgfsyssoftpath@setcurrentpath\pgfutil@empty%
- \edef\pgfscope@linewidth{\the\pgflinewidth}%
- \let\pgf@interrupt@lastmoveto=\pgfsyssoftpath@lastmoveto%
- \begingroup%
-}
-\def\endpgfinterruptpath
-{%
- \endgroup%
- \global\pgflinewidth=\pgfscope@linewidth%
- \pgfsyssoftpath@setcurrentpath\pgf@interrupt@path%
- \pgf@setpathsizes\pgf@interrupt@pathsizes%
- \global\pgf@path@lastx=\pgf@interrupt@savex%
- \global\pgf@path@lasty=\pgf@interrupt@savey%
- \global\let\pgfsyssoftpath@lastmoveto=\pgf@interrupt@lastmoveto%
- \endgroup%
-}
-
-
-
-% Interrupt bounding box
-%
-% Description:
-%
-% The environment can be used to temporarily setup a new bounding box
-% computation. The bounding box will be made empty at the beginning of
-% the environment and will be reset to its old value after the
-% environment.
-%
-% Example:
-%
-% \begin{pgfinterruptboundinbox}
-% \pgfmoveto{\pgfpoint{1cm}{0cm}}
-% \pgfmoveto{\pgfpoint{1cm}{1cm}}
-% \pgfusepath{stroke}
-% \end{pgfinterruptboundinbox}
-
-\def\pgfinterruptboundingbox
-{%
- \begingroup%
- \edef\pgf@interrupt@savemaxx{\the\pgf@picmaxx}%
- \edef\pgf@interrupt@saveminx{\the\pgf@picminx}%
- \edef\pgf@interrupt@savemaxy{\the\pgf@picmaxy}%
- \edef\pgf@interrupt@saveminy{\the\pgf@picminy}%
- \pgf@picmaxx=-16000pt\relax%
- \pgf@picminx=16000pt\relax%
- \pgf@picmaxy=-16000pt\relax%
- \pgf@picminy=16000pt\relax%
-}
-\def\endpgfinterruptboundingbox
-{%
- \global\pgf@picmaxx=\pgf@interrupt@savemaxx%
- \global\pgf@picmaxy=\pgf@interrupt@savemaxy%
- \global\pgf@picminx=\pgf@interrupt@saveminx%
- \global\pgf@picminy=\pgf@interrupt@saveminy%
- \endgroup%
-}
-
-
-
-
-
-% Interrupts a picture
-%
-% Description:
-%
-% This environment interrupts a picture and temporarily returns to
-% normal TeX mode. All sorts of things are saved and restored by this
-% environment.
-%
-% WARNING: Using this environment in conjuction with low level
-% transformations can *strongly* upset the typesetting. Typically, the
-% contents of this environment should have size/height/depth 0pt in
-% the end.
-%
-% WARNING: This environment should only be used inside typesetting a
-% box and this box must in turn be inserted using \pgfqbox.
-%
-% Example: Draw two parallel lines
-%
-% \pgfmoveto{\pgfpoint{0cm}{0cm}}
-% \setbox\mybox=\hbox{
-% \begin{pgfinterruptpicture}
-% This is normal text.
-% \begin{pgfpicture} % a subpicture
-% \pgfmoveto{\pgfpoint{1cm}{0cm}}
-% \pgfmoveto{\pgfpoint{1cm}{1cm}}
-% \pgfusepath{stroke}
-% \end{pgfpicture}
-% More text.
-% \end{pgfinterruptpicture}
-% }
-% \ht\mybox=0pt
-% \wd\mybox=0pt
-% \dp\mybox=0pt
-% \pgfqbox{\mybox}%
-% \pgfpathlineto{\pgfpoint{0cm}{1cm}}
-% \pgfusepath{stroke}
-
-\def\pgfinterruptpicture
-{%
- \begingroup%
- \pgfinterruptboundingbox%
- \pgftransformreset%
- \pgfinterruptpath%
- \ifx\pgf@selectfontorig\@undefined%
- \else%
- \let\setlength\pgf@setlengthorig%
- \let\addtolength\pgf@addtolengthorig%
- \let\selectfont\pgf@selectfontorig%
- \fi%
- \pgfutil@selectfont%
- \pgfpicturefalse%
- \pgf@savelayers%
-}
-\def\endpgfinterruptpicture
-{%
- \pgf@restorelayers%
- \endpgfinterruptpath%
- \endpgfinterruptboundingbox%
- \endgroup%
-}
-
-\let\pgf@savelayers=\relax
-\let\pgf@restorelayers=\relax
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
deleted file mode 100644
index 05142e8c0db..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
+++ /dev/null
@@ -1,440 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreshade.code.tex,v 1.8 2007/03/09 17:49:32 tantau Exp $
-
-%
-% Parsing functions
-%
-\newdimen\pgf@max
-\newcount\pgf@sys@shading@range@num
-\def\pgf@parsefunc#1{%
- \edef\temp{{#1}}%
- \expandafter\pgf@convertrgbstring\temp%
- \edef\temp{{\pgf@rgbconv}}%
- \expandafter\pgf@@parsefunc\temp}
-\def\pgf@@parsefunc#1{%
- \let\pgf@bounds=\pgfutil@empty%
- \let\pgf@funcs=\pgfutil@empty%
- \let\pgf@psfuncs=\pgfutil@empty%
- \let\pgf@encode=\pgfutil@empty%
- \let\pgf@sys@shading@ranges=\pgfutil@empty%
- \pgf@sys@shading@range@num=0\relax%
- \pgf@parsefirst[#1; ]%
- \pgf@parselastdom[#1; ]%
- \pgf@parsemid[#1; ]%
- \ifx\pgf@bounds\pgfutil@empty%
- \edef\pgf@pdfparseddomain{0 1}%
- \edef\pgf@pdfparsedfunction{\pgf@singlefunc\space}%
- \else%
- \edef\pgf@pdfparseddomain{\pgf@doma\space\pgf@domb}%
- \edef\pgf@pdfparsedfunction{%
- << /FunctionType 3 /Domain [\pgf@doma\space\pgf@domb] /Functions
- [\pgf@funcs\space] /Bounds [\pgf@bounds] /Encode [0 1 \pgf@encode]
- >> }%
- \fi%
- \xdef\pgf@psfuncs{\pgf@psfuncs}%
- }
-\def\pgf@parsefirst[rgb(#1)=(#2,#3,#4)#5]{%
- \pgfmathsetlength\pgf@x{#1}%
- \edef\pgf@sys@shading@start@pos{\the\pgf@x}%
- \pgf@sys@bp@correct\pgf@x%
- \edef\pgf@doma{\pgf@sys@tonumber{\pgf@x}}%
- \edef\pgf@prevx{\pgf@sys@tonumber{\pgf@x}}%
- \pgf@getrgbtuplewithmixin{#2}{#3}{#4}%
- \edef\pgf@sys@shading@start@rgb{\pgf@sys@rgb}%
- \let\pgf@sys@prevcolor=\pgf@sys@shading@start@rgb%
- \let\pgf@sys@prevpos=\pgf@sys@shading@start@pos%
- \edef\pgf@prevcolor{\pgf@rgb}%
- \edef\pgf@firstcolor{\pgf@rgb}}
-\def\pgf@parselastdom[rgb(#1)=(#2,#3,#4); {%
- \pgfutil@ifnextchar]{%
- \pgfmathsetlength\pgf@x{#1}%
- \edef\pgf@sys@shading@end@pos{\the\pgf@x}%
- \pgf@max=\pgf@x\relax%
- \pgf@sys@bp@correct\pgf@x%
- \edef\pgf@domb{\pgf@sys@tonumber{\pgf@x}}%
- \pgf@getrgbtuplewithmixin{#2}{#3}{#4}%
- \edef\pgf@sys@shading@end@rgb{\pgf@sys@rgb}%
- \pgfutil@gobble}{\pgf@parselastdom[}}
-\def\pgf@parsemid[rgb(#1)=(#2,#3,#4); {\pgf@parserest[}
-\def\pgf@parserest[rgb(#1)=(#2,#3,#4); {%
- \advance\pgf@sys@shading@range@num by1\relax%
- \pgfutil@ifnextchar]{%
- \pgf@getrgbtuplewithmixin{#2}{#3}{#4}%
- \edef\pgf@singlefunc{\space%
- << /FunctionType 2 /Domain [0 1] /C0
- [\pgf@prevcolor] /C1 [\pgf@rgb] /N 1 >> }%
- \edef\pgf@funcs{\pgf@funcs\space%
- << /FunctionType 2 /Domain [\pgf@doma\space\pgf@domb] /C0
- [\pgf@prevcolor] /C1 [\pgf@rgb] /N 1 >> }%
- \edef\pgf@psfuncs{\pgf@prevx\space \pgf@rgb\space \pgf@prevcolor\space pgfshade \pgf@psfuncs}%
- \pgfmathsetlength\pgf@x{#1}%
- \edef\pgf@sys@shading@ranges{\pgf@sys@shading@ranges{{\pgf@sys@prevpos}{\the\pgf@x}{\pgf@sys@prevcolor}{\pgf@sys@rgb}}}%
- \edef\pgf@sys@prevpos{\the\pgf@x}%
- \let\pgf@sys@prevcolor=\pgf@sys@rgb%
- \pgfutil@gobble}{%
- \pgfmathsetlength\pgf@x{#1}%
- \pgf@getrgbtuplewithmixin{#2}{#3}{#4}%
- \edef\pgf@sys@shading@ranges{\pgf@sys@shading@ranges{{\pgf@sys@prevpos}{\the\pgf@x}{\pgf@sys@prevcolor}{\pgf@sys@rgb}}}%
- \edef\pgf@sys@prevpos{\the\pgf@x}%
- \let\pgf@sys@prevcolor=\pgf@sys@rgb%
- \edef\pgf@psfuncs{\pgf@prevx\space \pgf@rgb\space \pgf@prevcolor\space pgfshade \pgf@psfuncs}%
- \pgf@sys@bp@correct\pgf@x%
- \edef\pgf@prevx{\pgf@sys@tonumber{\pgf@x}}%
- \edef\pgf@bounds{\pgf@bounds\space\pgf@sys@tonumber{\pgf@x}}%
- \edef\pgf@encode{\pgf@encode\space0 1}%
- \edef\pgf@singlefunc{\space%
- << /FunctionType 2 /Domain [0 1] /C0
- [\pgf@prevcolor] /C1 [\pgf@rgb] /N 1 >> }%
- \edef\pgf@funcs{\pgf@funcs\space%
- << /FunctionType 2 /Domain [\pgf@doma\space\pgf@domb] /C0
- [\pgf@prevcolor] /C1 [\pgf@rgb] /N 1 >> }%
- \edef\pgf@prevcolor{\pgf@rgb}%
- \pgf@parserest[}}
-
-\def\pgf@getrgbtuplewithmixin#1#2#3{%
- \pgfutil@definecolor{pgfshadetemp}{rgb}{#1,#2,#3}%
- \pgfutil@ifundefined{applycolormixins}{}{\applycolormixins{pgfshadetemp}}%
- \pgfutil@extractcolorspec{pgfshadetemp}{\pgf@tempcolor}%
- \expandafter\pgfutil@convertcolorspec\pgf@tempcolor{rgb}{\pgf@rgbcolor}%
- \expandafter\pgf@getrgb@@\pgf@rgbcolor!}
-\def\pgf@getrgb@@#1,#2,#3!{%
- \def\pgf@rgb{#1 #2 #3}%
- \def\pgf@sys@rgb{{#1}{#2}{#3}}%
-}
-
-
-\def\pgf@convertrgbstring#1{%
- \def\pgf@rgbconv{}%
- \pgf@converttorgb#1]%
- }
-\def\pgf@converttorgb{%
- \pgfutil@ifnextchar]{\pgfutil@gobble}%done!
- {%
- \pgfutil@ifnextchar;{\pgf@grabsemicolor}%
- {%
- \pgfutil@ifnextchar r{\pgf@grabrgb}%
- {%
- \pgfutil@ifnextchar g{\pgf@grabgray}%
- {%
- \pgfutil@ifnextchar c{\pgf@grabcolor}%
- {\PackageError{pgfshade}{Illformed shading
- specification}{}\pgf@converttorgb}%
- }%
- }%
- }%
- }%
-}
-\def\pgf@grabsemicolor;{%
- \edef\pgf@rgbconv{\pgf@rgbconv; }\pgf@converttorgb}
-\def\pgf@grabrgb rgb(#1)=(#2,#3,#4){%
- \edef\pgf@rgbconv{\pgf@rgbconv rgb(#1)=(#2,#3,#4)}\pgf@converttorgb}
-\def\pgf@grabgray gray(#1)=(#2){%
- \edef\pgf@rgbconv{\pgf@rgbconv rgb(#1)=(#2,#2,#2)}\pgf@converttorgb}
-\def\pgf@grabcolor color(#1)=(#2){%
- \pgfutil@colorlet{pgf@tempcol}{#2}%
- \pgfutil@extractcolorspec{pgf@tempcol}{\pgf@tempcolor}%
- \expandafter\pgfutil@convertcolorspec\pgf@tempcolor{rgb}{\pgf@rgbcolor}%
- \expandafter\pgf@convgetrgb@\expandafter{\pgf@rgbcolor}{#1}%
-}
-\def\pgf@convgetrgb@#1#2{%
- \edef\pgf@rgbconv{\pgf@rgbconv rgb(#2)=(#1)}\pgf@converttorgb}
-
-
-
-
-% Declares a horizontal shading for later use. The shading is a
-% horizontal bar that changes its color.
-%
-% #1 = name of the shading for later use
-% #2 = height of the shading
-% #3 = color specification in the following format: A list of colors
-% that the bar should have at certain points. If the bar should
-% be red at 1cm, this is specified as
-% "rgb(1cm)=(1,0,0)". Multiple specifications are separated by a
-% semicolon and a space. At least two specifications must be
-% given. The specified positions must be given in increasing
-% order.
-%
-% Example:
-%
-% \pgfdeclarehorizontalshading{redtogreentoblue}{1cm}{%
-% rgb(0cm)=(1,0,0); % red
-% rgb(1cm)=(0,1,0); % green
-% rgb(2cm)=(0,0,1)}
-%
-% \begin{document}
-% The following bar is 2cm long: \pgfuseshading{redtogreentoblue}.
-% \end{document}
-
-\def\pgfdeclarehorizontalshading{\pgfutil@ifnextchar[\pgf@declarehorizontalshading{\pgf@declarehorizontalshading[]}}%
-\def\pgf@declarehorizontalshading[#1]#2#3#4{%
- \expandafter\def\csname pgf@deps@pgfshading#2!\endcsname{#1}%
- \expandafter\ifx\csname pgf@deps@pgfshading#2!\endcsname\pgfutil@empty%
- \pgfsys@horishading{#2}{#3}{#4}%
- \else%
- \expandafter\def\csname pgf@func@pgfshading#2!\endcsname{\pgfsys@horishading}%
- \expandafter\def\csname pgf@args@pgfshading#2!\endcsname{{#3}{#4}}%
- \expandafter\let\csname @pgfshading#2!\endcsname=\pgfutil@empty%
- \fi}
-
-
-% Declares a vertical shading for later use.
-%
-% #1 = name of the shading for later use
-% #2 = height of the shading
-% #3 = color specification
-%
-% Example:
-%
-% \pgfdeclareverticalshading{redtogreentoblue}{1cm}{%
-% rgb(0cm)=(1,0,0); % red
-% rgb(1cm)=(0,1,0); % green
-% rgb(2cm)=(0,0,1)}
-%
-% \begin{document}
-% The following bar is 2cm high: \pgfuseshading{redtogreentoblue}.
-% \end{document}
-
-\def\pgfdeclareverticalshading{\pgfutil@ifnextchar[\pgf@declareverticalshading{\pgf@declareverticalshading[]}}%
-\def\pgf@declareverticalshading[#1]#2#3#4{%
- \expandafter\def\csname pgf@deps@pgfshading#2!\endcsname{#1}%
- \expandafter\ifx\csname pgf@deps@pgfshading#2!\endcsname\pgfutil@empty%
- \pgfsys@vertshading{#2}{#3}{#4}%
- \else%
- \expandafter\def\csname pgf@func@pgfshading#2!\endcsname{\pgfsys@vertshading}%
- \expandafter\def\csname pgf@args@pgfshading#2!\endcsname{{#3}{#4}}%
- \expandafter\let\csname @pgfshading#2!\endcsname=\pgfutil@empty%
- \fi}
-
-
-% Declares a radial shading for later use.
-%
-% #1 = name of the shading for later use
-% #2 = center of inner circle
-% #3 = color specification
-%
-% Description:
-%
-% A radial shading creates a smooth color transition between two
-% circles. The center of the inner circle is at the give position. Its
-% radius is the start of the color specification. The
-% center of the outer circle is at the center of the whole shading,
-% whose radius is the end of the color specification. For example,
-% suppose the color specification is "rgb(1cm)=(1,1,1); rgb(2cm)=(0,0,0)".
-% Then the shading would be 4cm times 4cm large. The inner circle would
-% have diameter 1cm and the outer circle would have diameter 2cm. The
-% outer circle would be centered in the middle of the shading, whereas
-% the outer circle would be centered at the given position.
-%
-% Example:
-%
-% \pgfdeclareradialshading{redtogreentoblue}{\pgfpoint{2cm}{2cm}}{%
-% rgb(10pt)=(1,0,0); % red
-% rgb(2cm)=(0,1,0); % green
-% rgb(3cm)=(0,0,1)}
-%
-% \begin{document}
-% The following ball has diameter 3cm: \pgfuseshading{redtogreentoblue}.
-% \end{document}
-
-\def\pgfdeclareradialshading{\pgfutil@ifnextchar[\pgf@declareradialshading{\pgf@declareradialshading[]}}%
-\def\pgf@declareradialshading[#1]#2#3#4{%
- \expandafter\def\csname pgf@deps@pgfshading#2!\endcsname{#1}%
- \expandafter\ifx\csname pgf@deps@pgfshading#2!\endcsname\pgfutil@empty%
- \pgfsys@radialshading{#2}{#3}{#4}%
- \else%
- \expandafter\def\csname pgf@func@pgfshading#2!\endcsname{\pgfsys@radialshading}%
- \expandafter\def\csname pgf@args@pgfshading#2!\endcsname{{#3}{#4}}%
- \expandafter\let\csname @pgfshading#2!\endcsname=\pgfutil@empty%
- \fi}
-
-
-% Inserts a box into the text that contains a previously defined
-% shading.
-%
-% #1 = Name of a shading
-%
-% Example:
-%
-% \pgfuseshading{redtogreentoblue}
-
-\def\pgfuseshading#1{%
- \edef\pgf@shadingname{@pgfshading#1}%
- \pgf@tryextensions{\pgf@shadingname}{\pgfalternateextension}%
- \expandafter\pgfutil@ifundefined\expandafter{\pgf@shadingname}%
- {\PackageError{pgfshade}{Undefined shading "#1"}{}}%
- {%
- {%
- \pgfutil@globalcolorsfalse%
- \def\pgf@shade@adds{}%
- \pgfutil@ifundefined{pgf@deps\pgf@shadingname}%
- {}%
- {%
- \edef\@list{\csname pgf@deps\pgf@shadingname\endcsname}%
- \pgfutil@for\@temp:=\@list\do{%
- {%
- \pgfutil@ifundefined{applycolormixins}{}{\applycolormixins{\@temp}}%
- \pgfutil@extractcolorspec{\@temp}{\pgf@tempcolor}%
- \expandafter\pgfutil@convertcolorspec\pgf@tempcolor{rgb}{\pgf@rgbcolor}%
- \xdef\pgf@shade@adds{\pgf@shade@adds,\pgf@rgbcolor}%
- }%
- }%
- }%
- \expandafter\pgf@strip@shadename\pgf@shadingname!!%
- \pgfutil@ifundefined{@pgfshading\pgf@basename\pgf@shade@adds!}%
- {%
- {%
- \expandafter\def\expandafter\@temp\expandafter{\csname pgf@func\pgf@shadingname\endcsname}%
- \edef\@args{{\pgf@basename\pgf@shade@adds}}%
- \expandafter\expandafter\expandafter\def%
- \expandafter\expandafter\expandafter\@@args%
- \expandafter\expandafter\expandafter{\csname pgf@args\pgf@shadingname\endcsname}%
- \expandafter\expandafter\expandafter\@temp\expandafter\@args\@@args%
- %
- }%
- }%
- {}%
- \pgf@invokeshading{\csname @pgfshading\pgf@basename\pgf@shade@adds!\endcsname}%
- }%
- }%
-}
-
-\def\pgf@strip@shadename @pgfshading#1!!!{\def\pgf@basename{#1}}
-
-\def\pgf@invokeshading#1{%
- \ifpgfpicture%
- \pgfsys@shadinginsidepgfpicture{#1}%
- \else%
- \pgfsys@shadingoutsidepgfpicture{#1}%
- \fi%
-}
-
-
-% Create an alias name for a shading
-%
-% #1 = name of the alias
-% #2 = name of the original
-%
-% Example:
-%
-% \pgfaliasshading{shading!25}{shadingshaded}
-
-\def\pgfaliasshading#1#2{%
- \expandafter\let\expandafter\pgf@temp\expandafter=\csname @pgfshading#2!\endcsname%
- \expandafter\let\csname @pgfshading#1!\endcsname=\pgf@temp%
- \expandafter\let\expandafter\pgf@temp\expandafter=\csname pgf@deps@pgfshading#2!\endcsname%
- \expandafter\let\csname pgf@deps@pgfshading#1!\endcsname=\pgf@temp%
- \expandafter\let\expandafter\pgf@temp\expandafter=\csname pgf@func@pgfshading#2!\endcsname%
- \expandafter\let\csname pgf@func@pgfshading#1!\endcsname=\pgf@temp%
- \expandafter\let\expandafter\pgf@temp\expandafter=\csname pgf@args@pgfshading#2!\endcsname%
- \expandafter\let\csname pgf@args@pgfshading#1!\endcsname=\pgf@temp%
-}
-
-
-
-
-% Shades the current path, but does not discard it.
-%
-% #1 - a shading (see below)
-% #2 - an angle
-%
-% Description:
-%
-% \pgfshadepath ``tries'' to fill the
-% current path with a shading. The shading's original size should
-% completely cover the area between (0,0) and (100bp,100bp). The
-% shading will be rotated by #2 and then rescaled so that it
-% completely covers the path. Then the path will be used (locally) for
-% clipping and the shading is drawn.
-%
-% In addition to the rotation, any transformation set by the
-%\pgfsetadditionalshadetransform will also be applied.
-%
-% After all this, the path can still be used for the normal
-% stroking/clipping operations.
-%
-% The shading is rotated around its middle. If no rotation occurs, the
-% lower left corner of the path will lie on (25bp, 25bp), the upper
-% right corner on (75bp, 75bp).
-%
-% Example:
-%
-% \pgfdeclareverticalshading{myshading}{100bp}{color(0pt)=(red); color(100bp)=(green)}
-%
-% \pgfpathmoveto{\pgforigin}
-% \pgfpathlineto{\pgfxy(1,0)}
-% \pgfpathlineto{\pgfxy(1,1)}
-% \pgfshadepath{myshading}{0}
-% \pgfusepath{stroke}
-
-\def\pgfshadepath#1#2{%
- \ifdim\pgf@pathminx=16000pt%
- \PackageWarning{pgfshade}{No path specified that can be filled}%
- \else%
- \begingroup%
- \pgfsys@beginscope%
- % Calculate center:
- \pgf@xb=.5\pgf@pathmaxx%
- \advance\pgf@xb by.5\pgf@pathminx%
- \pgf@yb=.5\pgf@pathmaxy%
- \advance\pgf@yb by.5\pgf@pathminy%
- % Calculate scaling:
- \pgf@xc=\pgf@pathmaxx%
- \advance\pgf@xc by-\pgf@pathminx%
- \pgf@yc=\pgf@pathmaxy%
- \advance\pgf@yc by-\pgf@pathminy%
- \pgf@xc=.02\pgf@xc%
- \pgf@yc=.02\pgf@yc%
- \pgfsyssoftpath@invokecurrentpath%
- \pgfsys@clipnext%
- \pgfsys@discardpath%
- % Compute new transformation matrix:
- \pgfsys@transformcm{1}{0}{0}{1}{\pgf@xb}{\pgf@yb}%
- \pgfsys@transformcm%
- {\pgf@sys@tonumber{\pgf@xc}}{0}%
- {0}{\pgf@sys@tonumber{\pgf@yc}}{0pt}{0pt}%
- \pgfmathparse{#2}%
- \let\pgfshade@angle=\pgfmathresult%
- \pgfmathsin@{\pgfshade@angle}%
- \let\pgfshade@sin=\pgfmathresult%
- \pgfmathcos@{\pgfshade@angle}%
- \let\pgfshade@cos=\pgfmathresult%
- \pgf@x=\pgfshade@sin pt%
- \pgf@xa=-\pgf@x%
- \pgfsys@transformcm{\pgfshade@cos}{\pgfshade@sin}{\pgf@sys@tonumber{\pgf@xa}}{\pgfshade@cos}{0pt}{0pt}%
- \ifx\pgf@shade@extra@transform\pgfutil@empty%
- \else%
- \pgflowlevel{\pgf@shade@extra@transform}%
- \fi%
- \pgfuseshading{#1}%
- \pgfsys@endscope%
- \endgroup%
- \fi%
-}
-
-
-% Additionally transform shade paths
-%
-% #1 = Transformation code that is used in addition to the normal
-% shading transformation.
-%
-% Example:
-%
-% \pgfsetadditionalshadetransform{\pgftransformrotate{30}}
-
-\def\pgfsetadditionalshadetransform#1{\def\pgf@shade@extra@transform{#1}}
-\let\pgf@shade@extra@transform=\pgfutil@empty
-
-
-
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
deleted file mode 100644
index 4a9a23f0d2c..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
+++ /dev/null
@@ -1,589 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoretransformations.code.tex,v 1.6 2007/06/07 07:41:10 tantau Exp $
-
-
-% Position transformations
-
-\newdimen\pgf@pt@x
-\newdimen\pgf@pt@y
-
-\newdimen\pgf@pt@temp
-
-\newif\ifpgf@pt@identity
-\pgf@pt@identitytrue
-
-\def\pgf@pt@aa{1.0} \def\pgf@pt@ab{0.0}
-\def\pgf@pt@ba{0.0} \def\pgf@pt@bb{1.0}
-
-
-
-% Store the current transformation matrix in a macro.
-%
-% #1 = macro name
-%
-% Example:
-%
-% \pgfgettransform\mytransform
-
-\def\pgfgettransform#1{%
- \edef#1{{\pgf@pt@aa}{\pgf@pt@ab}{\pgf@pt@ba}{\pgf@pt@bb}{\the\pgf@pt@x}{\the\pgf@pt@y}}
-}
-
-
-% Restore the current transformation matrix from a macro.
-%
-% #1 = macro name, previously used with \pgfgettransform
-%
-% Example:
-%
-% \pgfsettransform\mytransform
-
-\def\pgfsettransform#1{%
- \edef\pgf@temp{#1}%
- \expandafter\pgf@settransform\pgf@temp%
-}
-\def\pgf@settransform#1#2#3#4#5#6{%
- \def\pgf@pt@aa{#1}%
- \def\pgf@pt@ab{#2}%
- \def\pgf@pt@ba{#3}%
- \def\pgf@pt@bb{#4}%
- \pgf@pt@x=#5%
- \pgf@pt@y=#6%
- \edef\pgf@idtest{#1,#2,#3,#4}%
- \ifx\pgf@idtest\pgf@idmatrixtext%
- \pgf@pt@identitytrue%
- \else%
- \pgf@pt@identityfalse%
- \fi%
-}
-
-\def\pgf@idmatrixtext{1.0,0.0,0.0,1.0}
-
-
-% Transformation command
-%
-% #1 = x dimension
-% #2 = y dimension
-%
-% Description:
-%
-% Applies the pgfs transformation matrix to the point (#1,#2). The
-% result is once more stored in the point.
-%
-%
-% Example:
-%
-% \pgf@pos@transform{\pgf@x}{\pgf@y}
-
-\def\pgf@pos@transform#1#2{%
- \ifpgf@pt@identity%
- \else%
- \pgf@pt@temp=#1%
- #1=\pgf@pt@aa#1%
- \advance#1 by\pgf@pt@ba#2%
- #2=\pgf@pt@bb#2%
- \advance#2 by\pgf@pt@ab\pgf@pt@temp%
- \fi%
- \advance#1 by\pgf@pt@x%
- \advance#2 by\pgf@pt@y%
-}
-
-
-% Invert the current transformation matrix
-%
-% Description:
-%
-% This command replaces the current transformation matrix by its
-% inverse. The inversion is not very exact if the matrix is nearly
-% singular.
-%
-% Example:
-%
-% \pgftransforminvert
-
-\def\pgftransforminvert{%
- % First, invert the shift. That's easy
- \pgf@pt@x=-\pgf@pt@x
- \pgf@pt@y=-\pgf@pt@y
- \ifpgf@pt@identity%
- \else%
- % Sigh. Have to calculate the inverse of the matrix.
- % Start with determinant
- % Matrix = (aa ab
- % ba bb)
- {%
- \pgfutil@tempdima=\pgf@pt@aa pt%
- \pgfutil@tempdima=\pgf@pt@bb\pgfutil@tempdima% aa * bb
- \pgfutil@tempdimb=\pgf@pt@ba pt%
- \pgfutil@tempdimb=\pgf@pt@ab\pgfutil@tempdimb% ba * ab
- \advance\pgfutil@tempdima by -\pgfutil@tempdimb% aa*bb - ba*ab
- % Invert
- \pgfutil@tempdima=.125\pgfutil@tempdima%
- \c@pgf@counta=\pgfutil@tempdima\relax% 8192*determinant
- \pgfutil@tempdima=8192pt%
- \divide\pgfutil@tempdima by\c@pgf@counta%
- \pgf@x=\pgf@pt@bb\pgfutil@tempdima% bb/(det A)
- \xdef\pgf@new@pt@aa{\pgf@sys@tonumber{\pgf@x}}%
- \pgf@x=\pgf@pt@aa\pgfutil@tempdima% aa/(det A)
- \xdef\pgf@new@pt@bb{\pgf@sys@tonumber{\pgf@x}}%
- \pgfutil@tempdima=-\pgfutil@tempdima%
- \pgf@x=\pgf@pt@ba\pgfutil@tempdima% -ba/(det A)
- \xdef\pgf@new@pt@ba{\pgf@sys@tonumber{\pgf@x}}%
- \pgf@x=\pgf@pt@ab\pgfutil@tempdima% -ab/(det A)
- \xdef\pgf@new@pt@ab{\pgf@sys@tonumber{\pgf@x}}%
- }%
- \expandafter\def\expandafter\pgf@pt@aa\expandafter{\pgf@new@pt@aa}%
- \expandafter\def\expandafter\pgf@pt@ab\expandafter{\pgf@new@pt@ab}%
- \expandafter\def\expandafter\pgf@pt@ba\expandafter{\pgf@new@pt@ba}%
- \expandafter\def\expandafter\pgf@pt@bb\expandafter{\pgf@new@pt@bb}%
- \pgf@pt@temp=\pgf@pt@x%
- \pgf@pt@x=\pgf@pt@aa\pgf@pt@x%
- \advance\pgf@pt@x by\pgf@pt@ba\pgf@pt@y%
- \pgf@pt@y=\pgf@pt@bb\pgf@pt@y%
- \advance\pgf@pt@y by\pgf@pt@ab\pgf@pt@temp%
- \fi%
-}
-
-
-
-
-% PGF-Level concatenation of the transformation matrix with a given
-% matrix.
-%
-% #1 - #5 = a concatenation matrix (see pdf spec). Entry #5 is a
-% translation point.
-%
-% Description:
-%
-% All coordinates given to subsequent path construction commands will
-% be transformed additionally by the given transformation matrix. If
-% the command is followed by a 6th argument, the transformation is
-% only applied to this argument.
-%
-%
-% Example:
-%
-% \pgftransformcm{1}{0}{0}{1}{\pgfpoint{100pt}{0pt}} % 100pt to the right.
-%
-% \pgftransformcm{2}{0}{0}{2}{\pgfpointorigin} % double in in size
-% \pgfpathmoveto{\pgfpoint{0cm}{0cm}}
-% \pgfpathlineto{\pgflineto{1cm}{1cm}} % actually 2cm/2cm
-
-\def\pgftransformcm#1#2#3#4#5{%
- \edef\pgf@marshal{\noexpand\pgf@transformcm{#1}{#2}{#3}{#4}}%
- \pgf@marshal{#5}%
-}
-\def\pgf@transformcm#1#2#3#4#5{%
- {%
- \pgf@process{#5}%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- %
- \pgf@x=#1pt%
- \pgf@y=#2pt%
- %
- \pgf@xa=\pgf@pt@aa\pgf@x%
- \advance\pgf@xa by \pgf@pt@ba\pgf@y%
- %
- \pgf@ya=\pgf@pt@ab\pgf@x%
- \advance\pgf@ya by \pgf@pt@bb\pgf@y%
- %
- \pgf@x=#3pt%
- \pgf@y=#4pt%
- %
- \pgf@xb=\pgf@pt@aa\pgf@x%
- \advance\pgf@xb by \pgf@pt@ba\pgf@y%
- %
- \pgf@yb=\pgf@pt@ab\pgf@x%
- \advance\pgf@yb by \pgf@pt@bb\pgf@y%
- %
- \pgf@x=\pgf@pt@aa\pgf@xc%
- \advance\pgf@x by\pgf@pt@ba\pgf@yc%
- \advance\pgf@x by\pgf@pt@x%
- %
- \pgf@y=\pgf@pt@ab\pgf@xc%
- \advance\pgf@y by\pgf@pt@bb\pgf@yc%
- \advance\pgf@y by\pgf@pt@y%
- %
- \global\pgf@x=\pgf@x%
- \global\pgf@y=\pgf@y%
- \xdef\pgf@tempaa{\pgf@sys@tonumber{\pgf@xa}}%
- \xdef\pgf@tempab{\pgf@sys@tonumber{\pgf@ya}}%
- \xdef\pgf@tempba{\pgf@sys@tonumber{\pgf@xb}}%
- \xdef\pgf@tempbb{\pgf@sys@tonumber{\pgf@yb}}%
- }%
- \pgf@pt@x=\pgf@x%
- \pgf@pt@y=\pgf@y%
- \let\pgf@pt@aa=\pgf@tempaa%
- \let\pgf@pt@ba=\pgf@tempba%
- \let\pgf@pt@ab=\pgf@tempab%
- \let\pgf@pt@bb=\pgf@tempbb%
- \def\pgf@trans@idtest{#1,#2,#3,#4}%
- \ifx\pgf@trans@idtest\pgf@trans@idtext%
- \else%
- \pgf@pt@identityfalse%
- \fi%
-}
-\def\pgf@trans@idtext{1.0,0,0,1.0}
-
-
-
-% Transformation into a given triangle. The three corners of the
-% triangle are called "origin", "x" and "y" are given. After this
-% transformation has been applied, the canvas origin is at "origin",
-% the vector (1pt,0pt) lies at "x" and the vector (0pt,1pt) lies at
-% "y".
-%
-% #1 = origin
-% #2 = x
-% #3 = y
-%
-% Example:
-%
-% \pgftransformtriangle{\pgfpointorigin}{\pgfpoint{1cm}{1cm}}{\pgfpoint{-1cm}{1cm}}
-
-\def\pgftransformtriangle#1#2#3{%
- \pgf@process{#2}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{#3}%
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- \pgf@process{#1}%
- \advance\pgf@xa by-\pgf@x%
- \advance\pgf@ya by-\pgf@y%
- \advance\pgf@xb by-\pgf@x%
- \advance\pgf@yb by-\pgf@y%
- \pgftransformcm%
- {\pgf@sys@tonumber\pgf@xa}{\pgf@sys@tonumber\pgf@ya}%
- {\pgf@sys@tonumber\pgf@xb}{\pgf@sys@tonumber\pgf@yb}%
- {\pgfpoint{\pgf@x}{\pgf@y}}%
-}
-
-
-
-% Undo all transformations
-%
-% Example:
-%
-% \pgftansformreset
-
-\def\pgftransformreset{%
- \pgf@pt@x=0pt%
- \pgf@pt@y=0pt%
- \def\pgf@pt@aa{1.0}%
- \def\pgf@pt@ba{0.0}%
- \def\pgf@pt@ab{0.0}%
- \def\pgf@pt@bb{1.0}%
- \pgf@pt@identitytrue%
-}
-
-
-% Undo all slanting/rotation, but not translations
-%
-% Example:
-%
-% \pgftansformreset
-
-\def\pgftransformresetnontranslations{%
- \def\pgf@pt@aa{1.0}%
- \def\pgf@pt@ba{0.0}%
- \def\pgf@pt@ab{0.0}%
- \def\pgf@pt@bb{1.0}%
- \pgf@pt@identitytrue%
-}
-
-
-
-
-% Shifting command and environment
-%
-% #1 = vector by which all subsequent points should be moved.
-%
-% Example:
-%
-% \pgftansformshift{\pgfpoint{1cm}{1cm}}
-
-\def\pgftransformshift#1{\pgftransformcm{1.0}{0}{0}{1.0}{#1}}
-\def\pgftransformxshift#1{\pgftransformcm{1.0}{0}{0}{1.0}{\pgfpoint{#1}{0pt}}}
-\def\pgftransformyshift#1{\pgftransformcm{1.0}{0}{0}{1.0}{\pgfpoint{0pt}{#1}}}
-
-
-
-
-% Scaling commands
-%
-% #1 = scaling for all subsequent points.
-%
-% Example:
-%
-% \pgftransformscale{2}
-% \pgftransformxscale{2}
-% \pgftransformyscale{2}
-
-\def\pgftransformscale#1{\pgftransformcm{#1}{0}{0}{#1}{\pgfpointorigin}}
-\def\pgftransformxscale#1{\pgftransformcm{#1}{0}{0}{1.0}{\pgfpointorigin}}
-\def\pgftransformyscale#1{\pgftransformcm{1.0}{0}{0}{#1}{\pgfpointorigin}}
-
-
-
-% Slanting commands
-%
-% #1 = slanting in x-direction. 1 means 45 degrees.
-%
-% Example:
-%
-% \pgftransformxslant{2}
-% \pgftransformyslant{2}
-
-\def\pgftransformxslant#1{\pgftransformcm{1.0}{0}{#1}{1.0}{\pgfpointorigin}}
-\def\pgftransformyslant#1{\pgftransformcm{1.0}{#1}{0}{1.0}{\pgfpointorigin}}
-
-
-
-% Rotation commands
-%
-% #1 = degrees for the rotation
-%
-% Example:
-%
-% \pgftransformrotate{30}
-
-\def\pgftransformrotate#1{%
- \pgfmathparse{#1}%
- \let\pgftransform@angle=\pgfmathresult%
- \pgfmathsin@{\pgftransform@angle}%
- \let\pgftransform@sin=\pgfmathresult%
- \pgfmathcos@{\pgftransform@angle}%
- \let\pgftransform@cos=\pgfmathresult%
- \pgf@x=\pgftransform@sin pt%
- \pgf@xa=-\pgf@x%
- \pgftransformcm{\pgftransform@cos}{\pgftransform@sin}{\pgf@sys@tonumber{\pgf@xa}}{\pgftransform@cos}{\pgfpointorigin}%
-}
-
-
-
-% The following if's have the following effect:
-%
-% \ifpgfslopedattime decides whether the coordinate system of an
-% xxxattime transformation command should be rotated such that text
-% drawn on the line should be tangent to the line
-%
-% \ifpgfallowupsidedowattime decides whether the transformation should
-% be done in such a way that the text is always ``upright,'' that is,
-% text drawn in this coordiante system is never upside-down.
-%
-% \ifpgfresetnontranslationattime decides whether the coordinate
-% system of an xxxattime transformation command should be reset
-% (concerning the non-translations) before a possible rotation is
-% applied. This is useful, for example, if the main coordinate system
-% is scaled by, say, a factor of 2 and you do not want that to apply
-% to the text, but you do want the rotation to applyu.
-
-\newif\ifpgfslopedattime
-\newif\ifpgfallowupsidedownattime
-\newif\ifpgfresetnontranslationattime
-
-
-% Transform to the coordinate system of a point on a line
-%
-% #1 = a time fraction of line where to put the label, where 0 means start,
-% 1 means end, and for example 0.5 means the middle.
-% #2 = start of line
-% #3 = end of line
-%
-% Example:
-%
-% {
-% \pgftransformlineattime{.5}{\pgfxy(0,0)}{\pgfxy(3,2)}
-% \pgftext{Hi!}
-% }
-%
-% {
-% \pgftransformlineattime{.75}{\pgfxy(0,0)}{\pgfxy(3,2)}
-% \pgftransformresetnontranslations
-% \pgftext{Hi!}
-% }
-%
-\def\pgftransformlineattime#1#2#3{%
- \pgftransformshift{\pgfpointlineattime{#1}{#2}{#3}}%
- \ifpgfresetnontranslationattime%
- \pgftransformresetnontranslations%
- \fi%
- \ifpgfslopedattime%
- \pgf@process{#2}%
- \pgf@xa=\pgf@x% xb/yb = start point
- \pgf@ya=\pgf@y%
- \pgf@process{#3}%
- \advance\pgf@x by-\pgf@xa%
- \advance\pgf@y by-\pgf@ya%
- \ifpgfallowupsidedownattime%
- \else%
- \ifdim\pgf@x<0pt%
- \pgf@x=-\pgf@x%
- \pgf@y=-\pgf@y%
- \fi%
- \fi%
- \pgfpointnormalised{}% x/y = normalised vector
- \pgf@ya=-\pgf@y%
- \pgftransformcm%
- {\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}%
- {\pgf@sys@tonumber{\pgf@ya}}{\pgf@sys@tonumber{\pgf@x}}{\pgfpointorigin}%
- \fi%
-}
-
-
-
-
-% Transform to the coordinate system of a point on a curve
-%
-% #1 = a time fraction of line where to put the label, where 0 means start,
-% 1 means end, and for example 0.5 means the middle.
-% #2 = start of line
-% #3 = first control
-% #4 = second control
-% #5 = end of line
-%
-% Example:
-%
-% {
-% \pgftransformlabel{.5}{\pgfxy(0,0)}{\pgfxy(3,2)}
-% \pgftext{Hi!}
-% }
-%
-% {
-% \pgftransformlabel{.75}{\pgfxy(0,0)}{\pgfxy(3,2)}
-% \pgftransformresetnontranslations
-% \pgftext{Hi!}
-% }
-%
-\def\pgftransformcurveattime#1#2#3#4#5{%
- \pgfpointcurveattime{#1}{#2}{#3}{#4}{#5}%
- \pgftransformshift{\pgfqpoint{\pgf@x}{\pgf@y}}%
- \ifpgfresetnontranslationattime%
- \pgftransformresetnontranslations%
- \fi%
- \ifpgfslopedattime%
- \pgf@x=\pgf@xa%
- \pgf@y=\pgf@ya%
- \advance\pgf@x by-\pgf@xb%
- \advance\pgf@y by-\pgf@yb%
- \ifpgfallowupsidedownattime%
- \else%
- \ifdim\pgf@x<0pt%
- \pgf@x=-\pgf@x%
- \pgf@y=-\pgf@y%
- \fi%
- \fi%
- \pgfpointnormalised{}% x/y = normalised vector
- \pgf@ya=-\pgf@y%
- \pgftransformcm%
- {\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}%
- {\pgf@sys@tonumber{\pgf@ya}}{\pgf@sys@tonumber{\pgf@x}}{\pgfpointorigin}%
- \fi%
-}
-
-
-
-
-
-% Transform to the coordinate system of an arrow at the end of the
-% line going from point #1 to point #2 with the correct rotation.
-%
-% #1 = a start point an (invisible) line
-% #2 = an end point an (invisible) line
-%
-% Example:
-%
-% \pgftransformarrow{\pgfpointorigin}{\pgfpoint{1cm}{0cm}}
-
-\def\pgftransformarrow#1#2{%
- \pgftransformshift{#2}%
- \pgf@process{#2}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{#1}%
- \advance\pgf@xa by-\pgf@x%
- \advance\pgf@ya by-\pgf@y%
- \pgf@x=\pgf@xa%
- \pgf@y=\pgf@ya%
- \pgfpointnormalised{}%
- \pgf@ya=-\pgf@y%
- \pgftransformcm%
- {\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}%
- {\pgf@sys@tonumber{\pgf@ya}}{\pgf@sys@tonumber{\pgf@x}}{\pgfqpoint{0pt}{0pt}}%
-}
-
-
-
-% Low-level transformations
-
-% Causes the current high-level transformation command to be applied
-% to the low-level.
-%
-% Description:
-%
-% All subsequent drawing will be transformed additionally by the
-% current high-level transformation. Thus, the high-level
-% transformation becomes the low-level transformation. The high-level
-% transformation is reset at this point.
-
-\def\pgflowlevelsynccm{%
- \pgfsys@transformcm%
- {\pgf@pt@aa}{\pgf@pt@ab}%
- {\pgf@pt@ba}{\pgf@pt@bb}%
- {\pgf@pt@x}{\pgf@pt@y}%
- \pgftransformreset%
- \pgf@relevantforpicturesizefalse%
-}
-
-
-
-% Causes a transformation command to be applied to the ``lowlevel''
-% transformation matrix.
-%
-% #1 - a high-level transformation command
-%
-% Description:
-%
-% All subsequent drawing will be transformed additionally by the given
-% transformation matrix. Note that PGF will no longer be able to
-% ``keep track'' of the coordinates. Also, transformations are applied
-% to *everything*, including line thickness and line endings. Most
-% often, this is not desirable.
-%
-% Example:
-%
-% \pgflowlevel{\pgftransformcm{1}{0}{0}{1}{\pgfpoint{100pt}{0pt}}} % 100bp to the right.
-%
-% \begin{pgflowlevelscope}{\pgftransformcm{2}{0}{0}{2}{\pgfpointorigin}} % double in in size
-% \pgfmoveto{\pgfpoint{0cm}{0cm}}
-% \pgflineto{\pgflineto{1cm}{1cm}} % actually 2cm/2cm
-% \end{pgflowlevelscope}
-
-\def\pgflowlevel#1{%
- {%
- \pgftransformreset%
- #1%
- \pgflowlevelsynccm%
- }%
- \pgf@relevantforpicturesizefalse%
-}
-
-\def\pgflowlevelscope#1{\pgfscope\pgflowlevel{#1}}
-\def\endpgflowlevelscope{\endpgfscope}
-
-\long\def\pgflowlevelobj#1#2{\pgfscope{\pgflowlevel{#1}#2}\endpgfscope}
-
-
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
new file mode 100644
index 00000000000..3048e6077fe
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
@@ -0,0 +1,222 @@
+% Copyright 2007 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoretransparency.code.tex,v 1.2 2008/01/17 20:09:16 tantau Exp $
+
+
+% Sets the opacity of stroking operations.
+%
+% #1 = opacity, where 1 means fully opaque and 0 means fully
+% transparent.
+%
+% Example:
+%
+% \pgfsetstrokeopacity{0.5}
+
+\def\pgfsetstrokeopacity#1{%
+ \pgfmathparse{#1}%
+ \expandafter\pgfsys@stroke@opacity\expandafter{\pgfmathresult}}
+
+
+% Sets the opacity of stroking operations.
+%
+% #1 = opacity, where 1 means fully opaque and 0 means fully
+% transparent.
+%
+% Example:
+%
+% \pgfsetfillopacity{0.5}
+
+\def\pgfsetfillopacity#1{%
+ \pgfmathparse{#1}%
+ \expandafter\pgfsys@fill@opacity\expandafter{\pgfmathresult}}
+
+
+
+% Declares a new fading based on the contents of a box.
+%
+% #1 = name of the fading
+% #2 = content of a TeX box that specifies the fading
+%
+% Description:
+%
+% This command declares a new fading based on the contents of
+% the TeX box. The mask can later be used to mask other graphics.
+%
+% The box is used to determine where the mask is opaque: At the
+% beginning, the mask is completely transparent. Whereever the box
+% contains something (like text or a picture or whatever), the
+% luminosity of the text/graphic is used to determine how opaque the
+% point will be. The greater the luminosity, the more opaque. The net
+% effect is that white corresponds to "completely opaque" and black to
+% "completely transparent". This is rather counterintuitive. Because
+% of this, the special color "pgftransparent" is defined, which is the
+% same as black. By setting the color to, say,
+% \color{pgftransparent!10} you get something that is 10% transparent
+% and \color{pgftransparent!90} gives you 90% transparency.
+%
+% By default, the drawing color is set to opaque.
+%
+% Example:
+%
+% \pgfdeclarefading{mymask}{
+% \fontsize{200}{200}\bfseries
+% Ti\emph{k}Z
+% }
+% \pgfdeclarefading{myothermask}{
+% \tikz \shade [left color=transparent,right color=transparent!0]
+% (0,0) rectangle (5,5);
+% }
+
+\def\pgfdeclarefading#1#2{%
+ \setbox\pgfutil@tempboxa=\hbox{{\pgfsys@beginscope\pgfutil@color{white}\ignorespaces#2\pgfsys@endscope}}%
+ \pgfsys@fadingfrombox{#1}\pgfutil@tempboxa%
+}
+
+\pgfutil@colorlet{pgftransparent}{black}
+
+
+% Use a previously declared fading.
+%
+% #1 = name of the fading
+% #2 = transformation code
+%
+% Description:
+%
+% The command should be used *inside* a pgfpicture to install a
+% fading. The fading is a part of the graphic state. (This command
+% works much like \pgfsetstrokeopacity).
+%
+% The mask will be centered on the origin. The transformation code #2 is
+% applied to the mask (but not the contents of the actual picture).
+
+\def\pgfsetfading#1#2{%
+ {%
+ \pgftransformreset%
+ #2%
+ \pgfgettransform{\pgftrans@temp}%
+ \edef\pgf@marshal{\noexpand\pgfsys@usefading{#1}\pgftrans@temp}%
+ \pgf@marshal%
+ }%
+}
+
+
+
+% Use a previously declared fading scaled for the current path.
+%
+% #1 - an fading
+% #2 - extra transformations
+%
+% Description:
+%
+% This command works a bit like \pgfshadepath. "Works a bit like"
+% means the following: The masks's original size should
+% completely cover the area between (0,0) and (100bp,100bp). The
+% mask is then rescaled so that it completely covers the path. Then
+% the additional transformation #2 is applied. Finally, the mask is
+% made part of the graphic state (as with \pgfsetfading). The path
+% used for computation purposes only -- it is not drawn or otherwise
+% used.
+%
+% If no transformations occur, the lower left corner of the path will
+% lie on (25bp, 25bp), the upper right corner on (75bp, 75bp).
+%
+% If the path was empty, the fading will be used at its natural size,
+% centered on the origin.
+%
+% Example:
+%
+% \pgfdeclarefading{fade right}
+% {\tikz[left color=transparent!0,right color=transparent!100]
+% (0,0) rectangle (100bp,100bp);}
+%
+% \pgfpathmoveto{\pgforigin}
+% \pgfpathlineto{\pgfxy(1,0)}
+% \pgfpathlineto{\pgfxy(1,1)}
+% \pgfsetfadingforcurrentpath{fade right}{}
+% \pgfusepath{fill}
+
+\def\pgfsetfadingforcurrentpath#1#2{%
+ \ifdim\pgf@pathminx=16000pt%
+ % Path was empty -> use natural size
+ \pgfsetfading{#1}{#2}%
+ \else%
+ \pgfsetfading{#1}{%
+ % Calculate center:
+ \pgf@xb=.5\pgf@pathmaxx%
+ \advance\pgf@xb by.5\pgf@pathminx%
+ \pgf@yb=.5\pgf@pathmaxy%
+ \advance\pgf@yb by.5\pgf@pathminy%
+ % Calculate scaling:
+ \pgf@xc=\pgf@pathmaxx%
+ \advance\pgf@xc by-\pgf@pathminx%
+ \pgf@yc=\pgf@pathmaxy%
+ \advance\pgf@yc by-\pgf@pathminy%
+ \pgf@xc=.02\pgf@xc%
+ \pgf@yc=.02\pgf@yc%
+ % Compute new transformation matrix:
+ \pgftransformcm{1}{0}{0}{1}{\pgfqpoint{\pgf@xb}{\pgf@yb}}%
+ \pgftransformcm{\pgf@sys@tonumber{\pgf@xc}}{0}{0}{\pgf@sys@tonumber{\pgf@yc}}{\pgfpointorigin}%
+ #2%
+ }%
+ \fi%
+}
+
+
+
+
+% Group things in a a transparency group
+%
+% Description:
+%
+% This takes groups pgf commands inside a pgfpicture in a transparency
+% group. This means that any transparency settings apply to commands a
+% whole. For instance, if a box contains two overlapping black
+% circles and you draw them normally with 50% transparency, then the
+% overlap will be darker than the rest. By comparison, if the circles
+% are part of a transparency group, the overlap will get the same
+% color as the rest.
+%
+%
+
+\def\pgftransparencygroup{%
+ \begingroup%
+ \setbox\pgfutil@tempboxa=\hbox\bgroup%
+}
+\def\endpgftransparencygroup{%
+ \egroup%
+ % Now compute the correct position. This is a bit tricky...
+ \ifdim\pgf@picminx=16000pt%
+ % Nothing needs to be done
+ \else%
+ % Safety margin to avoid clipping:
+ \advance\pgf@picminx by-1cm%
+ \advance\pgf@picmaxx by1cm%
+ \advance\pgf@picminy by-1cm%
+ \advance\pgf@picmaxy by1cm%
+ % Ok, set the box size to current picture size.
+ \setbox\pgfutil@tempboxa=\hbox{%
+ \vrule width0pt height\pgf@picmaxy depth-\pgf@picminy%
+ \hskip-\pgf@picminx%
+ \box\pgfutil@tempboxa%
+ \hskip\pgf@picmaxx%
+ }%
+ \pgfsys@transparencygroupfrombox\pgfutil@tempboxa%
+ \wd\pgfutil@tempboxa=0pt%
+ \ht\pgfutil@tempboxa=0pt%
+ \dp\pgfutil@tempboxa=0pt%
+ \hskip\pgf@picminx\box\pgfutil@tempboxa\hskip-\pgf@picminx%
+ \fi%
+ \endgroup%
+}
+
+\let\startpgftransparencygroup=\pgftransparencygroup
+\let\stoppgftransparencygroup=\endpgftransparencygroup
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikz3d.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary3d.code.tex
index d980b557feb..3d2cecc732f 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikz3d.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary3d.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikz3d.code.tex,v 1.3 2006/10/11 15:22:26 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary3d.code.tex,v 1.1 2008/01/09 17:57:15 tantau Exp $
@@ -15,25 +15,25 @@
\tikzdeclarecoordinatesystem{xyz cylindrical}
{%
- \setkeys{tikzcskeys}{angle=0,radius=0,z=0,#1}%
+ \pgfset{/tikz/cs/.cd,angle=0,radius=0,z=0,#1}%
\pgfpointcylindrical{\tikz@cs@angle}{\tikz@cs@radius}{\tikz@cs@z}%
}
\tikzdeclarecoordinatesystem{xyz spherical}
{%
- \setkeys{tikzcskeys}{angle=0,radius=0,latitude=0,longitude=0,#1}%
+ \pgfset{/tikz/cs/.cd,angle=0,radius=0,latitude=0,longitude=0,#1}%
\pgfpointspherical{\tikz@cs@angle}{\tikz@cs@latitude}{\tikz@cs@radius}%
}
-\define@key{tikzcskeys}{longitude}{\def\tikz@cs@angle{#1}}
-\define@key{tikzcskeys}{latitude}{\def\tikz@cs@latitude{#1}}
+\pgfset{/tikz/cs/longitude/.store in=\tikz@cs@angle}
+\pgfset{/tikz/cs/latitude/.store in=\tikz@cs@latitude}
% Options for transforming into a plane:
-\tikzoption{plane origin}{\def\tikz@plane@origin{\tikz@scan@one@point\@firstofone#1}}
-\tikzoption{plane x}{\def\tikz@plane@x{\tikz@scan@one@point\@firstofone#1}}
-\tikzoption{plane y}{\def\tikz@plane@y{\tikz@scan@one@point\@firstofone#1}}
+\tikzoption{plane origin}{\def\tikz@plane@origin{\tikz@scan@one@point\pgfutil@firstofone#1}}
+\tikzoption{plane x}{\def\tikz@plane@x{\tikz@scan@one@point\pgfutil@firstofone#1}}
+\tikzoption{plane y}{\def\tikz@plane@y{\tikz@scan@one@point\pgfutil@firstofone#1}}
\let\tikz@plane@origin=\pgfpointorigin
\def\tikz@plain@x{\pgfpointxy{1}{0}}
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzarrows.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryarrows.code.tex
index 2ca988c5493..7926021f8e6 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzarrows.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryarrows.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzarrows.code.tex,v 1.2 2006/10/11 15:22:26 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryarrows.code.tex,v 1.1 2008/01/09 17:57:15 tantau Exp $
\usepgflibrary{arrows}
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzautomata.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryautomata.code.tex
index d30f8abb767..12b6bddfe0d 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzautomata.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryautomata.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzautomata.code.tex,v 1.3 2006/10/11 15:22:26 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryautomata.code.tex,v 1.2 2008/02/14 10:31:22 tantau Exp $
% Styles for states:
@@ -47,6 +47,8 @@
}]
\tikzstyle{every initial by arrow}=[]
+\tikzstyle{initial by diamond}=[shape=diamond]
+
\tikzoption{initial text}{\tikzaddafternodepathoption{\def\tikz@initial@text{#1}}}
\tikzoption{accepting text}{\tikzaddafternodepathoption{\def\tikz@accepting@text{#1}}}
@@ -55,7 +57,7 @@
\tikzoption{accepting where}{\tikzaddafternodepathoption{\csname tikz@accepting@compute@#1\endcsname}}
\tikzoption{initial distance}{\tikzaddafternodepathoption{\def\tikz@initial@distance{#1}}}
-\tikzoption{accepting distance}{\tikzaddafternodepathoption{\def\tikz@initial@distance{#1}}}
+\tikzoption{accepting distance}{\tikzaddafternodepathoption{\def\tikz@accepting@distance{#1}}}
\def\tikz@initial@text{start}
\def\tikz@accepting@text{}
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzbackgrounds.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybackgrounds.code.tex
index 5ae08cdf634..c1a25628a08 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzbackgrounds.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybackgrounds.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzbackgrounds.code.tex,v 1.5 2007/04/11 13:04:15 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybackgrounds.code.tex,v 1.1 2008/01/09 17:57:15 tantau Exp $
% Layers
@@ -25,15 +25,15 @@
\tikzstyle{background right}= [draw]
\tikzstyle{background grid}= [help lines,draw]
-\define@key{tikz}{inner frame sep}{\def\tikz@framexsep{#1}\def\tikz@frameysep{#1}}
-\define@key{tikz}{inner frame xsep}{\def\tikz@framexsep{#1}}
-\define@key{tikz}{inner frame ysep}{\def\tikz@frameysep{#1}}
+\tikzoption{inner frame sep}{\def\tikz@framexsep{#1}\def\tikz@frameysep{#1}}
+\tikzoption{inner frame xsep}{\def\tikz@framexsep{#1}}
+\tikzoption{inner frame ysep}{\def\tikz@frameysep{#1}}
\def\tikz@framexsep{1ex}
\def\tikz@frameysep{1ex}
-\define@key{tikz}{outer frame sep}{\def\tikz@outerframexsep{#1}\def\tikz@outerframeysep{#1}}
-\define@key{tikz}{outer frame xsep}{\def\tikz@outerframexsep{#1}}
-\define@key{tikz}{outer frame ysep}{\def\tikz@outerframeysep{#1}}
+\tikzoption{outer frame sep}{\def\tikz@outerframexsep{#1}\def\tikz@outerframeysep{#1}}
+\tikzoption{outer frame xsep}{\def\tikz@outerframexsep{#1}}
+\tikzoption{outer frame ysep}{\def\tikz@outerframeysep{#1}}
\def\tikz@outerframexsep{0ex}
\def\tikz@outerframeysep{0ex}
@@ -61,6 +61,7 @@
% Implementation
\def\tikz@background@save{%
+ \pgftransformreset%
\ifx\tikz@bg@minx\@undefined%
\pgf@xb=\pgf@picminx%
\pgf@yb=\pgf@picminy%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex
new file mode 100644
index 00000000000..f79f5343bb5
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex
@@ -0,0 +1,549 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex,v 1.5 2008/02/04 17:19:55 tantau Exp $
+
+%
+%
+% Part I: The let path command
+%
+%
+
+
+%
+% Syntax: let \p{name1} = (coord), \p{name2} = (coord), ... in ...
+%
+% Currently (this may get more fancy in the future), the (coord)s are
+% evaluated one by one. If the first evaluates to, say, (10pt,20pt),
+% the macro \p{name1} is set to "10pt,20pt" (without parantheses), the
+% macro \x{name1} is set to "10pt" and the macro \y{name1} is set to
+% "20pt".
+%
+% If you use a number for {name}, you need no parantheses, so you
+% could write:
+%
+% \draw let
+% \p1 = (1,1),
+% \p2 = ($ 2.5*(3,2) $)
+% in
+% (\x1,\x2) -- (\y1,\y2);
+
+\def\tikz@let@command et{%
+ \let\p=\tikz@cc@dop%
+ \let\x=\tikz@cc@dox%
+ \let\y=\tikz@cc@doy%
+ \let\n=\tikz@cc@don%
+ \pgfutil@ifnextchar i{\tikz@cc@stop@let}{\tikz@cc@handle@line}%
+}
+\def\tikz@cc@handle@line{%
+ \pgfutil@ifnextchar\p{%
+ \tikz@cc@handle@coor%
+ }{%
+ \pgfutil@ifnextchar\n{%
+ \tikz@cc@handle@num%
+ }{%
+ \PackageError{tikz}{``\string\p'' or ``\string\n'' expected}{}%
+ }%
+ }%
+}
+\def\tikz@cc@handle@num\n#1#2=#3{%
+ \pgfmathparse{#3}%
+ \expandafter\edef\csname tikz@cc@n@#1\endcsname{\pgfmathresult\ifpgfmathunitsdeclared pt\fi}
+ \pgfutil@ifnextchar,{\tikz@cc@handle@nextline}{\tikz@cc@stop@let}%
+}
+\def\tikz@cc@handle@coor\p#1#2={%
+ \def\tikz@cc@coord@name{#1}%
+ \tikz@scan@one@point\tikz@cc@dolet%
+}
+\def\tikz@cc@dolet#1{%
+ \pgf@process{#1}%
+ \expandafter\edef\csname tikz@cc@p@\tikz@cc@coord@name\endcsname{\the\pgf@x,\the\pgf@y}%
+ \expandafter\edef\csname tikz@cc@x@\tikz@cc@coord@name\endcsname{\the\pgf@x}%
+ \expandafter\edef\csname tikz@cc@y@\tikz@cc@coord@name\endcsname{\the\pgf@y}%
+ \pgfutil@ifnextchar,{\tikz@cc@handle@nextline}{\tikz@cc@stop@let}%
+}
+\def\tikz@cc@handle@nextline,{%
+ \tikz@cc@handle@line%
+}
+\def\tikz@cc@stop@let in{%
+ \tikz@scan@next@command%
+}%
+
+\def\tikz@cc@dop#1{\csname tikz@cc@p@#1\endcsname}
+\def\tikz@cc@dox#1{\csname tikz@cc@x@#1\endcsname}
+\def\tikz@cc@doy#1{\csname tikz@cc@y@#1\endcsname}
+\def\tikz@cc@don#1{\csname tikz@cc@n@#1\endcsname}
+
+
+
+%
+%
+% Part II: The ($...$) parser
+%
+%
+
+\def\tikz@parse@calculator#1(${%$
+ \def\tikz@cc@command{#1}%
+ \begingroup%
+ %
+ % Parse main computation. It's a series of optional factors in front
+ % of coordiantes.
+ %
+ \pgf@xa=0pt% We accumulate the result in here.
+ \pgf@ya=0pt%
+ \tikz@cc@parse+%
+}
+
+\def\tikz@cc@parse{%
+ \pgfutil@ifnextchar${%$
+ % Ok, we found the end...
+ \tikz@cc@end%
+ }
+ {\pgfutil@ifnextchar+{%
+ % Ok, we found a coordinate...
+ \tikz@cc@add%
+ }{%
+ \pgfutil@ifnextchar-{%
+ \tikz@cc@sub%
+ }{%
+ \PackageError{tikz}{+ or - expected}{}%
+ \tikz@cc@end$%$
+ }%
+ }%
+ }%
+}
+
+%
+% The end is reached with $
+%
+\def\tikz@cc@end$#1){%$
+ \xdef\tikz@marshal{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
+ \endgroup%
+ \expandafter\tikz@cc@command\expandafter{\tikz@marshal}%
+}
+
+
+%
+% Another coordinate with +/-, possibly with a factor
+%
+\def\tikz@cc@add+{%
+ \def\tikz@cc@factor{1}%
+ \tikz@cc@factororcoordinate%
+}
+\def\tikz@cc@sub-{%
+ \def\tikz@cc@factor{-1}%
+ \tikz@cc@factororcoordinate%
+}
+
+%
+% Check for a factor: If we see a (, its a coordinate...
+%
+\def\tikz@cc@factororcoordinate{%
+ \pgfutil@ifnextchar({%)
+ % Ok, found coordinate
+ \tikz@cc@coordinate%
+ }{%
+ \tikz@cc@parse@factor%
+ }%
+}
+
+%
+% ... otherwise it's a factor. It ends at ...*(
+%
+\def\tikz@cc@parse@factor#1*({%
+ \pgfmathparse{#1*\tikz@cc@factor}%
+ \let\tikz@cc@factor=\pgfmathresult%
+ \tikz@cc@coordinate(%)
+}
+
+\def\tikz@cc@coordinate{%
+ \tikz@scan@absolute\tikz@cc@after@coordinate%
+}
+\def\tikz@cc@after@coordinate#1{%
+ \pgf@process{#1}%
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ \tikz@cc@mid@checks%
+}
+
+
+%
+% A coordinate can be followed by !...!(...)
+%
+
+\def\tikz@cc@mid@checks{
+ \pgfutil@ifnextchar!{%
+ \tikz@cc@mid%
+ }{%
+ \advance\pgf@xa by\tikz@cc@factor\pgf@xb%
+ \advance\pgf@ya by\tikz@cc@factor\pgf@yb%
+ \tikz@cc@parse% continue
+ }%
+}
+
+\def\tikz@cc@mid!{%
+ \pgfutil@ifnextchar({%
+ \tikz@scan@one@point\tikz@cc@project%
+ }{%
+ \tikz@cc@mid@num%
+ }%
+}
+
+%
+% Partway case: (coord a)!number!(coord b)
+%
+% Returns the position that is at <number> fraction on the way from a
+% to b. This, (a)!0!(b) is (a), (a)!.5!(b) is the middle and (a)!1!(b)
+% is (b)
+%
+\def\tikz@cc@mid@num#1!{%
+ \pgfmathparse{#1}%
+ \ifpgfmathunitsdeclared%
+ \let\tikz@cc@mid@unit=\pgfmathresult%
+ \expandafter\tikz@cc@scan@rot\expandafter\tikz@cc@after@unit%
+ \else%
+ \let\tikz@cc@mid@factor=\pgfmathresult%
+ \pgfmathparse{1-\tikz@cc@mid@factor}%
+ \let\tikz@cc@mid@factor@one=\pgfmathresult%
+ \expandafter\tikz@cc@scan@rot\expandafter\tikz@cc@after@num%
+ \fi%
+}
+
+\def\tikz@cc@after@num#1{%
+ \pgf@process{#1}%
+ \pgf@xb=\tikz@cc@mid@factor@one\pgf@xb%
+ \pgf@yb=\tikz@cc@mid@factor@one\pgf@yb%
+ \advance\pgf@xb by\tikz@cc@mid@factor\pgf@x%
+ \advance\pgf@yb by\tikz@cc@mid@factor\pgf@y%
+ \tikz@cc@mid@checks%
+}
+
+
+
+%
+% Distance case: (coord a)!dimension!(coord b)
+%
+% Returns the position that is at <dimension> removed from (coord a)
+% in the direction of (coord b).
+%
+
+\def\tikz@cc@after@unit#1{%
+ \pgf@process{#1}%
+ \advance\pgf@x by-\pgf@xb%
+ \advance\pgf@y by-\pgf@yb%
+ \pgf@process{\pgfpointnormalised{}}%
+ \advance\pgf@xb by\tikz@cc@mid@unit\pgf@x%
+ \advance\pgf@yb by\tikz@cc@mid@unit\pgf@y%
+ \tikz@cc@mid@checks%
+}
+
+%
+% Projection case: (a)!(p)!(b)
+%
+% Projection of p on line from a to b
+%
+\def\tikz@cc@project#1{%
+ \pgf@process{#1}%
+ % Save in c
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ \expandafter\tikz@cc@scan@rot\expandafter\tikz@cc@after@project\tikz@cc@scan@ex%
+}
+
+\def\tikz@cc@scan@ex!{}
+
+\def\tikz@cc@after@project#1{%
+ \pgf@process{#1}%
+ % Ok, now we need to project (xc,yc) on the line (xb,xc) to (x,y)
+ \advance\pgf@x by-\pgf@xb%
+ \advance\pgf@y by-\pgf@yb%
+ \advance\pgf@xc by-\pgf@xb%
+ \advance\pgf@yc by-\pgf@yb%
+ \pgf@process{\pgfpointnormalised{}}%
+ % Scalar product
+ \pgf@xc=\pgf@sys@tonumber{\pgf@xc}\pgf@x%
+ \advance\pgf@xc by\pgf@sys@tonumber{\pgf@yc}\pgf@y%
+ % and add
+ \advance\pgf@xb by\pgf@sys@tonumber{\pgf@xc}\pgf@x%
+ \advance\pgf@yb by\pgf@sys@tonumber{\pgf@xc}\pgf@y%
+ \tikz@cc@mid@checks%
+}
+
+%
+% Rotational scanner: radius:(x)
+%
+
+\def\tikz@cc@scan@rot#1{%
+ \pgfutil@ifnextchar({%)
+ \tikz@scan@one@point#1% normal
+ }%
+ {
+ \def\tikz@cc@scan@rot@cmd{#1}
+ \tikz@cc@scan@one@rot%
+ }%
+}
+
+\def\tikz@cc@scan@one@rot#1:{%
+ \def\tikz@cc@scan@rot@angle{#1}%
+ \tikz@scan@one@point\tikz@cc@handle@rot%
+}
+
+\def\tikz@cc@handle@rot#1{%
+ \pgf@process{#1}%
+ % Ok, now we need to rotate x/y around xb/xb by ...rot@angle
+ {%
+ \pgftransformreset%
+ % Save them...
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ \pgftransformshift{\pgfqpoint{\pgf@xb}{\pgf@yb}}%
+ \pgftransformrotate{\tikz@cc@scan@rot@angle}%
+ \pgftransformshift{\pgfqpoint{-\pgf@xb}{-\pgf@yb}}%
+ \pgfpointtransformed{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
+ \expandafter
+ }%
+ \edef\tikz@marshal{\noexpand\tikz@cc@scan@rot@cmd{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
+ \tikz@marshal%
+}
+
+
+
+
+%
+%
+% Part III: Calculation coordinate systems
+%
+%
+
+% Tangent cs: Keys are a node and a point. Depending on the type of
+% node, the appropriate tanent computation should be done.
+
+\tikzdeclarecoordinatesystem{tangent}
+{%
+ \tikzset{cs/.cd,#1}%
+ \expandafter\ifx\csname tikz@tangent@\tikz@cs@type\endcsname\relax%
+ \PackageError{tikz}{I do not know how to compute the tangent to
+ a \tikz@cs@type}{}%
+ \pgfpointorigin%
+ \else%
+ \expandafter\tikz@scan@one@point\expandafter\tikz@lib@do@tangent\tikz@cs@point%
+ \fi%
+}
+
+\tikzset{cs/node/.code=\tikz@cs@unpack{\tikz@cs@node}{\tikz@cs@type}{#1}}
+\tikzset{cs/point/.store in=\tikz@cs@point}
+
+\def\tikz@lib@do@tangent{\csname tikz@tangent@\tikz@cs@type\endcsname}
+
+\def\tikz@tangent@coordinate#1{%
+ \pgfpointanchor{\tikz@cs@node}{center}%
+}
+
+\def\tikz@tangent@circle#1{%
+ {%
+ % Step 1: Compute the transformed position of the input:
+ \pgf@process{\pgfpointtransformed{#1}}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ %
+ % Step 2: Compute vector from center of circle to transformed #1
+ %
+ \pgf@process{\pgfpointtransformed{\pgfpointanchor{\tikz@cs@node}{center}}}%
+ \advance\pgf@xa by-\pgf@x%
+ \advance\pgf@ya by-\pgf@y%
+ %
+ % Step 2: Reset transformations, they distract...
+ %
+ \pgftransformreset%
+ %
+ % Step 3: Transform to the center of the circle.
+ %
+ \pgftransformshift{\pgfpointanchor{\tikz@cs@node}{center}}%
+ %
+ % Step 4: Compute the radius
+ %
+ \pgf@process{\pgfpointanchor{\tikz@cs@node}{east}}%
+ \pgf@xc=\pgf@x%
+ %
+ % Now, (xa,ya) is a point. Compute the tangent from this point to
+ % a circle around the origin of radius xc.
+ %
+ % acos(radius/veclen(xa,ya)) is the angle of the tangent.
+ \pgfmathparse{veclen(\the\pgf@xa,\the\pgf@ya)}
+ \pgfmathparse{acos(\the\pgf@xc/\pgfmathresult)}
+ \ifnum\pgfkeysvalueof{/tikz/cs/solution}>1\relax%
+ \pgfmathsubtract{0}{\pgfmathresult}%
+ \fi%
+ \let\tikz@lib@temp=\pgfmathresult%
+ %
+ % Now \pgfmathparse contains the desired angle. Use this to
+ % compute the correct position on the circle...
+ %
+ % But, first, rotate to the point.
+ \pgf@process{\pgfpointnormalised{\pgfqpoint{\pgf@xa}{\pgf@ya}}}%
+ \pgf@ya=-\pgf@y%
+ \pgftransformcm{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@ya}}{\pgf@sys@tonumber{\pgf@x}}{\pgfpointorigin}%
+ % Finally, rotate...
+ \pgf@process{\pgfpointtransformed{\pgfpointpolar{\tikz@lib@temp}{\the\pgf@xc}}}%
+ %
+ % Ok, undo transformations...
+ }%
+ % \pgf@x, \pgf@y have been smuggled outside by \pgf@process
+ {%
+ \pgftransforminvert%
+ \pgf@process{\pgfpointtransformed{}}%
+ }%
+}
+
+
+% Implementation of intersections
+
+
+\def\tikz@intersect@circle@and@circle{%
+ {%
+ \pgftransformreset% transformations only confuse us, here...
+ %
+ % Compute origin and radius of first circle
+ %
+ \pgf@process{\pgfpointanchor{\tikz@cs@node@a}{center}}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\pgfpointanchor{\tikz@cs@node@a}{east}}%
+ \advance\pgf@x by-\pgf@xa%
+ \pgf@xc=\pgf@x% ok, pgf@xc is first radius, (xa,ya) is center
+ %
+ % Compute origin and radius of second circle
+ %
+ \pgf@process{\pgfpointanchor{\tikz@cs@node@b}{center}}%
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ \pgf@process{\pgfpointanchor{\tikz@cs@node@b}{east}}%
+ \advance\pgf@x by-\pgf@xb%
+ \pgf@yc=\pgf@x% \pgf@yc is second radius, (xb,yb) is center
+ %
+ \pgf@process{%
+ \pgfpointintersectionofcircles{\pgfqpoint{\pgf@xa}{\pgf@ya}}{\pgfqpoint{\pgf@xb}{\pgf@yb}}{\pgf@xc}{\pgf@yc}{\pgfkeysvalueof{/tikz/cs/solution}}%
+ }%
+ }%
+ % \pgf@x, \pgf@y have been smuggled outside by \pgf@process,
+ % reinstall transformations...
+ {%
+ \pgftransforminvert%
+ \pgf@process{\pgfpointtransformed{}}%
+ }%
+}
+
+
+\def\tikz@intersect@line@and@circle{%
+ {%
+ %
+ % Step 1: Get line
+ %
+ \expandafter\tikz@scan@one@point\expandafter\tikz@parse@line\tikz@cs@line@a%
+ \pgf@process{\pgfpointtransformed{}}%
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ \pgf@process{\pgfpointtransformed{\pgfqpoint{\pgf@xc}{\pgf@yc}}}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ %
+ % Step 2: Subtract center of circle
+ %
+ \pgf@process{\pgfpointtransformed{\pgfpointanchor{\tikz@cs@node@b}{center}}}%
+ \advance\pgf@xa by-\pgf@x%
+ \advance\pgf@ya by-\pgf@y%
+ \advance\pgf@xb by-\pgf@x%
+ \advance\pgf@yb by-\pgf@y%
+ %
+ % Step 3: Reset transformations, they distract...
+ %
+ \pgftransformreset%
+ %
+ % Step 4: Transform to the center of the circle.
+ %
+ \pgftransformshift{\pgfpointanchor{\tikz@cs@node@b}{center}}%
+ %
+ % Step 5: Compute the radius
+ %
+ \pgf@process{\pgfpointanchor{\tikz@cs@node@b}{east}}%
+ \edef\tikz@lib@saved@radius{\pgf@sys@tonumber{\pgf@x}}%
+ %
+ % Step 6: Compute projection of origin on line (xa,ya) -- (xb,yb),
+ % store in (xa,ya)
+ \pgf@x=\pgf@xb%
+ \pgf@y=\pgf@yb%
+ \advance\pgf@x by-\pgf@xa%
+ \advance\pgf@y by-\pgf@ya%
+ \pgf@process{\pgfpointnormalised{}}%
+ % Scalar product
+ \pgf@xc=\pgf@sys@tonumber{\pgf@xa}\pgf@x%
+ \advance\pgf@xc by\pgf@sys@tonumber{\pgf@ya}\pgf@y%
+ \pgf@xc=-\pgf@xc%
+ % and add
+ \advance\pgf@xa by\pgf@sys@tonumber{\pgf@xc}\pgf@x%
+ \advance\pgf@ya by\pgf@sys@tonumber{\pgf@xc}\pgf@y%
+ %
+ % Now, we have a triangle with a right angle at (xa,ya). The
+ % second point of the triangle is the origin. The third point is
+ % sought.
+ % Save x/y
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ % Square radius
+ \pgf@xb=\tikz@lib@saved@radius pt%
+ %
+ % First, make numbers smaller, in case they are too large
+ %
+ \c@pgf@counta=1\relax%
+ \loop%
+ \ifdim\pgf@xb>50pt%
+ \multiply\c@pgf@counta by2\relax%
+ \divide\pgf@xa by2\relax%
+ \divide\pgf@ya by2\relax%
+ \divide\pgf@xb by2\relax%
+ \repeat%
+ \pgf@xb=\pgf@sys@tonumber{\pgf@xb}\pgf@xb%
+ % Subtract xa^2 + ya^2
+ \pgf@yb=\pgf@sys@tonumber{\pgf@xa}\pgf@xa%
+ \advance\pgf@xb by-\pgf@yb%
+ \pgf@yb=\pgf@sys@tonumber{\pgf@ya}\pgf@ya%
+ \advance\pgf@xb by-\pgf@yb%
+ % Square root
+ \ifdim\pgf@xb<0pt%
+ \pgf@xb=0pt%
+ \fi%
+ \pgfmathsqrt@{\pgf@sys@tonumber{\pgf@xb}}%
+ \pgfmathmultiply@{\pgfmathresult}{\the\c@pgf@counta}%
+ \multiply\pgf@xa by\c@pgf@counta\relax%
+ \multiply\pgf@ya by\c@pgf@counta\relax%
+ \ifnum\pgfkeysvalueof{/tikz/cs/solution}>1\relax%
+ \pgfmathsubtract{0}{\pgfmathresult}%
+ \fi%
+ % Ok, now add things...
+ \advance\pgf@xa by \pgfmathresult\pgf@xc%
+ \advance\pgf@ya by \pgfmathresult\pgf@yc%
+ \pgf@process{\pgfpointtransformed{\pgfqpoint{\pgf@xa}{\pgf@ya}}}%
+ % Ok, undo transformations...
+ }%
+ % \pgf@x, \pgf@y have been smuggled outside by \pgf@process
+ {%
+ \pgftransforminvert%
+ \pgf@process{\pgfpointtransformed{}}%
+ }%
+}
+
+\def\tikz@intersect@circle@and@line{%
+ % Swap
+ {%
+ \let\tikz@cs@node@b=\tikz@cs@node@a%
+ \let\tikz@cs@line@a=\tikz@cs@line@b%
+ \tikz@intersect@line@and@circle%
+ }%
+}
+
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzcalendar.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex
index ec8cc93531b..09729059297 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzcalendar.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzcalendar.code.tex,v 1.12 2007/03/09 17:49:32 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex,v 1.1 2008/01/09 17:57:15 tantau Exp $
\pgfutil@usemodule{pgfcalendar}
@@ -239,12 +239,12 @@
\tikzstyle{month label left}=[%
execute before day scope={\ifdate{day of month=1}{\tikzmonthcode}{}},
- set style={{every month}+=[anchor=base east,xshift=-3.5ex]}
+ every month/.append style={anchor=base east,xshift=-3.5ex}
]
\tikzstyle{month label left vertical}=[%
execute before day scope={\ifdate{day of month=1}{\tikzmonthcode}{}},
- set style={{every month}+=[anchor=base east,xshift=-4.5ex,yshift=2.25ex,rotate=90]}
+ every month/.append style={anchor=base east,xshift=-4.5ex,yshift=2.25ex,rotate=90}
]
\tikzstyle{month label right}=[%
@@ -255,7 +255,7 @@ execute before day scope={\ifdate{day of month=1}{%
\pgftransformxshift{-\pgf@xa}%
\tikzmonthcode%
}}{}},
- set style={{every month}+=[anchor=base west,xshift=1ex]}
+ every month/.append style={anchor=base west,xshift=1ex}
]
\tikzstyle{month label right vertical}=[%
@@ -266,7 +266,7 @@ execute before day scope={\ifdate{day of month=1}{%
\pgftransformxshift{-\pgf@xa}%
\tikzmonthcode%
}}{}},
- set style={{every month}+=[anchor=base west,xshift=2ex,yshift=2.25ex,rotate=-90]}
+ every month/.append style={anchor=base west,xshift=2ex,yshift=2.25ex,rotate=-90}
]
\tikzstyle{month label above centered}=[%
@@ -284,7 +284,7 @@ execute before day scope={\ifdate{day of month=1}{%
\tikzmonthcode%
}
}{}},
- set style={{every month}+=[anchor=base]}
+ every month/.append style={anchor=base}
]
\tikzstyle{month label above left}=[%
@@ -297,7 +297,7 @@ execute before day scope={\ifdate{day of month=1}{%
\tikzmonthcode%
}
}{}},
- set style={{every month}+=[anchor=base west]}
+ every month/.append style={anchor=base west}
]
@@ -315,7 +315,7 @@ execute before day scope={\ifdate{day of month=1}{%
\tikzmonthcode%
}
}{}},
- set style={{every month}+=[anchor=base east]}
+ every month/.append style={anchor=base east}
]
\tikzstyle{month label below centered}=[%
@@ -333,7 +333,7 @@ execute before day scope={\ifdate{day of month=1}{%
\tikzmonthcode%
}
}{}},
- set style={{every month}+=[anchor=base]}
+ every month/.append style={anchor=base}
]
\tikzstyle{month label below left}=[%
@@ -346,7 +346,7 @@ execute before day scope={\ifdate{day of month=1}{%
\tikzmonthcode%
}
}{}},
- set style={{every month}+=[anchor=base west]}
+ every month/.append style={anchor=base west}
]
@@ -359,9 +359,9 @@ execute before day scope={\ifdate{day of month=1}{%
\begingroup%
\let\tikz@lib@cal@ifs=\pgfutil@empty%
\tikz@expandcount=1000\relax%
- \tikz@setkeys{name=,at={(0,0)}}%
+ \tikzset{name=,at={(0,0)}}%
\let\%=\pgfcalendarshorthand%
- \tikz@every@style{every calendar}%
+ \tikzset{every calendar/.try}%
\tikz@lib@cal@scanner%
}
@@ -406,27 +406,27 @@ execute before day scope={\ifdate{day of month=1}{%
\def\tikz@lib@cal@name#1){%
- \tikz@setkeys{name=#1}%
+ \tikzset{name=#1}%
\tikz@lib@cal@scanner%
}
\def\tikz@lib@cal@at t#1(#2){%
- \tikz@setkeys{at={(#2)}}%
+ \tikzset{at={(#2)}}%
\tikz@lib@cal@scanner%
}
\def\tikz@lib@cal@option#1]{%
- \tikz@setkeys{#1}%
+ \tikzset{#1}%
\tikz@lib@cal@scanner%
}
\def\tikz@lib@cal@if f#1(#2){%
\pgfutil@ifnextchar[{\tikz@lib@cal@if@opt{#2}}{\tikz@lib@cal@if@code{#2}}}%}
-\def\tikz@lib@cal@if@opt#1[#2]{\tikz@lib@cal@if@code{#1}{\tikz@setkeys{#2}}}
+\def\tikz@lib@cal@if@opt#1[#2]{\tikz@lib@cal@if@code{#1}{\tikzset{#2}}}
\def\tikz@lib@cal@if@code#1#2{%
\pgfutil@ifnextchar e{\tikz@lib@cal@if@else{#1}{#2}}{\tikz@lib@cal@if@else{#1}{#2}else{}}}
\def\tikz@lib@cal@if@else#1#2else{%
\pgfutil@ifnextchar[{\tikz@lib@cal@if@else@opt{#1}{#2}}{\tikz@lib@cal@if@else@code{#1}{#2}}}%}
-\def\tikz@lib@cal@if@else@opt#1#2[#3]{\tikz@lib@cal@if@else@code{#1}{#2}{\tikz@setkeys{#3}}}
+\def\tikz@lib@cal@if@else@opt#1#2[#3]{\tikz@lib@cal@if@else@code{#1}{#2}{\tikzset{#3}}}
\def\tikz@lib@cal@if@else@code#1#2#3{%
\expandafter\def\expandafter\tikz@lib@cal@ifs\expandafter{\tikz@lib@cal@ifs\ifdate{#1}{#2}{#3}}%
\tikz@lib@cal@scanner%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarychains.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarychains.code.tex
new file mode 100644
index 00000000000..0f7e0082611
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarychains.code.tex
@@ -0,0 +1,212 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarychains.code.tex,v 1.4 2008/02/12 23:41:59 tantau Exp $
+
+\tikzset{start chain/.default=,
+ start chain/.code={%
+ \tikz@lib@chain@parse{#1}%
+ \ifx\tikz@lib@chain@name\pgfutil@empty%
+ \def\tikz@lib@chain@name{chain}%
+ \fi%
+ \ifx\tikz@lib@chain@direction\relax%
+ \let\tikz@lib@chain@direction=\tikz@lib@chain@default@direction%
+ \fi%
+ \expandafter\ifx\csname tikz@lib@chain@active@\tikz@lib@chain@name\endcsname\relax%
+ \expandafter\let\csname tikz@lib@chain@active@\tikz@lib@chain@name\endcsname=\pgfutil@empty% does not matter
+ \expandafter\global\expandafter\let\csname tikz@lib@chain@exists@\tikz@lib@chain@name\endcsname=\pgfutil@empty% does not matter
+ % Setup chain parameters
+ \expandafter\gdef\csname tikz@lib@chain@count@\tikz@lib@chain@name\endcsname{0}%
+ \expandafter\global\expandafter\let\csname tikz@lib@chain@dir@\tikz@lib@chain@name\endcsname\tikz@lib@chain@direction%
+ \let\tikz@lib@current@chain=\tikz@lib@chain@name%
+ \let\chainin=\tikz@lib@chainin%
+ \else%
+ \PackageError{tikz}{Chain ``\tikz@lib@chain@name'' is already active}{}%
+ \fi%
+ },
+ continue chain/.default=,
+ continue chain/.code={%
+ \tikz@lib@chain@parse{#1}%
+ \ifx\tikz@lib@chain@name\pgfutil@empty%
+ \let\tikz@lib@chain@name\tikz@lib@current@chain%
+ \fi%
+ \expandafter\ifx\csname tikz@lib@chain@exists@\tikz@lib@chain@name\endcsname\relax%
+ \PackageError{tikz}{Unknown chain ``#1''}{}%
+ \else%
+ \let\tikz@lib@current@chain=\tikz@lib@chain@name%
+ \expandafter\let\csname tikz@lib@chain@active@\tikz@lib@chain@name\endcsname=\pgfutil@empty% does not matter
+ \ifx\tikz@lib@chain@direction\relax%
+ % Just restart...
+ \else%
+ % Setup chain parameters
+ \expandafter\global\expandafter\let\csname tikz@lib@chain@dir@\tikz@lib@chain@name\endcsname\tikz@lib@chain@direction%
+ \fi%
+ \fi%
+ },
+ join/.code=\tikz@lib@parse@join{#1},
+ join/.default={}%
+}
+
+\def\tikz@lib@chain@parse#1{%
+ \pgfutil@in@{going }{#1}%
+ \ifpgfutil@in@%
+ \tikz@lib@chain@going#1\pgf@stop%
+ \else%
+ \pgfutil@in@{placed }{#1}%
+ \ifpgfutil@in@%
+ \tikz@lib@chain@positioning#1\pgf@stop%
+ \else%
+ \def\tikz@lib@chain@name{#1}%
+ \let\tikz@lib@chain@direction\relax%
+ \fi%
+ \fi%
+}
+
+\def\tikz@lib@chain@going#1going #2\pgf@stop{%
+ \def\tikz@lib@chain@name{#1}%
+ \ifx\tikz@lib@chain@name\pgfutil@empty%
+ \else%
+ \tikz@lib@chain@strip#1\pgf@stop%%
+ \fi%
+ \tikz@lib@chain@is@goingtrue%
+ \def\tikz@lib@chain@direction{%
+ \ifx\tikzchainprevious\pgfutil@empty%
+ \else%
+ \tikz@lib@chain@place{#2}%
+ \fi%
+ }%
+}
+
+\def\tikz@lib@chain@positioning#1placed #2\pgf@stop{%
+ \def\tikz@lib@chain@name{#1}%
+ \ifx\tikz@lib@chain@name\pgfutil@empty%
+ \else%
+ \tikz@lib@chain@strip#1\pgf@stop%%
+ \fi%
+ \tikz@lib@chain@is@goingfalse%
+ \def\tikz@lib@chain@direction{\tikz@lib@chain@place{#2}}%
+}
+\newif\iftikz@lib@chain@is@going
+
+
+\tikzset{/tikz/chain default direction/.code=%
+ {%
+ \tikz@lib@chain@parse{#1}%
+ \let\tikz@lib@chain@default@direction=\tikz@lib@chain@direction%
+ },%
+ /tikz/chain default direction=going right
+}
+
+\def\tikz@lib@current@chain{chain}
+
+\pgfutil@g@addto@macro\tikz@node@reset@hook{\let\tikz@lib@chain@caller=\relax}
+\pgfutil@g@addto@macro\tikz@node@begin@hook{\tikz@lib@chain@caller}
+
+\tikzset{
+ on chain/.default=,
+ on chain/.code=\tikz@lib@on@chain{#1}%
+}
+\def\tikz@lib@on@chain#1{%
+ \tikz@lib@chain@parse{#1}%
+ \ifx\tikz@lib@chain@name\pgfutil@empty%
+ \let\tikz@lib@chain@name\tikz@lib@current@chain%
+ \fi%
+ \expandafter\ifx\csname tikz@lib@chain@exists@\tikz@lib@chain@name\endcsname\relax%
+ \PackageError{tikz}{Unknown chain ``\tikz@lib@chain@name''}{}%
+ \else%
+ \c@pgf@counta\csname tikz@lib@chain@count@\tikz@lib@chain@name\endcsname\relax%
+ \ifnum\c@pgf@counta=0\relax%
+ \global\let\tikzchainprevious=\pgfutil@empty%
+ \else
+ \xdef\tikzchainprevious{\tikz@lib@chain@name-\the\c@pgf@counta}%
+ \fi%
+ \advance\c@pgf@counta by1\relax%
+ \xdef\tikzchaincount{\the\c@pgf@counta}%
+ \ifx\tikz@lib@chain@direction\relax%
+ \csname tikz@lib@chain@dir@\tikz@lib@chain@name\endcsname% use default
+ \else%
+ \tikz@lib@chain@direction%
+ \fi%
+ \edef\tikz@lib@chain@caller{\noexpand\tikz@lib@chain@last@found{\tikz@lib@chain@name}}%
+ \fi%
+}
+\def\tikz@lib@chain@last@found#1{%
+ % Increase the count and set name, if necessary.
+ \c@pgf@counta\csname tikz@lib@chain@count@#1\endcsname\relax%
+ \advance\c@pgf@counta by1\relax%
+ \xdef\tikzchaincurrent{#1-\the\c@pgf@counta}%
+ \expandafter\xdef\csname tikz@lib@chain@count@#1\endcsname{\the\c@pgf@counta}%
+ \ifnum\c@pgf@counta=1\relax%
+ \tikzset{alias/.expanded=#1-begin} % Define pseudostart
+ \fi%
+ \tikzset{alias/.expanded=#1-end} % Define pseudostart
+ \tikzset{alias/.expanded=#1-\the\c@pgf@counta} % Define pseudostart
+ \tikz@lib@chain@direction%
+ \tikzset{every on chain/.try}%
+}
+
+
+\def\tikz@lib@chain@place#1{%
+ \pgfutil@in@{=}{#1}%
+ \ifpgfutil@in@%
+ \tikzset{#1}%
+ \else%
+ \tikzset{#1=of \tikzchainprevious}%
+ \fi%
+}
+
+\def\tikz@lib@chain@strip#1 \pgf@stop{%
+ \def\tikz@lib@chain@name{#1}%
+}
+
+\def\tikz@lib@parse@join#1{%
+ \def\tikz@temp{#1}%
+ \ifx\tikz@temp\pgfutil@empty%
+ \tikz@lib@parse@join@by by \pgf@stop%
+ \else%
+ \pgfutil@in@{with }{#1}%
+ \ifpgfutil@in@%
+ \pgfutil@in@{by }{#1}%
+ \ifpgfutil@in@%
+ \tikz@lib@parse@join@with@by#1\pgf@stop%
+ \else%
+ \tikz@lib@parse@join@with@by#1 by \pgf@stop%
+ \fi%
+ \else%
+ \tikz@lib@parse@join@by#1\pgf@stop%
+ \fi%
+ \fi%
+}
+\def\tikz@lib@parse@join@with@by with #1 by #2\pgf@stop{%
+ \tikzset{after node path={(#1)edge[every join,#2](\tikzchaincurrent)}}%
+}
+\def\tikz@lib@parse@join@by by #1\pgf@stop{%
+ \tikzset{after node path={\ifx\tikzchainprevious\pgfutil@empty\else (\tikzchainprevious)edge[every join,#1](\tikzchaincurrent)\fi}}%
+}
+\tikzset{every join/.style=}
+
+
+\def\tikz@lib@chainin#1(#2){\pgfutil@ifnextchar[{\tikz@lib@chainin@{#2}}{\tikz@lib@chainin@{#2}[]}}%]
+\def\tikz@lib@chainin@#1[#2]{\path[late options={name=#1,on chain,every chain in/.try,#2}]}
+
+
+%
+% Branches
+%
+
+\tikzset{start branch/.code={%
+ % save last node on current chain:
+ \let\tikz@lib@save@current\tikz@lib@current@chain%
+ \pgfkeysalso{/tikz/start chain/.expand once=\tikz@lib@current@chain/#1}%
+ \path[late options={name=\tikz@lib@save@current-end,on chain}];%
+ }%
+}
+\tikzset{continue branch/.style={continue chain/.expand once=\tikz@lib@current@chain/#1}}
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.code.tex
new file mode 100644
index 00000000000..62d1cbda803
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.code.tex
@@ -0,0 +1,186 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usepgfmodule{decorations}
+
+% Define the basic decoration stuff for tikz. Load more libraries to
+% "actually use" decorations
+
+\tikzset{decorate/.is if=tikz@decoratepath,
+ /pgf/decoration/name/.store in=\tikz@decoration@name,
+ /pgf/decoration/.unknown/.code=%
+ \pgfifdecoration{\pgfkeyscurrentname}{\edef\tikz@decoration@name{\pgfkeyscurrentname}}
+ {\pgfifmetadecoration{\pgfkeyscurrentname}{\edef\tikz@decoration@name{\pgfkeyscurrentname}}
+ {\pgfkeys{/errors/unknown
+ key={/pgf/decoration/\pgfkeyscurrentname}{#1}}}},%
+ /pgf/decoration/raise/.code={\def\tikz@dec@shift{\pgftransformyshift{#1}}\tikz@dec@trans},
+ /pgf/decoration/mirror/.code={%
+ \csname if#1\endcsname
+ \def\tikz@dec@mirror{\pgftransformyscale{-1}}%
+ \else%
+ \let\tikz@dec@mirror=\relax%
+ \fi%
+ \tikz@dec@trans%
+ },
+ /pgf/decoration/mirror/.default=true,
+ /pgf/decoration/transform/.code={%
+ {%
+ \pgftransformreset%
+ \def\tikz@transform{}%
+ \pgfkeysalso{/tikz/.cd, #1}%
+ \expandafter\gdef\expandafter\tikz@g@temptransform\expandafter{\tikz@transform}%
+ }%
+ \let\tikz@dec@user@transform=\tikz@g@temptransform%
+ \tikz@dec@trans%
+ },%
+ /pgf/decoration/pre/.initial=lineto,
+ /pgf/decoration/post/.initial=lineto,
+ /pgf/decoration/pre length/.initial=0pt,
+ /pgf/decoration/post length/.initial=0pt,
+}
+
+\let\tikz@decoration@name=\tikz@nonetext
+
+\def\tikz@dec@trans{\pgfsetdecorationsegmenttransformation{\tikz@dec@user@transform\tikz@dec@mirror\tikz@dec@shift}}
+\let\tikz@dec@user@transform=\relax
+\let\tikz@dec@shift=\relax
+\let\tikz@dec@mirror=\relax
+
+\pgfdeclaremetadecoration{tikz@internal}{pre}{
+ \state{pre}[width=\pgfkeysvalueof{/pgf/decoration/pre length}, next state=main]
+ {
+ \decoration{\pgfkeysvalueof{/pgf/decoration/pre}}
+ }
+ \state{main}[width=\pgfmetadecoratedremainingdistance-\pgfkeysvalueof{/pgf/decoration/post length}, next state=final]
+ {
+ \decoration{\tikz@decoration@name}
+ }
+ \state{final}
+ {
+ \decoration{\pgfkeysvalueof{/pgf/decoration/post}}
+ }
+}
+
+
+\newif\iftikz@metadecoration
+
+\def\tikz@lib@dec@addtomacro#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}
+
+\def\tikz@lib@decoration[#1]{%
+ \begingroup%
+ % Just to be on the save side...
+ %
+ % Now, let's parse the options:
+ \tikzset{#1}%
+ %
+ \ifx\tikz@decoration@name\tikz@nonetext%
+ % Ok, let's forget about this decoration stuff...
+ \else
+ \expandafter\tikz@lib@do@dec%
+ \fi%
+ % Now, we expect a brace.
+ \pgfutil@ifnextchar\bgroup{%
+ \begingroup%
+ \aftergroup\tikz@enddecoration%
+ \afterassignment\tikz@scan@next@command%
+ \let\tikz@lib@next% gobble \bgroup%
+ }%
+ {%
+ \PackageError{tikz}{A decoration must begin with a brace}{}%
+ \tikz@enddecoration%
+ }%
+}
+\def\tikz@lib@do@dec{%
+ % Ok, now what?
+ \pgfifmetadecoration{\tikz@decoration@name}%
+ {\expandafter\pgfmetadecoration\expandafter{\tikz@decoration@name}}%
+ {%
+ \pgfifdecoration{\tikz@decoration@name}%
+ {\tikz@lib@dec@startdecoration}%
+ {\PackageError{tikz}{Unknown (meta-)decoration '\tikz@decoration@name'. Perhaps you
+ misspelled it?}{}}%
+ }%
+ \ifx\pgfdecorateexistingpath\pgfutil@empty%
+ \pgfpathmoveto{\pgfqpoint{\the\tikz@lastxsaved}{\the\tikz@lastysaved}}%
+ \fi%
+}
+
+\def\tikz@enddecoration{%
+ \ifx\tikz@decoration@name\tikz@nonetext%
+ % ignore this.
+ \else
+ % Ok, now what?
+ \iftikz@metadecoration%
+ \endpgfmetadecoration%
+ \else%
+ \tikz@lib@dec@stopdecoration%
+ \fi%
+ \fi
+ \endgroup%
+}
+
+
+\def\tikz@lib@dec@decorate@path{%
+ \ifx\tikz@decoration@name\tikz@nonetext%
+ \else%
+ \pgfgetpath\tikz@lib@dec@currentpath%
+ \pgfsetpath\pgfutil@empty%
+ \pgfifmetadecoration{\tikz@decoration@name}
+ {
+ \expandafter\pgfmetadecoration\expandafter{\tikz@decoration@name}%
+ \pgfsetpath\tikz@lib@dec@currentpath%
+ \endpgfmetadecoration%
+ }
+ {
+ \pgfifdecoration{\tikz@decoration@name}
+ {
+ \tikz@lib@dec@startdecoration%
+ \pgfsetpath\tikz@lib@dec@currentpath%
+ \tikz@lib@dec@stopdecoration%
+ }
+ {
+ \PackageError{tikz}{Unknown (meta-)decoration '\tikz@decoration@name'. Perhaps
+ you misspelled it?}{}
+ }
+ }
+ \fi%
+}
+
+\def\tikz@lib@dec@zpttext{0pt}
+
+\newif\iftikz@lib@dec@temp
+\def\tikz@lib@dec@startdecoration{%
+ \pgfkeysgetvalue{/pgf/decoration/pre length}{\tikz@lib@pre}%
+ \pgfkeysgetvalue{/pgf/decoration/post length}{\tikz@lib@post}%
+ \tikz@lib@dec@tempfalse%
+ \ifx\tikz@lib@pre\tikz@lib@dec@zpttext%
+ \ifx\tikz@lib@post\tikz@lib@dec@zpttext%
+ \else%
+ \tikz@lib@dec@temptrue%
+ \fi%
+ \else%
+ \tikz@lib@dec@temptrue%
+ \fi%
+ \iftikz@lib@dec@temp%
+ \pgfmetadecoration{tikz@internal}%
+ \else%
+ \expandafter\pgfdecoration\expandafter{\expandafter{\tikz@decoration@name}{\pgfdecoratedpathlength}{}{}}%
+ \fi%
+}
+
+\def\tikz@lib@dec@stopdecoration{%
+ \iftikz@lib@dec@temp%
+ \endpgfmetadecoration%
+ \else%
+ \endpgfdecoration%
+ \fi%
+}
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.arrows.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.footprints.code.tex
index 2f81d04742f..e4295c10ea7 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.arrows.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.footprints.code.tex
@@ -1,4 +1,4 @@
-% Copyright 2006 by Till Tantau
+% Copyright 2008 by Mark Wibrow
%
% This file may be distributed and/or modified
%
@@ -7,6 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryshapes.arrows.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $
+\usetikzlibrary{decorations}
+\usepgflibrary{decorations.footprints}
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzsnakes.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.fractals.code.tex
index 0274721bd36..dd247ac7e3f 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzsnakes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.fractals.code.tex
@@ -1,4 +1,4 @@
-% Copyright 2006 by Till Tantau
+% Copyright 2008 by Mark Wibrow
%
% This file may be distributed and/or modified
%
@@ -7,8 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzsnakes.code.tex,v 1.2 2006/10/11 15:22:26 tantau Exp $
-
-\usepgflibrary{snakes}
+\usetikzlibrary{decorations}
+\usepgflibrary{decorations.fractals}
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.markings.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.markings.code.tex
new file mode 100644
index 00000000000..eecdfb6ad3f
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.markings.code.tex
@@ -0,0 +1,31 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usetikzlibrary{decorations}
+\usepgflibrary{decorations.markings}
+
+% Upgrade \arrow command
+\def\pgf@lib@dec@doarrowhead{%
+ \pgfutil@ifnextchar[{\tikz@lib@dec@doarrowhead}{\tikz@lib@dec@doarrowhead[]}%]
+}
+\def\tikz@lib@dec@doarrowhead[#1]#2{%
+ \scope[#1]
+ \pgf@lib@dec@arrowhead{1}{#2}%
+ \endscope
+}
+\def\pgf@lib@dec@doarrowheadrev{%
+ \pgfutil@ifnextchar[{\tikz@lib@dec@doarrowheadrev}{\tikz@lib@dec@doarrowheadrev[]}%]
+}
+\def\tikz@lib@dec@doarrowheadrev[#1]#2{%
+ \scope[#1]
+ \pgf@lib@dec@arrowhead{-1}{#2}%
+ \endscope
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathmorphing.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathmorphing.code.tex
new file mode 100644
index 00000000000..388f6395f8b
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathmorphing.code.tex
@@ -0,0 +1,13 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usetikzlibrary{decorations}
+\usepgflibrary{decorations.pathmorphing}
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathreplacing.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathreplacing.code.tex
new file mode 100644
index 00000000000..f7c86aeba5d
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathreplacing.code.tex
@@ -0,0 +1,13 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usetikzlibrary{decorations}
+\usepgflibrary{decorations.pathreplacing}
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.shapes.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.shapes.code.tex
new file mode 100644
index 00000000000..d9306058442
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.shapes.code.tex
@@ -0,0 +1,13 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usetikzlibrary{decorations}
+\usepgflibrary{decorations.shapes}
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.text.code.tex
index e4c83128140..e063ba185f0 100644
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.text.code.tex
@@ -1,4 +1,4 @@
-% Copyright 2007 by Till Tantau
+% Copyright 2008 by Mark Wibrow
%
% This file may be distributed and/or modified
%
@@ -7,4 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\input pgfmathcalc.code.tex
+\usetikzlibrary{decorations}
+\usepgflibrary{decorations.text}
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzer.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryer.code.tex
index 3056d59185e..fcacb5d4399 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzer.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryer.code.tex
@@ -7,8 +7,9 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzer.code.tex,v 1.3 2006/10/11 15:22:26 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryer.code.tex,v 1.2 2008/02/20 11:00:42 tantau Exp $
+\usetikzlibrary{shapes.geometric}
% Styles for entity types:
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfadings.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfadings.code.tex
new file mode 100644
index 00000000000..ec43475f6a0
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfadings.code.tex
@@ -0,0 +1,47 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfadings.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
+
+\usepgflibrary{fadings}
+
+%
+% Environments for creating fadings
+%
+
+\def\tikzfadingfrompicture{%
+ \begingroup%
+ \setbox\pgfpic=\hbox\bgroup%
+ \tikzpicture%
+}
+\def\endtikzfadingfrompicture{%
+ \global\let\tikz@smuggle=\tikz@fig@name%
+ \endtikzpicture
+ \egroup%
+ \pgfdeclarefading{\tikz@smuggle}{\box\pgfpic}%
+ \endgroup%
+}
+
+\let\starttikzfadingfrompicture=\tikzfadingfrompicture
+\let\stopttikzfadingfrompicture=\endtikzfadingfrompicture
+
+\def\tikzfading[#1]{%
+ {%
+ \setbox\pgfpic=\hbox{%
+ \tikzset{#1}%
+ \global\let\tikz@smuggle=\tikz@fig@name%
+ \tikz{%
+ \useasboundingbox(0,0) (100bp,100bp);
+ \node at (50bp,50bp) [rotate=\tikz@shade@angle]
+ {\pgfuseshading{\tikz@shading}};
+ }%
+ }%
+ \pgfdeclarefading{\tikz@smuggle}{\box\pgfpic}%
+ }%
+} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfit.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfit.code.tex
new file mode 100644
index 00000000000..1181dabea5f
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfit.code.tex
@@ -0,0 +1,77 @@
+% Copyright 2007 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfit.code.tex,v 1.2 2008/02/06 22:18:29 tantau Exp $
+
+\pgfkeys{/tikz/fit/.code=\tikz@lib@fit{#1}}
+
+\def\tikz@lib@fit#1{%
+ \pgf@xb=-16000pt\relax%
+ \pgf@xa=16000pt\relax%
+ \pgf@yb=-16000pt\relax%
+ \pgf@ya=16000pt\relax%
+ % Now iterate over the coordinates
+ \tikz@lib@fit@scan#1\pgf@stop%
+ % Now, let's see what has happend
+ \ifdim\pgf@xa>\pgf@xa%
+ % Nothing... Ok, let's just ignore this.
+ \else%
+ % Ok, compute center and width and height
+ \pgf@x=\pgf@xb%
+ \advance\pgf@x by-\pgf@xa%
+ \pgf@y=\pgf@yb%
+ \advance\pgf@y by-\pgf@ya%
+ \advance\pgf@xa by.5\pgf@x%
+ \advance\pgf@ya by.5\pgf@y%
+ \edef\tikz@node@at{\noexpand\pgfpoint{\the\pgf@xa}{\the\pgf@ya}}%
+ \pgfkeysalso{/tikz/anchor=center,/tikz/text centered}%
+ \pgfkeysalso{/tikz/text width/.expanded=\the\pgf@x}%
+ \pgf@x=\pgf@y%
+ \pgf@y=.5\pgf@y%
+ \pgfkeysalso{
+ /tikz/text height/.expanded=\the\pgf@y-.5\dp\pgfnodeparttextbox,
+ /tikz/text depth/.expanded=\the\pgf@x-\noexpand\the\ht\pgfnodeparttextbox}%
+ \pgfkeysalso{every fit/.try}%
+ \fi%
+}
+
+\def\tikz@lib@fit@scan{%
+ \pgfutil@ifnextchar\pgf@stop{\pgfutil@gobble}
+ {\tikz@scan@one@point\tikz@lib@fit@scan@handle}}
+
+\def\tikz@lib@fit@scan@handle#1{%
+ \iftikz@shapeborder%
+ % Ok, fit all four external anchors, if they exist
+ \tikz@lib@fit@adjust{\pgfpointanchor{\tikz@shapeborder@name}{west}}%
+ \tikz@lib@fit@adjust{\pgfpointanchor{\tikz@shapeborder@name}{east}}%
+ \tikz@lib@fit@adjust{\pgfpointanchor{\tikz@shapeborder@name}{north}}%
+ \tikz@lib@fit@adjust{\pgfpointanchor{\tikz@shapeborder@name}{south}}%
+ \else%
+ \tikz@lib@fit@adjust{#1}%
+ \fi%
+ \tikz@lib@fit@scan%
+}
+
+\def\tikz@lib@fit@adjust#1{%
+ \pgf@process{#1}%
+ \ifdim\pgf@x<\pgf@xa%
+ \pgf@xa=\pgf@x%
+ \fi%
+ \ifdim\pgf@y<\pgf@ya%
+ \pgf@ya=\pgf@y%
+ \fi%
+ \ifdim\pgf@x>\pgf@xb%
+ \pgf@xb=\pgf@x%
+ \fi%
+ \ifdim\pgf@y>\pgf@yb%
+ \pgf@yb=\pgf@y%
+ \fi%
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzfolding.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex
index 25ae5d3e39b..2ecdfeb11c7 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzfolding.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzfolding.code.tex,v 1.3 2007/03/09 17:49:32 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
%
@@ -78,7 +78,7 @@
\def\tikzfoldingdodecahedron#1[#2]#3;{%
\begingroup%
- \tikz@setkeys{#2}%
+ \tikzset{#2}%
\tikz@lib@fold@pentagon{\tikz@lib@fold@face@A}
{
\tikz@lib@fold@pentagon{\tikz@lib@fold@face@B}
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzmatrix.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex
index afb1393dffe..124e70f2278 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzmatrix.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzmatrix.code.tex,v 1.5 2007/01/08 10:42:19 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
% A matrix of nodes contains a node in each cell.
@@ -32,13 +32,13 @@
\def\tikz@lib@matrix@start@cell{%
\pgfutil@ifnextchar|{\tikz@lib@matrix@with@options}{\tikz@lib@matrix@normal@start@cell}}
-\def\tikz@lib@matrix@with@options|#1|{\tikz@lib@matrix@plainfalse\node#1\bgroup}
+\def\tikz@lib@matrix@with@options|#1|{\tikz@lib@matrix@plainfalse\node#1\bgroup\tikz@lib@matrix@startup}
-\def\tikz@lib@matrix@normal@start@cell{\pgfutil@ifnextchar\let{\tikz@lib@matrix@check}{\tikz@lib@matrix@plainfalse\node\bgroup}}%
+\def\tikz@lib@matrix@normal@start@cell{\pgfutil@ifnextchar\let{\tikz@lib@matrix@check}{\tikz@lib@matrix@plainfalse\node\bgroup\tikz@lib@matrix@startup}}%
\def\tikz@lib@matrix@check#1{% evil hackery to find out about start of path
- \pgfutil@ifnextchar\tikz@signal@path{\tikz@lib@matrix@plaintrue\let}{\tikz@lib@matrix@plainfalse\node\bgroup\let}%
+ \pgfutil@ifnextchar\tikz@signal@path{\tikz@lib@matrix@plaintrue\let}{\tikz@lib@matrix@plainfalse\node\bgroup\tikz@lib@matrix@startup\let}%
}
\def\tikz@lib@matrix@end@cell{%
@@ -48,6 +48,22 @@
\fi%
}
+\def\tikz@lib@matrix@startup{%
+ \pgfutil@ifnextchar\bgroup{%
+ % Save meaning of \\:
+ \let\tikz@lib@matrix@saved@eol=\\%
+ % Now smuggle meaning inside following group.
+ \let\\=\pgfmatrixendrow%
+ \afterassignment\tikz@lib@matrix@smuggle%
+ \let\tikz@next}
+ {\let\\=\pgfmatrixendrow}%
+}
+\def\tikz@lib@matrix@smuggle{%
+ \bgroup%
+ \let\\=\tikz@lib@matrix@saved@eol%
+}
+
+
% Fill empty nodes in a matrix of nodes
\newif\iftikz@lib@matrix@empty
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzmindmap.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex
index a370789d2f0..06f42f5c457 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzmindmap.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex
@@ -7,81 +7,82 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzmindmap.code.tex,v 1.21 2007/06/07 07:41:11 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex,v 1.5 2008/02/10 16:29:07 tantau Exp $
+\usetikzlibrary{trees,decorations}
-% A snake for connecting circle nodes
+
+% A decoration for connecting circle nodes
%
-% Parameters: \pgfsnakecirclestartradius, \pgfsnakecircleendradius,
-% \pgfsnakesegmentamplitude, \pgfsnakesegmentangle
+% Parameters: start radius, end radius, amplitude, angle
-\pgfdeclaresnake{circle connection bar}{initial}
+\pgfdeclaredecoration{circle connection bar}{initial}
{
\state{initial}[width=0pt,next state=bar]
{
{
- \pgftransformxshift{-\pgfsnakecirclestartradius}%
- \pgfpathmoveto{\pgfpointpolar{\pgfsnakesegmentangle}{\pgfsnakecirclestartradius}}
- \pgfpatharc{\pgfsnakesegmentangle}{-\pgfsnakesegmentangle}{\pgfsnakecirclestartradius}
- \pgfutil@tempcnta=-\pgfsnakesegmentangle\relax
+ \pgftransformxshift{-\pgfkeysvalueof{/pgf/decoration/start radius}}%
+ \pgfpathmoveto{\pgfpointpolar{\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/start radius}}}
+ \pgfpatharc{\pgfdecorationsegmentangle}{-\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/start radius}}
+ \pgfutil@tempcnta=-\pgfdecorationsegmentangle\relax
\advance\pgfutil@tempcnta by90\relax
- \pgfmathsetlength\pgfutil@tempdima{\pgfsnakecirclestartradius}
- \pgfmathsetlength\pgfutil@tempdimb{\pgfsnakesegmentamplitude}
+ \pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/decoration/start radius}}
+ \pgfmathsetlength\pgfutil@tempdimb{\pgfdecorationsegmentamplitude}
\pgfpathcurveto
{\pgfpointadd
- {\pgfpointpolar{-\pgfsnakesegmentangle}{\pgfsnakecirclestartradius}}
+ {\pgfpointpolar{-\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/start radius}}}
{\pgfpointpolar{\the\pgfutil@tempcnta}{.25\pgfutil@tempdima}}}
{\pgfqpoint{1.25\pgfutil@tempdima}{-.5\pgfutil@tempdimb}}
{\pgfqpoint{1.5\pgfutil@tempdima}{-.5\pgfutil@tempdimb}}
\pgfpathlineto{\pgfpoint{1.5\pgfutil@tempdima}{.5\pgfutil@tempdimb}}
- \pgfutil@tempcnta=\pgfsnakesegmentangle\relax
+ \pgfutil@tempcnta=\pgfdecorationsegmentangle\relax
\advance\pgfutil@tempcnta by-90\relax
\pgfpathcurveto
{\pgfpoint{1.25\pgfutil@tempdima}{.5\pgfutil@tempdimb}}
{\pgfpointadd
- {\pgfpointpolar{\pgfsnakesegmentangle}{\pgfsnakecirclestartradius}}
+ {\pgfpointpolar{\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/start radius}}}
{\pgfpointpolar{\the\pgfutil@tempcnta}{.25\pgfutil@tempdima}}}
- {\pgfpointpolar{\pgfsnakesegmentangle}{\pgfsnakecirclestartradius}}
+ {\pgfpointpolar{\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/start radius}}}
\pgfpathclose
}
}
\state{bar}[width=0pt,next state=end]
{
- \pgfmathsetlength\pgfutil@tempdima{\pgfsnakecirclestartradius}%
- \pgfmathsetlength\pgfutil@tempdimb{\pgfsnakecircleendradius}%
- \pgfmathsetlength\pgf@xc{\pgfsnakesegmentamplitude}%
+ \pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/decoration/start radius}}%
+ \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/decoration/end radius}}%
+ \pgfmathsetlength\pgf@xc{\pgfdecorationsegmentamplitude}%
\pgfpathrectangle
{\pgfqpoint{.5\pgfutil@tempdima}{-.5\pgf@xc}}
- {\pgfpoint{\pgfsnakeremainingdistance+-.5\pgfutil@tempdimb+-.5\pgfutil@tempdima}{\pgf@xc}}
+ {\pgfpoint{\pgfdecoratedremainingdistance+-.5\pgfutil@tempdimb+-.5\pgfutil@tempdima}{\pgf@xc}}
}
\state{end}[width=0pt,next state=final]
{
{
- \pgftransformxshift{\pgfsnakeremainingdistance}%
+ \pgftransformxshift{\pgfdecoratedremainingdistance}%
\pgftransformxscale{-1}%
- \pgftransformxshift{-\pgfsnakecircleendradius}%
- \pgfpathmoveto{\pgfpointpolar{\pgfsnakesegmentangle}{\pgfsnakecircleendradius}}
- \pgfpatharc{\pgfsnakesegmentangle}{-\pgfsnakesegmentangle}{\pgfsnakecircleendradius}
- \pgfutil@tempcnta=-\pgfsnakesegmentangle\relax
+ \pgftransformxshift{-\pgfkeysvalueof{/pgf/decoration/end radius}}%
+ \pgfpathmoveto{\pgfpointpolar{\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/end radius}}}
+ \pgfpatharc{\pgfdecorationsegmentangle}{-\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/end radius}}
+ \pgfutil@tempcnta=-\pgfdecorationsegmentangle\relax
\advance\pgfutil@tempcnta by90\relax
- \pgfmathsetlength\pgfutil@tempdima{\pgfsnakecircleendradius}
- \pgfmathsetlength\pgfutil@tempdimb{\pgfsnakesegmentamplitude}%
+ \pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/decoration/end radius}}
+ \pgfmathsetlength\pgfutil@tempdimb{\pgfdecorationsegmentamplitude}%
\pgfpathcurveto
{\pgfpointadd
- {\pgfpointpolar{-\pgfsnakesegmentangle}{\pgfsnakecircleendradius}}
+ {\pgfpointpolar{-\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/end radius}}}
{\pgfpointpolar{\the\pgfutil@tempcnta}{.25\pgfutil@tempdima}}}
{\pgfqpoint{1.25\pgfutil@tempdima}{-.5\pgfutil@tempdimb}}
{\pgfqpoint{1.5\pgfutil@tempdima}{-.5\pgfutil@tempdimb}}
\pgfpathlineto{\pgfpoint{1.5\pgfutil@tempdima}{.5\pgfutil@tempdimb}}
- \pgfutil@tempcnta=\pgfsnakesegmentangle\relax
+ \pgfutil@tempcnta=\pgfdecorationsegmentangle\relax
\advance\pgfutil@tempcnta by-90\relax
\pgfpathcurveto
{\pgfpoint{1.25\pgfutil@tempdima}{.5\pgfutil@tempdimb}}
{\pgfpointadd
- {\pgfpointpolar{\pgfsnakesegmentangle}{\pgfsnakecircleendradius}}
+ {\pgfpointpolar{\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/end radius}}}
{\pgfpointpolar{\the\pgfutil@tempcnta}{.25\pgfutil@tempdima}}}
- {\pgfpointpolar{\pgfsnakesegmentangle}{\pgfsnakecircleendradius}}
+ {\pgfpointpolar{\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/end radius}}}
\pgfpathclose
}
}
@@ -90,12 +91,8 @@
}
-\def\pgfsnakecirclestartradius{1cm}
-\def\pgfsnakecircleendradius{1cm}
-\def\pgfsnakesegmentangle{20}
-
-
+\pgfkeys{/pgf/decoration/angle=20}
% To paths for connecting circle nodes
@@ -103,9 +100,9 @@
[to path={
\pgfextra{\tikz@compute@circle@radii\tikz@compute@segmentamplitude}
[fill=\tikz@concept@color,draw=none]
- [snake=circle connection bar]
[every circle connection bar]
- -- (\tikztotarget) \tikztonodes
+ decorate [decoration=circle connection bar]
+ { -- (\tikztotarget) \tikztonodes}
}]
\tikzstyle{every circle connection bar}=[]
@@ -114,20 +111,20 @@
\pgf@xa=\pgf@x%
\pgf@process{\pgfpointtransformed{\pgfpointanchor{\tikztostart}{west}}}%
\advance\pgf@xa by-\pgf@x%
- \edef\pgfsnakecirclestartradius{\the\pgf@xa}%
+ \pgfkeys{/pgf/decoration/start radius/.expanded=\the\pgf@xa}%
\pgf@process{\pgfpointtransformed{\pgfpointanchor{\tikztotarget}{center}}}%
\pgf@xa=\pgf@x%
\pgf@process{\pgfpointtransformed{\pgfpointanchor{\tikztotarget}{west}}}%
\advance\pgf@xa by-\pgf@x%
- \edef\pgfsnakecircleendradius{\the\pgf@xa}%
+ \pgfkeys{/pgf/decoration/end radius/.expanded=\the\pgf@xa}%
}
\def\tikz@compute@segmentamplitude{%
- \pgf@x=\pgfsnakecirclestartradius\relax%
- \ifdim\pgf@x>\pgfsnakecircleendradius\relax%
- \pgf@x=\pgfsnakecircleendradius\relax%
+ \pgf@x=\pgfkeysvalueof{/pgf/decoration/start radius}\relax%
+ \ifdim\pgf@x>\pgfkeysvalueof{/pgf/decoration/end radius}\relax%
+ \pgf@x=\pgfkeysvalueof{/pgf/decoration/end radius}\relax%
\fi%
\pgf@x=.175\pgf@x\relax%
- \edef\pgfsnakesegmentamplitude{\the\pgf@x}%
+ \edef\pgfdecorationsegmentamplitude{\the\pgf@x}%
}
@@ -143,9 +140,9 @@
\tikz@compute@rotation%
}
[fill=none,draw=none]
- [snake=circle connection bar]
[every circle connection bar]
- -- (\tikztotarget) \tikztonodes
+ decorate [decoration=circle connection bar]
+ {-- (\tikztotarget) \tikztonodes}
[shading=tikz@shade@bar]
}
}
@@ -161,8 +158,8 @@
\pgfdeclarehorizontalshading[tikz@switch@from,tikz@switch@to]{tikz@shade@bar}{100bp}{%
color(0pt)=(tikz@switch@from);
- color(45bp)=(tikz@switch@from);
- color(50bp)=(tikz@switch@to);
+ color(50bp)=(tikz@switch@from);
+ color(55bp)=(tikz@switch@to);
color(100bp)=(tikz@switch@to)}
\def\tikz@compute@rotation{%
@@ -203,12 +200,12 @@
\tikzstyle{mindmap}=
[fill,draw,very thick,outer sep=0pt,inner sep=1pt,%
- set style={{every child}+=[style=tikz@concept@setting,style=tikz@concept@color@set]},%
- style=root concept,
- set style={{level 1}+=[style=level 1 concept]},
- set style={{level 2}+=[style=level 2 concept]},
- set style={{level 3}+=[style=level 3 concept]},
- set style={{level 4}+=[style=level 4 concept]},
+ every child/.append style={style=tikz@concept@setting,style=tikz@concept@color@set},%
+ root concept,
+ level 1/.append style={level 1 concept},
+ level 2/.append style={level 2 concept},
+ level 3/.append style={level 3 concept},
+ level 4/.append style={level 4 concept},
text centered,%
segment angle=20,
style=every mindmap,
@@ -240,64 +237,64 @@
\tikzstyle{large mindmap}=
[%
- set style={{root concept}=[minimum size=5.6cm,text width=4.5cm,font=\pgfutil@font@Large]},
- set style={{level 1 concept}=[%
+ root concept/.style={minimum size=5.6cm,text width=4.5cm,font=\pgfutil@font@Large},
+ level 1 concept/.style={%
minimum size=3.2cm,
level distance=7cm,
text width=2.8cm,
sibling angle=60,
- font=]},%
- set style={{level 2 concept}=[%
+ font=},%
+ level 2 concept/.style={%
minimum size=2.45cm,%
level distance=4cm,%
text width=2.2cm,%
sibling angle=60,%
font=\pgfutil@font@small%
- ]},%
- set style={{level 3 concept}=[%
+ },%
+ level 3 concept/.style={%
minimum size=1.63cm,%
text width=1.4cm,%
level distance=3.38cm,%
sibling angle=30,%
- font=\pgfutil@font@scriptsize]},%
- set style={{level 4 concept}=[%
+ font=\pgfutil@font@scriptsize},%
+ level 4 concept/.style={%
minimum size=1.27cm,%
text width=1cm,
level distance=2.60cm,%
sibling angle=30,%
- font=\pgfutil@font@tiny]},%
+ font=\pgfutil@font@tiny},%
mindmap,%
line width=2pt
]
\tikzstyle{huge mindmap}=
[%
- set style={{root concept}=[minimum size=8cm,text width=7cm,font=\pgfutil@font@huge]},
- set style={{level 1 concept}+=[%
+ root concept/.style={minimum size=8cm,text width=7cm,font=\pgfutil@font@huge},
+ level 1 concept/.style={%
minimum size=4.5cm,
level distance=10cm,
text width=4cm,
sibling angle=60,
- font=\pgfutil@font@large]},%
- set style={{level 2 concept}+=[%
+ font=\pgfutil@font@large},%
+ level 2 concept/.style={%
minimum size=3.5cm,%
level distance=5.8cm,%
text width=3cm,%
sibling angle=60,%
font=%
- ]},%
- set style={{level 3 concept}+=[%
+ },%
+ level 3 concept/.style={%
minimum size=2.3cm,%
text width=2cm,%
level distance=4.8cm,%
sibling angle=30,%
- font=\pgfutil@font@footnotesize]},%
- set style={{level 4 concept}+=[%
+ font=\pgfutil@font@footnotesize},%
+ level 4 concept/.style={%
minimum size=1.7cm,%
text width=1.4cm,
level distance=3.7cm,%
sibling angle=30,%
- font=\pgfutil@font@scriptsize]},%
+ font=\pgfutil@font@scriptsize},%
mindmap,%
line width=3pt
]
@@ -318,34 +315,5 @@
-\tikz@orig@define@key{tikz@mm@anno}{title}{\def\tikzmindmapinserttitle{#1}}
-\tikz@orig@define@key{tikz@mm@anno}{number}{\def\tikzmindmapinsertnumber{#1}}
-\tikz@orig@define@key{tikz@mm@anno}{url}{\def\tikz@mm@url{#1}}
-\tikz@orig@define@key{tikz@mm@anno}{date}{\def\tikz@mm@date{#1}}
-
-\def\tikz@mindmap@annotation[#1]{%
- {%
- \let\tikz@mm@at=\pgfutil@empty%
- \let\tikz@mm@name=\pgfutil@empty%
- \let\tikzmindmapinserttitle=\pgfutil@empty%
- \let\tikzmindmapinsertnumber=\pgfutil@empty%
- \tikz@orig@setkeys*{tikz@mm@anno}{#1}%
- \edef\tikz@marshal{%
- \noexpand\node%
- [%
- \XKV@rm,%
- annotation,%
- ]%
- {%
- \ifx\tikz@mm@url\pgfutil@empty\else%
- \fi%
- }%
- }%
- %
- }%
- \pgfutil@ifnextchar;{\pgfutil@gobble}{}%
-}
-
-
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.code.tex
new file mode 100644
index 00000000000..b6a0d3c9931
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.code.tex
@@ -0,0 +1,31 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.code.tex,v 1.2 2008/01/15 10:27:34 tantau Exp $
+
+\usepgflibrary{patterns}
+
+\tikzoption{pattern color}{\edef\tikz@pattern@color{#1}}
+\tikzoption{pattern}[]{%
+ \edef\tikz@temp{#1}%
+ \ifx\tikz@temp\tikz@nonetext%
+ \tikz@addmode{\tikz@mode@fillfalse}%
+ \else%
+ \ifx\tikz@temp\pgfutil@empty%
+ \else%
+ \tikz@addoption{\pgfsetfillpattern{#1}{\tikz@pattern@color}}%
+ \def\tikz@pattern{#1}%
+ \fi%
+ \tikz@addmode{\tikz@mode@filltrue}%
+ \fi%
+}
+\def\tikz@pattern@color{black}
+\def\tikz@pattern{dots}
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzpetri.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypetri.code.tex
index 172f9b991d1..e9e79e986bb 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzpetri.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypetri.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzpetri.code.tex,v 1.5 2007/03/09 17:49:32 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypetri.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
% Styles for places:
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplothandlers.code.tex
index d9179187394..f38560bc6a0 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzplothandlers.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplothandlers.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzplothandlers.code.tex,v 1.2 2006/10/11 15:22:26 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplothandlers.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
\usepgflibrary{plothandlers}
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzplotmarks.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplotmarks.code.tex
index 4455e03aac2..344db60fff0 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzplotmarks.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplotmarks.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzplotmarks.code.tex,v 1.2 2006/10/11 15:22:26 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplotmarks.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
\usepgflibrary{plotmarks}
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypositioning.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypositioning.code.tex
new file mode 100644
index 00000000000..0ebb15e18ca
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypositioning.code.tex
@@ -0,0 +1,117 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypositioning.code.tex,v 1.5 2008/02/12 23:41:59 tantau Exp $
+
+
+\tikzset{above/.code=\tikz@lib@place@handle@{#1}{south}{0}{1}{north}{1}}
+\tikzset{above left/.code=\tikz@lib@place@handle@{#1}{south east}{-1}{1}{north west}{0.707106781}}
+\tikzset{above right/.code=\tikz@lib@place@handle@{#1}{south west}{1}{1}{north east}{0.707106781}}
+\tikzset{base left/.code =\tikz@lib@place@handle@{#1}{base east}{-1}{0}{base west}{1}}
+\tikzset{base right/.code=\tikz@lib@place@handle@{#1}{base west}{1}{0}{base east}{1}}
+\tikzset{below/.code=\tikz@lib@place@handle@{#1}{north}{0}{-1}{south}{1}}
+\tikzset{below left/.code=\tikz@lib@place@handle@{#1}{north east}{-1}{-1}{south west}{0.707106781}}
+\tikzset{below right/.code=\tikz@lib@place@handle@{#1}{north west}{1}{-1}{south east}{0.707106781}}
+\tikzset{left/.code =\tikz@lib@place@handle@{#1}{east}{-1}{0}{west}{1}}
+\tikzset{mid left/.code =\tikz@lib@place@handle@{#1}{mid east}{-1}{0}{base west}{1}}
+\tikzset{mid right/.code=\tikz@lib@place@handle@{#1}{mid west}{1}{0}{base east}{1}}
+\tikzset{right/.code=\tikz@lib@place@handle@{#1}{west}{1}{0}{east}{1}}
+
+\newif\iftikz@lib@ignore@size
+
+% Hook into resets:
+\pgfutil@g@addto@macro\tikz@node@reset@hook{\tikz@addtransform{\tikz@lib@pos@call}\let\tikz@lib@pos@call=\relax}
+
+\tikzset{on grid/.is if=tikz@lib@ignore@size}
+
+\tikzset{node distance=1cm and 1cm}
+
+\def\tikz@lib@place@handle@#1#2#3#4#5#6{%
+ \def\tikz@anchor{#2}%
+ \edef\tikz@temp{#1}%
+ \def\tikz@lib@place@single@factor{#6}%
+ \expandafter\tikz@lib@place@handle@@\expandafter{\tikz@temp}{#3}{#4}{#5}%
+}
+\def\tikz@lib@place@handle@@#1#2#3#4{%
+ \pgfutil@in@{of }{#1}%
+ \ifpgfutil@in@%
+ \tikz@lib@place@of#1\tikz@stop{#4}%
+ \else%
+ \edef\tikz@lib@place@nums{#1}%
+ \fi%
+ \ifx\tikz@lib@place@nums\pgfutil@empty%
+ % Ok, nothing to do, we have set the anchor and we are happy...
+ \else%
+ \expandafter\tikz@lib@place@parse@nums\expandafter{\tikz@lib@place@nums}%
+ \pgf@x=#2\pgf@x%
+ \pgf@y=#3\pgf@y%
+ \edef\tikz@lib@pos@call{\noexpand\pgftransformshift{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
+ \fi%
+}
+
+\def\tikz@lib@place@parse@nums#1{%
+ \pgfutil@in@{and}{#1}%
+ \ifpgfutil@in@%
+ \tikz@lib@place@parse@nums@#1\tikz@stop%
+ \else%
+ \tikz@lib@place@parse@nums@#1and#1\tikz@stop%
+ \pgf@x=\tikz@lib@place@single@factor\pgf@x%
+ \pgf@y=\tikz@lib@place@single@factor\pgf@y%
+ \fi
+}
+\def\tikz@lib@place@parse@nums@#1and#2\tikz@stop{%
+ \pgfmathparse{#2}%
+ \ifpgfmathunitsdeclared%
+ \pgf@xa=\pgfmathresult pt%
+ \pgf@ya=0pt%
+ \else%
+ \let\tikz@lib@temp=\pgfmathresult%
+ \pgf@process{\pgfpointxy{\tikz@lib@temp}{0}}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \fi%
+ \pgfmathparse{#1}%
+ \ifpgfmathunitsdeclared%
+ \advance\pgf@ya by\pgfmathresult pt%
+ \else%
+ \let\tikz@lib@temp=\pgfmathresult%
+ \pgf@process{\pgfpointxy{0}{\tikz@lib@temp}}%
+ \advance\pgf@xa by\pgf@x%
+ \advance\pgf@ya by\pgf@y%
+ \fi%
+ \pgf@x=\pgf@xa%
+ \pgf@y=\pgf@ya%
+}
+
+\def\tikz@lib@place@of#1of #2\tikz@stop#3{%
+ \def\tikz@temp{#1}%
+ \ifx\tikz@temp\pgfutil@empty%
+ \tikz@lib@place@of@{\tikz@node@distance}{#2}{#3}%
+ \else%
+ \tikz@lib@place@of@{#1}{#2}{#3}%
+ \fi%
+}
+\def\tikz@lib@place@of@#1#2#3{%
+ \tikz@scan@one@point\tikz@lib@place@remember(#2)%
+ \iftikz@shapeborder%
+ % Ok, this is relative to a border.
+ \iftikz@lib@ignore@size%
+ \edef\tikz@node@at{\noexpand\pgfpointanchor{\tikz@shapeborder@name}{center}}%
+ \def\tikz@anchor{center}%
+ \else%
+ \edef\tikz@node@at{\noexpand\pgfpointanchor{\tikz@shapeborder@name}{#3}}%
+ \fi%
+ \fi%
+ \edef\tikz@lib@place@nums{#1}%
+}
+\def\tikz@lib@place@remember#1{\def\tikz@node@at{#1}}
+
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryscopes.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryscopes.code.tex
new file mode 100644
index 00000000000..4209c3e939d
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryscopes.code.tex
@@ -0,0 +1,38 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryscopes.code.tex,v 1.1 2008/02/08 01:18:38 tantau Exp $
+
+% Redefine the after command hook...
+
+\def\tikz@lib@scope@check{%
+ \pgfutil@ifnextchar\par{%
+ \afterassignment\tikz@lib@scope@check\let\tikz@next%
+ }%
+ {\pgfutil@ifnextchar\bgroup{%gotcha
+ \afterassignment\tikz@lib@scope@gotcha\let\tikz@next%
+ }%
+ {}%
+ }
+}
+
+\def\tikz@lib@scope@gotcha{%
+ \pgfutil@ifnextchar[{%]
+ \tikz@lib@scope@action%
+ }{%
+ % false alarm
+ \bgroup%
+ }%
+}
+\def\tikz@lib@scope@action[#1]{%
+ \scope[#1]\bgroup\aftergroup\endscope%
+ \tikz@lib@scope@check%
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadows.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadows.code.tex
new file mode 100644
index 00000000000..424e19b8502
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadows.code.tex
@@ -0,0 +1,147 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadows.code.tex,v 1.3 2008/01/13 15:30:04 tantau Exp $
+
+\usetikzlibrary{fadings}
+
+
+% General options
+\tikzset{
+ /tikz/shadow scale/.initial=1,
+ /tikz/shadow xshift/.initial=0pt,
+ /tikz/shadow yshift/.initial=0pt,
+}
+
+% Basic shadow style
+\tikzset{
+ general shadow/.style={
+ preaction={
+ #1,
+ transform canvas={
+ scale around=\pgfkeysvalueof{/tikz/shadow scale}:(current path bounding box.center),
+ shift={(\pgfkeysvalueof{/tikz/shadow xshift},\pgfkeysvalueof{/tikz/shadow yshift})}
+ },
+ }
+ },
+ every shadow/.style={}
+}
+
+
+
+%
+% Adds a simple drop shadow to a path
+%
+
+\tikzset{
+ /tikz/drop shadow/.style={
+ general shadow={%
+ shadow scale=1,
+ shadow xshift=.5ex,
+ shadow yshift=-.5ex,
+ opacity=.5,
+ fill=black!50,
+ every shadow,
+ #1
+ }
+ }
+}
+
+
+%
+% Adds a circular drop shadow to a path
+%
+
+\tikzset{
+ /tikz/circular drop shadow/.style={
+ general shadow={%
+ shadow scale=1.1,
+ shadow xshift=.3ex,
+ shadow yshift=-.3ex,
+ fill=black!50,
+ path fading={circle with fuzzy edge 15 percent},
+ every shadow,
+ #1
+ }
+ }
+}
+
+
+
+%
+% Adds a circular glow to a path
+%
+
+\tikzset{
+ /tikz/circular glow/.style={
+ general shadow={%
+ shadow scale=1.25,
+ shadow xshift=0pt,
+ shadow yshift=0pt,
+ fill=black!50,
+ path fading={circle with fuzzy edge 15 percent},
+ every shadow,
+ #1,
+ }
+ }
+}
+
+
+
+
+
+%
+% Adds a "copy" version of the path behind it.
+%
+
+\tikzset{
+ /tikz/copy shadow/.style={
+ general shadow={%
+ /utils/exec={\let\tikz@lib@shadow@fill=\tikz@fillcolor\let\tikz@lib@shadow@draw=\tikz@strokecolor},
+ shadow scale=1,
+ shadow xshift=.5ex,
+ shadow yshift=.5ex,
+ fill=\tikz@lib@shadow@fill,
+ draw=\tikz@lib@shadow@draw,
+ every shadow,
+ #1
+ }
+ }
+}
+
+
+%
+% Adds two "copies" of the path behind it.
+%
+
+\tikzset{
+ /tikz/double copy shadow/.style={
+ general shadow={%
+ /utils/exec={\let\tikz@lib@shadow@fill=\tikz@fillcolor\let\tikz@lib@shadow@draw=\tikz@strokecolor},
+ shadow scale=1,
+ shadow xshift=.5ex,
+ shadow yshift=.5ex,
+ fill=\tikz@lib@shadow@fill,
+ draw=\tikz@lib@shadow@draw,
+ #1,
+ shadow xshift/.expanded=2*\pgfkeysvalueof{/tikz/shadow xshift},
+ shadow yshift/.expanded=2*\pgfkeysvalueof{/tikz/shadow yshift},
+ },
+ general shadow={%
+ /utils/exec={\let\tikz@lib@shadow@fill=\tikz@fillcolor\let\tikz@lib@shadow@draw=\tikz@strokecolor},
+ shadow scale=1,
+ shadow xshift=.5ex,
+ shadow yshift=.5ex,
+ fill=\tikz@lib@shadow@fill,
+ draw=\tikz@lib@shadow@draw,
+ #1,
+ },
+ }
+}
+
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.arrows.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.arrows.code.tex
index d96884ab716..f8d0604c965 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.arrows.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.arrows.code.tex
@@ -7,8 +7,10 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzshapes.arrows.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.arrows.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
\usepgflibrary{shapes.arrows}
+\pgfkeys{/tikz/arrow box arrows/.code={\pgf@lib@arrowbox@parsearrows{#1}}}
+
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.callouts.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.callouts.code.tex
new file mode 100644
index 00000000000..9bb2d738770
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.callouts.code.tex
@@ -0,0 +1,35 @@
+% Copyright 2006 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usepgflibrary{shapes.callouts}
+
+\pgfkeys{/tikz/callout absolute pointer/.code={%
+ \tikz@scan@one@point\tikz@lib@callout@checkforplus#1\relax%
+ }%
+}
+
+\def\tikz@lib@callout@checkforplus#1{%
+ \pgfutil@ifnextchar+{\def\tikz@lib@callout@originalpoint{#1}\tikz@lib@callout@scan@relative}%
+ {\pgf@lib@callout@makeabsolutepointer{#1}}}%
+
+\def\tikz@lib@callout@scan@relative+{%
+ \pgfutil@ifnextchar+{\tikz@lib@callout@scan@plusplus}{\tikz@lib@callout@scan@plus}}
+\def\tikz@lib@callout@scan@plusplus+{\tikz@scan@one@point\tikz@lib@callout@add}
+\def\tikz@lib@callout@scan@plus{\tikz@scan@one@point\tikz@lib@callout@add}
+\def\tikz@lib@callout@add#1{%
+ \expandafter\pgf@lib@callout@makeabsolutepointer\expandafter{%
+ \expandafter\pgfpointadd\expandafter{\tikz@lib@callout@originalpoint}{#1}}%
+}%
+
+\pgfkeys{/tikz/callout relative pointer/.code={%
+ \tikz@scan@one@point\pgf@lib@callout@makerelativepointer#1\relax%
+ }%
+}
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.code.tex
index 0ad52cfb429..83c808071bf 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.code.tex
@@ -7,12 +7,13 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzshapes.code.tex,v 1.3 2007/06/08 11:24:59 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{shapes.misc}
\usetikzlibrary{shapes.symbols}
\usetikzlibrary{shapes.arrows}
+\usetikzlibrary{shapes.callouts}
\usetikzlibrary{shapes.multipart}
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.IEC.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.IEC.code.tex
new file mode 100644
index 00000000000..ae11747144e
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.IEC.code.tex
@@ -0,0 +1,40 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.IEC.code.tex,v 1.3 2008/01/27 11:39:49 vibrovski Exp $
+
+\usepgflibrary{shapes.gates.logic.IEC}
+
+\tikzset{%
+ use IEC style logic gates/.code={%
+ \tikzset{%
+ and gate/.style={shape=and gate IEC},
+ nand gate/.style={shape=nand gate IEC},
+ or gate/.style={shape=or gate IEC},
+ nor gate/.style={shape=nor gate IEC},
+ xor gate/.style={shape=xor gate IEC},
+ xnor gate/.style={shape=xnor gate IEC},
+ not gate/.style={shape=not gate IEC},
+ buffer gate/.style={shape=buffer gate IEC},
+ and gate symbol/.style={and gate IEC symbol={##1}},
+ nand gate symbol/.style={nand gate IEC symbol={##1}},
+ or gate symbol/.style={or gate IEC symbol={##1}},
+ nor gate symbol/.style={nor gate IEC symbol={##1}},
+ xor gate symbol/.style={xor gate IEC symbol={##1}},
+ xnor gate symbol/.style={xnor gate IEC symbol={##1}},
+ not gate symbol/.style={not gate IEC symbol={##1}},
+ buffer gate symbol/.style={buffer gate IEC symbol={##1}},
+ logic gate symbol align/.style={/pgf/logic gate IEC symbol align={##1}},
+ logic gate symbol color/.style={/pgf/logic gate IEC symbol color={##1}}
+ }%
+ }%
+}
+\endinput
+
+
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.US.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.US.code.tex
new file mode 100644
index 00000000000..0b8a744126b
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.US.code.tex
@@ -0,0 +1,40 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.US.code.tex,v 1.1 2008/01/25 08:26:00 vibrovski Exp $
+
+\usepgflibrary{shapes.gates.logic.US}
+
+\tikzset{%
+ use US style logic gates/.code={%
+ \tikzset{%
+ and gate/.style={shape=and gate US},
+ nand gate/.style={shape=nand gate US},
+ or gate/.style={shape=or gate US},
+ nor gate/.style={shape=nor gate US},
+ xor gate/.style={shape=xor gate US},
+ xnor gate/.style={shape=xnor gate US},
+ not gate/.style={shape=not gate US},
+ buffer gate/.style={shape=buffer gate US}
+ }%
+ },
+ use CDH style logic gates/.code={%
+ \tikzset{%
+ and gate/.style={shape=and gate CDH},
+ nand gate/.style={shape=nand gate CDH},
+ or gate/.style={shape=or gate US},
+ nor gate/.style={shape=nor gate US},
+ xor gate/.style={shape=xor gate US},
+ xnor gate/.style={shape=xnor gate US},
+ not gate/.style={shape=not gate US},
+ buffer gate/.style={shape=buffer gate US}
+ }
+ }
+}
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzpatterns.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.geometric.code.tex
index 7766f66d8d5..dc5aad85554 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzpatterns.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.geometric.code.tex
@@ -7,8 +7,8 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzpatterns.code.tex,v 1.2 2006/10/11 15:22:26 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.geometric.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
-\usepgflibrary{patterns}
+\usepgflibrary{shapes.geometric}
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.misc.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.misc.code.tex
index 92d9102c986..10794a092d2 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.misc.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.misc.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzshapes.misc.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.misc.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
\usepgflibrary{shapes.misc}
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.multipart.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.multipart.code.tex
new file mode 100644
index 00000000000..564c77f8a80
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.multipart.code.tex
@@ -0,0 +1,36 @@
+% Copyright 2007 by Till Tantau and Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.multipart.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
+
+\usepgflibrary{shapes.multipart}
+
+\pgfkeys{/tikz/rectangle split/parts/.code={%
+ \pgfkeys{/pgf/rectangle split parts=#1}%
+ }%
+}
+
+\pgfkeys{/tikz/rectangle split use custom fill/.code={%
+ \pgfkeys{/pgf/rectangle split use custom fill=#1}%
+ \pgfkeys{/tikz/fill=none}}%
+}
+
+\pgfkeys{/tikz/rectangle split draw splits/.is if=pgfrectanglesplitdrawsplits}
+
+\pgfkeys{/tikz/rectangle split part align/.code={%
+ \pgfkeys{/pgf/rectangle split part align={#1}}%
+ }%
+}%
+
+\pgfkeys{/tikz/rectangle split part fill/.code={%
+ \pgfkeys{/pgf/rectangle split part fill={#1}}%
+ }%
+}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.symbols.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.symbols.code.tex
index 9760b07fc8b..f3b935dc0bc 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.symbols.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.symbols.code.tex
@@ -7,8 +7,11 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzshapes.symbols.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.symbols.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
+\pgfkeysifdefined{/tikz/shape border uses incircle}{}{%
+ \pgfkeys{/tikz/shape border uses incircle/.is if=pgfshapeborderusesincircle}}
+
\usepgflibrary{shapes.symbols}
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysnakes.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysnakes.code.tex
new file mode 100644
index 00000000000..363beabe4c7
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysnakes.code.tex
@@ -0,0 +1,77 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysnakes.code.tex,v 1.6 2008/02/05 13:08:05 tantau Exp $
+
+\PackageWarning{tikz}{Snakes have been superseded by
+decorations. Please use the decoration libraries instead of the snakes
+library}
+
+\usetikzlibrary{decorations.pathmorphing,decorations.pathreplacing,decorations.shapes}
+
+
+% Old snakes stuff:
+
+\tikzoption{snake}[]{%
+ \def\tikz@@snake{#1}%
+ \ifx\tikz@@snake\pgfutil@empty%
+ \tikz@snakedtrue%
+ \else%
+ \ifx\tikz@@snake\tikz@nonetext%
+ \tikz@snakedfalse%
+ \else%
+ \tikz@snakedtrue%
+ \let\tikz@snake=\tikz@@snake%
+ \fi%
+ \fi}
+
+\tikzoption{raise snake}{\def\pgf@snake@raise{\pgftransformyshift{#1}}}
+\tikzoption{mirror snake}[true]{%
+ \csname if#1\endcsname
+ \def\pgf@snake@mirror{\pgftransformyscale{-1}}%
+ \else%
+ \let\pgf@snake@mirror=\pgfutil@empty%
+ \fi
+}
+
+\tikzoption{gap before snake}{\def\tikz@presnake{{moveto}{#1}{\noexpand\tikz@snake@install@trans}{}}}
+\tikzoption{line before snake}{\def\tikz@presnake{{lineto}{#1}{\noexpand\tikz@snake@install@trans}{}}}
+
+\tikzoption{gap after snake}{\def\tikz@postsnake{{moveto}{#1}{\noexpand\tikz@snake@install@trans}{}}\def\tikz@mainsnakelength{\pgfsnakeremainingdistance-#1}}
+\tikzoption{line after snake}{\def\tikz@postsnake{{lineto}{#1}{\noexpand\tikz@snake@install@trans}{}}\def\tikz@mainsnakelength{\pgfsnakeremainingdistance-#1}}
+
+\tikzoption{gap around snake}{%
+ \def\tikz@presnake{{moveto}{#1}{\noexpand\tikz@snake@install@trans}{}}%
+ \def\tikz@postsnake{{moveto}{#1}{\noexpand\tikz@snake@install@trans}{}}%
+ \def\tikz@mainsnakelength{\pgfsnakeremainingdistance-#1}%
+}
+\tikzoption{line around snake}{%
+ \def\tikz@presnake{{lineto}{#1}{\noexpand\tikz@snake@install@trans}{}}%
+ \def\tikz@postsnake{{lineto}{#1}{\noexpand\tikz@snake@install@trans}{}}%
+ \def\tikz@mainsnakelength{\pgfsnakeremainingdistance-#1}%
+}
+\let\pgf@snake@mirror=\pgfutil@empty
+\let\pgf@snake@raise=\pgfutil@empty
+
+\def\tikz@snake@install@trans{\pgfsetsnakesegmenttransformation{\pgf@snake@mirror\pgf@snake@raise}}
+
+\def\tikz@snake{zigzag}
+
+\let\tikz@presnake=\pgfutil@empty
+\let\tikz@postsnake=\pgfutil@empty
+\def\tikz@mainsnakelength{\pgfsnakeremainingdistance}
+
+
+\tikzstyle{snake triangles 45}= [snake=triangles,segment object length=2.41421356\pgfsnakesegmentamplitude]
+\tikzstyle{snake triangles 60}= [snake=triangles,segment object length=1.73205081\pgfsnakesegmentamplitude]
+\tikzstyle{snake triangles 90}= [snake=triangles,segment object length=\pgfsnakesegmentamplitude]
+
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarythrough.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarythrough.code.tex
new file mode 100644
index 00000000000..f369a23b830
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarythrough.code.tex
@@ -0,0 +1,36 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarythrough.code.tex,v 1.1 2008/02/03 19:37:27 tantau Exp $
+
+
+
+\tikzset{circle through/.code={%
+ \pgfkeysalso{shape=circle,inner sep=0pt,outer sep=0pt}%
+ % Save transformations (correct?)
+ \pgfgettransform{\tikz@lib@saved@transform}%
+ \tikz@scan@one@point\tikz@lib@circle@through#1%
+ }}
+
+\def\tikz@lib@circle@through#1{%
+ \tikz@addoption{%
+ {%
+ \pgfsettransform{\tikz@lib@saved@transform}%
+ \pgf@process{\pgfpointtransformed{#1}}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\pgfpointtransformed{\tikz@node@at}}%
+ \advance\pgf@xa by-\pgf@x%
+ \advance\pgf@ya by-\pgf@y%
+ \pgfmathparse{2*veclen(\the\pgf@xa,\the\pgf@ya)}%
+ \global\let\tikz@lib@circle@size=\pgfmathresult%
+ }%
+ \pgfset{/pgf/minimum size/.expanded=\tikz@lib@circle@size}%
+ }%
+} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikztopaths.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex
index 6c720fdc95f..2be37e7d3d3 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikztopaths.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikztopaths.code.tex,v 1.7 2007/06/07 07:41:11 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
% Straight to
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikztrees.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytrees.code.tex
index cba3a725ad1..838bb20be21 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikztrees.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytrees.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikztrees.code.tex,v 1.8 2007/03/09 17:49:32 tantau Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytrees.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
@@ -15,7 +15,7 @@
% Three point growth
%
-\define@key{tikz}{grow via three points}{\let\tikz@grow=\tikz@grow@three\tikz@parse@three#1}
+\tikzoption{grow via three points}{\let\tikz@grow=\tikz@grow@three\tikz@parse@three#1}
\def\tikz@parse@three one child at#1(#2)#3and two children at#4(#5)#6and#7(#8){%
\def\tikz@tree@one@child{\tikz@scan@one@point\pgf@process(#2)}
@@ -59,40 +59,24 @@
\tikzstyle{grow cyclic}=[growth function=\tikz@grow@circle]
-\define@key{tikz}{sibling angle}{\edef\tikz@sibling@angle{#1}}
-\def\tikz@sibling@angle{20}
+\tikzset{sibling angle/.initial=20}
\def\tikz@grow@circle{%
- \c@pgf@counta=\tikz@sibling@angle\relax%
- \c@pgf@countb=\tikz@sibling@angle\relax%
- \divide\c@pgf@counta by2\relax%
- \multiply\c@pgf@countb by\tikznumberofcurrentchild\relax%
- \c@pgf@countc=-\c@pgf@counta\relax
- \multiply\c@pgf@countc by\tikznumberofchildren\relax%
- \advance\c@pgf@countc by-\c@pgf@counta\relax
- \advance\c@pgf@countc by\c@pgf@countb\relax
- \pgftransformrotate{\the\c@pgf@countc}%
+ \pgftransformrotate{%
+ (\pgfkeysvalueof{/tikz/sibling angle})*(-.5-.5*\tikznumberofchildren+\tikznumberofcurrentchild)}%
\pgftransformxshift{\the\tikzleveldistance}%
}
\tikzoption{counterclockwise from}{\let\tikz@grow=\tikz@grow@circle@from\def\tikz@grow@circle@from@start{#1}}
\def\tikz@grow@circle@from{%
- \c@pgf@counta=\tikz@sibling@angle\relax%
- \multiply\c@pgf@counta by\tikznumberofcurrentchild\relax%
- \advance\c@pgf@counta by-\tikz@sibling@angle\relax%
- \advance\c@pgf@counta by\tikz@grow@circle@from@start\relax%
- \pgftransformshift{\pgfpointpolar{\the\c@pgf@counta}{\the\tikzleveldistance}}%
+ \pgftransformshift{\pgfpointpolar{\tikz@grow@circle@from@start+(\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentchild-1)}{\the\tikzleveldistance}}%
}
\tikzoption{clockwise from}{\let\tikz@grow=\tikz@grow@circle@from@\def\tikz@grow@circle@from@start{#1}}
\def\tikz@grow@circle@from@{%
- \c@pgf@counta=\tikz@sibling@angle\relax%
- \multiply\c@pgf@counta by-\tikznumberofcurrentchild\relax%
- \advance\c@pgf@counta by\tikz@sibling@angle\relax%
- \advance\c@pgf@counta by\tikz@grow@circle@from@start\relax%
- \pgftransformshift{\pgfpointpolar{\the\c@pgf@counta}{\the\tikzleveldistance}}%
+ \pgftransformshift{\pgfpointpolar{\tikz@grow@circle@from@start-(\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentchild-1)}{\the\tikzleveldistance}}%
}
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
new file mode 100644
index 00000000000..cb8ad420ea8
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
@@ -0,0 +1,3909 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/tikz.code.tex,v 1.27 2008/02/13 19:48:11 tantau Exp $
+
+
+% Always-present libraries:
+
+\usepgflibrary{plothandlers}
+
+% TikZ is a key family
+\pgfkeys{/tikz/.is family}
+
+\def\tikzset{\pgfqkeys{/tikz}}
+
+
+\newdimen\tikz@lastx
+\newdimen\tikz@lasty
+\newdimen\tikz@lastxsaved
+\newdimen\tikz@lastysaved
+
+\newdimen\tikzleveldistance
+\newdimen\tikzsiblingdistance
+
+\newbox\tikz@figbox
+\newbox\tikz@tempbox
+
+\newcount\tikztreelevel
+\newcount\tikznumberofchildren
+\newcount\tikznumberofcurrentchild
+
+\newcount\tikz@fig@count
+
+\newif\iftikz@node@is@a@label
+\newif\iftikz@snaked
+\newif\iftikz@decoratepath
+
+\let\tikz@options=\pgfutil@empty
+\def\tikz@addoption#1{\expandafter\def\expandafter\tikz@options\expandafter{\tikz@options#1}}
+\def\tikz@addmode#1{\expandafter\def\expandafter\tikz@mode\expandafter{\tikz@mode#1}}
+\def\tikz@addtransform#1{%
+ \ifx\tikz@transform\relax%
+ #1%
+ \else%
+ \expandafter\def\expandafter\tikz@transform\expandafter{\tikz@transform#1}%
+ \fi%
+}
+
+
+
+% TikZ options:
+
+% This command is supported for compatibility only:
+
+\def\tikzoption#1{\pgfutil@ifnextchar[{\tikzoption@opt{#1}}{\tikzoption@noopt{#1}}}%}
+
+\def\tikzoption@opt#1[#2]#3{\pgfkeysdef{/tikz/#1}{#3}\pgfkeyssetvalue{/tikz/#1/.@def}{#2}}
+\def\tikzoption@noopt#1#2{\pgfkeysdef{/tikz/#1}{#2}\pgfkeyssetvalue{/tikz/#1/.@def}{\pgfkeysvaluerequired}}
+
+% Baseline options
+\tikzoption{baseline}[0pt]{\pgfutil@ifnextchar({\tikz@baseline@coordinate}{\tikz@baseline@simple}#1\@nil}%)
+\def\tikz@baseline@simple#1\@nil{\pgfsetbaseline{#1}}
+\def\tikz@baseline@coordinate#1\@nil{\pgfsetbaselinepointlater{\tikz@scan@one@point\pgfutil@firstofone#1}}
+
+% Draw options
+\tikzoption{line width}{\tikz@semiaddlinewidth{#1}}%
+
+\def\tikz@semiaddlinewidth#1{\tikz@addoption{\pgfsetlinewidth{#1}}\pgfmathsetlength\pgflinewidth{#1}}
+
+\tikzoption{cap}{\tikz@addoption{\csname pgfset#1cap\endcsname}}
+\tikzoption{join}{\tikz@addoption{\csname pgfset#1join\endcsname}}
+\tikzoption{line cap}{\tikz@addoption{\csname pgfset#1cap\endcsname}}
+\tikzoption{line join}{\tikz@addoption{\csname pgfset#1join\endcsname}}
+\tikzoption{miter limit}{\tikz@addoption{\pgfsetmiterlimit{#1}}}
+
+\tikzoption{dash pattern}{% syntax: on 2pt off 3pt on 4pt ...
+ \def\tikz@temp{#1}%
+ \ifx\tikz@temp\pgfutil@empty%
+ \def\tikz@dashpattern{}%
+ \tikz@addoption{\pgfsetdash{}{0pt}}%
+ \else%
+ \def\tikz@dashpattern{}%
+ \expandafter\tikz@scandashon\pgfutil@gobble#1o\@nil%
+ \edef\tikz@temp{{\tikz@dashpattern}{\noexpand\tikz@dashphase}}%
+ \expandafter\tikz@addoption\expandafter{\expandafter\pgfsetdash\tikz@temp}%
+ \fi}
+\tikzoption{dash phase}{%
+ \def\tikz@dashphase{#1}%
+ \edef\tikz@temp{{\tikz@dashpattern}{\noexpand\tikz@dashphase}}%
+ \expandafter\tikz@addoption\expandafter{\expandafter\pgfsetdash\tikz@temp}%
+}%
+\def\tikz@dashphase{0pt}
+
+\def\tikz@scandashon n#1o{%
+ \expandafter\def\expandafter\tikz@dashpattern\expandafter{\tikz@dashpattern{#1}}%
+ \pgfutil@ifnextchar\@nil{\pgfutil@gobble}{\tikz@scandashoff}}
+\def\tikz@scandashoff ff#1o{%
+ \expandafter\def\expandafter\tikz@dashpattern\expandafter{\tikz@dashpattern{#1}}%
+ \pgfutil@ifnextchar\@nil{\pgfutil@gobble}{\tikz@scandashon}}
+
+\tikzoption{draw opacity}{\tikz@addoption{\pgfsetstrokeopacity{#1}}}
+
+% Double draw options
+\tikzoption{double}[]{%
+ \def\tikz@temp{#1}%
+ \ifx\tikz@temp\tikz@nonetext%
+ \tikz@addmode{\tikz@mode@doublefalse}%
+ \else%
+ \ifx\tikz@temp\pgfutil@empty%
+ \else%
+ \def\tikz@double@color{#1}%
+ \fi%
+ \tikz@addmode{\tikz@mode@doubletrue}%
+ \fi}
+\tikzoption{double distance}{%
+ \pgfmathsetlength{\pgf@x}{#1}%
+ \edef\tikz@double@width@distance{\the\pgf@x}%
+ \tikz@addmode{\tikz@mode@doubletrue}}
+
+\def\tikz@double@width@distance{0.6pt}
+\def\tikz@double@color{white}
+
+% Fill options
+
+\tikzoption{even odd rule}[]{\tikz@addoption{\pgfseteorule}}
+\tikzoption{nonzero rule}[]{\tikz@addoption{\pgfsetnonzerorule}}
+
+\tikzoption{fill opacity}{\tikz@addoption{\pgfsetfillopacity{#1}}}
+
+
+% Joined fill/draw options
+
+\tikzoption{opacity}{\tikz@addoption{\pgfsetstrokeopacity{#1}\pgfsetfillopacity{#1}}}
+
+
+% Main color options
+\tikzoption{color}{%
+ \tikz@addoption{%
+ \ifx\tikz@fillcolor\pgfutil@empty%
+ \ifx\tikz@strokecolor\pgfutil@empty%
+ \else%
+ \pgfsys@color@reset@inorderfalse%
+ \let\tikz@strokecolor\pgfutil@empty%
+ \let\tikz@fillcolor\pgfutil@empty%
+ \fi%
+ \else%
+ \pgfsys@color@reset@inorderfalse%
+ \let\tikz@strokecolor\pgfutil@empty%
+ \let\tikz@fillcolor\pgfutil@empty%
+ \fi%
+ \pgfutil@colorlet{tikz@color}{#1}%
+ \pgfutil@colorlet{.}{tikz@color}%
+ \pgfsetcolor{.}%
+ \pgfsys@color@reset@inordertrue%
+ }%
+ \def\tikz@textcolor{#1}}
+
+
+
+% Rounding options
+\tikzoption{rounded corners}[4pt]{\pgfsetcornersarced{\pgfpoint{#1}{#1}}}
+\tikzoption{sharp corners}[]{\pgfsetcornersarced{\pgfpointorigin}}
+
+
+
+% Coordinate options
+\tikzoption{x}{\tikz@handle@vec{\pgfsetxvec}{\tikz@handle@x}#1\relax}
+\tikzoption{y}{\tikz@handle@vec{\pgfsetyvec}{\tikz@handle@y}#1\relax}
+\tikzoption{z}{\tikz@handle@vec{\pgfsetzvec}{\tikz@handle@z}#1\relax}
+
+\def\tikz@handle@vec#1#2{\pgfutil@ifnextchar({\tikz@handle@coordinate#1}{\tikz@handle@single#2}}
+\def\tikz@handle@coordinate#1{\tikz@scan@one@point#1}
+\def\tikz@handle@single#1#2\relax{#1{#2}}
+\def\tikz@handle@x#1{\pgfsetxvec{\pgfpoint{#1}{0pt}}}
+\def\tikz@handle@y#1{\pgfsetyvec{\pgfpoint{0pt}{#1}}}
+\def\tikz@handle@z#1{\pgfsetzvec{\pgfpoint{#1}{#1}}}
+
+
+% Transformation options
+\tikzoption{scale}{\tikz@addtransform{\pgftransformscale{#1}}}
+\tikzoption{scale around}{\tikz@addtransform{\def\tikz@aroundaction{\pgftransformscale}\tikz@doaround{#1}}}
+\tikzoption{xscale}{\tikz@addtransform{\pgftransformxscale{#1}}}
+\tikzoption{xslant}{\tikz@addtransform{\pgftransformxslant{#1}}}
+\tikzoption{yscale}{\tikz@addtransform{\pgftransformyscale{#1}}}
+\tikzoption{yslant}{\tikz@addtransform{\pgftransformyslant{#1}}}
+\tikzoption{rotate}{\tikz@addtransform{\pgftransformrotate{#1}}}
+\tikzoption{rotate around}{\tikz@addtransform{\def\tikz@aroundaction{\pgftransformrotate}\tikz@doaround{#1}}}
+\def\tikz@doaround#1{%
+ \edef\tikz@temp{#1}% get rid of active stuff
+ \expandafter\tikz@doparseA\tikz@temp%
+}%
+\def\tikz@doparseA#1:{%
+ \def\tikz@temp@rot{#1}%
+ \tikz@scan@one@point\tikz@doparseB%
+}
+\def\tikz@doparseB#1{%
+ \pgf@process{#1}%
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ \pgftransformshift{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
+ \tikz@aroundaction{\tikz@temp@rot}%
+ \pgftransformshift{\pgfqpoint{-\pgf@xc}{-\pgf@yc}}%
+}
+
+\tikzoption{shift}{\tikz@addtransform{\tikz@scan@one@point\pgftransformshift#1\relax}}
+\tikzoption{xshift}{\tikz@addtransform{\pgftransformxshift{#1}}}
+\tikzoption{yshift}{\tikz@addtransform{\pgftransformyshift{#1}}}
+\tikzoption{cm}{\tikz@addtransform{\tikz@parse@cm#1\relax}}
+\tikzoption{reset cm}[]{\tikz@addtransform{\pgftransformreset}}
+\tikzoption{shift only}[]{\tikz@addtransform{\pgftransformresetnontranslations}}
+
+\def\tikz@parse@cm#1,#2,#3,#4,{%
+ \def\tikz@p@cm{{#1}{#2}{#3}{#4}}%
+ \tikz@scan@one@point\tikz@parse@cmA}
+\def\tikz@parse@cmA#1{%
+ \expandafter\pgftransformcm\tikz@p@cm{#1}%
+}
+
+\tikzset{transform canvas/.code=%
+ {%
+ \tikz@addoption
+ {%
+ {%
+ \pgftransformreset%
+ \let\tikz@transform=\relax%
+ \tikzset{#1}%
+ \pgflowlevelsynccm%
+ }%
+ \pgf@relevantforpicturesizefalse%
+ }%
+ }%
+}
+
+
+% Grid options
+\tikzoption{xstep}{\def\tikz@grid@x{#1}}
+\tikzoption{ystep}{\def\tikz@grid@y{#1}}
+\tikzoption{step}{\tikz@handle@vec{\tikz@step@point}{\tikz@step@single}#1\relax}
+\def\tikz@step@single#1{\def\tikz@grid@x{#1}\def\tikz@grid@y{#1}}
+\def\tikz@step@point#1{\pgf@process{#1}\edef\tikz@grid@x{\the\pgf@x}\edef\tikz@grid@y{\the\pgf@y}}
+
+\def\tikz@grid@x{1cm}
+\def\tikz@grid@y{1cm}
+
+
+% Current point updates
+\newif\iftikz@current@point@local
+\tikzset{current point is local/.is if=tikz@current@point@local}
+
+% Path usage options
+\newif\iftikz@mode@double
+\newif\iftikz@mode@fill
+\newif\iftikz@mode@draw
+\newif\iftikz@mode@clip
+\newif\iftikz@mode@boundary
+\newif\iftikz@mode@shade
+\newif\iftikz@mode@fade@path
+\newif\iftikz@mode@fade@scope
+\let\tikz@mode=\pgfutil@empty
+
+\def\tikz@nonetext{none}
+
+\tikzoption{path only}[]{\let\tikz@mode=\pgfutil@empty}
+\tikzoption{shade}[]{\tikz@addmode{\tikz@mode@shadetrue}}
+\tikzoption{fill}[]{%
+ \edef\tikz@temp{#1}%
+ \ifx\tikz@temp\tikz@nonetext%
+ \tikz@addmode{\tikz@mode@fillfalse}%
+ \else%
+ \ifx\tikz@temp\pgfutil@empty%
+ \else%
+ \tikz@addoption{\pgfsetfillcolor{#1}}%
+ \def\tikz@fillcolor{#1}%
+ \fi%
+ \tikz@addmode{\tikz@mode@filltrue}%
+ \fi%
+}
+\tikzoption{draw}[]{%
+ \edef\tikz@temp{#1}%
+ \ifx\tikz@temp\tikz@nonetext%
+ \tikz@addmode{\tikz@mode@drawfalse}%
+ \else%
+ \ifx\tikz@temp\pgfutil@empty%
+ \else%
+ \tikz@addoption{\pgfsetstrokecolor{#1}}%
+ \def\tikz@strokecolor{#1}%
+ \fi%
+ \tikz@addmode{\tikz@mode@drawtrue}%
+ \fi%
+}
+\tikzoption{clip}[]{\tikz@addmode{\tikz@mode@cliptrue}}
+\tikzoption{use as bounding box}[]{\tikz@addmode{\tikz@mode@boundarytrue}}
+
+\tikzoption{save path}{\tikz@addmode{\pgfsyssoftpath@getcurrentpath#1\global\let#1=#1}}
+
+\let\tikz@fillcolor=\pgfutil@empty
+\let\tikz@strokecolor=\pgfutil@empty
+
+
+% Pattern options
+\tikzset{pattern/.code=\PackageError{tikz}{You need to say \string\usetikzlibrary{patterns}}{},
+ pattern color/.style=pattern}
+
+
+% Shading options
+\tikzset{path fading/.code={
+ \def\tikz@temp{#1}%
+ \ifx\tikz@temp\tikz@nonetext%
+ \tikz@addmode{\tikz@mode@fade@pathfalse}%
+ \else%
+ \ifx\tikz@temp\pgfutil@empty%
+ \else%
+ \def\tikz@path@fading{#1}%
+ \fi%
+ \tikz@addmode{\tikz@mode@fade@pathtrue}%
+ \fi%
+ },
+ path fading/.default=,
+ scope fading/.code={
+ \def\tikz@temp{#1}%
+ \ifx\tikz@temp\tikz@nonetext%
+ \tikz@addmode{\tikz@mode@fade@scopefalse}%
+ \else%
+ \ifx\tikz@temp\pgfutil@empty%
+ \else%
+ \def\tikz@scope@fading{#1}%
+ \fi%
+ \tikz@addmode{\tikz@mode@fade@scopetrue}%
+ \fi%
+ },
+ scope fading/.default=}
+\tikzset{fit fading/.is if=tikz@fade@adjust}
+\tikzset{fading transform/.store in=\tikz@fade@transform}
+\tikzset{fading angle/.style={fading transform={rotate=#1}}}
+
+\newif\iftikz@fade@adjust
+\tikz@fade@adjusttrue
+\let\tikz@fade@transform\pgfutil@empty
+
+\pgfutil@colorlet{transparent}{pgftransparent}
+\def\tikz@do@fade@transform{\let\tikz@transform=\relax\expandafter\tikzset\expandafter{\tikz@fade@transform}}
+
+
+
+% Transparency groups
+\newif\iftikz@transparency@group
+\tikzset{/tikz/transparency group/.is if=tikz@transparency@group}
+
+
+% Shading options
+\tikzoption{shading}{\def\tikz@shading{#1}\tikz@addmode{\tikz@mode@shadetrue}}
+\tikzoption{shading angle}{\def\tikz@shade@angle{#1}\tikz@addmode{\tikz@mode@shadetrue}}
+\tikzoption{top color}{%
+ \pgfutil@colorlet{tikz@axis@top}{#1}%
+ \pgfutil@colorlet{tikz@axis@middle}{tikz@axis@top!50!tikz@axis@bottom}%
+ \def\tikz@shading{axis}\def\tikz@shade@angle{0}\tikz@addmode{\tikz@mode@shadetrue}}
+\tikzoption{bottom color}{%
+ \pgfutil@colorlet{tikz@axis@bottom}{#1}%
+ \pgfutil@colorlet{tikz@axis@middle}{tikz@axis@top!50!tikz@axis@bottom}%
+ \def\tikz@shading{axis}\def\tikz@shade@angle{0}\tikz@addmode{\tikz@mode@shadetrue}}
+\tikzoption{middle color}{%
+ \pgfutil@colorlet{tikz@axis@middle}{#1}%
+ \def\tikz@shading{axis}\tikz@addmode{\tikz@mode@shadetrue}}
+\tikzoption{left color}{%
+ \pgfutil@colorlet{tikz@axis@top}{#1}%
+ \pgfutil@colorlet{tikz@axis@middle}{tikz@axis@top!50!tikz@axis@bottom}%
+ \def\tikz@shading{axis}\def\tikz@shade@angle{90}\tikz@addmode{\tikz@mode@shadetrue}}
+\tikzoption{right color}{%
+ \pgfutil@colorlet{tikz@axis@bottom}{#1}%
+ \pgfutil@colorlet{tikz@axis@middle}{tikz@axis@top!50!tikz@axis@bottom}%
+ \def\tikz@shading{axis}\def\tikz@shade@angle{90}\tikz@addmode{\tikz@mode@shadetrue}}
+\tikzoption{ball color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{ball}\tikz@addmode{\tikz@mode@shadetrue}}
+\tikzoption{inner color}{\pgfutil@colorlet{tikz@radial@inner}{#1}\def\tikz@shading{radial}\tikz@addmode{\tikz@mode@shadetrue}}
+\tikzoption{outer color}{\pgfutil@colorlet{tikz@radial@outer}{#1}\def\tikz@shading{radial}\tikz@addmode{\tikz@mode@shadetrue}}
+
+\def\tikz@shading{axis}
+\def\tikz@shade@angle{0}
+
+\pgfdeclareverticalshading[tikz@axis@top,tikz@axis@middle,tikz@axis@bottom]{axis}{100bp}{%
+ color(0bp)=(tikz@axis@bottom);
+ color(25bp)=(tikz@axis@bottom);
+ color(50bp)=(tikz@axis@middle);
+ color(75bp)=(tikz@axis@top);
+ color(100bp)=(tikz@axis@top)}
+
+\pgfutil@colorlet{tikz@axis@top}{gray}
+\pgfutil@colorlet{tikz@axis@middle}{gray!50!white}
+\pgfutil@colorlet{tikz@axis@bottom}{white}
+
+\pgfdeclareradialshading[tikz@ball]{ball}{\pgfqpoint{-10bp}{10bp}}{%
+ color(0bp)=(tikz@ball!15!white);
+ color(9bp)=(tikz@ball!75!white);
+ color(18bp)=(tikz@ball!70!black);
+ color(25bp)=(tikz@ball!50!black);
+ color(50bp)=(black)}
+
+\pgfutil@colorlet{tikz@ball}{blue}
+
+\pgfdeclareradialshading[tikz@radial@inner,tikz@radial@outer]{radial}{\pgfpointorigin}{%
+ color(0bp)=(tikz@radial@inner);
+ color(25bp)=(tikz@radial@outer);
+ color(50bp)=(tikz@radial@outer)}
+
+\pgfutil@colorlet{tikz@radial@inner}{gray}
+\pgfutil@colorlet{tikz@radial@outer}{white}
+
+
+% Pin options
+\tikzoption{pin}{\pgfutil@ifnextchar[{\tikz@parse@pin}{\tikz@parse@pin[]}#1\pgf@nil}
+\tikzoption{pin distance}{\def\tikz@pin@distance{#1}}
+\tikzoption{pin edge}{\def\tikz@pin@edge@style{#1}}
+
+\tikzoption{tikz@pin@post}[]{%
+ \tikz@compute@direction{\tikz@label@angle}{\tikz@pin@distance}%
+ \global\let\tikz@pin@edge@style@smuggle=\tikz@pin@edge@style%
+}
+\tikzoption{tikz@pre@pin@edge}[]{\def\pgf@marshal{\tikzstyle{tikz@pin@options}=}
+ \expandafter\pgf@marshal\expandafter[\tikz@pin@edge@style@smuggle]%
+}
+
+\def\tikz@pin@distance{3ex}
+\def\tikz@pin@edge@style{}
+
+\def\tikz@parse@pin[#1]#2:#3\pgf@nil{%
+ \tikz@add@after@node@path{%
+ \bgroup
+ [current point is local=true]
+ \pgfextra{\let\tikz@save@last@node=\tikzlastnode}%
+ node [every pin,tikz@label@angle=#2,#1,at=(\tikzlastnode.\tikz@label@angle),%
+ after node path={(\tikz@save@last@node) edge[every pin edge,tikz@pre@pin@edge,tikz@pin@options] (\tikzlastnode)},
+ tikz@pin@post]
+ {#3}
+ \egroup%
+ }
+}
+
+
+% Label and pin options
+
+\tikzoption{label}{\pgfutil@ifnextchar[{\tikz@parse@label}{\tikz@parse@label[]}#1\pgf@nil}
+\tikzoption{label distance}{\def\tikz@label@distance{#1}}
+
+\tikzoption{tikz@label@angle}{\def\tikz@label@angle{#1}\csname tikz@label@angle@is@#1\endcsname}
+
+\tikzoption{tikz@label@post}[]{\tikz@compute@direction{\tikz@label@angle}{\tikz@label@distance}}
+
+\def\tikz@label@distance{0pt}
+
+\def\tikz@parse@label[#1]#2:#3\pgf@nil{%
+ \tikz@add@after@node@path{
+ \bgroup
+ \pgfextra{\let\tikz@save@last@fig@name=\tikz@last@fig@name}%
+ node
+ [every label,%
+ tikz@label@angle=#2,%
+ #1,%
+ at=(\tikzlastnode.\tikz@label@angle),tikz@label@post]%
+ {#3}%
+ \pgfextra{\global\let\tikz@last@fig@name=\tikz@save@last@fig@name}%
+ \egroup%
+ }
+}
+
+\expandafter\def\csname tikz@label@angle@is@right\endcsname{\def\tikz@label@angle{0}}
+\expandafter\def\csname tikz@label@angle@is@above right\endcsname{\def\tikz@label@angle{45}}
+\expandafter\def\csname tikz@label@angle@is@above\endcsname{\def\tikz@label@angle{90}}
+\expandafter\def\csname tikz@label@angle@is@above left\endcsname{\def\tikz@label@angle{135}}
+\expandafter\def\csname tikz@label@angle@is@left\endcsname{\def\tikz@label@angle{180}}
+\expandafter\def\csname tikz@label@angle@is@below left\endcsname{\def\tikz@label@angle{225}}
+\expandafter\def\csname tikz@label@angle@is@below\endcsname{\def\tikz@label@angle{270}}
+\expandafter\def\csname tikz@label@angle@is@below right\endcsname{\def\tikz@label@angle{315}}
+
+\def\tikz@compute@direction#1#2{%
+ \let\tikz@do@auto@anchor=\relax
+ \c@pgf@counta=#1\relax%
+ \ifnum\c@pgf@counta<0\relax
+ \advance\c@pgf@counta by 360\relax%
+ \fi%
+ \ifnum\c@pgf@counta>359\relax
+ \advance\c@pgf@counta by-360\relax%
+ \fi%
+ \ifnum\c@pgf@counta<4\relax%
+ \def\tikz@anchor{west}%
+ \else\ifnum\c@pgf@counta<87\relax%
+ \def\tikz@anchor{south west}%
+ \else\ifnum\c@pgf@counta<94\relax%
+ \def\tikz@anchor{south}%
+ \else\ifnum\c@pgf@counta<177\relax%
+ \def\tikz@anchor{south east}%
+ \else\ifnum\c@pgf@counta<184\relax%
+ \def\tikz@anchor{east}%
+ \else\ifnum\c@pgf@counta<267\relax%
+ \def\tikz@anchor{north east}%
+ \else\ifnum\c@pgf@counta<274\relax%
+ \def\tikz@anchor{north}%
+ \else\ifnum\c@pgf@counta<357\relax%
+ \def\tikz@anchor{north west}%
+ \else%
+ \def\tikz@anchor{west}%
+ \fi\fi\fi\fi\fi\fi\fi\fi%
+ \tikz@addtransform{\pgftransformshift{\pgfpointpolar{#1}{#2}}}%
+}
+
+
+
+% General node options
+\tikzoption{name}{\edef\tikz@fig@name{#1}}
+
+\tikzoption{at}{\tikz@scan@one@point\tikz@set@at#1}
+\def\tikz@set@at#1{\def\tikz@node@at{#1}}%
+
+\tikzoption{shape}{\edef\tikz@shape{#1}}
+
+\tikzoption{nodes}{\tikzstyle{every node}+=[#1]}
+
+\tikzset{alias/.code={\tikz@fig@mustbenamed\expandafter\def\expandafter\tikz@alias\expandafter{\tikz@alias\pgfnodealias{#1}{\tikz@fig@name}}}}
+
+\tikzoption{after node path}{\tikz@add@after@node@path{#1}}%
+\def\tikz@add@after@node@path#1{\expandafter\def\expandafter\tikz@after@node\expandafter{\tikz@after@node#1}}
+
+\def\tikzaddafternodepathoption#1{%
+ #1%
+ \expandafter\def\expandafter\tikz@afternodepathoptions\expandafter{\tikz@afternodepathoptions#1}}
+
+\let\tikz@afternodepathoptions=\pgfutil@empty
+
+\tikzoption{anchor}{\def\tikz@anchor{#1}\let\tikz@do@auto@anchor=\relax}
+
+\tikzoption{left}[]{\def\tikz@anchor{east}\tikz@possibly@transform{x}{-}{#1}}
+\tikzoption{right}[]{\def\tikz@anchor{west}\tikz@possibly@transform{x}{}{#1}}
+\tikzoption{above}[]{\def\tikz@anchor{south}\tikz@possibly@transform{y}{}{#1}}
+\tikzoption{below}[]{\def\tikz@anchor{north}\tikz@possibly@transform{y}{-}{#1}}
+\tikzoption{above left}[]%
+ {\def\tikz@anchor{south east}%
+ \tikz@possibly@transform{x}{-}{#1}\tikz@possibly@transform{y}{}{#1}}
+\tikzoption{above right}[]%
+ {\def\tikz@anchor{south west}%
+ \tikz@possibly@transform{x}{}{#1}\tikz@possibly@transform{y}{}{#1}}
+\tikzoption{below left}[]%
+ {\def\tikz@anchor{north east}%
+ \tikz@possibly@transform{x}{-}{#1}\tikz@possibly@transform{y}{-}{#1}}
+\tikzoption{below right}[]%
+ {\def\tikz@anchor{north west}%
+ \tikz@possibly@transform{x}{}{#1}\tikz@possibly@transform{y}{-}{#1}}
+
+\tikzoption{node distance}{\def\tikz@node@distance{#1}}
+\def\tikz@node@distance{1cm}
+
+% The following are deprecated:
+\tikzoption{above of}{\tikz@of{#1}{90}}%
+\tikzoption{below of}{\tikz@of{#1}{-90}}%
+\tikzoption{left of}{\tikz@of{#1}{180}}%
+\tikzoption{right of}{\tikz@of{#1}{0}}%
+\tikzoption{above left of}{\tikz@of{#1}{135}}%
+\tikzoption{below left of}{\tikz@of{#1}{-135}}%
+\tikzoption{above right of}{\tikz@of{#1}{45}}%
+\tikzoption{below right of}{\tikz@of{#1}{-45}}%
+\def\tikz@of#1#2{%
+ \def\tikz@anchor{center}%
+ \let\tikz@do@auto@anchor=\relax%
+ \tikz@addtransform{%
+ \expandafter\tikz@extract@node@dist\tikz@node@distance and\pgf@stop%
+ \pgftransformshift{\pgfpointpolar{#2}{\tikz@extracted@node@distance}}}%
+ \def\tikz@node@at{\pgfpointanchor{#1}{center}}}
+\def\tikz@extract@node@dist#1and#2\pgf@stop{%
+ \def\tikz@extracted@node@distance{#1}}
+
+
+\tikzoption{transform shape}[true]{%
+ \csname tikz@fullytransformed#1\endcsname%
+ \iftikz@fullytransformed%
+ \pgfresetnontranslationattimefalse%
+ \else%
+ \pgfresetnontranslationattimetrue%
+ \fi%
+}
+
+\newif\iftikz@fullytransformed
+\pgfresetnontranslationattimetrue%
+
+\def\tikz@anchor{center}%
+\def\tikz@shape{rectangle}%
+
+\def\tikz@possibly@transform#1#2#3{%
+ \let\tikz@do@auto@anchor=\relax%
+ \def\tikz@test{#3}%
+ \ifx\tikz@test\pgfutil@empty%
+ \else%
+ \pgfmathsetlength{\pgf@x}{#3}%
+ \pgf@x=#2\pgf@x\relax%
+ \edef\tikz@marshal{\noexpand\tikz@addtransform{%
+ \expandafter\noexpand\csname pgftransform#1shift\endcsname{\the\pgf@x}}}%
+ \tikz@marshal%
+ \fi%
+}
+
+
+% Inter-picture options
+\tikzoption{remember picture}[true]{\csname pgfrememberpicturepositiononpage#1\endcsname}
+\tikzoption{overlay}[]{\pgf@relevantforpicturesizefalse}
+
+
+
+% Line/curve label placement options
+\tikzoption{sloped}[true]{\csname pgfslopedattime#1\endcsname}
+\tikzoption{allow upside down}[true]{\csname pgfallowupsidedownattime#1\endcsname}
+
+\tikzoption{pos}{\edef\tikz@time{#1}}
+
+\tikzoption{auto}[]{\csname tikz@install@auto@anchor@#1\endcsname}
+\tikzoption{swap}[]{%
+ \def\tikz@temp{left}%
+ \ifx\tikz@auto@anchor@direction\tikz@temp%
+ \def\tikz@auto@anchor@direction{right}%
+ \else%
+ \def\tikz@auto@anchor@direction{left}%
+ \fi%
+}
+
+\def\tikz@time{.5}
+
+\def\tikz@install@auto@anchor@{\let\tikz@do@auto@anchor=\tikz@auto@anchor@on}
+\def\tikz@install@auto@anchor@false{\let\tikz@do@auto@anchor=\relax}
+\def\tikz@install@auto@anchor@left{\let\tikz@do@auto@anchor=\tikz@auto@anchor@on\def\tikz@auto@anchor@direction{left}}
+\def\tikz@install@auto@anchor@right{\let\tikz@do@auto@anchor=\tikz@auto@anchor@on\def\tikz@auto@anchor@direction{right}}
+
+\let\tikz@do@auto@anchor=\relax%
+
+\def\tikz@auto@anchor@on{\csname tikz@auto@anchor@\tikz@auto@anchor@direction\endcsname}
+
+\def\tikz@auto@anchor@left{\tikz@auto@pre\tikz@auto@anchor\tikz@auto@post}
+\def\tikz@auto@anchor@right{\tikz@auto@pre\tikz@auto@anchor@prime\tikz@auto@post}
+
+\def\tikz@auto@anchor@direction{left}
+
+% Text options
+\tikzoption{text}{\def\tikz@textcolor{#1}}
+\tikzoption{font}{\def\tikz@textfont{#1}}
+\tikzoption{text opacity}{\def\tikz@textopacity{#1}}
+\tikzoption{text width}{\def\tikz@text@width{#1}}
+\tikzoption{text height}{\def\tikz@text@height{#1}}
+\tikzoption{text depth}{\def\tikz@text@depth{#1}}
+\tikzoption{text ragged}[]%
+{\def\tikz@text@action{\raggedright\rightskip\z@ plus2em \spaceskip.3333em \xspaceskip.5em\relax}}
+\tikzoption{text badly ragged}[]{\def\tikz@text@action{\raggedright\relax}}
+\tikzoption{text ragged left}[]%
+{\def\tikz@text@action{\raggedleft\leftskip\z@ plus2em \spaceskip.3333em \xspaceskip.5em\relax}}
+\tikzoption{text badly ragged left}[]{\def\tikz@text@action{\raggedleft\relax}}
+\tikzoption{text justified}[]{\def\tikz@text@action{\leftskip\z@\rightskip\z@\relax}}
+\tikzoption{text centered}[]{\def\tikz@text@action{%
+ \leftskip\z@ plus2em%
+ \rightskip\z@ plus2em%
+ \spaceskip.3333em \xspaceskip.5em%
+ \parfillskip=0pt%
+ \let\\=\@centercr% for latex
+ \relax}}
+\tikzoption{text badly centered}[]%
+{\def\tikz@text@action{%
+ \let\\=\@centercr% for latex
+ \parfillskip=0pt%
+ \rightskip\@flushglue%
+ \leftskip\@flushglue\relax}}
+
+\let\tikz@text@width=\pgfutil@empty
+\let\tikz@text@height=\pgfutil@empty
+\let\tikz@text@depth=\pgfutil@empty
+\let\tikz@textcolor=\pgfutil@empty
+\let\tikz@textfont=\pgfutil@empty
+\let\tikz@textopacity=\pgfutil@empty
+
+\def\tikz@text@action{\raggedright\rightskip\z@ plus2em \spaceskip.3333em \xspaceskip.5em\relax}
+
+
+
+
+
+% Arrow options
+\tikzoption{arrows}{\tikz@processarrows{#1}}
+
+\tikzoption{>}{%
+ \tikz@set@pointed{\csname pgf@arrows@invert#1\endcsname}{#1}%
+ \expandafter\tikz@processarrows\expandafter{\tikz@current@arrows}%
+}
+
+\tikzoption{shorten <}{\pgfsetshortenstart{#1}}
+\tikzoption{shorten >}{\pgfsetshortenend{#1}}
+
+\def\tikz@set@pointed#1#2{%
+ \pgfutil@ifundefined{pgf@arrow@code@tikze@>@#2}
+ {%
+ \pgfarrowsdeclarealias{tikzs@<@#2}{tikze@>@#2}{#1}{#2}%
+ \pgfarrowsdeclarereversed{tikzs@>@#2}{tikze@<@#2}{#1}{#2}%
+ \pgfarrowsdeclarecombine*{tikz@|<@#2}{tikz@>|@#2}{#1}{#2}{|}{|}%
+ \pgfarrowsdeclaredouble[\pgflinewidth]{tikzs@<<@#2}{tikze@>>@#2}{#1}{#2}%<<
+ \pgfarrowsdeclarereversed{tikzs@>>@#2}{tikze@<<@#2}{tikzs@<<@#2}{tikze@>>@#2}%<<
+ }{}%
+ \pgfutil@namedef{tikz@special@arrow@start<}{tikzs@<@#2}%
+ \pgfutil@namedef{tikz@special@arrow@end>}{tikze@>@#2}%
+ \pgfutil@namedef{tikz@special@arrow@start>}{tikzs@>@#2}%
+ \pgfutil@namedef{tikz@special@arrow@end<}{tikze@<@#2}%
+ \pgfutil@namedef{tikz@special@arrow@start|<}{tikz@|<@#2}%
+ \pgfutil@namedef{tikz@special@arrow@end>|}{tikz@>|@#2}%
+ \pgfutil@namedef{tikz@special@arrow@start<<}{tikzs@<<@#2}%
+ \pgfutil@namedef{tikz@special@arrow@end>>}{tikze@>>@#2}%<<
+ \pgfutil@namedef{tikz@special@arrow@start>>}{tikzs@<<@#2}%<<
+ \pgfutil@namedef{tikz@special@arrow@end<<}{tikze@>>@#2}%<<
+}
+
+\def\tikz@processarrows#1{%
+ \def\tikz@current@arrows{#1}%
+ \def\tikz@temp{#1}%
+ \ifx\tikz@temp\pgfutil@empty%
+ \else%
+ \tikz@@processarrows#1\@nil
+ \fi%
+}
+\def\tikz@@processarrows#1-#2\@nil{%
+ \expandafter\ifx\csname tikz@special@arrow@start#1\endcsname\relax%
+ \pgfsetarrowsstart{#1}
+ \else%
+ \pgfsetarrowsstart{\csname tikz@special@arrow@start#1\endcsname}%
+ \fi%
+ \expandafter\ifx\csname tikz@special@arrow@end#2\endcsname\relax%
+ \pgfsetarrowsend{#2}
+ \else%
+ \pgfsetarrowsend{\csname tikz@special@arrow@end#2\endcsname}%
+ \fi%
+}
+
+\tikz@set@pointed{\pgf@arrows@invertto}{to}
+\def\tikz@current@arrows{-}
+
+% Parabola options
+\tikzoption{bend}{\tikz@scan@one@point\tikz@set@parabola@bend#1\relax}%
+\tikzoption{bend pos}{\def\tikz@parabola@bend@factor{#1}}
+\tikzoption{parabola height}{%
+ \def\tikz@parabola@bend@factor{.5}%
+ \def\tikz@parabola@bend{\pgfpointadd{\pgfpoint{0pt}{#1}}{\tikz@last@position@saved}}}
+
+\def\tikz@parabola@bend{\tikz@last@position@saved}
+\def\tikz@parabola@bend@factor{0}
+
+\def\tikz@set@parabola@bend#1{\def\tikz@parabola@bend{#1}}
+
+% Axis options
+\tikzoption{domain}{\def\tikz@plot@domain{#1}\expandafter\tikz@plot@samples@recalc\tikz@plot@domain\relax}
+\tikzoption{range}{\def\tikz@plot@range{#1}}
+
+% Plot options
+\tikzoption{smooth}[]{\let\tikz@plot@handler=\pgfplothandlercurveto}
+\tikzoption{smooth cycle}[]{\let\tikz@plot@handler=\pgfplothandlerclosedcurve}
+\tikzoption{sharp plot}[]{\let\tikz@plot@handler\pgfplothandlerlineto}
+
+\tikzoption{tension}{\pgfsetplottension{#1}}
+
+\tikzoption{xcomb}[]{\let\tikz@plot@handler=\pgfplothandlerxcomb}
+\tikzoption{ycomb}[]{\let\tikz@plot@handler=\pgfplothandlerycomb}
+\tikzoption{polar comb}[]{\let\tikz@plot@handler=\pgfplothandlerpolarcomb}
+
+\tikzoption{raw gnuplot}[true]{\csname tikz@plot@raw@gnuplot#1\endcsname}
+\tikzoption{prefix}{\def\tikz@plot@prefix{#1}}
+\tikzoption{id}{\def\tikz@plot@id{#1}}
+
+\tikzoption{samples}{\def\tikz@plot@samples{#1}\expandafter\tikz@plot@samples@recalc\tikz@plot@domain\relax}
+\tikzoption{samples at}{\def\tikz@plot@samplesat{#1}}
+\tikzoption{parametric}[true]{\csname tikz@plot@parametric#1\endcsname}
+
+\tikzoption{variable}{\def\tikz@plot@var{#1}}
+
+\tikzoption{only marks}[]{\let\tikz@plot@handler\pgfplothandlerdiscard}
+
+\tikzoption{mark}{\def\tikz@plot@mark{#1}}
+\tikzoption{mark options}{\def\tikz@plot@mark@options{#1}}
+\tikzoption{mark size}{\pgfsetplotmarksize{#1}}
+
+\tikzoption{mark indices}{\def\tikz@mark@list{#1}}
+\tikzoption{mark phase}{\pgfsetplotmarkphase{#1}}
+\tikzoption{mark repeat}{\pgfsetplotmarkrepeat{#1}}
+
+\let\tikz@mark@list=\pgfutil@empty
+
+\let\tikz@plot@mark@options=\pgfutil@empty
+
+\let\tikz@plot@handler=\pgfplothandlerlineto
+\let\tikz@plot@mark=\pgfutil@empty
+
+\def\tikz@plot@samples{25}
+\def\tikz@plot@domain{-5:5}
+\def\tikz@plot@var{\x}
+\def\tikz@plot@samplesat{-5,-4.6,...,5}
+\def\tikz@plot@samples@recalc#1:#2\relax{%
+ \pgfmathparse{#1}%
+ \let\tikz@temp@start=\pgfmathresult%
+ \pgfmathparse{#2}%
+ \let\tikz@temp@end=\pgfmathresult%
+ \pgfmathparse{\tikz@temp@start+(\tikz@temp@end-\tikz@temp@start)/\tikz@plot@samples}%
+ \edef\tikz@plot@samplesat{\tikz@temp@start,\pgfmathresult,...,\tikz@temp@end}%
+}
+
+
+\def\tikz@plot@prefix{\jobname.}
+\def\tikz@plot@id{pgf-plot}
+
+\newif\iftikz@plot@parametric
+\newif\iftikz@plot@raw@gnuplot
+
+
+% To options
+\tikzoption{to path}{\def\tikz@to@path{#1}}
+
+\def\tikz@to@path{-- (\tikztotarget) \tikztonodes}
+
+
+
+% Tree options
+\newif\iftikz@child@missing
+\pgfkeys{/tikz/missing/.is if=tikz@child@missing}
+
+\tikzoption{edge from parent path}{\def\tikz@edge@to@parent@path{#1}}
+
+\tikzoption{parent anchor}{\def\tikzparentanchor{.#1}\ifx\tikzparentanchor\tikz@border@text\let\tikzparentanchor\pgfutil@empty\fi}
+\tikzoption{child anchor}{\def\tikzchildanchor{.#1}\ifx\tikzchildanchor\tikz@border@text\let\tikzchildanchor\pgfutil@empty\fi}
+
+\tikzoption{level distance}{\pgfmathsetlength\tikzleveldistance{#1}}
+\tikzoption{sibling distance}{\pgfmathsetlength\tikzsiblingdistance{#1}}
+
+\tikzoption{growth function}{\let\tikz@grow=#1}
+\tikzoption{growth parent anchor}{\def\tikz@growth@anchor{#1}}
+\tikzoption{grow}{\tikz@set@growth{#1}\edef\tikz@special@level{\the\tikztreelevel}}%
+\tikzoption{grow'}{\tikz@set@growth{#1}\tikz@swap@growth\edef\tikz@special@level{\the\tikztreelevel}}%
+
+\def\tikz@growth@anchor{center}
+
+\def\tikz@special@level{-1}% never
+
+\def\tikz@swap@growth{%
+ % Swap left and right
+ \let\tikz@temp=\tikz@angle@grow@right%
+ \let\tikz@angle@grow@right=\tikz@angle@grow@left%
+ \let\tikz@angle@grow@left=\tikz@temp%
+}%
+
+\def\tikz@set@growth#1{%
+ \let\tikz@grow=\tikz@grow@direction%
+ \expandafter\ifx\csname tikz@grow@direction@#1\endcsname\relax%
+ \c@pgf@counta=#1\relax%
+ \else%
+ \c@pgf@counta=\csname tikz@grow@direction@#1\endcsname%
+ \fi%
+ \edef\tikz@angle@grow{\the\c@pgf@counta}%
+ \advance\c@pgf@counta by-90\relax%
+ \edef\tikz@angle@grow@left{\the\c@pgf@counta}%
+ \advance\c@pgf@counta by180\relax%
+ \edef\tikz@angle@grow@right{\the\c@pgf@counta}%
+}
+
+\def\tikz@border@text{.border}
+\let\tikzparentanchor=\pgfutil@empty
+\let\tikzchildanchor=\pgfutil@empty
+\def\tikz@edge@to@parent@path{(\tikzparentnode\tikzparentanchor) -- (\tikzchildnode\tikzchildanchor)}
+
+\tikzleveldistance=15mm
+\tikzsiblingdistance=15mm
+
+\def\tikz@grow@direction@down{-90}
+\def\tikz@grow@direction@up{90}
+\def\tikz@grow@direction@left{180}
+\def\tikz@grow@direction@right{0}
+
+\def\tikz@grow@direction@south{-90}
+\def\tikz@grow@direction@north{90}
+\def\tikz@grow@direction@west{180}
+\def\tikz@grow@direction@east{0}
+
+\expandafter\def\csname tikz@grow@direction@north east\endcsname{45}
+\expandafter\def\csname tikz@grow@direction@north west\endcsname{135}
+\expandafter\def\csname tikz@grow@direction@south east\endcsname{-45}
+\expandafter\def\csname tikz@grow@direction@south west\endcsname{-135}
+
+\def\tikz@grow@direction{%
+ \pgftransformshift{\pgfpointpolar{\tikz@angle@grow}{\tikzleveldistance}}%
+ \ifnum\tikztreelevel=\tikz@special@level%
+ \else%
+ \pgf@xc=.5\tikzsiblingdistance%
+ \c@pgf@counta=\tikznumberofchildren%
+ \advance\c@pgf@counta by1\relax%
+ \pgfutil@tempdima=\c@pgf@counta\pgf@xc%
+ \pgftransformshift{\pgfpointpolar{\tikz@angle@grow@left}{\pgfutil@tempdima}}%
+ \pgftransformshift{\pgfpointpolar{\tikz@angle@grow@right}{\tikznumberofcurrentchild\tikzsiblingdistance}}%
+ \fi%
+}
+
+\tikzset{grow=down}
+
+
+% Snakes are in a lib:
+\tikzset{snake/.code=\PackageError{tikz}{You need to say \string\usetikzlibrary{snakes}}{}}
+
+% Decorations
+\tikzset{decorate/.code=\PackageError{tikz}{You need to load a decoration library}{}}
+
+% Matrix options
+\usepgfmodule{matrix}
+
+\tikzoption{matrix}[true]{\csname tikz@is@matrix#1\endcsname}
+
+\tikzoption{matrix anchor}{\def\tikz@matrix@anchor{#1}}
+
+\tikzoption{column sep}{\def\pgfmatrixcolumnsep{#1}}
+\tikzoption{row sep}{\def\pgfmatrixrowsep{#1}}
+
+\tikzoption{cells}{\tikzstyle{every cell}+=[#1]}
+
+\tikzoption{ampersand replacement}{\def\tikz@ampersand@replacement{#1}}
+
+\newif\iftikz@is@matrix
+\let\tikz@matrix@anchor=\pgfutil@empty
+\let\tikz@ampersand@replacement=\pgfutil@empty
+
+
+% Execute option
+\tikzoption{execute at begin picture}{\expandafter\def\expandafter\tikz@atbegin@picture\expandafter{\tikz@atbegin@picture#1}}
+\tikzoption{execute at end picture}{\expandafter\def\expandafter\tikz@atend@picture\expandafter{\tikz@atend@picture#1}}
+\tikzoption{execute at begin scope}{\expandafter\def\expandafter\tikz@atbegin@scope\expandafter{\tikz@atbegin@scope#1}}
+\tikzoption{execute at end scope}{\expandafter\def\expandafter\tikz@atend@scope\expandafter{\tikz@atend@scope#1}}
+\tikzoption{execute at begin to}{\expandafter\def\expandafter\tikz@atbegin@to\expandafter{\tikz@atbegin@to#1}}
+\tikzoption{execute at end to}{\expandafter\def\expandafter\tikz@atend@to\expandafter{\tikz@atend@to#1}}
+\tikzoption{execute at begin node}{\expandafter\def\expandafter\tikz@atbegin@node\expandafter{\tikz@atbegin@node#1}}
+\tikzoption{execute at end node}{\expandafter\def\expandafter\tikz@atend@node\expandafter{\tikz@atend@node#1}}
+\tikzoption{execute at begin cell}{\expandafter\def\expandafter\tikz@atbegin@cell\expandafter{\tikz@atbegin@cell#1}}
+\tikzoption{execute at end cell}{\expandafter\def\expandafter\tikz@atend@cell\expandafter{\tikz@atend@cell#1}}
+\tikzoption{execute at empty cell}{\expandafter\def\expandafter\tikz@at@emptycell\expandafter{\tikz@at@emptycell#1}}
+
+\let\tikz@atbegin@picture=\pgfutil@empty
+\let\tikz@atend@picture=\pgfutil@empty
+\let\tikz@atbegin@scope=\pgfutil@empty
+\let\tikz@atend@scope=\pgfutil@empty
+\let\tikz@atbegin@to=\pgfutil@empty
+\let\tikz@atend@to=\pgfutil@empty
+\let\tikz@atbegin@node=\pgfutil@empty
+\let\tikz@atend@node=\pgfutil@empty
+\let\tikz@atbegin@cell=\pgfutil@empty
+\let\tikz@atend@cell=\pgfutil@empty
+\let\tikz@at@emptycell=\pgfutil@empty
+
+
+% Pre and post actions
+\tikzset{preaction/.code=\expandafter\def\expandafter\tikz@preactions\expandafter{\tikz@preactions\tikz@extra@preaction{#1}}}
+\tikzset{postaction/.code=\expandafter\def\expandafter\tikz@postactions\expandafter{\tikz@postactions\tikz@extra@postaction{#1}}}
+\let\tikz@preactions=\pgfutil@empty
+\let\tikz@postactions=\pgfutil@empty
+
+% Styles
+\tikzoption{set style}{\tikzstyle#1}
+
+% Handled in a special way.
+\def\tikzstyle{\pgfutil@ifnextchar\bgroup\tikz@style@parseA\tikz@style@parseB}
+\def\tikz@style@parseB#1={\tikz@style@parseA{#1}=}
+\def\tikz@style@parseA#1#2=#3[#4]{% check for an optional argument
+ \pgfutil@in@[{#2}%]
+ \ifpgfutil@in@%
+ \tikz@style@parseC{#1}#2={#4}%
+ \else%
+ \tikz@style@parseD{#1}#2={#4}%
+ \fi%
+}%
+
+\def\tikz@style@parseC#1[#2]#3=#4{%
+ \pgfkeys{/tikz/#1/.default={#2}}%
+ \pgfutil@in@+{#3}%
+ \ifpgfutil@in@%
+ \pgfkeys{/tikz/#1/.append style={#4}}%
+ \else%
+ \pgfkeys{/tikz/#1/.style={#4}}%
+ \fi}
+\def\tikz@style@parseD#1#2=#3{%
+ \pgfutil@in@+{#2}%
+ \ifpgfutil@in@%
+ \pgfkeys{/tikz/#1/.append style={#3}}%
+ \else%
+ \pgfkeys{/tikz/#1/.style={#3}}%
+ \fi}
+
+
+%
+%
+% Predefined styles
+%
+%
+
+\tikzstyle{help lines}= [color=gray,line width=0.2pt]
+
+\tikzstyle{every picture}= []
+\tikzstyle{every path}= []
+\tikzstyle{every scope}= []
+\tikzstyle{every plot}= []
+\tikzstyle{every node}= []
+\tikzstyle{every child}= []
+\tikzstyle{every child node}= []
+\tikzstyle{every to}= []
+\tikzstyle{every cell}= []
+\tikzstyle{every matrix}= []
+\tikzstyle{every edge}= [draw]
+\tikzstyle{every label}= [draw=none,fill=none]
+\tikzstyle{every pin}= [draw=none,fill=none]
+\tikzstyle{every pin edge}= [help lines]
+
+\tikzstyle{ultra thin}= [line width=0.1pt]
+\tikzstyle{very thin}= [line width=0.2pt]
+\tikzstyle{thin}= [line width=0.4pt]
+\tikzstyle{semithick}= [line width=0.6pt]
+\tikzstyle{thick}= [line width=0.8pt]
+\tikzstyle{very thick}= [line width=1.2pt]
+\tikzstyle{ultra thick}= [line width=1.6pt]
+
+\tikzstyle{solid}= [dash pattern=]
+\tikzstyle{dotted}= [dash pattern=on \pgflinewidth off 2pt]
+\tikzstyle{densely dotted}= [dash pattern=on \pgflinewidth off 1pt]
+\tikzstyle{loosely dotted}= [dash pattern=on \pgflinewidth off 4pt]
+\tikzstyle{dashed}= [dash pattern=on 3pt off 3pt]
+\tikzstyle{densely dashed}= [dash pattern=on 3pt off 2pt]
+\tikzstyle{loosely dashed}= [dash pattern=on 3pt off 6pt]
+
+\tikzstyle{transparent}= [opacity=0]
+\tikzstyle{ultra nearly transparent}=[opacity=0.05]
+\tikzstyle{very nearly transparent}= [opacity=0.1]
+\tikzstyle{nearly transparent}= [opacity=0.25]
+\tikzstyle{semitransparent}= [opacity=0.5]
+\tikzstyle{nearly opaque}= [opacity=0.75]
+\tikzstyle{very nearly opaque}= [opacity=0.9]
+\tikzstyle{ultra nearly opaque}= [opacity=0.95]
+\tikzstyle{opaque}= [opacity=1]
+
+\tikzstyle{at start}= [pos=0]
+\tikzstyle{very near start}= [pos=0.125]
+\tikzstyle{near start}= [pos=0.25]
+\tikzstyle{midway}= [pos=0.5]
+\tikzstyle{near end}= [pos=0.75]
+\tikzstyle{very near end}= [pos=0.875]
+\tikzstyle{at end}= [pos=1]
+
+\tikzstyle{bend at start}= [bend pos=0,bend={+(0,0)}]
+\tikzstyle{bend at end}= [bend pos=1,bend={+(0,0)}]
+
+\tikzstyle{edge from parent}= [draw]
+
+
+
+%
+% Setting keys
+%
+
+\pgfkeys{/tikz/style/.style=#1}
+
+\pgfkeys{/tikz/.unknown/.code=%
+ % Is it a pgf key?
+ \let\tikz@key\pgfkeyscurrentname%
+ \pgfkeys{/pgf/\tikz@key/.try={#1}}%
+ \ifpgfkeyssuccess%
+ \else%
+ \expandafter\pgfutil@in@\expandafter!\expandafter{\tikz@key}%
+ \ifpgfutil@in@%
+ % this is a color!
+ \expandafter\tikz@addoption\expandafter{\expandafter\pgfutil@color\expandafter{\tikz@key}}%
+ \edef\tikz@textcolor{\tikz@key}%
+ \else%
+ \pgfutil@doifcolorelse{\tikz@key}
+ { %
+ \expandafter\tikz@addoption\expandafter{\expandafter\pgfutil@color\expandafter{\tikz@key}}%
+ \edef\tikz@textcolor{\tikz@key}%
+ }%
+ {%
+ % Ok, second chance: This might be an arrow specification:
+ \expandafter\pgfutil@in@\expandafter-\expandafter{\tikz@key}
+ \ifpgfutil@in@%
+ % Ah, an arrow spec!
+ \expandafter\tikz@processarrows\expandafter{\tikz@key}%
+ \else%
+ % Ok, third chance: A shape!
+ \expandafter\ifx\csname pgf@sh@s@\tikz@key\endcsname\relax%
+ \pgfkeys{/errors/unknown key={/tikz/\tikz@key}{#1}}%
+ \else%
+ \edef\tikz@shape{\tikz@key}%
+ \fi%
+ \fi%
+ }%
+ \fi%
+ \fi%
+}
+
+
+%
+% Main TikZ Environment
+%
+
+\def\tikzpicture{\pgfutil@ifnextchar[\tikz@picture{\tikz@picture[]}}%}
+\def\tikz@picture[#1]{%
+ \pgfpicture%
+ \let\tikz@atbegin@picture=\pgfutil@empty%
+ \let\tikz@atend@picture=\pgfutil@empty%
+ \let\tikz@transform=\relax%
+ \tikz@installcommands\scope[every picture,#1]%
+ \expandafter\tikz@atbegin@picture%
+ \tikz@lib@scope@check%
+}
+\def\endtikzpicture{%
+ \tikz@atend@picture%
+ \global\let\pgf@shift@baseline=\pgf@baseline%
+ \global\let\pgf@remember@smuggle=\ifpgfrememberpicturepositiononpage%
+ \endscope%
+ \let\pgf@baseline=\pgf@shift@baseline%
+ \let\ifpgfrememberpicturepositiononpage=\pgf@remember@smuggle%
+ \endpgfpicture}
+
+
+% Inlined picture
+%
+% #1 - some code to be put in a tikzpicture environment.
+%
+% If the command is not followed by braces, everything up to the next
+% semicolon is used as argument.
+%
+% Example:
+%
+% The rectangle \tikz{\draw (0,0) rectangle (1em,1ex)} has width 1em and
+% height 1ex.
+
+\def\tikz{\pgfutil@ifnextchar[{\tikz@opt}{\tikz@opt[]}}
+\def\tikz@opt[#1]{\tikzpicture[#1]\pgfutil@ifnextchar\bgroup{\tikz@}{\tikz@@}}
+\def\tikz@#1{#1\endtikzpicture}
+\def\tikz@@{%
+ \let\tikz@next=\tikz@collectnormalsemicolon%
+ \ifnum\the\catcode`\;=\active\relax%
+ \let\tikz@next=\tikz@collectactivesemicolon%
+ \fi%
+ \tikz@next}
+\def\tikz@collectnormalsemicolon#1;{#1;\endtikzpicture}
+{
+ \catcode`\;=\active
+ \gdef\tikz@collectactivesemicolon#1;{#1;\endtikzpicture}
+}
+
+
+
+%
+% Environment for scoping graphic state settings
+%
+\def\tikz@scope@env{\pgfutil@ifnextchar[\tikz@@scope@env{\tikz@@scope@env[]}}
+\def\tikz@@scope@env[#1]{%
+ \pgfscope%
+ \begingroup%
+ \let\tikz@atbegin@scope=\pgfutil@empty%
+ \let\tikz@atend@scope=\pgfutil@empty%
+ \let\tikz@options=\pgfutil@empty%
+ \let\tikz@mode=\pgfutil@empty%
+ \tikz@transparency@groupfalse%
+ \tikzset{every scope/.try,#1}%
+ \tikz@options%
+ \iftikz@transparency@group\pgftransparencygroup\fi%
+ \expandafter\tikz@atbegin@scope%
+ \tikz@lib@scope@check%
+}
+\def\endtikz@scope@env{%
+ \tikz@atend@scope%
+ \iftikz@transparency@group\endpgftransparencygroup\fi%
+ \endgroup%
+ \endpgfscope%
+ \tikz@lib@scope@check%
+}
+
+%
+% Install the abbreviated commands
+%
+\def\tikz@installcommands{%
+ \ifnum\the\catcode`\;=\active\relax\expandafter\let\expandafter\tikz@origsemi\expandafter=\tikz@activesemicolon\fi%
+ \ifnum\the\catcode`\:=\active\relax\expandafter\let\expandafter\tikz@origcolon\expandafter=\tikz@activecolon\fi%
+ \ifnum\the\catcode`\|=\active\relax\expandafter\let\expandafter\tikz@origbar\expandafter=\tikz@activebar\fi%
+ \let\tikz@origscope=\scope%
+ \let\tikz@origendscope=\endscope%
+ \let\tikz@origstartscope=\startscope%
+ \let\tikz@origstopscope=\stopscope%
+ \let\tikz@origpath=\path%
+ \let\tikz@origagainpath=\againpath%
+ \let\tikz@origdraw=\draw%
+ \let\tikz@origpattern=\pattern%
+ \let\tikz@origfill=\fill%
+ \let\tikz@origfilldraw=\filldraw%
+ \let\tikz@origshade=\shade%
+ \let\tikz@origshadedraw=\shadedraw%
+ \let\tikz@origclip=\clip%
+ \let\tikz@origuseasboundingbox=\useasboundingbox%
+ \let\tikz@orignode=\node%
+ \let\tikz@origcoordinate=\coordinate%
+ \let\tikz@origmatrix=\matrix%
+ \let\tikz@origcalendar=\calendar%
+ %
+ \tikz@deactivatthings%
+ %
+ \let\scope=\tikz@scope@env%
+ \let\endscope=\endtikz@scope@env%
+ \let\startscope=\scope%
+ \let\stopscope=\endscope%
+ \let\path=\tikz@command@path%
+ \let\againpath=\tikz@command@againpath%
+ %
+ \def\draw{\path[draw]}
+ \def\pattern{\path[pattern]}
+ \def\fill{\path[fill]}
+ \def\filldraw{\path[fill,draw]}
+ \def\shade{\path[shade]}
+ \def\shadedraw{\path[shade,draw]}
+ \def\clip{\path[clip]}
+ \def\useasboundingbox{\path[use as bounding box]}
+ \def\node{\tikz@path@overlay{node}}
+ \def\coordinate{\tikz@path@overlay{coordinate}}
+ \def\matrix{\tikz@path@overlay{node[matrix]}}
+ \def\calendar{\tikz@lib@cal@calendar}%
+}
+\ifx\tikz@lib@cal@calendar\@undefined
+\def\tikz@lib@cal@calendar{\PackageError{tikz}{You need to load the calendar library}{}}
+\fi
+
+\def\tikz@path@overlay#1{%
+ \let\tikz@signal@path=\tikz@signal@path% for detection at begin of matrix cell
+ \pgfutil@ifnextchar<{\tikz@path@overlayed{#1}}{\path #1}}
+\def\tikz@path@overlayed#1<#2>{\path<#2> #1}
+
+\def\tikz@uninstallcommands{%
+ \ifnum\the\catcode`\;=\active\relax\expandafter\let\tikz@activesemicolon=\tikz@origsemi\fi%
+ \ifnum\the\catcode`\:=\active\relax\expandafter\let\tikz@activecolon=\tikz@origcolon\fi%
+ \ifnum\the\catcode`\|=\active\relax\expandafter\let\tikz@activebar=\tikz@origbar\fi%
+ \let\scope=\tikz@origscope%
+ \let\endscope=\tikz@origendscope%
+ \let\startscope=\tikz@origstartscope%
+ \let\stopscope=\tikz@origstopscope%
+ \let\path=\tikz@origpath%
+ \let\againpath=\tikz@origagainpath%
+ \let\draw=\tikz@origdraw%
+ \let\pattern=\tikz@origpattern%
+ \let\fill=\tikz@origfill%
+ \let\filldraw=\tikz@origfilldraw%
+ \let\shade=\tikz@origshade%
+ \let\shadedraw=\tikz@origshadedraw%
+ \let\clip=\tikz@origclip%
+ \let\useasboundingbox=\tikz@origuseasboundingbox%
+ \let\node=\tikz@orignode%
+ \let\coordinate=\tikz@origcoordinate%
+ \let\matrix=\tikz@origmatrix%
+ \let\calendar=\tikz@origcalendar%
+}
+
+
+{
+ \catcode`\;=12
+ \gdef\tikz@nonactivesemicolon{;}
+ \catcode`\:=12
+ \gdef\tikz@nonactivecolon{:}
+ \catcode`\|=12
+ \gdef\tikz@nonactivebar{|}
+ \catcode`\;=\active
+ \catcode`\:=\active
+ \catcode`\|=\active
+ \catcode`\"=\active
+ \gdef\tikz@activesemicolon{;}%
+ \gdef\tikz@activecolon{:}%
+ \gdef\tikz@activebar{|}%
+ \gdef\tikz@activequotes{"}%
+ \gdef\tikz@deactivatthings{%
+ \def;{\tikz@nonactivesemicolon}
+ \def:{\tikz@nonactivecolon}
+ \def|{\tikz@nonactivebar}
+ }
+}
+
+
+
+
+
+% Constructs a path and draws/fills them according to the current
+% settings.
+
+\def\tikz@command@path{%
+ \let\tikz@signal@path=\tikz@signal@path% for detection at begin of matrix cell
+ \pgfutil@ifnextchar[{\tikz@check@earg}%]
+ {\pgfutil@ifnextchar<{\tikz@doopt}{\tikz@@command@path}}}
+\def\tikz@signal@path{\tikz@signal@path}%
+\def\tikz@check@earg[#1]{%
+ \pgfutil@ifnextchar<{\tikz@swap@args[#1]}{\tikz@@command@path[#1]}}
+\def\tikz@swap@args[#1]<#2>{\tikz@command@path<#2>[#1]}
+
+\def\tikz@doopt{%
+ \let\tikz@next=\tikz@eargnormalsemicolon%
+ \ifnum\the\catcode`\;=\active\relax%
+ \let\tikz@next=\tikz@eargactivesemicolon%
+ \fi%
+ \tikz@next}
+\long\def\tikz@eargnormalsemicolon<#1>#2;{\only<#1>{\tikz@@command@path#2;}}
+{
+ \catcode`\;=\active
+ \long\global\def\tikz@eargactivesemicolon<#1>#2;{\only<#1>{\tikz@@command@path#2;}}
+}
+
+\def\tikz@@command@path{%
+ \edef\tikzscope@linewidth{\the\pgflinewidth}%
+ \begingroup%
+ \let\tikz@options=\pgfutil@empty%
+ \let\tikz@mode=\pgfutil@empty%
+ \let\tikz@moveto@waiting=\relax%
+ \let\tikz@timer=\relax%
+ \let\tikz@collected@onpath=\pgfutil@empty%
+ \let\tikz@preactions=\pgfutil@empty%
+ \let\tikz@postactions=\pgfutil@empty%
+ \tikz@snakedfalse%
+ \tikz@decoratepathfalse%
+ \tikz@node@is@a@labelfalse%
+ \tikz@expandcount=1000\relax%
+ \tikz@lastx=0pt%
+ \tikz@lasty=0pt%
+ \tikz@lastxsaved=0pt%
+ \tikz@lastysaved=0pt%
+ \tikzset{every path/.try}%
+ \tikz@scan@next@command%
+}
+\def\tikz@scan@next@command{%
+ \ifx\tikz@collected@onpath\pgfutil@empty%
+ \else%
+ \tikz@invoke@collected@onpath%
+ \fi%
+ \afterassignment\tikz@handle\let\@let@token=%
+}
+\newcount\tikz@expandcount
+
+% Central dispatcher for commands
+\def\tikz@handle{%
+ \let\@next=\tikz@expand%
+ \ifx\@let@token(%)
+ \let\@next=\tikz@movetoabs%
+ \else%
+ \ifx\@let@token+%
+ \let\@next=\tikz@movetorel%
+ \else%
+ \ifx\@let@token-%
+ \let\@next=\tikz@lineto%
+ \else%
+ \ifx\@let@token.%
+ \let\@next=\tikz@dot%
+ \else%
+ \ifx\@let@token r%
+ \let\@next=\tikz@rect%
+ \else%
+ \ifx\@let@token n%
+ \let\@next=\tikz@fig%
+ \else%
+ \ifx\@let@token[%]
+ \let\@next=\tikz@parse@options%
+ \else%
+ \ifx\@let@token c%
+ \let\@next=\tikz@cchar%
+ \else%
+ \ifx\@let@token\bgroup%
+ \let\@next=\tikz@beginscope%
+ \else%
+ \ifx\@let@token\egroup%
+ \let\@next=\tikz@endscope%
+ \else%
+ \ifx\@let@token;%
+ \let\@next=\tikz@finish%
+ \else%
+ \let\@next=\tikz@handle@more%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \@next%
+}
+
+% Continued...
+\def\tikz@handle@more{%
+ \ifx\@let@token a%
+ \let\@next=\tikz@arcA%
+ \else%
+ \ifx\@let@token e%
+ \let\@next=\tikz@e@char%
+ \else%
+ \ifx\@let@token g%
+ \let\@next=\tikz@grid%
+ \else%
+ \ifx\@let@token s%
+ \let\@next=\tikz@sine%
+ \else%
+ \ifx\@let@token |%
+ \let\@next=\tikz@vh@lineto%
+ \else%
+ \ifx\@let@token p%
+ \let\@next=\tikz@pchar%
+ \pgfsetmovetofirstplotpoint%
+ \else%
+ \ifx\@let@token t%
+ \let\@next=\tikz@to%
+ \else%
+ \ifx\@let@token\pgfextra%
+ \let\@next=\tikz@extra%
+ \else%
+ \ifx\@let@token\foreach%
+ \let\@next=\tikz@foreach%
+ \else%
+ \ifx\@let@token\pgf@stop%
+ \let\@next=\relax%
+ \else%
+ \ifx\@let@token\par%
+ \let\@next=\tikz@scan@next@command%
+ \else%
+ \ifx\@let@token d%
+ \let\@next=\tikz@decoration%
+ \else%
+ \ifx\@let@token l%
+ \let\@next=\tikz@let@command%
+ \else%
+ \let\@next=\tikz@expand%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \@next%
+}
+
+\def\tikz@pchar{\pgfutil@ifnextchar l{\tikz@plot}{\tikz@parabola}}
+\def\tikz@cchar{%
+ \pgfutil@ifnextchar i{\tikz@circle}%
+ {\pgfutil@ifnextchar h{\tikz@children}{\tikz@cochar}}}%
+\def\tikz@cochar o{%
+ \pgfutil@ifnextchar o{\tikz@coordinate}{\tikz@cosine}}
+\def\tikz@e@char{%
+ \pgfutil@ifnextchar l{\tikz@ellipse}{\tikz@@e@char}}%
+\def\tikz@@e@char dge{%
+ \pgfutil@ifnextchar f{\tikz@edgetoparent}{\tikz@edge@plain}}%
+
+
+\def\tikz@finish{%
+ % Rendering pipeline
+ %
+ % Step 1: Decorate path
+ %
+ \iftikz@decoratepath%
+ \tikz@lib@dec@decorate@path%
+ \fi%
+ %
+ % Step 1: Preactions
+ %
+ \pgfsyssoftpath@getcurrentpath\tikz@actions@path%
+ \edef\tikz@restorepathsize{%
+ \global\pgf@pathmaxx=\the\pgf@pathmaxx%
+ \global\pgf@pathmaxy=\the\pgf@pathmaxy%
+ \global\pgf@pathminx=\the\pgf@pathminx%
+ \global\pgf@pathminy=\the\pgf@pathminy%
+ }%
+ \tikz@preactions%
+ %
+ % Reset modes
+ %
+ \tikz@mode@fillfalse%
+ \tikz@mode@drawfalse%
+ \tikz@mode@doublefalse%
+ \tikz@mode@clipfalse%
+ \tikz@mode@boundaryfalse%
+ \tikz@mode@fade@pathfalse%
+ \tikz@mode@fade@scopefalse%
+ \edef\tikz@pathextend{%
+ {\noexpand\pgfqpoint{\the\pgf@pathminx}{\the\pgf@pathminy}}%
+ {\noexpand\pgfqpoint{\the\pgf@pathmaxx}{\the\pgf@pathmaxy}}%
+ }%
+ \tikz@mode% installs the mode settings
+ % Path fading counts as an option:
+ \iftikz@mode@fade@path%
+ \tikz@addoption{%
+ \iftikz@fade@adjust%
+ \pgfsetfadingforcurrentpath{\tikz@path@fading}{\tikz@do@fade@transform}%
+ \else%
+ \pgfsetfading{\tikz@path@fading}{\tikz@do@fade@transform}%
+ \fi%
+ \tikz@mode@fade@pathfalse% no more fading...
+ }%
+ \fi%
+ % Rendering pipeline
+ %
+ % Step 2: Install scope fading
+ %
+ \iftikz@mode@fade@scope%
+ \iftikz@fade@adjust%
+ \pgfsetfadingforcurrentpath{\tikz@scope@fading}{\tikz@do@fade@transform}%
+ \else%
+ \pgfsetfading{\tikz@scope@fading}{\tikz@do@fade@transform}%
+ \fi%
+ \tikz@mode@fade@scopefalse%
+ \fi%
+ %
+ % Step 3: Setup options
+ %
+ \ifx\tikz@options\pgfutil@empty%
+ \else%
+ \pgfsys@beginscope%
+ \begingroup%
+ \tikz@options%
+ \fi%
+ %
+ % Step 4: Do a fill if shade follows.
+ %
+ \iftikz@mode@fill%
+ \iftikz@mode@shade%
+ \pgfsyssoftpath@getcurrentpath\tikz@temppath
+ \pgfprocessround{\tikz@temppath}{\tikz@temppath}% change the path
+ \pgfsyssoftpath@setcurrentpath\tikz@temppath%
+ \pgfsyssoftpath@invokecurrentpath%
+ \pgfsys@fill%
+ \tikz@mode@fillfalse% no more filling...
+ \fi%
+ \fi%
+ %
+ % Step 5: Do a shade if necessary.
+ %
+ \iftikz@mode@shade%
+ \pgfsyssoftpath@getcurrentpath\tikz@temppath
+ \pgfprocessround{\tikz@temppath}{\tikz@temppath}% change the path
+ \pgfsyssoftpath@setcurrentpath\tikz@temppath%
+ \pgfshadepath{\tikz@shading}{\tikz@shade@angle}%
+ \tikz@mode@shadefalse% no more shading...
+ \fi%
+ %
+ % Step 6: Double stroke, if necessary
+ %
+ \iftikz@mode@draw%
+ \iftikz@mode@double%
+ % Change line width
+ \begingroup%
+ \pgfsys@beginscope%
+ \pgf@x=2\pgflinewidth%
+ \advance\pgf@x by\tikz@double@width@distance%
+ \pgflinewidth=\pgf@x%
+ \pgfsetlinewidth{\the\pgflinewidth}%
+ \fi%
+ \fi%
+ %
+ % Step 7: Do stroke/fill/clip as needed
+ %
+ \edef\tikz@temp{\noexpand\pgfusepath{%
+ \iftikz@mode@fill fill,\fi%
+ \iftikz@mode@draw draw,\fi%
+ \iftikz@mode@clip clip,\fi%
+ }}%
+ \tikz@temp%
+ \tikz@mode@fillfalse% no more filling
+ %
+ % Step 8: Double stroke, if necessary
+ %
+ \iftikz@mode@draw%
+ \iftikz@mode@double%
+ \pgfsyssoftpath@setcurrentpath\pgf@last@used@path% reinstall
+ \pgf@x=\tikz@double@width@distance%
+ \pgfsetlinewidth{\the\pgf@x}%
+ \pgfsetstrokecolor{\tikz@double@color}%
+ \pgfsyssoftpath@flushcurrentpath%
+ \pgfsys@stroke%
+ \pgfsys@endscope%
+ \ifpgf@drawarrows% set in pgfusepath...
+ \pgf@add@arrows@as@needed%
+ \fi%
+ \endgroup%
+ \fi%
+ \fi%
+ \tikz@mode@drawfalse% no more stroking
+ %
+ % Step 9: Postactions
+ %
+ \tikz@postactions%
+ %
+ % Step 10: Add labels and nodes
+ %
+ \box\tikz@figbox%
+ %
+ % Step 11: Close option brace
+ %
+ \ifx\tikz@options\pgfutil@empty%
+ \else%
+ \endgroup%
+ \pgfsys@endscope%
+ \iftikz@mode@clip%
+ \PackageError{tikz}{Extra options not allowed for clipping path command.}{}%
+ \fi%
+ \fi%
+ \iftikz@mode@clip%
+ \aftergroup\pgf@relevantforpicturesizefalse%
+ \fi%
+ \iftikz@mode@boundary%
+ \aftergroup\pgf@relevantforpicturesizefalse%
+ \fi%
+ \endgroup%
+ \global\pgflinewidth=\tikzscope@linewidth%
+ \tikz@lib@scope@check%
+}
+\let\tikz@lib@scope@check\pgfutil@empty% this is a hook for the scopes library
+
+% Extra actions
+
+\def\tikz@extra@preaction#1{%
+ {%
+ \pgfsys@beginscope%
+ \setbox\tikz@figbox=\box\voidb@x%
+ \path[#1];% do extra path
+ \pgfsyssoftpath@setcurrentpath\tikz@actions@path% restore
+ \tikz@restorepathsize%
+ \pgfsys@endscope%
+ }%
+}
+
+\def\tikz@extra@postaction#1{%
+ {%
+ \pgfsys@beginscope%
+ \setbox\tikz@figbox=\box\voidb@x%
+ \tikz@restorepathsize%
+ \path[#1]\pgfextra{\pgfsyssoftpath@setcurrentpath\tikz@actions@path};% do extra path
+ \pgf@resetpathsizes%
+ \pgfsys@endscope%
+ }%
+}
+
+
+
+\def\tikz@skip#1{\tikz@scan@next@command#1}
+\def\tikz@expand{%
+ \advance\tikz@expandcount by -1%
+ \ifnum\tikz@expandcount<0\relax%
+ \PackageError{tikz}{Giving up on this path. Did you forget a semicolon?}{}%
+ \let\@next=\tikz@finish%
+ \else%
+ \let\@next=\tikz@@expand
+ \fi%
+ \@next}
+
+\def\tikz@@expand{%
+ \expandafter\tikz@scan@next@command\@let@token}
+
+
+
+% Syntax for scopes:
+% {scoped path commands}
+
+\def\tikz@beginscope{\begingroup\tikz@scan@next@command}
+\def\tikz@endscope{%
+ \global\setbox\tikz@tempbox=\box\tikz@figbox%
+ \xdef\tikz@scope@save@lastx{\the\tikz@lastx}%
+ \xdef\tikz@scope@save@lasty{\the\tikz@lasty}%
+ \iftikz@current@point@local%
+ \endgroup%
+ \else%
+ \xdef\tikz@scope@save@lastxsaved{\the\tikz@lastxsaved}%
+ \xdef\tikz@scope@save@lastysaved{\the\tikz@lastysaved}%
+ \endgroup%
+ \tikz@lastxsaved=\tikz@scope@save@lastxsaved%
+ \tikz@lastysaved=\tikz@scope@save@lastysaved%
+ \fi%
+ \tikz@lastx=\tikz@scope@save@lastx%
+ \tikz@lasty=\tikz@scope@save@lasty%
+ \setbox\tikz@figbox=\box\tikz@tempbox%
+ \tikz@scan@next@command}
+
+
+% Syntax for pgfextra:
+% \pgfextra {normal tex text}
+% \pgfextra normal tex text \endpgfextra
+
+\def\tikz@extra{\pgfutil@ifnextchar\bgroup\tikz@@extra\relax}
+\long\def\tikz@@extra#1{#1\tikz@scan@next@command}
+\let\endpgfextra=\tikz@scan@next@command
+
+\def\pgfextra{pgfextra}
+
+
+% Syntax for \foreach:
+% \foreach \var in {list} {path text}
+%
+% Example:
+%
+% \draw (0,0) \foreach \x in {1,2,3} {-- (\x,0) circle (1cm)} -- (5,5);
+
+\def\tikz@foreach{%
+ \def\pgffor@beginhook{\setbox\tikz@figbox=\box\tikz@tempbox\expandafter\tikz@scan@next@command\pgfutil@firstofone}%
+ \def\pgffor@endhook{\pgfextra{%
+ \xdef\tikz@foreach@save@lastx{\the\tikz@lastx}%
+ \xdef\tikz@foreach@save@lasty{\the\tikz@lasty}%
+ \xdef\tikz@foreach@save@lastxsaved{\the\tikz@lastxsaved}%
+ \xdef\tikz@foreach@save@lastysaved{\the\tikz@lastysaved}%
+ \global\setbox\tikz@tempbox=\copy\tikz@figbox\pgfutil@gobble}}%
+ \def\pgffor@afterhook{%
+ \tikz@lastx=\tikz@foreach@save@lastx%
+ \tikz@lasty=\tikz@foreach@save@lasty%
+ \tikz@lastxsaved=\tikz@foreach@save@lastxsaved%
+ \tikz@lastysaved=\tikz@foreach@save@lastysaved%
+ \setbox\tikz@figbox=\box\tikz@tempbox\tikz@scan@next@command}%
+ \global\setbox\tikz@tempbox=\copy\tikz@figbox%
+ \foreach}
+
+
+% Syntax for againpath:
+% \againpath \somepathname
+
+\def\tikz@command@againpath#1{%
+ \pgfextra{%
+ \pgfsyssoftpath@getcurrentpath\tikz@temp%
+ \expandafter\pgfutil@g@addto@macro\expandafter\tikz@temp\expandafter{#1}%
+ \pgfsyssoftpath@setcurrentpath\tikz@temp%
+ }
+}
+
+
+
+
+%
+% When this if is set, a just-scanned point is a shape and its border
+% position still needs to be determined, depending on subsequent
+% commands.
+%
+
+\newif\iftikz@shapeborder
+
+
+% Syntax for moveto:
+% <point>
+\def\tikz@movetoabs{\tikz@moveto(}
+\def\tikz@movetorel{\tikz@moveto+}
+\def\tikz@moveto{%
+ \tikz@scan@one@point{\tikz@@moveto}}
+\def\tikz@@moveto#1{%
+ \tikz@make@last@position{#1}%
+ \iftikz@shapeborder%
+ % ok, the moveto will have to wait. flag that we have a moveto in
+ % wainting:
+ \edef\tikz@moveto@waiting{\tikz@shapeborder@name}%
+ \else%
+ \pgfpathmoveto{\tikz@last@position}%
+ \let\tikz@moveto@waiting=\relax%
+ \fi%
+ \tikz@scan@next@command%
+}
+
+\let\tikz@moveto@waiting=\relax % normally, nothing is waiting...
+
+\def\tikz@flush@moveto{%
+ \ifx\tikz@moveto@waiting\relax%
+ \else%
+ \pgfpathmoveto{\tikz@last@position}%
+ \fi%
+ \let\tikz@moveto@waiting=\relax%
+}
+
+
+\def\tikz@flush@moveto@toward#1#2#3{%
+ % #1 = a point towards which the last moveto should be corrected
+ % #2 = a dimension to which the corrected x-coordinate should be stored
+ % #3 = a dimension for the corrected y-coordinate
+ \ifx\tikz@moveto@waiting\relax%
+ % do nothing
+ \else%
+ \pgf@process{\pgfpointshapeborder{\tikz@moveto@waiting}{#1}}%
+ #2=\pgf@x%
+ #3=\pgf@y%
+ \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
+ \pgfpathmoveto{\pgfqpoint{\pgf@x}{\pgf@y}}%
+ \fi%
+ \let\tikz@moveto@waiting=\relax%
+}
+
+
+%
+% Collecting labels on the path
+%
+
+\def\tikz@collect@coordinate@onpath#1coordinate{%
+ \pgfutil@ifnextchar[{\tikz@@collect@coordinate@opt#1}{\tikz@@collect@coordinate@opt#1[]}}%}
+\def\tikz@@collect@coordinate@opt#1[#2]{%
+ \pgfutil@ifnextchar({\tikz@@collect@coordinate#1[#2]}{%
+ \tikz@collect@label@onpath#1node[shape=coordinate,#2]{}}}%}
+\def\tikz@@collect@coordinate#1[#2](#3){%
+ \tikz@collect@label@onpath#1node[shape=coordinate,#2](#3){}}
+
+\def\tikz@collect@label@onpath#1node{%
+ \expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath node}%
+ \tikz@collect@label@scan#1}
+
+\def\tikz@collect@label@scan#1{%
+ \pgfutil@ifnextchar({\tikz@collect@paran#1}%
+ {\pgfutil@ifnextchar[{\tikz@collect@options#1}%
+ {\pgfutil@ifnextchar\bgroup{\tikz@collect@arg#1}%
+ {#1}}}%
+}%}}
+
+\def\tikz@collect@paran#1(#2){%
+ \expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath(#2)}%
+ \tikz@collect@label@scan#1%
+}
+\def\tikz@collect@options#1[#2]{%
+ \expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath[#2]}%
+ \tikz@collect@label@scan#1%
+}
+\def\tikz@collect@arg#1#2{%
+ \expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath{#2}}%
+ #1%
+}
+
+
+\def\tikz@invoke@collected@onpath{%
+ \tikz@node@is@a@labeltrue%
+ \let\tikz@temp=\tikz@collected@onpath%
+ \let\tikz@collected@onpath=\pgfutil@empty%
+ \expandafter\tikz@scan@next@command\tikz@temp\pgf@stop%
+ \tikz@node@is@a@labelfalse%
+}
+
+
+
+
+% Syntax for lineto:
+% -- <point>
+
+\def\tikz@lineto{%
+ \pgfutil@ifnextchar |%
+ {\expandafter\tikz@hv@lineto\pgfutil@gobble}%
+ {\expandafter\pgfutil@ifnextchar\tikz@activebar{\expandafter\tikz@hv@lineto\pgfutil@gobble}%
+ {\expandafter\tikz@lineto@mid\pgfutil@gobble}}}
+\def\tikz@lineto@mid{%
+ \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@lineto@mid}%
+ {%
+ \pgfutil@ifnextchar c{\tikz@close}{%
+ \pgfutil@ifnextchar p{\pgfsetlinetofirstplotpoint\expandafter\tikz@plot\pgfutil@gobble}%
+ {\tikz@scan@one@point{\tikz@@lineto}}}}}
+\def\tikz@@lineto#1{%
+ % Record the starting point for later labels on the path:
+ \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}
+ \iftikz@shapeborder%
+ % ok, target is a shape. recalculate end
+ \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\tikz@last@position}}%
+ \tikz@make@last@position{\pgfqpoint{\pgf@x}{\pgf@y}}%
+ \tikz@flush@moveto@toward{\tikz@last@position}\pgf@x\pgf@y%
+ \tikz@path@lineto{\tikz@last@position}%
+ \edef\tikz@timer@end{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+ \tikz@make@last@position{#1}%
+ \edef\tikz@moveto@waiting{\tikz@shapeborder@name}%
+ \else%
+ % target is a reasonable point...
+ % Record the starting point for later labels on the path:
+ \tikz@make@last@position{#1}%
+ \tikz@flush@moveto@toward{\tikz@last@position}\pgf@x\pgf@y%
+ \tikz@path@lineto{\tikz@last@position}%
+ \edef\tikz@timer@end{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+ \fi%
+ \let\tikz@timer=\tikz@timer@line%
+ \tikz@scan@next@command%
+}
+
+% snake or lineto?
+\def\tikz@path@lineto#1{%
+ \iftikz@snaked%
+ {
+ \pgfsyssoftpathmovetorelevantfalse%
+ \pgfpathsnakesto{\tikz@presnake,{\tikz@snake}{\tikz@mainsnakelength}{\noexpand\tikz@snake@install@trans}{},\tikz@postsnake}{#1}%
+ }
+ \else%
+ \pgfpathlineto{#1}%
+ \fi%
+}
+
+% snake or lineto?
+\def\tikz@path@close#1{%
+ \iftikz@snaked%
+ {%
+ \pgftransformreset%
+ \pgfpathsnakesto{\tikz@presnake,{\tikz@snake}{\tikz@mainsnakelength}{\noexpand\tikz@snake@install@trans}{},\tikz@postsnake}{#1}%
+ }%
+ \fi%
+ \pgfpathclose%
+}
+
+
+% Syntax for lineto horizontal/vertical:
+% -| <point>
+
+\def\tikz@hv@lineto{%
+ \pgfutil@ifnextchar n
+ {\tikz@collect@label@onpath\tikz@hv@lineto}
+ {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikz@hv@lineto}%
+ {\tikz@scan@one@point{\tikz@@hv@lineto}}}}
+\def\tikz@@hv@lineto#1{%
+ \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+ \pgf@yc=\tikz@lasty%
+ \tikz@make@last@position{#1}%
+ \tikz@flush@moveto@toward{\pgfqpoint{\tikz@lastx}{\pgf@yc}}\pgf@x\pgf@yc%
+ \iftikz@shapeborder%
+ % ok, target is a shape. have to work now:
+ {%
+ \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\tikz@lastx}{\pgf@yc}}}%
+ \tikz@make@last@position{\pgfqpoint{\pgf@x}{\pgf@y}}%
+ \tikz@path@lineto{\pgfqpoint{\tikz@lastx}{\pgf@yc}}%
+ \tikz@path@lineto{\tikz@last@position}%
+ \xdef\tikz@timer@end@temp{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% move out of group
+ }%
+ \let\tikz@timer@end=\tikz@timer@end@temp%
+ \edef\tikz@moveto@waiting{\tikz@shapeborder@name}%
+ \else%
+ \tikz@path@lineto{\pgfqpoint{\tikz@lastx}{\pgf@yc}}%
+ \tikz@path@lineto{\tikz@last@position}%
+ \edef\tikz@timer@end{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% move out of group
+ \fi%
+ \let\tikz@timer=\tikz@timer@hvline%
+ \tikz@scan@next@command%
+}
+
+% Syntax for lineto vertical/horizontal:
+% |- <point>
+
+\def\tikz@vh@lineto-{\tikz@vh@lineto@next}
+\def\tikz@vh@lineto@next{%
+ \pgfutil@ifnextchar n
+ {\tikz@collect@label@onpath\tikz@vh@lineto@next}
+ {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikz@vh@lineto@next}%
+ {\tikz@scan@one@point\tikz@@vh@lineto}}}
+\def\tikz@@vh@lineto#1{%
+ \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+ \pgf@xc=\tikz@lastx%
+ \tikz@make@last@position{#1}%
+ \tikz@flush@moveto@toward{\pgfqpoint{\pgf@xc}{\tikz@lasty}}\pgf@xc\pgf@y%
+ \iftikz@shapeborder%
+ % ok, target is a shape. have to work now:
+ {%
+ \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\pgf@xc}{\tikz@lasty}}}%
+ \tikz@make@last@position{\pgfqpoint{\pgf@x}{\pgf@y}}%
+ \tikz@path@lineto{\pgfqpoint{\pgf@xc}{\tikz@lasty}}%
+ \tikz@path@lineto{\tikz@last@position}%
+ \xdef\tikz@timer@end@temp{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% move out of group
+ }%
+ \let\tikz@timer@end=\tikz@timer@end@temp%
+ \edef\tikz@moveto@waiting{\tikz@shapeborder@name}%
+ \else%
+ \tikz@path@lineto{\pgfqpoint{\pgf@xc}{\tikz@lasty}}%
+ \tikz@path@lineto{\tikz@last@position}%
+ \edef\tikz@timer@end{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+ \fi%
+ \let\tikz@timer=\tikz@timer@vhline%
+ \tikz@scan@next@command%
+}
+
+% Syntax for cycle:
+% -- cycle
+\def\tikz@close c{%
+ \pgfutil@ifnextchar o{\tikz@collect@coordinate@onpath\tikz@lineto@mid c}% oops, a coordinate
+ {\tikz@@close c}}%
+\def\tikz@@close cycle{%
+ \tikz@flush@moveto%
+ \tikz@path@close{\expandafter\pgfpoint\pgfsyssoftpath@lastmoveto}%
+ \def\pgfstrokehook{}%
+ \let\tikz@timer=\@undefined%
+ \tikz@scan@next@command%
+}
+
+
+% Syntax for options:
+% [options]
+\def\tikz@parse@options#1]{%
+ \tikzset{#1}%
+ \tikz@lib@dec@hook% for decorations...
+ \tikz@scan@next@command%
+}
+\let\tikz@lib@dec@hook=\relax
+
+% Syntax for edges:
+% edge [options] (coordinate)
+% edge [options] node {node text} (coordinate)
+\def\tikz@edge@plain{%
+ \begingroup%
+ \tikz@to@use@whom%
+ \let\tikz@to@or@edge@function=\tikz@do@edge%
+ \tikz@to@or@edge}
+
+% Syntax for to paths:
+% to [options] (coordinate)
+% to [options] node {node text} (coordinate)
+\def\tikz@to o{%
+ \tikz@to@use@last@coordinate%
+ \let\tikz@to@or@edge@function=\tikz@do@to%
+ \tikz@to@or@edge}
+
+\def\tikz@to@or@edge{\pgfutil@ifnextchar[\tikz@@to@or@edge{\tikz@@to@or@edge[]}}%}
+\def\tikz@@to@or@edge[#1]{%
+ \def\tikz@@to@local@options{[#1]}%
+ \let\tikz@collected@onpath=\pgfutil@empty%
+ \tikz@@to@collect%
+}
+\def\tikz@@to@collect{%
+ \pgfutil@ifnextchar(\tikz@@to@or@edge@coordinate
+ {\pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@@to@collect}%
+ {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikz@@to@collect}
+ {\PackageError{tikz}{( expected}{}%}
+ \tikz@@to@or@edge@coordinate()}}}%
+}
+
+\def\tikz@@to@or@edge@coordinate({%
+ \pgfutil@ifnextchar${%$
+ % Ok, parse directly
+ \tikz@scan@one@point\tikz@@to@or@edge@math(%
+ }{%
+ \pgfutil@ifnextchar[{%]
+ \tikz@scan@one@point\tikz@@to@or@edge@math(%
+ }{%
+ \tikz@@to@or@edge@@coordinate(%
+ }%
+ }%
+}
+\def\tikz@@to@or@edge@math#1{%
+ \pgf@process{#1}%
+ \edef\tikztotarget{\the\pgf@x,\the\pgf@y}%
+ \tikz@to@or@edge@function%
+}
+
+\def\tikz@@to@or@edge@@coordinate(#1){%
+ \def\tikztotarget{#1}%
+ \tikz@to@or@edge@function%
+}
+
+\def\tikz@do@edge{%
+ \setbox\tikz@figbox=\hbox\bgroup%
+ \unhbox\tikz@figbox%
+ \hbox\bgroup
+ \bgroup%
+ \pgfinterruptpath%
+ \pgfscope%
+ \let\tikz@transform=\pgfutil@empty%
+ \let\tikz@options=\pgfutil@empty%
+ \let\tikz@tonodes=\tikz@collected@onpath%
+ \def\tikztonodes{{\pgfextra{\tikz@node@is@a@labeltrue}\tikz@tonodes}}%
+ \let\tikz@collected@onpath=\pgfutil@empty%
+ \tikz@options%
+ \tikz@transform%
+ % Typeset node:
+ \tikz@atbegin@to%
+ \path[style=every edge]\tikz@@to@local@options(\tikztostart)\tikz@to@path;%
+ \tikz@atend@to%
+ \endpgfscope%
+ \endpgfinterruptpath%
+ \egroup
+ \egroup%
+ \egroup%
+ \global\setbox\tikz@tempbox=\copy\tikz@figbox%
+ \endgroup%
+ \setbox\tikz@figbox=\box\tikz@tempbox%
+ \tikz@scan@next@command%
+}
+
+\def\tikz@do@to{%
+ \let\tikz@tonodes=\tikz@collected@onpath%
+ \def\tikztonodes{{\pgfextra{\tikz@node@is@a@labeltrue}\tikz@tonodes}}%
+ \let\tikz@collected@onpath=\pgfutil@empty%
+ \tikz@scan@next@command%
+ \pgfextra{\tikz@atbegin@to}%
+ [style=every to]\tikz@@to@local@options\tikz@to@path%
+ \pgfextra{\tikz@atend@to}%
+}
+
+
+\def\tikz@to@use@last@coordinate{%
+ \iftikz@shapeborder%
+ \edef\tikztostart{\tikz@shapeborder@name}%
+ \else%
+ \edef\tikztostart{\the\tikz@lastx,\the\tikz@lasty}%
+ \fi%
+}
+\def\tikz@to@use@last@fig@name{%
+ \edef\tikztostart{\tikz@to@last@fig@name}%
+}
+
+
+
+% Syntax for edge from parent:
+% edge from parent [options]
+\def\tikz@edgetoparent from parent{\pgfutil@ifnextchar[\tikz@@edgetoparent{\tikz@@edgetoparent[]}}%}
+\def\tikz@@edgetoparent[#1]{%
+ \let\tikz@edge@to@parent@needed=\pgfutil@empty%
+ \tikz@node@is@a@labeltrue%
+ \tikz@scan@next@command [style=edge from parent,#1] \tikz@edge@to@parent@path%
+}
+
+
+% Syntax for bezier curves
+% .. controls(point) and (point) .. (target)
+% .. controls(point) .. (target)
+% .. (target) % currently not supported
+
+\def\tikz@dot.{\tikz@@dot}%
+\def\tikz@@dot{%
+ \pgfutil@ifnextchar n%
+ {\tikz@collect@label@onpath\tikz@@dot}%
+ {\pgfutil@ifnextchar c{\tikz@curveto@double}{\tikz@curveto@auto}}}
+
+\def\tikz@curveto@double co{%
+ \pgfutil@ifnextchar o{\tikz@collect@coordinate@onpath\tikz@@dot co}
+ {\tikz@cureveto@@double}}
+\def\tikz@cureveto@@double ntrols#1{%
+ \tikz@scan@one@point\tikz@curveA#1%
+}
+\def\tikz@curveA#1{%
+ \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+ {%
+ \tikz@make@last@position{#1}%
+ \xdef\tikz@curve@first{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+ }%
+ \pgfutil@ifnextchar a
+ {\tikz@curveBand}%
+ {\let\tikz@curve@second\tikz@curve@first\tikz@curveCdots}%
+}
+\def\tikz@curveBand and{%
+ \tikz@scan@one@point\tikz@curveB%
+}
+\def\tikz@curveB#1{%
+ \def\tikz@curve@second{#1}%
+ \tikz@curveCdots}
+\def\tikz@curveCdots{%
+ \afterassignment\tikz@curveCdot\let\@next=}
+\def\tikz@curveCdot.{%
+ \ifx\@next.%
+ \else%
+ \PackageError{tikz}{Dot expected}{}%
+ \fi%
+ \tikz@updatecurrenttrue%
+ \tikz@curveCcheck%
+}
+\def\tikz@curveCcheck{%
+ \pgfutil@ifnextchar n%
+ {\tikz@collect@label@onpath\tikz@curveCcheck}
+ {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikz@curveCcheck}
+ {\tikz@scan@one@point\tikz@curveC}}%
+}
+\def\tikz@curveC#1{%
+ \tikz@make@last@position{#1}%
+ \edef\tikz@curve@third{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+ {%
+ \tikz@lastxsaved=\tikz@lastx%
+ \tikz@lastysaved=\tikz@lasty%
+ \tikz@make@last@position{\tikz@curve@second}%
+ \xdef\tikz@curve@second{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+ }%
+ %
+ % Start recalculating things in case start and end are shapes.
+ %
+ % First, the start:
+ \ifx\tikz@moveto@waiting\relax%
+ \else%
+ \pgf@process{\pgfpointshapeborder{\tikz@moveto@waiting}{\tikz@curve@first}}%
+ \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
+ \pgfpathmoveto{\pgfqpoint{\pgf@x}{\pgf@y}}%
+ \fi%
+ \let\tikz@timer@cont@one=\tikz@curve@first%
+ \let\tikz@timer@cont@two=\tikz@curve@second%
+ % Second, the end:
+ \iftikz@shapeborder%
+ % ok, target is a shape. recalculate third
+ {%
+ \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\tikz@curve@second}}%
+ \tikz@make@last@position{\pgfqpoint{\pgf@x}{\pgf@y}}%
+ \edef\tikz@curve@third{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+ \pgfpathcurveto{\tikz@curve@first}{\tikz@curve@second}{\tikz@curve@third}%
+ \global\let\tikz@timer@end@temp=\tikz@curve@third% move out of group
+ }%
+ \let\tikz@timer@end=\tikz@timer@end@temp%
+ \edef\tikz@moveto@waiting{\tikz@shapeborder@name}%
+ \else%
+ \pgfpathcurveto{\tikz@curve@first}{\tikz@curve@second}{\tikz@curve@third}%
+ \let\tikz@timer@end=\tikz@curve@third
+ \let\tikz@moveto@waiting=\relax%
+ \fi%
+ \let\tikz@timer=\tikz@timer@curve%
+ \tikz@scan@next@command%
+}
+
+
+% Syntax for rectangles:
+% rectangle <corner point>
+\def\tikz@rect ectangle{%
+ \tikz@flush@moveto%
+ \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+ \tikz@@rect}%
+\def\tikz@@rect{%
+ \pgfutil@ifnextchar n
+ {\tikz@collect@label@onpath\tikz@@rect}
+ {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikz@@rect}%
+ {
+ \pgf@xa=\tikz@lastx\relax%
+ \pgf@ya=\tikz@lasty\relax%
+ \tikz@scan@one@point\tikz@rectB}}}
+\def\tikz@rectB#1{%
+ \tikz@make@last@position{#1}%
+ \edef\tikz@timer@end{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+ \let\tikz@timer=\tikz@timer@line%
+ \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
+ \tikz@path@lineto{\pgfqpoint{\pgf@xa}{\tikz@lasty}}%
+ \tikz@path@lineto{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}%
+ \tikz@path@lineto{\pgfqpoint{\tikz@lastx}{\pgf@ya}}%
+ \iftikz@snaked%
+ \tikz@path@lineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
+ \fi%
+ \pgfpathclose%
+ \pgfpathmoveto{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}%
+ \def\pgfstrokehook{}%
+ \tikz@scan@next@command%
+}
+
+
+
+% Syntax for grids:
+% grid <corner point>
+\def\tikz@grid rid{%
+ \tikz@flush@moveto%
+ \pgf@xa=\tikz@lastx\relax%
+ \pgf@ya=\tikz@lasty\relax%
+ \pgfutil@ifnextchar[{\tikz@gridA}{\tikz@gridA[]}}%}
+\def\tikz@gridA[#1]{%
+ \def\tikz@grid@options{#1}%
+ \tikz@scan@one@point\tikz@gridB}%
+\def\tikz@gridB#1{%
+ \tikz@make@last@position{#1}%
+ {%
+ \expandafter\tikzset\expandafter{\tikz@grid@options}
+ \tikz@checkunit{\tikz@grid@x}%
+ \iftikz@isdimension%
+ \pgf@process{\pgfpoint{\tikz@grid@x}{0pt}}%
+ \else%
+ \pgf@process{\pgfpointxy{\tikz@grid@x}{0}}%
+ \fi%
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ \tikz@checkunit{\tikz@grid@y}%
+ \iftikz@isdimension%
+ \pgf@process{\pgfpoint{0pt}{\tikz@grid@y}}%
+ \else%
+ \pgf@process{\pgfpointxy{0}{\tikz@grid@y}}%
+ \fi%
+ \advance\pgf@xb by\pgf@x%
+ \advance\pgf@yb by\pgf@y%
+ \pgfpathgrid[stepx=\pgf@xb,stepy=\pgf@yb]%
+ {\pgfqpoint{\pgf@xa}{\pgf@ya}}{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}%
+ }
+ \tikz@scan@next@command%
+}
+
+
+
+% Syntax for plot:
+% plot [local options] ... % starts with a moveto
+% -- plot [local options] ... % starts with a lineto
+\def\tikz@plot lot{%
+ \tikz@flush@moveto%
+ \pgfutil@ifnextchar[{\tikz@@plot}{\tikz@@plot[]}}%}
+\def\tikz@@plot[#1]{%
+ \begingroup%
+ \let\tikz@options=\pgfutil@empty%
+ \tikzset{every plot/.try}%
+ \tikzset{#1}%
+ \pgfutil@ifnextchar f{\tikz@plot@f}%
+ {\pgfutil@ifnextchar c{\tikz@plot@scan@points}%
+ {\pgfutil@ifnextchar ({\tikz@plot@expression}{%
+ \PackageError{tikz}{Cannot parse this plotting data}{}%
+ \endgroup}}}}
+\def\tikz@plot@f f{\pgfutil@ifnextchar i{\tikz@plot@file}{\tikz@plot@function}}
+
+\def\tikz@plot@file ile#1{\def\tikz@plot@data{\pgfplotxyfile{#1}}\tikz@@@plot}%
+\def\tikz@plot@scan@points coordinates#1{%
+ \pgfplothandlerrecord\tikz@plot@data%
+ \pgfplotstreamstart%
+ \pgfutil@ifnextchar\pgf@stop{\pgfplotstreamend\expandafter\tikz@@@plot\pgfutil@gobble}
+ {\tikz@scan@one@point\tikz@plot@next@point}%
+ #1\pgf@stop%
+}
+\def\tikz@plot@next@point#1{%
+ \pgfplotstreampoint{#1}%
+ \pgfutil@ifnextchar\pgf@stop{\pgfplotstreamend\expandafter\tikz@@@plot\pgfutil@gobble}%
+ {\tikz@scan@one@point\tikz@plot@next@point}%
+}
+\def\tikz@plot@function unction#1{%
+ \def\tikz@plot@filename{\tikz@plot@prefix\tikz@plot@id}%
+ \iftikz@plot@raw@gnuplot%
+ \def\tikz@plot@data{\pgfplotgnuplot[\tikz@plot@filename]{#1}}%
+ \else%
+ \iftikz@plot@parametric%
+ \def\tikz@plot@data{\pgfplotgnuplot[\tikz@plot@filename]{%
+ set samples \tikz@plot@samples;
+ set parametric;
+ plot [t=\tikz@plot@domain] #1}}%
+ \else%
+ \def\tikz@plot@data{\pgfplotgnuplot[\tikz@plot@filename]{%
+ set samples \tikz@plot@samples;
+ plot [x=\tikz@plot@domain] #1}}%
+ \fi%
+ \fi%
+ \tikz@@@plot%
+}
+
+\def\tikz@plot@no@resample{%
+ \pgfutil@IfFileExists{\tikz@plot@filename.table}%
+ {\def\tikz@plot@data{\pgfplotxyfile{\tikz@plot@filename.table}}}%
+ {}%
+}
+
+\def\tikz@plot@expression(#1){%
+ \edef\tikz@plot@data{\noexpand\pgfplotfunction{\expandafter\noexpand\tikz@plot@var}{\tikz@plot@samplesat}}%
+ \expandafter\def\expandafter\tikz@plot@data\expandafter{\tikz@plot@data{\tikz@scan@one@point\pgfutil@firstofone(#1)}}%
+ \tikz@@@plot%
+}
+
+\def\tikz@@@plot{%
+ \def\pgfplotlastpoint{\pgfpointorigin}%
+ \tikz@plot@handler%
+ \tikz@plot@data%
+ \global\let\tikz@@@temp=\pgfplotlastpoint%
+ \ifx\tikz@plot@mark\pgfutil@empty%
+ \else%
+ % Marks are drawn after the path.
+ \setbox\tikz@figbox=\hbox{%
+ \unhbox\tikz@figbox%
+ \hbox{{%
+ \pgfinterruptpath%
+ \pgfscope%
+ \let\tikz@options=\pgfutil@empty%
+ \let\tikz@transform=\pgfutil@empty%
+ \expandafter\tikzset\expandafter{\tikz@plot@mark@options}%
+ \tikz@options%
+ \ifx\tikz@mark@list\pgfutil@empty%
+ \pgfplothandlermark{\tikz@transform\pgfuseplotmark{\tikz@plot@mark}}%
+ \else
+ \pgfplothandlermarklisted{\tikz@transform\pgfuseplotmark{\tikz@plot@mark}}{\tikz@mark@list}%
+ \fi
+ \tikz@plot@data%
+ \endpgfscope
+ \endpgfinterruptpath%
+ }}%
+ }%
+ \fi%
+ \global\setbox\tikz@tempbox=\copy\tikz@figbox%
+ \endgroup%
+ \setbox\tikz@figbox=\box\tikz@tempbox%
+ \tikz@make@last@position{\tikz@@@temp}%
+ \tikz@scan@next@command%
+}
+
+
+\pgfdeclareplotmark{ball}
+{%
+ \def\tikz@shading{ball}%
+ \shade (0,0) circle (\pgfplotmarksize);%
+}
+
+
+
+
+% Syntax for cosine curves:
+% cos <end of quarter-period>
+\def\tikz@cosine s{\tikz@scan@one@point\tikz@@cosine}
+\def\tikz@@cosine#1{%
+ \tikz@flush@moveto%
+ \pgf@process{#1}%
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ \advance\pgf@xc by-\tikz@lastx%
+ \advance\pgf@yc by-\tikz@lasty%
+ \advance\tikz@lastx by\pgf@xc%
+ \advance\tikz@lasty by\pgf@yc%
+ \tikz@lastxsaved=\tikz@lastx%
+ \tikz@lastysaved=\tikz@lasty%
+ \tikz@updatecurrenttrue%
+ \pgfpathcosine{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
+ \tikz@scan@next@command%
+}
+
+% Syntax for sine curves:
+% sin <end of quarter-period>
+\def\tikz@sine in{\tikz@scan@one@point\tikz@@sine}
+\def\tikz@@sine#1{%
+ \tikz@flush@moveto%
+ \pgf@process{#1}%
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ \advance\pgf@xc by-\tikz@lastx%
+ \advance\pgf@yc by-\tikz@lasty%
+ \advance\tikz@lastx by\pgf@xc%
+ \advance\tikz@lasty by\pgf@yc%
+ \tikz@lastxsaved=\tikz@lastx%
+ \tikz@lastysaved=\tikz@lasty%
+ \tikz@updatecurrenttrue%
+ \pgfpathsine{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
+ \tikz@scan@next@command%
+}
+
+% Syntax for parabolas:
+% parabola[options] bend <coordinate> <coordinate>
+\def\tikz@parabola arabola{%
+ \pgfutil@ifnextchar[{\tikz@parabola@options}{\tikz@parabola@options[]}}%}
+
+\def\tikz@parabola@options[#1]{%
+ \def\tikz@parabola@option{#1}%
+ \pgfutil@ifnextchar b{\tikz@parabola@scan@bend}{\tikz@scan@one@point\tikz@parabola@semifinal}}
+\def\tikz@parabola@scan@bend bend{\tikz@scan@one@point\tikz@parabola@scan@bendB}
+\def\tikz@parabola@scan@bendB#1{%
+ \def\tikz@parabola@bend{#1}%
+ \tikz@scan@one@point\tikz@parabola@semifinal%
+}
+\def\tikz@parabola@semifinal#1{%
+ \tikz@flush@moveto%
+ % Save original start:
+ \pgf@xb=\tikz@lastx%
+ \pgf@yb=\tikz@lasty%
+ \tikz@make@last@position{#1}%
+ \pgf@xc=\tikz@lastx%
+ \pgf@yc=\tikz@lasty%
+ \begingroup% now calculate bend:
+ \expandafter\tikzset\expandafter{\tikz@parabola@option}%
+ \tikz@lastxsaved=\tikz@parabola@bend@factor\tikz@lastx%
+ \tikz@lastysaved=\tikz@parabola@bend@factor\tikz@lasty%
+ \advance\tikz@lastxsaved by\pgf@xb%
+ \advance\tikz@lastysaved by\pgf@yb%
+ \advance\tikz@lastxsaved by-\tikz@parabola@bend@factor\pgf@xb%
+ \advance\tikz@lastysaved by-\tikz@parabola@bend@factor\pgf@yb%
+ \expandafter\tikz@make@last@position\expandafter{\tikz@parabola@bend}%
+ % Calculate delta from bend
+ \advance\pgf@xc by-\tikz@lastx%
+ \advance\pgf@yc by-\tikz@lasty%
+ % Ok, now calculate delta to bend
+ \advance\tikz@lastx by-\pgf@xb%
+ \advance\tikz@lasty by-\pgf@yb%
+ \xdef\tikz@parabola@b{{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}}%
+ \endgroup%
+ \expandafter\pgfpathparabola\tikz@parabola@b%
+ \tikz@scan@next@command%
+}
+
+
+% Syntax for circles:
+% circle (radius)
+%
+% Syntax for ellipses:
+% ellipse (x-radius and y-radius)
+%
+% radii can be dimensionless, then they are in the xy-system
+\def\tikz@circle ircle{\tikz@flush@moveto\tikz@@circle}
+\def\tikz@ellipse llipse{\tikz@flush@moveto\tikz@@circle}
+\def\tikz@@circle{%
+ \pgfutil@ifnextchar(\tikz@@@circle{%)
+ \advance\tikz@expandcount by -1%
+ \ifnum\tikz@expandcount<0\relax%
+ \let\@next=\tikz@@circle@scangiveup%
+ \else%
+ \let\@next=\tikz@@circle@scanexpand%
+ \fi%
+ \@next%
+ }%
+}
+\def\tikz@@circle@scanexpand{\expandafter\tikz@@circle}
+\def\tikz@@circle@scangiveup#1{\PackageError{tikz}{Cannot parse this radius}{}#1{\tikz@scan@next@command}}
+\def\tikz@@@circle(#1){%
+ \pgfutil@in@{ and }{#1}%
+ \ifpgfutil@in@%
+ \tikz@@ellipseB(#1)%
+ \else%
+ \tikz@@ellipseB({#1} and {#1})%
+ \fi%
+ \tikz@scan@next@command%
+}
+\def\tikz@@ellipseB(#1 and #2){%
+ \pgfmathparse{#1}%
+ \let\tikz@ellipse@x=\pgfmathresult%
+ \ifpgfmathunitsdeclared%
+ \pgfmathparse{#2}%
+ \let\tikz@ellipse@y=\pgfmathresult%
+ \ifpgfmathunitsdeclared%
+ \pgfpathellipse{\tikz@last@position}{%
+ \pgfqpoint{\tikz@ellipse@x pt}{0pt}}{\pgfpoint{0pt}{\tikz@ellipse@y pt}}%
+ \else%
+ \PackageError{tikz}{You cannot mix dimensions and dimensionless values in an ellipse}{}%
+ \fi%
+ \else%
+ \pgfmathparse{#2}%
+ \let\tikz@ellipse@y=\pgfmathresult%
+ \ifpgfmathunitsdeclared%
+ \PackageError{tikz}{You cannot mix dimensions and dimensionless values in an ellipse}{}%
+ \else%
+ \pgfpathellipse{\tikz@last@position}{%
+ \pgfpointxy{\tikz@ellipse@x}{0}}{\pgfpointxy{0}{\tikz@ellipse@y}}%
+ \fi%
+ \fi%
+}
+
+% Syntax 1 for arcs:
+% arc (start angle:end angle:radius)
+%
+% Syntax 2 for arcs:
+% arc (start angle:end angle:x-radius and y-radius)
+%
+% radius can be dimensionless, then the arc is in the xy-coordinate system
+\def\tikz@arcA rc{%
+ \tikz@flush@moveto%
+ \pgfutil@ifnextchar({\tikz@@arcto}{\expandafter\tikz@arcA\expandafter r\expandafter c}}
+
+\def\tikz@@arcto(#1){%
+ \edef\tikz@temp{(#1)}%
+ \expandafter\tikz@@@arcto@check@slashand\tikz@temp%
+}
+
+\def\tikz@@@arcto@check@slashand(#1:#2:#3){%
+ \pgfutil@in@{ and }{#3}%
+ \ifpgfutil@in@%
+ \tikz@parse@arc@and(#1:#2:#3)%
+ \else%
+ \tikz@parse@arc@and(#1:#2:{#3} and {#3})%
+ \fi%
+}
+
+\def\tikz@parse@arc@and(#1:#2:#3 and #4){%
+ \pgfmathparse{#3}%
+ \let\tikz@arc@x=\pgfmathresult%
+ \ifpgfmathunitsdeclared%
+ \pgfmathparse{#4}%
+ \let\tikz@arc@y=\pgfmathresult%
+ \ifpgfmathunitsdeclared%
+ \tikz@@@arcfinal{\pgfpatharc{#1}{#2}{\tikz@arc@x pt and \tikz@arc@y pt}}
+ {\pgfpointpolar{#1}{\tikz@arc@x pt and \tikz@arc@y pt}}
+ {\pgfpointpolar{#2}{\tikz@arc@x pt and \tikz@arc@y pt}}%
+ \else%
+ \PackageError{tikz}{You cannot mix dimensions and dimensionless values in an arc}{}%
+ \fi%
+ \else%
+ \pgfmathparse{#4}%
+ \let\tikz@arc@y=\pgfmathresult%
+ \ifpgfmathunitsdeclared%
+ \PackageError{tikz}{You cannot mix dimensions and dimensionless values in an arc}{}%
+ \else%
+ \tikz@@@arcfinal{\pgfpatharcaxes{#1}{#2}{\pgfpointxy{\tikz@arc@x}{0}}{\pgfpointxy{0}{\tikz@arc@y}}}
+ {\pgfpointpolarxy{#1}{\tikz@arc@x and \tikz@arc@y}}{\pgfpointpolarxy{#2}{\tikz@arc@x and \tikz@arc@y}}%
+ \fi%
+ \fi%
+}
+
+\def\tikz@@@arcfinal#1#2#3{%
+ #1%
+ \pgf@process{#2}%
+ \advance\tikz@lastx by-\pgf@x%
+ \advance\tikz@lasty by-\pgf@y%
+ \pgf@process{#3}%
+ \advance\tikz@lastx by\pgf@x%
+ \advance\tikz@lasty by\pgf@y%
+ \tikz@lastxsaved=\tikz@lastx%
+ \tikz@lastysaved=\tikz@lasty%
+ \tikz@scan@next@command%
+}
+
+
+% Syntax for coordinates:
+% coordinate[options] (coordinate name) at (point)
+% where ``at (point)'' is optional
+\def\tikz@coordinate ordinate{%
+ \pgfutil@ifnextchar[{\tikz@@coordinate@opt}{\tikz@@coordinate@opt[]}}
+\def\tikz@@coordinate@opt[#1]{%
+ \pgfutil@ifnextchar({\tikz@@coordinate[#1]}
+ {\tikz@fig ode[shape=coordinate,#1]{}}}%}
+\def\tikz@@coordinate[#1](#2){%
+ \pgfutil@ifnextchar a{\tikz@@coordinate@at[#1](#2)}
+ {\tikz@fig ode[shape=coordinate,#1](#2){}}}
+\def\tikz@@coordinate@at[#1](#2)at#3({%
+ \def\tikz@coordinate@caller{\tikz@fig ode[shape=coordinate,#1](#2)at}%
+ \tikz@scan@one@point\tikz@@coordinate@at@math(%
+}
+\def\tikz@@coordinate@at@math#1{%
+ \pgf@process{#1}%
+ \edef\tikz@temp{(\the\pgf@x,\the\pgf@y)}%
+ \expandafter\tikz@coordinate@caller\tikz@temp{}%
+}
+
+
+
+% Syntax for nodes:
+% node[options] (node name) {label text}
+%
+% all of [options], (node name) and {label text} are optional. There
+% can be multiple options before the label text as in
+% node[draw] (a) [rotate=10] {text}
+%
+% A label text always ``ends'' the node.
+\def\tikz@fig ode{%
+ \edef\tikz@save@line@width{\the\pgflinewidth}%
+ \begingroup%
+ \let\tikz@fig@name=\pgfutil@empty%
+ \begingroup%
+ \tikz@is@matrixfalse%
+ \let\nodepart=\tikz@nodepart%
+ \let\tikz@options=\pgfutil@empty%
+ \let\tikz@after@node=\pgfutil@empty%
+ \let\tikz@afternodepathoptions=\pgfutil@empty%
+ \let\tikz@transform=\pgfutil@empty%
+ \let\tikz@mode=\pgfutil@empty%
+ \tikz@decoratepathfalse%
+ \let\tikz@preactions=\pgfutil@empty%
+ \let\tikz@postactions=\pgfutil@empty%
+ \let\tikz@alias=\pgfutil@empty%
+ \def\tikz@node@at{\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+ \iftikz@node@is@a@label%
+ \else%
+ \let\tikz@time=\pgfutil@empty%
+ \fi%
+ \tikz@node@reset@hook%
+ \tikzset{every node/.try}%
+ \tikz@@scan@fig}%
+\def\tikz@@scan@fig{%
+ \pgfutil@ifnextchar a{\tikz@fig@scan@at}
+ {\pgfutil@ifnextchar({\tikz@fig@scan@name}
+ {\pgfutil@ifnextchar[{\tikz@fig@scan@options}%
+ {\pgfutil@ifnextchar\bgroup{\tikz@fig@main}%
+ {\PackageError{tikz}{A node must have a (possibly empty) label text}{}%
+ \tikz@fig@main{}}}}}}%}}
+\def\tikz@fig@scan@at at{%
+ \tikz@scan@one@point\tikz@@fig@scan@at}
+\def\tikz@@fig@scan@at#1{%
+ \def\tikz@node@at{#1}\tikz@@scan@fig}%
+\def\tikz@fig@scan@name(#1){\edef\tikz@fig@name{#1}\tikz@@scan@fig}%
+\def\tikz@fig@scan@options[#1]{\tikzset{#1}\tikz@@scan@fig}%
+\let\tikz@node@reset@hook=\pgfutil@empty%
+\let\tikz@node@begin@hook=\pgfutil@empty%
+\def\tikz@fig@main{\afterassignment\tikz@@fig@main\let\next=}
+\def\tikz@@fig@main{%
+ \pgfutil@ifundefined{pgf@sh@s@\tikz@shape}%
+ {\PackageError{tikz}%
+ {Unknown shape ``\tikz@shape.'' Using ``rectangle'' instead}{}%
+ \def\tikz@shape{rectangle}}%
+ {}%
+ \tikzset{every \tikz@shape\space node/.try}%
+ \tikz@node@begin@hook%
+ \iftikz@is@matrix%
+ \let\tikz@next=\tikz@do@matrix%
+ \else%
+ \let\tikz@next=\tikz@do@fig%
+ \fi%
+ \tikz@next%
+}
+\def\tikz@do@fig{%
+ \setbox\pgfnodeparttextbox=\hbox%
+ \bgroup%
+ \tikzset{every text node part/.try}%
+ \ifx\tikz@textopacity\pgfutil@empty%
+ \else%
+ \pgfsetfillopacity{\tikz@textopacity}%
+ \pgfsetstrokeopacity{\tikz@textopacity}%
+ \fi%
+ \pgfinterruptpicture%
+ \tikz@textfont%
+ \ifx\tikz@text@width\pgfutil@empty%
+ \else%
+ \begingroup%
+ \pgfutil@minipage[t]{\tikz@text@width}%
+ \tikz@text@action%
+ \fi%
+ \tikz@atbegin@node%
+ \bgroup%
+ \aftergroup\unskip%
+ \ifx\tikz@textcolor\pgfutil@empty%
+ \else%
+ \pgfutil@colorlet{.}{\tikz@textcolor}%
+ \fi%
+ \pgfsetcolor{.}%
+ \setbox\tikz@figbox=\box\voidb@x%
+ \tikz@uninstallcommands%
+ \aftergroup\tikz@fig@collectresetcolor%
+ \ignorespaces%
+}
+\def\tikz@fig@collectresetcolor{%
+ \pgfutil@ifnextchar\reset@color%
+ {\reset@color\afterassignment\tikz@fig@collectresetcolor\let\tikz@temp=}%
+ {\tikz@fig@boxdone}%
+}
+\def\tikz@fig@boxdone{%
+ \tikz@atend@node%
+ \ifx\tikz@text@width\pgfutil@empty%
+ \else%
+ \pgfutil@endminipage%
+ \endgroup%
+ \fi%
+ \endpgfinterruptpicture%
+ \egroup%
+ \pgfutil@ifnextchar c{\tikz@fig@mustbenamed\tikz@fig@continue}%
+ {\pgfutil@ifnextchar[{\tikz@fig@mustbenamed\tikz@fig@continue}%
+ {\pgfutil@ifnextchar t{\tikz@fig@mustbenamed\tikz@fig@continue}
+ {\pgfutil@ifnextchar e{\tikz@fig@mustbenamed\tikz@fig@continue}
+ {\ifx\tikz@after@node\pgfutil@empty\expandafter\tikz@fig@continue\else\expandafter\tikz@fig@mustbenamed\expandafter\tikz@fig@continue\fi}}}}}%}
+
+\def\tikz@do@matrix{%
+ \tikzset{every matrix/.try}%
+ \tikz@node@transformations%
+ \tikz@fig@mustbenamed%
+ \setbox\tikz@figbox=\hbox\bgroup%
+ \setbox\pgfutil@tempboxa=\copy\tikz@figbox%
+ \unhbox\pgfutil@tempboxa%
+ \hbox\bgroup\bgroup%
+ \pgfinterruptpath%
+ \pgfscope%
+ \tikz@options%
+ \setbox\tikz@figbox=\box\voidb@x%
+ \let\tikzmatrixname=\tikz@fig@name%
+ \edef\tikz@m@anchor{\ifx\tikz@matrix@anchor\pgfutil@empty\tikz@anchor\else\tikz@matrix@anchor\fi}%
+ \expandafter\pgfutil@in@\expandafter{\expandafter.\expandafter}\expandafter{\tikz@m@anchor}%
+ \ifpgfutil@in@%
+ \expandafter\tikz@matrix@split\tikz@m@anchor\relax%
+ \else%
+ \def\tikz@matrix@shift{\pgfpointorigin}%
+ \fi%
+ \let\tikz@transform=\relax%
+ \pgfmatrix%
+ {\tikz@shape}%
+ {\tikz@m@anchor}%
+ {\tikz@fig@name}%
+ {%
+ \pgfutil@tempdima=\pgflinewidth%
+ {\begingroup\tikz@finish}%
+ \global\pgflinewidth=\pgfutil@tempdima%
+ }%
+ {\tikz@matrix@shift}%
+ {%
+ \tikz@matrix@make@active@ampersand%
+ \def\pgfmatrixbegincode{%
+ \pgfsys@beginscope%
+ \tikz@common@matrix@code%
+ \tikz@atbegin@cell%
+ }%
+ \def\tikz@common@matrix@code{%
+ \let\tikz@options=\pgfutil@empty%
+ \let\tikz@mode=\pgfutil@empty%
+ \tikzset{every cell/.try={\the\pgfmatrixcurrentrow}{\the\pgfmatrixcurrentcolumn}}%
+ \tikzset{column \the\pgfmatrixcurrentcolumn/.try}%
+ \ifodd\pgfmatrixcurrentcolumn%
+ \tikzset{every odd column/.try}%
+ \else%
+ \tikzset{every even column/.try}%
+ \fi%
+ \tikzset{row \the\pgfmatrixcurrentrow/.try}%
+ \ifodd\pgfmatrixcurrentrow%
+ \tikzset{every odd row/.try}%
+ \else%
+ \tikzset{every even row/.try}%
+ \fi%
+ \tikzset{row \the\pgfmatrixcurrentrow\space column \the\pgfmatrixcurrentcolumn/.try}%
+ \tikz@options%
+ }%
+ \def\pgfmatrixendcode{%
+ \tikz@atend@cell%
+ \pgfsys@endscope%
+ }%
+ \def\pgfmatrixemptycode{%
+ \pgfsys@beginscope%
+ \tikz@common@matrix@code%
+ \tikz@at@emptycell%
+ \pgfsys@endscope%
+ }%
+ \aftergroup\tikz@do@matrix@cont}%
+ \bgroup%
+}
+\def\tikz@do@matrix@cont{%
+ \endpgfscope
+ \endpgfinterruptpath%
+ \egroup\egroup%
+ \egroup%
+ %
+ \tikz@node@finish%
+}
+
+{%
+ \catcode`\&=13
+ \gdef\tikz@matrix@make@active@ampersand{%
+ \ifx\tikz@ampersand@replacement\pgfutil@empty%
+ \catcode`\&=13%
+ \let&=\pgfmatrixnextcell%
+ \else%
+ \expandafter\let\tikz@ampersand@replacement=\pgfmatrixnextcell%
+ \fi%
+ }%
+}%
+
+
+\def\tikz@matrix@split#1.#2\relax{%
+ \def\tikz@m@anchor{text}%
+ \def\tikz@matrix@shift{\pgfpointanchor{#1}{#2}}%
+}
+
+\def\tikz@fig@continue{%
+ \ifx\tikz@text@width\pgfutil@empty%
+ \else%
+ \pgfmathsetlength{\pgf@x}{\tikz@text@width}%
+ \wd\pgfnodeparttextbox=\pgf@x%
+ \fi%
+ \ifx\tikz@text@height\pgfutil@empty%
+ \else%
+ \pgfmathsetlength{\pgf@x}{\tikz@text@height}%
+ \ht\pgfnodeparttextbox=\pgf@x%
+ \fi%
+ \ifx\tikz@text@depth\pgfutil@empty%
+ \else%
+ \pgfmathsetlength{\pgf@x}{\tikz@text@depth}%
+ \dp\pgfnodeparttextbox=\pgf@x%
+ \fi%
+ %
+ % Node transformation
+ %
+ \tikz@node@transformations
+ %
+ \setbox\tikz@figbox=\hbox{%
+ \setbox\pgfutil@tempboxa=\copy\tikz@figbox%
+ \unhbox\pgfutil@tempboxa%
+ \hbox{{%
+ \pgfinterruptpath%
+ \pgfscope%
+ \tikz@options%
+ \setbox\tikz@figbox=\box\voidb@x%
+ \pgfmultipartnode{\tikz@shape}{\tikz@anchor}{\tikz@fig@name}{%
+ \pgfutil@tempdima=\pgflinewidth%
+ {\begingroup\tikz@finish}%
+ \global\pgflinewidth=\pgfutil@tempdima%
+ }%
+ \endpgfscope
+ \endpgfinterruptpath%
+ }}%
+ }%
+ %
+ \tikz@alias%
+ \tikz@node@finish%
+}
+
+
+\def\tikz@fig@mustbenamed{%
+ \ifx\tikz@fig@name\pgfutil@empty%
+ % Assign a dummy name
+ \global\advance\tikz@fig@count by1\relax
+ \edef\tikz@fig@name{tikz@f@\the\tikz@fig@count}%
+ \fi%
+}
+
+\def\tikz@node@transformations{
+ %
+ % Possibly, we are ``online''
+ %
+ \ifx\tikz@time\pgfutil@empty%
+ \pgftransformshift{\tikz@node@at}%
+ \iftikz@fullytransformed%
+ \else%
+ \pgftransformresetnontranslations%
+ \fi%
+ \else%
+ \tikz@do@auto@anchor%
+ \tikz@timer%
+ \fi%
+ % Invoke local transformations
+ \tikz@transform%
+}
+
+\def\tikz@node@finish{%
+ \global\let\tikz@last@fig@name=\tikz@fig@name%
+ \global\let\tikz@after@node@smuggle=\tikz@after@node%
+ \global\let\tikz@afternodepathoptions@smuggle=\tikz@afternodepathoptions%
+ % shift box outside group
+ \global\setbox\tikz@tempbox=\copy\tikz@figbox%
+ \endgroup\endgroup%
+ \setbox\tikz@figbox=\box\tikz@tempbox%
+ \pgflinewidth=\tikz@save@line@width%
+ \let\tikz@to@last@fig@name=\tikz@last@fig@name%
+ \let\tikz@to@use@whom=\tikz@to@use@last@fig@name%
+ \let\tikzlastnode=\tikz@last@fig@name%
+ \ifx\tikz@after@node@smuggle\pgfutil@empty%
+ \else%
+ \tikz@scan@next@command{\pgfextra{\tikz@afternodepathoptions@smuggle}\tikz@after@node@smuggle}\pgf@stop%
+ \fi%
+ \tikz@scan@next@command%
+}
+\let\tikz@fig@continue@orig=\tikz@fig@continue
+
+
+
+% Syntax for parts of nodes:
+% node ... {... \nodepart{name} ... \nodepart{name} ...}
+
+\def\tikz@nodepart#1{%
+ \tikz@atend@node%
+ \unskip%
+ \gdef\tikz@nodepart@name{#1}%
+ \global\let\tikz@fig@continue=\tikz@nodepart@continue%
+ \pgfutil@ifnextchar x{\egroup\relax}{\egroup\relax}% gobble spaces
+}
+\def\tikz@nodepart@continue{%
+ \global\let\tikz@fig@continue=\tikz@fig@continue@orig%
+ % Now start new box:
+ \expandafter\setbox\csname pgfnodepart\tikz@nodepart@name box\endcsname=\hbox%
+ \bgroup%
+ \tikzset{every \tikz@nodepart@name\space node part/.try}%
+ \pgfinterruptpicture%
+ \tikz@textfont%
+ \ifx\tikz@text@width\pgfutil@empty%
+ \else%
+ \begingroup%
+ \pgfutil@minipage[t]{\tikz@text@width}%
+ \tikz@text@action%
+ \fi%
+ \bgroup%
+ \aftergroup\unskip%
+ \ifx\tikz@textcolor\pgfutil@empty%
+ \else%
+ \pgfutil@colorlet{.}{\tikz@textcolor}%
+ \fi%
+ \pgfsetcolor{.}%
+ \setbox\tikz@figbox=\box\voidb@x%
+ \tikz@uninstallcommands%
+ \tikz@atbegin@node%
+ \aftergroup\tikz@fig@collectresetcolor%
+ \ignorespaces%
+}
+
+%
+% "late" options can be used to "redo" a node
+%
+\tikzset{late options/.code=\tikz@late@options{#1}}
+\def\tikz@late@options#1{%
+ % Do a "virtual" node:
+ \begingroup%
+ \iftikz@shapeborder%
+ \let\tikz@fig@name=\tikz@shapeborder@name%
+ \else%
+ \let\tikz@fig@name=\pgfutil@empty%
+ \fi%
+ \tikz@is@matrixfalse%
+ \let\tikz@options=\pgfutil@empty%
+ \let\tikz@after@node=\pgfutil@empty%
+ \let\tikz@afternodepathoptions=\pgfutil@empty%
+ \let\tikz@alias=\pgfutil@empty%
+ \let\tikz@transform=\pgfutil@empty%
+ \tikz@decoratepathfalse%
+ \tikz@node@reset@hook%
+ \tikzset{every node/.try,#1}%
+ \ifx\tikz@fig@name\pgfutil@empty%
+ \PackageError{tikz}{Late options must reference some existing
+ node}{}%
+ \fi%
+ \tikz@node@begin@hook%
+ \tikz@alias%
+ \global\let\tikz@last@fig@name=\tikz@fig@name%
+ \global\let\tikz@after@node@smuggle=\tikz@after@node%
+ \global\let\tikz@afternodepathoptions@smuggle=\tikz@afternodepathoptions%
+ \endgroup%
+ \let\tikz@to@last@fig@name=\tikz@last@fig@name%
+ \let\tikz@to@use@whom=\tikz@to@use@last@fig@name%
+ \let\tikzlastnode=\tikz@last@fig@name%
+ \ifx\tikz@after@node@smuggle\pgfutil@empty%
+ \else%
+ \tikz@scan@next@command{\pgfextra{\tikz@afternodepathoptions@smuggle}\tikz@after@node@smuggle}\pgf@stop%
+ \fi%
+}
+
+
+% Auto placement
+
+\def\tikz@auto@pre{%
+ \begingroup
+ \pgfresetnontranslationattimefalse
+ \pgfslopedattimetrue%
+ \pgfallowupsidedownattimetrue%
+ \tikz@timer%
+ \pgf@x=\pgf@pt@aa pt%
+ \pgf@y=\pgf@pt@ab pt%
+ \pgfpointnormalised{}%
+}
+
+\def\tikz@auto@post{%
+ \global\let\tikz@anchor@smuggle=\tikz@anchor%
+ \endgroup%
+ \let\tikz@anchor=\tikz@anchor@smuggle%
+}
+
+\def\tikz@auto@anchor{%
+ \ifdim\pgf@x>0.05pt%
+ \ifdim\pgf@y>0.05pt%
+ \def\tikz@anchor{south east}%
+ \else\ifdim\pgf@y<-0.05pt%
+ \def\tikz@anchor{south west}%
+ \else
+ \def\tikz@anchor{south}%
+ \fi\fi%
+ \else\ifdim\pgf@x<-0.05pt%
+ \ifdim\pgf@y>0.05pt%
+ \def\tikz@anchor{north east}%
+ \else\ifdim\pgf@y<-0.05pt%
+ \def\tikz@anchor{north west}%
+ \else
+ \def\tikz@anchor{north}%
+ \fi\fi%
+ \else%
+ \ifdim\pgf@y>0pt%
+ \def\tikz@anchor{east}%
+ \else%
+ \def\tikz@anchor{west}%
+ \fi%
+ \fi\fi%
+}
+
+\def\tikz@auto@anchor@prime{%
+ \ifdim\pgf@x>0.05pt%
+ \ifdim\pgf@y>0.05pt%
+ \def\tikz@anchor{north west}%
+ \else\ifdim\pgf@y<-0.05pt%
+ \def\tikz@anchor{north east}%
+ \else
+ \def\tikz@anchor{north}%
+ \fi\fi%
+ \else\ifdim\pgf@x<-0.05pt%
+ \ifdim\pgf@y>0.05pt%
+ \def\tikz@anchor{south west}%
+ \else\ifdim\pgf@y<-0.05pt%
+ \def\tikz@anchor{south east}%
+ \else
+ \def\tikz@anchor{south}%
+ \fi\fi%
+ \else%
+ \ifdim\pgf@y>0pt%
+ \def\tikz@anchor{west}%
+ \else%
+ \def\tikz@anchor{east}%
+ \fi%
+ \fi\fi%
+}
+
+
+
+
+% Syntax for trees:
+% node {...} child [options] {...} child [options] {...} ...
+% node {...} child [options] foreach \var in {list} [options] {...} ...
+
+\def\tikz@children{%
+ % Start collecting the children:
+ \let\tikz@children@list=\pgfutil@empty%
+ \tikznumberofchildren=0\relax%
+ \tikz@collect@children c}
+
+\def\tikz@collect@children{\pgfutil@ifnextchar c{\tikz@collect@children@cchar}{\tikz@children@collected}}
+\def\tikz@collect@children@cchar c{\pgfutil@ifnextchar h{\tikz@collect@child}{\tikz@children@collected c}}
+\def\tikz@collect@child hild{\pgfutil@ifnextchar[{\tikz@collect@childA}{\tikz@collect@childA[]}}%}
+\def\tikz@collect@childA[#1]{\pgfutil@ifnextchar f{\tikz@collect@children@foreach[#1]}{\tikz@collect@childB[#1]}}
+\def\tikz@collect@childB[#1]{%
+ \advance\tikznumberofchildren by1\relax
+ \expandafter\def\expandafter\tikz@children@list\expandafter{\tikz@children@list \tikz@childnode[#1]}%
+ \pgfutil@ifnextchar\bgroup{\tikz@collect@child@code}{\tikz@collect@child@code{}}}
+\def\tikz@collect@child@code#1{%
+ \expandafter\def\expandafter\tikz@children@list\expandafter{\tikz@children@list{#1}}%
+ \tikz@collect@children%
+}
+\def\tikz@collect@children@foreach[#1]foreach#2in#3{%
+ \pgfutil@ifnextchar\bgroup{\tikz@collect@children@foreachA{#1}{#2}{#3}}{\tikz@collect@children@foreachA{#1}{#2}{#3}{}}}
+\def\tikz@collect@children@foreachA#1#2#3#4{%
+ \expandafter\def\expandafter\tikz@children@list\expandafter
+ {\tikz@children@list\tikz@childrennodes[#1]{#2}{#3}{#4}}%
+ \c@pgf@counta=\tikznumberofchildren%
+ \foreach#2in{#3}%
+ {%
+ \global\advance\c@pgf@counta by1\relax%
+ }%
+ \tikznumberofchildren=\c@pgf@counta%
+ \tikz@collect@children%
+}
+\long\def\tikz@children@collected{%
+ \begingroup%
+ \advance\tikztreelevel by 1\relax%
+ \let\tikz@options=\pgfutil@empty%
+ \let\tikz@transform=\pgfutil@empty%
+ \tikzset{level/.try=\the\tikztreelevel,level \the\tikztreelevel/.try}%
+ \tikz@transform%
+ \let\tikzparentnode=\tikz@last@fig@name%
+ % Transform to center of node
+ \pgftransformshift{\pgfpointanchor{\tikzparentnode}{\tikz@growth@anchor}}%
+ \tikznumberofcurrentchild=0\relax%
+ \tikz@children@list%
+ \global\setbox\tikz@tempbox=\copy\tikz@figbox%
+ \endgroup%
+ \setbox\tikz@figbox=\box\tikz@tempbox%
+ \tikz@scan@next@command%
+}
+
+
+% Syntax for children:
+%
+% child [all children options] foreach \var in {values} [child options] {...}
+\def\tikz@childrennodes[#1]#2#3#4{%
+ \c@pgf@counta=\tikznumberofcurrentchild\relax%
+ \setbox\tikz@tempbox=\box\tikz@figbox%
+ \foreach#2in{#3}{%
+ \tikznumberofcurrentchild=\c@pgf@counta\relax%
+ \setbox\tikz@figbox=\box\tikz@tempbox%
+ \tikz@childnode[#1]{#4}%
+ % we must now make the current child number and the figbox survive
+ % the group
+ \global\c@pgf@counta=\tikznumberofcurrentchild\relax%
+ \global\setbox\tikz@tempbox=\box\tikz@figbox%
+ }%
+ \tikznumberofcurrentchild=\c@pgf@counta\relax%
+ \setbox\tikz@figbox=\box\tikz@tempbox%
+}
+
+
+% Syntax for child:
+%
+% child
+%
+% child[options]
+%
+% child[options] {node (name) {child node text} ...
+% edge from parent[options] node {label text} node {label text}}
+
+\def\tikz@childnode[#1]#2{%
+ \advance\tikznumberofcurrentchild by1\relax%
+ {\tikzset{every child/.try,#1}\expandafter}%
+ \iftikz@child@missing%
+ \else%
+ \setbox\tikz@figbox=\hbox\bgroup%
+ \unhbox\tikz@figbox%
+ \hbox\bgroup\bgroup%
+ \pgfinterruptpath%
+ \pgfscope%
+ \let\tikz@transform=\pgfutil@empty%
+ \tikzset{every child/.try,#1}%
+ \tikz@options%
+ \tikz@transform%
+ \tikz@grow%
+ % Typeset node:
+ \edef\tikz@parent@node@name{[name=\tikzparentnode-\the\tikznumberofcurrentchild,style=every child node]}%
+ \def\tikz@child@node@text{[shape=coordinate]{}}
+ \tikz@parse@child@node#2\pgf@stop%
+ \expandafter\expandafter\expandafter\node
+ \expandafter\tikz@parent@node@name
+ \tikz@child@node@text
+ \pgfextra{\global\let\tikz@childnode@name=\tikz@last@fig@name};%
+ \let\tikzchildnode=\tikz@childnode@name%
+ {%
+ \def\tikz@edge@to@parent@needed{edge from parent}
+ \ifx\tikz@child@node@rest\pgfutil@empty%
+ \path edge from parent;%
+ \else%
+ \path (0,0) \tikz@child@node@rest \tikz@edge@to@parent@needed;%
+ \fi%
+ }%
+ \endpgfscope%
+ \endpgfinterruptpath%
+ \egroup\egroup%
+ \egroup%
+ \fi%
+}
+
+\def\tikz@parse@child@node{%
+ \pgfutil@ifnextchar n{\tikz@parse@child@node@n}%
+ {\pgfutil@ifnextchar c{\tikz@parse@child@node@c}%
+ {\tikz@parse@child@node@rest}}}
+\def\tikz@parse@child@node@rest#1\pgf@stop{\def\tikz@child@node@rest{#1}}
+\def\tikz@parse@child@node@c c{\pgfutil@ifnextchar o{\tikz@parse@child@node@co}{\tikz@parse@child@node@rest c}}
+\def\tikz@parse@child@node@co o{\pgfutil@ifnextchar o{\tikz@parse@child@node@coordinate}{\tikz@parse@child@node@rest co}}
+\def\tikz@parse@child@node@coordinate ordinate{%
+ \pgfutil@ifnextchar ({\tikz@@parse@child@node@coordinate}{%
+ \def\tikz@child@node@text{[shape=coordinate]{}}%
+ \tikz@parse@child@node@rest}}%}
+\def\tikz@@parse@child@node@coordinate(#1){%
+ \pgfutil@ifnextchar a{\tikz@p@c@n@c@at(#1)}{%
+ \def\tikz@child@node@text{[shape=coordinate,name=#1]{}}%
+ \tikz@parse@child@node@rest}}
+\def\tikz@p@c@n@c@at(#1)at#2({%
+ \def\tikz@child@node@text@pre{[shape=coordinate,name=#1]at}%
+ \tikz@scan@one@point\tikz@p@c@n@c@at@math(%
+}
+\def\tikz@p@c@n@c@at@math#1{%
+ \pgf@process{#1}%
+ \edef\tikz@marshal{(\the\pgf@x,\the\pgf@y){}}%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\tikz@child@node@text%
+ \expandafter\expandafter\expandafter{\expandafter\tikz@child@node@text@pre\tikz@marshal}%
+ \tikz@parse@child@node@rest%
+}
+\def\tikz@parse@child@node@n node{%
+ \let\tikz@child@node@text=\pgfutil@empty%
+ \tikz@p@c@s}%
+\def\tikz@p@c@s{%
+ \pgfutil@ifnextchar a{\tikz@p@c@s@at}
+ {\pgfutil@ifnextchar ({\tikz@p@c@s@paran}
+ {\pgfutil@ifnextchar [{\tikz@p@c@s@bra}
+ {\pgfutil@ifnextchar \bgroup{\tikz@p@c@s@group}
+ {\PackageError{tikz}{Cannot parse this node}{}}}}}}%}}
+\def\tikz@p@c@s@at at#1({%
+ \tikz@scan@one@point\tikz@p@c@s@at@math(%
+}
+\def\tikz@p@c@s@at@math#1{%
+ \pgf@process{#1}%
+ \edef\tikz@marshal{ at(\the\pgf@x,\the\pgf@y)}%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\tikz@child@node@text%
+ \expandafter\expandafter\expandafter{\expandafter\tikz@child@node@text\tikz@marshal}
+ \tikz@p@c@s}
+\def\tikz@p@c@s@paran(#1){%
+ \expandafter\def\expandafter\tikz@child@node@text\expandafter{\tikz@child@node@text(#1)}
+ \tikz@p@c@s}
+\def\tikz@p@c@s@bra[#1]{%
+ \expandafter\def\expandafter\tikz@child@node@text\expandafter{\tikz@child@node@text[#1]}
+ \tikz@p@c@s}
+\def\tikz@p@c@s@group#1{%
+ \expandafter\def\expandafter\tikz@child@node@text\expandafter{\tikz@child@node@text{#1}}
+ \tikz@parse@child@node@rest}
+
+
+
+%
+% Syntax for decorated subpaths:
+%
+% decorate [option] { subpath }
+%
+\def\tikz@decoration ecorate{%
+ \pgfutil@ifnextchar[{\tikz@lib@decoration}{\tikz@lib@decoration[]}%]
+}
+
+\def\tikz@lib@decoration[#1]#2{\PackageError{tikz}{You need to load a decoration library}{}}
+
+% The decorate path command:
+\def\tikz@lib@dec@decorate@path{\PackageError{tikz}{You need to load a decoration library}{}}
+
+
+
+%
+% Syntax for let :
+%
+% let \p1 = (coordinate), \p2 = (coordinate),... in
+%
+\def\tikz@let@command et#1in{%
+ \PackageError{tikz}{You need to say \string\usetikzlibrary{calc} to use the let command}{}%
+}
+
+
+
+%
+% Timers
+%
+
+\def\tikz@timer@line{%
+ \pgftransformlineattime{\tikz@time}{\tikz@timer@start}{\tikz@timer@end}%
+}
+
+\def\tikz@timer@vhline{%
+ \ifdim\tikz@time pt<0.5pt% first half
+ \pgf@process{\tikz@timer@start}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\tikz@timer@end}%
+ \pgf@xb=\tikz@time pt%
+ \pgf@xb=2\pgf@xb%
+ \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}{\noexpand\tikz@timer@start}{%
+ \noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@y}}}%
+ \tikz@marshal%
+ \else% second half
+ \pgf@process{\tikz@timer@start}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\tikz@timer@end}%
+ \pgf@xb=\tikz@time pt%
+ \pgf@xb=2\pgf@xb%
+ \advance\pgf@xb by-1pt%
+ \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}%
+ {\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@y}}{\noexpand\tikz@timer@end}}%
+ \tikz@marshal%
+ \fi%
+}
+
+\def\tikz@timer@hvline{%
+ \ifdim\tikz@time pt<0.5pt% first half
+ \pgf@process{\tikz@timer@start}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\tikz@timer@end}%
+ \pgf@xb=\tikz@time pt%
+ \pgf@xb=2\pgf@xb%
+ \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}{\noexpand\tikz@timer@start}{%
+ \noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@ya}}}%
+ \tikz@marshal%
+ \else% second half
+ \pgf@process{\tikz@timer@start}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\tikz@timer@end}%
+ \pgf@xb=\tikz@time pt%
+ \pgf@xb=2\pgf@xb%
+ \advance\pgf@xb by-1pt%
+ \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}%
+ {\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@ya}}{\noexpand\tikz@timer@end}}%
+ \tikz@marshal%
+ \fi%
+}
+
+\def\tikz@timer@curve{%
+ \pgftransformcurveattime{\tikz@time}{\tikz@timer@start}{\tikz@timer@cont@one}{\tikz@timer@cont@two}{\tikz@timer@end}%
+}
+
+
+
+%
+% Coordinate systems
+%
+
+\def\tikzdeclarecoordinatesystem#1#2{%
+ \expandafter\def\csname tikz@parse@cs@#1\endcsname(##1){%
+ \pgf@process{%
+ #2%
+ \global\let\tikz@smubble@b=\tikz@shapeborder@name%
+ }%
+ \let\tikz@shapeborder@name=\tikz@smubble@b%
+ \edef\tikz@return@coordinate{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
+}
+\def\tikzaliascoordinatesystem#1#2{%
+ \edef\pgf@marshal{\noexpand\let\expandafter\noexpand\csname
+ tikz@parse@cs@#1\endcsname=\expandafter\noexpand\csname
+ tikz@parse@cs@#2\endcsname}%
+ \pgf@marshal%
+}
+
+
+% Default coodinate systems:
+
+\tikzdeclarecoordinatesystem{canvas}
+{%
+ \tikzset{cs/.cd,x=0pt,y=0pt,#1}%
+ \pgfpoint{\tikz@cs@x}{\tikz@cs@y}%
+}
+
+\tikzdeclarecoordinatesystem{canvas polar}
+{%
+ \tikzset{cs/.cd,angle=0,radius=0cm,#1}%
+ \pgfpointpolar{\tikz@cs@angle}{\tikz@cs@xradius and \tikz@cs@yradius}%
+}
+
+\tikzdeclarecoordinatesystem{xyz}
+{%
+ \tikzset{cs/.cd,x=0,y=0,z=0,#1}%
+ \pgfpointxyz{\tikz@cs@x}{\tikz@cs@y}{\tikz@cs@z}%
+}
+
+\tikzdeclarecoordinatesystem{xyz polar}
+{%
+ \tikzset{cs/.cd,angle=0,radius=0,#1}%
+ \pgfpointpolarxy{\tikz@cs@angle}{\tikz@cs@xradius and \tikz@cs@yradius}%
+}
+\tikzaliascoordinatesystem{xy polar}{xyz polar}
+
+
+\tikzdeclarecoordinatesystem{node}
+{%
+ \tikzset{cs/.cd,name=,anchor=none,angle=none,#1}%
+ \ifx\tikz@cs@anchor\tikz@nonetext%
+ \ifx\tikz@cs@angle\tikz@nonetext%
+ \expandafter\ifx\csname pgf@sh@ns@\tikz@cs@node\endcsname\tikz@coordinate@text%
+ \else
+ \aftergroup\tikz@shapebordertrue%
+ \edef\tikz@shapeborder@name{\tikz@cs@node}%
+ \fi%
+ \pgfpointanchor{\tikz@cs@node}{center}%
+ \else%
+ \pgfpointanchor{\tikz@cs@node}{\tikz@cs@angle}%
+ \fi%
+ \else%
+ \pgfpointanchor{\tikz@cs@node}{\tikz@cs@anchor}%
+ \fi%
+}
+
+% Intersection coordinates
+\tikzset{cs/first line/.code=\def\tikz@cs@line@a{#1}\def\tikz@cs@type@a{line}}
+\tikzset{cs/second line/.code=\def\tikz@cs@line@b{#1}\def\tikz@cs@type@b{line}}
+
+\tikzset{cs/first node/.code=\tikz@cs@unpack{\tikz@cs@node@a}{\tikz@cs@type@a}{#1}}
+\tikzset{cs/second node/.code=\tikz@cs@unpack{\tikz@cs@node@b}{\tikz@cs@type@b}{#1}}
+
+\def\tikz@cs@unpack#1#2#3{%
+ \expandafter\ifx\csname pgf@sh@ns@#3\endcsname\relax%
+ \PackageError{tikz}{Undefined node ``#3''}{}%
+ \else%
+ \def#1{#3}%
+ \edef#2{\csname pgf@sh@ns@#3\endcsname}%
+ \fi%
+}
+
+\tikzset{cs/solution/.initial=1}
+
+\tikzset{cs/horizontal line through/.store in=\tikz@cs@hori@line}
+\tikzset{cs/vertical line through/.store in=\tikz@cs@vert@line}
+
+\tikzdeclarecoordinatesystem{intersection}
+{%
+ \tikzset{cs/.cd,#1}%
+ \expandafter\ifx\csname tikz@intersect@\tikz@cs@type@a @and@\tikz@cs@type@b\endcsname\relax%
+ \PackageError{tikz}{I do not know how to compute the intersection
+ of a \tikz@cs@type@a and a \tikz@cs@type@b. Try saying
+ \string\usetikzlibrary{calc}}{}%
+ \pgfpointorigin%
+ \else%
+ \csname tikz@intersect@\tikz@cs@type@a @and@\tikz@cs@type@b\endcsname%
+ \fi%
+}
+
+\def\tikz@intersect@line@and@line{%
+ \expandafter\tikz@scan@one@point\expandafter\tikz@parse@line\tikz@cs@line@a%
+ \pgf@xa=\pgf@xc%
+ \pgf@ya=\pgf@yc%
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ \expandafter\tikz@scan@one@point\expandafter\tikz@parse@line\tikz@cs@line@b%
+ \edef\pgf@marshal{%
+ {\noexpand\pgfpointintersectionoflines%
+ {\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
+ {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}%
+ {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
+ {\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}}%
+ \pgf@marshal%
+}
+
+\def\tikz@parse@line#1--{%
+ \pgf@process{#1}%
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ \tikz@scan@one@point\pgf@process%
+}
+
+
+\tikzdeclarecoordinatesystem{perpendicular}
+{%
+ \tikzset{cs/.cd,#1}%
+ \expandafter\tikz@scan@one@point\expandafter\tikz@parse@intersection@a\tikz@cs@hori@line%
+ \expandafter\tikz@scan@one@point\expandafter\tikz@parse@intersection@b\tikz@cs@vert@line%
+ \pgfqpoint{\the\pgf@xb}{\the\pgf@ya}
+}
+
+\tikzdeclarecoordinatesystem{barycentric}
+{%
+ {%
+ \pgf@xa=0pt% point
+ \pgf@ya=0pt%
+ \pgf@xb=0pt% sum
+ \tikz@bary@dolist#1,=,%
+ \pgfmathparse{1/\the\pgf@xb}%
+ \global\pgf@x=\pgfmathresult\pgf@xa%
+ \global\pgf@y=\pgfmathresult\pgf@ya%
+ }%
+}
+
+\def\tikz@bary@dolist#1=#2,{%
+ \def\tikz@temp{#1}%
+ \ifx\tikz@temp\pgfutil@empty%
+ \else
+ \pgf@process{\pgfpointanchor{#1}{center}}%
+ \pgfmathparse{#2}%
+ \advance\pgf@xa by\pgfmathresult\pgf@x%
+ \advance\pgf@ya by\pgfmathresult\pgf@y%
+ \advance\pgf@xb by\pgfmathresult pt%
+ \expandafter\tikz@bary@dolist%
+ \fi%
+}
+
+\tikzset{cs/x/.store in=\tikz@cs@x}
+\tikzset{cs/y/.store in=\tikz@cs@y}
+\tikzset{cs/z/.store in=\tikz@cs@z}
+\tikzset{cs/angle/.store in=\tikz@cs@angle}
+\tikzset{cs/x radius/.store in=\tikz@cs@xradius}
+\tikzset{cs/y radius/.store in=\tikz@cs@yradius}
+\tikzset{cs/radius/.style={/tikz/cs/x radius=#1,/tikz/cs/y radius=#1}}
+\tikzset{cs/name/.store in=\tikz@cs@node}
+\tikzset{cs/anchor/.store in=\tikz@cs@anchor}
+
+
+
+
+
+%
+% Coordinate management
+%
+
+
+% Last position visited
+\def\tikz@last@position{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}
+\def\tikz@last@position@saved{\pgfqpoint{\tikz@lastxsaved}{\tikz@lastysaved}}
+
+% Make given point the last position visited
+\def\tikz@make@last@position#1{%
+ \pgf@process{#1}%
+ \tikz@lastx=\pgf@x\relax%
+ \tikz@lasty=\pgf@y\relax%
+ \iftikz@updatecurrent%
+ \tikz@lastxsaved=\pgf@x\relax%
+ \tikz@lastysaved=\pgf@y\relax%
+ \fi%
+ \tikz@updatecurrenttrue%
+}
+
+\newif\iftikz@updatecurrent
+\tikz@updatecurrenttrue
+
+
+
+% Scanner: Scans a point or a relative point.
+% It then calls the first parameter with the argument set to an
+% appropriate pgf command representing that point.
+
+\def\tikz@scan@one@point#1{%
+ \let\tikz@to@use@whom=\tikz@to@use@last@coordinate%
+ \tikz@shapeborderfalse%
+ \pgfutil@ifnextchar+{\tikz@scan@relative#1}{\tikz@scan@absolute#1}}
+\def\tikz@scan@absolute#1{%
+ \pgfutil@ifnextchar({\tikz@scan@@absolute#1}%)
+ {%
+ \advance\tikz@expandcount by -1%
+ \ifnum\tikz@expandcount<0\relax%
+ \let\@next=\tikz@@scangiveup%
+ \else%
+ \let\@next=\tikz@@scanexpand%
+ \fi%
+ \@next{#1}%
+ }%
+}
+\def\tikz@@scanexpand#1{\expandafter\tikz@scan@one@point\expandafter#1}
+\def\tikz@@scangiveup#1{\PackageError{tikz}{Cannot parse this coordinate}{}#1{\pgfpointorigin}}
+\def\tikz@scan@@absolute#1({%
+ \pgfutil@ifnextchar[% uhoh... options!
+ {\def\tikz@scan@point@recall{#1}\tikz@scan@options}%
+ {\tikz@@@scan@@absolute#1(}%
+}
+
+\def\tikz@scan@options[#1]#2{%
+ \def\tikz@scan@point@options{#1}%
+ \tikz@@@scan@@absolute\tikz@scan@handle@options(#2%
+}
+
+\def\tikz@scan@handle@options#1{%
+ {%
+ % Ok, compute point with options set and zero transformation
+ % matrix:
+ \pgftransformreset%
+ \let\tikz@transform=\pgfutil@empty%
+ \expandafter\tikzset\expandafter{\tikz@scan@point@options}%
+ \tikz@transform%
+ \pgf@process{\pgfpointtransformed{#1}}%
+ \xdef\tikz@marshal{\expandafter\noexpand\tikz@scan@point@recall{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
+ }%
+ \tikz@marshal%
+}
+
+\def\tikz@@@scan@@absolute#1({%
+ \pgfutil@ifnextchar{$}%$
+ {\tikz@parse@calculator#1(}
+ {\tikz@scan@no@calculator#1(}%
+}
+\def\tikz@scan@no@calculator#1(#2){%
+ \edef\tikz@temp{(#2)}%
+ \expandafter\tikz@@scan@@no@calculator\expandafter#1\tikz@temp%
+}
+\def\tikz@@scan@@no@calculator#1(#2){%
+ \pgfutil@in@{cs:}{#2}%
+ \ifpgfutil@in@%
+ \let\@next\tikz@parse@coordinatesystem%
+ \else%
+ \pgfutil@in@{intersection }{#2}%
+ \ifpgfutil@in@%
+ \let\@next\tikz@parse@intersection%
+ \else%
+ \pgfutil@in@|{#2}%
+ \ifpgfutil@in@
+ \pgfutil@in@{-|}{#2}%
+ \ifpgfutil@in@
+ \let\@next\tikz@parse@hv%
+ \else%
+ \let\@next\tikz@parse@vh%
+ \fi%
+ \else%
+ \pgfutil@in@:{#2}%
+ \ifpgfutil@in@
+ \let\@next\tikz@parse@polar%
+ \else%
+ \pgfutil@in@,{#2}%
+ \ifpgfutil@in@%
+ \let\@next\tikz@parse@regular%
+ \else%
+ \let\@next\tikz@parse@node%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \@next#1(#2)%
+}
+
+\def\tikz@parse@calculator#1($#2$){%
+ \PackageError{tikz}{You need to say \string\usetikzlibrary{calc} for
+ coordinate calculation}{}%
+ #1{\pgfpointorigin}%
+}
+
+\def\tikz@parse@coordinatesystem#1(#2 cs:#3){%
+ \let\tikz@return@coordinate=\pgfpointorigin%
+ \pgfutil@ifundefined{tikz@parse@cs@#2}
+ {\PackageError{tikz}{Unknown coordinate system '#2'}{}}
+ {\csname tikz@parse@cs@#2\endcsname(#3)}%
+ \expandafter#1\expandafter{\tikz@return@coordinate}%
+}
+
+
+\newif\iftikz@isdimension
+\def\tikz@checkunit#1{%
+ \pgfmathparse{#1}%
+ \let\iftikz@isdimension=\ifpgfmathunitsdeclared%
+}
+
+\def\tikz@parse@polar#1(#2:#3){%
+ \pgfutil@ifundefined{tikz@polar@dir@#2}
+ {\tikz@@parse@polar#1(#2:#3)}
+ {\tikz@@parse@polar#1(\csname tikz@polar@dir@#2\endcsname:#3)}%
+}
+\def\tikz@@parse@polar#1(#2:#3){%
+ \pgfutil@in@{ and }{#3}%
+ \ifpgfutil@in@%
+ \edef\tikz@args{(#2:#3)}%
+ \else%
+ \edef\tikz@args{(#2:#3 and #3)}%
+ \fi%
+ \expandafter\tikz@@@parse@polar\expandafter#1\tikz@args%
+}
+\def\tikz@@@parse@polar#1(#2:#3 and #4){%
+ \tikz@checkunit{#3}%
+ \iftikz@isdimension%
+ \tikz@checkunit{#4}%
+ \iftikz@isdimension%
+ \def\tikz@next{#1{\pgfpointpolar{#2}{#3 and #4}}}%
+ \else%
+ \PackageError{tikz}{You cannot mix dimension and dimensionless values for polar coordinates}{}
+ \def\tikz@next{#1{\pgfpointorigin}}%
+ \fi%
+ \else%
+ \tikz@checkunit{#4}%
+ \iftikz@isdimension%
+ \PackageError{tikz}{You cannot mix dimension and dimensionless values for polar coordinates}{}
+ \def\tikz@next{#1{\pgfpointorigin}}%
+ \else%
+ \def\tikz@next{#1{\pgfpointpolarxy{#2}{#3 and #4}}}%
+ \fi%
+ \fi%
+ \tikz@next%
+}
+\def\tikz@polar@dir@up{90}
+\def\tikz@polar@dir@down{-90}
+\def\tikz@polar@dir@left{180}
+\def\tikz@polar@dir@right{0}
+\def\tikz@polar@dir@north{90}
+\def\tikz@polar@dir@south{-90}
+\def\tikz@polar@dir@east{0}
+\def\tikz@polar@dir@west{180}
+\expandafter\def\csname tikz@polar@dir@north east\endcsname{45}
+\expandafter\def\csname tikz@polar@dir@north west\endcsname{135}
+\expandafter\def\csname tikz@polar@dir@south east\endcsname{-45}
+\expandafter\def\csname tikz@polar@dir@south west\endcsname{-135}
+
+
+% MW:
+% Check to see if the y-coordinate is inside {}. If it is, scan it and
+% reinsert it into the stream inside an extra group.
+%
+\def\tikz@parse@regular#1(#2,{%
+ \pgfutil@ifnextchar\bgroup{\tikz@@parse@regular#1{#2}}{\tikz@@@parse@regular#1{#2}}%
+}
+\def\tikz@@parse@regular#1#2#3{\tikz@@@parse@regular#1{#2}{{#3}}}%
+
+
+% Originally \def\tikz@parse@regular#1(#2,#3){%
+%
+\def\tikz@@@parse@regular#1#2#3){%
+ \pgfutil@in@,{#3}%
+ \ifpgfutil@in@%
+ \tikz@parse@splitxyz{#1}{#2}#3,%
+ \else%
+ \tikz@checkunit{#2}%
+ \iftikz@isdimension%
+ \tikz@checkunit{#3}%
+ \iftikz@isdimension%
+ \def\@next{#1{\pgfpoint{#2}{#3}}}%
+ \else%
+ \def\@next{#1{\pgfpointadd{\pgfpoint{#2}{0pt}}{\pgfpointxy{0}{#3}}}}%
+ \fi%
+ \else%
+ \tikz@checkunit{#3}%
+ \iftikz@isdimension%
+ \def\@next{#1{\pgfpointadd{\pgfpoint{0pt}{#3}}{\pgfpointxy{#2}{0}}}}%
+ \else%
+ \def\@next{#1{\pgfpointxy{#2}{#3}}}%
+ \fi%
+ \fi%
+ \fi%
+ \@next%
+}
+
+\def\tikz@parse@splitxyz#1#2#3,#4,{%
+ \def\@next{#1{\pgfpointxyz{#2}{#3}{#4}}}%
+}
+
+\def\tikz@coordinate@text{coordinate}
+
+\def\tikz@parse@node#1(#2){%
+ \pgfutil@in@.{#2}% Ok, flag this
+ \ifpgfutil@in@
+ \tikz@calc@anchor#2\tikz@stop%
+ \else%
+ \tikz@calc@anchor#2.center\tikz@stop% to be on the save side, in
+ % case iftikz@shapeborder is ignored...
+ \expandafter\ifx\csname pgf@sh@ns@#2\endcsname\tikz@coordinate@text%
+ \else
+ \tikz@shapebordertrue%
+ \def\tikz@shapeborder@name{#2}%
+ \fi%
+ \fi%
+ \edef\tikz@marshal{\noexpand#1{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
+ \tikz@marshal%
+}
+
+\def\tikz@calc@anchor#1.#2\tikz@stop{%
+ \pgfpointanchor{#1}{#2}%
+}
+
+
+\def\tikz@parse@hv#1(#2){%
+ \pgfutil@in@{ -| }{#2}%
+ \ifpgfutil@in@%
+ \let\tikz@next=\tikz@parse@hvboth%
+ \else%
+ \pgfutil@in@{ -|}{#2}%
+ \ifpgfutil@in@%
+ \let\tikz@next=\tikz@parse@hvleft%
+ \else%
+ \pgfutil@in@{-| }{#2}%
+ \ifpgfutil@in@%
+ \let\tikz@next=\tikz@parse@hvright%
+ \else%
+ \let\tikz@next=\tikz@parse@hvdone%
+ \fi%
+ \fi%
+ \fi%
+ \tikz@next#1(#2)}
+\def\tikz@parse@hvboth#1(#2 -| #3){\tikz@parse@vhdone#1(#3|-#2)}
+\def\tikz@parse@hvleft#1(#2 -|#3){\tikz@parse@vhdone#1(#3|-#2)}
+\def\tikz@parse@hvright#1(#2-| #3){\tikz@parse@vhdone#1(#3|-#2)}
+\def\tikz@parse@hvdone#1(#2-|#3){\tikz@parse@vhdone#1(#3|-#2)}
+
+\def\tikz@parse@vh#1(#2){%
+ \pgfutil@in@{ |- }{#2}%
+ \ifpgfutil@in@%
+ \let\tikz@next=\tikz@parse@vhboth%
+ \else%
+ \pgfutil@in@{ |-}{#2}%
+ \ifpgfutil@in@%
+ \let\tikz@next=\tikz@parse@vhleft%
+ \else%
+ \pgfutil@in@{|- }{#2}%
+ \ifpgfutil@in@%
+ \let\tikz@next=\tikz@parse@vhright%
+ \else%
+ \let\tikz@next=\tikz@parse@vhdone%
+ \fi%
+ \fi%
+ \fi%
+ \tikz@next#1(#2)}
+\def\tikz@parse@vhboth#1(#2 |- #3){\tikz@parse@vhdone#1(#2|-#3)}
+\def\tikz@parse@vhleft#1(#2 |-#3){\tikz@parse@vhdone#1(#2|-#3)}
+\def\tikz@parse@vhright#1(#2|- #3){\tikz@parse@vhdone#1(#2|-#3)}
+\def\tikz@parse@vhdone#1(#2|-#3){%
+ {%
+ \tikz@@@scan@@absolute\tikz@parse@vh@mid(#2)%
+ \tikz@@@scan@@absolute\tikz@parse@vh@end(#3)%
+ \xdef\tikz@marshal{\noexpand#1{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}}%
+ }%
+ \tikz@marshal%
+}
+\def\tikz@parse@vh@mid#1{\pgf@process{#1}\pgf@xa=\pgf@x}
+\def\tikz@parse@vh@end#1{\pgf@process{#1}\pgf@ya=\pgf@y}
+
+\def\tikz@parse@intersection#1(intersection{%
+ \pgfutil@ifnextchar o{%
+ \tikz@parse@main@intersection#1 1%
+ }{%
+ \tikz@parse@main@intersection#1%
+ }%
+}
+\def\tikz@parse@main@intersection#1#2of #3 and #4){%
+ \tikzset{cs/solution=#2}%
+ \pgfutil@in@{--}{#3}%
+ \ifpgfutil@in@%
+ \tikz@reparse@line{first}#3\pgf@stop%
+ \else%
+ \tikzset{cs/first node=#3}%
+ \fi%
+ \pgfutil@in@{--}{#4}%
+ \ifpgfutil@in@%
+ \tikz@reparse@line{second}#4\pgf@stop%
+ \else%
+ \tikzset{cs/second node=#4}%
+ \fi%
+ \tikz@parse@cs@intersection()% advanced hackery...
+ \edef\pgf@marshal{\noexpand#1{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
+ \pgf@marshal%
+}
+\def\tikz@reparse@line#1#2--#3\pgf@stop{%
+ \tikzset{cs/#1 line={(#2)--(#3)}}%
+}
+
+
+\def\tikz@parse@intersection@a#1{\pgf@process{#1}\pgf@xa=\pgf@x\pgf@ya=\pgf@y}
+\def\tikz@parse@intersection@b#1{\pgf@process{#1}\pgf@xb=\pgf@x\pgf@yb=\pgf@y}
+
+\def\tikz@scan@relative#1+{%
+ \pgfutil@ifnextchar+{\tikz@scan@plusplus#1}{\tikz@scan@oneplus#1}}
+
+\def\tikz@scan@plusplus#1+{%
+ \def\tikz@doafter{#1}%
+ \tikz@scan@absolute\tikz@add%
+}
+\def\tikz@add#1{%
+ \tikz@doafter{\pgfpointadd{#1}{\tikz@last@position@saved}}%
+}
+\def\tikz@scan@oneplus#1{%
+ \def\tikz@doafter{#1}%
+ \tikz@updatecurrentfalse%
+ \tikz@scan@absolute\tikz@add%
+}
+
+
+
+% Loading further libraries
+
+% Include a library file.
+%
+% #1 = List of names of library file.
+%
+% Description:
+%
+% This command includes a list of TikZ library files. For each file X in the
+% list, the file tikzlibraryX.code.tex is included, provided this has
+% not been done earlier.
+%
+% For the convenience of Context users, both round and square brackets
+% are possible for the argument.
+%
+% Example:
+%
+% \usetikzlibrary{arrows}
+% \usetikzlibrary[patterns,topaths]
+
+\def\usetikzlibrary{\pgfutil@ifnextchar[{\use@tikzlibrary}{\use@@tikzlibrary}}%}
+\def\use@tikzlibrary[#1]{\use@@tikzlibrary{#1}}
+\def\use@@tikzlibrary#1{%
+ \edef\pgf@list{#1}%
+ \pgfutil@for\pgf@temp:=\pgf@list\do{%
+ \expandafter\ifx\csname tikz@library@\pgf@temp @loaded\endcsname\relax%
+ \expandafter\global\expandafter\let\csname tikz@library@\pgf@temp @loaded\endcsname=\pgfutil@empty%
+ \expandafter\edef\csname tikz@library@#1@atcode\endcsname{\the\catcode`\@}
+ \expandafter\edef\csname tikz@library@#1@barcode\endcsname{\the\catcode`\|}
+ \catcode`\@=11
+ \catcode`\|=12
+ \input tikzlibrary\pgf@temp.code.tex
+ \catcode`\@=\csname tikz@library@#1@atcode\endcsname
+ \catcode`\|=\csname tikz@library@#1@barcode\endcsname
+ \fi%
+ }%
+}
+
+
+% Always-present libraries:
+
+\usetikzlibrary{topaths}
+
+
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex
deleted file mode 100644
index 9de07884dd5..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex
+++ /dev/null
@@ -1,842 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryarrows.code.tex,v 1.7 2007/06/07 07:41:11 tantau Exp $
-
-
-% A square bracket shaped arrow
-
-\pgfarrowsdeclare{[}{]}
-{
- \pgfutil@tempdima=1pt%
- \advance\pgfutil@tempdima by1.25\pgflinewidth%
- \pgfarrowsleftextend{+-\pgfutil@tempdima}
- \pgfarrowsrightextend{+.5\pgflinewidth}
-}
-{
- \pgfutil@tempdima=2pt%
- \advance\pgfutil@tempdima by1.5\pgflinewidth%
- \pgfutil@tempdimb=\pgfutil@tempdima%
- \advance\pgfutil@tempdimb by\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetmiterjoin
- \pgfsetbuttcap
- \pgfpathmoveto{\pgfqpoint{-.5\pgfutil@tempdimb}{-1\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{0pt}{-1\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{0pt}{\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{-.5\pgfutil@tempdimb}{\pgfutil@tempdima}}
- \pgfusepathqstroke
-}
-
-\pgfarrowsdeclarereversed{]}{[}{[}{]}
-
-
-% A round bracket shaped arrow
-
-\pgfarrowsdeclare{(}{)}
-{
- \pgfutil@tempdima=2pt%
- \advance\pgfutil@tempdima by1.5\pgflinewidth%
- \pgfutil@tempdimb=0.0625\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
- \pgfutil@tempdimb=0.5\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth%
- \pgfarrowsleftextend{+-\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=2pt%
- \advance\pgfutil@tempdima by1.5\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetroundcap
- \pgfpathmoveto{\pgfqpoint{-.5\pgfutil@tempdima}{-1\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{.25\pgfutil@tempdima}{-.5\pgfutil@tempdima}}
- {\pgfqpoint{.25\pgfutil@tempdima}{.5\pgfutil@tempdima}}
- {\pgfqpoint{-.5\pgfutil@tempdima}{\pgfutil@tempdima}}
- \pgfusepathqstroke
-}
-
-\pgfarrowsdeclarereversed{)}{(}{(}{)}
-
-
-
-
-% A pointed bracket shaped arrow
-
-\pgfarrowsdeclare{angle 90}{angle 90}
-{
- \pgfutil@tempdima=0.3pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfutil@tempdimb=5.5\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth%
- \pgfarrowsleftextend{+-\pgfutil@tempdimb}
- \pgfutil@tempdimb=.5\pgfutil@tempdima\advance\pgfutil@tempdimb by0.707\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.3pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetroundcap
- \pgfsetmiterjoin
- \pgfpathmoveto{\pgfqpoint{-5.5\pgfutil@tempdima}{-6\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{0.5\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{-5.5\pgfutil@tempdima}{6\pgfutil@tempdima}}
- \pgfusepathqstroke
-}
-
-\pgfarrowsdeclarereversed{angle 90 reversed}{angle 90 reversed}{angle 90}{angle 90}
-
-
-\pgfarrowsdeclare{angle 60}{angle 60}
-{
- \pgfutil@tempdima=0.3pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfutil@tempdimb=7.29\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth%
- \pgfarrowsleftextend{+-\pgfutil@tempdimb}
- \pgfutil@tempdimb=.5\pgfutil@tempdima\advance\pgfutil@tempdimb by\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.3pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetroundcap
- \pgfsetmiterjoin
- \pgfpathmoveto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{150}{9\pgfutil@tempdima}}}
- \pgfpathlineto{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}
- \pgfpathlineto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-150}{9\pgfutil@tempdima}}}
- \pgfusepathqstroke
-}
-
-\pgfarrowsdeclarereversed{angle 60 reversed}{angle 60 reversed}{angle 60}{angle 60}
-
-
-
-\pgfarrowsdeclare{angle 45}{angle 45}
-{
- \pgfutil@tempdima=0.3pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfutil@tempdimb=8.705\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth%
- \pgfarrowsleftextend{+-\pgfutil@tempdimb}
- \pgfutil@tempdimb=.5\pgfutil@tempdima\advance\pgfutil@tempdimb by1.28\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.3pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetroundcap
- \pgfsetmiterjoin
- \pgfpathmoveto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{157}{10\pgfutil@tempdima}}}
- \pgfpathlineto{\pgfqpoint{0.5\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-157}{10\pgfutil@tempdima}}}
- \pgfusepathqstroke
-}
-
-\pgfarrowsdeclarereversed{angle 45 reversed}{angle 45 reversed}{angle 45}{angle 45}
-
-
-
-% A dot shaped arrow
-
-\pgfarrowsdeclare{*}{*}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.2\pgflinewidth%
- \pgfutil@tempdimb=5.5\pgfutil@tempdima\advance\pgfutil@tempdimb by\pgflinewidth
- \pgfarrowsleftextend{+-\pgfutil@tempdimb}
- \pgfutil@tempdimb=1.5\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.2\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfpathcircle{\pgfqpoint{-3\pgfutil@tempdima}{0pt}}{+4.5\pgfutil@tempdima}
- \pgfusepathqfillstroke
-}
-
-
-% An open dot shaped arrow
-
-\pgfarrowsdeclare{o}{o}
-{
- \pgfarrowsleftextend{+-.5\pgflinewidth}
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.2\pgflinewidth%
- \pgfutil@tempdimb=9\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.2\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfpathcircle{\pgfqpoint{4.5\pgfutil@tempdima}{0bp}}{4.5\pgfutil@tempdima}
- \pgfusepathqstroke
-}
-
-
-
-% A diamond shaped arrow
-
-\pgfarrowsdeclare{diamond}{diamond}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.275\pgflinewidth%
- \pgfutil@tempdimb=13\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth
- \pgfarrowsleftextend{+-\pgfutil@tempdimb}
- \pgfutil@tempdimb=1\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.275\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetroundjoin
- \pgfpathmoveto{\pgfqpoint{1\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{-6\pgfutil@tempdima}{4\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{-13\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{-6\pgfutil@tempdima}{-4\pgfutil@tempdima}}
- \pgfpathclose
- \pgfusepathqfillstroke
-}
-
-\pgfarrowsdeclare{open diamond}{open diamond}%{{-.5bp}{14.5bp}}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.275\pgflinewidth%
- \pgfarrowsleftextend{+-.5\pgflinewidth}
- \pgfutil@tempdimb=14\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.275\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetroundjoin
- \pgfpathmoveto{\pgfqpoint{14\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{7\pgfutil@tempdima}{4\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{7\pgfutil@tempdima}{-4\pgfutil@tempdima}}
- \pgfpathclose
- \pgfusepathqstroke
-}
-
-
-
-% A triangle shaped arrow
-
-\pgfarrowsdeclare{triangle 90}{triangle 90}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfutil@tempdimb=5.5\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth%
- \pgfarrowsleftextend{+-\pgfutil@tempdimb}
- \pgfutil@tempdimb=.5\pgfutil@tempdima\advance\pgfutil@tempdimb by0.707\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetmiterjoin
- \pgfpathmoveto{\pgfqpoint{-5.5\pgfutil@tempdima}{-6\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{0.5\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{-5.5\pgfutil@tempdima}{6\pgfutil@tempdima}}
- \pgfpathclose
- \pgfusepathqfillstroke
-}
-
-\pgfarrowsdeclarereversed{triangle 90 reversed}{triangle 90 reversed}{triangle 90}{triangle 90}
-
-
-\pgfarrowsdeclare{triangle 60}{triangle 60}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfutil@tempdimb=7.29\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth%
- \pgfarrowsleftextend{+-\pgfutil@tempdimb}
- \pgfutil@tempdimb=.5\pgfutil@tempdima\advance\pgfutil@tempdimb by\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetmiterjoin
- \pgfpathmoveto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{150}{9\pgfutil@tempdima}}}
- \pgfpathlineto{\pgfqpoint{0.5\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-150}{9\pgfutil@tempdima}}}
- \pgfpathclose
- \pgfusepathqfillstroke
-}
-
-\pgfarrowsdeclarereversed{triangle 60 reversed}{triangle 60 reversed}{triangle 60}{triangle 60}
-
-
-
-
-\pgfarrowsdeclare{triangle 45}{triangle 45}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfutil@tempdimb=8.705\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth%
- \pgfarrowsleftextend{+-\pgfutil@tempdimb}
- \pgfutil@tempdimb=.5\pgfutil@tempdima\advance\pgfutil@tempdimb by1.28\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetmiterjoin
- \pgfpathmoveto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{157}{10\pgfutil@tempdima}}}
- \pgfpathlineto{\pgfqpoint{0.5\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-157}{10\pgfutil@tempdima}}}
- \pgfpathclose
- \pgfusepathqfillstroke
-}
-
-\pgfarrowsdeclarereversed{triangle 45 reversed}{triangle 45 reversed}{triangle 45}{triangle 45}
-
-
-
-
-\pgfarrowsdeclare{open triangle 90}{open triangle 90}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfarrowsleftextend{+-.5\pgflinewidth}
- \pgfutil@tempdimb=6\pgfutil@tempdima\advance\pgfutil@tempdimb by0.707\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetmiterjoin
- \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{-6\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{6\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{0\pgfutil@tempdima}{6\pgfutil@tempdima}}
- \pgfpathclose
- \pgfusepathqstroke
-}
-
-\pgfarrowsdeclare{open triangle 90 reversed}{open triangle 90 reversed}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfarrowsleftextend{+-.707\pgflinewidth}
- \pgfutil@tempdimb=6\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetmiterjoin
- \pgfpathmoveto{\pgfqpoint{6\pgfutil@tempdima}{-6\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{6\pgfutil@tempdima}{6\pgfutil@tempdima}}
- \pgfpathclose
- \pgfusepathqstroke
-}
-
-
-
-\pgfarrowsdeclare{open triangle 60}{open triangle 60}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfarrowsleftextend{+-.5\pgflinewidth}
- \pgfutil@tempdimb=7.794\pgfutil@tempdima\advance\pgfutil@tempdimb by\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetmiterjoin
- \pgfpathmoveto{\pgfpointadd{\pgfqpoint{7.794\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{150}{9\pgfutil@tempdima}}}
- \pgfpathlineto{\pgfqpoint{7.794\pgfutil@tempdima}{0pt}}
- \pgfpathlineto{\pgfpointadd{\pgfqpoint{7.794\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-150}{9\pgfutil@tempdima}}}
- \pgfpathclose
- \pgfusepathqstroke
-}
-
-
-
-\pgfarrowsdeclare{open triangle 60 reversed}{open triangle 60 reversed}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfarrowsleftextend{+-\pgflinewidth}
- \pgfutil@tempdimb=7.794\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetmiterjoin
- \pgfpathmoveto{\pgfqpointpolar{30}{9\pgfutil@tempdima}}
- \pgfpathlineto{\pgfpointorigin}
- \pgfpathlineto{\pgfqpointpolar{-30}{9\pgfutil@tempdima}}
- \pgfpathclose
- \pgfusepathqstroke
-}
-
-
-
-\pgfarrowsdeclare{open triangle 45}{open triangle 45}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfarrowsleftextend{+-.5\pgflinewidth}
- \pgfutil@tempdimb=9.205\pgfutil@tempdima\advance\pgfutil@tempdimb by1.28\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetmiterjoin
- \pgfpathmoveto{\pgfpointadd{\pgfqpoint{9.205\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{157}{10\pgfutil@tempdima}}}
- \pgfpathlineto{\pgfqpoint{9.205\pgfutil@tempdima}{0pt}}
- \pgfpathlineto{\pgfpointadd{\pgfqpoint{9.205\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-157}{10\pgfutil@tempdima}}}
- \pgfpathclose
- \pgfusepathqstroke
-}
-
-
-
-\pgfarrowsdeclare{open triangle 45 reversed}{open triangle 45 reversed}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfarrowsleftextend{+-1.28\pgflinewidth}
- \pgfutil@tempdimb=9.205\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.5pt%
- \advance\pgfutil@tempdima by.25\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetmiterjoin
- \pgfpathmoveto{\pgfqpointpolar{23}{10\pgfutil@tempdima}}
- \pgfpathlineto{\pgfpointorigin}
- \pgfpathlineto{\pgfqpointpolar{-23}{10\pgfutil@tempdima}}
- \pgfpathclose
- \pgfusepathqstroke
-}
-
-
-
-% A less fleshy variant of LaTeX's orginal arrow type
-
-\pgfarrowsdeclare{latex'}{latex'}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfarrowsleftextend{+-4\pgfutil@tempdima}
- \pgfarrowsrightextend{+6\pgfutil@tempdima}
-}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfpathmoveto{\pgfqpoint{6\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{3.5\pgfutil@tempdima}{.5\pgfutil@tempdima}}
- {\pgfqpoint{-1\pgfutil@tempdima}{1.5\pgfutil@tempdima}}
- {\pgfqpoint{-4\pgfutil@tempdima}{3.75\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{-1.5\pgfutil@tempdima}{1\pgfutil@tempdima}}
- {\pgfqpoint{-1.5\pgfutil@tempdima}{-1\pgfutil@tempdima}}
- {\pgfqpoint{-4\pgfutil@tempdima}{-3.75\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{-1\pgfutil@tempdima}{-1.5\pgfutil@tempdima}}
- {\pgfqpoint{3.5\pgfutil@tempdima}{-.5\pgfutil@tempdima}}
- {\pgfqpoint{6\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfusepathqfill
-}
-
-\pgfarrowsdeclarereversed{latex' reversed}{latex' reversed}{latex'}{latex'}
-
-
-% A rounded variant of the stealth arrow
-
-\pgfarrowsdeclare{stealth'}{stealth'}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfutil@tempdimb=6\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth%
- \pgfarrowsleftextend{+-\pgfutil@tempdimb}
- \pgfutil@tempdimb=2\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetroundjoin
- \pgfpathmoveto{\pgfqpoint{2\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{-.5\pgfutil@tempdima}{.5\pgfutil@tempdima}}
- {\pgfqpoint{-3\pgfutil@tempdima}{1.5\pgfutil@tempdima}}
- {\pgfqpoint{-6\pgfutil@tempdima}{3.25\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{-3\pgfutil@tempdima}{1\pgfutil@tempdima}}
- {\pgfqpoint{-3\pgfutil@tempdima}{-1\pgfutil@tempdima}}
- {\pgfqpoint{-6\pgfutil@tempdima}{-3.25\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{-3\pgfutil@tempdima}{-1.5\pgfutil@tempdima}}
- {\pgfqpoint{-.5\pgfutil@tempdima}{-.5\pgfutil@tempdima}}
- {\pgfqpoint{2\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathclose
- \pgfusepathqfillstroke
-}
-
-\pgfarrowsdeclarereversed{stealth' reversed}{stealth' reversed}{stealth'}{stealth'}
-
-
-
-% The two half of the $\to$ arrow
-
-\pgfarrowsdeclare{left to}{left to}
-{
- \pgfutil@tempdima=-0.84pt%
- \advance\pgfutil@tempdima by-1.3\pgflinewidth%
- \pgfutil@tempdimb=0.21pt%
- \advance\pgfutil@tempdimb by.625\pgflinewidth%
- \pgfarrowsleftextend{+\pgfutil@tempdima}
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfsetlinewidth{0.8\pgflinewidth}
- \pgfsetdash{}{+0pt}
- \pgfsetroundcap
- \pgfsetroundjoin
- \pgfpathmoveto{\pgfqpoint{-3\pgfutil@tempdima}{4\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{-2.75\pgfutil@tempdima}{2.5\pgfutil@tempdima}}
- {\pgfqpoint{0pt}{0.25\pgfutil@tempdima}}
- {\pgfqpoint{0.75\pgfutil@tempdima}{0pt}}
- \pgfpathcurveto
- {\pgfqpoint{0.55\pgfutil@tempdima}{-0.125\pgflinewidth}}
- {\pgfqpoint{0.5\pgfutil@tempdima}{-0.125\pgflinewidth}}
- {\pgfqpoint{0.5\pgfutil@tempdima}{-0.125\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{0pt}{-0.125\pgflinewidth}}
- \pgfusepathqstroke
-}
-
-
-\pgfarrowsdeclare{right to}{right to}
-{
- \pgfutil@tempdima=-0.84pt%
- \advance\pgfutil@tempdima by-1.3\pgflinewidth%
- \pgfutil@tempdimb=0.21pt%
- \advance\pgfutil@tempdimb by.625\pgflinewidth%
- \pgfarrowsleftextend{+\pgfutil@tempdima}
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfsetlinewidth{0.8\pgflinewidth}
- \pgfsetdash{}{+0pt}
- \pgfsetroundcap
- \pgfsetroundjoin
- \pgfpathmoveto{\pgfqpoint{-3\pgfutil@tempdima}{-4\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{-2.75\pgfutil@tempdima}{-2.5\pgfutil@tempdima}}
- {\pgfqpoint{0pt}{-0.25\pgfutil@tempdima}}
- {\pgfqpoint{0.75\pgfutil@tempdima}{0pt}}
- \pgfpathcurveto
- {\pgfqpoint{0.55\pgfutil@tempdima}{0.125\pgflinewidth}}
- {\pgfqpoint{0.5\pgfutil@tempdima}{0.125\pgflinewidth}}
- {\pgfqpoint{0.5\pgfutil@tempdima}{0.125\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{0pt}{0.125\pgflinewidth}}
- \pgfusepathqstroke
-}
-
-
-
-% The halfs of the $\to$ arrow reversed
-
-\pgfarrowsdeclare{left to reversed}{left to reversed}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfarrowsleftextend{+-.1\pgflinewidth}
- \pgfutil@tempdimb=3.75\pgfutil@tempdima\advance\pgfutil@tempdimb by0.9\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetroundjoin
- \pgfsetbuttcap
- \pgfpathmoveto{\pgfqpoint{0.5\pgflinewidth}{0pt}}
- \pgfpathlineto{\pgfqpoint{-0.1\pgflinewidth}{0pt}}
- \pgfusepathqstroke
- \pgfsetroundcap
- \pgfsetlinewidth{.8\pgflinewidth}
- {\pgftransformxshift{0.625\pgflinewidth}
- \pgfpathmoveto{\pgfqpoint{3.75\pgfutil@tempdima}{4\pgfutil@tempdima}}
- \pgfpathcurveto{\pgfqpoint{3.5\pgfutil@tempdima}{2.5\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{0.25\pgfutil@tempdima}}{\pgfqpoint{0pt}{0.125\pgflinewidth}}
- \pgfpathmoveto{\pgfqpoint{3.75\pgfutil@tempdima}{4\pgfutil@tempdima}}
- \pgfpathcurveto{\pgfqpoint{3.5\pgfutil@tempdima}{2.5\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{0.25\pgfutil@tempdima}}{\pgfqpoint{0pt}{-0.125\pgflinewidth}}
- }
- \pgfusepathqstroke%
-}
-
-\pgfarrowsdeclare{right to reversed}{right to reversed}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfarrowsleftextend{+-.1\pgflinewidth}
- \pgfutil@tempdimb=3.75\pgfutil@tempdima\advance\pgfutil@tempdimb by0.9\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.28pt%
- \advance\pgfutil@tempdima by.3\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetroundjoin
- \pgfsetbuttcap
- \pgfpathmoveto{\pgfqpoint{0.5\pgflinewidth}{0pt}}
- \pgfpathlineto{\pgfqpoint{-0.1\pgflinewidth}{0pt}}
- \pgfusepathqstroke
- \pgfsetroundcap
- \pgfsetlinewidth{.8\pgflinewidth}
- {\pgftransformxshift{0.625\pgflinewidth}
- \pgfpathmoveto{\pgfqpoint{3.75\pgfutil@tempdima}{-4\pgfutil@tempdima}}
- \pgfpathcurveto{\pgfqpoint{3.5\pgfutil@tempdima}{-2.5\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{-0.25\pgfutil@tempdima}}{\pgfqpoint{0pt}{-0.125\pgflinewidth}}
- \pgfpathmoveto{\pgfqpoint{3.75\pgfutil@tempdima}{-4\pgfutil@tempdima}}
- \pgfpathcurveto{\pgfqpoint{3.5\pgfutil@tempdima}{-2.5\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{-0.25\pgfutil@tempdima}}{\pgfqpoint{0pt}{0.125\pgflinewidth}}
- }
- \pgfusepathqstroke%
-}
-
-
-
-% A left hook
-
-\pgfarrowsdeclare{left hook}{left hook}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.2\pgflinewidth%
- \pgfarrowsleftextend{+-.5\pgflinewidth}
- \pgfutil@tempdimb=3.75\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.2\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetroundcap
- \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{0.75\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathcurveto{\pgfqpoint{2.415\pgfutil@tempdima}{0\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{1.665\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{3\pgfutil@tempdima}}
- \pgfpathcurveto{\pgfqpoint{3.75\pgfutil@tempdima}{4.665\pgfutil@tempdima}}{\pgfqpoint{2.415\pgfutil@tempdima}{6\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{6\pgfutil@tempdima}}
- \pgfusepathqstroke%
-}
-
-\pgfarrowsdeclarereversed{left hook reversed}{left hook reversed}{left hook}{left hook}
-
-
-
-% A right hook
-
-\pgfarrowsdeclare{right hook}{right hook}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.2\pgflinewidth%
- \pgfarrowsleftextend{+-.5\pgflinewidth}
- \pgfutil@tempdimb=3.75\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.2\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetroundcap
- \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{0.75\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathcurveto{\pgfqpoint{2.415\pgfutil@tempdima}{0\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{-1.665\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{-3\pgfutil@tempdima}}
- \pgfpathcurveto{\pgfqpoint{3.75\pgfutil@tempdima}{-4.665\pgfutil@tempdima}}{\pgfqpoint{2.415\pgfutil@tempdima}{-6\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{-6\pgfutil@tempdima}}
- \pgfusepathqstroke%
-}
-
-\pgfarrowsdeclarereversed{right hook reversed}{right hook reversed}{right hook}{right hook}
-
-
-% Hooks in both directions
-
-\pgfarrowsdeclare{hooks}{hooks}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.2\pgflinewidth%
- \pgfarrowsleftextend{+-.5\pgflinewidth}
- \pgfutil@tempdimb=3.75\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth%
- \pgfarrowsrightextend{+\pgfutil@tempdimb}
-}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.2\pgflinewidth%
- \pgfsetdash{}{+0pt}
- \pgfsetroundcap
- \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{0.75\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathcurveto{\pgfqpoint{2.415\pgfutil@tempdima}{0\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{1.665\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{3\pgfutil@tempdima}}
- \pgfpathcurveto{\pgfqpoint{3.75\pgfutil@tempdima}{4.665\pgfutil@tempdima}}{\pgfqpoint{2.415\pgfutil@tempdima}{6\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{6\pgfutil@tempdima}}
- \pgfpathmoveto{\pgfqpoint{0.75\pgfutil@tempdima}{0\pgfutil@tempdima}}
- \pgfpathcurveto{\pgfqpoint{2.415\pgfutil@tempdima}{0\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{-1.665\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{-3\pgfutil@tempdima}}
- \pgfpathcurveto{\pgfqpoint{3.75\pgfutil@tempdima}{-4.665\pgfutil@tempdima}}{\pgfqpoint{2.415\pgfutil@tempdima}{-6\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{-6\pgfutil@tempdima}}
- \pgfusepathqstroke%
-}
-
-\pgfarrowsdeclarereversed{hooks reversed}{hooks reversed}{hooks}{hooks}
-
-
-% An arrow that looks like a serif of the computer modern font
-
-\pgfarrowsdeclare{serif cm}{serif cm}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.45\pgflinewidth%
- \pgfarrowsleftextend{+-.75\pgfutil@tempdima}
- \pgfarrowsrightextend{+.04\pgflinewidth}
-}
-{
- \pgfutil@tempdima=0.4pt%
- \advance\pgfutil@tempdima by.45\pgflinewidth%
- \pgftransformxshift{.04\pgflinewidth}
- \pgfpathmoveto{\pgfqpoint{-.75\pgfutil@tempdima}{.5\pgflinewidth}}
- \pgfpathcurveto
- {\pgfqpoint{-.375\pgfutil@tempdima}{.5\pgflinewidth}}
- {\pgfqpoint{-.375\pgfutil@tempdima}{.7\pgflinewidth}}
- {\pgfqpoint{-.375\pgfutil@tempdima}{1.95\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{0pt}{1.95\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{-.04\pgflinewidth}{.5\pgfutil@tempdima}}
- {\pgfqpoint{-.04\pgflinewidth}{-.5\pgfutil@tempdima}}
- {\pgfqpoint{0pt}{-1.95\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{-.375\pgfutil@tempdima}{-1.95\pgfutil@tempdima}}
- \pgfpathcurveto
- {\pgfqpoint{-.375\pgfutil@tempdima}{-.7\pgflinewidth}}
- {\pgfqpoint{-.375\pgfutil@tempdima}{-.5\pgflinewidth}}
- {\pgfqpoint{-.75\pgfutil@tempdima}{-.5\pgflinewidth}}
- \pgfpathclose
- \pgfusepathqfill
-}
-
-
-
-% Round cap
-
-\pgfarrowsdeclare{round cap}{round cap}
-{\pgfarrowsleftextend{+0pt}\pgfarrowsrightextend{+\pgflinewidth}}
-{
- \pgfsetdash{}{+0pt}
- \pgfsetroundcap
- \pgfpathmoveto{\pgfpointorigin}
- \pgfpathlineto{\pgfqpoint{0.5\pgflinewidth}{0pt}}
- \pgfusepathqstroke
-}
-
-
-% Butt cap
-
-\pgfarrowsdeclare{butt cap}{butt cap}
-{\pgfarrowsleftextend{+-.1\pgflinewidth}\pgfarrowsrightextend{+.5\pgflinewidth}}
-{
- \pgfsetdash{}{+0pt}
- \pgfsetbuttcap
- \pgfpathmoveto{\pgfqpoint{-.1\pgflinewidth}{0pt}}
- \pgfpathlineto{\pgfqpoint{0.5\pgflinewidth}{0pt}}
- \pgfusepathqstroke
-}
-
-
-
-% 90 degrees cap
-
-\pgfarrowsdeclare{triangle 90 cap}{triangle 90 cap}
-{\pgfarrowsleftextend{+-.1\pgflinewidth}\pgfarrowsrightextend{+\pgflinewidth}}
-{
- \pgfpathmoveto{\pgfqpoint{-.1\pgflinewidth}{0.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{.5\pgflinewidth}{.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{\pgflinewidth}{0pt}}
- \pgfpathlineto{\pgfqpoint{.5\pgflinewidth}{-.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{-.1\pgflinewidth}{-0.5\pgflinewidth}}
- \pgfusepathqfill
-}
-
-
-% reversed 90 degrees cap
-
-\pgfarrowsdeclare{triangle 90 cap reversed}{triangle 90 cap reversed}
-{\pgfarrowsleftextend{+-.1\pgflinewidth}\pgfarrowsrightextend{+\pgflinewidth}}
-{
- \pgfpathmoveto{\pgfqpoint{1\pgflinewidth}{0.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{-.1\pgflinewidth}{.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{-.1\pgflinewidth}{-.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{1\pgflinewidth}{-.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{0.5\pgflinewidth}{0\pgflinewidth}}
- \pgfusepathqfill
-}
-
-
-
-% fast
-
-\pgfarrowsdeclare{fast cap}{fast cap}
-{\pgfarrowsleftextend{+-.1\pgflinewidth}\pgfarrowsrightextend{+2\pgflinewidth}}
-{
- \pgfpathmoveto{\pgfqpoint{-.1\pgflinewidth}{0.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{.5\pgflinewidth}{.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{1\pgflinewidth}{0\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{.5\pgflinewidth}{-.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{-.1\pgflinewidth}{-0.5\pgflinewidth}}
- \pgfpathclose
- \pgfpathmoveto{\pgfqpoint{1\pgflinewidth}{0.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{1.5\pgflinewidth}{0.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{2\pgflinewidth}{0\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{1.5\pgflinewidth}{-.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{1\pgflinewidth}{-0.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{1.5\pgflinewidth}{0\pgflinewidth}}
- \pgfpathclose
- \pgfusepathqfill
-}
-
-
-\pgfarrowsdeclare{fast cap reversed}{fast cap reversed}
-{\pgfarrowsleftextend{+-.1\pgflinewidth}\pgfarrowsrightextend{+2\pgflinewidth}}
-{
- \pgfpathmoveto{\pgfqpoint{-.1\pgflinewidth}{0.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{1\pgflinewidth}{.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{.5\pgflinewidth}{0\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{1\pgflinewidth}{-.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{-.1\pgflinewidth}{-0.5\pgflinewidth}}
- \pgfpathclose
- \pgfpathmoveto{\pgfqpoint{1.5\pgflinewidth}{0.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{2\pgflinewidth}{0.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{1.5\pgflinewidth}{0\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{2\pgflinewidth}{-.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{1.5\pgflinewidth}{-0.5\pgflinewidth}}
- \pgfpathlineto{\pgfqpoint{1\pgflinewidth}{0\pgflinewidth}}
- \pgfpathclose
- \pgfusepathqfill
-}
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.footprints.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.footprints.code.tex
new file mode 100644
index 00000000000..5cf633d0c59
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.footprints.code.tex
@@ -0,0 +1,230 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usepgfmodule{decorations}
+
+
+% Parameters
+\pgfset{
+ % Length of a footprint:
+ /pgf/decoration/foot length/.initial=10pt,
+ % Distance between two footprints on the same side of the path
+ /pgf/decoration/stride length/.initial=30pt,
+ % Double distance between footprint and input path
+ /pgf/decoration/foot sep/.initial=4pt,
+ % Rotate feet by this much
+ /pgf/decoration/foot angle/.initial=10,
+ % What animal?
+ /pgf/decoration/foot of/.initial=human,
+}
+
+
+
+\pgfdeclaredecoration{footprints}{left}
+{
+ \state{left}[width=\pgfkeysvalueof{/pgf/decoration/stride length}/2,next state=right]
+ {
+ \pgftransformyshift{\pgfkeysvalueof{/pgf/decoration/foot sep}/2}
+ \pgfmathparse{\pgfkeysvalueof{/pgf/decoration/foot length}}
+ \pgftransformscale{\pgfmathresult}
+ \pgftransformrotate{\pgfkeysvalueof{/pgf/decoration/foot angle}}
+ \csname pgf@lib@foot@of@\pgfkeysvalueof{/pgf/decoration/foot of}\endcsname
+ }
+ \state{right}[width=\pgfkeysvalueof{/pgf/decoration/stride length}/2,next state=left]
+ {
+ \pgftransformyscale{-1}
+ \pgftransformyshift{\pgfkeysvalueof{/pgf/decoration/foot sep}/2}
+ \pgfmathparse{\pgfkeysvalueof{/pgf/decoration/foot length}}
+ \pgftransformscale{\pgfmathresult}
+ \pgftransformrotate{\pgfkeysvalueof{/pgf/decoration/foot angle}}
+ \csname pgf@lib@foot@of@\pgfkeysvalueof{/pgf/decoration/foot of}\endcsname
+ }
+}
+
+
+
+% Actual footprints.
+%
+% A footprint must be name \pgf@lib@foot@of@XXX, be a left foot and
+% should fill a rectangle of (0,0) rectangle (1pt,1pt) (more or less)
+% and point right.
+%
+
+
+\def\pgf@lib@foot@of@gnome{
+ % Coordinates from a Gnome logo on wikimedia commons. LGPL
+ % license... Unknown author.
+ %
+ % Flip and rotate
+ \pgftransformcm{0}{-1}{-1}{0}{\pgfqpoint{1pt}{0.8pt}}
+ \pgftransformscale{0.83333}
+ \pgfpathmoveto{\pgfqpoint{.86068pt}{0pt}}
+ \pgfpathcurveto{\pgfqpoint{.61466pt}{0pt}}{\pgfqpoint{.56851pt}{.35041pt}}{\pgfqpoint{.70691pt}{.35041pt}}
+ \pgfpathcurveto{\pgfqpoint{.84529pt}{.35041pt}}{\pgfqpoint{1.10671pt}{0pt}}{\pgfqpoint{.86068pt}{0pt}}
+ \pgfpathclose
+ %
+ \pgfpathmoveto{\pgfqpoint{.45217pt}{.30699pt}}
+ \pgfpathcurveto{\pgfqpoint{.52586pt}{.31149pt}}{\pgfqpoint{.60671pt}{.02577pt}}{\pgfqpoint{.46821pt}{.04374pt}}
+ \pgfpathcurveto{\pgfqpoint{.32976pt}{.06171pt}}{\pgfqpoint{.37845pt}{.30249pt}}{\pgfqpoint{.45217pt}{.30699pt}}
+ \pgfpathclose
+ %
+ \pgfpathmoveto{\pgfqpoint{.11445pt}{.48453pt}}
+ \pgfpathcurveto{\pgfqpoint{.16686pt}{.46146pt}}{\pgfqpoint{.1212pt}{.23581pt}}{\pgfqpoint{.03208pt}{.29735pt}}
+ \pgfpathcurveto{\pgfqpoint{-.057pt}{.3589pt}}{\pgfqpoint{.06204pt}{.50759pt}}{\pgfqpoint{.11445pt}{.48453pt}}
+ \pgfpathclose
+ %
+ \pgfpathmoveto{\pgfqpoint{.26212pt}{.36642pt}}
+ \pgfpathcurveto{\pgfqpoint{.32451pt}{.3537pt}}{\pgfqpoint{.32793pt}{.09778pt}}{\pgfqpoint{.21667pt}{.14369pt}}
+ \pgfpathcurveto{\pgfqpoint{.10539pt}{.18961pt}}{\pgfqpoint{.19978pt}{.37916pt}}{\pgfqpoint{.26212pt}{.36642pt}}
+ \pgfpathlineto{\pgfqpoint{.26212pt}{.36642pt}}
+ \pgfpathclose
+ %
+ \pgfpathmoveto{\pgfqpoint{.58791pt}{.93913pt}}
+ \pgfpathcurveto{\pgfqpoint{.59898pt}{1.02367pt}}{\pgfqpoint{.52589pt}{1.06542pt}}{\pgfqpoint{.45431pt}{1.01092pt}}
+ \pgfpathcurveto{\pgfqpoint{.22644pt}{.83743pt}}{\pgfqpoint{.8316pt}{.75088pt}}{\pgfqpoint{.79171pt}{.51386pt}}
+ \pgfpathcurveto{\pgfqpoint{.7586pt}{.31712pt}}{\pgfqpoint{.15495pt}{.37769pt}}{\pgfqpoint{.08621pt}{.68553pt}}
+ \pgfpathcurveto{\pgfqpoint{.03968pt}{.89374pt}}{\pgfqpoint{.27774pt}{1.1826pt}}{\pgfqpoint{.52614pt}{1.1826pt}}
+ \pgfpathcurveto{\pgfqpoint{.64834pt}{1.1826pt}}{\pgfqpoint{.78929pt}{1.07226pt}}{\pgfqpoint{.81566pt}{.93248pt}}
+ \pgfpathcurveto{\pgfqpoint{.8358pt}{.82589pt}}{\pgfqpoint{.57867pt}{.8686pt}}{\pgfqpoint{.58791pt}{.93913pt}}
+ \pgfpathlineto{\pgfqpoint{.58791pt}{.93913pt}}
+ \pgfpathclose
+}
+
+
+
+\def\pgf@lib@foot@of@bird{
+ % Coordinates derived from vector image created by Mark Wibrow.
+ %
+ \pgftransformcm{0}{.11}{.11}{0}{\pgfqpoint{.37pt}{.52pt}}
+ \pgfpathmoveto{\pgfqpoint{-.886pt}{1.652pt}}
+ \pgfpathcurveto{\pgfqpoint{-.4632pt}{2.669pt}}{\pgfqpoint{-.5092pt}{4.3712pt}}{\pgfqpoint{-.4512pt}{5.6734pt}}
+ \pgfpathcurveto{\pgfqpoint{-.4374pt}{5.9842pt}}{\pgfqpoint{-.3182pt}{6.0686pt}}{\pgfqpoint{-.2484pt}{5.644pt}}
+ \pgfpathcurveto{\pgfqpoint{-.0534pt}{4.459pt}}{\pgfqpoint{.087pt}{3.0132pt}}{\pgfqpoint{.5206pt}{1.8464pt}}
+ \pgfpathcurveto{\pgfqpoint{.714pt}{1.326pt}}{\pgfqpoint{.692pt}{1.416pt}}{\pgfqpoint{1.0864pt}{1.759pt}}
+ \pgfpathcurveto{\pgfqpoint{1.7662pt}{2.3504pt}}{\pgfqpoint{2.665pt}{3.1756pt}}{\pgfqpoint{3.2028pt}{4.02pt}}
+ \pgfpathcurveto{\pgfqpoint{3.4708pt}{4.4408pt}}{\pgfqpoint{3.4258pt}{4.0814pt}}{\pgfqpoint{3.3366pt}{3.8708pt}}
+ \pgfpathcurveto{\pgfqpoint{2.9068pt}{2.8562pt}}{\pgfqpoint{.8502pt}{.645pt}}{\pgfqpoint{.4808pt}{-.0864pt}}
+ \pgfpathcurveto{\pgfqpoint{.0808pt}{-.8788pt}}{\pgfqpoint{.1664pt}{-2.1246pt}}{\pgfqpoint{.0024pt}{-2.7868pt}}
+ \pgfpathcurveto{\pgfqpoint{-.172pt}{-3.4908pt}}{\pgfqpoint{-.2726pt}{-3.704pt}}{\pgfqpoint{-.3812pt}{-2.9558pt}}
+ \pgfpathcurveto{\pgfqpoint{-.5316pt}{-1.9202pt}}{\pgfqpoint{-.88pt}{-.256pt}}{\pgfqpoint{-1.332pt}{.128pt}}
+ \pgfpathcurveto{\pgfqpoint{-1.716pt}{.4542pt}}{\pgfqpoint{-3.7928pt}{2.3136pt}}{\pgfqpoint{-4.5044pt}{3.3524pt}}
+ \pgfpathcurveto{\pgfqpoint{-4.7618pt}{3.728pt}}{\pgfqpoint{-4.709pt}{3.7864pt}}{\pgfqpoint{-4.4212pt}{3.5818pt}}
+ \pgfpathcurveto{\pgfqpoint{-3.4844pt}{2.9162pt}}{\pgfqpoint{-2.6164pt}{1.654pt}}{\pgfqpoint{-1.454pt}{1.3886pt}}
+ \pgfpathcurveto{\pgfqpoint{-1.0876pt}{1.305pt}}{\pgfqpoint{-1.0296pt}{1.3066pt}}{\pgfqpoint{-.886pt}{1.652pt}}
+ \pgfpathclose
+}
+
+
+\expandafter\def\csname pgf@lib@foot@of@felis silvestris\endcsname{
+ % Coordinates derived from vector image created by Mark Wibrow, based
+ % on the forefoot of `felis silvestris' shown in
+ % Pearson, B. and Burton, J. A. (1980), `Wild Animals', Collins, 155.
+ %
+ \pgftransformcm{0}{.1}{.1}{0}{\pgfqpoint{.48pt}{.5pt}}
+ \pgfpathmoveto{\pgfqpoint{2.7312pt}{-1.992pt}}
+ \pgfpathcurveto{\pgfqpoint{1.8716pt}{-1.4226pt}}{\pgfqpoint{2.1404pt}{.0436pt}}{\pgfqpoint{.9202pt}{.0436pt}}
+ \pgfpathcurveto{\pgfqpoint{-.1146pt}{.0436pt}}{\pgfqpoint{-.7386pt}{.0178pt}}{\pgfqpoint{-1.319pt}{-1.0288pt}}
+ \pgfpathcurveto{\pgfqpoint{-1.7922pt}{-1.8822pt}}{\pgfqpoint{-2.072pt}{-1.5488pt}}{\pgfqpoint{-2.9638pt}{-1.968pt}}
+ \pgfpathcurveto{\pgfqpoint{-3.9244pt}{-2.4198pt}}{\pgfqpoint{-4.4394pt}{-3.348pt}}{\pgfqpoint{-4.1136pt}{-4.041pt}}
+ \pgfpathcurveto{\pgfqpoint{-3.3862pt}{-5.5882pt}}{\pgfqpoint{-1.6156pt}{-3.83pt}}{\pgfqpoint{-1.1684pt}{-4.312pt}}
+ \pgfpathcurveto{\pgfqpoint{-.5806pt}{-4.9454pt}}{\pgfqpoint{.5032pt}{-4.8822pt}}{\pgfqpoint{1.1748pt}{-4.2878pt}}
+ \pgfpathcurveto{\pgfqpoint{1.5822pt}{-3.9272pt}}{\pgfqpoint{2.6524pt}{-5.0652pt}}{\pgfqpoint{3.3506pt}{-4.1066pt}}
+ \pgfpathcurveto{\pgfqpoint{3.839pt}{-3.4356pt}}{\pgfqpoint{3.1192pt}{-2.249pt}}{\pgfqpoint{2.7312pt}{-1.992pt}}
+ \pgfpathclose
+ %
+ \pgfpathmoveto{\pgfqpoint{5.0576pt}{.4996pt}}
+ \pgfpathcurveto{\pgfqpoint{4.6056pt}{.6536pt}}{\pgfqpoint{4.0596pt}{.2516pt}}{\pgfqpoint{3.8382pt}{-.398pt}}
+ \pgfpathcurveto{\pgfqpoint{3.6168pt}{-1.0478pt}}{\pgfqpoint{3.8038pt}{-1.6996pt}}{\pgfqpoint{4.2558pt}{-1.8536pt}}
+ \pgfpathcurveto{\pgfqpoint{4.7078pt}{-2.0076pt}}{\pgfqpoint{5.2538pt}{-1.6056pt}}{\pgfqpoint{5.4752pt}{-.9558pt}}
+ \pgfpathcurveto{\pgfqpoint{5.6966pt}{-.3062pt}}{\pgfqpoint{5.5096pt}{.3456pt}}{\pgfqpoint{5.0576pt}{.4996pt}}
+ \pgfpathclose
+ %
+ \pgfpathmoveto{\pgfqpoint{3.1212pt}{3.5542pt}}
+ \pgfpathcurveto{\pgfqpoint{2.5874pt}{3.6726pt}}{\pgfqpoint{1.975pt}{3.1756pt}}{\pgfqpoint{1.7538pt}{2.4442pt}}
+ \pgfpathcurveto{\pgfqpoint{1.5324pt}{1.7128pt}}{\pgfqpoint{1.7858pt}{1.0238pt}}{\pgfqpoint{2.3196pt}{.9052pt}}
+ \pgfpathcurveto{\pgfqpoint{2.8534pt}{.7868pt}}{\pgfqpoint{3.4658pt}{1.2838pt}}{\pgfqpoint{3.6872pt}{2.0152pt}}
+ \pgfpathcurveto{\pgfqpoint{3.9084pt}{2.7466pt}}{\pgfqpoint{3.655pt}{3.4358pt}}{\pgfqpoint{3.1212pt}{3.5542pt}}
+ \pgfpathclose
+ %
+ \pgfpathmoveto{\pgfqpoint{-.6182pt}{5.0456pt}}
+ \pgfpathcurveto{\pgfqpoint{-1.2132pt}{5.0456pt}}{\pgfqpoint{-1.6956pt}{4.3104pt}}{\pgfqpoint{-1.6956pt}{3.4038pt}}
+ \pgfpathcurveto{\pgfqpoint{-1.6956pt}{2.4972pt}}{\pgfqpoint{-1.2132pt}{1.7618pt}}{\pgfqpoint{-.6182pt}{1.7618pt}}
+ \pgfpathcurveto{\pgfqpoint{-.0232pt}{1.7618pt}}{\pgfqpoint{.4592pt}{2.4972pt}}{\pgfqpoint{.4592pt}{3.4038pt}}
+ \pgfpathcurveto{\pgfqpoint{.4592pt}{4.3104pt}}{\pgfqpoint{-.0232pt}{5.0456pt}}{\pgfqpoint{-.6182pt}{5.0456pt}}
+ \pgfpathclose
+ %
+ \pgfpathmoveto{\pgfqpoint{-4.1176pt}{1.8248pt}}
+ \pgfpathcurveto{\pgfqpoint{-4.6334pt}{1.7534pt}}{\pgfqpoint{-4.9806pt}{1.0312pt}}{\pgfqpoint{-4.8928pt}{.212pt}}
+ \pgfpathcurveto{\pgfqpoint{-4.8052pt}{-.6072pt}}{\pgfqpoint{-4.3158pt}{-1.2136pt}}{\pgfqpoint{-3.8pt}{-1.1422pt}}
+ \pgfpathcurveto{\pgfqpoint{-3.2842pt}{-1.0708pt}}{\pgfqpoint{-2.9372pt}{-.3486pt}}{\pgfqpoint{-3.0248pt}{.4706pt}}
+ \pgfpathcurveto{\pgfqpoint{-3.1126pt}{1.2898pt}}{\pgfqpoint{-3.6018pt}{1.8962pt}}{\pgfqpoint{-4.1176pt}{1.8248pt}}
+ \pgfpathclose
+}
+
+
+
+\def\pgf@lib@foot@of@human{%
+ % Coordinates derived from vector image created by Mark Wibrow.
+ \pgftransformcm{0}{.5}{.5}{0}{\pgfqpoint{.48pt}{.2pt}}
+ %
+ % Draw main part of foot.
+ %
+ \pgfpathmoveto{\pgfqpoint{.20175pt}{-.72633pt}}
+ \pgfpathcurveto{\pgfqpoint{.16314pt}{-.88194pt}}{\pgfqpoint{.07386pt}{-1.0167pt}}{\pgfqpoint{-.08385pt}{-1.0167pt}}
+ \pgfpathcurveto{\pgfqpoint{-.24153pt}{-1.0167pt}}{\pgfqpoint{-.36942pt}{-.84897pt}}{\pgfqpoint{-.36942pt}{-.72633pt}}
+ \pgfpathcurveto{\pgfqpoint{-.36942pt}{-.60372pt}}{\pgfqpoint{-.32505pt}{-.54825pt}}{\pgfqpoint{-.27633pt}{-.51192pt}}
+ \pgfpathcurveto{\pgfqpoint{-.23937pt}{-.48435pt}}{\pgfqpoint{-.17031pt}{-.46539pt}}{\pgfqpoint{-.10611pt}{-.40323pt}}
+ \pgfpathcurveto{\pgfqpoint{-.04191pt}{-.3411pt}}{\pgfqpoint{.00495pt}{-.27783pt}}{\pgfqpoint{.00495pt}{-.14787pt}}
+ \pgfpathcurveto{\pgfqpoint{.00495pt}{-.01794pt}}{\pgfqpoint{-.08526pt}{.12648pt}}{\pgfqpoint{-.22194pt}{.22467pt}}
+ \pgfpathcurveto{\pgfqpoint{-.35862pt}{.32286pt}}{\pgfqpoint{-.40863pt}{.50226pt}}{\pgfqpoint{-.32703pt}{.5979pt}}
+ \pgfpathcurveto{\pgfqpoint{-.24543pt}{.69354pt}}{\pgfqpoint{-.00564pt}{.66543pt}}{\pgfqpoint{.17172pt}{.53484pt}}
+ \pgfpathcurveto{\pgfqpoint{.34908pt}{.40422pt}}{\pgfqpoint{.39363pt}{.27192pt}}{\pgfqpoint{.37416pt}{.10971pt}}
+ \pgfpathcurveto{\pgfqpoint{.35472pt}{-.0525pt}}{\pgfqpoint{.26736pt}{-.46203pt}}{\pgfqpoint{.20175pt}{-.72633pt}}
+ \pgfpathclose
+ %
+ % Draw toe.s
+ %
+ \pgfpathmoveto{\pgfqpoint{-.27138pt}{1.01451pt}}
+ \pgfpathcurveto{\pgfqpoint{-.21198pt}{1.01451pt}}{\pgfqpoint{-.1638pt}{.94509pt}}{\pgfqpoint{-.1638pt}{.8595pt}}
+ \pgfpathcurveto{\pgfqpoint{-.1638pt}{.77388pt}}{\pgfqpoint{-.21198pt}{.70446pt}}{\pgfqpoint{-.27138pt}{.70446pt}}
+ \pgfpathcurveto{\pgfqpoint{-.33078pt}{.70446pt}}{\pgfqpoint{-.37896pt}{.77388pt}}{\pgfqpoint{-.37896pt}{.8595pt}}
+ \pgfpathcurveto{\pgfqpoint{-.37896pt}{.94509pt}}{\pgfqpoint{-.33078pt}{1.01451pt}}{\pgfqpoint{-.27138pt}{1.01451pt}}
+ \pgfpathclose
+ %
+ \pgfpathmoveto{\pgfqpoint{-.05769pt}{.90573pt}}
+ \pgfpathcurveto{\pgfqpoint{-.01659pt}{.90573pt}}{\pgfqpoint{.01674pt}{.86445pt}}{\pgfqpoint{.01674pt}{.81354pt}}
+ \pgfpathcurveto{\pgfqpoint{.01674pt}{.7626pt}}{\pgfqpoint{-.01659pt}{.72132pt}}{\pgfqpoint{-.05769pt}{.72132pt}}
+ \pgfpathcurveto{\pgfqpoint{-.09879pt}{.72132pt}}{\pgfqpoint{-.13209pt}{.7626pt}}{\pgfqpoint{-.13209pt}{.81354pt}}
+ \pgfpathcurveto{\pgfqpoint{-.13209pt}{.86445pt}}{\pgfqpoint{-.09879pt}{.90573pt}}{\pgfqpoint{-.05769pt}{.90573pt}}
+ \pgfpathclose
+ %
+ \pgfpathmoveto{\pgfqpoint{.10497pt}{.81636pt}}
+ \pgfpathcurveto{\pgfqpoint{.14214pt}{.81096pt}}{\pgfqpoint{.16722pt}{.77193pt}}{\pgfqpoint{.16104pt}{.72918pt}}
+ \pgfpathcurveto{\pgfqpoint{.15483pt}{.68646pt}}{\pgfqpoint{.11964pt}{.65619pt}}{\pgfqpoint{.08247pt}{.66159pt}}
+ \pgfpathcurveto{\pgfqpoint{.0453pt}{.66699pt}}{\pgfqpoint{.02019pt}{.70602pt}}{\pgfqpoint{.0264pt}{.74874pt}}
+ \pgfpathcurveto{\pgfqpoint{.03261pt}{.79149pt}}{\pgfqpoint{.0678pt}{.82176pt}}{\pgfqpoint{.10497pt}{.81636pt}}
+ \pgfpathclose
+ %
+ \pgfpathmoveto{\pgfqpoint{.24054pt}{.70842pt}}
+ \pgfpathcurveto{\pgfqpoint{.27513pt}{.70842pt}}{\pgfqpoint{.30318pt}{.67686pt}}{\pgfqpoint{.30318pt}{.63795pt}}
+ \pgfpathcurveto{\pgfqpoint{.30318pt}{.59904pt}}{\pgfqpoint{.27513pt}{.56751pt}}{\pgfqpoint{.24054pt}{.56751pt}}
+ \pgfpathcurveto{\pgfqpoint{.20598pt}{.56751pt}}{\pgfqpoint{.17793pt}{.59904pt}}{\pgfqpoint{.17793pt}{.63795pt}}
+ \pgfpathcurveto{\pgfqpoint{.17793pt}{.67686pt}}{\pgfqpoint{.20598pt}{.70842pt}}{\pgfqpoint{.24054pt}{.70842pt}}
+ \pgfpathclose
+ %
+ \pgfpathmoveto{\pgfqpoint{.35973pt}{.57501pt}}
+ \pgfpathcurveto{\pgfqpoint{.3918pt}{.57501pt}}{\pgfqpoint{.41781pt}{.54852pt}}{\pgfqpoint{.41781pt}{.51585pt}}
+ \pgfpathcurveto{\pgfqpoint{.41781pt}{.48318pt}}{\pgfqpoint{.3918pt}{.45669pt}}{\pgfqpoint{.35973pt}{.45669pt}}
+ \pgfpathcurveto{\pgfqpoint{.32769pt}{.45669pt}}{\pgfqpoint{.30168pt}{.48318pt}}{\pgfqpoint{.30168pt}{.51585pt}}
+ \pgfpathcurveto{\pgfqpoint{.30168pt}{.54852pt}}{\pgfqpoint{.32769pt}{.57501pt}}{\pgfqpoint{.35973pt}{.57501pt}}
+ \pgfpathclose
+}
+
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.fractals.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.fractals.code.tex
new file mode 100644
index 00000000000..22c9d8d1b27
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.fractals.code.tex
@@ -0,0 +1,65 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usepgfmodule{decorations}
+
+
+
+\pgfdeclaredecoration{Koch curve type 1}{init}
+{
+ \state{init}[width=\pgfdecoratedinputsegmentremainingdistance]
+ {
+ \pgfpathlineto{\pgfpoint{.33333\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ \pgfpathlineto{\pgfpoint{.33333\pgfdecoratedinputsegmentremainingdistance}{.33333\pgfdecoratedinputsegmentremainingdistance}}
+ \pgfpathlineto{\pgfpoint{.66666\pgfdecoratedinputsegmentremainingdistance}{.33333\pgfdecoratedinputsegmentremainingdistance}}
+ \pgfpathlineto{\pgfpoint{.66666\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ }
+}
+
+\pgfdeclaredecoration{Koch curve type 2}{init}
+{
+ \state{init}[width=\pgfdecoratedinputsegmentremainingdistance]
+ {
+ \pgfpathlineto{\pgfpoint{.25\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ \pgfpathlineto{\pgfpoint{.25\pgfdecoratedinputsegmentremainingdistance}{.25\pgfdecoratedinputsegmentremainingdistance}}
+ \pgfpathlineto{\pgfpoint{.5\pgfdecoratedinputsegmentremainingdistance}{.25\pgfdecoratedinputsegmentremainingdistance}}
+ \pgfpathlineto{\pgfpoint{.5\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ \pgfpathlineto{\pgfpoint{.5\pgfdecoratedinputsegmentremainingdistance}{-.25\pgfdecoratedinputsegmentremainingdistance}}
+ \pgfpathlineto{\pgfpoint{.75\pgfdecoratedinputsegmentremainingdistance}{-.25\pgfdecoratedinputsegmentremainingdistance}}
+ \pgfpathlineto{\pgfpoint{.75\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ }
+}
+
+\pgfdeclaredecoration{Koch snowflake}{init}
+{
+ \state{init}[width=\pgfdecoratedinputsegmentremainingdistance]
+ {
+ \pgfpathlineto{\pgfpoint{.3333\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ \pgfpathlineto{\pgfpoint{.5\pgfdecoratedinputsegmentremainingdistance}{0.2886751347\pgfdecoratedinputsegmentremainingdistance}}
+ \pgfpathlineto{\pgfpoint{.6666\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ }
+}
+
+
+\pgfdeclaredecoration{Cantor set}{init}
+{
+ \state{init}[width=\pgfdecoratedinputsegmentremainingdistance]
+ {
+ \pgfpathlineto{\pgfpoint{.3333\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ \pgfpathmoveto{\pgfpoint{.6666\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ }
+}
+
+
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.markings.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.markings.code.tex
new file mode 100644
index 00000000000..b09975a9aef
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.markings.code.tex
@@ -0,0 +1,114 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usepgfmodule{decorations}
+
+
+% A marking decoration is used to add markings (which are just pgf
+% scopes, essentially) at certain positions of a path.
+
+\pgfkeys{
+ /pgf/decoration/reset marks/.code=\let\pgf@lib@dec@mark@marks=\pgfutil@empty,
+ /pgf/decoration/mark/.code=\pgf@lib@dec@parsemark#1\pgf@lib@dec@stop,
+}
+
+\let\pgf@lib@dec@mark@marks=\pgfutil@empty
+
+\def\pgf@lib@dec@parsemark at position#1with#2\pgf@lib@dec@stop{%
+ \expandafter\def\expandafter\pgf@lib@dec@mark@marks\expandafter{\pgf@lib@dec@mark@marks%
+ \pgf@lib@dec@domark{#1}{#2}%
+ }%
+}
+
+\def\pgf@lib@dec@arrowhead#1#2{%
+ \expandafter\ifx\csname tikz@special@arrow@end#2\endcsname\relax% be nice to TikZ
+ \pgfsetarrowsend{#2}
+ \else%
+ \pgfsetarrowsend{\csname tikz@special@arrow@end#2\endcsname}%
+ \fi%
+ \pgf@x=0pt%
+ \pgf@shorten@end%
+ \pgftransformxshift{-\pgf@x}
+ \pgftransformxscale{#1}
+ \pgflowlevelsynccm%
+ \pgflowlevelobj{}{\pgf@endarrow}%
+}
+
+\def\pgf@lib@dec@doarrowhead#1{%
+ \pgf@lib@dec@arrowhead{1}{#1}%
+}
+\def\pgf@lib@dec@doarrowheadrev#1{%
+ \pgf@lib@dec@arrowhead{-1}{#1}%
+}
+
+
+\pgfdeclaredecoration{markings}{pre}
+{
+ \state{pre}
+ [
+ width=0pt,
+ persistent precomputation={%
+ \pgf@lib@dec@mark@marks\pgf@lib@dec@mark@last%
+ \let\arrow=\pgf@lib@dec@doarrowhead%
+ \let\arrowreversed=\pgf@lib@dec@doarrowheadrev%
+ },
+ next state=skipper
+ ]
+ {}
+
+ \state{skipper}[width=\pgf@lib@dec@computed@width-\pgfdecoratedcompleteddistance-1sp,
+ next state=\pgf@lib@dec@next@state]{}
+
+ \state{main}
+ [
+ width=1sp,
+ next state=pre
+ ]
+ {%
+ \pgfinterruptpath%
+ \pgfscope%
+ \let\pgf@lib@dec@mark@marks=\pgfutil@empty%
+ \pgf@lib@dec@computed@action%
+ \endpgfscope%
+ \endpgfinterruptpath%
+ }%
+
+ \state{final}[width=\pgfdecoratedremainingdistance]{}
+}
+
+\def\pgf@lib@dec@domark#1#2#3\pgf@lib@dec@mark@last{%
+ \def\pgf@lib@dec@mark@marks{#3}%
+ \pgf@lib@dec@parsenum{#1}%
+ \def\pgf@lib@dec@computed@action{#2}%
+ \def\pgf@lib@dec@next@state{main}%
+}
+
+\def\pgf@lib@dec@parsenum#1{%
+ \pgfmathparse{#1}%
+ \ifpgfmathunitsdeclared%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \edef\pgf@lib@dec@computed@width{\pgfdecoratedpathlength\pgfmathresult pt}%
+ \else%
+ \edef\pgf@lib@dec@computed@width{\pgfmathresult pt}%
+ \fi%
+ \else%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \edef\pgf@lib@dec@computed@width{\pgfdecoratedpathlength\pgfmathresult*\pgfdecoratedpathlength}%
+ \else%
+ \edef\pgf@lib@dec@computed@width{\pgfmathresult*\pgfdecoratedpathlength}%
+ \fi%
+ \fi%
+}
+
+\def\pgf@lib@dec@mark@last{%
+ \def\pgf@lib@dec@next@state{final}%
+}
+
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathmorphing.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathmorphing.code.tex
new file mode 100644
index 00000000000..a6052489796
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathmorphing.code.tex
@@ -0,0 +1,299 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usepgfmodule{decorations}
+
+
+%
+% These decorations "morph" paths. That means that the
+% orginal characteristic of the path is kept and the number of
+% subpaths remains the same -- only, the lines are slightly offset or
+% changed by the decoration. For instance a line might be turned into
+% a squiggly line or a snaking line or a bumping line.
+%
+
+
+%
+%
+% Kind 1: Path morphing straight line decorations
+%
+%
+
+
+% zigzag decoration.
+%
+\pgfdeclaredecoration{zigzag}{up from center}{
+ \state{up from center}[width=+.5\pgfdecorationsegmentlength, next state=big down]
+ {
+ \pgfpathlineto{\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
+ }
+ \state{big down}[switch if less than=+.5\pgfdecorationsegmentlength to center finish,
+ width=+.5\pgfdecorationsegmentlength,
+ next state=big up]
+ {
+ \pgfpathlineto{\pgfqpoint{.25\pgfdecorationsegmentlength}{-\pgfdecorationsegmentamplitude}}
+ }
+ \state{big up}[switch if less than=+.5\pgfdecorationsegmentlength to center finish,
+ width=+.5\pgfdecorationsegmentlength,
+ next state=big down]
+ {
+ \pgfpathlineto{\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
+ }
+ \state{center finish}[width=0pt, next state=final]{
+ \pgfpathlineto{\pgfpointorigin}
+ }
+ \state{final}
+ {
+ \pgfpathlineto{\pgfpointdecoratedpathlast}
+ }
+}
+
+
+
+
+% saw decoration
+%
+% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength
+
+\pgfdeclaredecoration{saw}{initial}
+{
+ \state{initial}[auto end on length=+\pgfdecorationsegmentlength,
+ auto corner on length=+\pgfdecorationsegmentlength,
+ width=+\pgfdecorationsegmentlength]
+ {
+ \pgfpathlineto{\pgfqpoint{\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
+ \pgfpathlineto{\pgfqpoint{\pgfdecorationsegmentlength}{0pt}}
+ }
+ \state{final}
+ {}
+}
+
+
+
+
+% random steps decoration
+%
+% A decoration that consists of random steps heading towards the target
+%
+% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength
+
+\pgfdeclaredecoration{random steps}{start}
+{
+ \state{start}[width=+0pt,next state=step,persistent precomputation=\pgfdecoratepathhascornerstrue]{}
+ \state{step}[auto end on length=1.5\pgfdecorationsegmentlength,
+ auto corner on length=1.5\pgfdecorationsegmentlength,
+ width=+\pgfdecorationsegmentlength]
+ {
+ \pgfpathlineto{
+ \pgfpointadd
+ {\pgfpoint{\pgfdecorationsegmentlength}{0pt}}
+ {\pgfpoint{rand*\pgfdecorationsegmentamplitude}{rand*\pgfdecorationsegmentamplitude}}
+ }
+ }
+ \state{final}
+ {}
+}
+
+
+
+% Meta-decoration line zigzag
+
+\pgfdeclaremetadecoration{straight zigzag}{line to}{
+ \state{line to}[width=\pgfmetadecorationsegmentlength, next state=zigzag]
+ {
+ \decoration{curveto}
+ }
+ \state{zigzag}[width=\pgfmetadecorationsegmentlength, next state=line to]
+ {
+ \decoration{zigzag}
+ }
+ \state{final}
+ {
+ \decoration{curveto}
+ }
+}
+
+
+
+
+
+%
+%
+% Kind 2: Path morphing curved decorations
+%
+%
+
+
+
+% bent decoration
+%
+% A decoration that looks like someone bent the line a bit.
+%
+% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentaspect
+
+\pgfdeclaredecoration{bent}{bent}
+{
+ \state{bent}[width=+\pgfdecoratedinputsegmentremainingdistance]
+ {
+ \pgfpathcurveto
+ {\pgfqpoint{\pgfdecorationsegmentaspect\pgfdecoratedinputsegmentremainingdistance}{\pgfdecorationsegmentamplitude}}
+ {\pgfpointadd{\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ {\pgfqpoint{-\pgfdecorationsegmentaspect\pgfdecoratedinputsegmentremainingdistance}{\pgfdecorationsegmentamplitude}}}
+ {\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ }
+ \state{final}
+ {}
+}
+
+
+
+% decoration snake
+%
+% This decoration produces a hopefully optically pleasing squiggly snake.
+%
+% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength
+
+\pgfdeclaredecoration{snake}{initial}
+{
+ \state{initial}[switch if less than=+.625\pgfdecorationsegmentlength to final,
+ width=+.3125\pgfdecorationsegmentlength,
+ next state=down]
+ {
+ \pgfpathcurveto
+ {\pgfqpoint{.125\pgfdecorationsegmentlength}{0pt}}
+ {\pgfqpoint{.1875\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.3125\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
+ }
+ \state{down}[switch if less than=+.8125\pgfdecorationsegmentlength to end down,
+ width=+.5\pgfdecorationsegmentlength,
+ next state=up]
+ {
+ \pgfpathcosine{\pgfqpoint{.25\pgfdecorationsegmentlength}{-1\pgfdecorationsegmentamplitude}}
+ \pgfpathsine{\pgfqpoint{.25\pgfdecorationsegmentlength}{-1\pgfdecorationsegmentamplitude}}
+ }
+ \state{up}[switch if less than=+.8125\pgfdecorationsegmentlength to end up,
+ width=+.5\pgfdecorationsegmentlength,
+ next state=down]
+ {
+ \pgfpathcosine{\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
+ \pgfpathsine{\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
+ }
+ \state{end down}[width=+.3125\pgfdecorationsegmentlength,
+ next state=final]
+ {
+ \pgfpathcurveto
+ {\pgfqpoint{.125\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.1875\pgfdecorationsegmentlength}{0pt}}
+ {\pgfqpoint{.3125\pgfdecorationsegmentlength}{0pt}}
+ }
+ \state{end up}[width=+.3125\pgfdecorationsegmentlength,
+ next state=final]
+ {
+ \pgfpathcurveto
+ {\pgfqpoint{.125\pgfdecorationsegmentlength}{-\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.1875\pgfdecorationsegmentlength}{0pt}}
+ {\pgfqpoint{.3125\pgfdecorationsegmentlength}{0pt}}
+ }
+ \state{final}
+ {
+ \pgfpathlineto{\pgfpointdecoratedpathlast}
+ }
+}
+
+
+% coil decoration
+%
+% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength,
+
+\pgfdeclaredecoration{coil}{coil}
+{
+ \state{coil}[switch if less than=%
+ 1.5\pgfdecorationsegmentlength+%
+ \pgfdecorationsegmentaspect\pgfdecorationsegmentamplitude+%
+ \pgfdecorationsegmentaspect\pgfdecorationsegmentamplitude to last,
+ width=+\pgfdecorationsegmentlength]
+ {
+ \pgfpathcurveto
+ {\pgfpoint@oncoil{0 }{ 0.555}{1}}
+ {\pgfpoint@oncoil{0.445}{ 1 }{2}}
+ {\pgfpoint@oncoil{1 }{ 1 }{3}}
+ \pgfpathcurveto
+ {\pgfpoint@oncoil{1.555}{ 1 }{4}}
+ {\pgfpoint@oncoil{2 }{ 0.555}{5}}
+ {\pgfpoint@oncoil{2 }{ 0 }{6}}
+ \pgfpathcurveto
+ {\pgfpoint@oncoil{2 }{-0.555}{7}}
+ {\pgfpoint@oncoil{1.555}{-1 }{8}}
+ {\pgfpoint@oncoil{1 }{-1 }{9}}
+ \pgfpathcurveto
+ {\pgfpoint@oncoil{0.445}{-1 }{10}}
+ {\pgfpoint@oncoil{0 }{-0.555}{11}}
+ {\pgfpoint@oncoil{0 }{ 0 }{12}}
+ }
+ \state{last}[width=.5\pgfdecorationsegmentlength+%
+ \pgfdecorationsegmentaspect\pgfdecorationsegmentamplitude+%
+ \pgfdecorationsegmentaspect\pgfdecorationsegmentamplitude,next state=final]
+ {
+ \pgfpathcurveto
+ {\pgfpoint@oncoil{0 }{ 0.555}{1}}
+ {\pgfpoint@oncoil{0.445}{ 1 }{2}}
+ {\pgfpoint@oncoil{1 }{ 1 }{3}}
+ \pgfpathcurveto
+ {\pgfpoint@oncoil{1.555}{ 1 }{4}}
+ {\pgfpoint@oncoil{2 }{ 0.555}{5}}
+ {\pgfpoint@oncoil{2 }{ 0 }{6}}
+ }
+ \state{final}
+ {
+ \pgfpathlineto{\pgfpointdecoratedpathlast}
+ }
+}
+
+\def\pgfpoint@oncoil#1#2#3{%
+ \pgf@x=#1\pgfdecorationsegmentamplitude%
+ \pgf@x=\pgfdecorationsegmentaspect\pgf@x%
+ \pgf@y=#2\pgfdecorationsegmentamplitude%
+ \pgf@xa=0.083333333333\pgfdecorationsegmentlength%
+ \advance\pgf@x by#3\pgf@xa%
+}
+
+
+% bumps decoration
+%
+% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength
+
+\pgfdeclaredecoration{bumps}{initial}
+{
+ \state{initial}[auto end on length=+.51\pgfdecorationsegmentlength,
+ auto corner on length=+.51\pgfdecorationsegmentlength,
+ width=+.5\pgfdecorationsegmentlength]
+ {
+ \pgfpathcurveto
+ {\pgfqpoint{0pt}{.555\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{0.11125\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
+ \pgfpathcurveto
+ {\pgfqpoint{.38875\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.5\pgfdecorationsegmentlength}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.5\pgfdecorationsegmentlength}{0\pgfdecorationsegmentamplitude}}
+ }
+ \state{final}
+ {
+ \pgfpathlineto{\pgfpointdecoratedpathlast}
+ }
+}
+
+
+
+
+
+
+
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathreplacing.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathreplacing.code.tex
new file mode 100644
index 00000000000..d07ae8ab6e5
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathreplacing.code.tex
@@ -0,0 +1,177 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usepgfmodule{decorations}
+
+
+%
+% Path replacing decorations
+%
+% These decorations change the path by replacing it by another path.
+% For instance, a line in the path might be replaced by small
+% ticks or unconnected curves or crosses. Applying a chopping
+% decoration to a path means that the path can no longer be used for
+% filling in the original manner.
+%
+
+
+
+%
+%
+% Kind 1: Path chopping with open subpaths
+%
+%
+
+
+% ticks decoration
+%
+% Parameters: \pgfdecorationsegmentlength, \pgfdecorationsegmentamplitude
+
+\pgfdeclaredecoration{ticks}{ticks}
+{
+ \state{ticks}[width=+\pgfdecorationsegmentlength]
+ {
+ \pgfpathmoveto{\pgfqpoint{0pt}{\pgfdecorationsegmentamplitude}}
+ \pgfpathlineto{\pgfqpoint{0pt}{-\pgfdecorationsegmentamplitude}}
+ }
+ \state{final}
+ {
+ \pgfpathmoveto{\pgfqpoint{0pt}{\pgfdecorationsegmentamplitude}}
+ \pgfpathlineto{\pgfqpoint{0pt}{-\pgfdecorationsegmentamplitude}}
+ \pgfpathmoveto{\pgfpointdecoratedpathlast}
+ }
+}
+
+
+
+% expanding waves decoration
+%
+% Parameters: \pgfdecorationsegmentangle, \pgfdecorationsegmentlength
+
+\pgfdeclaredecoration{expanding waves}{initial}
+{
+ \state{initial}[width=+\pgfdecorationsegmentlength,next state=wave]
+ {}
+
+ \state{wave}[switch if less than=+\pgfdecorationsegmentlength to last,
+ width=+\pgfdecorationsegmentlength]
+ {
+ \pgfpathmoveto{
+ \pgfpointadd
+ {\pgfqpoint{-\pgfdecoratedcompleteddistance}{0pt}}%
+ {\pgfpointpolar{\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}}}%
+ \pgfpatharc{\pgfdecorationsegmentangle}{-\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}%
+ }
+ \state{last}[width=+0pt,next state=final]
+ {
+ \pgfpathmoveto{
+ \pgfpointadd
+ {\pgfqpoint{-\pgfdecoratedcompleteddistance}{0pt}}%
+ {\pgfpointpolar{\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}}}%
+ \pgfpatharc{\pgfdecorationsegmentangle}{-\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}%
+ }
+ \state{final}
+ {
+ \pgfpathmoveto{\pgfpointdecoratedpathlast}
+ }
+}
+
+
+
+% waves decoration
+
+\pgfdeclaredecoration{waves}{wave}
+{
+ \state{wave}[width=\pgfdecorationsegmentlength]
+ {
+ \pgftransformxshift{+\pgfdecorationsegmentlength}
+ \pgfpathmoveto{
+ \pgfpointadd
+ {\pgfqpoint{-\pgfkeysvalueof{/pgf/decoration/start radius}}{0pt}}%
+ {\pgfpointpolar{\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/start radius}}}}%
+ \pgfpatharc{\pgfdecorationsegmentangle}{-\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/start radius}}%
+ }
+ \state{final}
+ {
+ \pgfpathmoveto{\pgfpointdecoratedpathlast}
+ }
+}
+
+
+
+% border decoration
+%
+% Parameters: \pgfdecorationsegmentlength, \pgfdecorationsegmentamplitude, \pgfdecorationsegmentangle
+
+\pgfdeclaredecoration{border}{tick}
+{
+ \state{tick}[switch if less than=+\pgfdecorationsegmentlength to last,
+ width=+\pgfdecorationsegmentlength]
+ {
+ \pgfpathmoveto{\pgfpointorigin}
+ \pgfpathlineto{\pgfpointpolar{\pgfdecorationsegmentangle}{+\pgfdecorationsegmentamplitude}}
+ }
+ \state{last}[width=+\pgfdecorationsegmentamplitude,next state=final]
+ {
+ \pgfpathmoveto{\pgfpointorigin}
+ \pgfpathlineto{\pgfpointpolar{\pgfdecorationsegmentangle}{+\pgfdecorationsegmentamplitude}}
+ }
+ \state{final}
+ {
+ \pgfpathmoveto{\pgfpointdecoratedpathlast}
+ }
+}
+
+
+
+
+
+
+% brace decorations
+%
+% Parameters: \pgfdecorationsegmentamplitude
+
+\pgfdeclaredecoration{brace}{brace}
+{
+ \state{brace}[width=+\pgfdecoratedremainingdistance,next state=final]
+ {
+ \pgfpathmoveto{\pgfpointorigin}
+ \pgfpathcurveto
+ {\pgfqpoint{.15\pgfdecorationsegmentamplitude}{.3\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ {
+ \pgftransformxshift{+\pgfdecorationsegmentaspect\pgfdecoratedremainingdistance}
+ \pgfpathlineto{\pgfqpoint{-\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ \pgfpathcurveto
+ {\pgfqpoint{-.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{-.15\pgfdecorationsegmentamplitude}{.7\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{0\pgfdecorationsegmentamplitude}{1\pgfdecorationsegmentamplitude}}
+ \pgfpathcurveto
+ {\pgfqpoint{.15\pgfdecorationsegmentamplitude}{.7\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ }
+ {
+ \pgftransformxshift{+\pgfdecoratedremainingdistance}
+ \pgfpathlineto{\pgfqpoint{-\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ \pgfpathcurveto
+ {\pgfqpoint{-.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{-.15\pgfdecorationsegmentamplitude}{.3\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{0pt}{0pt}}
+ }
+ }
+ \state{final}
+ {}
+}
+
+
+
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.shapes.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.shapes.code.tex
new file mode 100644
index 00000000000..6e1b25101bd
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.shapes.code.tex
@@ -0,0 +1,468 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usepgfmodule{decorations}
+
+
+% Options for shape decorations
+
+\pgfkeys{
+ /pgf/decoration/.cd,
+ shape/.initial=circle,
+ anchor/.initial=center,
+ shape start width/.initial=2.5pt,
+ shape start height/.initial=2.5pt,
+ shape end width/.initial=2.5pt,
+ shape end height/.initial=2.5pt,
+ shape sep/.store in=\pgf@lib@shapedecoration@sep,
+ shape sloped/.is if=pgfshapedecorationsloped,
+ shape scaled/.is if=pgfshapedecorationscaled,
+ shape evenly spread/.store in=\pgf@lib@shapedecoration@spread,
+ shape start size/.style={%
+ shape start width=#1,
+ shape start height=#1%
+ },%
+ shape end size/.style={%
+ shape end width=#1,
+ shape end height=#1%
+ },%
+ shape size/.style={%
+ shape start size=#1,
+ shape end size=#1%
+ },%
+ shape width/.style={%
+ shape start width=#1,
+ shape end width=#1
+ },
+ shape height/.style={%
+ shape start height=#1,
+ shape end height=#1
+ }
+}
+
+\def\pgf@lib@shapedecoration@sep{.25cm, between centers}
+\newif\ifpgfshapedecorationsloped
+\pgfshapedecorationslopedtrue
+\newif\ifpgfshapedecorationscaled
+\let\pgf@lib@shapedecoration@spread\pgfutil@empty%
+
+
+
+% triangle decoration
+
+\pgfdeclaredecoration{triangles}{init}
+{
+ \state{init}[width=+0pt,next state=triangle,persistent precomputation={
+ \pgfmathparse{\pgfkeysvalueof{/pgf/decoration/shape start width}}
+ \edef\pgf@lib@dec@ssw{\pgfmathresult pt}
+ \pgfmathparse{\pgfkeysvalueof{/pgf/decoration/shape start height}/2}
+ \edef\pgf@lib@dec@ssh{\pgfmathresult pt}
+ }]{}
+ \state{triangle}[switch if less than=+\pgfdecorationsegmentlength to last,
+ width=+\pgfdecorationsegmentlength]
+ {
+ \pgfpathmoveto{\pgfqpoint{0pt}{\pgf@lib@dec@ssh}}
+ \pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{0pt}}
+ \pgfpathlineto{\pgfqpoint{0pt}{-\pgf@lib@dec@ssh}}
+ \pgfpathclose
+ }
+ \state{last}[switch if less than=\pgf@lib@dec@ssw to skip,
+ width=\pgfdecoratedremainingdistance,next state=final]
+ {
+ \pgfpathmoveto{\pgfqpoint{0pt}{\pgf@lib@dec@ssh}}
+ \pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{0pt}}
+ \pgfpathlineto{\pgfqpoint{0pt}{-\pgf@lib@dec@ssh}}
+ \pgfpathclose
+ }
+ \state{skip}[width=\pgfdecoratedremainingdistance]
+ {}
+ \state{final}
+ {
+ \pgfpathmoveto{\pgfpointdecoratedpathlast}
+ }
+}
+
+
+
+
+% crosses decoration
+
+\pgfdeclaredecoration{crosses}{init}
+{
+ \state{init}[width=+0pt,next state=crosses,persistent precomputation={
+ \pgfmathparse{\pgfkeysvalueof{/pgf/decoration/shape start width}/2}
+ \edef\pgf@lib@dec@ssw{\pgfmathresult pt}
+ \pgfmathparse{\pgfkeysvalueof{/pgf/decoration/shape start height}/2}
+ \edef\pgf@lib@dec@ssh{\pgfmathresult pt}
+ }]{}
+ \state{crosses}[switch if less than=+\pgfdecorationsegmentlength to last,
+ width=+\pgfdecorationsegmentlength]
+ {
+ \pgfpathmoveto{\pgfqpoint{-\pgf@lib@dec@ssw}{\pgf@lib@dec@ssh}}
+ \pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{-\pgf@lib@dec@ssh}}
+ \pgfpathmoveto{\pgfqpoint{-\pgf@lib@dec@ssw}{-\pgf@lib@dec@ssh}}
+ \pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{\pgf@lib@dec@ssh}}
+ }
+ \state{last}[width=+\pgfdecoratedremainingdistance]
+ {
+ \pgfpathmoveto{\pgfqpoint{-\pgf@lib@dec@ssw}{\pgf@lib@dec@ssh}}
+ \pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{-\pgf@lib@dec@ssh}}
+ \pgfpathmoveto{\pgfqpoint{-\pgf@lib@dec@ssw}{-\pgf@lib@dec@ssh}}
+ \pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{\pgf@lib@dec@ssh}}
+ }
+ \state{final}{
+ \pgfpathmoveto{\pgfpointdecoratedpathlast}
+ }
+}
+
+
+
+
+
+
+% The shape background decoration
+%
+% The shape background decoration adds repeated instances of
+% the background path of a specified shape along the path. The shape
+% must have been declared by \pgfdeclareshape. If a shape has
+% specialized keys (e.g. the number of points on a star, or the apex
+% angle the isosceles triangle), these can be specified in the usual manner.
+%
+% The sepatation between shapes in the path can be specified and can
+% be between the center of the shape or the border of the shape.
+%
+% The height and width of the shape can be independently or
+% simultaneously scaled (linearly) along the path. It is also
+% possible to prevent the shapes being sloped parallel to the
+% path.
+
+% internal if
+\newif\ifpgf@lib@shapedecoration@betweenborders
+
+\edef\pgf@lib@shapedecoration@initialise{0pt}%
+
+\pgfdeclaredecoration{shape backgrounds}{initialise}
+{
+ \state{initialise}
+ [
+ width=+\pgf@lib@shapedecoration@initialise,
+ next state=shape,
+ persistent precomputation=
+ {
+ %
+ % \egroup ends the group started by the automaton before executing
+ % a decoration state. This prevents the need for (most) \global variables.
+ %
+ %
+ % Check the shape exists.
+ %
+ \pgfutil@ifundefined{pgf@sh@bg@\pgfkeysvalueof{/pgf/decoration/shape}}{%
+ \PackageError{PGF}{I do not know the shape `\pgfkeysvalueof{/pgf/decoration/shape}',
+ so I cannot use it in a decoration. Check if its library been loaded or if you
+ simply mistyped the name}{}}{}%
+ %
+ % Calculate a `default' path size.
+ %
+ \pgfinterruptpath%
+ \pgfinterruptboundingbox%
+ \pgftransformreset%
+ \pgf@relevantforpicturesizetrue%
+ %
+ % This size of this shape is unimportant, but it should
+ % be just large/small enough to avoid huge errors when
+ % calculting the scaling factors later on.
+ %
+ \pgfkeys{/pgf/inner sep=50pt, /pgf/minimum size=1pt}% Arbitrary lengths.
+ \setbox\pgfnodeparttextbox\hbox{}% Assume shape does nothing special if box is empty.
+ \let\pgf@sh@savedmacros\pgfutil@empty%
+ \let\pgf@sh@savedpoints\pgfutil@empty%
+ \csname pgf@sh@s@\pgfkeysvalueof{/pgf/decoration/shape}\endcsname%
+ \pgf@sh@savedpoints%
+ \pgf@sh@savedmacros%
+ %
+ % Save the macros and pionts.
+ %
+ \expandafter\gdef\expandafter\pgf@lib@shapedecoration@points\expandafter{\pgf@sh@savedpoints}%
+ \expandafter\gdef\expandafter\pgf@lib@shapedecoration@macros\expandafter{\pgf@sh@savedmacros}%
+ \csname pgf@sh@bg@\pgfkeysvalueof{/pgf/decoration/shape}\endcsname%
+ %
+ % Save the dimensions of the shape path.
+ %
+ \pgf@x\pgf@picmaxx%
+ \pgf@y\pgf@picmaxy%
+ \advance\pgf@x-\pgf@picminx%
+ \advance\pgf@y-\pgf@picminy%
+ \xdef\pgf@lib@shapedecoration@shapepathsize{%
+ \noexpand\pgf@x\the\pgf@x%
+ \noexpand\pgf@y\the\pgf@y%
+ }%
+ \endpgfinterruptboundingbox%
+ \endpgfinterruptpath%
+ %
+ \edef\pgf@lib@shapedecoration@beforeshape{0pt}%
+ \edef\pgf@lib@shapedecoration@aftershape{0pt}%
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/decoration/shape start width}}%
+ \edef\pgf@lib@shapedecoration@startwidth{\the\pgf@x}%
+ \edef\pgf@lib@shapedecoration@width{\the\pgf@x}%
+ \pgf@x-\pgf@x%
+ \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/decoration/shape end width}}%
+ \edef\pgf@lib@shapedecoration@widthchange{\the\pgf@x}%
+ %
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/decoration/shape start height}}%
+ \edef\pgf@lib@shapedecoration@initialheight{\the\pgf@y}%
+ \edef\pgf@lib@shapedecoration@height{\the\pgf@y}%
+ \pgf@y-\pgf@y%
+ \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/decoration/shape end height}}%
+ \edef\pgf@lib@shapedecoration@heightchange{\the\pgf@y}%
+ %
+ % Calculate the sep.
+ %
+ \ifx\pgf@lib@shapedecoration@spread\pgfutil@empty%
+ %
+ % Not spreading, so easy:
+ %
+ \def\pgf@lib@shapedecoration@borderstext{between borders}%
+ \afterassignment\pgf@lib@shapedecoration@setkeyword%
+ \expandafter\pgf@x\pgf@lib@shapedecoration@sep,\pgf@stop%
+ \edef\pgf@lib@shapedecoration@sep{\the\pgf@x}%
+ \else%
+ %
+ % Spreading (a bit of a nuiscence actually).
+ %
+ \def\pgf@lib@shapedecoration@borderstext{by borders}%
+ \afterassignment\pgf@lib@shapedecoration@setkeyword%
+ \expandafter\c@pgf@counta\pgf@lib@shapedecoration@spread,\pgf@stop%
+ \ifpgf@lib@shapedecoration@betweenborders%
+ %
+ % Ok. The required sep between borders is:
+ %
+ % (r -(n-1)((a+b)/2))/(n-1)
+ %
+ % r = decoration length (here, the remaining distance)
+ % a = initial width
+ % b = end width
+ % n = the number of shapes
+ %
+ \ifnum\c@pgf@counta>1\relax%
+ \advance\c@pgf@counta-1\relax%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/decoration/shape start width}}%
+ \ifpgfshapedecorationscaled%
+ \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/decoration/shape end width}}%
+ \else%
+ \advance\pgf@x\pgf@x%
+ \fi%
+ \pgf@x.5\pgf@x% (a+b)/2
+ \multiply\pgf@x-\c@pgf@counta% -(n-1)((a+b)/2)
+ \advance\pgf@x\pgfdecoratedremainingdistance%
+ \divide\pgf@x\c@pgf@counta%
+ \pgf@x.9999\pgf@x% Hackery to control some native TeX inaccuracies.
+ %
+ % Unfortunately if the shape is scaled, and evenly spread by borders,
+ % it is necessary to do something a bit different to control for
+ % (most) inaccuracies.
+ %
+ \ifpgfshapedecorationscaled%
+ \pgf@xa\pgf@lib@shapedecoration@widthchange\relax%
+ \divide\pgf@xa\c@pgf@counta%
+ \edef\pgf@lib@shapedecoration@specialwidth{\the\pgf@xa}%
+ \fi%
+ \else%
+ \pgf@lib@shapedecoration@betweenbordersfalse%
+ \pgf@x\pgfdecoratedremainingdistance%
+ \ifnum\c@pgf@counta=1\relax%
+ \pgf@y.5\pgf@x%
+ \edef\pgf@lib@shapedecoration@initialise{\the\pgf@y}%
+ \else%
+ \advance\pgf@x5pt\relax% An arbitrary value >0pt.
+ \edef\pgf@lib@shapedecoration@initialise{\the\pgf@x}%
+ \fi%
+ \fi%
+ \else%
+ %
+ % Between centers.
+ %
+ \pgf@x\pgfdecoratedremainingdistance%
+ \ifnum\c@pgf@counta>1\relax%
+ \advance\c@pgf@counta-1\relax%
+ \divide\pgf@x\c@pgf@counta\relax%
+ \else%
+ \ifnum\c@pgf@counta=1\relax%
+ \pgf@y.5\pgf@x%
+ \edef\pgf@lib@shapedecoration@initialise{\the\pgf@y}%
+ \else%
+ \advance\pgf@x5pt\relax% An arbitrary value >0pt.
+ \edef\pgf@lib@shapedecoration@initialise{\the\pgf@x}%
+ \fi%
+ \fi%
+ \fi%
+ \edef\pgf@lib@shapedecoration@sep{\the\pgf@x}%
+ \fi%
+ }]
+ {}
+ \state{before shape}
+ [
+ width=\pgf@lib@shapedecoration@beforeshape-1sp,
+ next state=shape,
+ persistent precomputation=
+ {
+ \ifpgfshapedecorationscaled%
+ \ifpgf@lib@shapedecoration@betweenborders%
+ \ifx\pgf@lib@shapedecoration@spread\pgfutil@empty%
+ %
+ % Not so straightforward. The required ratio is given by
+ %
+ % R = (c+W/2)/(c+r-.5*w)
+ %
+ % c = completed distance
+ % r = remaining distance
+ % W = initial width
+ % w = the change in width (i.e., end - start)
+ %
+ \pgf@x\pgfdecoratedcompleteddistance%
+ \advance\pgf@x\pgfdecoratedremainingdistance%
+ \pgf@xa\pgf@lib@shapedecoration@startwidth\relax%
+ \pgf@xa.5\pgf@xa%
+ \advance\pgf@xa\pgfdecoratedcompleteddistance% c+W/2
+ %
+ \pgf@xb\pgf@lib@shapedecoration@widthchange\relax%
+ \pgf@xb-.5\pgf@xb%
+ \advance\pgf@xb\pgf@x% c+r-.5*w
+ %
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@xb}}%
+ \fi%
+ \else%
+ %
+ % Easy peasy. The required ratio is
+ %
+ % R = c / (c+r)
+ %
+ \pgf@y\pgfdecoratedcompleteddistance%
+ \advance\pgf@y\pgfdecoratedremainingdistance%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgfdecoratedcompleteddistance}}{\pgfmath@tonumber{\pgf@y}}%
+ \fi%
+ %
+ % Get the new width.
+ %
+ \ifx\pgf@lib@shapedecoration@spread\pgfutil@empty%
+ \pgf@x\pgf@lib@shapedecoration@widthchange\relax%
+ \pgf@x\pgfmathresult\pgf@x%
+ \advance\pgf@x\pgf@lib@shapedecoration@startwidth\relax%
+ \else%
+ \ifpgf@lib@shapedecoration@betweenborders%
+ %
+ % Specical case when decoration is scaled, and evenly spread by borders.
+ %
+ \pgf@x\pgf@lib@shapedecoration@width\relax%
+ \advance\pgf@x\pgf@lib@shapedecoration@specialwidth\relax%
+ \pgf@xa\pgf@x%
+ \advance\pgf@xa-\pgf@lib@shapedecoration@startwidth\relax%
+ \pgf@xb\pgf@lib@shapedecoration@widthchange\relax%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@xb}}%
+ \else%
+ \pgf@x\pgf@lib@shapedecoration@widthchange\relax%
+ \pgf@x\pgfmathresult\pgf@x%
+ \advance\pgf@x\pgf@lib@shapedecoration@startwidth\relax%
+ \fi%
+ \fi%
+ \edef\pgf@lib@shapedecoration@width{\the\pgf@x}%
+ %
+ % New height = R*h + H
+ %
+ \pgf@y\pgf@lib@shapedecoration@heightchange\relax%
+ \pgf@y\pgfmathresult\pgf@y%
+ \advance\pgf@y\pgf@lib@shapedecoration@initialheight\relax%
+ \edef\pgf@lib@shapedecoration@height{\the\pgf@y}%
+ \fi%
+ %
+ \ifpgf@lib@shapedecoration@betweenborders%
+ \pgf@x\pgf@lib@shapedecoration@width\relax%
+ \pgf@x.5\pgf@x%
+ \edef\pgf@lib@shapedecoration@beforeshape{\the\pgf@x}%
+ \else%
+ \def\pgf@lib@shapedecoration@beforeshape{0pt}%
+ \fi%
+ }]
+ {}
+ \state{shape}[width=+0sp,next state=after shape]
+ {
+ \ifpgfshapedecorationsloped%
+ \else%
+ \pgftransformrotate{-\pgfdecoratedangle}%
+ \fi%
+ %
+ % Scale the path when it is actually drawn.
+ %
+ \pgf@lib@shapedecoration@shapepathsize%
+ \pgfutil@tempdima\pgf@x%
+ \pgfutil@tempdimb\pgf@y%
+ \pgf@xa\pgf@lib@shapedecoration@width\relax%
+ \pgf@xb\pgfutil@tempdima%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@xb}}%
+ \expandafter\pgftransformxscale\expandafter{\pgfmathresult}%
+ %
+ \pgf@ya\pgf@lib@shapedecoration@height\relax%
+ \pgf@yb\pgfutil@tempdimb%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@ya}}{\pgfmath@tonumber{\pgf@yb}}%
+ \expandafter\pgftransformyscale\expandafter{\pgfmathresult}%
+ %
+ % Move to the center anchor.
+ %
+ \pgf@lib@shapedecoration@points%
+ \pgf@lib@shapedecoration@macros%
+ \pgftransformshift{%
+ \pgf@sh@reanchor{\pgfkeysvalueof{/pgf/decoration/shape}}{\pgfkeysvalueof{/pgf/decoration/anchor}}%
+ \pgf@x-\pgf@x%
+ \pgf@y-\pgf@y%
+ }%
+ %
+ % And draw the shape path.
+ %
+ \csname pgf@sh@bg@\pgfkeysvalueof{/pgf/decoration/shape}\endcsname%
+ }
+ \state{after shape}
+ [
+ width=\pgf@lib@shapedecoration@aftershape-1sp,
+ next state=sep,
+ persistent precomputation=
+ {
+ \ifpgf@lib@shapedecoration@betweenborders%
+ \pgf@x\pgf@lib@shapedecoration@width\relax%
+ \pgf@x.5\pgf@x%
+ \edef\pgf@lib@shapedecoration@aftershape{\the\pgf@x}%
+ \else%
+ \edef\pgf@lib@shapedecoration@aftershape{0pt}%
+ \fi%
+ }
+ ]
+ {}
+ \state{sep}[width=\pgf@lib@shapedecoration@sep,next state=before shape,
+ persistent precomputation=\def\pgf@lib@shapedecoration@beforeshape{0pt}]
+ {}
+ \state{final}
+ {
+ \pgfpathmoveto{\pgfpointdecoratedpathlast}%
+ }
+}
+
+\def\pgf@lib@shapedecoration@setkeyword,{%
+ \pgfutil@ifnextchar\pgf@stop{\def\pgf@temp{}\pgf@lib@@@shapedecoration@setkeyword}{\pgf@lib@@shapedecoration@setkeyword}%
+}
+\def\pgf@lib@@shapedecoration@setkeyword#1,{\def\pgf@temp{#1}\pgf@lib@@@shapedecoration@setkeyword}
+\def\pgf@lib@@@shapedecoration@setkeyword\pgf@stop{%
+ \ifx\pgf@temp\pgf@lib@shapedecoration@borderstext%
+ \pgf@lib@shapedecoration@betweenborderstrue%
+ \else%
+ \pgf@lib@shapedecoration@betweenbordersfalse%
+ \fi%
+}
+
+
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.text.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.text.code.tex
new file mode 100644
index 00000000000..b773e36563c
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.text.code.tex
@@ -0,0 +1,233 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usepgfmodule{decorations}
+
+
+% Options for text decorations
+
+\pgfkeys{
+ /pgf/decoration/.cd,
+ text/.store in=\pgfdecorationtext,%
+ text color/.store in=\pgf@lib@decorationtextcolor,%
+ text format delimiters/.code={\expandafter\pgfsetdecoratetextformatdelimiters#1}
+}
+\def\pgf@lib@decorationtextcolor{black}
+
+% Decorates a path with a text. The path is removed during this
+% process
+
+\pgfdeclaredecoration{text along path}{initial}{
+ \state{initial}[width=+0pt,
+ next state=scan,
+ persistent precomputation=\let\pgfdecorationrestoftext\pgfdecorationtext]
+ {}
+ \state{scan}[width=+0pt,
+ next state=before typeset,
+ persistent precomputation=
+ {
+ \pgf@lib@decorations@text@scanchar%
+ \ifvoid\pgf@lib@decorations@text@box%
+ \setbox\pgf@lib@decorations@text@box\hbox{}%
+ \wd\pgf@lib@decorations@text@box16383pt\relax%
+ \fi%
+ }]
+ {}
+ \state{before typeset}[width=+.5\wd\pgf@lib@decorations@text@box, next state=typeset]{}
+ \state{typeset}[width=+0pt, next state=after typeset]
+ {
+ \pgftransformxshift{+-.5\wd\pgf@lib@decorations@text@box}%
+ \setbox\pgf@hbox\hbox{\copy\pgf@lib@decorations@text@box}%
+ \pgfqboxsynced\pgf@hbox%
+ }
+ \state{after typeset}[width=+.5\wd\pgf@lib@decorations@text@box, next state=scan]{}
+ \state{final}{}
+}
+
+
+% \pgfsetdecoratetextformatdelimiters
+%
+% Set the delimiters for formatting in the text decoration.
+% NB: Catcodes for delimiters should be 11 or 12.
+%
+% Examples:
+%
+% \pgfsetdecoratetextformatdelimiters{|}{}% 2nd argument can be empty.
+%
+% \def\pgfdecoratetext{A big |\color{red}|red|| apple.}
+%
+% \pgfsetdecoratetextformatdelimiters{[}{]}
+%
+% \def\pgfdecoratetext{The [\it]very[+\color{green}]green[] sprouts.}
+%
+\def\pgfsetdecoratetextformatdelimiters#1#2{%
+ \def\pgf@lib@decorations@text@formatchar{#1}%
+ \def\pgf@test{#2}%
+ \ifx\pgf@test\pgfutil@empty%
+ \def\pgf@lib@decorations@text@collectformat##1#1{%
+ \pgf@lib@decorations@text@@collectformat##1\pgf@stop}%
+ \else%
+ \def\pgf@lib@decorations@text@collectformat##1#2{%
+ \pgf@lib@decorations@text@@collectformat##1\pgf@stop}%
+ \fi%
+}
+
+\pgfsetdecoratetextformatdelimiters{|}{}
+
+\newbox\pgf@lib@decorations@text@box
+\newif\ifpgf@lib@decorate@textmathmode
+
+\let\pgfdecorationtext\pgfutil@empty
+\let\pgfdecorationrestoftext\pgfutil@empty%
+\let\pgf@lib@decorations@text@format\pgfutil@empty
+
+\def\pgf@lib@decorations@text@scanchar{%
+ \ifx\pgfdecorationrestoftext\pgfutil@empty%
+ \let\pgf@lib@decorations@text@char\pgfutil@empty%
+ \setbox\pgf@lib@decorations@text@box\box\voidb@x%
+ \let\pgf@next\relax%
+ \else%
+ \let\pgf@next\pgf@lib@decorations@text@@scanchar%
+ \fi%
+ \pgf@next}
+
+\def\pgf@lib@decorations@text@@scanchar{%
+ \expandafter\pgf@lib@decorations@text@@@scanchar\pgfdecorationrestoftext\pgf@stop}
+
+\def\pgf@lib@decorations@text@@@scanchar{%
+ \futurelet\pgf@lib@decorations@lettoken%
+ \pgf@lib@decorations@text@@@@scanchar}
+
+\def\pgf@lib@decorations@text@@@@scanchar{%
+ \ifx\pgf@lib@decorations@lettoken\pgfutil@sptoken%
+ \let\pgf@next\pgf@lib@decorations@text@insertspace%
+ \else%
+ \let\pgf@next\pgf@lib@decorations@text@@@@@scanchar%
+ \fi%
+ \pgf@next}
+
+\def\pgf@lib@decorations@text@@@@@scanchar{%
+ \pgfutil@ifnextchar\bgroup{\pgf@lib@decorations@text@collectgroup}%
+ {\pgf@lib@decorations@text@@@@@@scanchar}}
+
+\def\pgf@lib@decorations@text@collectgroup#1{%
+ \def\pgf@lib@decorations@text@char{#1}%
+ \pgf@lib@decorations@text@collectrestoftext}
+
+\def\pgf@lib@decorations@text@@@@@@scanchar#1{%
+ \ifx#1\pgf@stop%
+ \pgf@lib@decorations@text@box\box\voidb@x%
+ \let\pgf@next\pgf@lib@decorations@text@endoftext%
+ \else%
+ \def\pgf@lib@decorations@text@char{#1}%
+ \ifx#1\space%
+ \let\pgf@next\pgf@lib@decorations@text@collectrestoftext%
+ \else%
+ \ifx#1\ %
+ \let\pgf@next\pgf@lib@decorations@text@collectrestoftext%
+ \else%
+ \ifx\pgf@lib@decorations@text@char\pgf@lib@decorations@text@formatchar%
+ \let\pgf@next\pgf@lib@decorations@text@collectformat%
+ \else%
+ \expandafter\ifcat\noexpand#1\relax%
+ \let\pgf@next\pgf@lib@decorations@text@expandcs%
+ \else%
+ \ifnum\catcode`#1=3\relax%
+ \ifpgf@lib@decorate@textmathmode%
+ \pgf@lib@decorate@textmathmodefalse%
+ \else%
+ \pgf@lib@decorate@textmathmodetrue%
+ \fi%
+ \let\pgf@next\pgf@lib@decorations@text@@@scanchar%
+ \else%
+ \let\pgf@next\pgf@lib@decorations@text@collectrestoftext%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \pgf@next%
+}
+
+\def\pgf@lib@decorations@text@@collectformat{%
+ \pgfutil@ifnextchar+{\pgf@lib@decorations@text@addtoformat}{\pgf@lib@decorations@text@setformat}}
+
+\def\pgf@lib@decorations@text@setformat#1\pgf@stop{%
+ \def\pgf@lib@decorations@text@format{#1}%
+ \pgf@lib@decorations@text@@@scanchar%
+}
+
+\def\pgf@lib@decorations@text@addtoformat+#1\pgf@stop{%
+ \expandafter\def\expandafter\pgf@lib@decorations@text@format\expandafter{\pgf@lib@decorations@text@format#1}%
+ \pgf@lib@decorations@text@@@scanchar%
+}
+
+\def\pgf@lib@decorations@text@insertspace{%
+ \pgfutil@ifnextchar\bgroup{\pgf@lib@decorations@text@@insertspacegrp}%
+ {\pgf@lib@decorations@text@@insertspace}}
+
+\def\pgf@lib@decorations@text@@insertspacegrp#1{%
+ \pgf@lib@decorations@text@@@@@@scanchar\space{#1}}
+
+\def\pgf@lib@decorations@text@@insertspace#1{%
+ \pgf@lib@decorations@text@@@@@@scanchar\space#1}
+
+\def\pgf@lib@decorations@text@expandcs{%
+ \expandafter\expandafter\expandafter\pgf@lib@decorations@text@@@@@scanchar%
+ \pgf@lib@decorations@text@char}
+
+\def\pgf@lib@decorations@text@endoftext{%
+ \let\pgfdecoraterestoftext\pgfutil@empty%
+ \let\pgf@lib@decorations@text@char\pgfutil@empty%
+}
+\def\pgf@lib@decorations@text@collectrestoftext{%
+ \pgf@lib@decorations@text@dobox%
+ \futurelet\pgf@lib@decorations@text@lettoken%
+ \pgf@lib@decorations@text@@collectrestoftext}
+
+\def\pgf@lib@decorations@text@@collectrestoftext{%
+ \ifx\bgroup\pgf@lib@decorations@text@lettoken%
+ \let\pgf@next\pgf@lib@decorations@text@@@collectrestoftextgrp%
+ \else%
+ \let\pgf@next\pgf@lib@decorations@text@@@collectrestoftext%
+ \fi%
+ \pgf@next}
+
+\def\pgf@lib@decorations@text@@@collectrestoftextgrp#1#2\pgf@stop{\def\pgfdecorationrestoftext{{#1}#2}%
+}
+
+\def\pgf@lib@decorations@text@@@collectrestoftext#1\pgf@stop{\def\pgfdecorationrestoftext{#1}}
+
+{%
+ \catcode`\$3 %
+ \gdef\pgf@lib@decorations@mathshift{$}%
+ \catcode`\$9 $% For editors with annoying syntax highlighting.
+}%
+
+\def\pgf@lib@decorations@text@dobox{%
+ \setbox\pgf@lib@decorations@text@box\hbox{%
+ \pgfinterruptpicture%
+ \begingroup%
+ \pgfsetcolor{\pgf@lib@decorationtextcolor}%
+ \ifpgf@lib@decorate@textmathmode\pgf@lib@decorations@mathshift\fi%
+ \pgf@lib@decorations@text@format\relax%
+ \pgf@lib@decorations@text@char%
+ \ifpgf@lib@decorate@textmathmode\pgf@lib@decorations@mathshift\fi%
+ \endgroup%
+ \endpgfinterruptpicture%
+ }%
+}
+
+
+
+
+
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex
new file mode 100644
index 00000000000..39fca783437
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex
@@ -0,0 +1,57 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryfadings.code.tex,v 1.3 2008/02/07 19:25:41 tantau Exp $
+
+
+% Axial fadings
+
+\pgfdeclarehorizontalshading{pgf@lib@fade@east}{100bp}
+{color(0bp)=(pgftransparent!0); color(25bp)=(pgftransparent!0);
+ color(75bp)=(pgftransparent!100); color(100bp)=(pgftransparent!100)}
+
+\pgfdeclarehorizontalshading{pgf@lib@fade@west}{100bp}
+{color(0bp)=(pgftransparent!100); color(25bp)=(pgftransparent!100);
+ color(75bp)=(pgftransparent!0); color(100bp)=(pgftransparent!0)}
+
+\pgfdeclareverticalshading{pgf@lib@fade@north}{100bp}
+{color(0bp)=(pgftransparent!0); color(25bp)=(pgftransparent!0);
+ color(75bp)=(pgftransparent!100); color(100bp)=(pgftransparent!100)}
+
+\pgfdeclareverticalshading{pgf@lib@fade@south}{100bp}
+{color(0bp)=(pgftransparent!100); color(25bp)=(pgftransparent!100);
+ color(75bp)=(pgftransparent!0); color(100bp)=(pgftransparent!0)}
+
+\pgfdeclarefading{east}{\pgfuseshading{pgf@lib@fade@east}}
+\pgfdeclarefading{west}{\pgfuseshading{pgf@lib@fade@west}}
+\pgfdeclarefading{north}{\pgfuseshading{pgf@lib@fade@north}}
+\pgfdeclarefading{south}{\pgfuseshading{pgf@lib@fade@south}}
+
+
+% Circular fadings
+
+\pgfdeclareradialshading{tikz@lib@fade@circle@10}{\pgfpointorigin}{
+ color(0pt)=(pgftransparent!0); color(22.5bp)=(pgftransparent!0);
+ color(25bp)=(pgftransparent!100); color(50bp)=(pgftransparent!100)}
+\pgfdeclarefading{circle with fuzzy edge 10 percent}{\pgfuseshading{tikz@lib@fade@circle@10}}
+
+\pgfdeclareradialshading{tikz@lib@fade@circle@15}{\pgfpointorigin}{
+ color(0pt)=(pgftransparent!0); color(21.25bp)=(pgftransparent!0);
+ color(25bp)=(pgftransparent!100); color(50bp)=(pgftransparent!100)}
+\pgfdeclarefading{circle with fuzzy edge 15 percent}{\pgfuseshading{tikz@lib@fade@circle@15}}
+
+\pgfdeclareradialshading{tikz@lib@fade@circle@20}{\pgfpointorigin}{
+ color(0pt)=(pgftransparent!0); color(20bp)=(pgftransparent!0);
+ color(25bp)=(pgftransparent!100); color(50bp)=(pgftransparent!100)}
+\pgfdeclarefading{circle with fuzzy edge 20 percent}{\pgfuseshading{tikz@lib@fade@circle@20}}
+
+\pgfdeclareradialshading{tikz@lib@fade@fuzzy@15}{\pgfpointorigin}{
+ color(0pt)=(pgftransparent!100); color(21.25bp)=(pgftransparent!100); color(23.125bp)=(pgftransparent!0);
+ color(25bp)=(pgftransparent!100); color(50bp)=(pgftransparent!100)}
+\pgfdeclarefading{fuzzy ring 15 percent}{\pgfuseshading{tikz@lib@fade@fuzzy@15}}
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.tex
deleted file mode 100644
index 92352856dbe..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.tex
+++ /dev/null
@@ -1,140 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarypatterns.code.tex,v 1.8 2007/03/09 17:49:32 tantau Exp $
-
-
-% Lines in different directions
-
-\pgfdeclarepatternformonly{horizontal lines}{\pgfpointorigin}{\pgfqpoint{100pt}{1pt}}{\pgfqpoint{100pt}{3pt}}%
-{
- \pgfsetlinewidth{0.4pt}
- \pgfpathmoveto{\pgfqpoint{0pt}{0.5pt}}
- \pgfpathlineto{\pgfqpoint{100pt}{0.5pt}}
- \pgfusepath{stroke}
-}
-
-\pgfdeclarepatternformonly{vertical lines}{\pgfpointorigin}{\pgfqpoint{1pt}{100pt}}{\pgfqpoint{3pt}{100pt}}%
-{
- \pgfsetlinewidth{0.4pt}
- \pgfpathmoveto{\pgfqpoint{0.5pt}{0pt}}
- \pgfpathlineto{\pgfqpoint{0.5pt}{100pt}}
- \pgfusepath{stroke}
-}
-
-\pgfdeclarepatternformonly{north east lines}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{4pt}{4pt}}{\pgfqpoint{3pt}{3pt}}%
-{
- \pgfsetlinewidth{0.4pt}
- \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
- \pgfpathlineto{\pgfqpoint{3.1pt}{3.1pt}}
- \pgfusepath{stroke}
-}
-
-\pgfdeclarepatternformonly{north west lines}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{4pt}{4pt}}{\pgfqpoint{3pt}{3pt}}%
-{
- \pgfsetlinewidth{0.4pt}
- \pgfpathmoveto{\pgfqpoint{0pt}{3pt}}
- \pgfpathlineto{\pgfqpoint{3.1pt}{-0.1pt}}
- \pgfusepath{stroke}
-}
-
-% Crossed lines in different directions
-
-\pgfdeclarepatternformonly{grid}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{4pt}{4pt}}{\pgfqpoint{3pt}{3pt}}%
-{
- \pgfsetlinewidth{0.4pt}
- \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
- \pgfpathlineto{\pgfqpoint{0pt}{3.1pt}}
- \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
- \pgfpathlineto{\pgfqpoint{3.1pt}{0pt}}
- \pgfusepath{stroke}
-}
-
-\pgfdeclarepatternformonly{crosshatch}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{4pt}{4pt}}{\pgfqpoint{3pt}{3pt}}%
-{
- \pgfsetlinewidth{0.4pt}
- \pgfpathmoveto{\pgfqpoint{3.1pt}{0pt}}
- \pgfpathlineto{\pgfqpoint{0pt}{3.1pt}}
- \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
- \pgfpathlineto{\pgfqpoint{3.1pt}{3.1pt}}
- \pgfusepath{stroke}
-}
-
-
-% Dotted regions
-
-\pgfdeclarepatternformonly{dots}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{1pt}{1pt}}{\pgfqpoint{3pt}{3pt}}%
-{
- \pgfpathcircle{\pgfqpoint{0pt}{0pt}}{.5pt}
- \pgfusepath{fill}
-}
-
-\pgfdeclarepatternformonly{crosshatch dots}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{2.5pt}{2.5pt}}{\pgfqpoint{3pt}{3pt}}%
-{
- \pgfpathcircle{\pgfqpoint{0pt}{0pt}}{.5pt}
- \pgfpathcircle{\pgfqpoint{1.5pt}{1.5pt}}{.5pt}
- \pgfusepath{fill}
-}
-
-
-
-
-% Star shaped patterns
-
-\pgfdeclarepatternformonly{fivepointed stars}{\pgfpointorigin}{\pgfqpoint{3mm}{3mm}}{\pgfqpoint{3mm}{3mm}}%
-{
- \pgftransformshift{\pgfqpoint{1mm}{1mm}}
- \pgfpathmoveto{\pgfqpointpolar{18}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{162}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{306}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{90}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{234}{1mm}}
- \pgfpathclose%
- \pgfusepath{fill}
-}
-
-\pgfdeclarepatternformonly{sixpointed stars}{\pgfpointorigin}{\pgfqpoint{3mm}{3mm}}{\pgfqpoint{3mm}{3mm}}%
-{
- \pgftransformshift{\pgfqpoint{1mm}{1mm}}
- \pgfpathmoveto{\pgfqpointpolar{30}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{150}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{270}{1mm}}
- \pgfpathclose%
- \pgfpathmoveto{\pgfqpointpolar{-30}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{-270}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{-150}{1mm}}
- \pgfpathclose%
- \pgfsetnonzerorule
- \pgfusepath{fill}
-}
-
-
-
-% Bricks
-
-\pgfdeclarepatternformonly{bricks}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{5mm}{5mm}}{\pgfqpoint{4mm}{4mm}}%
-{
- \pgfsetlinewidth{0.8pt}
- \pgfpathmoveto{\pgfqpoint{0mm}{1mm}}
- \pgfpathlineto{\pgfqpoint{4mm}{1mm}}
- \pgfpathmoveto{\pgfqpoint{0mm}{3mm}}
- \pgfpathlineto{\pgfqpoint{4mm}{3mm}}
- \pgfpathmoveto{\pgfqpoint{1mm}{0mm}}
- \pgfpathlineto{\pgfqpoint{1mm}{1mm}}
- \pgfpathmoveto{\pgfqpoint{3mm}{1mm}}
- \pgfpathlineto{\pgfqpoint{3mm}{3mm}}
- \pgfpathmoveto{\pgfqpoint{1mm}{3mm}}
- \pgfpathlineto{\pgfqpoint{1mm}{4mm}}
- \pgfusepath{stroke}
-}
-
-
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
deleted file mode 100644
index a0f504431eb..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
+++ /dev/null
@@ -1,520 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryplothandlers.code.tex,v 1.9 2007/03/09 17:49:32 tantau Exp $
-
-\newif\ifpgf@plot@started
-
-
-% This handler converts each plot stream command into a curveto
-% command, except for the first, which is converted to the previously
-% specified action.
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfpointorigin}
-% \pgfsetlinetofirstplotpoint
-% \pgfplothandlercurveto
-% \pgfplotxyfile{mytable}
-
-\def\pgfplothandlercurveto{%
- \def\pgf@plotstreamstart{%
- \global\let\pgf@plotstreampoint=\pgf@plot@curveto@handler@initial%
- \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
- \global\let\pgf@plotstreamend=\pgf@plot@curveto@handler@finish%
- \global\pgf@plot@startedfalse%
- }%
-}
-
-\def\pgf@plot@curveto@handler@initial#1{%
- \pgf@process{#1}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@plot@first@action{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
- \xdef\pgf@plot@curveto@first{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
- \global\let\pgf@plot@curveto@first@support=\pgf@plot@curveto@first%
- \global\let\pgf@plotstreampoint=\pgf@plot@curveto@handler@second%
-}
-
-\def\pgf@plot@curveto@handler@second#1{%
- \pgf@process{#1}%
- \xdef\pgf@plot@curveto@second{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
- \global\let\pgf@plotstreampoint=\pgf@plot@curveto@handler@third%
- \global\pgf@plot@startedtrue%
-}
-
-\def\pgf@plot@curveto@handler@third#1{%
- \pgf@process{#1}%
- \xdef\pgf@plot@curveto@current{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
- % compute difference vector:
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{\pgf@plot@curveto@first}
- \advance\pgf@xa by-\pgf@x%
- \advance\pgf@ya by-\pgf@y%
- % compute support directions:
- \pgf@xa=\pgf@plottension\pgf@xa%
- \pgf@ya=\pgf@plottension\pgf@ya%
- % first marshal:
- \pgf@process{\pgf@plot@curveto@second}%
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \advance\pgf@xb by-\pgf@xa%
- \advance\pgf@yb by-\pgf@ya%
- \advance\pgf@xc by\pgf@xa%
- \advance\pgf@yc by\pgf@ya%
- \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgf@plot@curveto@first@support}%
- {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}{\noexpand\pgf@plot@curveto@second}}%
- {\pgf@marshal}%
- % Prepare next:
- \global\let\pgf@plot@curveto@first=\pgf@plot@curveto@second%
- \global\let\pgf@plot@curveto@second=\pgf@plot@curveto@current%
- \xdef\pgf@plot@curveto@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
-}
-
-\def\pgf@plot@curveto@handler@finish{%
- \ifpgf@plot@started%
- \pgfpathcurveto{\pgf@plot@curveto@first@support}{\pgf@plot@curveto@second}{\pgf@plot@curveto@second}%
- \fi%
-}
-
-
-% This commands sets the tension for smoothing of plots.
-%
-% #1 = tension of curves. A value of 1 will yield a circle when the
-% control points are at quarters of a circle. A smaller value
-% will result in a tighter curve. Default is 0.5.
-%
-% Example:
-%
-% \pgfsetplottension{0.2}
-
-\def\pgfsetplottension#1{%
- \pgf@x=#1pt\relax%
- \pgf@x=0.2775\pgf@x\relax%
- \edef\pgf@plottension{\pgf@sys@tonumber\pgf@x}}
-\pgfsetplottension{0.5}
-
-
-% This handler converts the plot stream command into a curveto
-% command that is closed using a closepath.
-%
-% Example:
-%
-% \pgfpathmoveto{\pgfpointorigin}
-% \pgfplothandlerclosedcurve
-% \pgfplotxyfile{mytable}
-
-\def\pgfplothandlerclosedcurve{%
- \def\pgf@plotstreamstart{%
- \global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@initial%
- \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
- \global\let\pgf@plotstreamend=\pgf@plot@closedcurve@handler@finish%
- }%
-}
-
-\def\pgf@plot@closedcurve@handler@initial#1{%
- \pgf@process{#1}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \xdef\pgf@plot@closedcurve@initial{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
- \global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@second%
- \global\pgf@plot@startedfalse%
-}
-
-\def\pgf@plot@closedcurve@handler@second#1{%
- \pgf@process{#1}%
- \xdef\pgf@plot@closedcurve@after@initial{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
- {\pgfpathmoveto{}}%
- \global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@third%
-}
-
-\def\pgf@plot@closedcurve@handler@third#1{%
- \global\pgf@plot@startedtrue%
- \pgf@process{#1}%
- \xdef\pgf@plot@closedcurve@current{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
- % compute difference vector:
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{\pgf@plot@closedcurve@initial}
- \advance\pgf@xa by-\pgf@x%
- \advance\pgf@ya by-\pgf@y%
- % compute support directions:
- \pgf@xa=\pgf@plottension\pgf@xa%
- \pgf@ya=\pgf@plottension\pgf@ya%
- % first marshal:
- \pgf@process{\pgf@plot@closedcurve@after@initial}%
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \advance\pgf@xb by-\pgf@xa%
- \advance\pgf@yb by-\pgf@ya%
- \advance\pgf@xc by\pgf@xa%
- \advance\pgf@yc by\pgf@ya%
- \global\let\pgf@plot@closedcurve@first=\pgf@plot@closedcurve@after@initial%
- \global\let\pgf@plot@closedcurve@second=\pgf@plot@closedcurve@current%
- \xdef\pgf@plot@closedcurve@after@initial@presupport{\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}%
- \xdef\pgf@plot@closedcurve@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
- \global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@fourth%
-}
-
-\def\pgf@plot@closedcurve@handler@fourth#1{%
- \pgf@process{#1}%
- \xdef\pgf@plot@closedcurve@current{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
- % compute difference vector:
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{\pgf@plot@closedcurve@first}
- \advance\pgf@xa by-\pgf@x%
- \advance\pgf@ya by-\pgf@y%
- % compute support directions:
- \pgf@xa=\pgf@plottension\pgf@xa%
- \pgf@ya=\pgf@plottension\pgf@ya%
- % first marshal:
- \pgf@process{\pgf@plot@closedcurve@second}%
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \advance\pgf@xb by-\pgf@xa%
- \advance\pgf@yb by-\pgf@ya%
- \advance\pgf@xc by\pgf@xa%
- \advance\pgf@yc by\pgf@ya%
- \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgf@plot@closedcurve@first@support}%
- {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}{\noexpand\pgf@plot@closedcurve@second}}%
- {\pgf@marshal}%
- % Prepare next:
- \global\let\pgf@plot@closedcurve@first=\pgf@plot@closedcurve@second%
- \global\let\pgf@plot@closedcurve@second=\pgf@plot@closedcurve@current%
- \xdef\pgf@plot@closedcurve@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
-}
-
-\def\pgf@plot@closedcurve@handler@finish{%
- \ifpgf@plot@started
- %
- % first, draw line from 2nd last to last:
- %
- \pgf@process{\pgf@plot@closedcurve@initial}%
- % compute difference vector:
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{\pgf@plot@closedcurve@first}%
- \advance\pgf@xa by-\pgf@x%
- \advance\pgf@ya by-\pgf@y%
- % compute support directions:
- \pgf@xa=\pgf@plottension\pgf@xa%
- \pgf@ya=\pgf@plottension\pgf@ya%
- % first marshal:
- \pgf@process{\pgf@plot@closedcurve@second}%
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \advance\pgf@xb by-\pgf@xa%
- \advance\pgf@yb by-\pgf@ya%
- \advance\pgf@xc by\pgf@xa%
- \advance\pgf@yc by\pgf@ya%
- \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgf@plot@closedcurve@first@support}%
- {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}{\noexpand\pgf@plot@closedcurve@second}}%
- {\pgf@marshal}%
- \xdef\pgf@plot@closedcurve@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
- %
- % second, draw line from last point to start:
- %
- \pgf@process{\pgf@plot@closedcurve@after@initial}%
- % compute difference vector:
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{\pgf@plot@closedcurve@second}%
- \advance\pgf@xa by-\pgf@x%
- \advance\pgf@ya by-\pgf@y%
- % compute support directions:
- \pgf@xa=\pgf@plottension\pgf@xa%
- \pgf@ya=\pgf@plottension\pgf@ya%
- % first marshal:
- \pgf@process{\pgf@plot@closedcurve@initial}%
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \advance\pgf@xb by-\pgf@xa%
- \advance\pgf@yb by-\pgf@ya%
- \advance\pgf@xc by\pgf@xa%
- \advance\pgf@yc by\pgf@ya%
- \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgf@plot@closedcurve@first@support}%
- {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}{\noexpand\pgf@plot@closedcurve@initial}}%
- {\pgf@marshal}%
- %
- % third, draw line from first to second point:
- %
- \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
- {\noexpand\pgf@plot@closedcurve@after@initial@presupport}{\noexpand\pgf@plot@closedcurve@after@initial}}%
- {\pgf@marshal}%
- \pgfpathclose%
- \fi%
-}
-
-
-
-
-
-% This handler converts each point in a stream into a line from the
-% $y$-axis to the given points coordinate, resulting in a
-% ``comb.''
-%
-% Example:
-%
-% \pgfplothandlerxcomb
-% \pgfplotxyfile{mytable}
-
-\def\pgfplothandlerxcomb{%
- \def\pgf@plotstreamstart{%
- \global\let\pgf@plotstreampoint=\pgf@plot@xcomb@handler%
- \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
- \global\let\pgf@plotstreamend=\relax%
- }%
-}
-
-\def\pgf@plot@xcomb@handler#1{%
- \pgf@process{#1}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgf@ya}}%
- \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
-}
-
-
-% This handler converts each point in a stream into a line from the
-% $x$-axis straight up to the given points coordinate, resulting in a
-% ``comb.''
-%
-% Example:
-%
-% \pgfplothandlerycomb
-% \pgfplotxyfile{mytable}
-
-\def\pgfplothandlerycomb{%
- \def\pgf@plotstreamstart{%
- \global\let\pgf@plotstreampoint=\pgf@plot@ycomb@handler%
- \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
- \global\let\pgf@plotstreamend=\relax%
- }%
-}
-
-\def\pgf@plot@ycomb@handler#1{%
- \pgf@process{#1}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgfpathmoveto{\pgfqpoint{\pgf@xa}{0pt}}%
- \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
-}
-
-
-
-
-
-
-% This handler converts each point in a stream into a line from the
-% origin to the point's coordinate, resulting in a ``star''.
-%
-% Example:
-%
-% \pgfplothandlerpolarcomb
-% \pgfplotxyfile{mytable}
-
-\def\pgfplothandlerpolarcomb{%
- \def\pgf@plotstreamstart{%
- \global\let\pgf@plotstreampoint=\pgf@plot@polarcomb@handler%
- \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
- \global\let\pgf@plotstreamend=\relax%
- }%
-}
-
-\def\pgf@plot@polarcomb@handler#1{%
- \pgf@process{#1}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgfpathmoveto{\pgfpointorigin}%
- \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
-}
-
-
-
-
-% This handler draws a given mark at each point.
-%
-% #1 = some code to be executed at each point (with the coordinate
-% system translated to that point).
-% Typically, this code will be \pgfuseplotmark{whatever}.
-%
-% Example:
-%
-% \pgfplothandlermark{\pgfuseplotmark{*}}
-% \pgfplotxyfile{mytable}
-
-\def\pgfplothandlermark#1{%
- \pgf@plothandlermark{%
- \ifnum\pgf@plot@mark@count<\pgf@plot@mark@repeat\relax%
- \else%
- \global\pgf@plot@mark@count=0\relax%
- #1%
- \fi%
- }%
-}
-
-\newcount\pgf@plot@mark@count
-\def\pgf@plot@mark@phase{0}
-
-\def\pgf@plothandlermark#1{%
- \def\pgf@plot@mark{#1}%
- \def\pgf@plotstreamstart{%
- \global\pgf@plot@mark@count=\pgf@plot@mark@repeat\relax%
- \global\advance\pgf@plot@mark@count by-\pgf@plot@mark@phase\relax%
- \global\let\pgf@plotstreampoint=\pgf@plot@mark@handler%
- \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
- \global\let\pgf@plotstreamend=\relax%
- }%
-}
-
-\def\pgf@plot@mark@handler#1{%
- \global\advance\pgf@plot@mark@count by1\relax%
- {\pgftransformshift{#1}\pgf@plot@mark}%
-}
-
-
-% Set the repeat count for marks. For example, if 3 is given as a
-% value, only every third point will get a mark.
-%
-% #1 = repeat count
-%
-% Example:
-%
-% \pgfsetplotmarkrepeat{2}
-
-\def\pgfsetplotmarkrepeat#1{\def\pgf@plot@mark@repeat{#1}}
-\pgfsetplotmarkrepeat{1}
-
-
-% Set the phase for marks. For example, if 3 is the repeat and 3 is
-% the phase, already the first point will be marked.
-%
-% #1 = the index of the first point that should be marked.
-%
-% Example:
-%
-% \pgfsetplotmarkphase{3}
-
-\def\pgfsetplotmarkphase#1{\def\pgf@plot@mark@phase{#1}}
-\pgfsetplotmarkphase{1}
-
-
-
-% This handler draws a given mark at those points whose number is
-% given in the (pgffor-like) list.
-%
-% #1 = some code to be executed at each point (with the coordinate
-% system translated to that point).
-% Typically, this code will be \pgfuseplotmark{whatever}.
-% #2 = list of positions like "1,2,4,...,9,10"
-%
-% Example:
-%
-% \pgfplothandlermarklisted{\pgfuseplotmark{*}}{1,2,4,...,9}
-% \pgfplotxyfile{mytable}
-
-\def\pgfplothandlermarklisted#1#2{%
- \let\pgf@plot@mark@list=\pgfutil@empty%
- \edef\pgf@marshal{\noexpand\foreach\noexpand\pgf@temp in{#2}}
- \pgf@marshal{\xdef\pgf@plot@mark@list{\pgf@plot@mark@list(\pgf@temp)}}%
- \pgf@plothandlermark{%
- \edef\pgf@marshal{\noexpand\pgfutil@in@{(\the\pgf@plot@mark@count)}{\pgf@plot@mark@list}}%
- \pgf@marshal%
- \ifpgfutil@in@#1\fi}%
-}
-
-
-% Define a new plot mark for use with \pgfplotmark.
-%
-% #1 = a plot mark mnemonic
-% #2 = code for drawing the mark
-%
-% Example:
-%
-% \pgfdeclareplotmark{*}{\pgfpathcircle{\pgfpointorigin}{2pt}\pgfusepathqfill}
-
-\def\pgfdeclareplotmark#1#2{\expandafter\def\csname pgf@plot@mark@#1\endcsname{#2}}
-
-
-% Set the size of plot marks. For circles, this will be the radius,
-% for other shapes it should be about half the width/height.
-%
-% Example:
-%
-% \pgfsetplotmarksize{1pt}
-
-\def\pgfsetplotmarksize#1{\pgfmathsetlength\pgfplotmarksize{#1}}
-
-\newdimen\pgfplotmarksize
-\pgfplotmarksize=2pt
-
-
-% Insert a plot mark's code at the origin.
-%
-% #1 = plot mark mnemonic
-%
-% Example:
-%
-% \pgfuseplotmark{*}
-
-\def\pgfuseplotmark#1{\csname pgf@plot@mark@#1\endcsname}
-
-
-% A stroke-filled circle mark
-
-\pgfdeclareplotmark{*}
-{%
- \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize}
- \pgfusepathqfillstroke
-}
-
-
-% A plus-sign like mark
-
-\pgfdeclareplotmark{+}
-{%
- \pgfpathmoveto{\pgfqpoint{-\pgfplotmarksize}{0pt}}
- \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}
- \pgfusepathqstroke
-}
-
-
-% An x-shaped mark
-
-\pgfdeclareplotmark{x}
-{%
- \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}
- \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}
- \pgfusepathqstroke
-}
-
-% See pgflibraryplotmarks for more plot marks
-
-
-
-
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex
deleted file mode 100644
index e20805d50a1..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex
+++ /dev/null
@@ -1,212 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryplotmarks.code.tex,v 1.5 2007/03/09 17:49:32 tantau Exp $
-
-
-% A stroked circle mark
-
-\pgfdeclareplotmark{o}
-{%
- \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize}
- \pgfusepathqstroke
-}
-
-
-
-% A six-pointed star mark
-
-\pgfdeclareplotmark{asterisk}
-{%
- \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}
- \pgfpathmoveto{\pgfqpointpolar{30}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{210}{\pgfplotmarksize}}
- \pgfpathmoveto{\pgfqpointpolar{-30}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{-210}{\pgfplotmarksize}}
- \pgfusepathqstroke
-}
-
-
-% A five-pointed star mark
-
-\pgfdeclareplotmark{star}
-{%
- \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}
- \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{18}{\pgfplotmarksize}}
- \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{-54}{\pgfplotmarksize}}
- \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{234}{\pgfplotmarksize}}
- \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}}
- \pgfusepathqstroke
-}
-
-
-% An \oplus mark
-
-\pgfdeclareplotmark{oplus}
-{%
- \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize}
- \pgfpathmoveto{\pgfqpoint{-\pgfplotmarksize}{0pt}}
- \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}
- \pgfusepathqstroke
-}
-
-\pgfdeclareplotmark{oplus*}
-{%
- \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize}
- \pgfpathmoveto{\pgfqpoint{-\pgfplotmarksize}{0pt}}
- \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}
- \pgfusepathqfillstroke
-}
-
-
-% An \otimes mark
-
-\pgfdeclareplotmark{otimes}
-{%
- \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize}
- \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}
- \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}
- \pgfusepathqstroke
-}
-
-\pgfdeclareplotmark{otimes*}
-{%
- \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize}
- \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}
- \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}
- \pgfusepathqfillstroke
-}
-
-
-% A vertical bar mark
-
-\pgfdeclareplotmark{|}
-{%
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}
- \pgfusepathqstroke
-}
-
-
-
-% A horizontal bar mark
-
-\pgfdeclareplotmark{-}
-{%
- \pgfpathmoveto{\pgfqpoint{\pgfplotmarksize}{0pt}}
- \pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}}
- \pgfusepathqstroke
-}
-
-
-% A square stroked mark
-
-\pgfdeclareplotmark{square}
-{%
- \pgfpathrectangle{\pgfqpoint{-\pgfplotmarksize}{-\pgfplotmarksize}}{\pgfqpoint{2\pgfplotmarksize}{2\pgfplotmarksize}}%
- \pgfusepathqstroke
-}
-
-% A square stroked-filled mark
-
-\pgfdeclareplotmark{square*}
-{%
- \pgfpathrectangle{\pgfqpoint{-\pgfplotmarksize}{-\pgfplotmarksize}}{\pgfqpoint{2\pgfplotmarksize}{2\pgfplotmarksize}}%
- \pgfusepathqfillstroke
-}
-
-
-% A triangle mark
-
-\pgfdeclareplotmark{triangle}
-{%
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{-30}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{-150}{\pgfplotmarksize}}
- \pgfpathclose
- \pgfusepathqstroke
-}
-
-
-% A stroke-filled triangle mark
-
-\pgfdeclareplotmark{triangle*}
-{%
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{-30}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{-150}{\pgfplotmarksize}}
- \pgfpathclose
- \pgfusepathqfillstroke
-}
-
-
-
-% A diamond-shaped mark
-
-\pgfdeclareplotmark{diamond}
-{%
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{.75\pgfplotmarksize}{0pt}}
- \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{-.75\pgfplotmarksize}{0pt}}
- \pgfpathclose
- \pgfusepathqstroke
-}
-
-
-% A stroke-filled diamond-shaped mark
-
-\pgfdeclareplotmark{diamond*}
-{%
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{.75\pgfplotmarksize}{0pt}}
- \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{-.75\pgfplotmarksize}{0pt}}
- \pgfpathclose
- \pgfusepathqfillstroke
-}
-
-
-
-% A pentagon-shaped mark
-
-\pgfdeclareplotmark{pentagon}
-{%
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{18}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{-54}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{234}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}}
- \pgfpathclose
- \pgfusepathqstroke
-}
-
-% A stroke-filled pentagon-shaped mark
-
-\pgfdeclareplotmark{pentagon*}
-{%
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{18}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{-54}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{234}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}}
- \pgfpathclose
- \pgfusepathqfillstroke
-}
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.callouts.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.callouts.code.tex
new file mode 100644
index 00000000000..5a39a629e07
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.callouts.code.tex
@@ -0,0 +1,951 @@
+% Copyright 2007 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+
+
+% Keys for callouts
+%
+% Common to all callouts:
+% /pgf/callout absolute pointer
+% /pgf/callout relative pointer
+%
+% ellipse callout only:
+% /pgf/callout pointer arc
+%
+% rectangle callout only:
+% /pgf/callout pointer width
+%
+% cloud callout only:
+% /pgf/callout pointer start size
+% /pgf/callout pointer end size
+% /pgf/callout pointer segments
+%
+\newif\ifpgf@lib@callout@absolutepointer
+\pgfkeys{/pgf/.cd,
+ callout pointer arc/.initial=15,
+ callout pointer width/.initial=.25cm,
+ callout pointer start size/.initial=.2 of callout,
+ callout pointer end size/.initial=.1 of callout,
+ callout pointer segments/.initial=2,
+ callout absolute pointer/.code={\pgf@lib@callout@makeabsolutepointer{#1}},
+ callout relative pointer/.code={\pgf@lib@callout@makerelativepointer{#1}},
+ callout pointer shorten/.initial=0cm
+}
+
+
+
+\def\pgf@lib@callout@makeabsolutepointer#1{%
+ \pgf@lib@callout@absolutepointertrue%
+ {%
+ \pgftransformshift{#1}%
+ \pgfmultipartnode{coordinate}{center}{pgf@lib@callout@pointer}{}%
+ }%
+}
+
+\def\pgf@lib@callout@makerelativepointer#1{%
+ \pgf@lib@callout@absolutepointerfalse%
+ \def\pgf@lib@callout@relativepointer{#1}%
+}
+\pgfkeys{/pgf/callout relative pointer=\pgfpointpolar{300}{.5cm}}
+
+
+% Shape ellipse callout
+%
+%
+\pgfdeclareshape{ellipse callout}{%
+ \savedmacro\ellipsecalloutpoints{%
+ %
+ % Get the larger of the outer sep.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgf@x>\pgf@y%
+ \edef\outersep{\the\pgf@x}%
+ \else%
+ \edef\outersep{\the\pgf@y}%
+ \fi%
+ \addtosavedmacro\outersep%
+ %
+ % Calculate the node dimensions...
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@x1.4142136\pgf@x%
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
+ \ifdim\pgf@x<.5\pgf@xa%
+ \pgf@x.5\pgf@xa%
+ \fi%
+ %
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ \pgf@y1.4142136\pgf@y%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@y<.5\pgf@ya%
+ \pgf@y.5\pgf@ya%
+ \fi%
+ %
+ % ...without outer sep...
+ %
+ \edef\xpathradius{\the\pgf@x}%
+ \edef\ypathradius{\the\pgf@y}%
+ %
+ % ...and width outer sep.
+ %
+ \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \edef\xradius{\the\pgf@x}%
+ \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \edef\yradius{\the\pgf@y}%
+ %
+ \addtosavedmacro\xradius%
+ \addtosavedmacro\xpathradius%
+ \addtosavedmacro\yradius%
+ \addtosavedmacro\ypathradius%
+ %
+ \pgfmathsetmacro\pointerarc{\pgfkeysvalueof{/pgf/callout pointer arc}}%
+ \addtosavedmacro\pointerarc%
+ %
+ \pgfextract@process\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ %
+ % Get the realtive pointer.
+ %
+ \ifpgf@lib@callout@absolutepointer%
+ \else%
+ \pgfextract@process\calloutpointer{%
+ \pgfextract@process\borderpoint{%
+ \expandafter\pgfpointborderellipse\expandafter{\pgf@lib@callout@relativepointer}{\pgfqpoint{\xpathradius}{\ypathradius}}%
+ }%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\borderpoint}%
+ \let\pointerangle\pgfmathresult%
+ \expandafter\pgf@process\expandafter{\pgf@lib@callout@relativepointer}%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \edef\pointerradius{\pgfmathresult pt}%
+ \pgfpointadd{\borderpoint}{\pgfqpointpolar{\pointerangle}{\pointerradius}}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ %
+ \addtosavedmacro\calloutpointer%
+ \pgf@lib@callouts@shortenpointer%
+ \pgf@lib@ellipsecallout@getpoints%
+ \addtosavedmacro\calloutpointeranchor%
+ \addtosavedmacro\beforecalloutangle%
+ \addtosavedmacro\aftercalloutangle%
+ \fi%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt\relax%
+ }
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \ellipsecalloutpoints%
+ \pgfmathpointintersectionoflineandarc{\midpoint\advance\pgf@x\xradius}{\midpoint}%
+ {\centerpoint}{270}{450}{\xradius and \yradius}%
+ }%
+ \anchor{mid west}{%
+ \ellipsecalloutpoints%
+ \pgfmathpointintersectionoflineandarc{\midpoint\advance\pgf@x-\xradius}{\midpoint}%
+ {\centerpoint}{90}{270}{\xradius and \yradius}%
+ }%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \ellipsecalloutpoints%
+ \pgfmathpointintersectionoflineandarc{\basepoint\advance\pgf@x\xradius}{\basepoint}%
+ {\centerpoint}{270}{450}{\xradius and \yradius}%
+ }%
+ \anchor{base west}{%
+ \ellipsecalloutpoints%
+ \pgfmathpointintersectionoflineandarc{\basepoint\advance\pgf@x-\xradius}{\basepoint}%
+ {\centerpoint}{90}{270}{\xradius and \yradius}%
+ }%
+ \anchor{north}{%
+ \ellipsecalloutpoints%
+ \centerpoint%
+ \advance\pgf@y\yradius\relax%
+ }
+ \anchor{south}{%
+ \ellipsecalloutpoints%
+ \centerpoint%
+ \advance\pgf@y-\yradius\relax%
+ }
+ \anchor{east}{%
+ \ellipsecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x\xradius\relax%
+ }
+ \anchor{west}{%
+ \ellipsecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x-\xradius\relax%
+ }
+ \anchor{north west}{%
+ \ellipsecalloutpoints%
+ \pgf@xa\xradius\relax%
+ \pgf@ya\yradius\relax%
+ \centerpoint%
+ \advance\pgf@y0.7071067\pgf@ya%
+ \advance\pgf@x-0.7071067\pgf@xa%
+ }
+ \anchor{north east}{%
+ \ellipsecalloutpoints%
+ \pgf@xa\xradius\relax%
+ \pgf@ya\yradius\relax%
+ \centerpoint%
+ \advance\pgf@y0.7071067\pgf@ya%
+ \advance\pgf@x0.7071067\pgf@xa%
+ }
+ \anchor{south west}{%
+ \ellipsecalloutpoints%
+ \pgf@xa\xradius\relax%
+ \pgf@ya\yradius\relax%
+ \centerpoint%
+ \advance\pgf@y-0.7071067\pgf@ya%
+ \advance\pgf@x-0.7071067\pgf@xa%
+ }
+ \anchor{south east}{%
+ \ellipsecalloutpoints%
+ \pgf@xa\xradius\relax%
+ \pgf@ya\yradius\relax%
+ \centerpoint%
+ \advance\pgf@y-0.7071067\pgf@ya%
+ \advance\pgf@x0.7071067\pgf@xa%
+ }
+ \anchor{pointer}{%
+ \ellipsecalloutpoints%
+ \calloutpointeranchor%
+ }%
+ \backgroundpath{%
+ \ellipsecalloutpoints%
+ \ifpgf@lib@callout@absolutepointer%
+ \pgfextract@process\calloutpointer{%
+ \pgfpointanchor{pgf@lib@callout@pointer}{center}%
+ }%
+ \pgf@lib@callouts@shortenpointer%
+ \pgf@lib@ellipsecallout@getpoints%
+ \calloutpointeranchor%
+ \ifx\pgf@test\pgfutil@empty%
+ \else%
+ \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@test\noexpand\endcsname}%
+ \edef\pgf@sh@@@temp{%
+ \noexpand\def\noexpand\calloutpointeranchor{%
+ \noexpand\pgf@x\the\pgf@x%
+ \noexpand\pgf@y\the\pgf@y%
+ }%
+ }%
+ \expandafter\pgf@sh@@temp\expandafter{\pgf@sh@@@temp}
+ \fi%
+ \fi%
+ \pgfpathmoveto{\calloutpointer}%
+ \pgfpathlineto{\aftercalloutpointer}%
+ \ifdim\aftercalloutangle pt<\beforecalloutangle pt\relax%
+ \pgfpatharc{\aftercalloutangle}{\beforecalloutangle}{\xpathradius and \ypathradius}%
+ \else%
+ \pgfpatharc{\aftercalloutangle}{360}{\xpathradius and \ypathradius}%
+ \pgfpatharc{0}{\beforecalloutangle}{\xpathradius and \ypathradius}%
+ \fi%
+ \pgfpathclose%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \ellipsecalloutpoints%
+ \pgfpointadd{\pgfpointborderellipse{\externalpoint}{\pgfpoint{\xradius}{\yradius}}%
+ }{\centerpoint}%
+ }%
+}
+
+% Internal macro for calculating the points for the
+% ellipse callout pointer.
+%
+% The following must be set up:
+%
+% \centerpoint - the center of the ellipse.
+% \calloutpointer - the location of the callout point.
+% \pointerarc - the width of the pointer.
+% \xpathradius - the x radius of the ellipse.
+% \ypathradius - the y radius of the ellipse.
+%
+\def\pgf@lib@ellipsecallout@getpoints{%
+ \pgfextract@process\borderpoint{%
+ \pgfpointborderellipse{%
+ \centerpoint%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \calloutpointer%
+ \advance\pgf@x-\pgf@xa%
+ \advance\pgf@y-\pgf@ya%
+ }{\pgfqpoint{\xpathradius}{\ypathradius}}%
+ }%
+ \pgfmathangleonellipse{\borderpoint}{\xpathradius and \ypathradius}%
+ \pgfutil@tempdima\pointerarc pt\relax%
+ \pgfutil@tempdimb\pgfmathresult pt\relax%
+ \advance\pgfutil@tempdimb-.5\pgfutil@tempdima%
+ \ifdim\pgfutil@tempdimb<0pt\relax%
+ \advance\pgfutil@tempdimb360pt\relax%
+ \fi%
+ \edef\beforecalloutangle{\pgfmath@tonumber{\pgfutil@tempdimb}}%
+ \advance\pgfutil@tempdimb\pgfutil@tempdima%
+ \ifdim\pgfutil@tempdimb<360pt\relax%
+ \else%
+ \advance\pgfutil@tempdimb-360pt\relax%
+ \fi%
+ \edef\aftercalloutangle{\pgfmath@tonumber{\pgfutil@tempdimb}}%
+ %
+ \pgfextract@process\beforecalloutpointer{%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointpolar{\beforecalloutangle}{\xpathradius and \ypathradius}%
+ }%
+ }%
+ \pgfextract@process\aftercalloutpointer{%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointpolar{\aftercalloutangle}{\xpathradius and \ypathradius}%
+ }%
+ }%
+ %
+ % Calculate the pointer anchor.
+ %
+ \pgf@lib@callouts@pointeranchor%
+}
+
+
+% If the callout pointer is very pointed and stroked, the anchor will be
+% miles away from the end of the pointer which will (typically) be
+% bevelled.
+% Using outer sep=0pt is one solution, however, another is provided
+% using this special key:
+%
+% /pgf/callout pointer anchor aspect
+%
+% which takes a value from 0 (ignore any outer sep) to 1 (use
+% the full outer sep).
+
+\pgfkeys{/pgf/callout pointer anchor aspect/.initial=1}
+
+% Internal macro for calculating the anchor for the callout pointer.
+%
+% Requires the following to be set up (points are anti-clockwise)
+%
+% \beforecalloutpointer - point on the border before the callout pointer
+% \calloutpointer
+% \aftercalloutpointer - point on the border after the callout pointer
+% \outersep - the largest of the outer xsep or ysep.
+%
+\def\pgf@lib@callouts@pointeranchor{%
+ \pgfutil@tempdimb\outersep\relax%
+ %
+ \pgfmathanglebetweenlines{\calloutpointer}{\aftercalloutpointer}{\calloutpointer}{\beforecalloutpointer}%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \pgfmathcosec@{\pgfmathresult}%
+ \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
+ \pgfmathanglebetweenpoints{\calloutpointer}{\aftercalloutpointer}%
+ \advance\pgfutil@tempdima\pgfmathresult pt\relax%
+ \advance\pgfutil@tempdima180pt\relax%
+ %
+ \pgfextract@process\calloutpointeranchor{%
+ \pgfpointadd{%
+ \pgfmathparse{\pgfkeysvalueof{/pgf/callout pointer anchor aspect}}%
+ \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }{%
+ \calloutpointer%
+ }%
+ }%
+}%
+
+\def\pgf@lib@callouts@shortenpointer{%
+ \pgfextract@process\calloutpointer{%
+ \pgfmathanglebetweenpoints{\calloutpointer}{\centerpoint}%
+ \let\angle\pgfmathresult%
+ \pgfmathsin@{\angle}%
+ \let\sinpointerangle\pgfmathresult%
+ \pgfmathcos@{\angle}%
+ \let\cospointerangle\pgfmathresult%
+ \pgfpointadd{\calloutpointer}{%
+ \pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/callout pointer shorten}}%
+ \pgf@x\cospointerangle\pgfutil@tempdima%
+ \pgf@y\sinpointerangle\pgfutil@tempdima%
+ }%
+ }%
+}%
+
+
+\pgfdeclareshape{rectangle callout}{%
+ \savedmacro\rectanglecalloutpoints{%
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
+ \ifdim\pgf@x<.5\pgf@xa%
+ \pgf@x.5\pgf@xa%
+ \fi%
+ \edef\xtemp{\the\pgf@x}%
+ \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ %
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@y<.5\pgf@ya%
+ \pgf@y.5\pgf@ya%
+ \fi%
+ \edef\ytemp{\the\pgf@y}%
+ \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ %
+ \edef\xlength{\the\pgf@x}%
+ \edef\ylength{\the\pgf@y}%
+ \addtosavedmacro\xlength%
+ \addtosavedmacro\ylength%
+ %
+ \pgfmathsetlengthmacro\pointerwidth{\pgfkeysvalueof{/pgf/callout pointer width}}%
+ \addtosavedmacro\pointerwidth%
+ %
+ \pgfextract@process\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ %
+ % Process the relative callout pointer.
+ %
+ \ifpgf@lib@callout@absolutepointer%
+ \else%
+ \pgfextract@process\calloutpointer{%
+ \pgfextract@process\borderpoint{%
+ \expandafter\pgfpointborderrectangle\expandafter{\pgf@lib@callout@relativepointer}%
+ {\pgfqpoint{\xtemp}{\ytemp}}%
+ }%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\borderpoint}%
+ \let\pointerangle\pgfmathresult%
+ \expandafter\pgf@process\expandafter{\pgf@lib@callout@relativepointer}%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \edef\pointerradius{\pgfmathresult pt}%
+ \pgfpointadd{\borderpoint}{\pgfqpointpolar{\pointerangle}{\pointerradius}}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \pgf@lib@callouts@shortenpointer%
+ \addtosavedmacro\calloutpointer%
+ \pgf@lib@rectanglecallout@pointer%
+ \addtosavedmacro\calloutpointeranchor%
+ \addtosavedmacro\beforecalloutpointer%
+ \addtosavedmacro\aftercalloutpointer%
+ \addtosavedmacro\firstpoint%
+ \addtosavedmacro\secondpoint%
+ \addtosavedmacro\thirdpoint%
+ \addtosavedmacro\fourthpoint%
+ \fi%
+ }
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt\relax%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5em}%
+ }
+ \anchor{center}{\centerpoint}
+ \anchor{mid}{\midpoint}
+ \anchor{mid east}{%
+ \rectanglecalloutpoints%
+ \midpoint%
+ \advance\pgf@x\xlength\relax%
+ }
+ \anchor{mid west}{%
+ \rectanglecalloutpoints%
+ \midpoint%
+ \advance\pgf@x-\xlength\relax%
+ }
+ \anchor{base}{\basepoint}
+ \anchor{base east}{%
+ \rectanglecalloutpoints%
+ \basepoint%
+ \advance\pgf@x\xlength\relax%
+ }
+ \anchor{base west}{%
+ \rectanglecalloutpoints%
+ \basepoint%
+ \advance\pgf@x-\xlength\relax%
+ }
+ \anchor{north}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@y\ylength\relax%
+ }%
+ \anchor{south}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@y-\ylength\relax%
+ }%
+ \anchor{east}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x\xlength\relax%
+ }%
+ \anchor{west}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x-\xlength\relax%
+ }%
+ \anchor{north east}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x\xlength\relax%
+ \advance\pgf@y\ylength\relax%
+ }%
+ \anchor{south west}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x-\xlength\relax%
+ \advance\pgf@y-\ylength\relax%
+ }%
+ \anchor{south east}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x\xlength\relax%
+ \advance\pgf@y-\ylength\relax%
+ }%
+ \anchor{north west}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x-\xlength\relax%
+ \advance\pgf@y\ylength\relax%
+ }%
+ \anchor{pointer}{%
+ \rectanglecalloutpoints%
+ \calloutpointeranchor%
+ }%
+ \backgroundpath{%
+ \rectanglecalloutpoints%
+ \pgf@x\xlength\relax%
+ \pgf@y\ylength\relax%
+ \pgfmathaddtolength\pgf@x{-\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathaddtolength\pgf@y{-\pgfkeysvalueof{/pgf/outer ysep}}%
+ \edef\xtemp{\the\pgf@x}%
+ \edef\ytemp{\the\pgf@y}%
+ %
+ % The absolute pointer must be calculated here because the
+ % anchor of the shape (which is calculated after the saved
+ % macros and points) affects how the pointer joins the
+ % main rectangle.
+ %
+ \ifpgf@lib@callout@absolutepointer%
+ \pgfextract@process\calloutpointer{%
+ \pgfpointanchor{pgf@lib@callout@pointer}{center}%
+ }%
+ \pgf@lib@callouts@shortenpointer%
+ \pgfmathsetlengthmacro\pointerwidth{\pgfkeysvalueof{/pgf/callout pointer width}}%
+ \pgf@lib@rectanglecallout@pointer%
+ %
+ % \pgf@test = the shape name (from \pgfmultipartnode)
+ %
+ \ifx\pgf@test\pgfutil@empty%
+ \else%
+ %
+ % Now hack an extra saved anchor \calloutpointeranchor,
+ % with the new anchor for the callout pointer.
+ %
+ \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@test\noexpand\endcsname}%
+ \edef\pgf@sh@@@temp{%
+ \noexpand\def\noexpand\calloutpointeranchor{%
+ \noexpand\pgf@x\the\pgf@x%
+ \noexpand\pgf@y\the\pgf@y%
+ }%
+ }%
+ \expandafter\pgf@sh@@temp\expandafter{\pgf@sh@@@temp}%
+ \fi%
+ \fi%
+ {%
+ \pgfsetcornersarced{\pgfqpoint{0pt}{0pt}}%
+ \pgfpathmoveto{\beforecalloutpointer}%
+ }%
+ \pgfpathlineto{\calloutpointer}%
+ {%
+ \pgfsetcornersarced{\pgfqpoint{0pt}{0pt}}%
+ \pgfpathlineto{\aftercalloutpointer}%
+ }%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathlineto{\firstpoint}%
+ \pgfpathlineto{\secondpoint}%
+ \pgfpathlineto{\thirdpoint}%
+ \pgfpathlineto{\fourthpoint}%
+ {%
+ \pgfsetcornersarced{\pgfqpoint{0pt}{0pt}}%
+ \pgfpathclose%
+ }%
+ }
+ }
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \rectanglecalloutpoints%
+ \pgfpointadd{\centerpoint}%
+ {%
+ \pgfpointborderrectangle{\pgfpointadd{\centerpoint}{\externalpoint}}%
+ {\pgfqpoint{\xlength}{\ylength}}%
+ }%
+ }%
+}
+
+
+
+% \pgf@lib@rectanglecallout@pointer
+%
+% Internal macro for calculations relating to the rectangle callout.
+%
+% Requires the following to be set up:
+%
+% \calloutpointer - the location of the callout point.
+% \xtemp - the half width of the rectangle
+% \ytemp - the half height of the rectangle
+% \pointerwidth - the width of the pointer.
+%
+\def\pgf@lib@rectanglecallout@pointer{%
+ %
+ % Ensure that the pointer never connects to the main shape
+ % too near to a corner. This is done for two reasons:
+ % 1. It can look ugly.
+ % 2. If the corners are rounded, a mess can result.
+ %
+ \pgfextract@process\borderpoint{%
+ \pgfpointborderrectangle{%
+ \centerpoint%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \calloutpointer%
+ \advance\pgf@x-\pgf@xa%
+ \advance\pgf@y-\pgf@ya%
+ }{\pgfqpoint{\xtemp}{\ytemp}}%
+ }%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\borderpoint}%
+ \let\borderangle\pgfmathresult%
+ %
+ \pgfutil@tempdima\pointerwidth\relax%
+ \pgf@xa\xtemp\relax%
+ \advance\pgf@xa-\pgfutil@tempdima%
+ \pgf@ya\ytemp\relax%
+ \advance\pgf@ya-\pgfutil@tempdima%
+ %
+ \pgf@process{%
+ \pgfutil@ifundefined{pgf@corner@arc}{\pgfpointorigin}{%
+ \expandafter\pgfqpoint\pgf@corner@arc}%
+ }%
+ \advance\pgf@xa-\pgf@x%
+ \advance\pgf@ya-\pgf@y%
+ %
+ \borderpoint%
+ \pgf@xb\pgf@x%
+ \pgf@yb\pgf@y%
+ %
+ \pgf@xc0pt\relax%
+ \pgf@yc0pt\relax%
+ %
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfqpoint{\xtemp}{\ytemp}}%
+ \ifdim\borderangle pt<\pgfmathresult pt\relax%
+ \pgf@yc.5\pgfutil@tempdima%
+ \ifdim\pgf@yb>\pgf@ya%
+ \pgf@yb\pgf@ya%
+ \fi%
+ %
+ % Establish the order for drawing the rectangle corners.
+ %
+ \edef\firstpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
+ \edef\secondpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
+ \edef\thirdpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
+ \edef\fourthpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
+ \else%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfqpoint{-\xtemp}{\ytemp}}%
+ \ifdim\borderangle pt<\pgfmathresult pt\relax%
+ \pgf@xc-.5\pgfutil@tempdima%
+ \ifdim\pgf@xb>\pgf@xa%
+ \pgf@xb\pgf@xa%
+ \else%
+ \ifdim\pgf@xb<-\pgf@xa%
+ \pgf@xb-\pgf@xa%
+ \fi%
+ \fi%
+ \edef\firstpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
+ \edef\secondpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
+ \edef\thirdpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
+ \edef\fourthpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
+ \else%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfqpoint{-\xtemp}{-\ytemp}}%
+ \ifdim\borderangle pt<\pgfmathresult pt\relax%
+ \pgf@yc-.5\pgfutil@tempdima%
+ \ifdim\pgf@yb>\pgf@ya%
+ \pgf@yb\pgf@ya%
+ \else%
+ \ifdim\pgf@yb<-\pgf@ya%
+ \pgf@yb-\pgf@ya%
+ \fi%
+ \fi%
+ \edef\firstpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
+ \edef\secondpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
+ \edef\thirdpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
+ \edef\fourthpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
+ \else%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfqpoint{\xtemp}{-\ytemp}}%
+ \ifdim\borderangle pt<\pgfmathresult pt\relax%
+ \pgf@xc.5\pgfutil@tempdima%
+ \ifdim\pgf@xb>\pgf@xa%
+ \pgf@xb\pgf@xa%
+ \else%
+ \ifdim\pgf@xb<-\pgf@xa%
+ \pgf@xb-\pgf@xa%
+ \fi%
+ \fi%
+ \edef\firstpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
+ \edef\secondpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
+ \edef\thirdpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
+ \edef\fourthpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
+ \else%
+ \pgf@yc.5\pgfutil@tempdima%
+ \ifdim\pgf@yb<-\pgf@ya%
+ \pgf@yb-\pgf@ya%
+ \fi%
+ \edef\firstpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
+ \edef\secondpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
+ \edef\thirdpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
+ \edef\fourthpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \pgfextract@process\beforecalloutpointer{%
+ \centerpoint%
+ \advance\pgf@x\pgf@xb%
+ \advance\pgf@y\pgf@yb%
+ \advance\pgf@x-\pgf@xc%
+ \advance\pgf@y-\pgf@yc%
+ }%
+ \pgfextract@process\aftercalloutpointer{%
+ \centerpoint%
+ \advance\pgf@x\pgf@xb%
+ \advance\pgf@y\pgf@yb%
+ \advance\pgf@x\pgf@xc%
+ \advance\pgf@y\pgf@yc%
+ }%
+ %
+ % Now calculate the pointer anchor.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgf@x>\pgf@y%
+ \edef\outersep{\the\pgf@x}%
+ \else%
+ \edef\outersep{\the\pgf@y}%
+ \fi%
+ \pgf@lib@callouts@pointeranchor%
+}
+
+
+% Internal macro for parsing the size of
+% the cloud callout pointer.
+%
+% \pgf@x and \pgf@y should be set up as the
+% width and height of the main shape.
+%
+% \pgf@xa and \pgf@ya are returned appropriately.
+%
+\def\pgf@lib@callout@setpointersize#1{%
+ \edef\pgf@lib@callout@temp{#1}%
+ \edef\pgf@marshall{\noexpand\pgfutil@in@{of callout}{\pgf@lib@callout@temp}}%
+ \pgf@marshall%
+ \ifpgfutil@in@%
+ \expandafter\pgf@xa\expandafter\pgf@lib@callout@setpointerrelativesize%
+ \pgf@lib@callout@temp\pgf@lib@stop\pgf@x%
+ \expandafter\pgf@ya\expandafter\pgf@lib@callout@setpointerrelativesize%
+ \pgf@lib@callout@temp\pgf@lib@stop\pgf@y%
+ \else%
+ \edef\pgf@marshall{\noexpand\pgfutil@in@{and}{\pgf@lib@callout@temp}}%
+ \pgf@marshall%
+ \ifpgfutil@in@%
+ \expandafter\pgf@lib@callout@setpointerbothsizes\pgf@lib@callout@temp\pgf@lib@stop%
+ \else%
+ \pgfmathsetlength\pgf@xa{#1}%
+ \pgfmathsetlength\pgf@ya{#1}%
+ \fi%
+ \fi%
+}
+\def\pgf@lib@callout@setpointerrelativesize#1of callout#2\pgf@lib@stop{#1}%
+\def\pgf@lib@callout@setpointerbothsizes#1and#2\pgf@lib@stop{%
+ \pgfmathsetlength\pgf@xa{#2}%
+ \pgfmathsetlength\pgf@ya{#2}%
+}
+
+% Shape: cloud callout.
+%
+\pgfdeclareshape{cloud callout}{%
+ \savedanchor\calloutpointer{%
+ \pgfutil@ifundefined{pgf@sh@s@cloud}{%
+ \PackageError{PGF}{I cannot find the cloud shape. Please load the `symbol shapes' library}{}}{}%
+ \pgf@sh@s@cloud%
+ \pgf@sh@savedmacros%
+ %
+ \pgfextract@process\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \ifpgf@lib@callout@absolutepointer%
+ \else%
+ \pgfextract@process\calloutpointer{%
+ \pgfextract@process\borderpoint{%
+ \expandafter\pgfpointborderellipse\expandafter{\pgf@lib@callout@relativepointer}%
+ {\pgfqpoint{\xouterradius}{\youterradius}}%
+ }%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\borderpoint}%
+ \let\pointerangle\pgfmathresult%
+ \expandafter\pgf@process\expandafter{\pgf@lib@callout@relativepointer}%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \edef\pointerradius{\pgfmathresult pt}%
+ \pgfpointadd{\borderpoint}{\pgfqpointpolar{\pointerangle}{\pointerradius}}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \pgf@lib@callouts@shortenpointer%
+ \fi%
+ }
+ \anchor{pointer}{%
+ \calloutpointer%
+ }%
+ \inheritsavedanchors[from=cloud]
+ \inheritanchor[from=cloud]{center}
+ \inheritanchor[from=cloud]{base}
+ \inheritanchor[from=cloud]{mid}
+ \inheritanchor[from=cloud]{north}
+ \inheritanchor[from=cloud]{south}
+ \inheritanchor[from=cloud]{east}
+ \inheritanchor[from=cloud]{west}
+ \inheritanchor[from=cloud]{north east}
+ \inheritanchor[from=cloud]{south west}
+ \inheritanchor[from=cloud]{south east}
+ \inheritanchor[from=cloud]{north west}
+ \inheritanchorborder[from=cloud]
+ \backgroundpath{%
+ \pgf@sh@bg@cloud%
+ \ifpgf@lib@callout@absolutepointer%
+ \pgfextract@process\calloutpointer{%
+ \pgfpointanchor{pgf@lib@callout@pointer}{center}%
+ }%
+ \ifx\pgf@test\pgfutil@empty%
+ \else%
+ \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@test\noexpand\endcsname}%
+ \edef\pgf@sh@@@temp{%
+ \noexpand\def\noexpand\calloutpointeranchor{%
+ \noexpand\pgf@x\the\pgf@x%
+ \noexpand\pgf@y\the\pgf@y%
+ }%
+ }%
+ \expandafter\pgf@sh@@temp\expandafter{\pgf@sh@@@temp}
+ \fi%
+ \fi%
+ %
+ \pgfextract@process\borderpoint{%
+ \pgfpointadd{%
+ \pgfpointborderellipse{\pgfpointdiff{\centerpoint}{\calloutpointer}}%
+ {\pgfqpoint{\xouterradius}{\youterradius}}%
+ }{\centerpoint}%
+ }%
+ \pgf@lib@callouts@shortenpointer%
+ \pgfmathanglebetweenpoints{\calloutpointer}{\centerpoint}%
+ \let\angle\pgfmathresult%
+ \pgfmathsin@{\angle}%
+ \let\sinpointerangle\pgfmathresult%
+ \pgfmathcos@{\angle}%
+ \let\cospointerangle\pgfmathresult%
+ %
+ \pgf@x\xouterradius\relax%
+ \pgf@x2.0\pgf@x%
+ \pgf@y\yinnerradius\relax%
+ \pgf@y2.0\pgf@y%
+ \pgf@lib@callout@setpointersize{\pgfkeysvalueof{/pgf/callout pointer start size}}%
+ \pgf@xb\pgf@xa%
+ \pgf@yb\pgf@ya%
+ \pgf@lib@callout@setpointersize{\pgfkeysvalueof{/pgf/callout pointer end size}}%
+ \advance\pgf@xb-\pgf@xa%
+ \advance\pgf@yb-\pgf@ya%
+ %
+ \pgfmathsetcount\c@pgf@counta{\pgfkeysvalueof{/pgf/callout pointer segments}}%
+ \divide\pgf@xb\c@pgf@counta%
+ \divide\pgf@yb\c@pgf@counta%
+ %
+ \pgf@process{\pgfpointdiff{\borderpoint}{\calloutpointer}}%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ %
+ \pgfutil@tempdimb0pt\relax%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\c@pgf@counta%
+ \else%
+ {%
+ \pgf@xa.5\pgf@xa%
+ \pgf@ya.5\pgf@ya%
+ \edef\tempxradius{\the\pgf@xa}%
+ \edef\tempyradius{\the\pgf@ya}%
+ \pgfpathellipse%
+ {%
+ \calloutpointer%
+ \advance\pgf@x\cospointerangle\pgfutil@tempdimb%
+ \advance\pgf@y\sinpointerangle\pgfutil@tempdimb%
+ }%
+ {\pgfqpoint{\tempxradius}{0pt}}{\pgfqpoint{0pt}{\tempyradius}}%
+ }%
+ \advance\pgf@xa\pgf@xb%
+ \advance\pgf@ya\pgf@yb%
+ \advance\pgfutil@tempdimb\pgfutil@tempdima%
+ \repeatpgfmathloop%
+ }%
+ %
+ % Hack the puff anchors for the callout.
+ %
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@cloud callout\endcsname{%
+ \c@pgf@counta\puffs\relax%
+ \pgfmathloop%
+ \ifnum\c@pgf@counta>0\relax%
+ \pgfutil@ifundefined{pgf@anchor@cloud callout@puff\space\the\c@pgf@counta}{%
+ \expandafter\xdef\csname pgf@anchor@cloud callout@puff\space\the\c@pgf@counta\endcsname{%
+ \noexpand\pgf@sh@@cloudpuffanchor{\the\c@pgf@counta}%
+ }%
+ }{\c@pgf@counta0\relax}%
+ \advance\c@pgf@counta-1\relax%
+ \repeatpgfmathloop%
+ }%
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.code.tex
deleted file mode 100644
index fecbb7df710..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.code.tex
+++ /dev/null
@@ -1,18 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryshapes.code.tex,v 1.12 2007/06/08 11:24:59 tantau Exp $
-
-\usepgflibrary{shapes.geometric}
-\usepgflibrary{shapes.misc}
-\usepgflibrary{shapes.symbols}
-\usepgflibrary{shapes.arrows}
-\usepgflibrary{shapes.multipart}
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.IEC.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.IEC.code.tex
new file mode 100644
index 00000000000..881cda69d98
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.IEC.code.tex
@@ -0,0 +1,814 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+
+\pgfkeys{/pgf/.cd,
+ logic gate input sep/.initial=0.125cm,
+ logic gate inputs/.initial={normal,normal},%
+ logic gate inverted radius/.initial=2pt,%
+ logic gate anchors use bounding box/.is if=pgfgateanchorsuseboundingrectangle,%
+ and gate IEC symbol/.initial=$\char`\&$,
+ nand gate IEC symbol/.initial=$\char`\&$,
+ or gate IEC symbol/.initial=$\geq1$,
+ nor gate IEC symbol/.initial=$\geq1$,
+ xor gate IEC symbol/.initial={$=1$},
+ xnor gate IEC symbol/.initial={$=1$},
+ not gate IEC symbol/.initial=1,
+ buffer gate IEC symbol/.initial=1,
+ logic gate IEC symbol align/.initial=top,
+ logic gate IEC symbol color/.initial=% no value
+}
+
+\pgfkeys{/pgf/logic gate IEC symbol align/.cd,
+ top/.code=\pgftransformyshift{\innerhalfheight},
+ bottom/.code=\pgftransformyshift{-\innerhalfheight},
+ left/.code=\pgftransformxshift{-\innerhalfwidth},
+ right/.code=\pgftransformxshift{\innerhalfwidth}
+}
+
+% Internal macro for parsing inputs.
+%
+\expandafter\ifx\csname pgf@lib@sh@logicgate@parseinputs\endcsname\relax%
+\def\pgf@lib@sh@logicgate@parseinputs#1{%
+ \edef\pgf@lib@sh@temp{\pgfkeysvalueof{/pgf/logic gate inputs}}%
+ \c@pgf@counta#1\relax%
+ \c@pgf@countb0\relax%
+ \expandafter\pgfutil@in@\expandafter,\expandafter{\pgf@lib@sh@temp}%
+ \ifpgfutil@in@%
+ \let\pgf@lib@sh@next\pgf@lib@sh@logicgate@parseinputs@long%
+ \else%
+ \let\pgf@lib@sh@next\pgf@lib@sh@logicgate@parseinputs@short%
+ \fi%
+ \pgf@lib@sh@next%
+}
+\def\pgf@lib@sh@itext{i}
+\def\pgf@lib@sh@invertedtext{inverted}
+%
+% The `short' version for input specifcation is an extension of
+% ideas due to Juergen Werber and Christoph Bartoschek.
+%
+\def\pgf@lib@sh@logicgate@parseinputs@short{%
+ \expandafter\pgf@lib@sh@logicgate@parseinputs@@short\pgf@lib@sh@temp\pgf@stop%
+}
+\def\pgf@lib@sh@logicgate@parseinputs@@short#1{%
+ \ifx#1\pgf@stop%
+ \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}%
+ \let\pgf@lib@sh@next\relax%
+ \else%
+ \ifnum\c@pgf@countb=\c@pgf@counta%
+ \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}%
+ \let\pgf@lib@sh@next\relax%
+ \else%
+ \advance\c@pgf@countb1\relax%
+ \expandafter\ifx\pgf@lib@sh@itext#1%
+ \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{%
+ \expandafter\def\csname input-\the\c@pgf@countb\endcsname{i}}%
+ \else%
+ \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{%
+ \expandafter\def\csname input-\the\c@pgf@countb\endcsname{n}}%
+ \fi%
+ \let\pgf@lib@sh@next\pgf@lib@sh@logicgate@parseinputs@@short%
+ \fi%
+ \fi%
+ \pgf@lib@sh@next%
+}
+\def\pgf@lib@sh@logicgate@parseinputs@long{%
+ \expandafter\pgf@lib@sh@logicgate@parseinputs@@long\pgf@lib@sh@temp,\pgf@stop,%
+}
+\def\pgf@lib@sh@logicgate@parseinputs@@long#1,{%
+ \ifx#1\pgf@stop%
+ \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}%
+ \let\pgf@lib@sh@next\relax%
+ \else%
+ \ifnum\c@pgf@countb=\c@pgf@counta%
+ \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}%
+ \let\pgf@lib@sh@next\relax%
+ \else%
+ \advance\c@pgf@countb1\relax%
+ \def\pgf@lib@sh@temp{#1}%
+ \ifx\pgf@lib@sh@invertedtext\pgf@lib@sh@temp%
+ \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{%
+ \expandafter\def\csname input-\the\c@pgf@countb\endcsname{i}}%
+ \else%
+ \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{%
+ \expandafter\def\csname input-\the\c@pgf@countb\endcsname{n}}%
+ \fi%
+ \let\pgf@lib@sh@next\pgf@lib@sh@logicgate@parseinputs@@@long%
+ \fi%
+ \fi%
+ \pgf@lib@sh@next%
+}
+\def\pgf@lib@sh@logicgate@parseinputs@@@long{%
+ \pgfutil@ifnextchar x{\pgf@lib@sh@logicgate@parseinputs@@long}%
+ {\pgf@lib@sh@logicgate@parseinputs@@long}%
+}
+\fi%
+
+\def\pgf@lib@sh@logicgates@IEC@foregroundpath#1{%
+ \dimensions%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \edef\pgf@lib@sh@temp{\pgfkeysvalueof{/pgf/logic gate IEC symbol align}}%
+ \edef\pgf@lib@sh@@temp{/pgf/logic gate IEC symbol align/.cd, \pgf@lib@sh@temp}%
+ \expandafter\pgfkeys\expandafter{\pgf@lib@sh@@temp}%
+ \expandafter\pgftext\expandafter[\pgf@lib@sh@temp]{%
+ \pgfkeysgetvalue{/pgf/logic gate IEC symbol color}{\pgf@lib@sh@temp}%
+ \ifx\pgf@lib@sh@temp\pgfutil@empty%
+ \else%
+ \expandafter\color\expandafter{\pgf@lib@sh@temp}%
+ \fi%
+ \pgfkeysvalueof{/pgf/#1 gate IEC symbol}%
+ }%
+ }%
+}
+
+
+\def\pgf@lib@sh@logicgates@dimensions@IEC#1{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ %
+ % Adjust for the width of the gate symbol.
+ %
+ \setbox\pgf@hbox\hbox{{\pgfkeysvalueof{/pgf/#1 gate IEC symbol}}}% add braces as color-aftergroup-fix TT
+ \pgf@xa.5\wd\pgf@hbox%
+ \pgf@ya.5\ht\pgf@hbox%
+ \advance\pgf@ya.5\dp\pgf@hbox%
+ \ifdim\pgf@x<\pgf@xa%
+ \pgf@x\pgf@xa%
+ \fi%
+ \ifdim\pgf@y<\pgf@ya%
+ \pgf@y\pgf@ya%
+ \fi%
+ \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ %
+ % Adjust for minimum height and width.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@x<.5\pgf@xa%
+ \pgf@x.5\pgf@xa%
+ \fi%
+ \ifdim\pgf@y<.5\pgf@ya%
+ \pgf@y.5\pgf@ya%
+ \fi%
+ %
+ % Adjust the height for the number of inputs.
+ %
+ \c@pgf@counta\pgf@lib@sh@logicgate@numinputs%
+ \advance\c@pgf@counta1\relax%
+ \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \pgf@yb2.0\pgf@yb%
+ \advance\pgf@yb\pgflinewidth%
+ \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/logic gate input sep}}%
+ \edef\inputsep{\the\pgf@yc}%
+ \addtosavedmacro\inputsep%
+ \ifdim\pgf@yb<\pgf@yc%
+ \pgf@yb\pgf@yc%
+ \fi%
+ \multiply\pgf@yb\c@pgf@counta%
+ \ifdim\pgf@y<.5\pgf@yb%
+ \pgf@y.5\pgf@yb%
+ \fi%
+ %
+ \pgf@xa\pgf@y%
+ \pgfmathaddtolength\pgf@xa{-\pgfkeysvalueof{/pgf/inner xsep}}%
+ \edef\innerhalfwidth{\the\pgf@xa}%
+ \addtosavedmacro\innerhalfwidth%
+ %
+ \pgf@ya\pgf@y%
+ \pgfmathaddtolength\pgf@ya{-\pgfkeysvalueof{/pgf/inner ysep}}%
+ \edef\innerhalfheight{\the\pgf@ya}%
+ \addtosavedmacro\innerhalfheight%
+ %
+ % Take into account the outer sep.
+ %
+ \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathaddtolength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
+ %
+ \edef\halfwidth{\the\pgf@x}%
+ \edef\halfheight{\the\pgf@y}%
+ \addtosavedmacro\halfwidth%
+ \addtosavedmacro\halfheight%
+}%
+
+\def\pgf@lib@sh@logicgate@IEC@inputanchor#1{%
+ \dimensions%
+ \centerpoint%
+ \advance\pgf@x-\halfwidth%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-#1\endcsname%
+ \advance\pgf@x-\invertedradius%
+ \advance\pgf@x-\outerinvertedradius%
+ \fi%
+ %
+ \pgfutil@tempdima\halfheight%
+ \multiply\pgfutil@tempdima2\relax%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \multiply\pgfutil@tempdima#1\relax%
+ \advance\pgf@y\halfheight%
+ \advance\pgf@y-\pgfutil@tempdima%
+}
+
+
+
+% Shape and gate IEC
+%
+\pgfdeclareshape{and gate IEC}{
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@and gate IEC\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@and gate IEC@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@and gate IEC@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@IEC@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{An and gate must have at least two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{%
+ \pgf@lib@sh@logicgates@dimensions@IEC{and}%
+ }
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}
+ \anchor{mid west}{%
+ \dimensions%
+ \midpoint%
+ \advance\pgf@x-\halfwidth}%
+ \anchor{mid east}{%
+ \dimensions%
+ \midpoint%
+ \advance\pgf@x\halfwidth}%
+ \anchor{base}{\basepoint}
+ \anchor{base west}{%
+ \dimensions%
+ \basepoint%
+ \advance\pgf@x-\halfwidth}%
+ \anchor{base east}{%
+ \dimensions%
+ \basepoint%
+ \advance\pgf@x\halfwidth}%
+ \anchor{north}{\dimensions\centerpoint\advance\pgf@y\halfheight}%
+ \anchor{south}{\dimensions\centerpoint\advance\pgf@y-\halfheight}%
+ \anchor{east}{\dimensions\centerpoint\advance\pgf@x\halfwidth}%
+ \anchor{west}{\dimensions\centerpoint\advance\pgf@x-\halfwidth}%
+ \anchor{north east}{\dimensions\centerpoint\advance\pgf@x\halfwidth\advance\pgf@y\halfheight}%
+ \anchor{north west}{\dimensions\centerpoint\advance\pgf@x-\halfwidth\advance\pgf@y\halfheight}%
+ \anchor{south east}{\dimensions\centerpoint\advance\pgf@x\halfwidth\advance\pgf@y-\halfheight}%
+ \anchor{south west}{\dimensions\centerpoint\advance\pgf@x-\halfwidth\advance\pgf@y-\halfheight}%
+ \anchor{output}{\dimensions\centerpoint\advance\pgf@x\halfwidth}
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \pgfmathaddtolength\pgf@xc{-\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathaddtolength\pgf@yc{-\pgfkeysvalueof{/pgf/outer xsep}}%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathrectangle{\pgfqpoint{-\pgf@xc}{-\pgf@yc}}%
+ {%
+ \pgf@xc2.0\pgf@xc%
+ \pgf@yc2.0\pgf@yc%
+ \pgfqpoint{\pgf@xc}{\pgf@yc}%
+ }%
+ \pgfpathclose%
+ %
+ % Draw inputs.
+ %
+ \pgf@xc-\halfwidth%
+ \advance\pgf@xc-\invertedradius%
+ \pgf@yc\halfheight%
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{\pgfqpoint{\pgf@xc}{\pgf@yc}}{\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ }%
+ }
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{and}}
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \dimensions%
+ \pgfpointadd{\centerpoint}{\pgfpointborderrectangle{\externalpoint}{\pgfqpoint{\halfwidth}{\halfheight}}}%
+ }%
+}
+
+
+
+
+
+% Shape nand gate IEC
+%
+\pgfdeclareshape{nand gate IEC}{
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@nand gate IEC\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@nand gate IEC@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@nand gate IEC@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@IEC@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{A nand gate must have at least two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{%
+ \pgf@lib@sh@logicgates@dimensions@IEC{nand}%
+ }
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \inheritanchor[from=and gate IEC]{center}
+ \inheritanchor[from=and gate IEC]{mid}
+ \inheritanchor[from=and gate IEC]{mid west}
+ \inheritanchor[from=and gate IEC]{mid east}
+ \inheritanchor[from=and gate IEC]{base}
+ \inheritanchor[from=and gate IEC]{base west}
+ \inheritanchor[from=and gate IEC]{base east}
+ \inheritanchor[from=and gate IEC]{north}
+ \inheritanchor[from=and gate IEC]{south}
+ \inheritanchor[from=and gate IEC]{east}
+ \inheritanchor[from=and gate IEC]{west}
+ \inheritanchor[from=and gate IEC]{north east}
+ \inheritanchor[from=and gate IEC]{north west}
+ \inheritanchor[from=and gate IEC]{south east}
+ \inheritanchor[from=and gate IEC]{south west}
+ \anchor{output}{%
+ \csname pgf@anchor@and gate IEC@east\endcsname%
+ \advance\pgf@x\invertedradius%
+ \advance\pgf@x\outerinvertedradius%
+ }
+ \backgroundpath{%
+ \csname pgf@sh@bg@and gate IEC\endcsname%
+ \pgfpathcircle{%
+ \centerpoint%
+ \advance\pgf@x\halfwidth%
+ \advance\pgf@x\invertedradius%
+ }{+\invertedradius}%
+ }
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{nand}}
+ \inheritanchorborder[from=and gate IEC]
+}
+
+
+
+
+
+% Shape or gate IEC
+%
+\pgfdeclareshape{or gate IEC}{
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@or gate IEC\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@or gate IEC@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@or gate IEC@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@IEC@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{An or gate must have at least two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{%
+ \pgf@lib@sh@logicgates@dimensions@IEC{or}%
+ }
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \inheritanchor[from=and gate IEC]{center}
+ \inheritanchor[from=and gate IEC]{mid}
+ \inheritanchor[from=and gate IEC]{mid west}
+ \inheritanchor[from=and gate IEC]{mid east}
+ \inheritanchor[from=and gate IEC]{base}
+ \inheritanchor[from=and gate IEC]{base west}
+ \inheritanchor[from=and gate IEC]{base east}
+ \inheritanchor[from=and gate IEC]{north}
+ \inheritanchor[from=and gate IEC]{south}
+ \inheritanchor[from=and gate IEC]{east}
+ \inheritanchor[from=and gate IEC]{west}
+ \inheritanchor[from=and gate IEC]{north east}
+ \inheritanchor[from=and gate IEC]{north west}
+ \inheritanchor[from=and gate IEC]{south east}
+ \inheritanchor[from=and gate IEC]{south west}
+ \inheritanchor[from=and gate IEC]{output}
+ \inheritbackgroundpath[from=and gate IEC]
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{or}}
+ \inheritanchorborder[from=and gate IEC]
+}
+
+
+
+
+
+% Shape nor gate IEC
+%
+\pgfdeclareshape{nor gate IEC}{
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@nor gate IEC\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@nor gate IEC@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@nor gate IEC@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@IEC@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{A nor gate must have at least two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{%
+ \pgf@lib@sh@logicgates@dimensions@IEC{nor}%
+ }
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \inheritanchor[from=and gate IEC]{center}
+ \inheritanchor[from=and gate IEC]{mid}
+ \inheritanchor[from=and gate IEC]{mid west}
+ \inheritanchor[from=and gate IEC]{mid east}
+ \inheritanchor[from=and gate IEC]{base}
+ \inheritanchor[from=and gate IEC]{base west}
+ \inheritanchor[from=and gate IEC]{base east}
+ \inheritanchor[from=and gate IEC]{north}
+ \inheritanchor[from=and gate IEC]{south}
+ \inheritanchor[from=and gate IEC]{east}
+ \inheritanchor[from=and gate IEC]{west}
+ \inheritanchor[from=and gate IEC]{north east}
+ \inheritanchor[from=and gate IEC]{north west}
+ \inheritanchor[from=and gate IEC]{south east}
+ \inheritanchor[from=and gate IEC]{south west}
+ \inheritanchor[from=nand gate IEC]{output}%
+ \inheritbackgroundpath[from=nand gate IEC]
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{nor}}
+ \inheritanchorborder[from=and gate IEC]
+}
+
+
+
+
+
+% Shape xor gate IEC
+%
+\pgfdeclareshape{xor gate IEC}{
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@xor gate IEC\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{2}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@xor gate IEC@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@xor gate IEC@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@IEC@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{An xor gate must have two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{%
+ \pgf@lib@sh@logicgates@dimensions@IEC{xor}%
+ }
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \inheritanchor[from=and gate IEC]{center}
+ \inheritanchor[from=and gate IEC]{mid}
+ \inheritanchor[from=and gate IEC]{mid west}
+ \inheritanchor[from=and gate IEC]{mid east}
+ \inheritanchor[from=and gate IEC]{base}
+ \inheritanchor[from=and gate IEC]{base west}
+ \inheritanchor[from=and gate IEC]{base east}
+ \inheritanchor[from=and gate IEC]{north}
+ \inheritanchor[from=and gate IEC]{south}
+ \inheritanchor[from=and gate IEC]{east}
+ \inheritanchor[from=and gate IEC]{west}
+ \inheritanchor[from=and gate IEC]{north east}
+ \inheritanchor[from=and gate IEC]{north west}
+ \inheritanchor[from=and gate IEC]{south east}
+ \inheritanchor[from=and gate IEC]{south west}
+ \inheritanchor[from=and gate IEC]{output}
+ \inheritbackgroundpath[from=and gate IEC]
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{xor}}
+ \inheritanchorborder[from=and gate IEC]
+}
+
+
+
+
+% Shape xnor gate IEC
+%
+
+\pgfdeclareshape{xnor gate IEC}{
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@xnor gate IEC\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@xnor gate IEC@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@xnor gate IEC@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@IEC@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{A xnor gate must have two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{%
+ \pgf@lib@sh@logicgates@dimensions@IEC{xnor}%
+ }
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \inheritanchor[from=and gate IEC]{center}
+ \inheritanchor[from=and gate IEC]{mid}
+ \inheritanchor[from=and gate IEC]{mid west}
+ \inheritanchor[from=and gate IEC]{mid east}
+ \inheritanchor[from=and gate IEC]{base}
+ \inheritanchor[from=and gate IEC]{base west}
+ \inheritanchor[from=and gate IEC]{base east}
+ \inheritanchor[from=and gate IEC]{north}
+ \inheritanchor[from=and gate IEC]{south}
+ \inheritanchor[from=and gate IEC]{east}
+ \inheritanchor[from=and gate IEC]{west}
+ \inheritanchor[from=and gate IEC]{north east}
+ \inheritanchor[from=and gate IEC]{north west}
+ \inheritanchor[from=and gate IEC]{south east}
+ \inheritanchor[from=and gate IEC]{south west}
+ \inheritanchor[from=nand gate IEC]{output}
+ \inheritbackgroundpath[from=nand gate IEC]
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{xnor}}
+ \inheritanchorborder[from=and gate IEC]
+}
+
+
+
+
+% Shape buffer gate IEC
+%
+\pgfdeclareshape{buffer gate IEC}{
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@buffer gate IEC\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1}% Maximum 1 input.
+ %
+ \expandafter\gdef\csname pgf@anchor@buffer gate IEC@input\endcsname{%
+ \pgf@lib@sh@logicgate@IEC@inputanchor{1}%
+ }%
+ \ifnum\pgf@lib@sh@logicgate@numinputs=0\relax%
+ \PackageError{PGF}{A buffer gate must have one inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{%
+ \pgf@lib@sh@logicgates@dimensions@IEC{xor}%
+ }
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \inheritanchor[from=and gate IEC]{center}
+ \inheritanchor[from=and gate IEC]{mid}
+ \inheritanchor[from=and gate IEC]{mid west}
+ \inheritanchor[from=and gate IEC]{mid east}
+ \inheritanchor[from=and gate IEC]{base}
+ \inheritanchor[from=and gate IEC]{base west}
+ \inheritanchor[from=and gate IEC]{base east}
+ \inheritanchor[from=and gate IEC]{north}
+ \inheritanchor[from=and gate IEC]{south}
+ \inheritanchor[from=and gate IEC]{east}
+ \inheritanchor[from=and gate IEC]{west}
+ \inheritanchor[from=and gate IEC]{north east}
+ \inheritanchor[from=and gate IEC]{north west}
+ \inheritanchor[from=and gate IEC]{south east}
+ \inheritanchor[from=and gate IEC]{south west}
+ \inheritanchor[from=and gate IEC]{output}
+ \inheritbackgroundpath[from=and gate IEC]
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{buffer}}
+ \inheritanchorborder[from=and gate IEC]
+}
+
+
+
+
+
+% Shape not gate IEC
+%
+\pgfdeclareshape{not gate IEC}{
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@not gate IEC\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1}%
+ %
+ \pgfutil@ifundefined{pgf@anchor@not gate IEC@input}{%
+ \expandafter\gdef\csname pgf@anchor@not gate IEC@input\endcsname{%
+ \pgf@lib@sh@logicgate@IEC@inputanchor{1}%
+ }}{}%
+ \ifnum\pgf@lib@sh@logicgate@numinputs=0\relax%
+ \PackageError{PGF}{A not gate must have one input}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{%
+ \pgf@lib@sh@logicgates@dimensions@IEC{not}%
+ }
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \inheritanchor[from=and gate IEC]{center}
+ \inheritanchor[from=and gate IEC]{mid}
+ \inheritanchor[from=and gate IEC]{mid west}
+ \inheritanchor[from=and gate IEC]{mid east}
+ \inheritanchor[from=and gate IEC]{base}
+ \inheritanchor[from=and gate IEC]{base west}
+ \inheritanchor[from=and gate IEC]{base east}
+ \inheritanchor[from=and gate IEC]{north}
+ \inheritanchor[from=and gate IEC]{south}
+ \inheritanchor[from=and gate IEC]{east}
+ \inheritanchor[from=and gate IEC]{west}
+ \inheritanchor[from=and gate IEC]{north east}
+ \inheritanchor[from=and gate IEC]{north west}
+ \inheritanchor[from=and gate IEC]{south east}
+ \inheritanchor[from=and gate IEC]{south west}
+ \inheritanchor[from=nand gate IEC]{output}
+ \inheritbackgroundpath[from=nand gate IEC]
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{not}}
+ \inheritanchorborder[from=and gate IEC]
+}
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.US.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.US.code.tex
new file mode 100644
index 00000000000..76d6916bcd5
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.US.code.tex
@@ -0,0 +1,2587 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+
+\newif\ifpgfgateanchorsuseboundingrectangle%
+
+
+% Keys for US/CDH logic gates.
+%
+\pgfkeys{/pgf/.cd,%
+ logic gate input sep/.initial=0.125cm,
+ logic gate inputs/.initial={normal,normal},%
+ logic gate inverted radius/.initial=2pt,%
+ logic gate anchors use bounding box/.is if=pgfgateanchorsuseboundingrectangle,%
+}
+
+% An internal macro for calculating internal dimensions of
+% the US + CDH gates (excluding and gate US and nand gate US).
+%
+\def\pgf@lib@sh@logicgates@dimensions@orUS{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ %
+ % Adjust the height for the number of inputs.
+ %
+ \c@pgf@counta\pgf@lib@sh@logicgate@numinputs%
+ \advance\c@pgf@counta1\relax%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@ya\pgflinewidth%
+ \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/logic gate input sep}}%
+ \pgf@yb.5\pgf@yb%
+ \ifdim\pgf@ya<\pgf@yb%
+ \pgf@ya\pgf@yb%
+ \fi%
+ \multiply\pgf@ya\c@pgf@counta%
+ \ifdim\pgf@y<\pgf@ya%
+ \pgf@y\pgf@ya%
+ \fi%
+ %
+ \ifdim\pgf@x>\pgf@y%
+ \pgf@y\pgf@x%
+ \else%
+ \pgf@x\pgf@y%
+ \fi%
+ %
+ % Adjust for minimum height and width.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@y<.5\pgf@ya%
+ \pgf@y.5\pgf@ya%
+ \fi%
+ \pgf@xb\pgf@x%
+ \advance\pgf@xb1.732051\pgf@y% 2y*cos(30)
+ \ifdim\pgf@xb<\pgf@xa%
+ \pgf@xb\pgf@xa%
+ \pgf@x0.366025\pgf@xb% xb / (1 + 2*cos(30))
+ \fi%
+ %
+ \ifdim\pgf@x>\pgf@y%
+ \pgf@y\pgf@x%
+ \else%
+ \pgf@x\pgf@y%
+ \fi%
+ \edef\halfside{\the\pgf@x}%
+ \addtosavedmacro\halfside%
+ %
+ % Take into account the outer sep.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \edef\outerxsep{\the\pgf@xa}%
+ \edef\outerysep{\the\pgf@ya}%
+ \addtosavedmacro\outerxsep%
+ \addtosavedmacro\outerysep%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ %
+ \edef\halfwidth{\the\pgf@x}%
+ \edef\halfheight{\the\pgf@y}%
+ \addtosavedmacro\halfwidth%
+ \addtosavedmacro\halfheight%
+ %
+ \pgfextract@process\tipanchor{%
+ \advance\pgf@x-\pgf@xa%
+ \advance\pgf@y-\pgf@ya%
+ \pgf@x-.16666\pgf@x%
+ \pgf@yb2.0\pgf@y%
+ \advance\pgf@x.866025\pgf@yb%
+ \advance\pgf@x1.154701\pgf@xa%
+ \pgf@y0pt%
+ }%
+ \addtosavedmacro\tipanchor%
+}%
+
+
+% An internal macro for calculating internal dimensions of
+% the and gate US and nand gate US.
+%
+\def\pgf@lib@sh@logicgates@dimensions@andUS{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ %
+ % Adjust the height for the number of inputs.
+ %
+ \c@pgf@counta\pgf@lib@sh@logicgate@numinputs%
+ \advance\c@pgf@counta1\relax%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@ya\pgflinewidth%
+ \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/logic gate input sep}}%
+ \pgf@yb.5\pgf@yb%
+ \ifdim\pgf@ya<\pgf@yb%
+ \pgf@ya\pgf@yb%
+ \fi%
+ \multiply\pgf@ya\c@pgf@counta%
+ \ifdim\pgf@y<\pgf@ya%
+ \pgf@y\pgf@ya%
+ \fi%
+ %
+ \ifdim\pgf@x>\pgf@y%
+ \pgf@y\pgf@x%
+ \else%
+ \pgf@x\pgf@y%
+ \fi%
+ %
+ % Adjust for minimum height and width.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@y<.5\pgf@ya%
+ \pgf@y.5\pgf@ya%
+ \fi%
+ \pgf@xb2.5\pgf@x%
+ \ifdim\pgf@xb<\pgf@xa%
+ \pgf@xb\pgf@xa%
+ \pgf@x0.4\pgf@xb%
+ \fi%
+ %
+ \ifdim\pgf@x>\pgf@y%
+ \pgf@y\pgf@x%
+ \else%
+ \pgf@x\pgf@y%
+ \fi%
+ \edef\halfside{\the\pgf@x}%
+ \addtosavedmacro\halfside%
+ %
+ % Take into account the outer sep.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \edef\outerxsep{\the\pgf@xa}%
+ \edef\outerysep{\the\pgf@ya}%
+ \addtosavedmacro\outerxsep%
+ \addtosavedmacro\outerysep%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ %
+ \edef\halfwidth{\the\pgf@x}%
+ \edef\halfheight{\the\pgf@y}%
+ \addtosavedmacro\halfwidth%
+ \addtosavedmacro\halfheight%
+ %
+}%
+
+
+% Internal macro for parsing inputs.
+%
+\expandafter\ifx\csname pgf@lib@sh@logicgate@parseinputs\endcsname\relax%
+\def\pgf@lib@sh@logicgate@parseinputs#1{%
+ \edef\pgf@lib@sh@temp{\pgfkeysvalueof{/pgf/logic gate inputs}}%
+ \c@pgf@counta#1\relax%
+ \c@pgf@countb0\relax%
+ \expandafter\pgfutil@in@\expandafter,\expandafter{\pgf@lib@sh@temp}%
+ \ifpgfutil@in@%
+ \let\pgf@lib@sh@next\pgf@lib@sh@logicgate@parseinputs@long%
+ \else%
+ \let\pgf@lib@sh@next\pgf@lib@sh@logicgate@parseinputs@short%
+ \fi%
+ \pgf@lib@sh@next%
+}
+\def\pgf@lib@sh@itext{i}
+\def\pgf@lib@sh@invertedtext{inverted}
+%
+% The `short' version for input specifcation is an extension of
+% ideas due to Juergen Werber and Christoph Bartoschek.
+%
+\def\pgf@lib@sh@logicgate@parseinputs@short{%
+ \expandafter\pgf@lib@sh@logicgate@parseinputs@@short\pgf@lib@sh@temp\pgf@stop%
+}
+\def\pgf@lib@sh@logicgate@parseinputs@@short#1{%
+ \ifx#1\pgf@stop%
+ \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}%
+ \let\pgf@lib@sh@next\relax%
+ \else%
+ \ifnum\c@pgf@countb=\c@pgf@counta%
+ \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}%
+ \let\pgf@lib@sh@next\relax%
+ \else%
+ \advance\c@pgf@countb1\relax%
+ \expandafter\ifx\pgf@lib@sh@itext#1%
+ \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{%
+ \expandafter\def\csname input-\the\c@pgf@countb\endcsname{i}}%
+ \else%
+ \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{%
+ \expandafter\def\csname input-\the\c@pgf@countb\endcsname{n}}%
+ \fi%
+ \let\pgf@lib@sh@next\pgf@lib@sh@logicgate@parseinputs@@short%
+ \fi%
+ \fi%
+ \pgf@lib@sh@next%
+}
+\def\pgf@lib@sh@logicgate@parseinputs@long{%
+ \expandafter\pgf@lib@sh@logicgate@parseinputs@@long\pgf@lib@sh@temp,\pgf@stop,%
+}
+\def\pgf@lib@sh@logicgate@parseinputs@@long#1,{%
+ \ifx#1\pgf@stop%
+ \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}%
+ \let\pgf@lib@sh@next\relax%
+ \else%
+ \ifnum\c@pgf@countb=\c@pgf@counta%
+ \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}%
+ \let\pgf@lib@sh@next\relax%
+ \else%
+ \advance\c@pgf@countb1\relax%
+ \def\pgf@lib@sh@temp{#1}%
+ \ifx\pgf@lib@sh@invertedtext\pgf@lib@sh@temp%
+ \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{%
+ \expandafter\def\csname input-\the\c@pgf@countb\endcsname{i}}%
+ \else%
+ \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{%
+ \expandafter\def\csname input-\the\c@pgf@countb\endcsname{n}}%
+ \fi%
+ \let\pgf@lib@sh@next\pgf@lib@sh@logicgate@parseinputs@@@long%
+ \fi%
+ \fi%
+ \pgf@lib@sh@next%
+}
+\def\pgf@lib@sh@logicgate@parseinputs@@@long{%
+ \pgfutil@ifnextchar x{\pgf@lib@sh@logicgate@parseinputs@@long}%
+ {\pgf@lib@sh@logicgate@parseinputs@@long}%
+}
+\fi%
+
+% Internal macro for calculation input anchors. Used by
+% both and gates and nand gates, and also the not gate and buffer.
+%
+\def\pgf@lib@sh@logicgate@AND@inputanchor#1{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-.166666\pgf@xa%
+ \advance\pgf@x-\halfwidth%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-#1\endcsname%
+ \advance\pgf@x-\invertedradius%
+ \advance\pgf@x-\outerinvertedradius%
+ \fi%
+ %
+ \pgfutil@tempdima\halfside%
+ \multiply\pgfutil@tempdima2\relax%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \multiply\pgfutil@tempdima#1\relax%
+ \advance\pgf@y\halfside%
+ \advance\pgf@y-\pgfutil@tempdima%
+}
+
+
+
+
+% Shape and gate US
+%
+\pgfdeclareshape{and gate US}{%
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@and gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@and gate US@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@and gate US@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@AND@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{An and gate must have at least two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@andUS}
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \csname pgf@anchor@and gate US@east\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}
+ \anchor{mid west}{%
+ \csname pgf@anchor@and gate US@west\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \csname pgf@anchor@and gate US@east\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}
+ \anchor{base west}{%
+ \csname pgf@anchor@and gate US@west\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}
+ \anchor{east}{%
+ \dimensions%
+ \pgf@xa\halfwidth%
+ \pgf@xb\pgf@xa%
+ \advance\pgf@xb-\outerxsep%
+ \centerpoint%
+ \advance\pgf@x.333333\pgf@xb%
+ \advance\pgf@x\pgf@xa%
+ }
+ \anchor{output}{\csname pgf@anchor@and gate US@east\endcsname}
+ \anchor{north east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@nand gate US@east\endcsname%
+ \advance\pgf@y\halfheight%
+ \else
+ \pgf@xa\halfwidth%
+ \pgf@ya\halfheight%
+ \pgf@xb\pgf@xa%
+ \advance\pgf@xb-\outerxsep%
+ \centerpoint%
+ \advance\pgf@x.333333\pgf@xb%
+ \advance\pgf@x.707106\pgf@xa%
+ \advance\pgf@y.707106\pgf@ya%
+ \fi%
+ }
+ \anchor{south east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@nand gate US@east\endcsname%
+ \advance\pgf@y-\halfheight%
+ \else
+ \pgf@xa\halfwidth%
+ \pgf@ya\halfheight%
+ \pgf@xb\pgf@xa%
+ \advance\pgf@xb-\outerxsep%
+ \centerpoint%
+ \advance\pgf@x.333333\pgf@xb%
+ \advance\pgf@x.707106\pgf@xa%
+ \advance\pgf@y-.707106\pgf@ya%
+ \fi%
+ }
+ \anchor{north}{%
+ \dimensions%
+ \centerpoint%
+ \advance\pgf@y\halfheight%
+ }
+ \anchor{south}{%
+ \dimensions%
+ \centerpoint%
+ \advance\pgf@y-\halfheight%
+ }
+ \anchor{south west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@y-\halfheight%
+ }
+ \anchor{north west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@y\halfheight%
+ }
+ \anchor{west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ }
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ \pgf@xb.333333\pgf@xc%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{\pgf@xb}{\pgf@yc}}%
+ {%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{\pgf@yc}}%
+ \pgfpathclose%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@xa\halfside%
+ \pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-.5\pgflinewidth%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ }%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}%
+ \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
+ \let\externalangle\pgfmathresult%
+ \dimensions%
+ \pgf@xb\halfside%
+ \pgf@xc1.66666\pgf@xb%
+ \advance\pgf@xc\outerxsep%
+ \pgf@yc\halfheight%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@and gate US@north west\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\centerpoint}{\centerpoint\advance\pgf@x.333333\pgf@xb\advance\pgf@y\pgf@yc}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@x.333333\pgf@xb%
+ }%
+ {0}{90}{+\halfwidth and +\halfheight}%
+ \else%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {\centerpoint\advance\pgf@x.333333\pgf@xb\advance\pgf@y\pgf@yc}%
+ {\centerpoint\advance\pgf@x-\pgf@xc\advance\pgf@y\pgf@yc}%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\centerpoint\advance\pgf@x.333333\pgf@xb\advance\pgf@y-\pgf@yc}%
+ \ifdim\externalangle pt>\pgfmathresult pt\relax%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@x.333333\pgf@xb%
+ }%
+ {270}{360}{+\halfwidth and +\halfheight}%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@and gate US@south west\endcsname}%
+ \ifdim\externalangle pt>\pgfmathresult pt\relax%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {\centerpoint\advance\pgf@x.333333\pgf@xb\advance\pgf@y-\pgf@yc}%
+ {\csname pgf@anchor@and gate US@south west\endcsname}%
+ \else%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {\csname pgf@anchor@and gate US@north west\endcsname}%
+ {\csname pgf@anchor@and gate US@south west\endcsname}%
+ \fi%
+ \fi%
+ \fi%
+ }
+}
+
+
+
+
+
+% Shape nand gate US
+%
+\pgfdeclareshape{nand gate US}{%
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@nand gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@nand gate US@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@nand gate US@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@AND@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{A nand gate must have at least two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@andUS}
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \anchor{center}{\centerpoint}%
+ \inheritanchor[from=and gate US]{mid}
+ \inheritanchor[from=and gate US]{mid east}
+ \inheritanchor[from=and gate US]{mid west}
+ \inheritanchor[from=and gate US]{base}
+ \inheritanchor[from=and gate US]{base east}
+ \inheritanchor[from=and gate US]{base west}
+ \anchor{output}{%
+ \dimensions
+ \pgfpointadd{\centerpoint}{%
+ \pgf@xa\halfside%
+ \pgf@x1.33333\pgf@xa%
+ \advance\pgf@x\invertedradius%
+ \advance\pgf@x\outerinvertedradius%
+ \advance\pgf@x\outerxsep%
+ \pgf@y0pt%
+ }%
+ }
+ \inheritanchor[from=and gate US]{east}
+ \inheritanchor[from=and gate US]{north east}
+ \inheritanchor[from=and gate US]{south east}
+ \inheritanchor[from=and gate US]{north}
+ \inheritanchor[from=and gate US]{south}
+ \inheritanchor[from=and gate US]{south west}
+ \inheritanchor[from=and gate US]{north west}
+ \inheritanchor[from=and gate US]{west}
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ \pgf@xb.333333\pgf@xc%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{\pgf@xb}{\pgf@yc}}%
+ {%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{\pgf@yc}}%
+ \pgfpathclose%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@xa\halfside%
+ \pgf@x-1.166666\pgf@xa%
+ \advance\pgf@x-.5\pgflinewidth%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ %
+ % Draw the output inverter.
+ %
+ {%
+ \pgfpathcircle{%
+ \pgf@x1.33333\pgf@xc%
+ \advance\pgf@x\outerinvertedradius%
+ \pgf@y0pt%
+ }{+\invertedradius}%
+ }%
+ }%
+ }
+ \inheritanchorborder[from=and gate US]
+}
+
+
+% Internal macro for calculation input anchors. Used by
+% or, nor xnor gates (US).
+%
+\def\pgf@lib@sh@logicgate@OR@inputanchor#1{%
+ \dimensions%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ %
+ \pgfutil@tempdima\halfside%
+ \multiply\pgfutil@tempdima2\relax%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \multiply\pgfutil@tempdima#1\relax%
+ \pgf@yc\pgf@ya%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ %
+ \pgf@xb\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@xc-1.166666\pgf@ya%
+ \advance\pgf@xc-.866025\pgf@xb%
+ \advance\pgf@xc\pgfmathresult\pgf@yb%
+ \advance\pgf@xc\halflinewidth%
+ \advance\pgf@xc-\outerxsep%
+ %
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-#1\endcsname%
+ \advance\pgf@xc-\invertedradius%
+ \advance\pgf@xc-\outerinvertedradius%
+ \fi%
+ %
+ \centerpoint%
+ \advance\pgf@x\pgf@xc%
+ \advance\pgf@y\pgf@yc%
+}
+
+
+% Shape or gate US
+%
+\pgfdeclareshape{or gate US}{%
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@or gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@or gate US@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@or gate US@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@OR@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{An or gate must have at least two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\halflinewidth{%
+ \pgf@x.5\pgflinewidth%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \csname pgf@anchor@or gate US@east\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}
+ \anchor{mid west}{%
+ \csname pgf@anchor@or gate US@north west\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \csname pgf@anchor@or gate US@east\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}
+ \anchor{base west}{%
+ \csname pgf@anchor@or gate US@north west\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}
+ \anchor{east}{%
+ \dimensions%
+ \pgfpointadd{\centerpoint}{\tipanchor}%
+ }
+ \anchor{output}{\csname pgf@anchor@or gate US@east\endcsname}
+ \anchor{north east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \tipanchor%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\halfheight%
+ \else%
+ \centerpoint%
+ \pgf@xa\halfwidth%
+ \pgf@ya\halfheight%
+ \pgf@xb\halfside%
+ \advance\pgf@x-.166666\pgf@xb%
+ \advance\pgf@xa\pgf@xb%
+ \advance\pgf@x.5\pgf@xa%
+ \advance\pgf@y-\pgf@xb%
+ \advance\pgf@ya\pgf@xb%
+ \advance\pgf@y.866025\pgf@ya%
+ \fi%
+ }
+ \anchor{south east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \tipanchor%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y-\halfheight%
+ \else
+ \centerpoint%
+ \pgf@xa\halfwidth%
+ \pgf@ya\halfheight%
+ \pgf@xb\halfside%
+ \advance\pgf@x-.166666\pgf@xb%
+ \advance\pgf@xa\pgf@xb%
+ \advance\pgf@x.5\pgf@xa%
+ \advance\pgf@y\pgf@xb%
+ \advance\pgf@ya\pgf@xb%
+ \advance\pgf@y-.866025\pgf@ya%
+ \fi%
+ }
+ \anchor{north}{%
+ \dimensions%
+ \centerpoint%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@y\halfheight%
+ \else%
+ \pgf@ya\halfheight%
+ \advance\pgf@y.993043\pgf@ya%
+ \fi%
+ }
+ \anchor{south}{%
+ \dimensions%
+ \centerpoint%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@y-\halfheight%
+ \else%
+ \pgf@ya\halfheight%
+ \advance\pgf@y-.993043\pgf@ya%
+ \fi%
+ }
+ \anchor{south west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x-1.732050\pgf@xa%
+ \advance\pgf@y-\halfheight%
+ }
+ \anchor{north west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x-1.732050\pgf@xa%
+ \advance\pgf@y\halfheight%
+ }
+ \anchor{west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \else%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@x0.267949\pgf@xa%
+ \fi%
+ }
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \pgfpatharc{-30}{0}{+\pgf@yc}%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \pgfpatharc{0}{30}{+\pgf@yc}%
+ }%
+ \pgfpathclose%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ \pgf@xa\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
+ \let\sineangle\pgfmathresult%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@x-1.166666\pgf@ya%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x\pgfmathresult\pgf@yb%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ }%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \pgf@xb\pgf@x%
+ \pgf@yb\pgf@y%
+ \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
+ \let\externalangle\pgfmathresult%
+ \dimensions%
+ \pgf@xc\halfside%
+ %
+ \pgf@xc-.166666\pgf@xc%
+ \ifdim\pgf@xa<\pgf@xc%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@or gate US@north west\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@or gate US@north\endcsname%
+ }%
+ {\csname pgf@anchor@or gate US@north west\endcsname}%
+ \else%
+ \pgfmathsubtract@{360}{\pgfmathresult}%
+ \ifdim\externalangle pt>\pgfmathresult pt\relax%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@or gate US@south\endcsname%
+ }%
+ {\csname pgf@anchor@or gate US@south west\endcsname}%
+ \else%
+ \ifdim\pgf@ya>\pgf@yb%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \advance\pgf@yc-\outerxsep%
+ \pgfextract@process\point{%
+ \pgfmathpointintersectionoflineandarc{\centerpoint}{\externalpoint}%
+ {%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.166666\pgf@xa%
+ \pgf@xa2.0\pgf@xa%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ }%
+ {0}{90}{+\pgf@yc}%
+ }%
+ \else%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \advance\pgf@yc-\outerxsep%
+ \pgfextract@process\point{%
+ \pgfmathpointintersectionoflineandarc{\centerpoint}{\externalpoint}%
+ {%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.166666\pgf@xa%
+ \pgf@xa2.0\pgf@xa%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ }%
+ {270}{360}{+\pgf@yc}%
+ }%
+ \fi%
+ \fi%
+ \fi%
+ \else%
+ \ifdim\pgf@y=0pt\relax%
+ \csname pgf@anchor@and gate US@east\endcsname%
+ \else%
+ \pgf@xc\halfwidth%
+ \advance\pgf@xc\halfside%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \pgf@xb\halfside%
+ \pgf@xb-.166666\pgf@xb%
+ \ifdim\pgf@ya<0pt%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@y\halfside%
+ \advance\pgf@x\pgf@xb%
+ }%
+ {270}{330}{+\pgf@yc}%
+ \else%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@y-\halfside%
+ \advance\pgf@x\pgf@xb%
+ }%
+ {30}{90}{+\pgf@xc and +\pgf@yc}%
+ \fi%
+ \fi%
+ \fi%
+ }%
+}
+
+
+
+
+% Shape nor gate US
+%
+\pgfdeclareshape{nor gate US}{%
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@nor gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@nor gate US@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@nor gate US@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@OR@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{A nor gate must have at least two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\halflinewidth{%
+ \pgf@x.5\pgflinewidth%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \inheritanchor[from=or gate US]{center}
+ \inheritanchor[from=or gate US]{mid}
+ \inheritanchor[from=or gate US]{mid east}
+ \inheritanchor[from=or gate US]{mid west}
+ \inheritanchor[from=or gate US]{base}
+ \inheritanchor[from=or gate US]{base east}
+ \inheritanchor[from=or gate US]{base west}
+ \inheritanchor[from=or gate US]{east}
+ \inheritanchor[from=or gate US]{north east}
+ \inheritanchor[from=or gate US]{south east}
+ \inheritanchor[from=or gate US]{north}
+ \inheritanchor[from=or gate US]{south}
+ \inheritanchor[from=or gate US]{south west}
+ \inheritanchor[from=or gate US]{north west}
+ \inheritanchor[from=or gate US]{west}
+ \anchor{output}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xc\halfside%
+ \pgf@yc\pgf@xc%
+ \advance\pgf@x-.166666\pgf@xc%
+ \pgf@yc2.0\pgf@yc%
+ \advance\pgf@x.866025\pgf@yc%
+ \advance\pgf@x\outerinvertedradius%
+ \advance\pgf@x\invertedradius%
+ \advance\pgf@x\outerxsep%
+ }%
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \pgfpatharc{-30}{0}{+\pgf@yc}%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \pgfpatharc{0}{30}{+\pgf@yc}%
+ }%
+ \pgfpathclose%
+ % Draw the output inverter.
+ %
+ {%
+ \pgfpathcircle{%
+ \pgf@x-.166666\pgf@xc%
+ \pgf@yc2.0\pgf@yc%
+ \advance\pgf@x.866025\pgf@yc%
+ \advance\pgf@x\outerinvertedradius%
+ \pgf@y0pt%
+ }{+\invertedradius}%
+ }%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ \pgf@xa\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
+ \let\sineangle\pgfmathresult%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@x-1.166666\pgf@ya%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x\pgfmathresult\pgf@yb%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ }%
+ }%
+ \inheritanchorborder[from=or gate US]
+}
+
+
+
+% Internal macro for calculation input anchors. Used by
+% xor and xnor gates (US).
+%
+\def\pgf@lib@sh@logicgate@XOR@inputanchor#1{%
+ \dimensions%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ %
+ \pgfutil@tempdima\halfside%
+ \multiply\pgfutil@tempdima2\relax%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \multiply\pgfutil@tempdima#1\relax%
+ \pgf@yc\pgf@ya%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ %
+ \pgf@xb\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@xc-1.166666\pgf@ya%
+ \advance\pgf@xc-.866025\pgf@xb%
+ \advance\pgf@xc\pgfmathresult\pgf@yb%
+ \advance\pgf@xc\halflinewidth%
+ \advance\pgf@xc-\outerxsep%
+ %
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-#1\endcsname%
+ \advance\pgf@xc-\invertedradius%
+ \advance\pgf@xc-\outerinvertedradius%
+ \fi%
+ %
+ \centerpoint%
+ \advance\pgf@x\pgf@xc%
+ \advance\pgf@y\pgf@yc%
+ \pgf@xa\halfside%
+ \advance\pgf@x-.333333\pgf@xa%
+}
+
+
+
+
+
+% Shape xor gate US
+%
+\pgfdeclareshape{xor gate US}{%
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@xor gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{2}%
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@xor gate US@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@xor gate US@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@XOR@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{An xor gate must have at two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\halflinewidth{%
+ \pgf@x.5\pgflinewidth%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \inheritanchor[from=or gate US]{mid east}
+ \anchor{mid west}{%
+ \csname pgf@anchor@xor gate US@north west\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}
+ \anchor{base}{\basepoint}%
+ \inheritanchor[from=or gate US]{base east}
+ \anchor{base west}{%
+ \csname pgf@anchor@xor gate US@north west\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}
+ \inheritanchor[from=or gate US]{base}
+ \inheritanchor[from=or gate US]{output}
+ \inheritanchor[from=or gate US]{east}
+ \inheritanchor[from=or gate US]{north east}
+ \inheritanchor[from=or gate US]{south east}
+ \inheritanchor[from=or gate US]{north}
+ \inheritanchor[from=or gate US]{south}
+ \anchor{south west}{%
+ \dimensions%
+ \pgf@xa\halfside%
+ \pgf@xa-3.232051\pgf@xa% (7/6 + 2*cos(30) + 1/3) * x
+ \pgf@xb\halfside%
+ \pgf@xb2.0\pgf@xb%
+ \advance\pgf@xb-\halflinewidth%
+ \advance\pgf@xa.866025\pgf@xb%
+ \pgf@ya.5\pgf@xb%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@y-\halfheight%
+ \else%
+ \advance\pgf@y-\pgf@ya%
+ \fi%
+ }
+ \anchor{north west}{%
+ \dimensions%
+ \pgf@xa\halfside%
+ \pgf@xa-3.232051\pgf@xa% (7/6 + 2*cos(30) + 1/3) * x
+ \pgf@xb\halfside%
+ \pgf@xb2.0\pgf@xb%
+ \advance\pgf@xb-\halflinewidth%
+ \advance\pgf@xa.866025\pgf@xb%
+ \pgf@ya.5\pgf@xb%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@y\halfheight%
+ \else%
+ \advance\pgf@y\pgf@ya%
+ \fi%
+ }
+ \anchor{west}{%
+ \dimensions%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ %
+ \pgf@xb\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{0}{\pgfmath@tonumber{\pgf@yb}}%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@xc-1.166666\pgf@ya%
+ \advance\pgf@xc-.866025\pgf@xb%
+ \advance\pgf@xc\pgfmathresult\pgf@yb%
+ \advance\pgf@xc\halflinewidth%
+ \advance\pgf@xc-\outerxsep%
+ %
+ \centerpoint%
+ \advance\pgf@x\pgf@xc%
+ \pgf@xa\halfside%
+ \advance\pgf@x-.333333\pgf@xa%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \pgf@xa2.0\pgf@xa%
+ \advance\pgf@x-0.133974\pgf@xa%
+ \fi%
+ }
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ {%
+ \pgf@yc2.66666\pgf@yc%
+ \pgfpatharc{-22}{0}{+1.166666\pgf@yc and +\pgf@yc}%
+ }
+ {%
+ \pgf@yc2.66666\pgf@yc%
+ \pgfpatharc{0}{22}{+1.166666\pgf@yc and +\pgf@yc}%
+ }%
+ \pgfpathclose%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ \pgf@xa\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@x-1.5\pgf@ya%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x\pgfmathresult\pgf@yb%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ %
+ % Now, some fooling around to stop the `tail' being filled.
+ % Technically it still is, but it isn't visible.
+ %
+ \pgf@xc\halfside%
+ \pgf@yc\halfside%
+ \pgfpathmoveto{\pgfqpoint{-1.5\pgf@xc}{-\pgf@yc}}%
+ \pgf@yc2.0\pgf@yc%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter<61\relax%
+ {%
+ \pgfextract@process\point{%
+ \pgfpointadd{%
+ \pgf@x\halfside%
+ \pgf@x-3.232051\pgf@x% (7/6 + 2*cos(30) + 1/3) * x
+ \pgf@y0pt%
+ }{%
+ \pgfpointpolar{\pgfmathcounter-30}{+\pgf@yc}%
+ }%
+ }%
+ \pgfpathlineto{\point}%
+ \pgfpathmoveto{\point}%
+ }
+ \repeatpgfmathloop%
+ }%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \pgf@xb\pgf@x%
+ \pgf@yb\pgf@y%
+ \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
+ \let\externalangle\pgfmathresult%
+ \dimensions%
+ \pgf@xc\halfside%
+ %
+ \pgf@xc-.166666\pgf@xc%
+ \ifdim\pgf@xa<\pgf@xc%
+ \pgfmathanglebetweenpoints{\centerpoint}%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@xor gate US@north west\endcsname%
+ }%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@xor gate US@north\endcsname%
+ }%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@xor gate US@north west\endcsname%
+ }%
+ \else%
+ \pgfmathsubtract@{360}{\pgfmathresult}%
+ \ifdim\externalangle pt>\pgfmathresult pt\relax%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@xor gate US@south\endcsname%
+ }%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@xor gate US@south west\endcsname%
+ }%
+ \else%
+ \ifdim\pgf@ya>\pgf@yb%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \advance\pgf@yc-\outerxsep%
+ \pgf@process{%
+ \pgfmathpointintersectionoflineandarc{\centerpoint}{\externalpoint}%
+ {%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.166666\pgf@xa%
+ \pgf@xa2.0\pgf@xa%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@x-.166666\pgf@xa%
+ }%
+ {0}{90}{+\pgf@yc}%
+ }%
+ \else%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \advance\pgf@yc-\outerxsep%
+ \pgf@process{%
+ \pgfmathpointintersectionoflineandarc{\centerpoint}{\externalpoint}%
+ {%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.166666\pgf@xa%
+ \pgf@xa2.0\pgf@xa%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@x-.166666\pgf@xa%
+ }%
+ {270}{360}{+\pgf@yc}%
+ }%
+ \fi%
+ \fi%
+ \fi%
+ \else%
+ \ifdim\pgf@y=0pt\relax%
+ \csname pgf@anchor@and gate US@east\endcsname%
+ \else%
+ \pgf@xc\halfwidth%
+ \advance\pgf@xc\halfside%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \pgf@xb\halfside%
+ \pgf@xb-.166666\pgf@xb%
+ \ifdim\pgf@ya<0pt%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@y\halfside%
+ \advance\pgf@x\pgf@xb%
+ }%
+ {270}{330}{+\pgf@yc}%
+ \else%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@y-\halfside%
+ \advance\pgf@x\pgf@xb%
+ }%
+ {30}{90}{+\pgf@xc and +\pgf@yc}%
+ \fi%
+ \fi%
+ \fi%
+ }%
+}
+
+
+
+
+% Shape xnor gate US
+%
+\pgfdeclareshape{xnor gate US}{%
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@xnor gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{2}%
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@xnor gate US@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@xnor gate US@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@XOR@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{An xnor gate must have two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\halflinewidth{%
+ \pgf@x.5\pgflinewidth%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \inheritanchor[from=xor gate US]{mid east}
+ \inheritanchor[from=xor gate US]{mid west}
+ \anchor{base}{\basepoint}%
+ \inheritanchor[from=xor gate US]{base east}
+ \inheritanchor[from=xor gate US]{base west}
+ \inheritanchor[from=xor gate US]{base}
+ \inheritanchor[from=nor gate US]{output}
+ \inheritanchor[from=xor gate US]{east}
+ \inheritanchor[from=xor gate US]{north east}
+ \inheritanchor[from=xor gate US]{south east}
+ \inheritanchor[from=xor gate US]{north}
+ \inheritanchor[from=xor gate US]{south}
+ \inheritanchor[from=xor gate US]{south west}
+ \inheritanchor[from=xor gate US]{north west}
+ \inheritanchor[from=xor gate US]{west}
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ {%
+ \pgf@yc2.66666\pgf@yc%
+ \pgfpatharc{-22}{0}{+1.166666\pgf@yc and +\pgf@yc}%
+ }
+ {%
+ \pgf@yc2.66666\pgf@yc%
+ \pgfpatharc{0}{22}{+1.166666\pgf@yc and +\pgf@yc}%
+ }%
+ \pgfpathclose%
+ %
+ % Draw the output inverter.
+ %
+ {%
+ \pgfpathcircle{%
+ \pgf@x-.166666\pgf@xc%
+ \pgf@yc2.0\pgf@yc%
+ \advance\pgf@x.866025\pgf@yc%
+ \advance\pgf@x\outerinvertedradius%
+ \pgf@y0pt%
+ }{+\invertedradius}%
+ }%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ \pgf@xa\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@x-1.5\pgf@ya%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x\pgfmathresult\pgf@yb%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ %
+ % Now, some fooling around to stop the `tail' being filled.
+ %
+ \pgf@xc\halfside%
+ \pgf@yc\halfside%
+ \pgfpathmoveto{\pgfqpoint{-1.5\pgf@xc}{-\pgf@yc}}%
+ \pgf@yc2.0\pgf@yc%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter<61\relax%
+ {%
+ \pgfextract@process\point{%
+ \pgfpointadd{%
+ \pgf@x\halfside%
+ \pgf@x-3.232051\pgf@x% (7/6 + 2*cos(30) + 1/3) * x
+ \pgf@y0pt%
+ }{%
+ \pgfpointpolar{\pgfmathcounter-30}{+\pgf@yc}%
+ }%
+ }%
+ \pgfpathlineto{\point}%
+ \pgfpathmoveto{\point}%
+ }
+ \repeatpgfmathloop%
+ }%
+ }%
+ \inheritanchorborder[from=xor gate US]
+}
+
+
+
+
+
+
+% Shape not gate US
+%
+\pgfdeclareshape{not gate US}{%
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@not gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1}%
+ \ifnum\pgf@lib@sh@logicgate@numinputs=0\relax%
+ \PackageError{PGF}{A not gate must have one input}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\halflinewidth{%
+ \pgf@x.5\pgflinewidth%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \midpoint%
+ \pgfutil@tempdima\pgf@y%
+ \csname pgf@anchor@not gate US@east\endcsname%
+ \pgf@y\pgfutil@tempdima%
+ }
+ \anchor{mid west}{%
+ \dimensions%
+ \pgf@xc\halfside%
+ \pgf@xc-.833333\pgf@xc%
+ \advance\pgf@xc-\outerxsep%
+ \midpoint%
+ \advance\pgf@x\pgf@xc%
+ }%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \basepoint%
+ \pgfutil@tempdima\pgf@y%
+ \csname pgf@anchor@not gate US@east\endcsname%
+ \pgf@y\pgfutil@tempdima%
+ }
+ \anchor{base west}{%
+ \dimensions%
+ \pgf@xc\halfside%
+ \pgf@xc-.833333\pgf@xc%
+ \advance\pgf@xc-\outerxsep%
+ \basepoint%
+ \advance\pgf@x\pgf@xc%
+ }%
+ \inheritanchor[from=and gate US]{base}
+ \anchor{output}{%
+ \dimensions%
+ \pgf@xc\halfside%
+ \centerpoint%
+ \advance\pgf@x-.166666\pgf@xc%
+ \pgf@xc2.0\pgf@xc%
+ \advance\pgf@x.866025\pgf@xc%
+ \advance\pgf@x\invertedradius%
+ \advance\pgf@x\outerinvertedradius%
+ \advance\pgf@x\outerxsep%
+ }
+ \anchor{east}{%
+ \dimensions%
+ \tipanchor%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ }%
+ \anchor{north}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@not gate US@north west\endcsname%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \pgf@y\pgf@ya%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@y1pt}%
+ {\csname pgf@anchor@not gate US@north west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \fi%
+ }
+ \anchor{south}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@not gate US@south west\endcsname%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \pgf@y\pgf@ya%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@y-1pt}%
+ {\csname pgf@anchor@not gate US@south west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \fi%
+ }
+ \anchor{south east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@not gate US@south west\endcsname%
+ \pgf@ya\pgf@y%
+ \pgf@process{%
+ \dimensions%
+ \tipanchor%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ }%
+ \pgf@y\pgf@ya%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@x1pt\advance\pgf@y-1pt}%
+ {\csname pgf@anchor@not gate US@south west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \fi%
+ }
+ \anchor{north east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@not gate US@north west\endcsname%
+ \pgf@ya\pgf@y%
+ \pgf@process{%
+ \dimensions%
+ \tipanchor%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ }%
+ \pgf@y\pgf@ya%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@x1pt\advance\pgf@y1pt}%
+ {\csname pgf@anchor@not gate US@north west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \fi%
+ }
+ \anchor{south west}{%
+ \dimensions%
+ \pgf@xa\halfside%
+ \centerpoint%
+ \advance\pgf@x-.833333\pgf@xa
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@y-1.166666\pgf@xa%
+ \pgf@ya\outerysep%
+ \advance\pgf@y-1.565\pgf@ya% Selected by trial and error.
+ }%
+ \anchor{north west}{%
+ \dimensions%
+ \pgf@xa\halfside%
+ \centerpoint%
+ \advance\pgf@x-.833333\pgf@xa
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@y1.166666\pgf@xa%
+ \pgf@ya\outerysep%
+ \advance\pgf@y1.565\pgf@ya% Selected by trial and error.
+ }%
+ \anchor{input}{%
+ \dimensions%
+ \pgf@lib@sh@logicgate@AND@inputanchor{1}%
+ \pgf@xc\halfside%
+ \advance\pgf@x.333333\pgf@xc%
+ }%
+ \anchor{west}{%
+ \dimensions%
+ \pgf@xc\halfside%
+ \pgf@xc-.833333\pgf@xc%
+ \advance\pgf@xc-\outerxsep%
+ \centerpoint%
+ \advance\pgf@x\pgf@xc%
+ }
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\tipanchor}%
+ \pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{1.166666\pgf@yc}}%
+ \pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{-1.166666\pgf@yc}}%
+ \pgfpathlineto{\tipanchor}%
+ %
+ % Draw the output inverter.
+ %
+ {%
+ \pgfpathcircle{%
+ \pgf@x-.166666\pgf@xc%
+ \pgf@yc2.0\pgf@yc%
+ \advance\pgf@x.866025\pgf@yc%
+ \advance\pgf@x\outerinvertedradius%
+ \pgf@y0pt%
+ }{+\invertedradius}%
+ }%
+ %
+ % Draw the input.
+ %
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-1\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@xa\halfside%
+ \pgf@x-.833333\pgf@xa%
+ \advance\pgf@x-.5\pgflinewidth%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y0pt%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ }%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}%
+ \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
+ \let\externalangle\pgfmathresult%
+ \dimensions%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@not gate US@north west\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt%
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\csname pgf@anchor@not gate US@north west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@not gate US@south west\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {\csname pgf@anchor@not gate US@north west\endcsname}%
+ {\csname pgf@anchor@not gate US@south west\endcsname}%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\csname pgf@anchor@not gate US@south west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \fi%
+ \fi%
+ }%
+}
+
+
+
+
+
+% Shape buffer gate US.
+%
+\pgfdeclareshape{buffer gate US}{%
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@buffer gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1}%
+ \ifnum\pgf@lib@sh@logicgate@numinputs=0\relax%
+ \PackageError{PGF}{A buffer gate must have one input}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\halflinewidth{%
+ \pgf@x.5\pgflinewidth%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \midpoint%
+ \pgfutil@tempdima\pgf@y%
+ \csname pgf@anchor@buffer gate US@east\endcsname%
+ \pgf@y\pgfutil@tempdima%
+ }
+ \anchor{mid west}{%
+ \dimensions%
+ \pgf@xc\halfside%
+ \pgf@xc-.833333\pgf@xc%
+ \advance\pgf@xc-\outerxsep%
+ \midpoint%
+ \advance\pgf@x\pgf@xc%
+ }%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \basepoint%
+ \pgfutil@tempdima\pgf@y%
+ \csname pgf@anchor@buffer gate US@east\endcsname%
+ \pgf@y\pgfutil@tempdima%
+ }
+ \inheritanchor[from=not gate US]{base west}
+ \inheritanchor[from=and gate US]{base}
+ \anchor{output}{\csname pgf@anchor@buffer gate US@east\endcsname}
+ \anchor{east}{%
+ \dimensions%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \anchor{north}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@not gate US@north west\endcsname%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \pgf@y\pgf@ya%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@y1pt}%
+ {\csname pgf@anchor@buffer gate US@north west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \fi%
+ }
+ \anchor{south}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@not gate US@south west\endcsname%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \pgf@y\pgf@ya%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@y-1pt}%
+ {\csname pgf@anchor@not gate US@south west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \fi%
+ }
+ \anchor{south east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@not gate US@south west\endcsname%
+ \pgfutil@tempdima\pgf@y%
+ \csname pgf@anchor@buffer gate US@east\endcsname%
+ \pgf@y\pgfutil@tempdima%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@x1pt\advance\pgf@y-1pt}%
+ {\csname pgf@anchor@buffer gate US@south west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xc\outerxsep%
+ \advance\pgf@x2.350943\pgf@xc%
+ }%
+ }%
+ \fi%
+ }
+ \anchor{north east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@not gate US@north west\endcsname%
+ \pgfutil@tempdima\pgf@y%
+ \csname pgf@anchor@buffer gate US@east\endcsname%
+ \pgf@y\pgfutil@tempdima%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@x1pt\advance\pgf@y1pt}%
+ {\csname pgf@anchor@buffer gate US@north west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \fi%
+ }
+ \inheritanchor[from=not gate US]{south west}
+ \inheritanchor[from=not gate US]{north west}
+ \inheritanchor[from=not gate US]{input}
+ \inheritanchor[from=not gate US]{west}
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\tipanchor}%
+ \pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{1.166666\pgf@yc}}%
+ \pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{-1.166666\pgf@yc}}%
+ \pgfpathclose%
+ %
+ % Draw the input.
+ %
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-1\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@xa\halfside%
+ \pgf@x-.833333\pgf@xa%
+ \advance\pgf@x-.5\pgflinewidth%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y0pt%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ }%
+ }%
+ \inheritanchorborder[from=not gate US]
+}
+
+
+
+
+
+\pgfdeclareshape{and gate CDH}{%
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@and gate CDH\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@and gate CDH@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@and gate CDH@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@AND@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{An and gate must have at least two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \csname pgf@anchor@and gate CDH@east\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}
+ \anchor{mid west}{%
+ \csname pgf@anchor@and gate CDH@west\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \csname pgf@anchor@and gate CDH@east\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}
+ \anchor{base west}{%
+ \csname pgf@anchor@and gate CDH@west\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}
+ \anchor{east}{%
+ \dimensions%
+ \pgfpointadd{\centerpoint}{\tipanchor}%
+ }
+ \anchor{output}{\csname pgf@anchor@and gate CDH@east\endcsname}
+ \anchor{north east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \tipanchor%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\halfheight%
+ \else%
+ \centerpoint%
+ \pgf@xa\halfwidth%
+ \pgf@ya\halfheight%
+ \pgf@xb\halfside%
+ \advance\pgf@x-.166666\pgf@xb%
+ \advance\pgf@xa\pgf@xb%
+ \advance\pgf@x.5\pgf@xa%
+ \advance\pgf@y-\pgf@xb%
+ \advance\pgf@ya\pgf@xb%
+ \advance\pgf@y.866025\pgf@ya%
+ \fi%
+ }
+ \anchor{south east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \tipanchor%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y-\halfheight%
+ \else
+ \centerpoint%
+ \pgf@xa\halfwidth%
+ \pgf@ya\halfheight%
+ \pgf@xb\halfside%
+ \advance\pgf@x-.166666\pgf@xb%
+ \advance\pgf@xa\pgf@xb%
+ \advance\pgf@x.5\pgf@xa%
+ \advance\pgf@y\pgf@xb%
+ \advance\pgf@ya\pgf@xb%
+ \advance\pgf@y-.866025\pgf@ya%
+ \fi%
+ }
+ \anchor{north}{%
+ \dimensions%
+ \centerpoint%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@y\halfheight%
+ \else%
+ \pgf@ya\halfheight%
+ \advance\pgf@y.993043\pgf@ya%
+ \fi%
+ }
+ \anchor{south}{%
+ \dimensions%
+ \centerpoint%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@y-\halfheight%
+ \else%
+ \pgf@ya\halfheight%
+ \advance\pgf@y-.993043\pgf@ya%
+ \fi%
+ }
+ \anchor{south west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@y-\halfheight%
+ }
+ \anchor{north west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@y\halfheight%
+ }
+ \anchor{west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ }
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{\pgf@yc}}%
+ \pgfpathclose%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@xa\halfside%
+ \pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-.5\pgflinewidth%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ }%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \dimensions%
+ \pgf@xb\halfside%
+ %
+ \pgf@xb-.166666\pgf@xb%
+ \ifdim\pgf@xa<\pgf@xb%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointborderrectangle{\externalpoint}{%
+ \pgf@xc\halfside%
+ \pgf@xc.166666\pgf@xc%
+ \advance\pgf@xc\halfwidth%
+ \pgfqpoint{\pgf@xc}{\halfheight}%
+ }%
+ }%
+ \else%
+ \ifdim\pgf@y=0pt\relax%
+ \csname pgf@anchor@and gate CDH@east\endcsname%
+ \else%
+ \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}%
+ \pgf@xc\halfwidth%
+ \advance\pgf@xc\halfside%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \ifdim\pgf@ya<0pt%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@y\halfside%
+ \advance\pgf@x\pgf@xb%
+ }%
+ {270}{330}{+\pgf@yc}%
+ \else%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@y-\halfside%
+ \advance\pgf@x\pgf@xb%
+ }%
+ {30}{90}{+\pgf@xc and +\pgf@yc}%
+ \fi%
+ \fi%
+ \fi%
+ }
+}
+
+
+\pgfdeclareshape{nand gate CDH}{%
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@nand gate CDH\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@nand gate CDH@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@nand gate CDH@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@AND@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \PackageError{PGF}{A nand gate must have at least two inputs}{}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \inheritanchor[from=and gate CDH]{mid east}
+ \inheritanchor[from=and gate CDH]{mid west}
+ \anchor{base}{\basepoint}%
+ \inheritanchor[from=and gate CDH]{base east}
+ \inheritanchor[from=and gate CDH]{base west}
+ \anchor{output}{%
+ \dimensions
+ \pgfpointadd{\centerpoint}{%
+ \pgf@xa\halfside%
+ \pgf@x-.166666\pgf@xa%
+ \pgf@xb2.0\pgf@xa%
+ \advance\pgf@x.866025\pgf@xb%
+ \advance\pgf@x\invertedradius%
+ \advance\pgf@x\outerinvertedradius%
+ \advance\pgf@x\outerxsep%
+ \pgf@y0pt%
+ }%
+ }
+ \inheritanchor[from=and gate CDH]{east}
+ \inheritanchor[from=and gate CDH]{north east}
+ \inheritanchor[from=and gate CDH]{south east}
+ \inheritanchor[from=and gate CDH]{north}
+ \inheritanchor[from=and gate CDH]{south}
+ \inheritanchor[from=and gate CDH]{south west}
+ \inheritanchor[from=and gate CDH]{north west}
+ \inheritanchor[from=and gate CDH]{west}
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{\pgf@yc}}%
+ \pgfpathclose%
+ %
+ % Draw the output inverter.
+ %
+ {%
+ \pgfpathcircle{%
+ \pgf@x-.166666\pgf@xc%
+ \pgf@yc2.0\pgf@yc%
+ \advance\pgf@x.866025\pgf@yc%
+ \advance\pgf@x\outerinvertedradius%
+ \pgf@y0pt%
+ }{+\invertedradius}%
+ }%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@xa\halfside%
+ \pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-.5\pgflinewidth%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ }%
+ }%
+ \inheritanchorborder[from=and gate CDH]
+} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.geometric.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.geometric.code.tex
deleted file mode 100644
index 802c85a41b9..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.geometric.code.tex
+++ /dev/null
@@ -1,1229 +0,0 @@
-% Copyright 2006 by Till Tantau and Mark Wibrow
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryshapes.geometric.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $
-
-\pgfdeclareshape{ellipse}
-%
-% Draws a circle around the text
-%
-{
- \savedanchor\centerpoint{%
- \pgf@x=.5\wd\pgfnodeparttextbox%
- \pgf@y=.5\ht\pgfnodeparttextbox%
- \advance\pgf@y by-.5\dp\pgfnodeparttextbox%
- }
- \savedanchor\radius{%
- %
- % Caculate ``height radius''
- %
- \pgf@y=.5\ht\pgfnodeparttextbox%
- \advance\pgf@y by.5\dp\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@yb{\pgfshapeinnerysep}%
- \advance\pgf@y by\pgf@yb%
- %
- % Caculate ``width radius''
- %
- \pgf@x=.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@xb{\pgfshapeinnerxsep}%
- \advance\pgf@x by\pgf@xb%
- %
- % Adjust
- %
- \pgf@x=1.4142136\pgf@x%
- \pgf@y=1.4142136\pgf@y%
- %
- % Adjust hieght, if necessary
- %
- \pgfmathsetlength\pgf@yc{\pgfshapeminheight}%
- \ifdim\pgf@y<.5\pgf@yc%
- \pgf@y=.5\pgf@yc%
- \fi%
- %
- % Adjust width, if necessary
- %
- \pgfmathsetlength\pgf@xc{\pgfshapeminwidth}%
- \ifdim\pgf@x<.5\pgf@xc%
- \pgf@x=.5\pgf@xc%
- \fi%
- %
- % Add outer sep
- %
- \pgfmathsetlength{\pgf@xb}{\pgfshapeouterxsep}%
- \pgfmathsetlength{\pgf@yb}{\pgfshapeouterysep}%
- \advance\pgf@x by\pgf@xb%
- \advance\pgf@y by\pgf@yb%
- }
-
- %
- % Anchors
- %
- \anchor{center}{\centerpoint}
- \anchor{mid}{\centerpoint\pgfmathsetlength\pgf@y{.5ex}}
- \anchor{base}{\centerpoint\pgf@y=0pt}
- \anchor{north}
- {
- \pgf@process{\radius}
- \pgf@ya=\pgf@y%
- \pgf@process{\centerpoint}
- \advance\pgf@y by\pgf@ya
- }
- \anchor{south}
- {
- \pgf@process{\radius}
- \pgf@ya=\pgf@y%
- \pgf@process{\centerpoint}
- \advance\pgf@y by-\pgf@ya
- }
- \anchor{west}
- {
- \pgf@process{\radius}
- \pgf@xa=\pgf@x%
- \pgf@process{\centerpoint}
- \advance\pgf@x by-\pgf@xa
- }
- \anchor{mid west}
- {%
- \pgf@process{\radius}
- \pgf@xa=\pgf@x%
- \pgf@process{\centerpoint}
- \advance\pgf@x by-\pgf@xa%
- \pgfmathsetlength\pgf@y{.5ex}
- }
- \anchor{base west}
- {%
- \pgf@process{\radius}
- \pgf@xa=\pgf@x%
- \pgf@process{\centerpoint}
- \advance\pgf@x by-\pgf@xa%
- \pgf@y=0pt
- }
- \anchor{north west}
- {
- \pgf@process{\radius}
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{\centerpoint}
- \advance\pgf@x by-0.707107\pgf@xa
- \advance\pgf@y by0.707107\pgf@ya
- }
- \anchor{south west}
- {
- \pgf@process{\radius}
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{\centerpoint}
- \advance\pgf@x by-0.707107\pgf@xa
- \advance\pgf@y by-0.707107\pgf@ya
- }
- \anchor{east}
- {%
- \pgf@process{\radius}
- \pgf@xa=\pgf@x%
- \pgf@process{\centerpoint}
- \advance\pgf@x by\pgf@xa
- }
- \anchor{mid east}
- {%
- \pgf@process{\radius}
- \pgf@xa=\pgf@x%
- \pgf@process{\centerpoint}
- \advance\pgf@x by\pgf@xa%
- \pgfmathsetlength\pgf@y{.5ex}
- }
- \anchor{base east}
- {%
- \pgf@process{\radius}
- \pgf@xa=\pgf@x%
- \pgf@process{\centerpoint}
- \advance\pgf@x by\pgf@xa%
- \pgf@y=0pt
- }
- \anchor{north east}
- {
- \pgf@process{\radius}
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{\centerpoint}
- \advance\pgf@x by0.707107\pgf@xa
- \advance\pgf@y by0.707107\pgf@ya
- }
- \anchor{south east}
- {
- \pgf@process{\radius}
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{\centerpoint}
- \advance\pgf@x by0.707107\pgf@xa
- \advance\pgf@y by-0.707107\pgf@ya
- }
- \anchorborder{
- \edef\pgf@marshal{%
- \noexpand\pgfpointborderellipse
- {\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}
- {\noexpand\radius}%
- }%
- \pgf@marshal%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \centerpoint%
- \advance\pgf@x by\pgf@xa%
- \advance\pgf@y by\pgf@ya%
- }
-
- %
- % Background path
- %
- \backgroundpath
- {
- \pgf@process{\radius}%
- \pgfutil@tempdima=\pgf@x%
- \pgfutil@tempdimb=\pgf@y%
- \pgfmathsetlength{\pgf@xb}{\pgfshapeouterxsep}%
- \pgfmathsetlength{\pgf@yb}{\pgfshapeouterysep}%
- \advance\pgfutil@tempdima by-\pgf@xb%
- \advance\pgfutil@tempdimb by-\pgf@yb%
- \pgfpathellipse{\centerpoint}{\pgfqpoint{\pgfutil@tempdima}{0pt}}{\pgfqpoint{0pt}{\pgfutil@tempdimb}}%
- }
-}
-
-
-
-
-% Set the recommended shape aspect ratio
-%
-% #1 = aspect ratio
-%
-% Example:
-%
-% \pgfsetshapeminwidth{1.5}
-
-\def\pgfsetshapeaspect#1{%
- \def\pgfshapeaspect{#1}%
- % Invert
- \pgfutil@tempdima=#1pt%
- \pgfutil@tempdima=.125\pgfutil@tempdima%
- \c@pgf@counta=\pgfutil@tempdima\relax% 8192*determinant
- \pgfutil@tempdima=8192pt%
- \divide\pgfutil@tempdima by\c@pgf@counta%
- \edef\pgfshapeaspectinverse{\pgf@sys@tonumber{\pgfutil@tempdima}}
-}
-\pgfsetshapeaspect{1}
-
-
-
-\pgfdeclareshape{diamond}
-{
- \savedanchor\outernortheast{%
- %
- % Calculate width and height of the inner rectangle
- %
- \pgf@xa=.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@xc{\pgfshapeinnerxsep}%
- \advance\pgf@xa by\pgf@xc%
- \pgf@ya=.5\ht\pgfnodeparttextbox%
- \advance\pgf@ya by.5\dp\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@yc{\pgfshapeinnerysep}%
- \advance\pgf@ya by\pgf@yc%
- %
- % Calculate width and height of diamond
- %
- \pgf@x=\pgf@xa%
- \advance\pgf@x by\pgfshapeaspect\pgf@ya%
- \pgf@y=\pgfshapeaspectinverse\pgf@xa%
- \advance\pgf@y by\pgf@ya%
- %
- % Check against minimum height/width
- %
- \pgfmathsetlength\pgf@xb{\pgfshapeminwidth}%
- \ifdim\pgf@x<\pgf@xb%
- % yes, too small. Enlarge...
- \pgf@x=\pgf@xb%
- \fi%
- \pgfmathsetlength\pgf@yb{\pgfshapeminheight}%
- \ifdim\pgf@y<\pgf@yb%
- % yes, too small. Enlarge...
- \pgf@y=\pgf@yb%
- \fi%
- %
- % Add outer border
- %
- \pgfmathsetlength\pgf@xa{\pgfshapeouterxsep}%
- \advance\pgf@x by\pgf@xa%
- \pgfmathsetlength\pgf@ya{\pgfshapeouterysep}%
- \advance\pgf@y by\pgf@ya%
- }
- \savedanchor\text{%
- \pgf@x=-.5\wd\pgfnodeparttextbox%
- \pgf@y=-.5\ht\pgfnodeparttextbox%
- \advance\pgf@y by.5\dp\pgfnodeparttextbox%
- }
-
- %
- % Anchors
- %
- \anchor{text}{\text}%
- \anchor{center}{\pgfpointorigin}%
- \anchor{mid}{%
- \pgf@process{\text}%
- \pgf@x=0pt%
- \pgfmathsetlength\pgf@ya{.5ex}
- \advance\pgf@y by\pgf@ya%
- }
- \anchor{base}{\pgf@process{\text}\pgf@x=0pt }
- \anchor{north}{\pgf@process{\outernortheast}\pgf@x=0pt}
- \anchor{south}{\pgf@process{\outernortheast}\pgf@x=0pt\pgf@y=-\pgf@y}
- \anchor{west}{\pgf@process{\outernortheast}\pgf@x=-\pgf@x\pgf@y=0pt}
- \anchor{north west}{\pgf@process{\outernortheast}\pgf@x=-.5\pgf@x\pgf@y=.5\pgf@y}
- \anchor{south west}{\pgf@process{\outernortheast}\pgf@x=-.5\pgf@x\pgf@y=-.5\pgf@y}
- \anchor{east}{\pgf@process{\outernortheast}\pgf@y=0pt}
- \anchor{north east}{\pgf@process{\outernortheast}\pgf@x=.5\pgf@x\pgf@y=.5\pgf@y}
- \anchor{south east}{\pgf@process{\outernortheast}\pgf@x=.5\pgf@x\pgf@y=-.5\pgf@y}
- \anchorborder{%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \pgf@process{\outernortheast}%
- \ifdim\pgf@xa>0pt%
- \else%
- \pgf@x=-\pgf@x%
- \fi%
- \ifdim\pgf@ya>0pt%
- \else%
- \pgf@y=-\pgf@y%
- \fi%
- \edef\pgf@marshal{%
- \noexpand\pgfpointintersectionoflines
- {\noexpand\pgfpointorigin}
- {\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}
- {\noexpand\pgfqpoint{\the\pgf@x}{0pt}}
- {\noexpand\pgfqpoint{0pt}{\the\pgf@y}}%
- }%
- \pgf@process{\pgf@marshal}%
- }
-
- %
- % Background path
- %
- \backgroundpath{
- \pgf@process{\outernortheast}%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \pgfmathsetlength{\pgf@xa}{\pgfshapeouterxsep}%
- \pgfmathsetlength{\pgf@ya}{\pgfshapeouterysep}%
- \advance\pgf@xc by-1.414213\pgf@xa%
- \advance\pgf@yc by-1.414213\pgf@ya%
- \pgfpathmoveto{\pgfqpoint{\pgf@xc}{0pt}}%
- \pgfpathlineto{\pgfqpoint{0pt}{\pgf@yc}}%
- \pgfpathlineto{\pgfqpoint{-\pgf@xc}{0pt}}%
- \pgfpathlineto{\pgfqpoint{0pt}{-\pgf@yc}}%
- \pgfpathclose%
- }
-}
-
-
-
-
-% \pgfsetstarpoints
-%
-% Set the number of points on a star.
-%
-\def\pgfsetstarpoints#1{%
- \pgfmathsetcounter{pgf@counta}{#1}%
- \edef\pgfstarpoints{\the\c@pgfmath@counta}}
-\pgfsetstarpoints{5}
-
-% \pgfsetstarpointheight
-%
-% Set the height of the points (this is the
-% distance between the outer and inner point
-% radii).
-%
-\def\pgfsetstarpointheight#1{%
- \pgfmathparse{#1}%
- \edef\pgfstarpointheight{\pgfmathresult pt}}
-\pgfsetstarpointheight{12pt}
-
-% \pgfsetstarpointratio
-%
-% Set the ratio between the outer and
-% inner point radii.
-%
-\def\pgfsetstarpointratio#1{%
- \pgfmathparse{#1}%
- \edef\pgfstarpointratio{\pgfmathresult}%
- \def\pgfstarpointheight{-16383pt}% If negative, the ratio is used.
-}
-\pgfsetstarpointratio{1.75}
-
-% \pgfsetstarrrotate
-%
-% Set the angle of rotation of the star
-% border. This can be decimal.
-%
-\def\pgfsetstarrotate#1{%
- \pgfmathparse{#1}%
- \edef\pgfstarrotate{\pgfmathresult}}%
-\pgfsetstarrotate{0}
-
-% Shape star.
-%
-\pgfdeclareshape{star}{%
- \saveddimen{\points}{\pgf@x\pgfstarpoints pt}%
- \saveddimen{\pointratio}{\pgf@x\pgfstarpointratio pt}%
- \saveddimen{\rotate}{\pgf@x\pgfstarrotate pt}%
- \saveddimen{\pointheight}{\pgf@x\pgfstarpointheight}%
- \saveddimen{\minimumsize}{%
- \pgfmathsetlength\pgf@x{\pgfshapeminwidth}%
- \pgfmathsetlength\pgf@y{\pgfshapeminheight}%
- \ifdim\pgf@y>\pgf@x%
- \pgf@x\pgf@y%
- \fi}%
- \saveddimen{\outersep}{%
- \pgfmathsetlength\pgf@x{\pgfshapeouterxsep}%
- \pgfmathsetlength\pgf@y{\pgfshapeouterysep}%
- \ifdim\pgf@y>\pgf@x%
- \pgf@x\pgf@y%
- \fi}%
- \savedanchor{\centerpoint}{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \saveddimen{\innerpointradius}{%
- %
- % The innerpoint radius is the radius of the circle which
- % can safely encompass the node textbox.
- %
- \pgfmathsetlength\pgf@x{\pgfshapeinnerxsep}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{\pgfshapeinnerysep}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \ifdim\pgf@y>\pgf@x%
- \pgf@x\pgf@y%
- \fi%
- \pgfmathveclen@{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@x}}%
- \pgf@x\pgfmathresult pt\relax%
- }%
- %
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\centerpoint\pgfmathsetlength\pgf@y{.5ex}}%
- \anchor{base}{\centerpoint\pgf@y=0pt}%
- \anchor{north}{\pgf@anchor@star@border{\pgfpoint{+0pt}{+\outerpointradius}}}%
- \anchor{south}{\pgf@anchor@star@border{\pgfpoint{+0pt}{+-\outerpointradius}}}%
- \anchor{east}{\pgf@anchor@star@border{\pgfpoint{+\outerpointradius}{+0pt}}}%
- \anchor{west}{\pgf@anchor@star@border{\pgfpoint{+-\outerpointradius}{+0pt}}}%
- \anchor{north east}{\pgf@anchor@star@border{\pgfpoint{+\outerpointradius}{+\outerpointradius}}}%
- \anchor{north west}{\pgf@anchor@star@border{\pgfpoint{+-\outerpointradius}{+\outerpointradius}}}%
- \anchor{south east}{\pgf@anchor@star@border{\pgfpoint{+\outerpointradius}{+-\outerpointradius}}}%
- \anchor{south west}{\pgf@anchor@star@border{\pgfpoint{+-\outerpointradius}{+-\outerpointradius}}}%
- %
- \backgroundpath{%
- %
- % Redefine stuff for ease of use.
- %
- \pgf@x\points%
- \c@pgf@counta\pgf@x%
- \divide\c@pgf@counta65536\relax%
- \edef\points{\the\c@pgf@counta}%
- \pgf@x\rotate%
- \edef\rotate{\pgf@sys@tonumber{\pgf@x}}%
- \pgf@x\pointratio%
- \edef\pointratio{\pgf@sys@tonumber{\pgf@x}}%
- %
- % Calculate radii.
- %
- \pgf@x\innerpointradius\relax%
- \edef\innerradius{\the\pgf@x}%
- \pgf@xa\pointheight\relax%
- \ifdim\pgf@xa<0pt\relax%
- \pgf@x\pointratio\pgf@x%
- \else%
- \advance\pgf@x\pgf@xa%
- \fi%
- \pgf@xb\pgf@x%
- \pgf@xc\minimumsize\relax%
- \ifdim\pgf@x<.5\pgf@xc%
- \pgf@x.5\pgf@xc%
- \fi%
- \edef\outerradius{\the\pgf@x}%
- \ifdim\pgf@x>\pgf@xb%
- \ifdim\pgf@xa<0pt\relax%
- \pgfmathreciprocal{\pointratio}%
- \pgf@xc\pgfmathresult\pgf@x\relax%
- \edef\innerradius{\the\pgf@xc}%
- \else%
- \pgf@xc\pgf@x\relax%
- \advance\pgf@xc-\pointheight%
- \edef\innerradius{\the\pgf@xc}%
- \fi%
- \fi%
- %
- % Get the total number of points (inner + outer)...
- %
- \c@pgf@counta\points%
- \advance\c@pgf@counta\c@pgf@counta%
- \edef\numpoints{\the\c@pgf@counta}%
- %
- % ...and hence the angle between points.
- %
- \pgf@x360pt\relax%
- \divide\pgf@x\c@pgf@counta%
- \edef\staranglestep{\the\pgf@x}%
- %
- % Start at 90 degrees (star always points up)...
- %
- \pgf@x90pt\relax%
- %
- % ...unless rotation is applied.
- %
- \pgf@xa\rotate pt\relax%
- \advance\pgf@x\pgf@xa%
- \edef\starangle{\the\pgf@x}%
- \let\starradius=\outerradius%
- %
- % Move to first point.
- %
- \pgfpathmoveto{%
- \pgfpointadd{\centerpoint}%
- {\pgfpointpolar{+\starangle}{+\starradius}}%
- }%
- \def\staranchorname{pgf@anchor@star@outer point}%
- \pgfmathloop%
- %
- % Create anchors. Manually \xdef as \gdef is normally used by \anchor.
- %
- \c@pgf@counta\pgfmathcounter\relax%
- \advance\c@pgf@counta1\relax%
- \divide\c@pgf@counta2\relax%
- \expandafter\xdef\csname\staranchorname\space\the\c@pgf@counta\endcsname{%
- \noexpand\pgf@lib@shapesstaranchor{\pgfmathcounter}%
- }%
- \ifnum\pgfmathcounter=\numpoints\relax% Stop.
- \else%
- \ifodd\pgfmathcounter%
- \let\starradius\innerradius%
- \def\staranchorname{pgf@anchor@star@inner point}%
- \else%
- \let\starradius\outerradius%
- \def\staranchorname{pgf@anchor@star@outer point}%
- \fi%
- \pgf@x\starangle\relax%
- \advance\pgf@x\staranglestep\relax%
- \edef\starangle{\the\pgf@x}%
- \pgfpathlineto{%
- \pgfpointadd{\centerpoint}%
- {\pgfpointpolar{+\starangle}{+\starradius}}%
- }%
- \repeatpgfmathloop%
- \pgfpathclose%
- }%
- %
- \anchorborder{%
- %
- % Save x and y.
- %
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- %
- % Redefine stuff for ease of use.
- %
- \pgf@x\points%
- \c@pgf@counta\pgf@x%
- \divide\c@pgf@counta65536\relax%
- \edef\points{\the\c@pgf@counta}%
- \pgf@x\rotate%
- \edef\rotate{\pgf@sys@tonumber{\pgf@x}}%
- \pgf@x\pointratio%
- \edef\pointratio{\pgf@sys@tonumber{\pgf@x}}%
- %
- % Calculate the location of the external
- % point relative to the node center.
- %
- \centerpoint%
- \advance\pgf@xa\pgf@x%
- \advance\pgf@ya\pgf@y%
- \edef\externalx{\the\pgf@xa}%
- \edef\externaly{\the\pgf@ya}%
- \pgf@process{\pgfpointdiff{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}}%
- %
- % First approximate the angle of the external point...
- %
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \pgf@xb\pgf@x%
- \pgf@yb\pgf@y%
- \ifdim\pgf@xa<0pt\relax%
- \pgf@xa-\pgf@xa%
- \fi%
- \ifdim\pgf@ya<0pt\relax%
- \pgf@ya-\pgf@ya%
- \fi%
- \ifdim\pgf@ya>\pgf@xa%
- \pgf@x\pgf@xa%
- \pgf@y\pgf@ya%
- \else%
- \pgf@x\pgf@ya%
- \pgf@y\pgf@xa%
- \fi%
- \ifdim\pgf@y=0pt\relax%
- \pgf@x0pt%
- \else%
- \pgfmathreciprocal@{\pgf@sys@tonumber{\pgf@y}}%
- \pgf@x\pgfmathresult\pgf@x%
- \fi%
- \multiply\pgf@x1000\relax%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgf@counta\the\pgf@x\relax\pgfmath@%
- \expandafter\pgf@x\csname pgfmath@atan@\the\c@pgf@counta\endcsname pt\relax%
- \ifdim\pgfmath@ya>\pgfmath@xa\relax%
- \pgf@x-\pgf@x%
- \advance\pgf@x90pt%
- \fi%
- \ifdim\pgf@xb<0pt%
- \ifdim\pgf@yb>0pt%
- \pgf@x-\pgf@x%
- \fi%
- \advance\pgf@x180pt\relax%
- \else%
- \ifdim\pgf@yb<0pt%
- \pgf@x-\pgf@x%
- \advance\pgf@x360pt\relax%
- \fi\fi%
- %
- % ...then adjust, as star points start at 90 degrees...
- %
- \advance\pgf@x-90pt\relax%
- \ifdim\pgf@x<0pt\relax%
- \advance\pgf@x360pt\relax%
- \fi%
- %
- % ...and also for rotation.
- %
- \advance\pgf@x-\rotate pt\relax%
- \ifdim\pgf@x<0pt\relax%
- \advance\pgf@x360pt\relax%
- \fi%
- %
- % Now, locate the start and end points on the star border segment...
- %
- \c@pgf@counta\points\relax%
- \pgf@y180pt\relax%
- \divide\pgf@y\c@pgf@counta\relax%
- \pgfmathreciprocal@{\pgf@sys@tonumber{\pgf@y}}%
- \pgf@x\pgfmathresult\pgf@x%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgf@counta\the\pgf@x\relax\pgfmath@%
- %
- % ...and hence, the start and end angles of the star border segment.
- %
- \pgf@x\pgf@y%
- \multiply\pgf@x\c@pgf@counta%
- \advance\pgf@x90pt%
- \advance\pgf@x\rotate pt\relax%
- \edef\firstangle{\the\pgf@x}%
- \advance\c@pgf@counta1\relax%
- \pgf@x\pgf@y%
- \multiply\pgf@x\c@pgf@counta%
- \advance\pgf@x\rotate pt\relax%
- \advance\pgf@x90pt%
- \edef\secondangle{\the\pgf@x}%
- %
- % Get the radii and add the outer sep...
- %
- \pgf@x\innerpointradius\relax%
- \edef\innerradius{\the\pgf@x}%
- \pgf@xa\pointheight\relax%
- \ifdim\pgf@xa<0pt\relax%
- \pgf@x\pointratio\pgf@x%
- \else%
- \advance\pgf@x\pgf@xa%
- \fi%
- \pgf@xb\pgf@x%
- \pgf@xc\minimumsize\relax%
- \ifdim\pgf@x<.5\pgf@xc%
- \pgf@x.5\pgf@xc%
- \fi%
- \edef\outerradius{\the\pgf@x}%
- \ifdim\pgf@x>\pgf@xb%
- \ifdim\pgf@xa<0pt\relax%
- \pgfmathreciprocal{\pointratio}%
- \pgf@xc\pgfmathresult\pgf@x\relax%
- \edef\innerradius{\the\pgf@xc}%
- \else%
- \pgf@xc\pgf@x\relax%
- \advance\pgf@xc-\pgf@xb%
- \edef\innerradius{\the\pgf@xc}%
- \fi%
- \fi%
- \pgf@xa\outersep\relax%
- \pgf@x\outerradius\relax%
- \advance\pgf@x\pgf@xa%
- \edef\outerradius{\the\pgf@x}%
- \pgf@x\innerradius\relax%
- \advance\pgf@x\pgf@xa%
- \edef\innerradius{\the\pgf@x}%
- \ifodd\c@pgf@counta%
- \let\firstradii\outerradius%
- \let\secondradii\innerradius%
- \else%
- \let\firstradii\innerradius%
- \let\secondradii\outerradius%
- \fi%
- %
- % ...and calculate the point on the intersection of
- % the line from the external point to \centerpoint and
- % the relevant segment of the star border.
- %
- \pgfpointintersectionoflines{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}%
- {%
- \pgfpointadd{\centerpoint}%
- {\pgfpointpolar{+\firstangle}{+\firstradii}}%
- }%
- {%
- \pgfpointadd{\centerpoint}%
- {\pgfpointpolar{+\secondangle}{+\secondradii}}%
- }%
- }%
-}%
-
-
-% \pgf@lib@shapesstaranchor
-%
-% Used internally to calculate inner point and
-% outer point anchor positions 'on line'.
-%
-\def\pgf@lib@shapesstaranchor#1{%
- %
- % Redefine stuff for ease of use.
- %
- \pgf@x\points%
- \c@pgf@counta\pgf@x%
- \divide\c@pgf@counta65536\relax%
- \edef\points{\the\c@pgf@counta}%
- \pgf@x\rotate%
- \edef\rotate{\pgf@sys@tonumber{\pgf@x}}%
- \pgf@x\pointratio%
- \edef\pointratio{\pgf@sys@tonumber{\pgf@x}}%
- %
- % Caculate radii.
- %
- \pgf@x\innerpointradius%
- \edef\innerradius{\the\pgf@x}%
- \pgf@xa\pointheight\relax%
- \ifdim\pgf@xa<0pt\relax%
- \pgf@x\pointratio\pgf@x%
- \else%
- \advance\pgf@x\pgf@xa%
- \fi%
- \pgf@xb\pgf@x%
- \pgf@xc\minimumsize\relax%
- \ifdim\pgf@x<.5\pgf@xc%
- \pgf@x.5\pgf@xc%
- \fi%
- \edef\outerradius{\the\pgf@x}%
- \ifdim\pgf@x>\pgf@xb%
- \ifdim\pgf@xa<0pt\relax%
- \pgfmathreciprocal{\pointratio}%
- \pgf@xc\pgfmathresult\pgf@x\relax%
- \edef\innerradius{\the\pgf@xc}%
- \else%
- \pgf@xc\pgf@x\relax%
- \advance\pgf@xc-\pgf@xb%
- \edef\innerradius{\the\pgf@xc}%
- \fi%
- \fi%
- %
- % Add the outer sep.
- %
- \pgf@xa\outersep%
- \pgf@x\outerradius\relax%
- \advance\pgf@x\pgf@xa%
- \edef\outerradius{\the\pgf@x}%
- \pgf@x\innerradius\relax%
- \advance\pgf@x\pgf@xa%
- \edef\innerradius{\the\pgf@x}%
- %
- % Calculate the angle.
- %
- \c@pgf@counta\points%
- \pgf@x180pt\relax%
- \divide\pgf@x\c@pgf@counta%
- \c@pgf@counta#1\relax%
- \advance\c@pgf@counta-1\relax%
- \multiply\pgf@x\c@pgf@counta%
- \pgf@xa\rotate pt\relax%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@x90pt\relax%
- \edef\starangle{\the\pgf@x}%
- \ifodd\c@pgf@counta%
- \let\starradius\innerradius%
- \else%
- \let\starradius\outerradius%
- \fi%
- \pgfpointadd{\centerpoint}%
- {\pgfpointpolar{\starangle}{\starradius}}%
-}%
-
-
-% \pgfsetpolygonsides
-%
-% Set the number of sides on a polygon.
-%
-\def\pgfsetpolygonsides#1{%
- \pgfmathsetcounter{pgf@counta}{#1}%
- \edef\pgfpolygonsides{\the\c@pgfmath@counta}}
-\pgfsetpolygonsides{6}
-
-% \pgfsetpolygonrotate
-%
-% Set the angle of rotation of the polygon
-% border. This can be decimal.
-%
-\def\pgfsetpolygonrotate#1{%
- \pgfmathparse{#1}%
- \edef\pgfpolygonrotate{\pgfmathresult}}%
-\pgfsetpolygonrotate{0}
-
-
-% Regular polygon shape.
-%
-%
-\pgfdeclareshape{regular polygon}{%
- %
- % Saved dimensions.
- %
- \saveddimen{\sides}{\pgf@x\pgfpolygonsides pt}%
- \saveddimen{\rotate}{\pgf@x\pgfpolygonrotate pt}%
- \saveddimen{\minimumsize}{%
- \pgfmathsetlength\pgf@x{\pgfshapeminwidth}%
- \pgfmathsetlength\pgf@y{\pgfshapeminheight}%
- \ifdim\pgf@y>\pgf@x%
- \pgf@x\pgf@y%
- \fi}%
- \saveddimen{\outersep}{%
- \pgfmathsetlength\pgf@x{\pgfshapeouterxsep}%
- \pgfmathsetlength\pgf@y{\pgfshapeouterysep}%
- \ifdim\pgf@y>\pgf@x%
- \pgf@x\pgf@y%
- \fi}%
- \saveddimen{\radius}{%
- %
- % The radius calculated here is the radius of the circle which
- % can safely encompass the node textbox. This corresponds to the
- % distance from the centre of the polygon to the mid-point of the
- % of the sides of the polygon. The desired radius for the corners
- % of the polygon has to calculated `on-line' as the saved dimen
- % \sides is not available here.
- %
- \pgfmathsetlength\pgf@x{\pgfshapeinnerxsep}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{\pgfshapeinnerysep}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \ifdim\pgf@y>\pgf@x%
- \pgf@x\pgf@y%
- \fi%
- \pgfmathveclen@{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@x}}%
- \pgf@x\pgfmathresult pt\relax%
- }%
-
- %
- % Saved anchors.
- %
- \savedanchor{\centerpoint}{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
-
- %
- % Other anchors.
- %
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\centerpoint\pgfmathsetlength\pgf@y{.5ex}}%
- \anchor{base}{\centerpoint\pgf@y=0pt}%
- \anchor{north}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+0pt}{+\radius}}}%
- \anchor{south}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+0pt}{+-\radius}}}%
- \anchor{east}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+\radius}{+0pt}}}%
- \anchor{west}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+-\radius}{+0pt}}}%
- \anchor{north east}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+\radius}{+\radius}}}%
- \anchor{north west}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+-\radius}{+\radius}}}%
- \anchor{south east}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+\radius}{+-\radius}}}%
- \anchor{south west}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+-\radius}{+-\radius}}}%
-
- %
- % Background path.
- %
- \backgroundpath{%
- %
- % Redefine some stuff for ease of use.
- %
- \pgf@x\sides%
- \c@pgf@counta\pgf@x%
- \divide\c@pgf@counta65536\relax%
- \edef\sides{\the\c@pgf@counta}%
- \pgf@x\rotate%
- \edef\rotate{\pgf@sys@tonumber{\pgf@x}}%
- %
- % Get the inner angle.
- %
- \pgf@y360pt\relax%
- \divide\pgf@y\sides%
- \edef\polygonanglestep{\the\pgf@y}%
- %
- % Now recalculate the polygon *corner* radius.
- %
- \pgf@y.5\pgf@y%
- \pgfmathcos@{\pgf@sys@tonumber{\pgf@y}}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \pgf@x\radius\relax%
- \pgf@x\pgfmathresult\pgf@x%
- \pgf@xa\minimumsize\relax%
- \ifdim\pgf@x<.5\pgf@xa%
- \pgf@x.5\pgf@xa%
- \fi%
- \edef\polygonradius{\the\pgf@x}%
- %
- % Every polygon is drawn so that a side is at the bottom...
- %
- \pgf@x90pt\relax%
- \ifodd\sides%
- \else%
- \advance\pgf@x-\pgf@y%
- \fi%
- %
- % ...unless rotation is applied.
- %
- \pgf@xa\rotate pt\relax%
- \advance\pgf@x\pgf@xa%
- \edef\polygonangle{\the\pgf@x}%
- %
- % Move to first point.
- %
- \pgfpathmoveto{%
- \pgfpointadd{\centerpoint}%
- {\pgfpointpolar{+\polygonangle}{+\polygonradius}}%
- }%
- \pgfmathloop%
- %
- % Create anchors. Manually \xdef as \gdef is normally used by \anchor.
- %
- \expandafter\xdef\csname pgf@anchor@regular polygon@corner\space\pgfmathcounter\endcsname{%
- \noexpand\pgf@lib@shapescorneranchor{\pgfmathcounter}%
- }%
- \expandafter\xdef\csname pgf@anchor@regular polygon@side\space\pgfmathcounter\endcsname{%
- \noexpand\pgf@lib@shapessideanchor{\pgfmathcounter}%
- }%
- \ifnum\pgfmathcounter=\sides\relax% Stop.
- \else%
- \pgf@x\polygonangle\relax%
- \advance\pgf@x\polygonanglestep\relax%
- \edef\polygonangle{\the\pgf@x}%
- \pgfpathlineto{%
- \pgfpointadd{\centerpoint}%
- {\pgfpointpolar{+\polygonangle}{+\polygonradius}}%
- }%
- \repeatpgfmathloop%
- \pgfpathclose%
- }%
-
- %
- % Anchor border.
- %
- \anchorborder{%
- %
- % Save the external point.
- %
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \centerpoint%
- \advance\pgf@xa\pgf@x%
- \advance\pgf@ya\pgf@y%
- \edef\externalx{\the\pgf@xa}%
- \edef\externaly{\the\pgf@ya}%
- \pgf@process{\pgfpointdiff{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}}%
- %
- % Approximate the angle of the external point...
- %
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \pgf@xb\pgf@x%
- \pgf@yb\pgf@y%
- \ifdim\pgf@xa<0pt\relax%
- \pgf@xa-\pgf@xa%
- \fi%
- \ifdim\pgf@ya<0pt\relax%
- \pgf@ya-\pgf@ya%
- \fi%
- \ifdim\pgf@ya>\pgf@xa%
- \pgf@x\pgf@xa%
- \pgf@y\pgf@ya%
- \else%
- \pgf@x\pgf@ya%
- \pgf@y\pgf@xa%
- \fi%
- \ifdim\pgf@y=0pt\relax%
- \pgf@x0pt%
- \else%
- \pgfmathreciprocal@{\pgf@sys@tonumber{\pgf@y}}%
- \pgf@x\pgfmathresult\pgf@x%
- \fi%
- \multiply\pgf@x1000\relax%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgf@counta\the\pgf@x\relax\pgfmath@%
- \expandafter\pgf@x\csname pgfmath@atan@\the\c@pgf@counta\endcsname pt\relax%
- \ifdim\pgfmath@ya>\pgfmath@xa\relax%
- \pgf@x-\pgf@x%
- \advance\pgf@x90pt%
- \fi%
- \ifdim\pgf@xb<0pt%
- \ifdim\pgf@yb>0pt%
- \pgf@x-\pgf@x%
- \fi%
- \advance\pgf@x180pt\relax%
- \else%
- \ifdim\pgf@yb<0pt%
- \pgf@x-\pgf@x%
- \advance\pgf@x360pt\relax%
- \fi\fi%
- %
- % ...(redefine stuff for ease of use)...
- %
- \pgf@y\sides%
- \c@pgf@counta\pgf@y%
- \divide\c@pgf@counta65536\relax%
- \edef\sides{\the\c@pgf@counta}%
- \pgf@y\rotate%
- \edef\rotate{\pgf@sys@tonumber{\pgf@y}}%
- %
- % ...now adjust angle, for the number of polygon sides...
- %
- \advance\pgf@x-90pt\relax%
- \pgf@xa180pt\relax%
- \divide\pgf@xa\sides%
- %
- % ...and for if the there is an even number of sides...
- %
- \ifodd\sides%
- \else%
- \advance\pgf@x\pgf@xa%
- \fi%
- \ifdim\pgf@x<0pt\relax%
- \advance\pgf@x360pt\relax%
- \fi%
- %
- % ...and also for rotation.
- %
- \advance\pgf@x-\rotate pt\relax%
- \ifdim\pgf@x<0pt\relax%
- \advance\pgf@x360pt\relax%
- \fi%
- %
- % Now, locate the start and end points on the polygon border segment...
- %
- \c@pgf@counta\sides\relax%
- \pgf@y360pt\relax%
- \divide\pgf@y\c@pgf@counta\relax%
- \pgfmathreciprocal@{\pgf@sys@tonumber{\pgf@y}}%
- \pgf@x\pgfmathresult\pgf@x%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgf@counta\the\pgf@x\relax\pgfmath@%
- %
- % ...and hence, the start and end angles of the polygon border segment.
- %
- \pgf@x\pgf@y%
- \multiply\pgf@x\c@pgf@counta%
- \advance\pgf@x90pt%
- \ifodd\sides%
- \else%
- \advance\pgf@x-\pgf@xa%
- \fi%
- \advance\pgf@x\rotate pt\relax%
- \edef\firstangle{\the\pgf@x}%
- \advance\c@pgf@counta1\relax%
- \pgf@x\pgf@y%
- \multiply\pgf@x\c@pgf@counta%
- \advance\pgf@x\rotate pt\relax%
- \advance\pgf@x90pt%
- \ifodd\sides%
- \else%
- \advance\pgf@x-\pgf@xa%
- \fi%
- \edef\secondangle{\the\pgf@x}%
- %
- % Get the inner angle.
- %
- \pgf@y360pt\relax%
- \divide\pgf@y\sides%
- %
- % Now recalculate the polygon *corner* radius...
- %
- \pgf@y.5\pgf@y%
- \pgfmathcos@{\pgf@sys@tonumber{\pgf@y}}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \pgf@x\radius\relax%
- \pgf@x\pgfmathresult\pgf@x%
- \edef\polygonradius{\the\pgf@x}%
- %
- % ...and add the outer sep to the corner radius...
- %
- \pgf@xa\minimumsize\relax%
- \ifdim\pgf@x<.5\pgf@xa%
- \pgf@x.5\pgf@xa%
- \fi%
- \pgf@xa\outersep\relax%
- \advance\pgf@x\pgf@xa%
- \edef\radius{\the\pgf@x}%
- %
- % ...and calculate the point on the intersection of
- % the line from the external point to \centerpoint and
- % the segment of the star border.
- %
- \pgfpointintersectionoflines{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}%
- {%
- \pgfpointadd{\centerpoint}%
- {\pgfpointpolar{+\firstangle}{+\radius}}%
- }%
- {%
- \pgfpointadd{\centerpoint}%
- {\pgfpointpolar{+\secondangle}{+\radius}}%
- }%
- }%
-}%
-
-
-% \pgf@lib@shapespolygoncorneranchor
-%
-% Used internally to calculate corner anchor positions.
-%
-\def\pgf@lib@shapescorneranchor#1{%
- %
- % Redefine stuff for ease of use.
- %
- \pgf@y\sides%
- \c@pgf@counta\pgf@y%
- \divide\c@pgf@counta65536\relax%
- \edef\sides{\the\c@pgf@counta}%
- \pgf@y\rotate%
- \edef\rotate{\pgf@sys@tonumber{\pgf@y}}%
- %
- % Get the inner angle.
- %
- \pgf@y360pt\relax%
- \divide\pgf@y\sides\relax%
- \edef\polgonanglestep{\pgf@sys@tonumber{\pgf@y}}%
- %
- % Recalculate the polygon corner radius...
- %
- \pgf@y.5\pgf@y%
- \pgfmathcos@{\pgf@sys@tonumber{\pgf@y}}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \pgf@x\radius\relax%
- \pgf@x\pgfmathresult\pgf@x%
- \edef\polygonradius{\the\pgf@x}%
- %
- % ...adjust for minimum size...
- %
- \pgf@xa\minimumsize\relax%
- \ifdim\pgf@x<.5\pgf@xa%
- \pgf@x.5\pgf@xa%
- \fi%
- %
- % ...and add the outer sep.
- %
- \pgf@xa\outersep\relax%
- \advance\pgf@x\pgf@xa%
- \edef\polygonradius{\the\pgf@x}%
- %
- % Calculate the angle.
- %
- \c@pgf@counta#1\relax%
- \advance\c@pgf@counta-1\relax%
- \pgf@x2.0\pgf@y%
- \multiply\pgf@x\c@pgf@counta%
- \pgf@xa\rotate pt\relax%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@x90pt\relax%
- \ifodd\sides%
- \else%
- \advance\pgf@x-\pgf@y%
- \fi%
- \edef\polygonangle{\the\pgf@x}%
- \pgfpointadd{\centerpoint}%
- {\pgfpointpolar{\polygonangle}{\polygonradius}}%
-}%
-
-% \pgf@lib@shapespolygonsideanchor
-%
-% Used internally to calculate side anchor positions.
-%
-\def\pgf@lib@shapessideanchor#1{%
- %
- % Redefine stuff for ease of use.
- %
- \pgf@y\sides%
- \c@pgf@counta\pgf@y%
- \divide\c@pgf@counta65536\relax%
- \edef\sides{\the\c@pgf@counta}%
- \pgf@y\rotate%
- \edef\rotate{\pgf@sys@tonumber{\pgf@y}}%
- %
- % Get the inner angle.
- %
- \pgf@y360pt\relax%
- \divide\pgf@y\sides\relax%
- \edef\polygonanglestep{\the\pgf@y}%
- %
- % Recalculate the polygon corner radius...
- %
- \pgf@y.5\pgf@y%
- \pgfmathcos@{\pgf@sys@tonumber{\pgf@y}}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \pgf@x\radius\relax%
- \pgf@x\pgfmathresult\pgf@x%
- %
- % ...adjust for minimum size...
- %
- \pgf@xa\minimumsize\relax%
- \ifdim\pgf@x<.5\pgf@xa%
- \pgf@x.5\pgf@xa%
- \fi%
- %
- % and add the outer sep.
- %
- \pgf@xa\outersep\relax%
- \advance\pgf@x\pgf@xa%
- \edef\polygonradius{\the\pgf@x}%
- %
- % Calculate the angle.
- %
- \pgf@y\polygonanglestep%
- \c@pgf@counta#1\relax%
- \advance\c@pgf@counta-1\relax%
- \pgf@x\polygonanglestep pt\relax%
- \multiply\pgf@x\c@pgf@counta%
- \pgf@xa\rotate pt\relax%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@x90pt\relax%
- \ifodd\sides%
- \else%
- \advance\pgf@x-.5\pgf@y%
- \fi%
- \edef\firstangle{\the\pgf@x}%
- \advance\pgf@x\pgf@y%
- \edef\secondangle{\the\pgf@x}%
- \pgfpointlineattime{0.5}{%
- \pgfpointadd{\centerpoint}{\pgfpointpolar{+\firstangle}{+\polygonradius}}%
- }{%
- \pgfpointadd{\centerpoint}{\pgfpointpolar{+\secondangle}{+\polygonradius}}%
- }%
-}%
-
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.misc.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.misc.code.tex
deleted file mode 100644
index 6dcd610f612..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.misc.code.tex
+++ /dev/null
@@ -1,70 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryshapes.misc.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $
-
-
-\pgfdeclareshape{cross out}
-{
- \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
- \inheritanchorborder[from=rectangle]
- \inheritanchor[from=rectangle]{north}
- \inheritanchor[from=rectangle]{north west}
- \inheritanchor[from=rectangle]{north east}
- \inheritanchor[from=rectangle]{center}
- \inheritanchor[from=rectangle]{west}
- \inheritanchor[from=rectangle]{east}
- \inheritanchor[from=rectangle]{mid}
- \inheritanchor[from=rectangle]{mid west}
- \inheritanchor[from=rectangle]{mid east}
- \inheritanchor[from=rectangle]{base}
- \inheritanchor[from=rectangle]{base west}
- \inheritanchor[from=rectangle]{base east}
- \inheritanchor[from=rectangle]{south}
- \inheritanchor[from=rectangle]{south west}
- \inheritanchor[from=rectangle]{south east}
- \foregroundpath{
- % store lower right in xa/ya and upper right in xb/yb
- \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
- \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
- \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}}
- \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}}
- \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@yb}}
- \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@ya}}
- }
-}
-
-
-\pgfdeclareshape{strike out}
-{
- \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
- \inheritanchorborder[from=rectangle]
- \inheritanchor[from=rectangle]{north}
- \inheritanchor[from=rectangle]{north west}
- \inheritanchor[from=rectangle]{north east}
- \inheritanchor[from=rectangle]{center}
- \inheritanchor[from=rectangle]{west}
- \inheritanchor[from=rectangle]{east}
- \inheritanchor[from=rectangle]{mid}
- \inheritanchor[from=rectangle]{mid west}
- \inheritanchor[from=rectangle]{mid east}
- \inheritanchor[from=rectangle]{base}
- \inheritanchor[from=rectangle]{base west}
- \inheritanchor[from=rectangle]{base east}
- \inheritanchor[from=rectangle]{south}
- \inheritanchor[from=rectangle]{south west}
- \inheritanchor[from=rectangle]{south east}
- \foregroundpath{
- \pgfpathmoveto{\southwest}
- \pgfpathlineto{\northeast}
- }
-}
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.multipart.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.multipart.code.tex
deleted file mode 100644
index 2299d9520c8..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.multipart.code.tex
+++ /dev/null
@@ -1,165 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryshapes.multipart.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $
-
-\newbox\pgfnodepartlowerbox
-
-%
-% A circle that is split in the middle into an upper and a lower part.
-%
-% This node consists of two parts: The upper (main) part is shown in
-% the upper half of the circle. The second part is the (optional)
-% lower part.
-%
-% Parts: text, lower
-
-\pgfdeclareshape{circle split}
-{
- %
- % Node parts
- %
- \nodeparts{text,lower}
-
- %
- % Anchors
- %
- \savedanchor\centerpoint{%
- \pgf@x=.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength{\pgf@y}{\pgfshapeinnerysep}%
- \pgf@y=-\pgf@y%
- \advance\pgf@y by-\dp\pgfnodeparttextbox%
- \advance\pgf@y by-.5\pgflinewidth%
- }%
- \savedanchor\loweranchor{%
- \pgf@x=-.5\wd\pgfnodepartlowerbox%
- \advance\pgf@x by.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength{\pgf@y}{\pgfshapeinnerysep}%
- \pgf@y=-2\pgf@y%
- \advance\pgf@y by-\ht\pgfnodepartlowerbox%
- \advance\pgf@y by-.5\pgflinewidth%
- \advance\pgf@y by-\dp\pgfnodeparttextbox%
- \advance\pgf@y by-.5\pgflinewidth%
- }
-
- \saveddimen\radius{%
- %
- % Caculate ``height radius''
- %
- \pgf@ya=.5\ht\pgfnodeparttextbox%
- \advance\pgf@ya by.5\dp\pgfnodeparttextbox%
- \advance\pgf@ya by.5\ht\pgfnodepartlowerbox%
- \advance\pgf@ya by.5\dp\pgfnodepartlowerbox%
- \advance\pgf@ya by.5\pgflinewidth%
- \pgfmathsetlength\pgf@yb{\pgfshapeinnerysep}%
- \advance\pgf@ya by2\pgf@yb%
- %
- % Caculate ``width radius''
- %
- \pgf@xa=.5\wd\pgfnodeparttextbox%
- \ifdim\pgf@xa<.5\wd\pgfnodepartlowerbox%
- \pgf@xa=.5\wd\pgfnodepartlowerbox%
- \fi%
- \pgfmathsetlength\pgf@xb{\pgfshapeinnerxsep}%
- \advance\pgf@xa by\pgf@xb%
- %
- % Calculate length of radius vector:
- %
- \pgf@process{\pgfpointnormalised{\pgfqpoint{\pgf@xa}{\pgf@ya}}}%
- \ifdim\pgf@x>\pgf@y%
- \c@pgf@counta=\pgf@x%
- \ifnum\c@pgf@counta=0\relax%
- \else%
- \divide\c@pgf@counta by 255\relax%
- \pgf@xa=16\pgf@xa\relax%
- \divide\pgf@xa by\c@pgf@counta%
- \pgf@xa=16\pgf@xa\relax%
- \fi%
- \else%
- \c@pgf@counta=\pgf@y%
- \ifnum\c@pgf@counta=0\relax%
- \else%
- \divide\c@pgf@counta by 255\relax%
- \pgf@ya=16\pgf@ya\relax%
- \divide\pgf@ya by\c@pgf@counta%
- \pgf@xa=16\pgf@ya\relax%
- \fi%
- \fi%
- \pgf@x=\pgf@xa%
- %
- % If necessary, adjust radius so that the size requirements are
- % met:
- %
- \pgfmathsetlength{\pgf@xb}{\pgfshapeminwidth}%
- \pgfmathsetlength{\pgf@yb}{\pgfshapeminheight}%
- \ifdim\pgf@x<.5\pgf@xb%
- \pgf@x=.5\pgf@xb%
- \fi%
- \ifdim\pgf@x<.5\pgf@yb%
- \pgf@x=.5\pgf@yb%
- \fi%
- %
- % Now, add larger of outer sepearations.
- %
- \pgfmathsetlength{\pgf@xb}{\pgfshapeouterxsep}%
- \pgfmathsetlength{\pgf@yb}{\pgfshapeouterysep}%
- \ifdim\pgf@xb<\pgf@yb%
- \advance\pgf@x by\pgf@yb%
- \else%
- \advance\pgf@x by\pgf@xb%
- \fi%
- }
-
- %
- % Anchors
- %
- \inheritanchorborder[from=circle]
- \inheritanchor[from=circle]{north}
- \inheritanchor[from=circle]{north west}
- \inheritanchor[from=circle]{north east}
- \inheritanchor[from=circle]{center}
- \inheritanchor[from=circle]{west}
- \inheritanchor[from=circle]{east}
- \inheritanchor[from=circle]{mid}
- \inheritanchor[from=circle]{mid west}
- \inheritanchor[from=circle]{mid east}
- \inheritanchor[from=circle]{base}
- \inheritanchor[from=circle]{base west}
- \inheritanchor[from=circle]{base east}
- \inheritanchor[from=circle]{south}
- \inheritanchor[from=circle]{south west}
- \inheritanchor[from=circle]{south east}
- \anchor{lower}{\loweranchor}
-
- %
- % Background path
- %
- \inheritbackgroundpath[from=circle]
- \beforebackgroundpath{
- \pgfutil@tempdima=\radius%
- \pgfmathsetlength{\pgf@xb}{\pgfshapeouterxsep}%
- \pgfmathsetlength{\pgf@yb}{\pgfshapeouterysep}%
- \ifdim\pgf@xb<\pgf@yb%
- \advance\pgfutil@tempdima by-\pgf@yb%
- \else%
- \advance\pgfutil@tempdima by-\pgf@xb%
- \fi%
- \advance\pgfutil@tempdima by-.5\pgflinewidth%
- \pgfsetshortenstart{0pt}%
- \pgfsetshortenend{0pt}%
- \pgfsetarrows{-}%
- \pgfpathmoveto{\pgfpointadd{\centerpoint}{\pgfqpoint{-1\pgfutil@tempdima}{0pt}}}%
- \pgfpathlineto{\pgfpointadd{\centerpoint}{\pgfqpoint{\pgfutil@tempdima}{0pt}}}%
- \pgfusepath{stroke}%
- }
-}
-
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.symbols.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.symbols.code.tex
deleted file mode 100644
index 50ee3ec9c6b..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.symbols.code.tex
+++ /dev/null
@@ -1,50 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryshapes.symbols.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $
-
-\pgfdeclareshape{forbidden sign}
-{
- \inheritsavedanchors[from=circle] % this is nearly a circle
- \inheritanchorborder[from=circle]
- \inheritanchor[from=circle]{north}
- \inheritanchor[from=circle]{north west}
- \inheritanchor[from=circle]{north east}
- \inheritanchor[from=circle]{center}
- \inheritanchor[from=circle]{west}
- \inheritanchor[from=circle]{east}
- \inheritanchor[from=circle]{mid}
- \inheritanchor[from=circle]{mid west}
- \inheritanchor[from=circle]{mid east}
- \inheritanchor[from=circle]{base}
- \inheritanchor[from=circle]{base west}
- \inheritanchor[from=circle]{base east}
- \inheritanchor[from=circle]{south}
- \inheritanchor[from=circle]{south west}
- \inheritanchor[from=circle]{south east}
- \inheritbackgroundpath[from=circle]
- \foregroundpath{
- \centerpoint%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \pgfutil@tempdima=\radius%
- \pgfmathsetlength{\pgf@xb}{\pgfshapeouterxsep}%
- \pgfmathsetlength{\pgf@yb}{\pgfshapeouterysep}%
- \ifdim\pgf@xb<\pgf@yb%
- \advance\pgfutil@tempdima by-\pgf@yb%
- \else%
- \advance\pgfutil@tempdima by-\pgf@xb%
- \fi%
- \pgfpathmoveto{\pgfpointadd{\pgfqpoint{\pgf@xc}{\pgf@yc}}{\pgfqpoint{-0.707107\pgfutil@tempdima}{-0.707107\pgfutil@tempdima}}}
- \pgfpathlineto{\pgfpointadd{\pgfqpoint{\pgf@xc}{\pgf@yc}}{\pgfqpoint{0.707107\pgfutil@tempdima}{0.707107\pgfutil@tempdima}}}
- }
-}
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex
deleted file mode 100644
index dde1a6db64c..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex
+++ /dev/null
@@ -1,424 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarysnakes.code.tex,v 1.15 2007/03/09 17:49:32 tantau Exp $
-
-
-\newdimen\pgfsnakesegmentamplitude
-\newdimen\pgfsnakesegmentlength
-\def\pgfsnakesegmentangle{45}
-\def\pgfsnakesegmentobjectlength{\pgfsnakesegmentamplitude}
-\def\pgfsnakesegmentaspect{0.5}
-
-\pgfsnakesegmentlength=10pt
-\pgfsnakesegmentamplitude=2.5pt
-
-
-
-% snake snake
-%
-% This snake produces a hopefully optically pleasing squiggly snake.
-%
-% Parameters: \pgfsnakesegmentamplitude, \pgfsnakesegmentlength
-
-\pgfdeclaresnake{snake}{initial}
-{
- \state{initial}[switch if less than=+.625\pgfsnakesegmentlength to final,
- width=+.3125\pgfsnakesegmentlength,
- next state=down]
- {
- \pgfpathcurveto
- {\pgfqpoint{.125\pgfsnakesegmentlength}{0pt}}
- {\pgfqpoint{.1875\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}}
- {\pgfqpoint{.3125\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}}
- }
- \state{down}[switch if less than=+.8125\pgfsnakesegmentlength to end down,
- width=+.5\pgfsnakesegmentlength,
- next state=up]
- {
- \pgfpathcosine{\pgfqpoint{.25\pgfsnakesegmentlength}{-1\pgfsnakesegmentamplitude}}
- \pgfpathsine{\pgfqpoint{.25\pgfsnakesegmentlength}{-1\pgfsnakesegmentamplitude}}
- }
- \state{up}[switch if less than=+.8125\pgfsnakesegmentlength to end up,
- width=+.5\pgfsnakesegmentlength,
- next state=down]
- {
- \pgfpathcosine{\pgfqpoint{.25\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}}
- \pgfpathsine{\pgfqpoint{.25\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}}
- }
- \state{end down}[width=+.3125\pgfsnakesegmentlength,
- next state=final]
- {
- \pgfpathcurveto
- {\pgfqpoint{.125\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}}
- {\pgfqpoint{.1875\pgfsnakesegmentlength}{0pt}}
- {\pgfqpoint{.3125\pgfsnakesegmentlength}{0pt}}
- }
- \state{end up}[width=+.3125\pgfsnakesegmentlength,
- next state=final]
- {
- \pgfpathcurveto
- {\pgfqpoint{.125\pgfsnakesegmentlength}{-\pgfsnakesegmentamplitude}}
- {\pgfqpoint{.1875\pgfsnakesegmentlength}{0pt}}
- {\pgfqpoint{.3125\pgfsnakesegmentlength}{0pt}}
- }
- \state{final}
- { \pgfpathlineto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} }
-}
-
-
-
-
-% zigzag snake
-%
-% Parameters: \pgfsnakesegmentamplitude, \pgfsnakesegmentlength
-
-\pgfdeclaresnake{zigzag}{up}
-{
- \state{up}[width=+.5\pgfsnakesegmentlength,%
- next state=down]
- {
- \pgfpathlineto{\pgfqpoint{.25\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}}
- \pgfpathlineto{\pgfqpoint{.5\pgfsnakesegmentlength}{0pt}}
- }
- \state{down}[width=+.5\pgfsnakesegmentlength,%
- next state=up]
- {
- \pgfpathlineto{\pgfqpoint{.25\pgfsnakesegmentlength}{-\pgfsnakesegmentamplitude}}
- \pgfpathlineto{\pgfqpoint{.5\pgfsnakesegmentlength}{0pt}}
- }
- \state{final}
- { \pgfpathlineto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} }
-}
-
-
-
-% saw snake
-%
-% Parameters: \pgfsnakesegmentamplitude, \pgfsnakesegmentlength
-
-\pgfdeclaresnake{saw}{initial}
-{
- \state{initial}[width=+\pgfsnakesegmentlength]
- {
- \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}}
- \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentlength}{0pt}}
- }
- \state{final}
- {
- \pgfpathlineto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}}
- }
-}
-
-
-% coil snake
-%
-% Parameters: \pgfsnakesegmentamplitude, \pgfsnakesegmentlength,
-
-\pgfdeclaresnake{coil}{coil}
-{
- \state{coil}[switch if less than=%
- 1.5\pgfsnakesegmentlength+%
- \pgfsnakesegmentaspect\pgfsnakesegmentamplitude+%
- \pgfsnakesegmentaspect\pgfsnakesegmentamplitude to last,
- width=+\pgfsnakesegmentlength]
- {
- \pgfpathcurveto
- {\pgfpoint@oncoil{0 }{ 0.555}{1}}
- {\pgfpoint@oncoil{0.445}{ 1 }{2}}
- {\pgfpoint@oncoil{1 }{ 1 }{3}}
- \pgfpathcurveto
- {\pgfpoint@oncoil{1.555}{ 1 }{4}}
- {\pgfpoint@oncoil{2 }{ 0.555}{5}}
- {\pgfpoint@oncoil{2 }{ 0 }{6}}
- \pgfpathcurveto
- {\pgfpoint@oncoil{2 }{-0.555}{7}}
- {\pgfpoint@oncoil{1.555}{-1 }{8}}
- {\pgfpoint@oncoil{1 }{-1 }{9}}
- \pgfpathcurveto
- {\pgfpoint@oncoil{0.445}{-1 }{10}}
- {\pgfpoint@oncoil{0 }{-0.555}{11}}
- {\pgfpoint@oncoil{0 }{ 0 }{12}}
- }
- \state{last}[width=.5\pgfsnakesegmentlength+%
- \pgfsnakesegmentaspect\pgfsnakesegmentamplitude+%
- \pgfsnakesegmentaspect\pgfsnakesegmentamplitude,next state=final]
- {
- \pgfpathcurveto
- {\pgfpoint@oncoil{0 }{ 0.555}{1}}
- {\pgfpoint@oncoil{0.445}{ 1 }{2}}
- {\pgfpoint@oncoil{1 }{ 1 }{3}}
- \pgfpathcurveto
- {\pgfpoint@oncoil{1.555}{ 1 }{4}}
- {\pgfpoint@oncoil{2 }{ 0.555}{5}}
- {\pgfpoint@oncoil{2 }{ 0 }{6}}
- }
- \state{final}
- {
- \pgfpathlineto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}}
- }
-}
-
-\def\pgfpoint@oncoil#1#2#3{%
- \pgf@x=#1\pgfsnakesegmentamplitude%
- \pgf@x=\pgfsnakesegmentaspect\pgf@x%
- \pgf@y=#2\pgfsnakesegmentamplitude%
- \pgf@xa=0.083333333333\pgfsnakesegmentlength%
- \advance\pgf@x by#3\pgf@xa%
-}
-
-
-% bumps snake
-%
-% Parameters: \pgfsnakesegmentamplitude, \pgfsnakesegmentlength
-
-\pgfdeclaresnake{bumps}{initial}
-{
- \state{initial}[width=+.5\pgfsnakesegmentlength]
- {
- \pgfpathcurveto
- {\pgfqpoint{0pt}{.555\pgfsnakesegmentamplitude}}
- {\pgfqpoint{0.11125\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}}
- {\pgfqpoint{.25\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}}
- \pgfpathcurveto
- {\pgfqpoint{.38875\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}}
- {\pgfqpoint{.5\pgfsnakesegmentlength}{.5\pgfsnakesegmentamplitude}}
- {\pgfqpoint{.5\pgfsnakesegmentlength}{0\pgfsnakesegmentamplitude}}
- }
- \state{final}
- {
- \pgfpathlineto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}}
- }
-}
-
-
-
-% expanding waves snake
-%
-% Parameters: \pgfsnakesegmentangle, \pgfsnakesegmentlength
-
-\pgfdeclaresnake{expanding waves}{initial}
-{
- \state{initial}[width=+\pgfsnakesegmentlength,next state=wave]
- {}
-
- \state{wave}[switch if less than=+\pgfsnakesegmentlength to last,
- width=+\pgfsnakesegmentlength]
- {
- \pgfpathmoveto{
- \pgfpointadd
- {\pgfqpoint{-\pgfsnakecompleteddistance}{0pt}}%
- {\pgfpointpolar{\pgfsnakesegmentangle}{+\pgfsnakecompleteddistance}}}%
- \pgfpatharc{\pgfsnakesegmentangle}{-\pgfsnakesegmentangle}{+\pgfsnakecompleteddistance}%
- }
- \state{last}[width=+0pt,next state=final]
- {
- \pgfpathmoveto{
- \pgfpointadd
- {\pgfqpoint{-\pgfsnakecompleteddistance}{0pt}}%
- {\pgfpointpolar{\pgfsnakesegmentangle}{+\pgfsnakecompleteddistance}}}%
- \pgfpatharc{\pgfsnakesegmentangle}{-\pgfsnakesegmentangle}{+\pgfsnakecompleteddistance}%
- }
- \state{final}
- {
- \pgfpathmoveto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}}
- }
-}
-
-
-
-% waves snake
-%
-% Parameters: \pgfsnakesegmentangle, \pgfsnakesegmentlength
-
-\pgfdeclaresnake{waves}{wave}
-{
- \state{wave}[width=\pgfsnakesegmentlength]
- {
- \pgftransformxshift{+\pgfsnakesegmentlength}
- \pgfpathmoveto{
- \pgfpointadd
- {\pgfqpoint{-\pgfsnakesegmentobjectlength}{0pt}}%
- {\pgfpointpolar{\pgfsnakesegmentangle}{+\pgfsnakesegmentobjectlength}}}%
- \pgfpatharc{\pgfsnakesegmentangle}{-\pgfsnakesegmentangle}{+\pgfsnakesegmentobjectlength}%
- }
- \state{final}
- {
- \pgfpathmoveto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}}
- }
-}
-
-
-% triangle snakes
-%
-% Parameters: \pgfsnakesegmentlength, \pgfsnakeobjectsize, \pgfsnakesegmentamplitude
-
-\pgfdeclaresnake{triangles}{triangle}
-{
- \state{triangle}[switch if less than=+\pgfsnakesegmentlength to last,
- width=+\pgfsnakesegmentlength]
- {
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfsnakesegmentamplitude}}
- \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentobjectlength}{0pt}}
- \pgfpathlineto{\pgfqpoint{0pt}{-\pgfsnakesegmentamplitude}}
- \pgfpathclose
- }
- \state{last}[width=+\pgfsnakesegmentobjectlength,next state=final]
- {
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfsnakesegmentamplitude}}
- \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentobjectlength}{0pt}}
- \pgfpathlineto{\pgfqpoint{0pt}{-\pgfsnakesegmentamplitude}}
- \pgfpathclose
- }
- \state{final}
- {
- \pgfpathmoveto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}}
- }
-}
-
-
-
-% crosses snakes
-%
-% Parameters: \pgfsnakesegmentlength, \pgfsnakeobjectsize, \pgfsnakesegmentamplitude
-
-\pgfdeclaresnake{crosses}{crosses}
-{
- \state{crosses}[switch if less than=+\pgfsnakesegmentlength to last,
- width=+\pgfsnakesegmentlength]
- {
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfsnakesegmentamplitude}}
- \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentobjectlength}{-\pgfsnakesegmentamplitude}}
- \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfsnakesegmentamplitude}}
- \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentobjectlength}{\pgfsnakesegmentamplitude}}
- }
- \state{last}[width=\pgfsnakesegmentobjectlength,next state=final]
- {
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfsnakesegmentamplitude}}
- \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentobjectlength}{-1\pgfsnakesegmentamplitude}}
- \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfsnakesegmentamplitude}}
- \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentobjectlength}{\pgfsnakesegmentamplitude}}
- }
- \state{final}
- {
- \pgfpathmoveto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}}
- }
-}
-
-
-
-% ticks snakes
-%
-% Parameters: \pgfsnakesegmentlength, \pgfsnakesegmentamplitude
-
-\pgfdeclaresnake{ticks}{ticks}
-{
- \state{ticks}[width=+\pgfsnakesegmentlength]
- {
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfsnakesegmentamplitude}}
- \pgfpathlineto{\pgfqpoint{0pt}{-\pgfsnakesegmentamplitude}}
- }
- \state{final}
- {
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfsnakesegmentamplitude}}
- \pgfpathlineto{\pgfqpoint{0pt}{-\pgfsnakesegmentamplitude}}
- \pgfpathmoveto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}}
- }
-}
-
-
-% border snake
-%
-% Parameters: \pgfsnakesegmentlength, \pgfsnakesegmentamplitude, \pgfsnakesegmentangle
-
-\pgfdeclaresnake{border}{tick}
-{
- \state{tick}[switch if less than=+\pgfsnakesegmentlength to last,
- width=+\pgfsnakesegmentlength]
- {
- \pgfpathmoveto{\pgfpointorigin}
- \pgfpathlineto{\pgfpointpolar{\pgfsnakesegmentangle}{+\pgfsnakesegmentamplitude}}
- }
- \state{last}[width=+\pgfsnakesegmentamplitude,next state=final]
- {
- \pgfpathmoveto{\pgfpointorigin}
- \pgfpathlineto{\pgfpointpolar{\pgfsnakesegmentangle}{+\pgfsnakesegmentamplitude}}
- }
- \state{final}
- {
- \pgfpathmoveto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}}
- }
-}
-
-
-
-
-% brace snakes
-%
-% Parameters: \pgfsnakesegmentamplitude
-
-\pgfdeclaresnake{brace}{brace}
-{
- \state{brace}[width=+\pgfsnakeremainingdistance,next state=final]
- {
- \pgfpathmoveto{\pgfpointorigin}
- \pgfpathcurveto
- {\pgfqpoint{.15\pgfsnakesegmentamplitude}{.3\pgfsnakesegmentamplitude}}
- {\pgfqpoint{.5\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}}
- {\pgfqpoint{\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}}
- {
- \pgftransformxshift{+\pgfsnakesegmentaspect\pgfsnakeremainingdistance}
- \pgfpathlineto{\pgfqpoint{-\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}}
- \pgfpathcurveto
- {\pgfqpoint{-.5\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}}
- {\pgfqpoint{-.15\pgfsnakesegmentamplitude}{.7\pgfsnakesegmentamplitude}}
- {\pgfqpoint{0\pgfsnakesegmentamplitude}{1\pgfsnakesegmentamplitude}}
- \pgfpathcurveto
- {\pgfqpoint{.15\pgfsnakesegmentamplitude}{.7\pgfsnakesegmentamplitude}}
- {\pgfqpoint{.5\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}}
- {\pgfqpoint{\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}}
- }
- {
- \pgftransformxshift{+\pgfsnakeremainingdistance}
- \pgfpathlineto{\pgfqpoint{-\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}}
- \pgfpathcurveto
- {\pgfqpoint{-.5\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}}
- {\pgfqpoint{-.15\pgfsnakesegmentamplitude}{.3\pgfsnakesegmentamplitude}}
- {\pgfqpoint{0pt}{0pt}}
- }
- }
- \state{final}
- {}
-}
-
-
-
-% bent snake
-%
-% A snake that looks like someone bent the line a bit.
-%
-% Parameters: \pgfsnakesegmentamplitude, \pgfsnakesegmentaspect
-
-\pgfdeclaresnake{bent}{bent}
-{
- \state{bent}[width=+\pgfsnakeremainingdistance,next state=final]
- {
- \pgfpathcurveto
- {\pgfqpoint{\pgfsnakesegmentaspect\pgfsnakeremainingdistance}{\pgfsnakesegmentamplitude}}
- {\pgfpointadd{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}}
- {\pgfqpoint{-\pgfsnakesegmentaspect\pgfsnakeremainingdistance}{\pgfsnakesegmentamplitude}}}
- {\pgfqpoint{\pgfsnakeremainingdistance}{0pt}}
- }
- \state{final}
- {}
-}
-
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzcoordinatesystems.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzcoordinatesystems.code.tex
deleted file mode 100644
index 68659de8138..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzcoordinatesystems.code.tex
+++ /dev/null
@@ -1,24 +0,0 @@
-% Copyright 2007 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzmatrix.code.tex,v 1.5 2007/01/08 10:42:19 tantau Exp $
-
-
-
-% Barycentric coordinates
-%
-% Usage: the argument of the coordinate system expression should be a
-% list of comma-separated pairs of the form node=number. For each
-% node, the center anchors is weighted by the number.
-%
-% Exampe: (barycentric cs:a=1,b=1,c=1) yields the weighted middle of
-% the three points a.center, b.center, c.center.
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.geometric.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.geometric.code.tex
deleted file mode 100644
index 76e2e2967b9..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.geometric.code.tex
+++ /dev/null
@@ -1,23 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzshapes.geometric.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $
-
-
-\tikzoption{star points}{\pgfsetstarpoints{#1}}
-\tikzoption{star rotate}{\pgfsetstarrotate{#1}}
-\tikzoption{star point height}{\pgfsetstarpointheight{#1}}
-\tikzoption{star point ratio}{\pgfsetstarpointratio{#1}}
-
-\tikzoption{regular polygon sides}{\pgfsetpolygonsides{#1}}
-\tikzoption{regular polygon rotate}{\pgfsetpolygonrotate{#1}}
-
-\usepgflibrary{shapes.geometric}
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.multipart.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.multipart.code.tex
deleted file mode 100644
index f9f29dbaea3..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.multipart.code.tex
+++ /dev/null
@@ -1,14 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzshapes.multipart.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $
-
-\usepgflibrary{shapes.multipart}
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathbase.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathbase.code.tex
deleted file mode 100644
index 8228c389c7c..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathbase.code.tex
+++ /dev/null
@@ -1,263 +0,0 @@
-% Copyright 2007 by Mark Wibrow
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-%
-% This file provides basic macros for converting between bases.
-%
-% Version 0.0 08/03/2007
-
-% \pgfmathbasetodec
-%
-% Convert a representation of an integer from
-% the spcified base to base 10.
-%
-% #1 - a macro to store the result.
-% #2 - the representation of a number (i.e. not a register)
-% #3 - the current base.
-%
-% e.g.
-%
-% \pgfmathbasetodec\mynumber{10111}{2}
-%
-% \mynumber <- 23
-%
-\def\pgfmathbasetodec#1#2#3{%
- \pgfmath@checknumber{#2}%
- \pgfmath@checkbase{#3}%
- \def\pgfmath@base{#3}%
- \def\pgfmath@macro{#1}%
- \c@pgfmath@counta1\relax%
- \def\pgfmath@reversed{}%
- \expandafter\pgfmathbasetodec@#2\pgfmathbasetodec}
-
-\def\pgfmathbasetodec@#1{%
- \ifx\pgfmathbasetodec#1%
- \c@pgfmath@countb0%
- \divide\c@pgfmath@counta by\pgfmath@base\relax%
- \expandafter\pgfmathbasetodec@@%
- \else%
- \edef\pgfmath@reversed{\pgfmath@reversed#1}%
- \expandafter\multiply\expandafter\c@pgfmath@counta\pgfmath@base\relax%
- \expandafter\pgfmathbasetodec@%
- \fi}
-
-\def\pgfmathbasetodec@@{\expandafter\pgfmathbasetodec@@@\pgfmath@reversed\pgfmathbasetodec}
-
-\def\pgfmathbasetodec@@@#1{%
- \ifx\pgfmathbasetodec#1\relax%
- \expandafter\edef\pgfmath@macro{\the\c@pgfmath@countb}%
- \let\pgfmath@next\pgfmathbasetodec@@@@%
- \else%
- \chardef\pgfmath@charnum`#1\relax%
- \c@pgfmath@countc\pgfmath@charnum%
- \ifnum\c@pgfmath@countc>96\relax%
- \advance\c@pgfmath@countc-87\relax%
- \else
- \ifnum\c@pgfmath@countc>64\relax%
- \advance\c@pgfmath@countc-55\relax%
- \else
- \advance\c@pgfmath@countc-48\relax%
- \fi\fi%
- \ifnum\c@pgfmath@countc<\pgfmath@base\relax%
- \multiply\c@pgfmath@countc\c@pgfmath@counta\relax%
- \advance\c@pgfmath@countb\c@pgfmath@countc%
- \divide\c@pgfmath@counta by\pgfmath@base\relax%
- \let\pgfmath@next\pgfmathbasetodec@@@%
- \else
- \pgfmath@error{Digit `#1' invalid for base \pgfmath@base}%
- \let\pgfmath@next\relax%
- \fi%
- \fi%
- \pgfmath@next}
-\def\pgfmathbasetodec@@@@{%
- \expandafter\pgfmath@ensurenumberlength\expandafter{\pgfmath@macro}%
-}
-
-% \pgfmathdectobase
-%
-% Convert a representation of an integer from
-% base 10 to the spcified base. Letters for bases
-% greater than 10 are in lowercase.
-%
-% #1 - a macro to store the result.
-% #2 - a number in base 10 (in a macro, not a register)
-% #3 - the required base.
-%
-% e.g.
-%
-% \pgfmathdectobase\mynumber{127}{16}
-%
-% \mynumber <- 7f
-%
-\def\pgfmathdectobase#1#2#3{%
- \pgfmath@checknumber{#2}%
- \pgfmath@checkbase{#3}%
- \c@pgfmath@counta#2\relax%
- \def#1{}%
- \pgfmathloop
- \ifnum\c@pgfmath@counta>0\relax%
- \c@pgfmath@countb\c@pgfmath@counta%
- \divide\c@pgfmath@countb#3\relax%
- \multiply\c@pgfmath@countb-#3\relax%
- \advance\c@pgfmath@countb\c@pgfmath@counta%
- \edef#1{\csname pgfmath@lowercase digit@\the\c@pgfmath@countb\endcsname#1}%
- \divide\c@pgfmath@counta#3\relax%
- \repeatpgfmathloop%
- \pgfmath@ensurenumberlength{#1}}
-
-% \pgfmathdectoBase
-%
-% Convert a representation of an integer from
-% base 10 to the spcified base. Letters for bases
-% greater than 10 are in uppercase.
-%
-% #1 - a macro to store the result.
-% #2 - a number in base 10 (in a macro, not a register)
-% #3 - the required base.
-%
-% e.g.
-%
-% \pgfmathdectoBase\mynumber{127}{16}
-%
-% \mynumber <- 7F
-%
-\def\pgfmathdectoBase#1#2#3{%
- \pgfmath@checkbase{#3}%
- \pgfmath@checknumber{#2}%
- \c@pgfmath@counta#2\relax%
- \def#1{}%
- \pgfmathloop
- \ifnum\c@pgfmath@counta>0\relax%
- \c@pgfmath@countb\c@pgfmath@counta%
- \divide\c@pgfmath@countb#3\relax%
- \multiply\c@pgfmath@countb-#3\relax%
- \advance\c@pgfmath@countb\c@pgfmath@counta%
- \edef#1{\csname pgfmath@uppercase digit@\the\c@pgfmath@countb\endcsname#1}%
- \divide\c@pgfmath@counta#3\relax%
- \repeatpgfmathloop%
- \pgfmath@ensurenumberlength{#1}}
-
-\def\pgfmath@createdigits{%
- \def\pgfmath@digitstyle{lowercase digit}%
- \c@pgfmath@counta0\relax%
- \pgfmath@createdigits@0123456789abcdefghijklmnopqrstuvwxyz\pgfmath@createdigits%
- \def\pgfmath@digitstyle{uppercase digit}%
- \c@pgfmath@counta0\relax%
- \pgfmath@createdigits@0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\pgfmath@createdigits}
-
-\def\pgfmath@createdigits@#1{%
- \ifx\pgfmath@createdigits#1\relax%
- \else%
- \expandafter\pgfmath@def\expandafter{\pgfmath@digitstyle}{\the\c@pgfmath@counta}{#1}%
- \advance\c@pgfmath@counta1\relax%
- \expandafter\pgfmath@createdigits@%
- \fi}
-\pgfmath@createdigits
-
-% \pgfmathbasetobase
-%
-% Convert a representation of an integer from
-% between the specified bases. Letters for target
-% bases greater than 10 are in lppercase.
-%
-% #1 - a macro to store the result.
-% #2 - a number (in a macro, not a register)
-% #3 - the source base.
-% #4 - the target base.
-%
-% e.g.
-%
-% \pgfmathbasetobase\mynumber{4321}{5}{9}
-%
-% \mynumber <- 721
-%
-\def\pgfmathbasetobase#1#2#3#4{%
- \pgfmathbasetodec{\pgfmath@temp}{#2}{#3}%
- \pgfmathdectobase{#1}{\pgfmath@temp}{#4}
-}
-
-% \pgfmathbasetobase
-%
-% Convert a representation of an integer from
-% between the specified bases. Letters for target
-% bases greater than 10 are in lppercase.
-%
-% #1 - a macro to store the result.
-% #2 - a number (in a macro, not a register)
-% #3 - the source base.
-% #4 - the target base.
-%
-% e.g.
-%
-% \pgfmathbasetobase\mynumber{1234}{5}{12}
-%
-% \mynumber <- 142
-%
-\def\pgfmathbasetoBase#1#2#3#4{%
- \pgfmathbasetodec{\pgfmath@temp}{#2}{#3}%
- \pgfmathdectoBase{#1}{\pgfmath@temp}{#4}
-}
-
-\def\pgfmath@checkbase#1{%
- \ifnum#1<2\relax%
- \pgfmath@error{Cannot process numbers in base `#1'.}%
- \else%
- \ifnum#1>36\relax%
- \pgfmath@error{Cannot process numbers in base `#1'.}%
- \fi\fi}
-
-\def\pgfmath@checknumber#1{%
- \expandafter\pgfmath@checknumber@#1\pgfmath@}
-\def\pgfmath@checknumber@#1#2\pgfmath@{%
- \ifx#1-%
- \pgfmath@error{Cannot process negative numbers.}%
- \fi}
-
-
-% \pgfmath@ensurenumberlength
-%
-% Internal macro for making a representation of a number have
-% a specific length, byt prefixing zeros to the number.
-%
-% #1 - a macro contatining a representation of an integer.
-% #2 - the number of digits to ensure.
-%
-% e.g.
-%
-% \foo <- 7FF
-%
-% \pgfmathsetnumberlength{8}%
-% \pgfmath@ensurenumberlength\foo
-%
-% \foo <- 000007FF
-%
-\def\pgfmath@ensurenumberlength#1{%
- \def\pgfmath@tempa{#1}%
- \expandafter\c@pgfmath@counta\pgfmath@basenumberlength\relax%
- \expandafter\pgfmath@ensurenumberlength@#1\pgfmath@ensurenumberlength}
-\def\pgfmath@ensurenumberlength@#1{%
- \ifx\pgfmath@ensurenumberlength#1\relax%
- \expandafter\pgfmath@ensurenumberlength@@%
- \else%
- \advance\c@pgfmath@counta-1\relax%
- \expandafter\pgfmath@ensurenumberlength@
- \fi}
-
-\def\pgfmath@ensurenumberlength@@{%
- \edef\pgfmath@tempb{\pgfmath@tempa}%
- \pgfmath@ensurenumberlength@@@}
-\def\pgfmath@ensurenumberlength@@@{%
- \ifnum\c@pgfmath@counta>0\relax%
- \advance\c@pgfmath@counta-1\relax%
- \edef\pgfmath@tempb{0\pgfmath@tempb}%
- \expandafter\pgfmath@ensurenumberlength@@@%
- \fi%
- \expandafter\edef\pgfmath@tempa{\pgfmath@tempb}}
-
-\def\pgfmathsetbasenumberlength#1{\def\pgfmath@basenumberlength{#1}}
-\pgfmathsetbasenumberlength{1}% \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex
deleted file mode 100644
index 8cf9bbd26b5..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex
+++ /dev/null
@@ -1,194 +0,0 @@
-% Copyright 2007 by Mark Wibrow
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-% This file loads all the parsing, functions and operator stuff
-%
-% Version 0.0 08/03/2007
-
-\input pgfmathutil.code.tex
-\input pgfmathparser.code.tex
-\input pgfmathoperations.code.tex
-\input pgfmathbase.code.tex
-
-
-% \pgfmathsetlength, \pgfmathaddtolength
-%
-% #1 = dimension register
-% #2 = expression
-%
-% Description:
-%
-% These functions work similar to \setlength and \addtolength. Only,
-% they allow #2 to contain an expression, which is evaluated before
-% assignment. Furthermore, the font is setup before the assignment is
-% done, so that dimensions like 1em are evaluated correctly.
-%
-% If #2 starts with "+", then a simple assignment is done (but the
-% font is still setup). This is orders of magnitude faster than a
-% parsed assignment.
-
-\def\pgfmathsetlength#1#2{%
- \expandafter\pgfmath@onquick#2\pgfmath@%
- {%
- % Ok, quick version:
- \begingroup%
- \pgfutil@selectfont%
- \pgfmath@x#2\unskip%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
- #1\pgfmathresult pt\relax%
- }%
- {%
- \pgfmathparse{#2}#1\pgfmathresult pt\relax%
-}%
-}
-\def\pgfmathaddtolength#1#2{%
- \expandafter\pgfmath@onquick#2\pgfmath@%
- {%
- \begingroup%
- \pgfutil@selectfont%
- \pgfmath@x#1\relax%
- \advance\pgfmath@x#2\unskip%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
- #1\pgfmathresult pt\relax%
- }%
- {\pgfmathparse{#2}\advance#1\pgfmathresult pt\relax}%
-}
-
-% Not really needed and does not work in plain TeX:
-%\def\pgfmathnewcounter#1{%
-% \expandafter\let\expandafter\pgfmath@register\csname c@#1\endcsname%
-% \expandafter\ifx\pgfmath@register\relax%
-% \expandafter\newcount\csname c@#1\endcsname%
-% \csname c@#1\endcsname0\relax%
-% \expandafter\def\csname the#1\endcsname{\expandafter\the\csname c@#1\endcsname}%
-% \else% Do nothing.
-% \fi}%
-
-% \pgfmathsetcounter, \pgfmathaddtocounter
-%
-% Results of parsing are truncated.
-%
-\def\pgfmathsetcounter#1#2{%
- \expandafter\pgfmath@onquick#2\pgfmath@%
- {%
- \csname c@#1\endcsname=#2\relax%
- }%
- {%
- \pgfmath@ifundefined{c@#1}{\pgfmath@error{No counter named '#1' is known}{}}{%
- \pgfmathparse{#2}%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \csname c@#1\endcsname\pgfmathresult\relax\pgfmath@%
- }%
- }%
-}
-
-\def\pgfmathaddtocounter#1#2{%
- \expandafter\pgfmath@onquick#2\pgfmath@%
- {%
- \advance\csname c@#1\endcsname by#2\relax%
- }%
- {%
- \pgfmath@ifundefined{c@#1}{\pgfmath@error{No counter named '#1' is known}{}}{%
- \edef\pgfmath@addtocountertemp{\expandafter\the\csname c@#1\endcsname}%
- \pgfmathparse{#2}%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \csname c@#1\endcsname\pgfmathresult\relax\pgfmath@%
- \expandafter\advance\csname c@#1\endcsname\pgfmath@addtocountertemp%
- }%
- }%
-}
-
-% \pgfmathsetcount, \pgfmathaddtocount
-%
-% Results of parsing are truncated.
-%
-\def\pgfmathsetcount#1#2{%
- \expandafter\pgfmath@onquick#2\pgfmath@%
- {%
- #1#2\relax%
- }%
- {%
- \pgfmathparse{#2}%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- #1\pgfmathresult\relax\pgfmath@%
- }%
-}
-
-\def\pgfmathaddtocount#1#2{%
- \expandafter\pgfmath@onquick#2\pgfmath@%
- {%
- \advance#1 by#2\relax%
- }%
- {%
- \edef\pgfmath@addtocounttemp{\the#1}%
- \pgfmathparse{#2}%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- #1\pgfmathresult\relax\pgfmath@%
- \advance#1\pgfmath@addtocounttemp%
- }%
-}
-
-\def\pgfmathsetmacro#1#2{%
- \expandafter\pgfmath@onquick#2\pgfmath@%
- {%
- \begingroup%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \pgfmath@x#2pt\relax\pgfmath@%
- \edef#1{\pgfmath@tonumber{\pgfmath@x}}%
- \pgfmath@smuggleone{#1}
- \endgroup%
- }%
- {%
- \pgfmathparse{#2}%
- \edef#1{\pgfmathresult}%
- }%
-}
-
-\def\pgfmathtruncatemacro#1#2{%
- \expandafter\pgfmath@onquick#2\pgfmath@%
- {%
- \begingroup%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \c@pgfmath@counta#2\relax\pgfmath@%
- \edef#1{\the\c@pgfmath@counta}%
- \pgfmath@smuggleone{#1}
- \endgroup%
- }%
- {%
- \pgfmathparse{#2}%
- \edef#1{\pgfmathresult}%
- }%
-}
-
-% Check whether a given parameter starts with quick.
-%
-% The command should be followed by nonempty text, ending with
-% \pgfmath@ as a stop-token. Then should follow
-%
-% #1 = code to execute if text starts with +
-% #2 = code to execute if text does not
-%
-% Example:
-%
-% \pgfmath@onquick+0pt\pgfmath@{is quick}{is slow}
-
-\def\pgfmath@onquick{%
- \afterassignment\pgfmath@afterquick%
- \let\pgfmath@next=%
-}
-
-\def\pgfmath@afterquick#1\pgfmath@{%
- \ifx\pgfmath@next+%
- \expandafter\pgfmath@firstoftwo%
- \else%
- \expandafter\pgfmath@secondoftwo%
- \fi%
-} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathoperations.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathoperations.code.tex
deleted file mode 100644
index e5d1be605c1..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathoperations.code.tex
+++ /dev/null
@@ -1,781 +0,0 @@
-% Copyright 2007 by Mark Wibrow
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-% This file defines the mathematical functions and operators.
-%
-% Version 0.0 08/03/2007
-
-% This file defines the mathematical functions and operators.
-%
-% Adding/redefining extra operators/functions:
-%
-% Each operator/function XXX has two forms:
-%
-%
-% \pgfmathXXX#1... a public version which evaluates any
-% arguments passed to it and passes the
-% results on to...
-%
-% \pgfmathXXX@#1... a non-public version which performs
-% required calculation on arguments which
-% must have already been evaluated (i.e.
-% *without* dimensions).
-%
-% If a function XXX is to be included in the parser, it is
-% recommended, for consistency, that where possible, the
-% pgfmathparser file should define the macro \pgfmath@parseXXX.
-% The parser should (ideally) then call \pgfmathXXX@.
-%
-% It is recommend that the pgfmath versions of the pgf dimension
-% and count registers be used, i.e., \pgfmath@x for \pgfmath@x,
-% \c@pgfmath@counta for c@pgfmath@counta, and so on. These are currently
-% \let to their pgf equivalents, but it may be necessary to change
-% this.
-%
-% It is also recommened that all calculations (where necessary)
-% take place within a TeX group. \pgfmath@returnone#1 makes and
-% expanded version of #1 global and stores this in \pgfmathresult
-% after the group is ended.
-%
-
-\input pgfmathtrig.code.tex% Load the trig. stuff.
-\input pgfmathrnd.code.tex% Load the random stuff.
-
-
-% \pgfmathadd
-%
-% Add #1 and #2.
-%
-\def\pgfmathadd#1#2{%
- \pgfmathparse{#1}\edef\pgfmath@adda{\pgfmathresult}%
- \pgfmathparse{#2}\edef\pgfmath@addb{\pgfmathresult}%
- \pgfmathadd@{\pgfmath@adda}{\pgfmath@addb}}
-\def\pgfmathadd@#1#2{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \expandafter\pgfmath@y#2pt\relax%
- \advance\pgfmath@x by\pgfmath@y%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-% \pgfmathsubtract
-%
-% Subtract #2 from #1.
-%
-\def\pgfmathsubtract#1#2{%
- \pgfmathparse{#1}\edef\pgfmath@subtracta{\pgfmathresult}%
- \pgfmathparse{#2}\edef\pgfmath@subtractb{\pgfmathresult}%
- \pgfmathsubtract@{\pgfmath@subtracta}{\pgfmath@subtractb}}
-
-\def\pgfmathsubtract@#1#2{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \expandafter\pgfmath@y#2pt\relax%
- \advance\pgfmath@x by-\pgfmath@y%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-% \pgfmathmultiply
-%
-% Multiply #1 by #2.
-%
-\def\pgfmathmultiply#1#2{%
- \pgfmathparse{#1}\edef\pgfmath@multiplya{\pgfmathresult}%
- \pgfmathparse{#2}\edef\pgfmath@multiplyb{\pgfmathresult}%
- \pgfmathmultiply@{\pgfmath@multiplya}{\pgfmath@multiplyb}}
-\def\pgfmathmultiply@#1#2{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \expandafter\pgfmath@x#2\pgfmath@x%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-% \pgfmathdivide
-%
-% Divide #1 by #2.
-%
-\def\pgfmathdivide#1#2{%
- \pgfmathparse{#1}\edef\pgfmath@dividea{\pgfmathresult}%
- \pgfmathparse{#2}\edef\pgfmath@divideb{\pgfmathresult}%
- \pgfmathdivide@{\pgfmath@dividea}{\pgfmath@divideb}}
-\def\pgfmathdivide@#1#2{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- % If #2 is an integer use TeX arithmatic.
- \expandafter\pgfmath@xa#2pt\relax%
- \afterassignment\pgfmath@xa%
- \expandafter\c@pgfmath@counta\the\pgfmath@xa\relax%
- \ifdim\pgfmath@xa=0pt\relax%
- \ifnum\c@pgfmath@counta=0\relax%
- \pgfmath@error{Division by zero.}{}%
- \fi%
- \divide\pgfmath@x\c@pgfmath@counta%
- \else%
- \pgfmathreciprocal@{#2}%
- \pgfmath@x=\pgfmathresult\pgfmath@x%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-% \pgfmathgreaterthan
-%
-% 1.0 if #1 > #2. Otherwise 0.0
-%
-\def\pgfmathgreaterthan#1#2{%
- \pgfmathparse{#1}\edef\pgfmath@greaterthana{\pgfmathresult}%
- \pgfmathparse{#2}\edef\pgfmath@greaterthanb{\pgfmathresult}%
- \pgfmathgreaterthan@{\pgfmath@greaterthana}{\pgfmath@greaterthanb}}
-\def\pgfmathgreaterthan@#1#2{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \expandafter\pgfmath@y#2pt\relax%
- \advance\pgfmath@x-\pgfmath@y%
- \ifdim\pgfmath@x>0pt\relax%
- \pgfmath@x1pt\relax%
- \else%
- \pgfmath@x0pt\relax%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-% \pgfmathlessthan
-%
-% 1.0 if #1< #2. Otherwise 0.0
-%
-\def\pgfmathlessthan#1#2{%
- \pgfmathparse{#1}\edef\pgfmath@lessthana{\pgfmathresult}%
- \pgfmathparse{#2}\edef\pgfmath@lessthanb{\pgfmathresult}%
- \pgfmathlessthan@{\pgfmath@lessthana}{\pgfmath@lessthanb}}
-\def\pgfmathlessthan@#1#2{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \expandafter\pgfmath@y#2pt\relax%
- \advance\pgfmath@x-\pgfmath@y\relax%
- \ifdim\pgfmath@x<0pt\relax%
- \pgfmath@x1pt\relax%
- \else%
- \pgfmath@x0pt\relax%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-% \pgfmathequalto
-%
-% 1.0 if #1 = #2. Otherwise 0.0
-%
-\def\pgfmathequalto#1#2{%
- \pgfmathparse{#1}\edef\pgfmath@equaltoa{\pgfmathresult}%
- \pgfmathparse{#2}\edef\pgfmath@equaltob{\pgfmathresult}%
- \pgfmathadd@{\pgfmath@equaltoa}{\pgfmath@equaltob}}
-\def\pgfmathequalto@#1#2{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \expandafter\pgfmath@y#2pt\relax%
- \advance\pgfmath@x-\pgfmath@y%
- \ifdim\pgfmath@x=0pt\relax%
- \pgfmath@x1pt\relax%
- \else%
- \pgfmath@x0pt\relax%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-% \pgfmathreciprocal
-%
-% 1 / #1
-%
-\def\pgfmathreciprocal#1{%
- \pgfmathparse{#1}%
- \pgfmathreciprocal@{\pgfmathresult}}
-\def\pgfmathreciprocal@#1{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \ifdim\pgfmath@x=0pt\relax%
- \pgfmath@error{Division by zero.}{}%
- \fi%
- \edef\pgfmath@reciprocaltemp{\pgfmath@tonumber{\pgfmath@x}}%
- \expandafter\pgfmathreciprocal@@\pgfmath@reciprocaltemp00000\pgfmath@}
-\def\pgfmathreciprocal@@#1.#2#3#4#5#6#7\pgfmath@{%
- \c@pgfmath@counta#2#3#4#5#6\relax%
- % If the number is an integer, use TeX arithmatic.
- \ifnum\c@pgfmath@counta=0\relax%
- \pgfmath@x1pt\relax%
- \divide\pgfmath@x#1\relax%
- \else%
- \c@pgfmath@counta#1#2#3#4#5#6\relax%
- \c@pgfmath@countb1000000000\relax%
- \divide\c@pgfmath@countb\c@pgfmath@counta%
- \c@pgfmath@counta\c@pgfmath@countb%
- \divide\c@pgfmath@counta10000\relax%
- \pgfmath@x\c@pgfmath@counta pt\relax%
- \multiply\c@pgfmath@counta-10000\relax%
- \advance\c@pgfmath@countb\c@pgfmath@counta%
- \pgfmath@y\c@pgfmath@countb pt\relax%
- \pgfmath@y.1\pgfmath@y% Yes! This way is more accurate. Go figure...
- \pgfmath@y.1\pgfmath@y%
- \pgfmath@y.1\pgfmath@y%
- \pgfmath@y.1\pgfmath@y%
- \advance\pgfmath@x\pgfmath@y%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup
-}
-
-
-% \pgfmathabs
-%
-% Calculate |#1|
-%
-\def\pgfmathabs#1{%
- \pgfmathparse{#1}%
- \pgfmathabsolute@{\pgfmathresult}}
-\def\pgfmathabs@#1{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \ifdim\pgfmath@x<0pt\relax%
- \pgfmath@x=-\pgfmath@x%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-% \pgfmathmod
-%
-% Calculate #1 mod #2.
-%
-\def\pgfmathmod#1#2{%
- \pgfmathparse{#1}\edef\pgfmath@moda{\pgfmathresult}%
- \pgfmathparse{#2}\edef\pgfmath@modb{\pgfmathresult}%
- \pgfmathmod@{\pgfmath@mod@a}{\pgfmath@modb}%
-}
-\def\pgfmathmod@#1#2{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \pgfmath@xa\pgfmath@x%
- \expandafter\pgfmath@xb#2pt\relax%
- \c@pgfmath@counta=\pgfmath@xa%
- \c@pgfmath@countb=\pgfmath@xb%
- \divide\c@pgfmath@counta\c@pgfmath@countb%
- \multiply\pgfmath@xb\c@pgfmath@counta%
- \advance\pgfmath@x-\pgfmath@xb%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-% \pgfmathsqrt
-%
-% Square-root of #1.
-%
-%
-\def\pgfmathsqrt#1{%
- \pgfmathparse{#1}%
- \pgfmathsqrt{\pgfmathresult}}
-\def\pgfmathsqrt@#1{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \ifdim\pgfmath@x>9999pt\relax%
- \def\pgfmath@zeros{0}%
- \def\pgfmath@targetiterations{3}%
- \else%
- \ifdim\pgfmath@x>999pt\relax%
- \def\pgfmath@zeros{}%
- \def\pgfmath@targetiterations{2}%
- \else%
- \ifdim\pgfmath@x>99pt\relax%
- \def\pgfmath@zeros{0}%
- \def\pgfmath@targetiterations{2}%
- \else%
- \ifdim\pgfmath@x>9pt\relax%
- \def\pgfmath@zeros{}%
- \def\pgfmath@targetiterations{1}%
- \else%
- \ifdim\pgfmath@x<0pt\relax%
- \pgfmath@error{Cannot calculate the square-root of the negative number `#1'}{}%
- \else%
- \def\pgfmath@zeros{0}%
- \def\pgfmath@targetiterations{1}%
- \fi\fi\fi\fi\fi%
- \edef\pgfmath@temp{\pgfmath@zeros\pgfmath@tonumber{\pgfmath@x}}%
- \expandafter\pgfmath@sqrt@\pgfmath@temp\pgfmath@%
-}
-\def\pgfmath@sqrt@#1.#2\pgfmath@{\pgfmath@@sqrt@#1#2\pgfmath@empty\pgfmath@empty\pgfmath@}
-
-\def\pgfmath@@sqrt@#1#2{%
- \c@pgfmath@countb#1#2\relax%
- \ifnum\c@pgfmath@countb>35\relax%
- \ifnum\c@pgfmath@countb>63\relax%
- \ifnum\c@pgfmath@countb>80\relax%
- \c@pgfmath@counta9\relax%
- \else%
- \c@pgfmath@counta8\relax%
- \fi%
- \else%
- \ifnum\c@pgfmath@countb>48\relax%
- \c@pgfmath@counta7\relax%
- \else%
- \c@pgfmath@counta6\relax%
- \fi%
- \fi%
- \else%
- \ifnum\c@pgfmath@countb>15\relax%
- \ifnum\c@pgfmath@countb>24\relax%
- \c@pgfmath@counta5\relax%
- \else%
- \c@pgfmath@counta4\relax%
- \fi%
- \else%
- \ifnum\c@pgfmath@countb>3\relax%
- \ifnum\c@pgfmath@countb>8\relax%
- \c@pgfmath@counta3\relax%
- \else%
- \c@pgfmath@counta2\relax%
- \fi%
- \else%
- \ifnum\c@pgfmath@countb>0\relax%
- \c@pgfmath@counta1\relax%
- \else%
- \c@pgfmath@counta0\relax%
- \fi%
- \fi%
- \fi%
- \fi%
- \edef\pgfmath@root{\the\c@pgfmath@counta}%
- \edef\pgfmath@rootspecial{\the\c@pgfmath@counta}%
- \multiply\c@pgfmath@counta-\c@pgfmath@counta\relax%
- \advance\c@pgfmath@counta#1#2\relax%
- \edef\pgfmath@remainder{\the\c@pgfmath@counta}%
- \pgfmath@@@sqrt@%
-}
-
-\def\pgfmath@@@sqrt@#1#2{%
- \ifx\pgfmath@empty#1%
- \edef\pgfmath@remainder{\pgfmath@remainder00}%
- \def\pgfmath@tokens{\pgfmath@empty\pgfmath@empty}%
- \else%
- \ifx\pgfmath@empty#2%
- \edef\pgfmath@remainder{\pgfmath@remainder#10}%
- \def\pgfmath@tokens{\pgfmath@empty\pgfmath@empty}%
- \else%
- \edef\pgfmath@remainder{\pgfmath@remainder#1#2}%
- \def\pgfmath@tokens{}%
- \fi\fi%
- \c@pgfmath@counta\pgfmath@rootspecial\relax%
- \multiply\c@pgfmath@counta20\relax%
- \c@pgfmath@countb\c@pgfmath@counta%
- \multiply\c@pgfmath@countb6\relax%
- \advance\c@pgfmath@countb36\relax%
- \c@pgfmath@countc\c@pgfmath@counta\relax%
- \multiply\c@pgfmath@countc2\relax%
- \ifnum\c@pgfmath@countb>\pgfmath@remainder\relax%
- \advance\c@pgfmath@countb-\c@pgfmath@countc%
- \advance\c@pgfmath@countb-20\relax%
- \ifnum\c@pgfmath@countb>\pgfmath@remainder\relax%
- \advance\c@pgfmath@countb-\c@pgfmath@countc%
- \advance\c@pgfmath@countb-12\relax%
- \ifnum\c@pgfmath@countb>\pgfmath@remainder\relax%
- \advance\c@pgfmath@countb-\c@pgfmath@counta%
- \advance\c@pgfmath@countb-3\relax%
- \ifnum\c@pgfmath@countb>\pgfmath@remainder\relax%
- \def\pgfmath@digit{0}%
- \else%
- \def\pgfmath@digit{1}%
- \fi%
- \else%
- \advance\c@pgfmath@countb\c@pgfmath@counta%
- \advance\c@pgfmath@countb5\relax%
- \ifnum\c@pgfmath@countb>\pgfmath@remainder\relax%
- \def\pgfmath@digit{2}%
- \else%
- \def\pgfmath@digit{3}%
- \fi%
- \fi%
- \else%
- \advance\c@pgfmath@countb\c@pgfmath@counta%
- \advance\c@pgfmath@countb9\relax%
- \ifnum\c@pgfmath@countb>\pgfmath@remainder\relax%
- \def\pgfmath@digit{4}%
- \else%
- \def\pgfmath@digit{5}%
- \fi%
- \fi%
- \else%
- \advance\c@pgfmath@countb\c@pgfmath@countc%
- \advance\c@pgfmath@countb28\relax%
- \ifnum\c@pgfmath@countb>\pgfmath@remainder\relax%
- \advance\c@pgfmath@countb-\c@pgfmath@counta%
- \advance\c@pgfmath@countb-15\relax%
- \ifnum\c@pgfmath@countb>\pgfmath@remainder\relax%
- \def\pgfmath@digit{6}%
- \else%
- \def\pgfmath@digit{7}%
- \fi%
- \else%
- \advance\c@pgfmath@countb\c@pgfmath@counta%
- \advance\c@pgfmath@countb17\relax%
- \ifnum\c@pgfmath@countb>\pgfmath@remainder\relax%
- \def\pgfmath@digit{8}%
- \else%
- \def\pgfmath@digit{9}%
- \fi%
- \fi%
- \fi%
- \edef\pgfmath@rootspecial{\pgfmath@rootspecial\pgfmath@digit}%
- \advance\c@pgfmath@counta\pgfmath@digit\relax%
- \multiply\c@pgfmath@counta-\pgfmath@digit\relax%
- \advance\c@pgfmath@counta\pgfmath@remainder\relax%
- \edef\pgfmath@remainder{\the\c@pgfmath@counta}%
- \c@pgfmath@counta\pgfmath@targetiterations\relax%
- \advance\c@pgfmath@counta-1\relax%
- \edef\pgfmath@targetiterations{\the\c@pgfmath@counta}%
- \ifnum\c@pgfmath@counta=0\relax%
- \edef\pgfmath@root{\pgfmath@root.\pgfmath@digit}%
- \else%
- \edef\pgfmath@root{\pgfmath@root\pgfmath@digit}%
- \fi%
- \ifnum\c@pgfmath@counta=-4\relax%
- \let\pgfmath@next\pgfmath@sqrt@end%
- \else%
- \let\pgfmath@next\pgfmath@@@sqrt@%
- \fi%
- \expandafter\pgfmath@next\pgfmath@tokens%
-}
-
-\def\pgfmath@sqrt@end#1\pgfmath@{%
- \edef\pgfmathresult{\pgfmath@root}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup}
-
-% \pgfmathpow
-%
-% Calculates #1 ^ #2
-%
-% #2 is expected to be an integer.
-%
-\def\pgfmathpow#1#2{%
- \pgfmathparse{#1}\edef\pgfmath@powera{\pgfmathresult}%
- \pgfmathparse{#2}\edef\pgfmath@powerb{\pgfmathresult}%
- \pgfmathpow@{\pgfmath@powera}{\pgfmath@powerb}}
-\def\pgfmathpow@#1#2{%
- \begingroup%
- \expandafter\pgfmath@xa#1pt\relax%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgfmath@counta#2\relax\pgfmath@
- % If #2 is negative, take the reciprocal of #1
- % and the absolute value of #2, and carry on.
- %
- \ifnum\c@pgfmath@counta<0\relax%
- \c@pgfmath@counta-\c@pgfmath@counta%
- \pgfmathreciprocal@{#1}%
- \pgfmath@xa\pgfmathresult pt\relax%
- \fi%
- \pgfmath@x=1pt\relax%
- \pgfmathloop%
- \ifnum\c@pgfmath@counta>0\relax%
- \ifodd\c@pgfmath@counta%
- \pgfmath@x\pgfmath@tonumber{\pgfmath@x}\pgfmath@xa%
- \fi
- \ifnum\c@pgfmath@counta>1\relax%
- \pgfmath@xa=\pgfmath@tonumber{\pgfmath@xa}\pgfmath@xa%
- \fi%
- \divide\c@pgfmath@counta by 2\relax%
- \repeatpgfmathloop%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-
-% \pgfmathround
-%
-% Half-up rounding.
-%
-\def\pgfmathround#1{%
- \pgfmathparse{#1}%
- \pgfmathround@{\pgfmathresult}}
-\def\pgfmathround@#1{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \afterassignment\pgfmath@xa%
- \expandafter\c@pgfmath@counta\the\pgfmath@x\relax%
- \pgfmath@xb\pgfmath@x%
- \ifdim\pgfmath@xb<0pt\relax%
- \ifdim\pgfmath@xa<0.5pt\relax%
- \else%
- \advance\c@pgfmath@counta-1\relax%
- \fi%
- \else%
- \ifdim\pgfmath@xa<0.5pt\relax%
- \else%
- \advance\c@pgfmath@counta1\relax%
- \fi%
- \fi%
- \pgfmath@returnone\c@pgfmath@counta%
- \endgroup%
-}%
-
-% \pgfmathfloor
-%
-% Floor function.
-%
-\def\pgfmathfloor#1{%
- \pgfmathparse{#1}%
- \expandafter\pgfmathfloor@\expandafter{\pgfmathresult}}
-\def\pgfmathfloor@#1{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@%
- \pgfmath@x\c@pgfmath@counta pt\relax%
- \pgfmath@returnone\pgfmath@x%
- \endgroup
-}%
-
-% \pgfmathceil
-%
-% Ceiling function.
-%
-\def\pgfmathceil#1{%
- \pgfmathparse{#1}%
- \expandafter\pgfmathceil@\expandafter{\pgfmathresult}}
-\def\pgfmathceil@#1{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@%
- \pgfmath@y\pgfmath@x%
- \advance\pgfmath@y-\c@pgfmath@counta pt\relax%
- \pgfmath@x\c@pgfmath@counta pt\relax%
- \ifdim\pgfmath@y>0pt\relax%
- \advance\pgfmath@x1pt\relax%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}%
-
-% \pgfmathexp
-%
-% A Maclaurens expansion for e^#1.
-% 0 <= #1 < ln(16384).
-%
-\def\pgfmathexp#1{%
- \pgfmathparse{#1}%
- \expandafter\pgfmathexp@\expandafter{\pgfmathresult}}
-\def\pgfmathexp@#1{%
- \begingroup%
- \pgfmath@x1pt\relax%
- \pgfmath@xa1pt\relax%
- \pgfmath@xb\pgfmath@x%
- \pgfmathloop%
- \pgfmath@xc\pgfmathcounter pt\relax%
- \c@pgfmath@counta\pgfmath@xc%
- \divide\c@pgfmath@counta65536\relax%
- \pgfmath@xc1pt\relax%
- \divide\pgfmath@xc\c@pgfmath@counta%
- \pgfmath@xa\pgfmath@tonumber{\pgfmath@xc}\pgfmath@xa%
- \expandafter\pgfmath@xa#1\pgfmath@xa%
- \advance\pgfmath@x\pgfmath@xa%
- \ifdim\pgfmath@x=\pgfmath@xb%
- \else%
- \pgfmath@xb\pgfmath@x%
- \repeatpgfmathloop%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-
-
-% \pgfmathvectorlength
-%
-% Calcluate the Eulidean length of a 2D vector.
-%
-% This based on polynomial approximation co-efficents
-% contributed by Rouben Rostamian.
-%
-% #1 - the x component of the vector.
-% #2 - the y component of the vector.
-%
-% P(x) = c0 + x^2 * (c1 + x^2 * (c2 + x^2 * ( c3 + c4 * x^2)))
-\def\pgfmath@cE{-0.01019}
-\def\pgfmath@cD{0.04453}
-\def\pgfmath@cC{-0.11951}
-\def\pgfmath@cB{0.49936}
-\def\pgfmath@cA{1.00001}
-
-\def\pgfmathveclen#1#2{%
- \pgfmathparse{#1}\edef\pgfmath@vecx{\pgfmathresult}%
- \pgfmathparse{#2}\edef\pgfmath@vecy{\pgfmathresult}%
- \pgfmathveclen@{\pgfmath@vecx}{\pgfmath@vecy}%
-}
-\def\pgfmathveclen@#1#2{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \expandafter\pgfmath@y#2pt\relax%
- \pgfmath@xa\pgfmath@x%
- \ifdim\pgfmath@xa=0pt\relax%
- \pgfmath@xa\pgfmath@y%
- \fi%
- \ifdim\pgfmath@xa=0pt\relax%
- \else%
- \ifdim\pgfmath@x<0pt\relax\pgfmath@x-\pgfmath@x\fi%
- \ifdim\pgfmath@y<0pt\relax\pgfmath@y-\pgfmath@y\fi%
- \ifdim\pgfmath@x>\pgfmath@y%
- \pgfmath@xa\pgfmath@x%
- \pgfmath@x\pgfmath@y%
- \pgfmath@y\pgfmath@xa%
- \fi%
- % We use a scaling factor to reduce errors.
- \ifdim\pgfmath@y>10000pt\relax%
- \c@pgfmath@counta1500\relax%
- \else%
- \ifdim\pgfmath@y>1000pt\relax%
- \c@pgfmath@counta150\relax%
- \else%
- \ifdim\pgfmath@y>100pt\relax%
- \c@pgfmath@counta50\relax%
- \else%
- \c@pgfmath@counta1\relax%
- \fi%
- \fi%
- \fi%
- \divide\pgfmath@x by\c@pgfmath@counta\relax%
- \divide\pgfmath@y by\c@pgfmath@counta\relax%
- \pgfmathreciprocal@{\pgfmath@tonumber{\pgfmath@y}}%
- \pgfmath@x=\pgfmathresult\pgfmath@x%
- \pgfmath@xa=\pgfmath@tonumber{\pgfmath@x}\pgfmath@x%
- \edef\pgfmath@xsq{\pgfmath@tonumber{\pgfmath@xa}}%
- \pgfmath@x=\pgfmath@cE\pgfmath@xa%
- \advance\pgfmath@x by\pgfmath@cD pt\relax%
- \pgfmath@x=\pgfmath@xsq\pgfmath@x%
- \advance\pgfmath@x by\pgfmath@cC pt\relax%
- \pgfmath@x=\pgfmath@xsq\pgfmath@x%
- \advance\pgfmath@x by\pgfmath@cB pt\relax%
- \pgfmath@x=\pgfmath@xsq\pgfmath@x%
- \advance\pgfmath@x by\pgfmath@cA pt\relax%
- \ifdim\pgfmath@y<0pt\relax%
- \pgfmath@y=-\pgfmath@y%
- \fi%
- \pgfmath@x=\pgfmath@tonumber{\pgfmath@y}\pgfmath@x%
- % Invert the scaling factor.
- \multiply\pgfmath@x by\c@pgfmath@counta\relax%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-% \pgfmathmax
-%
-% Return the maximum of #1 or #2
-%
-\def\pgfmathmax#1#2{%
- \pgfmathparse@{#1}\edef\pgfmath@firstoperand{\pgfmathresult}%
- \pgfmathparse@{#2}\edef\pgfmath@secondoperand{\pgfmathresult}%
- \pgfmathmax@{\pgfmath@firstoperand}{\pgfmath@secondoperand}}
-\def\pgfmathmax@#1#2{%
- \begingroup
- \expandafter\pgfmath@x#1pt\relax%
- \expandafter\pgfmath@y#2pt\relax%
- \ifdim\pgfmath@x>\pgfmath@y%
- \pgfmath@returnone\pgfmath@x%
- \else%
- \pgfmath@returnone\pgfmath@y%
- \fi%
- \endgroup}
-
-% \pgfmathmax
-%
-% Return the minimim of #1 or #2
-%
-\def\pgfmathmin#1#2{%
- \pgfmathparse@{#1}\edef\pgfmath@firstoperand{\pgfmathresult}%
- \pgfmathparse@{#2}\edef\pgfmath@secondoperand{\pgfmathresult}%
- \pgfmathmin@{\pgfmath@firstoperand}{\pgfmath@secondoperand}}
-\def\pgfmathmin@#1#2{%
- \begingroup
- \expandafter\pgfmath@x#1pt\relax%
- \expandafter\pgfmath@y#2pt\relax%
- \ifdim\pgfmath@x<\pgfmath@y%
- \pgfmath@returnone\pgfmath@x%
- \else%
- \pgfmath@returnone\pgfmath@y%
- \fi%
- \endgroup%
-}
-
-% \pgfmathscientific
-%
-% Return the value of #1e#2
-%
-% e.g. \pgfmathscientific{1.23456789123}{4}
-%
-% defines \pgfmathresult as 12345.67891
-%
-% NB This arguments *are not parsed*, as the long mantissa would be lost.
-%
-\def\pgfmathscientific#1#2{%
- \begingroup%
- \edef\pgfmath@sci@exponent{#2}%
- \pgfmath@x#1pt\relax%
- \ifdim\pgfmath@x<0pt\relax%
- \pgfmath@x-\pgfmath@x%
- \edef\pgfmath@sci@sign{-}%
- \edef\pgfmath@temp{\pgfmath@gobbleone#1}%
- \else%
- \edef\pgfmath@sci@sign{+}%
- \edef\pgfmath@temp{#1}%
- \fi%
- \expandafter\pgfmath@scientific@@\pgfmath@temp00000000000\pgfmath@}
-
-\def\pgfmath@scientific@@#1.#2#3#4#5#6{%
- \edef\pgfmath@sci@int{#1}%
- \edef\pgfmath@sci@mantissaA{#2#3#4#5#6}%
- \pgfmath@scientific@@@}
-
-\def\pgfmath@scientific@@@#1#2#3#4#5#6\pgfmath@{%
- \edef\pgfmath@sci@mantissaB{#1#2#3#4#5}%
- \c@pgfmath@counta\pgfmath@sci@exponent\relax%
- \c@pgfmath@countb\c@pgfmath@counta%
- \ifnum\c@pgfmath@counta<0\relax%
- \c@pgfmath@counta-\c@pgfmath@counta%
- \fi%
- \pgfmathpow@{10}{\the\c@pgfmath@counta}%
- \afterassignment\pgfmath@gobbletilpgfmath@
- \c@pgfmath@countc\pgfmathresult\relax\pgfmath@
- \edef\pgfmath@sci@factor{\the\c@pgfmath@countc}%
- \ifnum\c@pgfmath@countb<0\relax%
- % xE-y: easy...
- \pgfmath@x\pgfmath@sci@int.\pgfmath@sci@mantissaA pt\relax%
- \divide\pgfmath@x\pgfmath@sci@factor\relax%
- \else%
- % xE+y:
- % Must do this way so as not lose digits in a long mantissa. Sigh...
- \c@pgfmath@counta\pgfmath@sci@int%
- \c@pgfmath@countb\pgfmath@sci@mantissaA%
- \multiply\c@pgfmath@counta\pgfmath@sci@factor\relax%
- \multiply\c@pgfmath@countb\pgfmath@sci@factor\relax%
- \c@pgfmath@countc\c@pgfmath@countb%
- \divide\c@pgfmath@countb100000\relax%
- \advance\c@pgfmath@counta\c@pgfmath@countb%
- \multiply\c@pgfmath@countb100000\relax%
- \advance\c@pgfmath@countc-\c@pgfmath@countb%
- \c@pgfmath@countb\pgfmath@sci@mantissaB\relax%
- \multiply\c@pgfmath@countb\pgfmath@sci@factor\relax%
- \divide\c@pgfmath@countb100000\relax%
- \advance\c@pgfmath@countc\c@pgfmath@countb%
- \advance\c@pgfmath@countc100000\relax%
- \edef\pgfmath@sci@result{\pgfmath@sci@sign\the\c@pgfmath@counta.\expandafter\pgfmath@gobbleone\the\c@pgfmath@countc pt}%
- \pgfmath@x\pgfmath@sci@result\relax%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
deleted file mode 100644
index 809de3879ff..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
+++ /dev/null
@@ -1,912 +0,0 @@
-% This file parses/evaluates a decimal expression.
-%
-% (c) 2007 Mark Wibrow
-%
-% but subject to the LaTeX Project Public License,
-% (http://www.latex-project.org/lppl.txt)
-%
-% and the GNU Public License,
-% (http://www.gnu.org/licenses/gpl.txt)
-
-% \pgfmathparse, \pgfmathqparse
-%
-% Evaluates a decimal expression.
-%
-% #1 - the expression.
-%
-% returns
-%
-% x = the result as a dimension.
-%
-% E.g.
-% \pgfmathparse{3pt*2cm+1.5}
-% \pgfmathqparse{3pt*2cm+1.5pt}
-%
-% Every number in \pgfmathqparse *must*
-% specify a unit.
-%
-\newif\ifpgfmath@quickparse
-
-\def\pgfmathparse{%
- \pgfmath@quickparsefalse%
- \pgfmathparse@}
-
-\def\pgfmathqparse{%
- \pgfmath@quickparsetrue%
- \pgfmathparse@}
-
-\def\pgfmathparse@#1{%
- \begingroup%
- % Reinstall correct font, so that dimensions like 1em are correct
- \pgfutil@selectfont%
- \edef\pgfmath@temp{#1}%
- \pgfmath@resetparsingparameters%
- \global\pgfmathunitsdeclaredfalse%
- \ifpgfmath@quickparse%
- \let\pgfmath@parseoperand\pgfmath@quickparseoperand%
- \else%
- \let\pgfmath@parseoperand\pgfmath@parseoperand%
- \fi%
- \let\pgfmath@parsepostgroup\pgfmath@parseoperator%
- \expandafter\pgfmath@parse@\pgfmath@temp @@@@@@@@@@@\pgfmath@empty}
-
-
-% \pgfmath@resetparsingparameters
-%
-% Reset the stack at the begining of the parse/group.
-%
-\def\pgfmath@resetparsingparameters{%
- \pgfmath@stack{\pgfmath@empty\pgfmath@empty\pgfmath@empty\pgfmath@empty}%
- \def\pgfmath@stacknextoperator{\pgfmath@empty}% Will not work with \let
-}
-% \pgfmath@parse@
-%
-% Start parsing. Expect one of
-% 1) the end of the parse
-% 2) the start of a group
-% 3) a (possible) operand.
-%
-\def\pgfmath@parse@#1{%
- \def\pgfmath@token{}%
- \ifx#1@%
- \let\pgfmath@parsenext\pgfmath@endparse%
- \else%
- \ifx#1(%
- \let\pgfmath@parsenext\pgfmath@startparsegroup%
- \else%
- \edef\pgfmath@token{#1}%
- \let\pgfmath@parsenext\pgfmath@parseoperand%
- \fi\fi%
- \pgfmath@parsenext%
-}
-
-% If no TeX units are declared *at any point* in the parse
-% the result is scaled by \pgfmathresultunitscale.
-\newif\ifpgfmathunitsdeclared
-\def\pgfmathsetresultunitscale#1{\def\pgfmathresultunitscale{#1}}
-\def\pgfmathresultunitscale{1}
-
-% \pgfmath@endparse
-%
-% Everything stops here.
-%
-\def\pgfmath@endparse#1\pgfmath@empty{%
- \pgfmath@processalloperations%
- \pgfmath@stackpop{\pgfmathresult}%
- \begingroup%
- \ifpgfmathunitsdeclared%
- \pgfmath@x1pt\relax%
- \else%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \pgfmath@x\pgfmathresultunitscale pt\relax\pgfmath@%
- \fi%
- \expandafter\pgfmath@x\pgfmathresult\pgfmath@x%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
- \pgfmath@smuggleone{\pgfmathresult}%
- \endgroup%
-}
-
-% \pgfmath@startparsegroup
-%
-% When opening ( is scanned start a new group.
-%
-\def\pgfmath@startparsegroup{%
- \begingroup%
- \let\pgfmath@parsepostgroup\pgfmath@parseoperator%
- \pgfmath@resetparsingparameters%
- \pgfmath@parse@}
-
-% \pgfmath@endparsegroup
-%
-% When closing ) is scanned, processes all waiting
-% operations (within the group) and close the group.
-%
-\def\pgfmath@endparsegroup{%
- \pgfmath@processalloperations%
- \pgfmath@stackpop{\pgfmathresult}%
- \expandafter\pgfmath@x\pgfmathresult pt\relax%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
- \pgfmath@parsepostgroup%
-}
-
-% \pgfmath@parseoperator
-%
-% An operator is expected here.
-% Or the end of the parse or parse group.
-%
-\def\pgfmath@parseoperator#1{%
- \def\pgfmath@token{}%
- % Push the operand in \pgfmathresult on to the stack.
- \expandafter\pgfmath@stackpushoperand\expandafter{\pgfmathresult}%
- \ifx#1@%
- \let\pgfmath@parsenext\pgfmath@endparse%
- \else%
- \ifx#1+%
- \let\pgfmath@parsenext\pgfmath@parseadd%
- \else%
- \ifx#1-%
- \let\pgfmath@parsenext\pgfmath@parsesubtract%
- \else%
- \ifx#1*%
- \let\pgfmath@parsenext\pgfmath@parsemultiply%
- \else%
- \ifx#1/%
- \let\pgfmath@parsenext\pgfmath@parsedivide%
- \else
- \ifx#1)%
- \let\pgfmath@parsenext\pgfmath@endparsegroup%
- \else%
- \ifx#1r%
- \let\pgfmath@parsenext\pgfmath@parseradians%
- \else%
- \ifx#1>%
- \let\pgfmath@parsenext\pgfmath@parsegreaterthan%
- \else%
- \ifx#1<%
- \let\pgfmath@parsenext\pgfmath@parselessthan%
- \else%
- \if#1=%
- \let\pgfmath@parsenext\pgfmath@parseequalto%
- \else%
- \if#1^%
- \let\pgfmath@parsenext\pgfmath@parsepower%
- \else%
- \pgfmath@error{Unknown operator `#1'}%
- \let\pgfmath@parsenext\relax%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
- \pgfmath@parsenext%
-}
-
-% Use a \toks register as a stack.
-\newtoks\pgfmath@stack
-
-% \pgfmath@stackpushoperator
-%
-% Push an operator (actually its macro e.g., \pgfmathadd@)
-% on to the stack. And keep track of it using the macro
-% \pgfmath@stacknextoperator.
-%
-\def\pgfmath@stackpushoperator#1{%
- \edef\pgfmath@temp{\noexpand#1\the\pgfmath@stack}%
- \expandafter\pgfmath@stack\expandafter{\pgfmath@temp}%
- \def\pgfmath@stacknextoperator{#1}}% <- Must \def. Cannot \let.
-
-% \pgfmath@stackpushoperand
-%
-% Push an operand (i.e. a number) on the stack. It is
-% put within a TeX group to make popping a lot simpler.
-%
-\def\pgfmath@stackpushoperand#1{%
- \edef\pgfmath@temp{{#1}\the\pgfmath@stack}%
- \expandafter\pgfmath@stack\expandafter{\pgfmath@temp}%
-}
-
-% \pgfmath@stackpeek
-%
-% Peek (i.e. without removal) at the top of the stack.
-%
-\def\pgfmath@stackpeek{\expandafter\pgfmath@stackpeek@\the\pgfmath@stack\pgfmath@}
-\def\pgfmath@stackpeek@#1#2\pgfmath@{#1}%
-
-% \pgfmath@stackpop
-%
-% Pop (i.e. remove) the top of the stack into #1.
-%
-\def\pgfmath@stackpop#1{\expandafter\pgfmath@stackpop@\expandafter#1\the\pgfmath@stack\pgfmath@}
-\def\pgfmath@stackpop@#1#2#3\pgfmath@{\edef#1{#2}\pgfmath@stack{#3}}%
-
-% \pgfmath@stackpopoperation
-%
-% Remove and perform an operation from the stack.
-%
-\def\pgfmath@stackpopoperation{%
- \expandafter\pgfmath@stackpopoperation@\the\pgfmath@stack\pgfmath@%
-}
-\def\pgfmath@stackpopoperation@#1#2#3#4#5\pgfmath@{%
- \ifx\pgfmath@empty#1\relax%
- \pgfmath@stack{\pgfmath@empty\pgfmath@empty\pgfmath@empty\pgfmath@empty}%
- \else%
- \ifx\pgfmath@empty#2\relax%
- \pgfmath@stack{{#1}\pgfmath@empty\pgfmath@empty\pgfmath@empty\pgfmath@empty}%
- \else%
- #2{#3}{#1}%
- \pgfmath@stack{#4#5}%
- \expandafter\pgfmath@stackpushoperand\expandafter{\pgfmathresult}%
- \fi\fi%
- \def\pgfmath@stacknextoperator{#4}}
-
-% \pgfmath@processalloperations
-%
-% Process all operation in the stack. The
-% overall result is at the top of the stack.
-%
-\def\pgfmath@processalloperations{%
- \expandafter\pgfutil@in@\pgfmath@stacknextoperator{\pgfmath@empty}%
- \ifpgfutil@in@%
- \let\pgfmath@processnext\relax%
- \else%
- \pgfmath@stackpopoperation%
- \let\pgfmath@processnext\pgfmath@processalloperations%
- \fi%
- \pgfmath@processnext}
-
-% \pgfmath@processoperationsuntil
-%
-% Process operations in the stack, until the specified
-% operation/s is/are encountered. The overall result is
-% at the top of the stack.
-%
-\def\pgfmath@processoperationsuntil#1{%
- \expandafter\pgfutil@in@\pgfmath@stacknextoperator{#1\pgfmath@empty}%
- \ifpgfutil@in@%
- \let\pgfmath@processnext\pgfmath@processoperationsuntil@end%
- \else%
- \pgfmath@stackpopoperation%
- \let\pgfmath@processnext\pgfmath@processoperationsuntil%
- \fi%
- \pgfmath@processnext{#1}}
-\def\pgfmath@processoperationsuntil@end#1{}
-
-
-% OK. Now the operators are parsed.
-% These correspond to the + - / * ^ < > = mod and r operators
-%
-\def\pgfmath@parseadd{%
- % If no operator has been assigned (i.e. + is the first operator scanned),
- % do nothing, except add addition to the stack.
- \ifx\pgfmath@stacknextoperator\pgfmath@empty%
- \else%
- % Empty the process stack up to any inequalities.
- \pgfmath@processoperationsuntil{\pgfmathequalto@\pgfmathlessthan@\pgfmathgreaterthan@}%
- \fi%
- \pgfmath@stackpushoperator{\pgfmathadd@}%
- \pgfmath@parse@}
-
-\def\pgfmath@parsesubtract{%
- % If no operator has been assigned (i.e. - is the first operator scanned),
- % do nothing, except add subtract to the stack.
- \ifx\pgfmath@stacknextoperator\pgfmath@empty%
- \else%
- % Empty the process stack up to any inequalities.
- \pgfmath@processoperationsuntil{\pgfmathequalto@\pgfmathlessthan@\pgfmathgreaterthan@}%
- \fi%
- \pgfmath@stackpushoperator{\pgfmathsubtract@}%
- \pgfmath@parse@}
-
-
-\def\pgfmath@parsemultiply{%
- % If no operator has been assigned (i.e. * is the first operator scanned),
- % do nothing, except push multiply onto the stack.
- \ifx\pgfmath@stacknextoperator\pgfmath@empty%
- \else%
- % Process all operations up to inequalites or addition/subtraction
- \pgfmath@processoperationsuntil{\pgfmathequalto@\pgfmathlessthan@\pgfmathgreaterthan@%
- \pgfmathadd@\pgfmathsubtract@}%
- \fi%
- \pgfmath@stackpushoperator{\pgfmathmultiply@}%
- \pgfmath@parse@}
-
-\def\pgfmath@parsedivide{%
- % If no operator has been assigned (i.e. / is the first operator scanned),
- % do nothing, except push divide onto the stack.
- \ifx\pgfmath@stacknextoperator\pgfmath@empty%
- \else%
- % Process all operations up to inequalites or addition/subtraction
- \pgfmath@processoperationsuntil{\pgfmathequalto@\pgfmathlessthan@\pgfmathgreaterthan@%
- \pgfmathadd@\pgfmathsubtract@}%
- \fi%
- \pgfmath@stackpushoperator{\pgfmathdivide@}%
- \pgfmath@parse@}
-
-\def\pgfmath@parsegreaterthan{%
- % On scanning an equality/inequality operator everything up to
- % (but not including) the operator is evaluated...
- \pgfmath@processalloperations%
- % ...and the operation pushed onto the stack.
- \pgfmath@stackpushoperator{\pgfmathgreaterthan@}%
- \pgfmath@parse@}
-
-\def\pgfmath@parselessthan{%
- \pgfmath@processalloperations%
- \pgfmath@stackpushoperator{\pgfmathlessthan@}%
- \pgfmath@parse@}
-
-\def\pgfmath@parseequalto={%
- \pgfmath@processalloperations%
- \pgfmath@stackpushoperator{\pgfmathequalto@}%
- \pgfmath@parse@}
-
-\def\pgfmath@parsepower{%
- % Easy, just push power onto the stack.
- \pgfmath@stackpushoperator{\pgfmathpow@}%
- \pgfmath@parse@}
-
-\def\pgfmath@parseradians{%
- % Actually this is a post-fix function...
- \ifx\pgfmath@primaryoperation\pgfmath@empty%
- \else%
- \pgfmath@processoperationsuntil{\pgfmathequalto@\pgfmathlessthan@\pgfmathgreaterthan@%
- \pgfmathadd@\pgfmathsubtract@}%
- \fi%
- \pgfmath@stackpop{\pgfmath@temp}%
- \pgfmathdeg@{\pgfmath@temp}%
- % ...so processing returns to \pgfmath@parseoperator
- \pgfmath@parseoperator}
-
-\newcount\c@pgfmath@parsecounta
-\newcount\c@pgfmath@parsecountb
-\newcount\c@pgfmath@parsecountc
-\newdimen\pgfmath@parsex
-
-% \pgfmath@quickparseoperand
-%
-% An operand can *only* be a dimension.
-%
-\def\pgfmath@quickparseoperand{%
- \afterassignment\pgfmath@quickparseoperand@%
- \pgfmath@parsex\pgfmath@token}
-\def\pgfmath@quickparseoperand@{%
- \edef\pgfmathresult{\pgfmath@tonumber{\pgfmath@parsex}}
- \pgfmath@parseoperator%
-}
-
-% \pgfmath@parseoperand
-%
-% An operand can be an ASCII number (with or without dimensions, with
-% or without a decimal point), a TeX register (count, dimen or skip,
-% which may have expanded with \the), or a function e.g. sin(X).
-%
-% It is assumed that after \edef-ing, the only unexpanded tokens are registers.
-%
-\def\pgfmath@parseoperand{%
- \def\pgfmath@sign{}%
- \expandafter\pgfmath@parseoperandsign\pgfmath@token}
-\def\pgfmath@parseoperandsign#1{%
- \pgfmath@in@#1{-+}%
- \ifpgfmath@in@
- % I suppose there are (silly) people who might complain if
- % they can't say 2---5, or 3+-----7. Just for them...
- \edef\pgfmath@sign{\pgfmath@sign#1}%
- \expandafter\pgfmath@parseoperandsign%
- \else%
- \expandafter\pgfmath@parsenumberorfunction\expandafter#1%
- \fi%
-}
-
-
-\newif\ifpgfmath@dimen@
-
-\def\pgfmath@ifregisterdimen@#1\pgfmath@{%
- \pgfmath@in@{p}{#1}%
- \ifpgfmath@in@%
- \pgfmath@dimen@true%
- \else%
- \pgfmath@dimen@false%
- \fi}
-
-
-\def\pgfmath@parsenumberorfunction#1{%
- \let\pgfmath@parsenext\pgfmath@parsenumberorfunction@simple%
- \ifx#1\wd\let\pgfmath@parsenext\pgfmath@boxdimen\fi%
- \ifx#1\ht\let\pgfmath@parsenext\pgfmath@boxdimen\fi%
- \ifx#1\dp\let\pgfmath@parsenext\pgfmath@boxdimen\fi%
- \pgfmath@parsenext#1%
-}
-
-\def\pgfmath@boxdimen#1#2{%
- \pgfmath@parsex=#1#2%
- \edef\pgfmathresult{\pgfmath@tonumber{\pgfmath@parsex}}%
- \global\pgfmathunitsdeclaredtrue% a dimension has units
- \pgfmath@parseoperator%
-}
-
-\def\pgfmath@parsenumberorfunction@simple#1{%
- \expandafter\ifcat#1\relax%
- % So, a TeX register.
- \afterassignment\pgfmath@ifregisterdimen@%
- \pgfmath@parsex\pgfmath@sign#1pt\relax\pgfmath@%
- \ifpgfmath@dimen@%
- % A dimension! So stop scanning operand here.
- \edef\pgfmathresult{\pgfmath@tonumber{\pgfmath@parsex}}%
- \global\pgfmathunitsdeclaredtrue% a dimension has units
- \def\pgfmath@temp{}%
- \let\pgfmath@parsenext\pgfmath@parseoperator%
- \else%
- % A count! Expand it, but carry on as usual as it might
- % be immediately followed by a dimension.
- \ifdim\pgfmath@parsex<0pt\relax%
- \edef\pgfmath@sign{\pgfmath@sign-}%
- \pgfmath@parsex-\pgfmath@parsex%
- \fi%
- \edef\pgfmath@temp{\pgfmath@tonumber{\pgfmath@parsex}}%
- \let\pgfmath@parsenext\pgfmath@parsenumberorfunction@%
- \fi%
- \else%
- % Could be a number or a function...?
- \edef\pgfmath@temp{#1}%
- \let\pgfmath@parsenext\pgfmath@parsenumberorfunction@%
- \fi%
- \expandafter\pgfmath@parsenext\pgfmath@temp%
-}%
-
-\def\pgfmath@parsenumberorfunction@#1{%
- \pgfmath@in@{#1}{.0123456789}%
- \ifpgfmath@in@%
- \let\pgfmath@parsenext\pgfmath@parsenumber%
- \else%
- \let\pgfmath@parsenext\pgfmath@parsefunction%
- \fi%
- \pgfmath@parsenext#1%
-}%
-
-\def\pgfmath@parsenumber{%
- % Consider the number 3.14159
- % 3 is parsed by assignment to a, then '.' is absorbed and 14159
- % parsed by assignement to b (actually b=114159, see below).
- \c@pgfmath@parsecountc0\relax%
- \afterassignment\pgfmath@parsedecimalpoint%
- \c@pgfmath@parsecounta0}
-
-\def\pgfmath@parsedecimalpoint#1{%
- \ifx#1.% Is there a decimal point? If not, see if there are any units.
- \let\pgfmath@parsenext\pgfmath@parsemantissa%
- \else%
- \c@pgfmath@parsecountb10\relax% The first digit of b is gobbled (see below).
- \let\pgfmath@parsenext\pgfmath@parseunits%
- \fi%
- \pgfmath@parsenext#1}
-
-
-
-% We would like to assign the following number (which is the mantisse)
-% to a number. However, for a very long mantisse as in 3.141592653589793238462643
-% this will fail since the number becomes too large.
-%
-% Because of this, we have to do some ``magic'': We scan 9 tokens and
-% then do an assignment with a guard after 9 tokens so that the
-% assigment cannot fail.
-%
-\def\pgfmath@parsemantissa.#1#2#3#4#5#6#7#8#9{%
- \afterassignment\pgfmath@checkforguard%
- % Consider the number: 2.005
- % 2 is assigned to a, but b will be assigned 5, which is *not right*.
- % So using 1 here hereresults in b=1005. The first digit is then
- % gobbled later, when expanded with \the.
- \c@pgfmath@parsecountb1#1#2#3#4#5#6#7#8#9\relax}%
-
-\def\pgfmath@checkforguard{%
- \pgfutil@ifnextchar\relax%
- {%
- % Ok, this is a looong mantisse. Start gobbling all following
- % numbers
- \pgfmath@gobblemantisse%
- }%
- {%
- \pgfmath@removeguard%
- }%
-}
-
-\def\pgfmath@gobblemantisse\relax#1#2#3#4#5#6#7#8#9{%
- \afterassignment\pgfmath@checkforguard%
- \c@pgfmath@parsecountc0#1#2#3#4#5#6#7#8#9\relax% these digits are ignored
-}
-
-\def\pgfmath@removeguard#1\relax{\pgfmath@parseunits#1}
-
-
-
-
-\def\pgfmath@parseunits#1{%
- % Here the extra first digit in b is gobbled.
- \edef\pgfmath@resulttemp{%
- \pgfmath@sign\the\c@pgfmath@parsecounta.\expandafter\pgfmath@gobbleone\the\c@pgfmath@parsecountb}%
- % Check whether #1 is a \dp, \wd, or \ht
- \let\pgfmath@parsenext=\pgfmath@parseunits@simple%
- \ifx#1\wd\let\pgfmath@parsenext=\pgfmath@parseunits@boxdimen\fi%
- \ifx#1\ht\let\pgfmath@parsenext=\pgfmath@parseunits@boxdimen\fi%
- \ifx#1\dp\let\pgfmath@parsenext=\pgfmath@parseunits@boxdimen\fi%
- \pgfmath@parsenext#1%
-}
-
-\def\pgfmath@parseunits@boxdimen#1#2{%
- \pgfmath@parsex=#1#2%
- \pgfmath@parsex\pgfmath@resulttemp\pgfmath@parsex%
- \edef\pgfmathresult{\pgfmath@tonumber{\pgfmath@parsex}}%
- \global\pgfmathunitsdeclaredtrue% a dimension has units
- \pgfmath@parseoperator%
-}
-
-\def\pgfmath@parseunits@simple#1{%
- % Now check if #1 is actually a register.
- \ifcat#1\relax%
- \afterassignment\pgfmath@ifregisterdimen@%
- \pgfmath@parsex#1pt\relax\pgfmath@%
- \pgfmath@parsex\pgfmath@resulttemp\pgfmath@parsex%
- \ifpgfmath@dimen@% If it's a dimen stop scanning operand here.
- \global\pgfmathunitsdeclaredtrue% a dimension has units
- \edef\pgfmathresult{\pgfmath@tonumber{\pgfmath@parsex}}%
- \let\pgfmath@parsenext\pgfmath@parseoperator%
- \else
- \edef\pgfmath@resulttemp{\pgfmath@tonumber{\pgfmath@parsex}}%
- \let\pgfmath@parsenext\pgfmath@parseunits@%
- \fi%
- \expandafter\pgfmath@parsenext%
- \else%
- \expandafter\pgfmath@parseunits@\expandafter#1%
- \fi}
-
-\def\pgfmath@parseunits@#1#2{%
- % Check if #1 is an operator, or the character `@' indicating the end of the parse.
- \pgfmath@in@#1{@+-*/^r<>=()}%
- \ifpgfmath@in@%
- \edef\pgfmath@tokens{#1#2}%
- \edef\pgfmathresult{\pgfmath@resulttemp}%
- \let\pgfmath@parsenext\pgfmath@parseoperator%
- \else%
- \pgfmath@in@#1{Ee}% e+0X
- \ifpgfmath@in@%
- % Oh no! It might be and em or an ex...
- \pgfmath@in@#2{mx}%
- \ifpgfmath@in@%
- \global\pgfmathunitsdeclaredtrue%
- \pgfmath@parsex\pgfmath@resulttemp#1#2\relax%
- \edef\pgfmathresult{\pgfmath@tonumber{\pgfmath@parsex}}%
- \edef\pgfmath@tokens{}%
- \let\pgfmath@parsenext\pgfmath@parseoperator%
- \else%
- \edef\pgfmath@tokens{#2}%
- \let\pgfmath@parsenext\pgfmath@parsescientific%
- \fi%
- \else
- % Anything else *should* be a TeX unit.
- \global\pgfmathunitsdeclaredtrue%
- \pgfmath@parsex\pgfmath@resulttemp#1#2\relax%
- \edef\pgfmathresult{\pgfmath@tonumber{\pgfmath@parsex}}%
- \edef\pgfmath@tokens{}%
- \let\pgfmath@parsenext\pgfmath@parseoperator%
- \fi\fi%
- \expandafter\pgfmath@parsenext\pgfmath@tokens%
-}
-
-% Parse 'Scientific' notation in the form xEyy
-%
-\def\pgfmath@parsescientific{%
- \afterassignment\pgfmath@parsescientific@%
- \c@pgfmath@parsecounta}
-
-\def\pgfmath@parsescientific@{%
- \edef\pgfmath@parsesci@temp{\pgfmath@resulttemp\the\c@pgfmath@parsecountc}%
- \expandafter\pgfmathscientific\expandafter{\pgfmath@parsesci@temp}%
- {\the\c@pgfmath@parsecounta}%
- \edef\pgfmath@resulttemp{\pgfmathresult}%
- \pgfmath@parseunits@}
-
-
-% OK. Now the fun stuff. We parse functions here. Note that
-% *no* calulations are done in the following macros. All the
-% mathematics is done in pgfmathoperations.code and friends.
-%
-% Functions dealt with here are:
-%
-% round(X) 'half-up' rounding.
-% floor(X) floor function.
-% ciel(X) ceiling function.
-% abs(X) absolute function.
-%
-% exp(X) e^X (0 <= X <~= 9.7).
-%
-% sin(X) sine function.
-% cos(X) cosine function.
-% tan(X) tan function.
-% asin(X) arcsine of X (in radians) -1 <= X <= 1
-% acos(X) arccosine of X (in radians) -1 <= X <= 1
-% atan(X) arctangent of X (in radians) -1 <= X <= 1
-% veclen(X,Y) the length Z where Z^2 = X^2 + Y^2
-% mod(X,Y) X modulo Y
-% max(X,Y) the maximum of X or Y
-% min(X,Y) the minimum of X or Y
-%
-% NB veclen, mod, max, and min *cannot* be nested.
-%
-% deg(X) converts X to degrees (X in radians)
-% rad(X) converts X to radians (X in degrees)
-%
-% rnd generate pseudo-random number X (0 <= X <= 1).
-% rand generate pseudo-random number X (1 <= X <= -1).
-% sqrt(X) square root.
-%
-% pi the constant PI.
-
-\def\pgfmath@parsefunction{%
- \def\pgfmath@parsedfunctionname{}%
- \futurelet\pgfmath@parsetoken\pgfmath@parsefunction@@}
-\def\pgfmath@parsefunction@@#1{%
- \pgfmath@in@#1{()@+-*/^<>=}% A function name ends with one of these...
- \ifpgfmath@in@%
- \let\pgfmath@parsefunctionnext\pgfmath@parsefunction@end%
- \else%
- \ifx\pgfmath@parsetoken\pgfutil@sptoken% ...or a space.
- \let\pgfmath@parsefunctionnext\pgfmath@parsefunction@end%
- \else%
- \let\pgfmath@parsefunctionnext\pgfmath@parsefunction@continue%
- \fi\fi%
- \pgfmath@parsefunctionnext#1}
-
-\def\pgfmath@parsefunction@end#1{%
- \expandafter\ifx\csname pgfmath@parsefunction@\pgfmath@parsedfunctionname\endcsname\relax%
- \pgfmath@reportunknownfunction%
- \let\pgfmath@parsefunctionnext\relax%
- \else%
- \let\pgfmath@parsefunctionnext\pgfmath@executeparsefunction@%
- \fi%
- \pgfmath@parsefunctionnext#1}
-
-\def\pgfmath@parsefunction@continue#1{%
- \edef\pgfmath@parsedfunctionname{\pgfmath@parsedfunctionname#1}%
- \futurelet\pgfmath@parsetoken\pgfmath@parsefunction@@}
-
-\def\pgfmath@executeparsefunction@{\csname pgfmath@parsefunction@\pgfmath@parsedfunctionname\endcsname}
-
-
-\def\pgfmath@reportunknownfunction{%
- \pgfmath@error{Unknown function `\pgfmath@parsedfunctionname'}{}%
-}
-
-% \pgfmath@postfunction
-%
-% In scanning a function e.g. sin(40), we subvert the normal parsing
-% group mechanism by messing around with \pgfmath@parsepostgroup, so
-% that after scanning ), the parser doesn't scan for an operator, but
-% returns to the macros scanning the function.
-% Here the mechanism is restored, and the value of the function is
-% stored along with the approprate sign, which was saved earlier.
-%
-\def\pgfmath@postfunction{%
- \let\pgfmath@parsepostgroup\pgfmath@parseoperator%
- \edef\pgfmathresult{\pgfmath@sign\pgfmathresult}%
- \pgfmath@parseoperator}
-
-
-% \pgfmath@parsefunction@abs
-%
-\def\pgfmath@parsefunction@abs{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@abs@%
- \expandafter\pgfmath@parse@}
-\def\pgfmath@parsefunction@abs@{%
- \expandafter\pgfmathabs@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction%
-}
-
-% \pgfmath@parsefunction@sqrt
-%
-\def\pgfmath@parsefunction@sqrt{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@sqrt@%
- \expandafter\pgfmath@parse@}
-\def\pgfmath@parsefunction@sqrt@{%
- \expandafter\pgfmathsqrt@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction%
-}
-
-% \pgfmath@parsefunction@round
-%
-\def\pgfmath@parsefunction@round{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@round@%
- \expandafter\pgfmath@parse@}
-\def\pgfmath@parsefunction@round@{%
- \expandafter\pgfmathround@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction%
-}
-
-% \pgfmath@parsefunction@floor
-%
-\def\pgfmath@parsefunction@floor{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@floor@%
- \expandafter\pgfmath@parse@}
-\def\pgfmath@parsefunction@floor@{%
- \expandafter\pgfmathfloor@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction%
-}
-
-% \pgfmath@parsefunction@ceil
-%
-\def\pgfmath@parsefunction@ceil{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@ceil@%
- \expandafter\pgfmath@parse@}
-\def\pgfmath@parsefunction@ceil@{%
- \expandafter\pgfmathceil@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction%
-}
-
-% \pgfmath@parsefunction@sin
-%
-\def\pgfmath@parsefunction@sin{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@sin@%
- \expandafter\pgfmath@parse@}
-\def\pgfmath@parsefunction@sin@{%
- \expandafter\pgfmathsin@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction%
-}
-
-% \pgfmath@parsefunction@cos
-%
-\def\pgfmath@parsefunction@cos{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@cos@%
- \expandafter\pgfmath@parse@}
-\def\pgfmath@parsefunction@cos@{%
- \expandafter\pgfmathcos@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction%
-}
-
-% \pgfmath@parsefunction@asin
-%
-\def\pgfmath@parsefunction@asin{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@asin@%
- \expandafter\pgfmath@parse@}
-\def\pgfmath@parsefunction@asin@{%
- \expandafter\pgfmathasin@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction%
-}
-
-% \pgfmath@parsefunction@acos
-%
-\def\pgfmath@parsefunction@acos{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@acos@%
- \expandafter\pgfmath@parse@}
-\def\pgfmath@parsefunction@acos@{%
- \expandafter\pgfmathacos@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction}
-
-% \pgfmath@parsefunction@atan
-%
-\def\pgfmath@parsefunction@atan{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@atan@%
- \expandafter\pgfmath@parse@}
-\def\pgfmath@parsefunction@atan@{%
- \expandafter\pgfmathatan@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction%
-}
-
-% \pgfmath@parsefunction@tan
-%
-\def\pgfmath@parsefunction@tan{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@tan@%
- \expandafter\pgfmath@parse@}
-\def\pgfmath@parsefunction@tan@{%
- \expandafter\pgfmathtan@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction%
-}
-
-% \pgfmath@parsefunction@rad
-%
-\def\pgfmath@parsefunction@rad{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@rad@%
- \pgfmath@parse@}
-\def\pgfmath@parsefunction@rad@{%
- \expandafter\pgfmathrad@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction}%
-
-% \pgfmath@parsefunction@rad
-%
-\def\pgfmath@parsefunction@deg{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@deg@%
- \expandafter\pgfmath@parse@}
-\def\pgfmath@parsefunction@deg@{%
- \expandafter\pgfmathdeg@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction}%
-
-% \pgfmath@parsefunction@rnd
-%
-\def\pgfmath@parsefunction@rnd{%
- \expandafter\pgfmathrnd%
- \expandafter\pgfmath@postfunction}
-
-% \pgfmath@parsefunction@rand
-%
-\def\pgfmath@parsefunction@rand{%
- \expandafter\pgfmathrand%
- \expandafter\pgfmath@postfunction}%
-
-% \pgfmath@parsefunction@exp
-%
-\def\pgfmath@parsefunction@exp{%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@exp@%
- \expandafter\pgfmath@parse@}
-\def\pgfmath@parsefunction@exp@{%
- \expandafter\pgfmathexp@\expandafter{\pgfmathresult}%
- \pgfmath@postfunction%
-}
-
-% \pgfmath@parsefunction@pi
-%
-\def\pgfmath@parsefunction@pi{%
- \pgfmathpi%
- \pgfmath@postfunction%
-}
-
-
-% \pgfmath@parsefunction@veclen
-%
-\def\pgfmath@parsefunction@veclen{%
- \expandafter\pgfmath@parsefunction@veclen@}
-\def\pgfmath@parsefunction@veclen@(#1,{%
- \pgfmathparse@{#1}\edef\pgfmath@firstoperand{\pgfmathresult}%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@veclen@@
- \pgfmath@startparsegroup}
-\def\pgfmath@parsefunction@veclen@@{%
- \edef\pgfmath@secondoperand{\pgfmathresult}%
- \pgfmathveclen@{\pgfmath@firstoperand}{\pgfmath@secondoperand}%
- \pgfmath@postfunction}
-
-% \pgfmath@parsefunction@mod
-%
-\def\pgfmath@parsefunction@mod{%
- \expandafter\pgfmath@parsefunction@mod@}
-\def\pgfmath@parsefunction@mod@(#1,{%
- \pgfmathparse@{#1}\edef\pgfmath@firstoperand{\pgfmathresult}%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@mod@@
- \pgfmath@startparsegroup}
-\def\pgfmath@parsefunction@mod@@{%
- \edef\pgfmath@secondoperand{\pgfmathresult}%
- \pgfmathmod@{\pgfmath@firstoperand}{\pgfmath@secondoperand}%
- \pgfmath@postfunction}
-
-% \pgfmath@parsefunction@max
-%
-\def\pgfmath@parsefunction@max{%
- \expandafter\pgfmath@parsefunction@max@}
-\def\pgfmath@parsefunction@max@(#1,{%
- \pgfmathparse@{#1}\edef\pgfmath@firstoperand{\pgfmathresult}%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@max@@
- \pgfmath@startparsegroup}
-\def\pgfmath@parsefunction@max@@{%
- \edef\pgfmath@secondoperand{\pgfmathresult}%
- \pgfmathmax@{\pgfmath@firstoperand}{\pgfmath@secondoperand}%
- \pgfmath@postfunction}
-
-% \pgfmath@parsefunction@min
-%
-\def\pgfmath@parsefunction@min{%
- \expandafter\pgfmath@parsefunction@min@}
-\def\pgfmath@parsefunction@min@(#1,{%
- \pgfmathparse@{#1}\edef\pgfmath@firstoperand{\pgfmathresult}%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@min@@
- \pgfmath@startparsegroup}
-\def\pgfmath@parsefunction@min@@{%
- \edef\pgfmath@secondoperand{\pgfmathresult}%
- \pgfmathmin@{\pgfmath@firstoperand}{\pgfmath@secondoperand}%
- \pgfmath@postfunction}
-
-% \pgfmath@parsefunction@pow
-%
-\def\pgfmath@parsefunction@pow{%
- \expandafter\pgfmath@parsefunction@pow@}
-\def\pgfmath@parsefunction@pow@(#1,{%
- \pgfmathparse@{#1}\edef\pgfmath@firstoperand{\pgfmathresult}%
- \let\pgfmath@parsepostgroup\pgfmath@parsefunction@pow@@
- \pgfmath@startparsegroup}
-\def\pgfmath@parsefunction@pow@@{%
- \edef\pgfmath@secondoperand{\pgfmathresult}%
- \pgfmathpow@{\pgfmath@firstoperand}{\pgfmath@secondoperand}%
- \pgfmath@postfunction} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathrnd.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathrnd.code.tex
deleted file mode 100644
index ba54bfd6cdb..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathrnd.code.tex
+++ /dev/null
@@ -1,213 +0,0 @@
-% Copyright 2007 by Mark Wibrow
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-% This file defines the pesudorandom numbers.
-%
-% Version 0.0 08/03/2007
-
-% Pseudo-random number generation.
-%
-% See:
-% \book@{pressetal1992,
-% author = {William H. Press and Brian P. Flannery and Saul A.
-% Teukolsky and William T. Vetterling},
-% title = {Numerical Recipies in C},
-% edition = {Second},
-% publisher = {Cambridge University Press}
-% }
-%
-% See also, the documentation for the lcg package by Erich Janka:
-% (http://www.ctan.org/tex-archive/macros/latex/contrib/lcg/lcg.pdf)
-%
-\def\pgfmath@rnd@m{2147483647}% LaTeX Maximum.
-
-\begingroup
-\c@pgfmath@counta=\time%
-\multiply\c@pgfmath@counta by\year%
-\xdef\pgfmath@rnd@z{\the\c@pgfmath@counta}% The seed.
-\endgroup
-
-% \pgfmathsetseed
-%
-% Explictly set the seed for the generator
-%
-% #1 -> the new seed.
-%
-
-\def\pgfmathsetseed#1{\pgfmathparse{#1}\expandafter\pgfmath@setseed\pgfmathresult\relax}%
-\def\pgfmath@setseed#1.#2\relax{\def\pgfmath@rnd@z{#1}}%
-
-% Alternative paramaters - see Press et al (1992) p278-279,
-% for discussion.
-%
-% a=16807 q=127773 r=2836
-% a=48271 q=4488 r=3399
-%
-\def\pgfmath@rnd@a{69621}
-\def\pgfmath@rnd@r{23902}
-\def\pgfmath@rnd@q{30845}
-
-% \pgfmathgeneratepseudorandomnumber
-%
-% A linear congruency generator for generating
-% pseudo-random numbers. Generates numbers in
-% the range 1 - 2^31-1.
-%
-\def\pgfmathgeneratepseudorandomnumber{%
- \begingroup%
- \c@pgfmath@counta=\pgfmath@rnd@z%
- \c@pgfmath@countb=\pgfmath@rnd@z%
- \c@pgfmath@countc=\pgfmath@rnd@q%
- \divide\c@pgfmath@counta by\c@pgfmath@countc%
- \multiply\c@pgfmath@counta by-\c@pgfmath@countc%
- \advance\c@pgfmath@counta by\c@pgfmath@countb
- \c@pgfmath@countc=\pgfmath@rnd@a%
- \multiply\c@pgfmath@counta by\c@pgfmath@countc%
- \c@pgfmath@countc=\pgfmath@rnd@q%
- \divide\c@pgfmath@countb by\c@pgfmath@countc%
- \c@pgfmath@countc=\pgfmath@rnd@r%
- \multiply\c@pgfmath@countb by\c@pgfmath@countc%
- \advance\c@pgfmath@counta by-\c@pgfmath@countb%
- \ifnum\c@pgfmath@counta<0\relax%
- \c@pgfmath@countb=\pgfmath@rnd@m%
- \advance\c@pgfmath@counta by\c@pgfmath@countb%
- \fi%
- \xdef\pgfmath@rnd@z{\the\c@pgfmath@counta}%
- \endgroup%
- \edef\pgfmathresult{\pgfmath@rnd@z}%
-}
-
-% \pgfmathrnd
-%
-% Generates a pseudo-random number between 0 and 1.
-%
-\def\pgfmathrnd{%
- \begingroup%
- \pgfmathgeneratepseudorandomnumber%
- \c@pgfmath@counta\pgfmathresult%
- \c@pgfmath@countb\c@pgfmath@counta%
- \divide\c@pgfmath@countb100001\relax% To get one.
- \multiply\c@pgfmath@countb-100001\relax%
- \advance\c@pgfmath@countb\c@pgfmath@counta%
- \advance\c@pgfmath@countb1000000\relax%
- \expandafter\pgfmathrnd@\the\c@pgfmath@countb\pgfmath@%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}%
-
-\def\pgfmathrnd@#1#2#3\pgfmath@{%
- \edef\pgfmath@temp{#2.#3}%
- \pgfmath@x=\pgfmath@temp pt\relax%
-}%
-
-% \pgfmathrand
-%
-% Generates a pseudo-random number between -1 and 1.
-%
-\def\pgfmathrand{%
- \begingroup%
- \pgfmathgeneratepseudorandomnumber%
- \c@pgfmath@counta\pgfmathresult%
- \c@pgfmath@countb\c@pgfmath@counta%
- \divide\c@pgfmath@countb200001\relax%
- \multiply\c@pgfmath@countb-200001\relax%
- \advance\c@pgfmath@countb\c@pgfmath@counta%
- \advance\c@pgfmath@countb-100000\relax%
- \ifnum\c@pgfmath@countb<0\relax%
- \advance\c@pgfmath@countb-1000000\relax%
- \else%
- \advance\c@pgfmath@countb1000000\relax%
- \fi%
- \expandafter\pgfmathrand@\the\c@pgfmath@countb\pgfmath@%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}%
-
-\def\pgfmathrand@#1#2#3#4\pgfmath@{%
- \ifx#1-%
- \edef\pgfmath@temp{-#3.#4}%
- \else%
- \edef\pgfmath@temp{#2.#3#4}%
- \fi%
- \pgfmath@x=\pgfmath@temp pt\relax%
-}%
-
-% \pgfmathrandominteger
-%
-% Return a 'randomly' selected integer in the range #2 - #3 (inclusive).
-%
-% #1 - a macro to store the integer (not a count register).
-% #2 - the lower limit of the range.
-% #3 - the upper limit of the range.
-%
-\def\pgfmathrandominteger#1#2#3{%
- \begingroup%
- \pgfmathgeneratepseudorandomnumber%
- \c@pgfmath@counta#2\relax%
- \c@pgfmath@countb#3\relax%
- \c@pgfmath@countc\c@pgfmath@countb%
- % OK. Maybe #2 > #3.
- \ifnum\c@pgfmath@counta>\c@pgfmath@countb\relax%
- \c@pgfmath@countc\c@pgfmath@countb%
- \c@pgfmath@countb\c@pgfmath@counta%
- \c@pgfmath@counta\c@pgfmath@countc%
- \fi%
- \advance\c@pgfmath@countc1\relax%
- \advance\c@pgfmath@countc-\c@pgfmath@counta%
- \c@pgfmath@counta\pgfmathresult\relax%
- \c@pgfmath@countb\c@pgfmath@counta%
- \divide\c@pgfmath@countb\c@pgfmath@countc%
- \multiply\c@pgfmath@countb-\c@pgfmath@countc%
- \advance\c@pgfmath@counta\c@pgfmath@countb%
- \advance\c@pgfmath@counta#2\relax%
- \edef\pgfmathresult{\the\c@pgfmath@counta}%
- \pgfmath@smuggleone{\pgfmathresult}%
- \endgroup%
- \edef#1{\pgfmathresult}%
-}
-
-% \pgfmathdeclarerandomlist
-%
-% Create a list to be used with \pgfmathrandomelement.
-%
-% #1 - the name of the list
-% #2 - a list of comma separated elements.
-%
-\def\pgfmathdeclarerandomlist#1#2{%
- \def\pgfmath@randomlistname{#1}%
- \begingroup%
- \c@pgfmath@counta=1\relax%
- % {} is a possible random element so (locally)
- % redefine \pgfmath@empty.
- \def\pgfmath@empty{pgfmath@empty}%
- \expandafter\pgfmath@scanrandomlist#2{pgfmath@empty}}
-\def\pgfmath@scanrandomlist#1{%
- \def\pgfmath@scanneditem{#1}%
- \ifx\pgfmath@scanneditem\pgfmath@empty%
- \advance\c@pgfmath@counta-1\relax%
- \expandafter\xdef\csname pgfmath@randomlist@\pgfmath@randomlistname\endcsname{\the\c@pgfmath@counta}%
- \endgroup%
- \else%
- \expandafter\gdef\csname pgfmath@randomlist@\pgfmath@randomlistname @\the\c@pgfmath@counta\endcsname{#1}%
- \advance\c@pgfmath@counta1\relax%
- \expandafter\pgfmath@scanrandomlist%
- \fi}
-
-% \pgfmathrandomitem
-%
-% Return a 'randomly' selected element from a list.
-%
-% #1 - a macro to store the item.
-% #2 - the name of the list.
-%
-\def\pgfmathrandomitem#1#2{%
- \pgfmath@ifundefined{pgfmath@randomlist@#2}{\pgfmath@error{Unknown random list `#2'}}{%
- \edef\pgfmath@randomlistlength{\csname pgfmath@randomlist@#2\endcsname}%
- \pgfmathrandominteger{\pgfmath@randomtemp}{1}{\pgfmath@randomlistlength}%
- \def#1{\csname pgfmath@randomlist@#2@\pgfmath@randomtemp\endcsname}}} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathtrig.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathtrig.code.tex
deleted file mode 100644
index dd38f36f37b..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathtrig.code.tex
+++ /dev/null
@@ -1,1932 +0,0 @@
-% Copyright 2007 by Mark Wibrow
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-% This file defines the trigonometric functions/operations.
-%
-% Much of this file is based on ideas and code (particularly
-% \pgfcoremath.code.tex) due to Till Tantau
-%
-% Version 0.0 08/03/2007
-
-% \pgfmathpi
-%
-\def\pgfmathpi{\edef\pgfmathresult{\pgfmath@pi}}
-\def\pgfmath@pi{3.14159}
-
-% \pgfmathradians
-%
-% Convert #1 from radians to degrees (accurate to 1 deg).
-%
-\def\pgfmathradians#1{%
- \pgfmathparse{#1}%
- \pgfmathradians@{\pgfmathresult}}
-\def\pgfmathradians@#1{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \pgfmath@x57.29577\pgfmath@x\relax% 57.29577 = 360/(2*pi)
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}%
-
-% \pgfmathdeg
-%
-% Convert #1 from radians to degrees.
-%
-\def\pgfmathdeg#1{%
- \pgfmathparse{#1}%
- \pgfmathdeg@{\pgfmathresult}}
-\def\pgfmathdeg@#1{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \pgfmath@x57.29577\pgfmath@x\relax% 57.29577 = 360/(2*pi)
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}%
-
-% \pgfmathrad
-%
-% Convert #1 from degrees to radians.
-%
-\def\pgfmathrad#1{%
- \pgfmathparse{#1}%
- \pgfmathrad@{\pgfmathresult}}
-\def\pgfmathrad@#1{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \pgfmath@x3.14159\pgfmath@x%
- \divide\pgfmath@x180\relax%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}%
-
-% \pgfmathsin
-%
-% Calculate the sine of #1 (in degrees).
-%
-\def\pgfmathsin#1{%
- \pgfmathparse{#1}%
- \pgfmathsin@{\pgfmathresult}}
-\def\pgfmathsin@#1{%
- % Let #1 = a.b
- % Then sin(#1) \approx (1-b)*cos(a) + b*cos(a+1)
- %
- \begingroup%
- \pgfmath@x#1pt\relax%
- \advance\pgfmath@x-90pt\relax%
- \afterassignment\pgfmath@gobbletilpgfmath@
- \expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@
- \divide\c@pgfmath@counta360\relax%
- \multiply\c@pgfmath@counta-360\relax%
- \advance\pgfmath@x\c@pgfmath@counta pt\relax%
- \ifdim\pgfmath@x<0pt\relax\pgfmath@x-\pgfmath@x\fi%
- \ifdim\pgfmath@x<180pt\relax%
- \else
- \pgfmath@x-\pgfmath@x%
- \advance\pgfmath@x360pt\relax%
- \fi%
- % Now 0 <= x < 179. So split x into integer and decimal...
- %
- \afterassignment\pgfmath@xa%
- \expandafter\c@pgfmath@counta\the\pgfmath@x\relax%
- %
- % ...if #1 is an integer, don't do anything fancy.
- \ifdim\pgfmath@xa=0pt%
- \expandafter\pgfmath@x\csname pgfmath@cos@\the\c@pgfmath@counta\endcsname pt\relax%
- \else%
- \pgfmath@x-\pgfmath@xa%
- \advance\pgfmath@x1pt\relax%
- \expandafter\pgfmath@x\csname pgfmath@cos@\the\c@pgfmath@counta\endcsname\pgfmath@x%
- \advance\c@pgfmath@counta1\relax%
- \expandafter\advance\expandafter\pgfmath@x\csname pgfmath@cos@\the\c@pgfmath@counta\endcsname\pgfmath@xa%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup
-}
-
-% \pgfmathcos
-%
-% Calculate the cosine of #1 (in degrees).
-%
-\def\pgfmathcos#1{%
- \pgfmathparse{#1}%
- \expandafter\pgfmathcos@\expandafter{\pgfmathresult}}
-\def\pgfmathcos@#1{%
- % Let x = a.b
- % Then cos(x) \approx (1-b)*cos(a) + b*cos(a+1)
- %
- \begingroup%
- \pgfmath@x#1pt\relax%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@%
- \divide\c@pgfmath@counta360\relax%
- \multiply\c@pgfmath@counta-360\relax%
- \advance\pgfmath@x\c@pgfmath@counta pt\relax%
- \ifdim\pgfmath@x<0pt\relax\pgfmath@x-\pgfmath@x\fi%
- \ifdim\pgfmath@x<180pt\relax%
- \else%
- \pgfmath@x-\pgfmath@x%
- \advance\pgfmath@x360pt\relax%
- \fi%
- % Now 0 <= x < 179. So split x into integer and decimal...
- %
- \afterassignment\pgfmath@xa%
- \expandafter\c@pgfmath@counta\the\pgfmath@x\relax%
- %
- % ...if #1 is an integer, don't do anything fancy.
- \ifdim\pgfmath@xa=0pt%
- \expandafter\pgfmath@x\csname pgfmath@cos@\the\c@pgfmath@counta\endcsname pt%
- \else%
- \pgfmath@x-\pgfmath@xa%
- \advance\pgfmath@x1pt\relax%
- \expandafter\pgfmath@x\csname pgfmath@cos@\the\c@pgfmath@counta\endcsname\pgfmath@x%
- \advance\c@pgfmath@counta1\relax%
- \ifnum\c@pgfmath@counta=181\relax\c@pgfmath@counta179\relax\fi%
- \expandafter\advance\expandafter\pgfmath@x\csname pgfmath@cos@\the\c@pgfmath@counta\endcsname\pgfmath@xa%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-
-% \pgfmathsincos
-%
-% Calculate the sin and cosine of #1 (in degrees).
-%
-\def\pgfmathsincos#1{%
- \pgfmathparse{#1}%
- \expandafter\pgfmathcos@\expandafter{\pgfmathresult}}
-\def\pgfmathsincos@#1{%
- \pgfmathsin@{#1}\edef\pgfmathresulty{\pgfmathresult}%
- \pgfmathcos@{#1}\edef\pgfmathresultx{\pgfmathresult}%
-}
-% \pgfmathtan
-%
-% Calculate the cotangent of #1 (in degrees).
-%
-\def\pgfmathtan#1{%
- \pgfmathparse{#1}%
- \pgfmathtan@{\pgfmathresult}}
-\def\pgfmathtan@#1{%
- \begingroup%
- \pgfmathcos@{#1}%
- \expandafter\pgfmathreciprocal@\expandafter{\pgfmathresult}%
- \edef\pgfmath@tantemp{\pgfmathresult}%
- \pgfmathsin@{#1}%
- \pgfmath@x\pgfmathresult pt\relax%
- \pgfmath@x\pgfmath@tantemp\pgfmath@x%
- % Adjust to 4 decimal places. This gets rid of some annoyingly tiny errors.
- \afterassignment\pgfmath@x%
- \expandafter\c@pgfmath@counta\the\pgfmath@x\relax%
- \ifdim\pgfmath@x<.0001pt\relax%
- \pgfmath@x0pt\relax%
- \fi%
- \advance\pgfmath@x\c@pgfmath@counta pt%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-
-% \pgfmathasin
-%
-% The asin of #1
-%
-\def\pgfmathasin#1{%
- \pgfmathparse{#1}%
- \expandafter\pgfmathasin@\expandafter{\pgfmathresult}}
-\def\pgfmathasin@#1{%
- \begingroup%
- \pgfmath@x#1pt\relax%
- \pgfmath@xa\pgfmath@x%
- \ifdim\pgfmath@x<0pt\relax%
- \pgfmath@x-\pgfmath@x%
- \fi%
- \pgfmath@x1000\pgfmath@x%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@%
- \expandafter\pgfmath@x\csname pgfmath@asin@\the\c@pgfmath@counta\endcsname pt\relax%
- \ifdim\pgfmath@xa<0pt\relax%
- \pgfmath@x-\pgfmath@x%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-% \pgfmathacos
-%
-% The acos of #1
-%
-\def\pgfmathacos#1{%
- \pgfmathparse{#1}%
- \expandafter\pgfmathacos@\expandafter{\pgfmathresult}}
-\def\pgfmathacos@#1{%
- \begingroup%
- \pgfmath@x#1pt\relax%
- \pgfmath@xa\pgfmath@x%
- \ifdim\pgfmath@x<0pt\relax%
- \pgfmath@x-\pgfmath@x%
- \fi%
- \pgfmath@x1000\pgfmath@x%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@%
- \expandafter\pgfmath@x\csname pgfmath@acos@\the\c@pgfmath@counta\endcsname pt\relax%
- \ifdim\pgfmath@xa<0pt\relax%
- \pgfmath@x-\pgfmath@x%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-% \pgfmathasin
-%
-% The atan of #1
-%
-\def\pgfmathatan#1{%
- \pgfmathparse{#1}%
- \expandafter\pgfmathatan@\expandafter{\pgfmathresult}}
-\def\pgfmathatan@#1{%
- \begingroup%
- \pgfmath@x#1pt\relax%
- \pgfmath@xa\pgfmath@x%
- \ifdim\pgfmath@x<0pt\relax%
- \pgfmath@x-\pgfmath@x%
- \fi%
- \pgfmath@xb\pgfmath@x%
- \ifdim\pgfmath@x>1pt\relax%
- \edef\pgfmath@temp{\pgfmath@tonumber{\pgfmath@x}}%
- \pgfmathreciprocal@{\pgfmath@temp}%
- \pgfmath@x\pgfmathresult pt\relax%
- \fi%
- \pgfmath@x1000\pgfmath@x%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@%
- \ifdim\pgfmath@xb>1pt\relax%
- \expandafter\pgfmath@x\expandafter-\csname pgfmath@atan@\the\c@pgfmath@counta\endcsname pt\relax%
- \advance\pgfmath@x90pt%
- \else%
- \expandafter\pgfmath@x\csname pgfmath@atan@\the\c@pgfmath@counta\endcsname pt\relax%
- \fi%
- \ifdim\pgfmath@xa<0pt\relax%
- \pgfmath@x-\pgfmath@x%
- \fi%
- \pgfmath@returnone\pgfmath@x%
- \endgroup%
-}
-
-
-\def\pgfmath@def#1#2#3{\expandafter\def\csname pgfmath@#1@#2\endcsname{#3}}
-\pgfmath@def{cos}{0}{1.00000} \pgfmath@def{cos}{1}{0.99985}
-\pgfmath@def{cos}{2}{0.99939} \pgfmath@def{cos}{3}{0.99863}
-\pgfmath@def{cos}{4}{0.99756} \pgfmath@def{cos}{5}{0.99619}
-\pgfmath@def{cos}{6}{0.99452} \pgfmath@def{cos}{7}{0.99255}
-\pgfmath@def{cos}{8}{0.99027} \pgfmath@def{cos}{9}{0.98769}
-\pgfmath@def{cos}{10}{0.98481} \pgfmath@def{cos}{11}{0.98163}
-\pgfmath@def{cos}{12}{0.97815} \pgfmath@def{cos}{13}{0.97437}
-\pgfmath@def{cos}{14}{0.97030} \pgfmath@def{cos}{15}{0.96593}
-\pgfmath@def{cos}{16}{0.96126} \pgfmath@def{cos}{17}{0.95630}
-\pgfmath@def{cos}{18}{0.95106} \pgfmath@def{cos}{19}{0.94552}
-\pgfmath@def{cos}{20}{0.93969} \pgfmath@def{cos}{21}{0.93358}
-\pgfmath@def{cos}{22}{0.92718} \pgfmath@def{cos}{23}{0.92050}
-\pgfmath@def{cos}{24}{0.91355} \pgfmath@def{cos}{25}{0.90631}
-\pgfmath@def{cos}{26}{0.89879} \pgfmath@def{cos}{27}{0.89101}
-\pgfmath@def{cos}{28}{0.88295} \pgfmath@def{cos}{29}{0.87462}
-\pgfmath@def{cos}{30}{0.86603} \pgfmath@def{cos}{31}{0.85717}
-\pgfmath@def{cos}{32}{0.84805} \pgfmath@def{cos}{33}{0.83867}
-\pgfmath@def{cos}{34}{0.82904} \pgfmath@def{cos}{35}{0.81915}
-\pgfmath@def{cos}{36}{0.80902} \pgfmath@def{cos}{37}{0.79864}
-\pgfmath@def{cos}{38}{0.78801} \pgfmath@def{cos}{39}{0.77715}
-\pgfmath@def{cos}{40}{0.76604} \pgfmath@def{cos}{41}{0.75471}
-\pgfmath@def{cos}{42}{0.74314} \pgfmath@def{cos}{43}{0.73135}
-\pgfmath@def{cos}{44}{0.71934} \pgfmath@def{cos}{45}{0.70711}
-\pgfmath@def{cos}{46}{0.69466} \pgfmath@def{cos}{47}{0.68200}
-\pgfmath@def{cos}{48}{0.66913} \pgfmath@def{cos}{49}{0.65606}
-\pgfmath@def{cos}{50}{0.64279} \pgfmath@def{cos}{51}{0.62932}
-\pgfmath@def{cos}{52}{0.61566} \pgfmath@def{cos}{53}{0.60182}
-\pgfmath@def{cos}{54}{0.58779} \pgfmath@def{cos}{55}{0.57358}
-\pgfmath@def{cos}{56}{0.55919} \pgfmath@def{cos}{57}{0.54464}
-\pgfmath@def{cos}{58}{0.52992} \pgfmath@def{cos}{59}{0.51504}
-\pgfmath@def{cos}{60}{0.50000} \pgfmath@def{cos}{61}{0.48481}
-\pgfmath@def{cos}{62}{0.46947} \pgfmath@def{cos}{63}{0.45399}
-\pgfmath@def{cos}{64}{0.43837} \pgfmath@def{cos}{65}{0.42262}
-\pgfmath@def{cos}{66}{0.40674} \pgfmath@def{cos}{67}{0.39073}
-\pgfmath@def{cos}{68}{0.37461} \pgfmath@def{cos}{69}{0.35837}
-\pgfmath@def{cos}{70}{0.34202} \pgfmath@def{cos}{71}{0.32557}
-\pgfmath@def{cos}{72}{0.30902} \pgfmath@def{cos}{73}{0.29237}
-\pgfmath@def{cos}{74}{0.27564} \pgfmath@def{cos}{75}{0.25882}
-\pgfmath@def{cos}{76}{0.24192} \pgfmath@def{cos}{77}{0.22495}
-\pgfmath@def{cos}{78}{0.20791} \pgfmath@def{cos}{79}{0.19081}
-\pgfmath@def{cos}{80}{0.17365} \pgfmath@def{cos}{81}{0.15643}
-\pgfmath@def{cos}{82}{0.13917} \pgfmath@def{cos}{83}{0.12187}
-\pgfmath@def{cos}{84}{0.10453} \pgfmath@def{cos}{85}{0.08716}
-\pgfmath@def{cos}{86}{0.06976} \pgfmath@def{cos}{87}{0.05234}
-\pgfmath@def{cos}{88}{0.03490} \pgfmath@def{cos}{89}{0.01745}
-\pgfmath@def{cos}{90}{0.00000} \pgfmath@def{cos}{91}{-0.01745}
-\pgfmath@def{cos}{92}{-0.03490} \pgfmath@def{cos}{93}{-0.05234}
-\pgfmath@def{cos}{94}{-0.06976} \pgfmath@def{cos}{95}{-0.08716}
-\pgfmath@def{cos}{96}{-0.10453} \pgfmath@def{cos}{97}{-0.12187}
-\pgfmath@def{cos}{98}{-0.13917} \pgfmath@def{cos}{99}{-0.15643}
-\pgfmath@def{cos}{100}{-0.17365} \pgfmath@def{cos}{101}{-0.19081}
-\pgfmath@def{cos}{102}{-0.20791} \pgfmath@def{cos}{103}{-0.22495}
-\pgfmath@def{cos}{104}{-0.24192} \pgfmath@def{cos}{105}{-0.25882}
-\pgfmath@def{cos}{106}{-0.27564} \pgfmath@def{cos}{107}{-0.29237}
-\pgfmath@def{cos}{108}{-0.30902} \pgfmath@def{cos}{109}{-0.32557}
-\pgfmath@def{cos}{110}{-0.34202} \pgfmath@def{cos}{111}{-0.35837}
-\pgfmath@def{cos}{112}{-0.37461} \pgfmath@def{cos}{113}{-0.39073}
-\pgfmath@def{cos}{114}{-0.40674} \pgfmath@def{cos}{115}{-0.42262}
-\pgfmath@def{cos}{116}{-0.43837} \pgfmath@def{cos}{117}{-0.45399}
-\pgfmath@def{cos}{118}{-0.46947} \pgfmath@def{cos}{119}{-0.48481}
-\pgfmath@def{cos}{120}{-0.50000} \pgfmath@def{cos}{121}{-0.51504}
-\pgfmath@def{cos}{122}{-0.52992} \pgfmath@def{cos}{123}{-0.54464}
-\pgfmath@def{cos}{124}{-0.55919} \pgfmath@def{cos}{125}{-0.57358}
-\pgfmath@def{cos}{126}{-0.58779} \pgfmath@def{cos}{127}{-0.60182}
-\pgfmath@def{cos}{128}{-0.61566} \pgfmath@def{cos}{129}{-0.62932}
-\pgfmath@def{cos}{130}{-0.64279} \pgfmath@def{cos}{131}{-0.65606}
-\pgfmath@def{cos}{132}{-0.66913} \pgfmath@def{cos}{133}{-0.68200}
-\pgfmath@def{cos}{134}{-0.69466} \pgfmath@def{cos}{135}{-0.70711}
-\pgfmath@def{cos}{136}{-0.71934} \pgfmath@def{cos}{137}{-0.73135}
-\pgfmath@def{cos}{138}{-0.74314} \pgfmath@def{cos}{139}{-0.75471}
-\pgfmath@def{cos}{140}{-0.76604} \pgfmath@def{cos}{141}{-0.77715}
-\pgfmath@def{cos}{142}{-0.78801} \pgfmath@def{cos}{143}{-0.79864}
-\pgfmath@def{cos}{144}{-0.80902} \pgfmath@def{cos}{145}{-0.81915}
-\pgfmath@def{cos}{146}{-0.82904} \pgfmath@def{cos}{147}{-0.83867}
-\pgfmath@def{cos}{148}{-0.84805} \pgfmath@def{cos}{149}{-0.85717}
-\pgfmath@def{cos}{150}{-0.86603} \pgfmath@def{cos}{151}{-0.87462}
-\pgfmath@def{cos}{152}{-0.88295} \pgfmath@def{cos}{153}{-0.89101}
-\pgfmath@def{cos}{154}{-0.89879} \pgfmath@def{cos}{155}{-0.90631}
-\pgfmath@def{cos}{156}{-0.91355} \pgfmath@def{cos}{157}{-0.92050}
-\pgfmath@def{cos}{158}{-0.92718} \pgfmath@def{cos}{159}{-0.93358}
-\pgfmath@def{cos}{160}{-0.93969} \pgfmath@def{cos}{161}{-0.94552}
-\pgfmath@def{cos}{162}{-0.95106} \pgfmath@def{cos}{163}{-0.95630}
-\pgfmath@def{cos}{164}{-0.96126} \pgfmath@def{cos}{165}{-0.96593}
-\pgfmath@def{cos}{166}{-0.97030} \pgfmath@def{cos}{167}{-0.97437}
-\pgfmath@def{cos}{168}{-0.97815} \pgfmath@def{cos}{169}{-0.98163}
-\pgfmath@def{cos}{170}{-0.98481} \pgfmath@def{cos}{171}{-0.98769}
-\pgfmath@def{cos}{172}{-0.99027} \pgfmath@def{cos}{173}{-0.99255}
-\pgfmath@def{cos}{174}{-0.99452} \pgfmath@def{cos}{175}{-0.99619}
-\pgfmath@def{cos}{176}{-0.99756} \pgfmath@def{cos}{177}{-0.99863}
-\pgfmath@def{cos}{178}{-0.99939} \pgfmath@def{cos}{179}{-0.99985}
-\pgfmath@def{cos}{180}{-1.00000} \pgfmath@def{cos}{181}{-0.99985}
-
-\pgfmath@def{cosfrac}{0}{1.00000} \pgfmath@def{cosfrac}{1}{0.99995}
-\pgfmath@def{cosfrac}{2}{0.99980} \pgfmath@def{cosfrac}{3}{0.99955}
-\pgfmath@def{cosfrac}{4}{0.99920} \pgfmath@def{cosfrac}{5}{0.99875}
-\pgfmath@def{cosfrac}{6}{0.99820} \pgfmath@def{cosfrac}{7}{0.99755}
-\pgfmath@def{cosfrac}{8}{0.99681} \pgfmath@def{cosfrac}{9}{0.99597}
-\pgfmath@def{cosfrac}{10}{0.99503} \pgfmath@def{cosfrac}{11}{0.99400}
-\pgfmath@def{cosfrac}{12}{0.99287} \pgfmath@def{cosfrac}{13}{0.99165}
-\pgfmath@def{cosfrac}{14}{0.99034} \pgfmath@def{cosfrac}{15}{0.98893}
-\pgfmath@def{cosfrac}{16}{0.98744} \pgfmath@def{cosfrac}{17}{0.98585}
-\pgfmath@def{cosfrac}{18}{0.98418} \pgfmath@def{cosfrac}{19}{0.98242}
-\pgfmath@def{cosfrac}{20}{0.98058} \pgfmath@def{cosfrac}{21}{0.97865}
-\pgfmath@def{cosfrac}{22}{0.97664} \pgfmath@def{cosfrac}{23}{0.97455}
-\pgfmath@def{cosfrac}{24}{0.97238} \pgfmath@def{cosfrac}{25}{0.97014}
-\pgfmath@def{cosfrac}{26}{0.96782} \pgfmath@def{cosfrac}{27}{0.96542}
-\pgfmath@def{cosfrac}{28}{0.96296} \pgfmath@def{cosfrac}{29}{0.96042}
-\pgfmath@def{cosfrac}{30}{0.95782} \pgfmath@def{cosfrac}{31}{0.95515}
-\pgfmath@def{cosfrac}{32}{0.95242} \pgfmath@def{cosfrac}{33}{0.94962}
-\pgfmath@def{cosfrac}{34}{0.94677} \pgfmath@def{cosfrac}{35}{0.94385}
-\pgfmath@def{cosfrac}{36}{0.94088} \pgfmath@def{cosfrac}{37}{0.93786}
-\pgfmath@def{cosfrac}{38}{0.93478} \pgfmath@def{cosfrac}{39}{0.93165}
-\pgfmath@def{cosfrac}{40}{0.92847} \pgfmath@def{cosfrac}{41}{0.92525}
-\pgfmath@def{cosfrac}{42}{0.92198} \pgfmath@def{cosfrac}{43}{0.91866}
-\pgfmath@def{cosfrac}{44}{0.91531} \pgfmath@def{cosfrac}{45}{0.91192}
-\pgfmath@def{cosfrac}{46}{0.90849} \pgfmath@def{cosfrac}{47}{0.90502}
-\pgfmath@def{cosfrac}{48}{0.90152} \pgfmath@def{cosfrac}{49}{0.89799}
-\pgfmath@def{cosfrac}{50}{0.89442} \pgfmath@def{cosfrac}{51}{0.89083}
-\pgfmath@def{cosfrac}{52}{0.88721} \pgfmath@def{cosfrac}{53}{0.88357}
-\pgfmath@def{cosfrac}{54}{0.87990} \pgfmath@def{cosfrac}{55}{0.87621}
-\pgfmath@def{cosfrac}{56}{0.87250} \pgfmath@def{cosfrac}{57}{0.86877}
-\pgfmath@def{cosfrac}{58}{0.86503} \pgfmath@def{cosfrac}{59}{0.86126}
-\pgfmath@def{cosfrac}{60}{0.85749} \pgfmath@def{cosfrac}{61}{0.85370}
-\pgfmath@def{cosfrac}{62}{0.84990} \pgfmath@def{cosfrac}{63}{0.84609}
-\pgfmath@def{cosfrac}{64}{0.84227} \pgfmath@def{cosfrac}{65}{0.83844}
-\pgfmath@def{cosfrac}{66}{0.83460} \pgfmath@def{cosfrac}{67}{0.83077}
-\pgfmath@def{cosfrac}{68}{0.82692} \pgfmath@def{cosfrac}{69}{0.82308}
-\pgfmath@def{cosfrac}{70}{0.81923} \pgfmath@def{cosfrac}{71}{0.81538}
-\pgfmath@def{cosfrac}{72}{0.81153} \pgfmath@def{cosfrac}{73}{0.80768}
-\pgfmath@def{cosfrac}{74}{0.80384} \pgfmath@def{cosfrac}{75}{0.80000}
-\pgfmath@def{cosfrac}{76}{0.79616} \pgfmath@def{cosfrac}{77}{0.79232}
-\pgfmath@def{cosfrac}{78}{0.78850} \pgfmath@def{cosfrac}{79}{0.78468}
-\pgfmath@def{cosfrac}{80}{0.78086} \pgfmath@def{cosfrac}{81}{0.77706}
-\pgfmath@def{cosfrac}{82}{0.77326} \pgfmath@def{cosfrac}{83}{0.76948}
-\pgfmath@def{cosfrac}{84}{0.76570} \pgfmath@def{cosfrac}{85}{0.76193}
-\pgfmath@def{cosfrac}{86}{0.75818} \pgfmath@def{cosfrac}{87}{0.75444}
-\pgfmath@def{cosfrac}{88}{0.75071} \pgfmath@def{cosfrac}{89}{0.74699}
-\pgfmath@def{cosfrac}{90}{0.74329} \pgfmath@def{cosfrac}{91}{0.73960}
-\pgfmath@def{cosfrac}{92}{0.73593} \pgfmath@def{cosfrac}{93}{0.73227}
-\pgfmath@def{cosfrac}{94}{0.72862} \pgfmath@def{cosfrac}{95}{0.72499}
-\pgfmath@def{cosfrac}{96}{0.72138} \pgfmath@def{cosfrac}{97}{0.71779}
-\pgfmath@def{cosfrac}{98}{0.71421} \pgfmath@def{cosfrac}{99}{0.71065}
-\pgfmath@def{cosfrac}{100}{0.70710}
-
-% Oh No! Some really loooooong tables.
-\pgfmath@def{atan}{0}{0.00000} \pgfmath@def{atan}{1}{0.05729}
-\pgfmath@def{atan}{2}{0.11459} \pgfmath@def{atan}{3}{0.17188}
-\pgfmath@def{atan}{4}{0.22918} \pgfmath@def{atan}{5}{0.28647}
-\pgfmath@def{atan}{6}{0.34377} \pgfmath@def{atan}{7}{0.40106}
-\pgfmath@def{atan}{8}{0.45835} \pgfmath@def{atan}{9}{0.51564}
-\pgfmath@def{atan}{10}{0.57293} \pgfmath@def{atan}{11}{0.63022}
-\pgfmath@def{atan}{12}{0.68751} \pgfmath@def{atan}{13}{0.74480}
-\pgfmath@def{atan}{14}{0.80208} \pgfmath@def{atan}{15}{0.85937}
-\pgfmath@def{atan}{16}{0.91665} \pgfmath@def{atan}{17}{0.97393}
-\pgfmath@def{atan}{18}{1.03121} \pgfmath@def{atan}{19}{1.08848}
-\pgfmath@def{atan}{20}{1.14576} \pgfmath@def{atan}{21}{1.20303}
-\pgfmath@def{atan}{22}{1.26030} \pgfmath@def{atan}{23}{1.31757}
-\pgfmath@def{atan}{24}{1.37483} \pgfmath@def{atan}{25}{1.43209}
-\pgfmath@def{atan}{26}{1.48935} \pgfmath@def{atan}{27}{1.54661}
-\pgfmath@def{atan}{28}{1.60386} \pgfmath@def{atan}{29}{1.66111}
-\pgfmath@def{atan}{30}{1.71835} \pgfmath@def{atan}{31}{1.77560}
-\pgfmath@def{atan}{32}{1.83284} \pgfmath@def{atan}{33}{1.89007}
-\pgfmath@def{atan}{34}{1.94730} \pgfmath@def{atan}{35}{2.00453}
-\pgfmath@def{atan}{36}{2.06175} \pgfmath@def{atan}{37}{2.11897}
-\pgfmath@def{atan}{38}{2.17619} \pgfmath@def{atan}{39}{2.23340}
-\pgfmath@def{atan}{40}{2.29061} \pgfmath@def{atan}{41}{2.34781}
-\pgfmath@def{atan}{42}{2.40500} \pgfmath@def{atan}{43}{2.46220}
-\pgfmath@def{atan}{44}{2.51938} \pgfmath@def{atan}{45}{2.57657}
-\pgfmath@def{atan}{46}{2.63374} \pgfmath@def{atan}{47}{2.69092}
-\pgfmath@def{atan}{48}{2.74808} \pgfmath@def{atan}{49}{2.80524}
-\pgfmath@def{atan}{50}{2.86240} \pgfmath@def{atan}{51}{2.91955}
-\pgfmath@def{atan}{52}{2.97669} \pgfmath@def{atan}{53}{3.03383}
-\pgfmath@def{atan}{54}{3.09097} \pgfmath@def{atan}{55}{3.14809}
-\pgfmath@def{atan}{56}{3.20521} \pgfmath@def{atan}{57}{3.26232}
-\pgfmath@def{atan}{58}{3.31943} \pgfmath@def{atan}{59}{3.37653}
-\pgfmath@def{atan}{60}{3.43363} \pgfmath@def{atan}{61}{3.49071}
-\pgfmath@def{atan}{62}{3.54779} \pgfmath@def{atan}{63}{3.60487}
-\pgfmath@def{atan}{64}{3.66193} \pgfmath@def{atan}{65}{3.71899}
-\pgfmath@def{atan}{66}{3.77604} \pgfmath@def{atan}{67}{3.83308}
-\pgfmath@def{atan}{68}{3.89012} \pgfmath@def{atan}{69}{3.94715}
-\pgfmath@def{atan}{70}{4.00417} \pgfmath@def{atan}{71}{4.06118}
-\pgfmath@def{atan}{72}{4.11819} \pgfmath@def{atan}{73}{4.17518}
-\pgfmath@def{atan}{74}{4.23217} \pgfmath@def{atan}{75}{4.28915}
-\pgfmath@def{atan}{76}{4.34612} \pgfmath@def{atan}{77}{4.40308}
-\pgfmath@def{atan}{78}{4.46004} \pgfmath@def{atan}{79}{4.51698}
-\pgfmath@def{atan}{80}{4.57392} \pgfmath@def{atan}{81}{4.63084}
-\pgfmath@def{atan}{82}{4.68776} \pgfmath@def{atan}{83}{4.74467}
-\pgfmath@def{atan}{84}{4.80157} \pgfmath@def{atan}{85}{4.85846}
-\pgfmath@def{atan}{86}{4.91534} \pgfmath@def{atan}{87}{4.97221}
-\pgfmath@def{atan}{88}{5.02907} \pgfmath@def{atan}{89}{5.08592}
-\pgfmath@def{atan}{90}{5.14276} \pgfmath@def{atan}{91}{5.19959}
-\pgfmath@def{atan}{92}{5.25641} \pgfmath@def{atan}{93}{5.31322}
-\pgfmath@def{atan}{94}{5.37002} \pgfmath@def{atan}{95}{5.42681}
-\pgfmath@def{atan}{96}{5.48359} \pgfmath@def{atan}{97}{5.54035}
-\pgfmath@def{atan}{98}{5.59711} \pgfmath@def{atan}{99}{5.65385}
-\pgfmath@def{atan}{100}{5.71059} \pgfmath@def{atan}{101}{5.76731}
-\pgfmath@def{atan}{102}{5.82402} \pgfmath@def{atan}{103}{5.88072}
-\pgfmath@def{atan}{104}{5.93741} \pgfmath@def{atan}{105}{5.99409}
-\pgfmath@def{atan}{106}{6.05075} \pgfmath@def{atan}{107}{6.10741}
-\pgfmath@def{atan}{108}{6.16405} \pgfmath@def{atan}{109}{6.22068}
-\pgfmath@def{atan}{110}{6.27729} \pgfmath@def{atan}{111}{6.33390}
-\pgfmath@def{atan}{112}{6.39049} \pgfmath@def{atan}{113}{6.44707}
-\pgfmath@def{atan}{114}{6.50364} \pgfmath@def{atan}{115}{6.56019}
-\pgfmath@def{atan}{116}{6.61673} \pgfmath@def{atan}{117}{6.67326}
-\pgfmath@def{atan}{118}{6.72978} \pgfmath@def{atan}{119}{6.78628}
-\pgfmath@def{atan}{120}{6.84277} \pgfmath@def{atan}{121}{6.89924}
-\pgfmath@def{atan}{122}{6.95571} \pgfmath@def{atan}{123}{7.01216}
-\pgfmath@def{atan}{124}{7.06859} \pgfmath@def{atan}{125}{7.12501}
-\pgfmath@def{atan}{126}{7.18142} \pgfmath@def{atan}{127}{7.23781}
-\pgfmath@def{atan}{128}{7.29419} \pgfmath@def{atan}{129}{7.35056}
-\pgfmath@def{atan}{130}{7.40691} \pgfmath@def{atan}{131}{7.46324}
-\pgfmath@def{atan}{132}{7.51957} \pgfmath@def{atan}{133}{7.57587}
-\pgfmath@def{atan}{134}{7.63217} \pgfmath@def{atan}{135}{7.68844}
-\pgfmath@def{atan}{136}{7.74471} \pgfmath@def{atan}{137}{7.80095}
-\pgfmath@def{atan}{138}{7.85719} \pgfmath@def{atan}{139}{7.91340}
-\pgfmath@def{atan}{140}{7.96961} \pgfmath@def{atan}{141}{8.02579}
-\pgfmath@def{atan}{142}{8.08196} \pgfmath@def{atan}{143}{8.13812}
-\pgfmath@def{atan}{144}{8.19426} \pgfmath@def{atan}{145}{8.25038}
-\pgfmath@def{atan}{146}{8.30649} \pgfmath@def{atan}{147}{8.36258}
-\pgfmath@def{atan}{148}{8.41866} \pgfmath@def{atan}{149}{8.47472}
-\pgfmath@def{atan}{150}{8.53076} \pgfmath@def{atan}{151}{8.58679}
-\pgfmath@def{atan}{152}{8.64280} \pgfmath@def{atan}{153}{8.69879}
-\pgfmath@def{atan}{154}{8.75477} \pgfmath@def{atan}{155}{8.81073}
-\pgfmath@def{atan}{156}{8.86667} \pgfmath@def{atan}{157}{8.92260}
-\pgfmath@def{atan}{158}{8.97851} \pgfmath@def{atan}{159}{9.03440}
-\pgfmath@def{atan}{160}{9.09027} \pgfmath@def{atan}{161}{9.14613}
-\pgfmath@def{atan}{162}{9.20197} \pgfmath@def{atan}{163}{9.25779}
-\pgfmath@def{atan}{164}{9.31359} \pgfmath@def{atan}{165}{9.36938}
-\pgfmath@def{atan}{166}{9.42515} \pgfmath@def{atan}{167}{9.48090}
-\pgfmath@def{atan}{168}{9.53663} \pgfmath@def{atan}{169}{9.59235}
-\pgfmath@def{atan}{170}{9.64804} \pgfmath@def{atan}{171}{9.70372}
-\pgfmath@def{atan}{172}{9.75938} \pgfmath@def{atan}{173}{9.81502}
-\pgfmath@def{atan}{174}{9.87064} \pgfmath@def{atan}{175}{9.92624}
-\pgfmath@def{atan}{176}{9.98182} \pgfmath@def{atan}{177}{10.03739}
-\pgfmath@def{atan}{178}{10.09294} \pgfmath@def{atan}{179}{10.14846}
-\pgfmath@def{atan}{180}{10.20397} \pgfmath@def{atan}{181}{10.25946}
-\pgfmath@def{atan}{182}{10.31493} \pgfmath@def{atan}{183}{10.37037}
-\pgfmath@def{atan}{184}{10.42580} \pgfmath@def{atan}{185}{10.48121}
-\pgfmath@def{atan}{186}{10.53660} \pgfmath@def{atan}{187}{10.59197}
-\pgfmath@def{atan}{188}{10.64732} \pgfmath@def{atan}{189}{10.70265}
-\pgfmath@def{atan}{190}{10.75796} \pgfmath@def{atan}{191}{10.81325}
-\pgfmath@def{atan}{192}{10.86852} \pgfmath@def{atan}{193}{10.92377}
-\pgfmath@def{atan}{194}{10.97900} \pgfmath@def{atan}{195}{11.03420}
-\pgfmath@def{atan}{196}{11.08939} \pgfmath@def{atan}{197}{11.14456}
-\pgfmath@def{atan}{198}{11.19970} \pgfmath@def{atan}{199}{11.25483}
-\pgfmath@def{atan}{200}{11.30993} \pgfmath@def{atan}{201}{11.36501}
-\pgfmath@def{atan}{202}{11.42007} \pgfmath@def{atan}{203}{11.47511}
-\pgfmath@def{atan}{204}{11.53013} \pgfmath@def{atan}{205}{11.58512}
-\pgfmath@def{atan}{206}{11.64010} \pgfmath@def{atan}{207}{11.69505}
-\pgfmath@def{atan}{208}{11.74998} \pgfmath@def{atan}{209}{11.80489}
-\pgfmath@def{atan}{210}{11.85977} \pgfmath@def{atan}{211}{11.91464}
-\pgfmath@def{atan}{212}{11.96948} \pgfmath@def{atan}{213}{12.02430}
-\pgfmath@def{atan}{214}{12.07910} \pgfmath@def{atan}{215}{12.13388}
-\pgfmath@def{atan}{216}{12.18863} \pgfmath@def{atan}{217}{12.24336}
-\pgfmath@def{atan}{218}{12.29807} \pgfmath@def{atan}{219}{12.35275}
-\pgfmath@def{atan}{220}{12.40741} \pgfmath@def{atan}{221}{12.46205}
-\pgfmath@def{atan}{222}{12.51667} \pgfmath@def{atan}{223}{12.57126}
-\pgfmath@def{atan}{224}{12.62583} \pgfmath@def{atan}{225}{12.68038}
-\pgfmath@def{atan}{226}{12.73490} \pgfmath@def{atan}{227}{12.78940}
-\pgfmath@def{atan}{228}{12.84388} \pgfmath@def{atan}{229}{12.89833}
-\pgfmath@def{atan}{230}{12.95276} \pgfmath@def{atan}{231}{13.00717}
-\pgfmath@def{atan}{232}{13.06155} \pgfmath@def{atan}{233}{13.11590}
-\pgfmath@def{atan}{234}{13.17024} \pgfmath@def{atan}{235}{13.22455}
-\pgfmath@def{atan}{236}{13.27883} \pgfmath@def{atan}{237}{13.33309}
-\pgfmath@def{atan}{238}{13.38733} \pgfmath@def{atan}{239}{13.44154}
-\pgfmath@def{atan}{240}{13.49573} \pgfmath@def{atan}{241}{13.54989}
-\pgfmath@def{atan}{242}{13.60403} \pgfmath@def{atan}{243}{13.65814}
-\pgfmath@def{atan}{244}{13.71223} \pgfmath@def{atan}{245}{13.76630}
-\pgfmath@def{atan}{246}{13.82034} \pgfmath@def{atan}{247}{13.87435}
-\pgfmath@def{atan}{248}{13.92834} \pgfmath@def{atan}{249}{13.98230}
-\pgfmath@def{atan}{250}{14.03624} \pgfmath@def{atan}{251}{14.09015}
-\pgfmath@def{atan}{252}{14.14404} \pgfmath@def{atan}{253}{14.19790}
-\pgfmath@def{atan}{254}{14.25174} \pgfmath@def{atan}{255}{14.30555}
-\pgfmath@def{atan}{256}{14.35933} \pgfmath@def{atan}{257}{14.41309}
-\pgfmath@def{atan}{258}{14.46682} \pgfmath@def{atan}{259}{14.52053}
-\pgfmath@def{atan}{260}{14.57421} \pgfmath@def{atan}{261}{14.62787}
-\pgfmath@def{atan}{262}{14.68149} \pgfmath@def{atan}{263}{14.73510}
-\pgfmath@def{atan}{264}{14.78867} \pgfmath@def{atan}{265}{14.84222}
-\pgfmath@def{atan}{266}{14.89575} \pgfmath@def{atan}{267}{14.94924}
-\pgfmath@def{atan}{268}{15.00271} \pgfmath@def{atan}{269}{15.05615}
-\pgfmath@def{atan}{270}{15.10957} \pgfmath@def{atan}{271}{15.16296}
-\pgfmath@def{atan}{272}{15.21632} \pgfmath@def{atan}{273}{15.26966}
-\pgfmath@def{atan}{274}{15.32297} \pgfmath@def{atan}{275}{15.37625}
-\pgfmath@def{atan}{276}{15.42950} \pgfmath@def{atan}{277}{15.48273}
-\pgfmath@def{atan}{278}{15.53593} \pgfmath@def{atan}{279}{15.58910}
-\pgfmath@def{atan}{280}{15.64224} \pgfmath@def{atan}{281}{15.69536}
-\pgfmath@def{atan}{282}{15.74845} \pgfmath@def{atan}{283}{15.80151}
-\pgfmath@def{atan}{284}{15.85454} \pgfmath@def{atan}{285}{15.90755}
-\pgfmath@def{atan}{286}{15.96052} \pgfmath@def{atan}{287}{16.01347}
-\pgfmath@def{atan}{288}{16.06640} \pgfmath@def{atan}{289}{16.11929}
-\pgfmath@def{atan}{290}{16.17215} \pgfmath@def{atan}{291}{16.22499}
-\pgfmath@def{atan}{292}{16.27780} \pgfmath@def{atan}{293}{16.33058}
-\pgfmath@def{atan}{294}{16.38333} \pgfmath@def{atan}{295}{16.43605}
-\pgfmath@def{atan}{296}{16.48875} \pgfmath@def{atan}{297}{16.54142}
-\pgfmath@def{atan}{298}{16.59405} \pgfmath@def{atan}{299}{16.64666}
-\pgfmath@def{atan}{300}{16.69924} \pgfmath@def{atan}{301}{16.75179}
-\pgfmath@def{atan}{302}{16.80431} \pgfmath@def{atan}{303}{16.85680}
-\pgfmath@def{atan}{304}{16.90927} \pgfmath@def{atan}{305}{16.96170}
-\pgfmath@def{atan}{306}{17.01411} \pgfmath@def{atan}{307}{17.06648}
-\pgfmath@def{atan}{308}{17.11883} \pgfmath@def{atan}{309}{17.17114}
-\pgfmath@def{atan}{310}{17.22343} \pgfmath@def{atan}{311}{17.27569}
-\pgfmath@def{atan}{312}{17.32792} \pgfmath@def{atan}{313}{17.38012}
-\pgfmath@def{atan}{314}{17.43228} \pgfmath@def{atan}{315}{17.48442}
-\pgfmath@def{atan}{316}{17.53653} \pgfmath@def{atan}{317}{17.58861}
-\pgfmath@def{atan}{318}{17.64066} \pgfmath@def{atan}{319}{17.69268}
-\pgfmath@def{atan}{320}{17.74467} \pgfmath@def{atan}{321}{17.79663}
-\pgfmath@def{atan}{322}{17.84855} \pgfmath@def{atan}{323}{17.90045}
-\pgfmath@def{atan}{324}{17.95232} \pgfmath@def{atan}{325}{18.00416}
-\pgfmath@def{atan}{326}{18.05596} \pgfmath@def{atan}{327}{18.10774}
-\pgfmath@def{atan}{328}{18.15949} \pgfmath@def{atan}{329}{18.21120}
-\pgfmath@def{atan}{330}{18.26289} \pgfmath@def{atan}{331}{18.31454}
-\pgfmath@def{atan}{332}{18.36616} \pgfmath@def{atan}{333}{18.41775}
-\pgfmath@def{atan}{334}{18.46931} \pgfmath@def{atan}{335}{18.52084}
-\pgfmath@def{atan}{336}{18.57234} \pgfmath@def{atan}{337}{18.62381}
-\pgfmath@def{atan}{338}{18.67525} \pgfmath@def{atan}{339}{18.72665}
-\pgfmath@def{atan}{340}{18.77803} \pgfmath@def{atan}{341}{18.82937}
-\pgfmath@def{atan}{342}{18.88068} \pgfmath@def{atan}{343}{18.93196}
-\pgfmath@def{atan}{344}{18.98321} \pgfmath@def{atan}{345}{19.03443}
-\pgfmath@def{atan}{346}{19.08562} \pgfmath@def{atan}{347}{19.13677}
-\pgfmath@def{atan}{348}{19.18789} \pgfmath@def{atan}{349}{19.23898}
-\pgfmath@def{atan}{350}{19.29004} \pgfmath@def{atan}{351}{19.34107}
-\pgfmath@def{atan}{352}{19.39206} \pgfmath@def{atan}{353}{19.44303}
-\pgfmath@def{atan}{354}{19.49396} \pgfmath@def{atan}{355}{19.54486}
-\pgfmath@def{atan}{356}{19.59572} \pgfmath@def{atan}{357}{19.64656}
-\pgfmath@def{atan}{358}{19.69736} \pgfmath@def{atan}{359}{19.74813}
-\pgfmath@def{atan}{360}{19.79887} \pgfmath@def{atan}{361}{19.84958}
-\pgfmath@def{atan}{362}{19.90025} \pgfmath@def{atan}{363}{19.95089}
-\pgfmath@def{atan}{364}{20.00150} \pgfmath@def{atan}{365}{20.05208}
-\pgfmath@def{atan}{366}{20.10262} \pgfmath@def{atan}{367}{20.15313}
-\pgfmath@def{atan}{368}{20.20361} \pgfmath@def{atan}{369}{20.25406}
-\pgfmath@def{atan}{370}{20.30447} \pgfmath@def{atan}{371}{20.35485}
-\pgfmath@def{atan}{372}{20.40520} \pgfmath@def{atan}{373}{20.45551}
-\pgfmath@def{atan}{374}{20.50579} \pgfmath@def{atan}{375}{20.55604}
-\pgfmath@def{atan}{376}{20.60626} \pgfmath@def{atan}{377}{20.65644}
-\pgfmath@def{atan}{378}{20.70659} \pgfmath@def{atan}{379}{20.75670}
-\pgfmath@def{atan}{380}{20.80679} \pgfmath@def{atan}{381}{20.85684}
-\pgfmath@def{atan}{382}{20.90685} \pgfmath@def{atan}{383}{20.95684}
-\pgfmath@def{atan}{384}{21.00678} \pgfmath@def{atan}{385}{21.05670}
-\pgfmath@def{atan}{386}{21.10658} \pgfmath@def{atan}{387}{21.15643}
-\pgfmath@def{atan}{388}{21.20625} \pgfmath@def{atan}{389}{21.25603}
-\pgfmath@def{atan}{390}{21.30578} \pgfmath@def{atan}{391}{21.35549}
-\pgfmath@def{atan}{392}{21.40517} \pgfmath@def{atan}{393}{21.45482}
-\pgfmath@def{atan}{394}{21.50444} \pgfmath@def{atan}{395}{21.55402}
-\pgfmath@def{atan}{396}{21.60356} \pgfmath@def{atan}{397}{21.65307}
-\pgfmath@def{atan}{398}{21.70255} \pgfmath@def{atan}{399}{21.75200}
-\pgfmath@def{atan}{400}{21.80140} \pgfmath@def{atan}{401}{21.85078}
-\pgfmath@def{atan}{402}{21.90012} \pgfmath@def{atan}{403}{21.94943}
-\pgfmath@def{atan}{404}{21.99870} \pgfmath@def{atan}{405}{22.04794}
-\pgfmath@def{atan}{406}{22.09715} \pgfmath@def{atan}{407}{22.14632}
-\pgfmath@def{atan}{408}{22.19546} \pgfmath@def{atan}{409}{22.24456}
-\pgfmath@def{atan}{410}{22.29362} \pgfmath@def{atan}{411}{22.34266}
-\pgfmath@def{atan}{412}{22.39166} \pgfmath@def{atan}{413}{22.44062}
-\pgfmath@def{atan}{414}{22.48955} \pgfmath@def{atan}{415}{22.53845}
-\pgfmath@def{atan}{416}{22.58731} \pgfmath@def{atan}{417}{22.63613}
-\pgfmath@def{atan}{418}{22.68492} \pgfmath@def{atan}{419}{22.73368}
-\pgfmath@def{atan}{420}{22.78240} \pgfmath@def{atan}{421}{22.83109}
-\pgfmath@def{atan}{422}{22.87974} \pgfmath@def{atan}{423}{22.92836}
-\pgfmath@def{atan}{424}{22.97694} \pgfmath@def{atan}{425}{23.02549}
-\pgfmath@def{atan}{426}{23.07400} \pgfmath@def{atan}{427}{23.12248}
-\pgfmath@def{atan}{428}{23.17092} \pgfmath@def{atan}{429}{23.21933}
-\pgfmath@def{atan}{430}{23.26770} \pgfmath@def{atan}{431}{23.31604}
-\pgfmath@def{atan}{432}{23.36434} \pgfmath@def{atan}{433}{23.41261}
-\pgfmath@def{atan}{434}{23.46084} \pgfmath@def{atan}{435}{23.50904}
-\pgfmath@def{atan}{436}{23.55720} \pgfmath@def{atan}{437}{23.60532}
-\pgfmath@def{atan}{438}{23.65341} \pgfmath@def{atan}{439}{23.70147}
-\pgfmath@def{atan}{440}{23.74949} \pgfmath@def{atan}{441}{23.79747}
-\pgfmath@def{atan}{442}{23.84542} \pgfmath@def{atan}{443}{23.89334}
-\pgfmath@def{atan}{444}{23.94122} \pgfmath@def{atan}{445}{23.98906}
-\pgfmath@def{atan}{446}{24.03687} \pgfmath@def{atan}{447}{24.08464}
-\pgfmath@def{atan}{448}{24.13238} \pgfmath@def{atan}{449}{24.18008}
-\pgfmath@def{atan}{450}{24.22774} \pgfmath@def{atan}{451}{24.27537}
-\pgfmath@def{atan}{452}{24.32296} \pgfmath@def{atan}{453}{24.37052}
-\pgfmath@def{atan}{454}{24.41804} \pgfmath@def{atan}{455}{24.46553}
-\pgfmath@def{atan}{456}{24.51298} \pgfmath@def{atan}{457}{24.56040}
-\pgfmath@def{atan}{458}{24.60778} \pgfmath@def{atan}{459}{24.65512}
-\pgfmath@def{atan}{460}{24.70243} \pgfmath@def{atan}{461}{24.74970}
-\pgfmath@def{atan}{462}{24.79693} \pgfmath@def{atan}{463}{24.84413}
-\pgfmath@def{atan}{464}{24.89130} \pgfmath@def{atan}{465}{24.93842}
-\pgfmath@def{atan}{466}{24.98551} \pgfmath@def{atan}{467}{25.03257}
-\pgfmath@def{atan}{468}{25.07959} \pgfmath@def{atan}{469}{25.12657}
-\pgfmath@def{atan}{470}{25.17352} \pgfmath@def{atan}{471}{25.22043}
-\pgfmath@def{atan}{472}{25.26731} \pgfmath@def{atan}{473}{25.31414}
-\pgfmath@def{atan}{474}{25.36095} \pgfmath@def{atan}{475}{25.40771}
-\pgfmath@def{atan}{476}{25.45444} \pgfmath@def{atan}{477}{25.50114}
-\pgfmath@def{atan}{478}{25.54780} \pgfmath@def{atan}{479}{25.59442}
-\pgfmath@def{atan}{480}{25.64100} \pgfmath@def{atan}{481}{25.68755}
-\pgfmath@def{atan}{482}{25.73406} \pgfmath@def{atan}{483}{25.78054}
-\pgfmath@def{atan}{484}{25.82698} \pgfmath@def{atan}{485}{25.87338}
-\pgfmath@def{atan}{486}{25.91975} \pgfmath@def{atan}{487}{25.96608}
-\pgfmath@def{atan}{488}{26.01237} \pgfmath@def{atan}{489}{26.05863}
-\pgfmath@def{atan}{490}{26.10485} \pgfmath@def{atan}{491}{26.15103}
-\pgfmath@def{atan}{492}{26.19718} \pgfmath@def{atan}{493}{26.24329}
-\pgfmath@def{atan}{494}{26.28937} \pgfmath@def{atan}{495}{26.33541}
-\pgfmath@def{atan}{496}{26.38141} \pgfmath@def{atan}{497}{26.42737}
-\pgfmath@def{atan}{498}{26.47330} \pgfmath@def{atan}{499}{26.51919}
-\pgfmath@def{atan}{500}{26.56505} \pgfmath@def{atan}{501}{26.61086}
-\pgfmath@def{atan}{502}{26.65665} \pgfmath@def{atan}{503}{26.70239}
-\pgfmath@def{atan}{504}{26.74810} \pgfmath@def{atan}{505}{26.79377}
-\pgfmath@def{atan}{506}{26.83941} \pgfmath@def{atan}{507}{26.88500}
-\pgfmath@def{atan}{508}{26.93057} \pgfmath@def{atan}{509}{26.97609}
-\pgfmath@def{atan}{510}{27.02158} \pgfmath@def{atan}{511}{27.06703}
-\pgfmath@def{atan}{512}{27.11244} \pgfmath@def{atan}{513}{27.15782}
-\pgfmath@def{atan}{514}{27.20316} \pgfmath@def{atan}{515}{27.24846}
-\pgfmath@def{atan}{516}{27.29373} \pgfmath@def{atan}{517}{27.33896}
-\pgfmath@def{atan}{518}{27.38415} \pgfmath@def{atan}{519}{27.42931}
-\pgfmath@def{atan}{520}{27.47443} \pgfmath@def{atan}{521}{27.51951}
-\pgfmath@def{atan}{522}{27.56455} \pgfmath@def{atan}{523}{27.60956}
-\pgfmath@def{atan}{524}{27.65453} \pgfmath@def{atan}{525}{27.69947}
-\pgfmath@def{atan}{526}{27.74437} \pgfmath@def{atan}{527}{27.78923}
-\pgfmath@def{atan}{528}{27.83405} \pgfmath@def{atan}{529}{27.87884}
-\pgfmath@def{atan}{530}{27.92359} \pgfmath@def{atan}{531}{27.96830}
-\pgfmath@def{atan}{532}{28.01297} \pgfmath@def{atan}{533}{28.05761}
-\pgfmath@def{atan}{534}{28.10221} \pgfmath@def{atan}{535}{28.14678}
-\pgfmath@def{atan}{536}{28.19130} \pgfmath@def{atan}{537}{28.23579}
-\pgfmath@def{atan}{538}{28.28025} \pgfmath@def{atan}{539}{28.32466}
-\pgfmath@def{atan}{540}{28.36904} \pgfmath@def{atan}{541}{28.41338}
-\pgfmath@def{atan}{542}{28.45769} \pgfmath@def{atan}{543}{28.50196}
-\pgfmath@def{atan}{544}{28.54619} \pgfmath@def{atan}{545}{28.59038}
-\pgfmath@def{atan}{546}{28.63454} \pgfmath@def{atan}{547}{28.67865}
-\pgfmath@def{atan}{548}{28.72274} \pgfmath@def{atan}{549}{28.76678}
-\pgfmath@def{atan}{550}{28.81079} \pgfmath@def{atan}{551}{28.85476}
-\pgfmath@def{atan}{552}{28.89869} \pgfmath@def{atan}{553}{28.94259}
-\pgfmath@def{atan}{554}{28.98645} \pgfmath@def{atan}{555}{29.03027}
-\pgfmath@def{atan}{556}{29.07405} \pgfmath@def{atan}{557}{29.11780}
-\pgfmath@def{atan}{558}{29.16151} \pgfmath@def{atan}{559}{29.20519}
-\pgfmath@def{atan}{560}{29.24882} \pgfmath@def{atan}{561}{29.29242}
-\pgfmath@def{atan}{562}{29.33598} \pgfmath@def{atan}{563}{29.37951}
-\pgfmath@def{atan}{564}{29.42299} \pgfmath@def{atan}{565}{29.46644}
-\pgfmath@def{atan}{566}{29.50986} \pgfmath@def{atan}{567}{29.55323}
-\pgfmath@def{atan}{568}{29.59657} \pgfmath@def{atan}{569}{29.63987}
-\pgfmath@def{atan}{570}{29.68314} \pgfmath@def{atan}{571}{29.72636}
-\pgfmath@def{atan}{572}{29.76955} \pgfmath@def{atan}{573}{29.81270}
-\pgfmath@def{atan}{574}{29.85582} \pgfmath@def{atan}{575}{29.89890}
-\pgfmath@def{atan}{576}{29.94194} \pgfmath@def{atan}{577}{29.98494}
-\pgfmath@def{atan}{578}{30.02791} \pgfmath@def{atan}{579}{30.07084}
-\pgfmath@def{atan}{580}{30.11373} \pgfmath@def{atan}{581}{30.15658}
-\pgfmath@def{atan}{582}{30.19940} \pgfmath@def{atan}{583}{30.24218}
-\pgfmath@def{atan}{584}{30.28492} \pgfmath@def{atan}{585}{30.32763}
-\pgfmath@def{atan}{586}{30.37030} \pgfmath@def{atan}{587}{30.41293}
-\pgfmath@def{atan}{588}{30.45552} \pgfmath@def{atan}{589}{30.49808}
-\pgfmath@def{atan}{590}{30.54060} \pgfmath@def{atan}{591}{30.58308}
-\pgfmath@def{atan}{592}{30.62553} \pgfmath@def{atan}{593}{30.66794}
-\pgfmath@def{atan}{594}{30.71031} \pgfmath@def{atan}{595}{30.75264}
-\pgfmath@def{atan}{596}{30.79494} \pgfmath@def{atan}{597}{30.83720}
-\pgfmath@def{atan}{598}{30.87942} \pgfmath@def{atan}{599}{30.92160}
-\pgfmath@def{atan}{600}{30.96375} \pgfmath@def{atan}{601}{31.00586}
-\pgfmath@def{atan}{602}{31.04794} \pgfmath@def{atan}{603}{31.08997}
-\pgfmath@def{atan}{604}{31.13197} \pgfmath@def{atan}{605}{31.17393}
-\pgfmath@def{atan}{606}{31.21586} \pgfmath@def{atan}{607}{31.25775}
-\pgfmath@def{atan}{608}{31.29960} \pgfmath@def{atan}{609}{31.34141}
-\pgfmath@def{atan}{610}{31.38319} \pgfmath@def{atan}{611}{31.42493}
-\pgfmath@def{atan}{612}{31.46663} \pgfmath@def{atan}{613}{31.50829}
-\pgfmath@def{atan}{614}{31.54992} \pgfmath@def{atan}{615}{31.59151}
-\pgfmath@def{atan}{616}{31.63306} \pgfmath@def{atan}{617}{31.67458}
-\pgfmath@def{atan}{618}{31.71606} \pgfmath@def{atan}{619}{31.75750}
-\pgfmath@def{atan}{620}{31.79891} \pgfmath@def{atan}{621}{31.84028}
-\pgfmath@def{atan}{622}{31.88161} \pgfmath@def{atan}{623}{31.92290}
-\pgfmath@def{atan}{624}{31.96416} \pgfmath@def{atan}{625}{32.00538}
-\pgfmath@def{atan}{626}{32.04656} \pgfmath@def{atan}{627}{32.08771}
-\pgfmath@def{atan}{628}{32.12882} \pgfmath@def{atan}{629}{32.16989}
-\pgfmath@def{atan}{630}{32.21092} \pgfmath@def{atan}{631}{32.25192}
-\pgfmath@def{atan}{632}{32.29288} \pgfmath@def{atan}{633}{32.33381}
-\pgfmath@def{atan}{634}{32.37469} \pgfmath@def{atan}{635}{32.41554}
-\pgfmath@def{atan}{636}{32.45636} \pgfmath@def{atan}{637}{32.49713}
-\pgfmath@def{atan}{638}{32.53787} \pgfmath@def{atan}{639}{32.57857}
-\pgfmath@def{atan}{640}{32.61924} \pgfmath@def{atan}{641}{32.65987}
-\pgfmath@def{atan}{642}{32.70046} \pgfmath@def{atan}{643}{32.74101}
-\pgfmath@def{atan}{644}{32.78153} \pgfmath@def{atan}{645}{32.82201}
-\pgfmath@def{atan}{646}{32.86246} \pgfmath@def{atan}{647}{32.90286}
-\pgfmath@def{atan}{648}{32.94323} \pgfmath@def{atan}{649}{32.98357}
-\pgfmath@def{atan}{650}{33.02386} \pgfmath@def{atan}{651}{33.06412}
-\pgfmath@def{atan}{652}{33.10435} \pgfmath@def{atan}{653}{33.14453}
-\pgfmath@def{atan}{654}{33.18468} \pgfmath@def{atan}{655}{33.22479}
-\pgfmath@def{atan}{656}{33.26487} \pgfmath@def{atan}{657}{33.30491}
-\pgfmath@def{atan}{658}{33.34491} \pgfmath@def{atan}{659}{33.38488}
-\pgfmath@def{atan}{660}{33.42481} \pgfmath@def{atan}{661}{33.46470}
-\pgfmath@def{atan}{662}{33.50455} \pgfmath@def{atan}{663}{33.54437}
-\pgfmath@def{atan}{664}{33.58416} \pgfmath@def{atan}{665}{33.62390}
-\pgfmath@def{atan}{666}{33.66361} \pgfmath@def{atan}{667}{33.70328}
-\pgfmath@def{atan}{668}{33.74292} \pgfmath@def{atan}{669}{33.78252}
-\pgfmath@def{atan}{670}{33.82208} \pgfmath@def{atan}{671}{33.86161}
-\pgfmath@def{atan}{672}{33.90110} \pgfmath@def{atan}{673}{33.94055}
-\pgfmath@def{atan}{674}{33.97997} \pgfmath@def{atan}{675}{34.01935}
-\pgfmath@def{atan}{676}{34.05869} \pgfmath@def{atan}{677}{34.09800}
-\pgfmath@def{atan}{678}{34.13727} \pgfmath@def{atan}{679}{34.17650}
-\pgfmath@def{atan}{680}{34.21570} \pgfmath@def{atan}{681}{34.25486}
-\pgfmath@def{atan}{682}{34.29398} \pgfmath@def{atan}{683}{34.33307}
-\pgfmath@def{atan}{684}{34.37212} \pgfmath@def{atan}{685}{34.41114}
-\pgfmath@def{atan}{686}{34.45012} \pgfmath@def{atan}{687}{34.48906}
-\pgfmath@def{atan}{688}{34.52797} \pgfmath@def{atan}{689}{34.56684}
-\pgfmath@def{atan}{690}{34.60567} \pgfmath@def{atan}{691}{34.64447}
-\pgfmath@def{atan}{692}{34.68323} \pgfmath@def{atan}{693}{34.72195}
-\pgfmath@def{atan}{694}{34.76064} \pgfmath@def{atan}{695}{34.79930}
-\pgfmath@def{atan}{696}{34.83791} \pgfmath@def{atan}{697}{34.87649}
-\pgfmath@def{atan}{698}{34.91504} \pgfmath@def{atan}{699}{34.95354}
-\pgfmath@def{atan}{700}{34.99202} \pgfmath@def{atan}{701}{35.03045}
-\pgfmath@def{atan}{702}{35.06885} \pgfmath@def{atan}{703}{35.10721}
-\pgfmath@def{atan}{704}{35.14554} \pgfmath@def{atan}{705}{35.18383}
-\pgfmath@def{atan}{706}{35.22209} \pgfmath@def{atan}{707}{35.26031}
-\pgfmath@def{atan}{708}{35.29849} \pgfmath@def{atan}{709}{35.33664}
-\pgfmath@def{atan}{710}{35.37475} \pgfmath@def{atan}{711}{35.41282}
-\pgfmath@def{atan}{712}{35.45086} \pgfmath@def{atan}{713}{35.48886}
-\pgfmath@def{atan}{714}{35.52683} \pgfmath@def{atan}{715}{35.56476}
-\pgfmath@def{atan}{716}{35.60266} \pgfmath@def{atan}{717}{35.64052}
-\pgfmath@def{atan}{718}{35.67834} \pgfmath@def{atan}{719}{35.71613}
-\pgfmath@def{atan}{720}{35.75388} \pgfmath@def{atan}{721}{35.79160}
-\pgfmath@def{atan}{722}{35.82928} \pgfmath@def{atan}{723}{35.86692}
-\pgfmath@def{atan}{724}{35.90453} \pgfmath@def{atan}{725}{35.94211}
-\pgfmath@def{atan}{726}{35.97965} \pgfmath@def{atan}{727}{36.01715}
-\pgfmath@def{atan}{728}{36.05461} \pgfmath@def{atan}{729}{36.09204}
-\pgfmath@def{atan}{730}{36.12944} \pgfmath@def{atan}{731}{36.16680}
-\pgfmath@def{atan}{732}{36.20412} \pgfmath@def{atan}{733}{36.24141}
-\pgfmath@def{atan}{734}{36.27866} \pgfmath@def{atan}{735}{36.31588}
-\pgfmath@def{atan}{736}{36.35306} \pgfmath@def{atan}{737}{36.39021}
-\pgfmath@def{atan}{738}{36.42732} \pgfmath@def{atan}{739}{36.46440}
-\pgfmath@def{atan}{740}{36.50144} \pgfmath@def{atan}{741}{36.53844}
-\pgfmath@def{atan}{742}{36.57541} \pgfmath@def{atan}{743}{36.61234}
-\pgfmath@def{atan}{744}{36.64924} \pgfmath@def{atan}{745}{36.68611}
-\pgfmath@def{atan}{746}{36.72293} \pgfmath@def{atan}{747}{36.75973}
-\pgfmath@def{atan}{748}{36.79648} \pgfmath@def{atan}{749}{36.83321}
-\pgfmath@def{atan}{750}{36.86989} \pgfmath@def{atan}{751}{36.90654}
-\pgfmath@def{atan}{752}{36.94316} \pgfmath@def{atan}{753}{36.97974}
-\pgfmath@def{atan}{754}{37.01629} \pgfmath@def{atan}{755}{37.05280}
-\pgfmath@def{atan}{756}{37.08928} \pgfmath@def{atan}{757}{37.12572}
-\pgfmath@def{atan}{758}{37.16212} \pgfmath@def{atan}{759}{37.19849}
-\pgfmath@def{atan}{760}{37.23483} \pgfmath@def{atan}{761}{37.27113}
-\pgfmath@def{atan}{762}{37.30740} \pgfmath@def{atan}{763}{37.34363}
-\pgfmath@def{atan}{764}{37.37982} \pgfmath@def{atan}{765}{37.41598}
-\pgfmath@def{atan}{766}{37.45211} \pgfmath@def{atan}{767}{37.48820}
-\pgfmath@def{atan}{768}{37.52426} \pgfmath@def{atan}{769}{37.56028}
-\pgfmath@def{atan}{770}{37.59627} \pgfmath@def{atan}{771}{37.63222}
-\pgfmath@def{atan}{772}{37.66814} \pgfmath@def{atan}{773}{37.70402}
-\pgfmath@def{atan}{774}{37.73987} \pgfmath@def{atan}{775}{37.77568}
-\pgfmath@def{atan}{776}{37.81146} \pgfmath@def{atan}{777}{37.84720}
-\pgfmath@def{atan}{778}{37.88291} \pgfmath@def{atan}{779}{37.91859}
-\pgfmath@def{atan}{780}{37.95423} \pgfmath@def{atan}{781}{37.98983}
-\pgfmath@def{atan}{782}{38.02540} \pgfmath@def{atan}{783}{38.06094}
-\pgfmath@def{atan}{784}{38.09644} \pgfmath@def{atan}{785}{38.13191}
-\pgfmath@def{atan}{786}{38.16734} \pgfmath@def{atan}{787}{38.20274}
-\pgfmath@def{atan}{788}{38.23811} \pgfmath@def{atan}{789}{38.27344}
-\pgfmath@def{atan}{790}{38.30873} \pgfmath@def{atan}{791}{38.34399}
-\pgfmath@def{atan}{792}{38.37922} \pgfmath@def{atan}{793}{38.41441}
-\pgfmath@def{atan}{794}{38.44957} \pgfmath@def{atan}{795}{38.48469}
-\pgfmath@def{atan}{796}{38.51979} \pgfmath@def{atan}{797}{38.55484}
-\pgfmath@def{atan}{798}{38.58986} \pgfmath@def{atan}{799}{38.62485}
-\pgfmath@def{atan}{800}{38.65980} \pgfmath@def{atan}{801}{38.69472}
-\pgfmath@def{atan}{802}{38.72961} \pgfmath@def{atan}{803}{38.76446}
-\pgfmath@def{atan}{804}{38.79928} \pgfmath@def{atan}{805}{38.83406}
-\pgfmath@def{atan}{806}{38.86881} \pgfmath@def{atan}{807}{38.90353}
-\pgfmath@def{atan}{808}{38.93821} \pgfmath@def{atan}{809}{38.97285}
-\pgfmath@def{atan}{810}{39.00747} \pgfmath@def{atan}{811}{39.04205}
-\pgfmath@def{atan}{812}{39.07659} \pgfmath@def{atan}{813}{39.11111}
-\pgfmath@def{atan}{814}{39.14558} \pgfmath@def{atan}{815}{39.18003}
-\pgfmath@def{atan}{816}{39.21444} \pgfmath@def{atan}{817}{39.24882}
-\pgfmath@def{atan}{818}{39.28316} \pgfmath@def{atan}{819}{39.31747}
-\pgfmath@def{atan}{820}{39.35175} \pgfmath@def{atan}{821}{39.38599}
-\pgfmath@def{atan}{822}{39.42020} \pgfmath@def{atan}{823}{39.45438}
-\pgfmath@def{atan}{824}{39.48852} \pgfmath@def{atan}{825}{39.52263}
-\pgfmath@def{atan}{826}{39.55670} \pgfmath@def{atan}{827}{39.59074}
-\pgfmath@def{atan}{828}{39.62475} \pgfmath@def{atan}{829}{39.65873}
-\pgfmath@def{atan}{830}{39.69267} \pgfmath@def{atan}{831}{39.72658}
-\pgfmath@def{atan}{832}{39.76045} \pgfmath@def{atan}{833}{39.79429}
-\pgfmath@def{atan}{834}{39.82810} \pgfmath@def{atan}{835}{39.86188}
-\pgfmath@def{atan}{836}{39.89562} \pgfmath@def{atan}{837}{39.92933}
-\pgfmath@def{atan}{838}{39.96300} \pgfmath@def{atan}{839}{39.99665}
-\pgfmath@def{atan}{840}{40.03025} \pgfmath@def{atan}{841}{40.06383}
-\pgfmath@def{atan}{842}{40.09737} \pgfmath@def{atan}{843}{40.13088}
-\pgfmath@def{atan}{844}{40.16436} \pgfmath@def{atan}{845}{40.19781}
-\pgfmath@def{atan}{846}{40.23122} \pgfmath@def{atan}{847}{40.26459}
-\pgfmath@def{atan}{848}{40.29794} \pgfmath@def{atan}{849}{40.33125}
-\pgfmath@def{atan}{850}{40.36453} \pgfmath@def{atan}{851}{40.39778}
-\pgfmath@def{atan}{852}{40.43099} \pgfmath@def{atan}{853}{40.46417}
-\pgfmath@def{atan}{854}{40.49732} \pgfmath@def{atan}{855}{40.53044}
-\pgfmath@def{atan}{856}{40.56352} \pgfmath@def{atan}{857}{40.59657}
-\pgfmath@def{atan}{858}{40.62959} \pgfmath@def{atan}{859}{40.66257}
-\pgfmath@def{atan}{860}{40.69553} \pgfmath@def{atan}{861}{40.72845}
-\pgfmath@def{atan}{862}{40.76133} \pgfmath@def{atan}{863}{40.79419}
-\pgfmath@def{atan}{864}{40.82701} \pgfmath@def{atan}{865}{40.85980}
-\pgfmath@def{atan}{866}{40.89256} \pgfmath@def{atan}{867}{40.92528}
-\pgfmath@def{atan}{868}{40.95798} \pgfmath@def{atan}{869}{40.99064}
-\pgfmath@def{atan}{870}{41.02326} \pgfmath@def{atan}{871}{41.05586}
-\pgfmath@def{atan}{872}{41.08842} \pgfmath@def{atan}{873}{41.12095}
-\pgfmath@def{atan}{874}{41.15345} \pgfmath@def{atan}{875}{41.18592}
-\pgfmath@def{atan}{876}{41.21836} \pgfmath@def{atan}{877}{41.25076}
-\pgfmath@def{atan}{878}{41.28313} \pgfmath@def{atan}{879}{41.31547}
-\pgfmath@def{atan}{880}{41.34777} \pgfmath@def{atan}{881}{41.38005}
-\pgfmath@def{atan}{882}{41.41229} \pgfmath@def{atan}{883}{41.44450}
-\pgfmath@def{atan}{884}{41.47668} \pgfmath@def{atan}{885}{41.50882}
-\pgfmath@def{atan}{886}{41.54094} \pgfmath@def{atan}{887}{41.57302}
-\pgfmath@def{atan}{888}{41.60507} \pgfmath@def{atan}{889}{41.63709}
-\pgfmath@def{atan}{890}{41.66908} \pgfmath@def{atan}{891}{41.70103}
-\pgfmath@def{atan}{892}{41.73296} \pgfmath@def{atan}{893}{41.76485}
-\pgfmath@def{atan}{894}{41.79671} \pgfmath@def{atan}{895}{41.82854}
-\pgfmath@def{atan}{896}{41.86034} \pgfmath@def{atan}{897}{41.89210}
-\pgfmath@def{atan}{898}{41.92383} \pgfmath@def{atan}{899}{41.95554}
-\pgfmath@def{atan}{900}{41.98721} \pgfmath@def{atan}{901}{42.01885}
-\pgfmath@def{atan}{902}{42.05046} \pgfmath@def{atan}{903}{42.08203}
-\pgfmath@def{atan}{904}{42.11358} \pgfmath@def{atan}{905}{42.14509}
-\pgfmath@def{atan}{906}{42.17657} \pgfmath@def{atan}{907}{42.20802}
-\pgfmath@def{atan}{908}{42.23944} \pgfmath@def{atan}{909}{42.27083}
-\pgfmath@def{atan}{910}{42.30219} \pgfmath@def{atan}{911}{42.33352}
-\pgfmath@def{atan}{912}{42.36481} \pgfmath@def{atan}{913}{42.39607}
-\pgfmath@def{atan}{914}{42.42731} \pgfmath@def{atan}{915}{42.45851}
-\pgfmath@def{atan}{916}{42.48968} \pgfmath@def{atan}{917}{42.52082}
-\pgfmath@def{atan}{918}{42.55193} \pgfmath@def{atan}{919}{42.58300}
-\pgfmath@def{atan}{920}{42.61405} \pgfmath@def{atan}{921}{42.64507}
-\pgfmath@def{atan}{922}{42.67605} \pgfmath@def{atan}{923}{42.70701}
-\pgfmath@def{atan}{924}{42.73793} \pgfmath@def{atan}{925}{42.76882}
-\pgfmath@def{atan}{926}{42.79968} \pgfmath@def{atan}{927}{42.83051}
-\pgfmath@def{atan}{928}{42.86131} \pgfmath@def{atan}{929}{42.89208}
-\pgfmath@def{atan}{930}{42.92282} \pgfmath@def{atan}{931}{42.95353}
-\pgfmath@def{atan}{932}{42.98421} \pgfmath@def{atan}{933}{43.01485}
-\pgfmath@def{atan}{934}{43.04547} \pgfmath@def{atan}{935}{43.07605}
-\pgfmath@def{atan}{936}{43.10661} \pgfmath@def{atan}{937}{43.13713}
-\pgfmath@def{atan}{938}{43.16763} \pgfmath@def{atan}{939}{43.19809}
-\pgfmath@def{atan}{940}{43.22853} \pgfmath@def{atan}{941}{43.25893}
-\pgfmath@def{atan}{942}{43.28930} \pgfmath@def{atan}{943}{43.31964}
-\pgfmath@def{atan}{944}{43.34996} \pgfmath@def{atan}{945}{43.38024}
-\pgfmath@def{atan}{946}{43.41049} \pgfmath@def{atan}{947}{43.44071}
-\pgfmath@def{atan}{948}{43.47090} \pgfmath@def{atan}{949}{43.50106}
-\pgfmath@def{atan}{950}{43.53119} \pgfmath@def{atan}{951}{43.56130}
-\pgfmath@def{atan}{952}{43.59137} \pgfmath@def{atan}{953}{43.62141}
-\pgfmath@def{atan}{954}{43.65142} \pgfmath@def{atan}{955}{43.68140}
-\pgfmath@def{atan}{956}{43.71135} \pgfmath@def{atan}{957}{43.74127}
-\pgfmath@def{atan}{958}{43.77116} \pgfmath@def{atan}{959}{43.80102}
-\pgfmath@def{atan}{960}{43.83086} \pgfmath@def{atan}{961}{43.86066}
-\pgfmath@def{atan}{962}{43.89043} \pgfmath@def{atan}{963}{43.92017}
-\pgfmath@def{atan}{964}{43.94988} \pgfmath@def{atan}{965}{43.97957}
-\pgfmath@def{atan}{966}{44.00922} \pgfmath@def{atan}{967}{44.03884}
-\pgfmath@def{atan}{968}{44.06844} \pgfmath@def{atan}{969}{44.09800}
-\pgfmath@def{atan}{970}{44.12754} \pgfmath@def{atan}{971}{44.15704}
-\pgfmath@def{atan}{972}{44.18652} \pgfmath@def{atan}{973}{44.21597}
-\pgfmath@def{atan}{974}{44.24538} \pgfmath@def{atan}{975}{44.27477}
-\pgfmath@def{atan}{976}{44.30413} \pgfmath@def{atan}{977}{44.33346}
-\pgfmath@def{atan}{978}{44.36276} \pgfmath@def{atan}{979}{44.39203}
-\pgfmath@def{atan}{980}{44.42127} \pgfmath@def{atan}{981}{44.45048}
-\pgfmath@def{atan}{982}{44.47966} \pgfmath@def{atan}{983}{44.50882}
-\pgfmath@def{atan}{984}{44.53794} \pgfmath@def{atan}{985}{44.56704}
-\pgfmath@def{atan}{986}{44.59610} \pgfmath@def{atan}{987}{44.62514}
-\pgfmath@def{atan}{988}{44.65415} \pgfmath@def{atan}{989}{44.68313}
-\pgfmath@def{atan}{990}{44.71208} \pgfmath@def{atan}{991}{44.74100}
-\pgfmath@def{atan}{992}{44.76989} \pgfmath@def{atan}{993}{44.79876}
-\pgfmath@def{atan}{994}{44.82759} \pgfmath@def{atan}{995}{44.85640}
-\pgfmath@def{atan}{996}{44.88517} \pgfmath@def{atan}{997}{44.91392}
-\pgfmath@def{atan}{998}{44.94264} \pgfmath@def{atan}{999}{44.97133}
-\pgfmath@def{atan}{1000}{45.00000}
-
-\pgfmath@def{asin}{0}{0.00000} \pgfmath@def{asin}{1}{0.05729}
-\pgfmath@def{asin}{2}{0.11459} \pgfmath@def{asin}{3}{0.17188}
-\pgfmath@def{asin}{4}{0.22918} \pgfmath@def{asin}{5}{0.28648}
-\pgfmath@def{asin}{6}{0.34377} \pgfmath@def{asin}{7}{0.40107}
-\pgfmath@def{asin}{8}{0.45837} \pgfmath@def{asin}{9}{0.51566}
-\pgfmath@def{asin}{10}{0.57296} \pgfmath@def{asin}{11}{0.63026}
-\pgfmath@def{asin}{12}{0.68756} \pgfmath@def{asin}{13}{0.74486}
-\pgfmath@def{asin}{14}{0.80216} \pgfmath@def{asin}{15}{0.85946}
-\pgfmath@def{asin}{16}{0.91677} \pgfmath@def{asin}{17}{0.97407}
-\pgfmath@def{asin}{18}{1.03138} \pgfmath@def{asin}{19}{1.08868}
-\pgfmath@def{asin}{20}{1.14599} \pgfmath@def{asin}{21}{1.20330}
-\pgfmath@def{asin}{22}{1.26060} \pgfmath@def{asin}{23}{1.31791}
-\pgfmath@def{asin}{24}{1.37523} \pgfmath@def{asin}{25}{1.43254}
-\pgfmath@def{asin}{26}{1.48985} \pgfmath@def{asin}{27}{1.54717}
-\pgfmath@def{asin}{28}{1.60449} \pgfmath@def{asin}{29}{1.66181}
-\pgfmath@def{asin}{30}{1.71913} \pgfmath@def{asin}{31}{1.77645}
-\pgfmath@def{asin}{32}{1.83377} \pgfmath@def{asin}{33}{1.89110}
-\pgfmath@def{asin}{34}{1.94843} \pgfmath@def{asin}{35}{2.00576}
-\pgfmath@def{asin}{36}{2.06309} \pgfmath@def{asin}{37}{2.12042}
-\pgfmath@def{asin}{38}{2.17776} \pgfmath@def{asin}{39}{2.23510}
-\pgfmath@def{asin}{40}{2.29244} \pgfmath@def{asin}{41}{2.34978}
-\pgfmath@def{asin}{42}{2.40713} \pgfmath@def{asin}{43}{2.46447}
-\pgfmath@def{asin}{44}{2.52182} \pgfmath@def{asin}{45}{2.57918}
-\pgfmath@def{asin}{46}{2.63653} \pgfmath@def{asin}{47}{2.69389}
-\pgfmath@def{asin}{48}{2.75125} \pgfmath@def{asin}{49}{2.80861}
-\pgfmath@def{asin}{50}{2.86598} \pgfmath@def{asin}{51}{2.92335}
-\pgfmath@def{asin}{52}{2.98072} \pgfmath@def{asin}{53}{3.03810}
-\pgfmath@def{asin}{54}{3.09547} \pgfmath@def{asin}{55}{3.15285}
-\pgfmath@def{asin}{56}{3.21024} \pgfmath@def{asin}{57}{3.26763}
-\pgfmath@def{asin}{58}{3.32502} \pgfmath@def{asin}{59}{3.38241}
-\pgfmath@def{asin}{60}{3.43981} \pgfmath@def{asin}{61}{3.49721}
-\pgfmath@def{asin}{62}{3.55461} \pgfmath@def{asin}{63}{3.61202}
-\pgfmath@def{asin}{64}{3.66943} \pgfmath@def{asin}{65}{3.72685}
-\pgfmath@def{asin}{66}{3.78427} \pgfmath@def{asin}{67}{3.84169}
-\pgfmath@def{asin}{68}{3.89912} \pgfmath@def{asin}{69}{3.95655}
-\pgfmath@def{asin}{70}{4.01398} \pgfmath@def{asin}{71}{4.07142}
-\pgfmath@def{asin}{72}{4.12886} \pgfmath@def{asin}{73}{4.18631}
-\pgfmath@def{asin}{74}{4.24376} \pgfmath@def{asin}{75}{4.30122}
-\pgfmath@def{asin}{76}{4.35868} \pgfmath@def{asin}{77}{4.41614}
-\pgfmath@def{asin}{78}{4.47361} \pgfmath@def{asin}{79}{4.53108}
-\pgfmath@def{asin}{80}{4.58856} \pgfmath@def{asin}{81}{4.64604}
-\pgfmath@def{asin}{82}{4.70353} \pgfmath@def{asin}{83}{4.76102}
-\pgfmath@def{asin}{84}{4.81852} \pgfmath@def{asin}{85}{4.87602}
-\pgfmath@def{asin}{86}{4.93353} \pgfmath@def{asin}{87}{4.99104}
-\pgfmath@def{asin}{88}{5.04855} \pgfmath@def{asin}{89}{5.10608}
-\pgfmath@def{asin}{90}{5.16360} \pgfmath@def{asin}{91}{5.22113}
-\pgfmath@def{asin}{92}{5.27867} \pgfmath@def{asin}{93}{5.33621}
-\pgfmath@def{asin}{94}{5.39376} \pgfmath@def{asin}{95}{5.45132}
-\pgfmath@def{asin}{96}{5.50887} \pgfmath@def{asin}{97}{5.56644}
-\pgfmath@def{asin}{98}{5.62401} \pgfmath@def{asin}{99}{5.68158}
-\pgfmath@def{asin}{100}{5.73917} \pgfmath@def{asin}{101}{5.79675}
-\pgfmath@def{asin}{102}{5.85435} \pgfmath@def{asin}{103}{5.91195}
-\pgfmath@def{asin}{104}{5.96955} \pgfmath@def{asin}{105}{6.02716}
-\pgfmath@def{asin}{106}{6.08478} \pgfmath@def{asin}{107}{6.14240}
-\pgfmath@def{asin}{108}{6.20003} \pgfmath@def{asin}{109}{6.25767}
-\pgfmath@def{asin}{110}{6.31531} \pgfmath@def{asin}{111}{6.37296}
-\pgfmath@def{asin}{112}{6.43062} \pgfmath@def{asin}{113}{6.48828}
-\pgfmath@def{asin}{114}{6.54595} \pgfmath@def{asin}{115}{6.60362}
-\pgfmath@def{asin}{116}{6.66130} \pgfmath@def{asin}{117}{6.71899}
-\pgfmath@def{asin}{118}{6.77669} \pgfmath@def{asin}{119}{6.83439}
-\pgfmath@def{asin}{120}{6.89210} \pgfmath@def{asin}{121}{6.94981}
-\pgfmath@def{asin}{122}{7.00754} \pgfmath@def{asin}{123}{7.06527}
-\pgfmath@def{asin}{124}{7.12301} \pgfmath@def{asin}{125}{7.18075}
-\pgfmath@def{asin}{126}{7.23850} \pgfmath@def{asin}{127}{7.29626}
-\pgfmath@def{asin}{128}{7.35403} \pgfmath@def{asin}{129}{7.41181}
-\pgfmath@def{asin}{130}{7.46959} \pgfmath@def{asin}{131}{7.52738}
-\pgfmath@def{asin}{132}{7.58518} \pgfmath@def{asin}{133}{7.64298}
-\pgfmath@def{asin}{134}{7.70079} \pgfmath@def{asin}{135}{7.75862}
-\pgfmath@def{asin}{136}{7.81644} \pgfmath@def{asin}{137}{7.87428}
-\pgfmath@def{asin}{138}{7.93213} \pgfmath@def{asin}{139}{7.98998}
-\pgfmath@def{asin}{140}{8.04784} \pgfmath@def{asin}{141}{8.10571}
-\pgfmath@def{asin}{142}{8.16359} \pgfmath@def{asin}{143}{8.22148}
-\pgfmath@def{asin}{144}{8.27937} \pgfmath@def{asin}{145}{8.33727}
-\pgfmath@def{asin}{146}{8.39519} \pgfmath@def{asin}{147}{8.45311}
-\pgfmath@def{asin}{148}{8.51104} \pgfmath@def{asin}{149}{8.56898}
-\pgfmath@def{asin}{150}{8.62692} \pgfmath@def{asin}{151}{8.68488}
-\pgfmath@def{asin}{152}{8.74284} \pgfmath@def{asin}{153}{8.80082}
-\pgfmath@def{asin}{154}{8.85880} \pgfmath@def{asin}{155}{8.91679}
-\pgfmath@def{asin}{156}{8.97479} \pgfmath@def{asin}{157}{9.03280}
-\pgfmath@def{asin}{158}{9.09082} \pgfmath@def{asin}{159}{9.14885}
-\pgfmath@def{asin}{160}{9.20689} \pgfmath@def{asin}{161}{9.26494}
-\pgfmath@def{asin}{162}{9.32300} \pgfmath@def{asin}{163}{9.38107}
-\pgfmath@def{asin}{164}{9.43914} \pgfmath@def{asin}{165}{9.49723}
-\pgfmath@def{asin}{166}{9.55533} \pgfmath@def{asin}{167}{9.61343}
-\pgfmath@def{asin}{168}{9.67155} \pgfmath@def{asin}{169}{9.72968}
-\pgfmath@def{asin}{170}{9.78781} \pgfmath@def{asin}{171}{9.84596}
-\pgfmath@def{asin}{172}{9.90412} \pgfmath@def{asin}{173}{9.96229}
-\pgfmath@def{asin}{174}{10.02047} \pgfmath@def{asin}{175}{10.07865}
-\pgfmath@def{asin}{176}{10.13685} \pgfmath@def{asin}{177}{10.19506}
-\pgfmath@def{asin}{178}{10.25328} \pgfmath@def{asin}{179}{10.31151}
-\pgfmath@def{asin}{180}{10.36976} \pgfmath@def{asin}{181}{10.42801}
-\pgfmath@def{asin}{182}{10.48627} \pgfmath@def{asin}{183}{10.54455}
-\pgfmath@def{asin}{184}{10.60283} \pgfmath@def{asin}{185}{10.66113}
-\pgfmath@def{asin}{186}{10.71944} \pgfmath@def{asin}{187}{10.77775}
-\pgfmath@def{asin}{188}{10.83608} \pgfmath@def{asin}{189}{10.89443}
-\pgfmath@def{asin}{190}{10.95278} \pgfmath@def{asin}{191}{11.01114}
-\pgfmath@def{asin}{192}{11.06952} \pgfmath@def{asin}{193}{11.12791}
-\pgfmath@def{asin}{194}{11.18631} \pgfmath@def{asin}{195}{11.24472}
-\pgfmath@def{asin}{196}{11.30314} \pgfmath@def{asin}{197}{11.36158}
-\pgfmath@def{asin}{198}{11.42002} \pgfmath@def{asin}{199}{11.47848}
-\pgfmath@def{asin}{200}{11.53695} \pgfmath@def{asin}{201}{11.59544}
-\pgfmath@def{asin}{202}{11.65393} \pgfmath@def{asin}{203}{11.71244}
-\pgfmath@def{asin}{204}{11.77096} \pgfmath@def{asin}{205}{11.82949}
-\pgfmath@def{asin}{206}{11.88804} \pgfmath@def{asin}{207}{11.94660}
-\pgfmath@def{asin}{208}{12.00517} \pgfmath@def{asin}{209}{12.06375}
-\pgfmath@def{asin}{210}{12.12235} \pgfmath@def{asin}{211}{12.18096}
-\pgfmath@def{asin}{212}{12.23958} \pgfmath@def{asin}{213}{12.29821}
-\pgfmath@def{asin}{214}{12.35686} \pgfmath@def{asin}{215}{12.41552}
-\pgfmath@def{asin}{216}{12.47420} \pgfmath@def{asin}{217}{12.53288}
-\pgfmath@def{asin}{218}{12.59159} \pgfmath@def{asin}{219}{12.65030}
-\pgfmath@def{asin}{220}{12.70903} \pgfmath@def{asin}{221}{12.76777}
-\pgfmath@def{asin}{222}{12.82653} \pgfmath@def{asin}{223}{12.88529}
-\pgfmath@def{asin}{224}{12.94408} \pgfmath@def{asin}{225}{13.00287}
-\pgfmath@def{asin}{226}{13.06168} \pgfmath@def{asin}{227}{13.12051}
-\pgfmath@def{asin}{228}{13.17935} \pgfmath@def{asin}{229}{13.23820}
-\pgfmath@def{asin}{230}{13.29707} \pgfmath@def{asin}{231}{13.35595}
-\pgfmath@def{asin}{232}{13.41484} \pgfmath@def{asin}{233}{13.47375}
-\pgfmath@def{asin}{234}{13.53268} \pgfmath@def{asin}{235}{13.59162}
-\pgfmath@def{asin}{236}{13.65057} \pgfmath@def{asin}{237}{13.70954}
-\pgfmath@def{asin}{238}{13.76852} \pgfmath@def{asin}{239}{13.82752}
-\pgfmath@def{asin}{240}{13.88654} \pgfmath@def{asin}{241}{13.94556}
-\pgfmath@def{asin}{242}{14.00461} \pgfmath@def{asin}{243}{14.06367}
-\pgfmath@def{asin}{244}{14.12274} \pgfmath@def{asin}{245}{14.18183}
-\pgfmath@def{asin}{246}{14.24093} \pgfmath@def{asin}{247}{14.30005}
-\pgfmath@def{asin}{248}{14.35919} \pgfmath@def{asin}{249}{14.41834}
-\pgfmath@def{asin}{250}{14.47751} \pgfmath@def{asin}{251}{14.53669}
-\pgfmath@def{asin}{252}{14.59589} \pgfmath@def{asin}{253}{14.65510}
-\pgfmath@def{asin}{254}{14.71433} \pgfmath@def{asin}{255}{14.77358}
-\pgfmath@def{asin}{256}{14.83284} \pgfmath@def{asin}{257}{14.89212}
-\pgfmath@def{asin}{258}{14.95142} \pgfmath@def{asin}{259}{15.01073}
-\pgfmath@def{asin}{260}{15.07006} \pgfmath@def{asin}{261}{15.12940}
-\pgfmath@def{asin}{262}{15.18876} \pgfmath@def{asin}{263}{15.24814}
-\pgfmath@def{asin}{264}{15.30754} \pgfmath@def{asin}{265}{15.36695}
-\pgfmath@def{asin}{266}{15.42638} \pgfmath@def{asin}{267}{15.48582}
-\pgfmath@def{asin}{268}{15.54529} \pgfmath@def{asin}{269}{15.60477}
-\pgfmath@def{asin}{270}{15.66426} \pgfmath@def{asin}{271}{15.72378}
-\pgfmath@def{asin}{272}{15.78331} \pgfmath@def{asin}{273}{15.84286}
-\pgfmath@def{asin}{274}{15.90243} \pgfmath@def{asin}{275}{15.96201}
-\pgfmath@def{asin}{276}{16.02161} \pgfmath@def{asin}{277}{16.08123}
-\pgfmath@def{asin}{278}{16.14087} \pgfmath@def{asin}{279}{16.20053}
-\pgfmath@def{asin}{280}{16.26020} \pgfmath@def{asin}{281}{16.31989}
-\pgfmath@def{asin}{282}{16.37960} \pgfmath@def{asin}{283}{16.43933}
-\pgfmath@def{asin}{284}{16.49908} \pgfmath@def{asin}{285}{16.55884}
-\pgfmath@def{asin}{286}{16.61863} \pgfmath@def{asin}{287}{16.67843}
-\pgfmath@def{asin}{288}{16.73825} \pgfmath@def{asin}{289}{16.79809}
-\pgfmath@def{asin}{290}{16.85795} \pgfmath@def{asin}{291}{16.91783}
-\pgfmath@def{asin}{292}{16.97773} \pgfmath@def{asin}{293}{17.03764}
-\pgfmath@def{asin}{294}{17.09758} \pgfmath@def{asin}{295}{17.15753}
-\pgfmath@def{asin}{296}{17.21751} \pgfmath@def{asin}{297}{17.27750}
-\pgfmath@def{asin}{298}{17.33751} \pgfmath@def{asin}{299}{17.39755}
-\pgfmath@def{asin}{300}{17.45760} \pgfmath@def{asin}{301}{17.51767}
-\pgfmath@def{asin}{302}{17.57776} \pgfmath@def{asin}{303}{17.63788}
-\pgfmath@def{asin}{304}{17.69801} \pgfmath@def{asin}{305}{17.75816}
-\pgfmath@def{asin}{306}{17.81833} \pgfmath@def{asin}{307}{17.87852}
-\pgfmath@def{asin}{308}{17.93874} \pgfmath@def{asin}{309}{17.99897}
-\pgfmath@def{asin}{310}{18.05923} \pgfmath@def{asin}{311}{18.11950}
-\pgfmath@def{asin}{312}{18.17980} \pgfmath@def{asin}{313}{18.24011}
-\pgfmath@def{asin}{314}{18.30045} \pgfmath@def{asin}{315}{18.36081}
-\pgfmath@def{asin}{316}{18.42119} \pgfmath@def{asin}{317}{18.48159}
-\pgfmath@def{asin}{318}{18.54201} \pgfmath@def{asin}{319}{18.60246}
-\pgfmath@def{asin}{320}{18.66292} \pgfmath@def{asin}{321}{18.72341}
-\pgfmath@def{asin}{322}{18.78392} \pgfmath@def{asin}{323}{18.84445}
-\pgfmath@def{asin}{324}{18.90500} \pgfmath@def{asin}{325}{18.96557}
-\pgfmath@def{asin}{326}{19.02617} \pgfmath@def{asin}{327}{19.08678}
-\pgfmath@def{asin}{328}{19.14742} \pgfmath@def{asin}{329}{19.20809}
-\pgfmath@def{asin}{330}{19.26877} \pgfmath@def{asin}{331}{19.32948}
-\pgfmath@def{asin}{332}{19.39021} \pgfmath@def{asin}{333}{19.45096}
-\pgfmath@def{asin}{334}{19.51174} \pgfmath@def{asin}{335}{19.57253}
-\pgfmath@def{asin}{336}{19.63335} \pgfmath@def{asin}{337}{19.69420}
-\pgfmath@def{asin}{338}{19.75507} \pgfmath@def{asin}{339}{19.81596}
-\pgfmath@def{asin}{340}{19.87687} \pgfmath@def{asin}{341}{19.93781}
-\pgfmath@def{asin}{342}{19.99877} \pgfmath@def{asin}{343}{20.05975}
-\pgfmath@def{asin}{344}{20.12076} \pgfmath@def{asin}{345}{20.18179}
-\pgfmath@def{asin}{346}{20.24285} \pgfmath@def{asin}{347}{20.30393}
-\pgfmath@def{asin}{348}{20.36503} \pgfmath@def{asin}{349}{20.42616}
-\pgfmath@def{asin}{350}{20.48731} \pgfmath@def{asin}{351}{20.54849}
-\pgfmath@def{asin}{352}{20.60969} \pgfmath@def{asin}{353}{20.67091}
-\pgfmath@def{asin}{354}{20.73216} \pgfmath@def{asin}{355}{20.79344}
-\pgfmath@def{asin}{356}{20.85474} \pgfmath@def{asin}{357}{20.91607}
-\pgfmath@def{asin}{358}{20.97742} \pgfmath@def{asin}{359}{21.03879}
-\pgfmath@def{asin}{360}{21.10019} \pgfmath@def{asin}{361}{21.16162}
-\pgfmath@def{asin}{362}{21.22307} \pgfmath@def{asin}{363}{21.28455}
-\pgfmath@def{asin}{364}{21.34605} \pgfmath@def{asin}{365}{21.40758}
-\pgfmath@def{asin}{366}{21.46913} \pgfmath@def{asin}{367}{21.53071}
-\pgfmath@def{asin}{368}{21.59232} \pgfmath@def{asin}{369}{21.65395}
-\pgfmath@def{asin}{370}{21.71561} \pgfmath@def{asin}{371}{21.77730}
-\pgfmath@def{asin}{372}{21.83901} \pgfmath@def{asin}{373}{21.90075}
-\pgfmath@def{asin}{374}{21.96252} \pgfmath@def{asin}{375}{22.02431}
-\pgfmath@def{asin}{376}{22.08613} \pgfmath@def{asin}{377}{22.14797}
-\pgfmath@def{asin}{378}{22.20985} \pgfmath@def{asin}{379}{22.27175}
-\pgfmath@def{asin}{380}{22.33368} \pgfmath@def{asin}{381}{22.39563}
-\pgfmath@def{asin}{382}{22.45762} \pgfmath@def{asin}{383}{22.51963}
-\pgfmath@def{asin}{384}{22.58167} \pgfmath@def{asin}{385}{22.64374}
-\pgfmath@def{asin}{386}{22.70583} \pgfmath@def{asin}{387}{22.76795}
-\pgfmath@def{asin}{388}{22.83011} \pgfmath@def{asin}{389}{22.89229}
-\pgfmath@def{asin}{390}{22.95449} \pgfmath@def{asin}{391}{23.01673}
-\pgfmath@def{asin}{392}{23.07900} \pgfmath@def{asin}{393}{23.14129}
-\pgfmath@def{asin}{394}{23.20362} \pgfmath@def{asin}{395}{23.26597}
-\pgfmath@def{asin}{396}{23.32835} \pgfmath@def{asin}{397}{23.39076}
-\pgfmath@def{asin}{398}{23.45320} \pgfmath@def{asin}{399}{23.51567}
-\pgfmath@def{asin}{400}{23.57817} \pgfmath@def{asin}{401}{23.64070}
-\pgfmath@def{asin}{402}{23.70326} \pgfmath@def{asin}{403}{23.76585}
-\pgfmath@def{asin}{404}{23.82847} \pgfmath@def{asin}{405}{23.89112}
-\pgfmath@def{asin}{406}{23.95380} \pgfmath@def{asin}{407}{24.01651}
-\pgfmath@def{asin}{408}{24.07926} \pgfmath@def{asin}{409}{24.14203}
-\pgfmath@def{asin}{410}{24.20483} \pgfmath@def{asin}{411}{24.26766}
-\pgfmath@def{asin}{412}{24.33053} \pgfmath@def{asin}{413}{24.39343}
-\pgfmath@def{asin}{414}{24.45635} \pgfmath@def{asin}{415}{24.51931}
-\pgfmath@def{asin}{416}{24.58230} \pgfmath@def{asin}{417}{24.64532}
-\pgfmath@def{asin}{418}{24.70838} \pgfmath@def{asin}{419}{24.77146}
-\pgfmath@def{asin}{420}{24.83458} \pgfmath@def{asin}{421}{24.89773}
-\pgfmath@def{asin}{422}{24.96092} \pgfmath@def{asin}{423}{25.02413}
-\pgfmath@def{asin}{424}{25.08738} \pgfmath@def{asin}{425}{25.15066}
-\pgfmath@def{asin}{426}{25.21397} \pgfmath@def{asin}{427}{25.27732}
-\pgfmath@def{asin}{428}{25.34070} \pgfmath@def{asin}{429}{25.40411}
-\pgfmath@def{asin}{430}{25.46756} \pgfmath@def{asin}{431}{25.53103}
-\pgfmath@def{asin}{432}{25.59455} \pgfmath@def{asin}{433}{25.65809}
-\pgfmath@def{asin}{434}{25.72167} \pgfmath@def{asin}{435}{25.78529}
-\pgfmath@def{asin}{436}{25.84894} \pgfmath@def{asin}{437}{25.91262}
-\pgfmath@def{asin}{438}{25.97634} \pgfmath@def{asin}{439}{26.04009}
-\pgfmath@def{asin}{440}{26.10388} \pgfmath@def{asin}{441}{26.16770}
-\pgfmath@def{asin}{442}{26.23155} \pgfmath@def{asin}{443}{26.29545}
-\pgfmath@def{asin}{444}{26.35937} \pgfmath@def{asin}{445}{26.42333}
-\pgfmath@def{asin}{446}{26.48733} \pgfmath@def{asin}{447}{26.55136}
-\pgfmath@def{asin}{448}{26.61543} \pgfmath@def{asin}{449}{26.67954}
-\pgfmath@def{asin}{450}{26.74368} \pgfmath@def{asin}{451}{26.80786}
-\pgfmath@def{asin}{452}{26.87207} \pgfmath@def{asin}{453}{26.93632}
-\pgfmath@def{asin}{454}{27.00061} \pgfmath@def{asin}{455}{27.06493}
-\pgfmath@def{asin}{456}{27.12929} \pgfmath@def{asin}{457}{27.19369}
-\pgfmath@def{asin}{458}{27.25812} \pgfmath@def{asin}{459}{27.32259}
-\pgfmath@def{asin}{460}{27.38710} \pgfmath@def{asin}{461}{27.45165}
-\pgfmath@def{asin}{462}{27.51623} \pgfmath@def{asin}{463}{27.58086}
-\pgfmath@def{asin}{464}{27.64552} \pgfmath@def{asin}{465}{27.71022}
-\pgfmath@def{asin}{466}{27.77496} \pgfmath@def{asin}{467}{27.83973}
-\pgfmath@def{asin}{468}{27.90455} \pgfmath@def{asin}{469}{27.96940}
-\pgfmath@def{asin}{470}{28.03429} \pgfmath@def{asin}{471}{28.09922}
-\pgfmath@def{asin}{472}{28.16419} \pgfmath@def{asin}{473}{28.22921}
-\pgfmath@def{asin}{474}{28.29426} \pgfmath@def{asin}{475}{28.35935}
-\pgfmath@def{asin}{476}{28.42448} \pgfmath@def{asin}{477}{28.48965}
-\pgfmath@def{asin}{478}{28.55486} \pgfmath@def{asin}{479}{28.62011}
-\pgfmath@def{asin}{480}{28.68540} \pgfmath@def{asin}{481}{28.75073}
-\pgfmath@def{asin}{482}{28.81610} \pgfmath@def{asin}{483}{28.88152}
-\pgfmath@def{asin}{484}{28.94697} \pgfmath@def{asin}{485}{29.01247}
-\pgfmath@def{asin}{486}{29.07801} \pgfmath@def{asin}{487}{29.14359}
-\pgfmath@def{asin}{488}{29.20921} \pgfmath@def{asin}{489}{29.27487}
-\pgfmath@def{asin}{490}{29.34058} \pgfmath@def{asin}{491}{29.40633}
-\pgfmath@def{asin}{492}{29.47212} \pgfmath@def{asin}{493}{29.53795}
-\pgfmath@def{asin}{494}{29.60383} \pgfmath@def{asin}{495}{29.66975}
-\pgfmath@def{asin}{496}{29.73571} \pgfmath@def{asin}{497}{29.80171}
-\pgfmath@def{asin}{498}{29.86776} \pgfmath@def{asin}{499}{29.93386}
-\pgfmath@def{asin}{500}{30.00000} \pgfmath@def{asin}{501}{30.06618}
-\pgfmath@def{asin}{502}{30.13240} \pgfmath@def{asin}{503}{30.19867}
-\pgfmath@def{asin}{504}{30.26499} \pgfmath@def{asin}{505}{30.33135}
-\pgfmath@def{asin}{506}{30.39775} \pgfmath@def{asin}{507}{30.46420}
-\pgfmath@def{asin}{508}{30.53070} \pgfmath@def{asin}{509}{30.59724}
-\pgfmath@def{asin}{510}{30.66383} \pgfmath@def{asin}{511}{30.73046}
-\pgfmath@def{asin}{512}{30.79714} \pgfmath@def{asin}{513}{30.86386}
-\pgfmath@def{asin}{514}{30.93063} \pgfmath@def{asin}{515}{30.99745}
-\pgfmath@def{asin}{516}{31.06432} \pgfmath@def{asin}{517}{31.13123}
-\pgfmath@def{asin}{518}{31.19819} \pgfmath@def{asin}{519}{31.26519}
-\pgfmath@def{asin}{520}{31.33225} \pgfmath@def{asin}{521}{31.39935}
-\pgfmath@def{asin}{522}{31.46650} \pgfmath@def{asin}{523}{31.53370}
-\pgfmath@def{asin}{524}{31.60094} \pgfmath@def{asin}{525}{31.66824}
-\pgfmath@def{asin}{526}{31.73558} \pgfmath@def{asin}{527}{31.80298}
-\pgfmath@def{asin}{528}{31.87042} \pgfmath@def{asin}{529}{31.93791}
-\pgfmath@def{asin}{530}{32.00545} \pgfmath@def{asin}{531}{32.07304}
-\pgfmath@def{asin}{532}{32.14068} \pgfmath@def{asin}{533}{32.20837}
-\pgfmath@def{asin}{534}{32.27611} \pgfmath@def{asin}{535}{32.34391}
-\pgfmath@def{asin}{536}{32.41175} \pgfmath@def{asin}{537}{32.47964}
-\pgfmath@def{asin}{538}{32.54759} \pgfmath@def{asin}{539}{32.61559}
-\pgfmath@def{asin}{540}{32.68363} \pgfmath@def{asin}{541}{32.75173}
-\pgfmath@def{asin}{542}{32.81989} \pgfmath@def{asin}{543}{32.88809}
-\pgfmath@def{asin}{544}{32.95635} \pgfmath@def{asin}{545}{33.02466}
-\pgfmath@def{asin}{546}{33.09302} \pgfmath@def{asin}{547}{33.16144}
-\pgfmath@def{asin}{548}{33.22991} \pgfmath@def{asin}{549}{33.29843}
-\pgfmath@def{asin}{550}{33.36701} \pgfmath@def{asin}{551}{33.43564}
-\pgfmath@def{asin}{552}{33.50433} \pgfmath@def{asin}{553}{33.57307}
-\pgfmath@def{asin}{554}{33.64186} \pgfmath@def{asin}{555}{33.71071}
-\pgfmath@def{asin}{556}{33.77962} \pgfmath@def{asin}{557}{33.84858}
-\pgfmath@def{asin}{558}{33.91759} \pgfmath@def{asin}{559}{33.98666}
-\pgfmath@def{asin}{560}{34.05579} \pgfmath@def{asin}{561}{34.12498}
-\pgfmath@def{asin}{562}{34.19422} \pgfmath@def{asin}{563}{34.26352}
-\pgfmath@def{asin}{564}{34.33287} \pgfmath@def{asin}{565}{34.40229}
-\pgfmath@def{asin}{566}{34.47176} \pgfmath@def{asin}{567}{34.54129}
-\pgfmath@def{asin}{568}{34.61087} \pgfmath@def{asin}{569}{34.68052}
-\pgfmath@def{asin}{570}{34.75022} \pgfmath@def{asin}{571}{34.81998}
-\pgfmath@def{asin}{572}{34.88981} \pgfmath@def{asin}{573}{34.95969}
-\pgfmath@def{asin}{574}{35.02963} \pgfmath@def{asin}{575}{35.09963}
-\pgfmath@def{asin}{576}{35.16969} \pgfmath@def{asin}{577}{35.23981}
-\pgfmath@def{asin}{578}{35.30999} \pgfmath@def{asin}{579}{35.38023}
-\pgfmath@def{asin}{580}{35.45054} \pgfmath@def{asin}{581}{35.52090}
-\pgfmath@def{asin}{582}{35.59133} \pgfmath@def{asin}{583}{35.66182}
-\pgfmath@def{asin}{584}{35.73237} \pgfmath@def{asin}{585}{35.80299}
-\pgfmath@def{asin}{586}{35.87366} \pgfmath@def{asin}{587}{35.94440}
-\pgfmath@def{asin}{588}{36.01521} \pgfmath@def{asin}{589}{36.08607}
-\pgfmath@def{asin}{590}{36.15700} \pgfmath@def{asin}{591}{36.22800}
-\pgfmath@def{asin}{592}{36.29906} \pgfmath@def{asin}{593}{36.37018}
-\pgfmath@def{asin}{594}{36.44137} \pgfmath@def{asin}{595}{36.51263}
-\pgfmath@def{asin}{596}{36.58395} \pgfmath@def{asin}{597}{36.65533}
-\pgfmath@def{asin}{598}{36.72679} \pgfmath@def{asin}{599}{36.79831}
-\pgfmath@def{asin}{600}{36.86989} \pgfmath@def{asin}{601}{36.94155}
-\pgfmath@def{asin}{602}{37.01327} \pgfmath@def{asin}{603}{37.08506}
-\pgfmath@def{asin}{604}{37.15691} \pgfmath@def{asin}{605}{37.22884}
-\pgfmath@def{asin}{606}{37.30083} \pgfmath@def{asin}{607}{37.37289}
-\pgfmath@def{asin}{608}{37.44503} \pgfmath@def{asin}{609}{37.51723}
-\pgfmath@def{asin}{610}{37.58950} \pgfmath@def{asin}{611}{37.66184}
-\pgfmath@def{asin}{612}{37.73425} \pgfmath@def{asin}{613}{37.80674}
-\pgfmath@def{asin}{614}{37.87929} \pgfmath@def{asin}{615}{37.95192}
-\pgfmath@def{asin}{616}{38.02461} \pgfmath@def{asin}{617}{38.09738}
-\pgfmath@def{asin}{618}{38.17023} \pgfmath@def{asin}{619}{38.24314}
-\pgfmath@def{asin}{620}{38.31613} \pgfmath@def{asin}{621}{38.38919}
-\pgfmath@def{asin}{622}{38.46233} \pgfmath@def{asin}{623}{38.53554}
-\pgfmath@def{asin}{624}{38.60882} \pgfmath@def{asin}{625}{38.68218}
-\pgfmath@def{asin}{626}{38.75562} \pgfmath@def{asin}{627}{38.82913}
-\pgfmath@def{asin}{628}{38.90272} \pgfmath@def{asin}{629}{38.97638}
-\pgfmath@def{asin}{630}{39.05012} \pgfmath@def{asin}{631}{39.12393}
-\pgfmath@def{asin}{632}{39.19783} \pgfmath@def{asin}{633}{39.27180}
-\pgfmath@def{asin}{634}{39.34585} \pgfmath@def{asin}{635}{39.41998}
-\pgfmath@def{asin}{636}{39.49419} \pgfmath@def{asin}{637}{39.56847}
-\pgfmath@def{asin}{638}{39.64284} \pgfmath@def{asin}{639}{39.71729}
-\pgfmath@def{asin}{640}{39.79181} \pgfmath@def{asin}{641}{39.86642}
-\pgfmath@def{asin}{642}{39.94111} \pgfmath@def{asin}{643}{40.01588}
-\pgfmath@def{asin}{644}{40.09074} \pgfmath@def{asin}{645}{40.16567}
-\pgfmath@def{asin}{646}{40.24069} \pgfmath@def{asin}{647}{40.31579}
-\pgfmath@def{asin}{648}{40.39098} \pgfmath@def{asin}{649}{40.46624}
-\pgfmath@def{asin}{650}{40.54160} \pgfmath@def{asin}{651}{40.61704}
-\pgfmath@def{asin}{652}{40.69256} \pgfmath@def{asin}{653}{40.76817}
-\pgfmath@def{asin}{654}{40.84386} \pgfmath@def{asin}{655}{40.91965}
-\pgfmath@def{asin}{656}{40.99551} \pgfmath@def{asin}{657}{41.07147}
-\pgfmath@def{asin}{658}{41.14751} \pgfmath@def{asin}{659}{41.22365}
-\pgfmath@def{asin}{660}{41.29987} \pgfmath@def{asin}{661}{41.37618}
-\pgfmath@def{asin}{662}{41.45258} \pgfmath@def{asin}{663}{41.52907}
-\pgfmath@def{asin}{664}{41.60565} \pgfmath@def{asin}{665}{41.68232}
-\pgfmath@def{asin}{666}{41.75908} \pgfmath@def{asin}{667}{41.83594}
-\pgfmath@def{asin}{668}{41.91289} \pgfmath@def{asin}{669}{41.98993}
-\pgfmath@def{asin}{670}{42.06706} \pgfmath@def{asin}{671}{42.14429}
-\pgfmath@def{asin}{672}{42.22161} \pgfmath@def{asin}{673}{42.29903}
-\pgfmath@def{asin}{674}{42.37654} \pgfmath@def{asin}{675}{42.45415}
-\pgfmath@def{asin}{676}{42.53185} \pgfmath@def{asin}{677}{42.60965}
-\pgfmath@def{asin}{678}{42.68755} \pgfmath@def{asin}{679}{42.76554}
-\pgfmath@def{asin}{680}{42.84364} \pgfmath@def{asin}{681}{42.92183}
-\pgfmath@def{asin}{682}{43.00012} \pgfmath@def{asin}{683}{43.07852}
-\pgfmath@def{asin}{684}{43.15701} \pgfmath@def{asin}{685}{43.23560}
-\pgfmath@def{asin}{686}{43.31430} \pgfmath@def{asin}{687}{43.39310}
-\pgfmath@def{asin}{688}{43.47199} \pgfmath@def{asin}{689}{43.55100}
-\pgfmath@def{asin}{690}{43.63010} \pgfmath@def{asin}{691}{43.70932}
-\pgfmath@def{asin}{692}{43.78863} \pgfmath@def{asin}{693}{43.86805}
-\pgfmath@def{asin}{694}{43.94758} \pgfmath@def{asin}{695}{44.02721}
-\pgfmath@def{asin}{696}{44.10695} \pgfmath@def{asin}{697}{44.18680}
-\pgfmath@def{asin}{698}{44.26676} \pgfmath@def{asin}{699}{44.34682}
-\pgfmath@def{asin}{700}{44.42700} \pgfmath@def{asin}{701}{44.50728}
-\pgfmath@def{asin}{702}{44.58768} \pgfmath@def{asin}{703}{44.66819}
-\pgfmath@def{asin}{704}{44.74881} \pgfmath@def{asin}{705}{44.82954}
-\pgfmath@def{asin}{706}{44.91038} \pgfmath@def{asin}{707}{44.99134}
-\pgfmath@def{asin}{708}{45.07242} \pgfmath@def{asin}{709}{45.15361}
-\pgfmath@def{asin}{710}{45.23491} \pgfmath@def{asin}{711}{45.31633}
-\pgfmath@def{asin}{712}{45.39787} \pgfmath@def{asin}{713}{45.47953}
-\pgfmath@def{asin}{714}{45.56130} \pgfmath@def{asin}{715}{45.64319}
-\pgfmath@def{asin}{716}{45.72521} \pgfmath@def{asin}{717}{45.80734}
-\pgfmath@def{asin}{718}{45.88960} \pgfmath@def{asin}{719}{45.97198}
-\pgfmath@def{asin}{720}{46.05448} \pgfmath@def{asin}{721}{46.13710}
-\pgfmath@def{asin}{722}{46.21985} \pgfmath@def{asin}{723}{46.30272}
-\pgfmath@def{asin}{724}{46.38572} \pgfmath@def{asin}{725}{46.46884}
-\pgfmath@def{asin}{726}{46.55210} \pgfmath@def{asin}{727}{46.63548}
-\pgfmath@def{asin}{728}{46.71898} \pgfmath@def{asin}{729}{46.80262}
-\pgfmath@def{asin}{730}{46.88639} \pgfmath@def{asin}{731}{46.97029}
-\pgfmath@def{asin}{732}{47.05432} \pgfmath@def{asin}{733}{47.13848}
-\pgfmath@def{asin}{734}{47.22278} \pgfmath@def{asin}{735}{47.30721}
-\pgfmath@def{asin}{736}{47.39178} \pgfmath@def{asin}{737}{47.47648}
-\pgfmath@def{asin}{738}{47.56132} \pgfmath@def{asin}{739}{47.64630}
-\pgfmath@def{asin}{740}{47.73141} \pgfmath@def{asin}{741}{47.81667}
-\pgfmath@def{asin}{742}{47.90206} \pgfmath@def{asin}{743}{47.98760}
-\pgfmath@def{asin}{744}{48.07327} \pgfmath@def{asin}{745}{48.15909}
-\pgfmath@def{asin}{746}{48.24506} \pgfmath@def{asin}{747}{48.33117}
-\pgfmath@def{asin}{748}{48.41742} \pgfmath@def{asin}{749}{48.50382}
-\pgfmath@def{asin}{750}{48.59037} \pgfmath@def{asin}{751}{48.67707}
-\pgfmath@def{asin}{752}{48.76392} \pgfmath@def{asin}{753}{48.85092}
-\pgfmath@def{asin}{754}{48.93806} \pgfmath@def{asin}{755}{49.02537}
-\pgfmath@def{asin}{756}{49.11282} \pgfmath@def{asin}{757}{49.20043}
-\pgfmath@def{asin}{758}{49.28819} \pgfmath@def{asin}{759}{49.37611}
-\pgfmath@def{asin}{760}{49.46419} \pgfmath@def{asin}{761}{49.55243}
-\pgfmath@def{asin}{762}{49.64083} \pgfmath@def{asin}{763}{49.72939}
-\pgfmath@def{asin}{764}{49.81810} \pgfmath@def{asin}{765}{49.90699}
-\pgfmath@def{asin}{766}{49.99603} \pgfmath@def{asin}{767}{50.08525}
-\pgfmath@def{asin}{768}{50.17462} \pgfmath@def{asin}{769}{50.26417}
-\pgfmath@def{asin}{770}{50.35388} \pgfmath@def{asin}{771}{50.44377}
-\pgfmath@def{asin}{772}{50.53382} \pgfmath@def{asin}{773}{50.62405}
-\pgfmath@def{asin}{774}{50.71445} \pgfmath@def{asin}{775}{50.80503}
-\pgfmath@def{asin}{776}{50.89578} \pgfmath@def{asin}{777}{50.98671}
-\pgfmath@def{asin}{778}{51.07782} \pgfmath@def{asin}{779}{51.16910}
-\pgfmath@def{asin}{780}{51.26057} \pgfmath@def{asin}{781}{51.35222}
-\pgfmath@def{asin}{782}{51.44406} \pgfmath@def{asin}{783}{51.53607}
-\pgfmath@def{asin}{784}{51.62828} \pgfmath@def{asin}{785}{51.72067}
-\pgfmath@def{asin}{786}{51.81326} \pgfmath@def{asin}{787}{51.90603}
-\pgfmath@def{asin}{788}{51.99899} \pgfmath@def{asin}{789}{52.09215}
-\pgfmath@def{asin}{790}{52.18551} \pgfmath@def{asin}{791}{52.27906}
-\pgfmath@def{asin}{792}{52.37280} \pgfmath@def{asin}{793}{52.46675}
-\pgfmath@def{asin}{794}{52.56090} \pgfmath@def{asin}{795}{52.65525}
-\pgfmath@def{asin}{796}{52.74981} \pgfmath@def{asin}{797}{52.84457}
-\pgfmath@def{asin}{798}{52.93953} \pgfmath@def{asin}{799}{53.03471}
-\pgfmath@def{asin}{800}{53.13010} \pgfmath@def{asin}{801}{53.22570}
-\pgfmath@def{asin}{802}{53.32151} \pgfmath@def{asin}{803}{53.41754}
-\pgfmath@def{asin}{804}{53.51379} \pgfmath@def{asin}{805}{53.61025}
-\pgfmath@def{asin}{806}{53.70694} \pgfmath@def{asin}{807}{53.80385}
-\pgfmath@def{asin}{808}{53.90098} \pgfmath@def{asin}{809}{53.99834}
-\pgfmath@def{asin}{810}{54.09593} \pgfmath@def{asin}{811}{54.19374}
-\pgfmath@def{asin}{812}{54.29180} \pgfmath@def{asin}{813}{54.39008}
-\pgfmath@def{asin}{814}{54.48860} \pgfmath@def{asin}{815}{54.58736}
-\pgfmath@def{asin}{816}{54.68636} \pgfmath@def{asin}{817}{54.78560}
-\pgfmath@def{asin}{818}{54.88508} \pgfmath@def{asin}{819}{54.98481}
-\pgfmath@def{asin}{820}{55.08479} \pgfmath@def{asin}{821}{55.18502}
-\pgfmath@def{asin}{822}{55.28550} \pgfmath@def{asin}{823}{55.38624}
-\pgfmath@def{asin}{824}{55.48723} \pgfmath@def{asin}{825}{55.58849}
-\pgfmath@def{asin}{826}{55.69000} \pgfmath@def{asin}{827}{55.79178}
-\pgfmath@def{asin}{828}{55.89383} \pgfmath@def{asin}{829}{55.99615}
-\pgfmath@def{asin}{830}{56.09873} \pgfmath@def{asin}{831}{56.20160}
-\pgfmath@def{asin}{832}{56.30473} \pgfmath@def{asin}{833}{56.40815}
-\pgfmath@def{asin}{834}{56.51185} \pgfmath@def{asin}{835}{56.61583}
-\pgfmath@def{asin}{836}{56.72010} \pgfmath@def{asin}{837}{56.82467}
-\pgfmath@def{asin}{838}{56.92952} \pgfmath@def{asin}{839}{57.03467}
-\pgfmath@def{asin}{840}{57.14012} \pgfmath@def{asin}{841}{57.24586}
-\pgfmath@def{asin}{842}{57.35192} \pgfmath@def{asin}{843}{57.45828}
-\pgfmath@def{asin}{844}{57.56495} \pgfmath@def{asin}{845}{57.67193}
-\pgfmath@def{asin}{846}{57.77923} \pgfmath@def{asin}{847}{57.88685}
-\pgfmath@def{asin}{848}{57.99480} \pgfmath@def{asin}{849}{58.10307}
-\pgfmath@def{asin}{850}{58.21166} \pgfmath@def{asin}{851}{58.32060}
-\pgfmath@def{asin}{852}{58.42987} \pgfmath@def{asin}{853}{58.53948}
-\pgfmath@def{asin}{854}{58.64943} \pgfmath@def{asin}{855}{58.75973}
-\pgfmath@def{asin}{856}{58.87038} \pgfmath@def{asin}{857}{58.98139}
-\pgfmath@def{asin}{858}{59.09275} \pgfmath@def{asin}{859}{59.20448}
-\pgfmath@def{asin}{860}{59.31658} \pgfmath@def{asin}{861}{59.42904}
-\pgfmath@def{asin}{862}{59.54189} \pgfmath@def{asin}{863}{59.65511}
-\pgfmath@def{asin}{864}{59.76871} \pgfmath@def{asin}{865}{59.88270}
-\pgfmath@def{asin}{866}{59.99708} \pgfmath@def{asin}{867}{60.11187}
-\pgfmath@def{asin}{868}{60.22705} \pgfmath@def{asin}{869}{60.34264}
-\pgfmath@def{asin}{870}{60.45863} \pgfmath@def{asin}{871}{60.57505}
-\pgfmath@def{asin}{872}{60.69189} \pgfmath@def{asin}{873}{60.80915}
-\pgfmath@def{asin}{874}{60.92684} \pgfmath@def{asin}{875}{61.04497}
-\pgfmath@def{asin}{876}{61.16354} \pgfmath@def{asin}{877}{61.28256}
-\pgfmath@def{asin}{878}{61.40203} \pgfmath@def{asin}{879}{61.52196}
-\pgfmath@def{asin}{880}{61.64236} \pgfmath@def{asin}{881}{61.76322}
-\pgfmath@def{asin}{882}{61.88457} \pgfmath@def{asin}{883}{62.00639}
-\pgfmath@def{asin}{884}{62.12871} \pgfmath@def{asin}{885}{62.25152}
-\pgfmath@def{asin}{886}{62.37483} \pgfmath@def{asin}{887}{62.49865}
-\pgfmath@def{asin}{888}{62.62299} \pgfmath@def{asin}{889}{62.74785}
-\pgfmath@def{asin}{890}{62.87324} \pgfmath@def{asin}{891}{62.99917}
-\pgfmath@def{asin}{892}{63.12565} \pgfmath@def{asin}{893}{63.25268}
-\pgfmath@def{asin}{894}{63.38027} \pgfmath@def{asin}{895}{63.50843}
-\pgfmath@def{asin}{896}{63.63716} \pgfmath@def{asin}{897}{63.76649}
-\pgfmath@def{asin}{898}{63.89640} \pgfmath@def{asin}{899}{64.02693}
-\pgfmath@def{asin}{900}{64.15806} \pgfmath@def{asin}{901}{64.28982}
-\pgfmath@def{asin}{902}{64.42221} \pgfmath@def{asin}{903}{64.55524}
-\pgfmath@def{asin}{904}{64.68893} \pgfmath@def{asin}{905}{64.82328}
-\pgfmath@def{asin}{906}{64.95830} \pgfmath@def{asin}{907}{65.09401}
-\pgfmath@def{asin}{908}{65.23041} \pgfmath@def{asin}{909}{65.36752}
-\pgfmath@def{asin}{910}{65.50535} \pgfmath@def{asin}{911}{65.64391}
-\pgfmath@def{asin}{912}{65.78321} \pgfmath@def{asin}{913}{65.92327}
-\pgfmath@def{asin}{914}{66.06411} \pgfmath@def{asin}{915}{66.20572}
-\pgfmath@def{asin}{916}{66.34814} \pgfmath@def{asin}{917}{66.49136}
-\pgfmath@def{asin}{918}{66.63542} \pgfmath@def{asin}{919}{66.78032}
-\pgfmath@def{asin}{920}{66.92608} \pgfmath@def{asin}{921}{67.07271}
-\pgfmath@def{asin}{922}{67.22024} \pgfmath@def{asin}{923}{67.36867}
-\pgfmath@def{asin}{924}{67.51804} \pgfmath@def{asin}{925}{67.66835}
-\pgfmath@def{asin}{926}{67.81963} \pgfmath@def{asin}{927}{67.97189}
-\pgfmath@def{asin}{928}{68.12516} \pgfmath@def{asin}{929}{68.27946}
-\pgfmath@def{asin}{930}{68.43481} \pgfmath@def{asin}{931}{68.59123}
-\pgfmath@def{asin}{932}{68.74875} \pgfmath@def{asin}{933}{68.90739}
-\pgfmath@def{asin}{934}{69.06718} \pgfmath@def{asin}{935}{69.22814}
-\pgfmath@def{asin}{936}{69.39030} \pgfmath@def{asin}{937}{69.55369}
-\pgfmath@def{asin}{938}{69.71835} \pgfmath@def{asin}{939}{69.88429}
-\pgfmath@def{asin}{940}{70.05155} \pgfmath@def{asin}{941}{70.22017}
-\pgfmath@def{asin}{942}{70.39018} \pgfmath@def{asin}{943}{70.56162}
-\pgfmath@def{asin}{944}{70.73453} \pgfmath@def{asin}{945}{70.90894}
-\pgfmath@def{asin}{946}{71.08490} \pgfmath@def{asin}{947}{71.26245}
-\pgfmath@def{asin}{948}{71.44164} \pgfmath@def{asin}{949}{71.62251}
-\pgfmath@def{asin}{950}{71.80512} \pgfmath@def{asin}{951}{71.98952}
-\pgfmath@def{asin}{952}{72.17576} \pgfmath@def{asin}{953}{72.36390}
-\pgfmath@def{asin}{954}{72.55401} \pgfmath@def{asin}{955}{72.74614}
-\pgfmath@def{asin}{956}{72.94037} \pgfmath@def{asin}{957}{73.13678}
-\pgfmath@def{asin}{958}{73.33542} \pgfmath@def{asin}{959}{73.53640}
-\pgfmath@def{asin}{960}{73.73979} \pgfmath@def{asin}{961}{73.94569}
-\pgfmath@def{asin}{962}{74.15419} \pgfmath@def{asin}{963}{74.36540}
-\pgfmath@def{asin}{964}{74.57942} \pgfmath@def{asin}{965}{74.79639}
-\pgfmath@def{asin}{966}{75.01642} \pgfmath@def{asin}{967}{75.23966}
-\pgfmath@def{asin}{968}{75.46625} \pgfmath@def{asin}{969}{75.69635}
-\pgfmath@def{asin}{970}{75.93013} \pgfmath@def{asin}{971}{76.16778}
-\pgfmath@def{asin}{972}{76.40950} \pgfmath@def{asin}{973}{76.65552}
-\pgfmath@def{asin}{974}{76.90607} \pgfmath@def{asin}{975}{77.16143}
-\pgfmath@def{asin}{976}{77.42188} \pgfmath@def{asin}{977}{77.68774}
-\pgfmath@def{asin}{978}{77.95939} \pgfmath@def{asin}{979}{78.23721}
-\pgfmath@def{asin}{980}{78.52165} \pgfmath@def{asin}{981}{78.81323}
-\pgfmath@def{asin}{982}{79.11251} \pgfmath@def{asin}{983}{79.42015}
-\pgfmath@def{asin}{984}{79.73690} \pgfmath@def{asin}{985}{80.06363}
-\pgfmath@def{asin}{986}{80.40136} \pgfmath@def{asin}{987}{80.75129}
-\pgfmath@def{asin}{988}{81.11487} \pgfmath@def{asin}{989}{81.49385}
-\pgfmath@def{asin}{990}{81.89038} \pgfmath@def{asin}{991}{82.30718}
-\pgfmath@def{asin}{992}{82.74775} \pgfmath@def{asin}{993}{83.21671}
-\pgfmath@def{asin}{994}{83.72041} \pgfmath@def{asin}{995}{84.26803}
-\pgfmath@def{asin}{996}{84.87360} \pgfmath@def{asin}{997}{85.56077}
-\pgfmath@def{asin}{998}{86.37569} \pgfmath@def{asin}{999}{87.43744}
-\pgfmath@def{asin}{1000}{90.00000}
-
-\pgfmath@def{acos}{0}{90.00000} \pgfmath@def{acos}{1}{89.94270}
-\pgfmath@def{acos}{2}{89.88540} \pgfmath@def{acos}{3}{89.82811}
-\pgfmath@def{acos}{4}{89.77081} \pgfmath@def{acos}{5}{89.71352}
-\pgfmath@def{acos}{6}{89.65622} \pgfmath@def{acos}{7}{89.59892}
-\pgfmath@def{acos}{8}{89.54162} \pgfmath@def{acos}{9}{89.48433}
-\pgfmath@def{acos}{10}{89.42703} \pgfmath@def{acos}{11}{89.36973}
-\pgfmath@def{acos}{12}{89.31243} \pgfmath@def{acos}{13}{89.25513}
-\pgfmath@def{acos}{14}{89.19783} \pgfmath@def{acos}{15}{89.14053}
-\pgfmath@def{acos}{16}{89.08322} \pgfmath@def{acos}{17}{89.02592}
-\pgfmath@def{acos}{18}{88.96862} \pgfmath@def{acos}{19}{88.91131}
-\pgfmath@def{acos}{20}{88.85400} \pgfmath@def{acos}{21}{88.79670}
-\pgfmath@def{acos}{22}{88.73939} \pgfmath@def{acos}{23}{88.68208}
-\pgfmath@def{acos}{24}{88.62476} \pgfmath@def{acos}{25}{88.56745}
-\pgfmath@def{acos}{26}{88.51014} \pgfmath@def{acos}{27}{88.45282}
-\pgfmath@def{acos}{28}{88.39550} \pgfmath@def{acos}{29}{88.33818}
-\pgfmath@def{acos}{30}{88.28086} \pgfmath@def{acos}{31}{88.22354}
-\pgfmath@def{acos}{32}{88.16622} \pgfmath@def{acos}{33}{88.10889}
-\pgfmath@def{acos}{34}{88.05156} \pgfmath@def{acos}{35}{87.99423}
-\pgfmath@def{acos}{36}{87.93690} \pgfmath@def{acos}{37}{87.87957}
-\pgfmath@def{acos}{38}{87.82223} \pgfmath@def{acos}{39}{87.76489}
-\pgfmath@def{acos}{40}{87.70755} \pgfmath@def{acos}{41}{87.65021}
-\pgfmath@def{acos}{42}{87.59286} \pgfmath@def{acos}{43}{87.53552}
-\pgfmath@def{acos}{44}{87.47817} \pgfmath@def{acos}{45}{87.42081}
-\pgfmath@def{acos}{46}{87.36346} \pgfmath@def{acos}{47}{87.30610}
-\pgfmath@def{acos}{48}{87.24874} \pgfmath@def{acos}{49}{87.19138}
-\pgfmath@def{acos}{50}{87.13401} \pgfmath@def{acos}{51}{87.07664}
-\pgfmath@def{acos}{52}{87.01927} \pgfmath@def{acos}{53}{86.96190}
-\pgfmath@def{acos}{54}{86.90452} \pgfmath@def{acos}{55}{86.84714}
-\pgfmath@def{acos}{56}{86.78975} \pgfmath@def{acos}{57}{86.73237}
-\pgfmath@def{acos}{58}{86.67497} \pgfmath@def{acos}{59}{86.61758}
-\pgfmath@def{acos}{60}{86.56018} \pgfmath@def{acos}{61}{86.50278}
-\pgfmath@def{acos}{62}{86.44538} \pgfmath@def{acos}{63}{86.38797}
-\pgfmath@def{acos}{64}{86.33056} \pgfmath@def{acos}{65}{86.27314}
-\pgfmath@def{acos}{66}{86.21572} \pgfmath@def{acos}{67}{86.15830}
-\pgfmath@def{acos}{68}{86.10087} \pgfmath@def{acos}{69}{86.04344}
-\pgfmath@def{acos}{70}{85.98601} \pgfmath@def{acos}{71}{85.92857}
-\pgfmath@def{acos}{72}{85.87113} \pgfmath@def{acos}{73}{85.81368}
-\pgfmath@def{acos}{74}{85.75623} \pgfmath@def{acos}{75}{85.69877}
-\pgfmath@def{acos}{76}{85.64131} \pgfmath@def{acos}{77}{85.58385}
-\pgfmath@def{acos}{78}{85.52638} \pgfmath@def{acos}{79}{85.46891}
-\pgfmath@def{acos}{80}{85.41143} \pgfmath@def{acos}{81}{85.35395}
-\pgfmath@def{acos}{82}{85.29646} \pgfmath@def{acos}{83}{85.23897}
-\pgfmath@def{acos}{84}{85.18147} \pgfmath@def{acos}{85}{85.12397}
-\pgfmath@def{acos}{86}{85.06646} \pgfmath@def{acos}{87}{85.00895}
-\pgfmath@def{acos}{88}{84.95144} \pgfmath@def{acos}{89}{84.89392}
-\pgfmath@def{acos}{90}{84.83639} \pgfmath@def{acos}{91}{84.77886}
-\pgfmath@def{acos}{92}{84.72132} \pgfmath@def{acos}{93}{84.66378}
-\pgfmath@def{acos}{94}{84.60623} \pgfmath@def{acos}{95}{84.54868}
-\pgfmath@def{acos}{96}{84.49112} \pgfmath@def{acos}{97}{84.43355}
-\pgfmath@def{acos}{98}{84.37598} \pgfmath@def{acos}{99}{84.31841}
-\pgfmath@def{acos}{100}{84.26083} \pgfmath@def{acos}{101}{84.20324}
-\pgfmath@def{acos}{102}{84.14564} \pgfmath@def{acos}{103}{84.08805}
-\pgfmath@def{acos}{104}{84.03044} \pgfmath@def{acos}{105}{83.97283}
-\pgfmath@def{acos}{106}{83.91521} \pgfmath@def{acos}{107}{83.85759}
-\pgfmath@def{acos}{108}{83.79996} \pgfmath@def{acos}{109}{83.74232}
-\pgfmath@def{acos}{110}{83.68468} \pgfmath@def{acos}{111}{83.62703}
-\pgfmath@def{acos}{112}{83.56938} \pgfmath@def{acos}{113}{83.51171}
-\pgfmath@def{acos}{114}{83.45405} \pgfmath@def{acos}{115}{83.39637}
-\pgfmath@def{acos}{116}{83.33869} \pgfmath@def{acos}{117}{83.28100}
-\pgfmath@def{acos}{118}{83.22330} \pgfmath@def{acos}{119}{83.16560}
-\pgfmath@def{acos}{120}{83.10789} \pgfmath@def{acos}{121}{83.05018}
-\pgfmath@def{acos}{122}{82.99245} \pgfmath@def{acos}{123}{82.93472}
-\pgfmath@def{acos}{124}{82.87698} \pgfmath@def{acos}{125}{82.81924}
-\pgfmath@def{acos}{126}{82.76149} \pgfmath@def{acos}{127}{82.70373}
-\pgfmath@def{acos}{128}{82.64596} \pgfmath@def{acos}{129}{82.58819}
-\pgfmath@def{acos}{130}{82.53040} \pgfmath@def{acos}{131}{82.47261}
-\pgfmath@def{acos}{132}{82.41482} \pgfmath@def{acos}{133}{82.35701}
-\pgfmath@def{acos}{134}{82.29920} \pgfmath@def{acos}{135}{82.24138}
-\pgfmath@def{acos}{136}{82.18355} \pgfmath@def{acos}{137}{82.12571}
-\pgfmath@def{acos}{138}{82.06786} \pgfmath@def{acos}{139}{82.01001}
-\pgfmath@def{acos}{140}{81.95215} \pgfmath@def{acos}{141}{81.89428}
-\pgfmath@def{acos}{142}{81.83640} \pgfmath@def{acos}{143}{81.77851}
-\pgfmath@def{acos}{144}{81.72062} \pgfmath@def{acos}{145}{81.66272}
-\pgfmath@def{acos}{146}{81.60480} \pgfmath@def{acos}{147}{81.54688}
-\pgfmath@def{acos}{148}{81.48895} \pgfmath@def{acos}{149}{81.43102}
-\pgfmath@def{acos}{150}{81.37307} \pgfmath@def{acos}{151}{81.31511}
-\pgfmath@def{acos}{152}{81.25715} \pgfmath@def{acos}{153}{81.19917}
-\pgfmath@def{acos}{154}{81.14119} \pgfmath@def{acos}{155}{81.08320}
-\pgfmath@def{acos}{156}{81.02520} \pgfmath@def{acos}{157}{80.96719}
-\pgfmath@def{acos}{158}{80.90917} \pgfmath@def{acos}{159}{80.85114}
-\pgfmath@def{acos}{160}{80.79310} \pgfmath@def{acos}{161}{80.73505}
-\pgfmath@def{acos}{162}{80.67699} \pgfmath@def{acos}{163}{80.61893}
-\pgfmath@def{acos}{164}{80.56085} \pgfmath@def{acos}{165}{80.50276}
-\pgfmath@def{acos}{166}{80.44466} \pgfmath@def{acos}{167}{80.38656}
-\pgfmath@def{acos}{168}{80.32844} \pgfmath@def{acos}{169}{80.27031}
-\pgfmath@def{acos}{170}{80.21218} \pgfmath@def{acos}{171}{80.15403}
-\pgfmath@def{acos}{172}{80.09587} \pgfmath@def{acos}{173}{80.03770}
-\pgfmath@def{acos}{174}{79.97953} \pgfmath@def{acos}{175}{79.92134}
-\pgfmath@def{acos}{176}{79.86314} \pgfmath@def{acos}{177}{79.80493}
-\pgfmath@def{acos}{178}{79.74671} \pgfmath@def{acos}{179}{79.68848}
-\pgfmath@def{acos}{180}{79.63024} \pgfmath@def{acos}{181}{79.57198}
-\pgfmath@def{acos}{182}{79.51372} \pgfmath@def{acos}{183}{79.45545}
-\pgfmath@def{acos}{184}{79.39716} \pgfmath@def{acos}{185}{79.33886}
-\pgfmath@def{acos}{186}{79.28056} \pgfmath@def{acos}{187}{79.22224}
-\pgfmath@def{acos}{188}{79.16391} \pgfmath@def{acos}{189}{79.10556}
-\pgfmath@def{acos}{190}{79.04721} \pgfmath@def{acos}{191}{78.98885}
-\pgfmath@def{acos}{192}{78.93047} \pgfmath@def{acos}{193}{78.87208}
-\pgfmath@def{acos}{194}{78.81368} \pgfmath@def{acos}{195}{78.75527}
-\pgfmath@def{acos}{196}{78.69685} \pgfmath@def{acos}{197}{78.63841}
-\pgfmath@def{acos}{198}{78.57997} \pgfmath@def{acos}{199}{78.52151}
-\pgfmath@def{acos}{200}{78.46304} \pgfmath@def{acos}{201}{78.40455}
-\pgfmath@def{acos}{202}{78.34606} \pgfmath@def{acos}{203}{78.28755}
-\pgfmath@def{acos}{204}{78.22903} \pgfmath@def{acos}{205}{78.17050}
-\pgfmath@def{acos}{206}{78.11195} \pgfmath@def{acos}{207}{78.05339}
-\pgfmath@def{acos}{208}{77.99482} \pgfmath@def{acos}{209}{77.93624}
-\pgfmath@def{acos}{210}{77.87764} \pgfmath@def{acos}{211}{77.81903}
-\pgfmath@def{acos}{212}{77.76041} \pgfmath@def{acos}{213}{77.70178}
-\pgfmath@def{acos}{214}{77.64313} \pgfmath@def{acos}{215}{77.58447}
-\pgfmath@def{acos}{216}{77.52579} \pgfmath@def{acos}{217}{77.46711}
-\pgfmath@def{acos}{218}{77.40841} \pgfmath@def{acos}{219}{77.34969}
-\pgfmath@def{acos}{220}{77.29096} \pgfmath@def{acos}{221}{77.23222}
-\pgfmath@def{acos}{222}{77.17347} \pgfmath@def{acos}{223}{77.11470}
-\pgfmath@def{acos}{224}{77.05591} \pgfmath@def{acos}{225}{76.99712}
-\pgfmath@def{acos}{226}{76.93831} \pgfmath@def{acos}{227}{76.87948}
-\pgfmath@def{acos}{228}{76.82064} \pgfmath@def{acos}{229}{76.76179}
-\pgfmath@def{acos}{230}{76.70292} \pgfmath@def{acos}{231}{76.64404}
-\pgfmath@def{acos}{232}{76.58515} \pgfmath@def{acos}{233}{76.52624}
-\pgfmath@def{acos}{234}{76.46731} \pgfmath@def{acos}{235}{76.40837}
-\pgfmath@def{acos}{236}{76.34942} \pgfmath@def{acos}{237}{76.29045}
-\pgfmath@def{acos}{238}{76.23147} \pgfmath@def{acos}{239}{76.17247}
-\pgfmath@def{acos}{240}{76.11346} \pgfmath@def{acos}{241}{76.05443}
-\pgfmath@def{acos}{242}{75.99538} \pgfmath@def{acos}{243}{75.93632}
-\pgfmath@def{acos}{244}{75.87725} \pgfmath@def{acos}{245}{75.81816}
-\pgfmath@def{acos}{246}{75.75906} \pgfmath@def{acos}{247}{75.69994}
-\pgfmath@def{acos}{248}{75.64080} \pgfmath@def{acos}{249}{75.58165}
-\pgfmath@def{acos}{250}{75.52248} \pgfmath@def{acos}{251}{75.46330}
-\pgfmath@def{acos}{252}{75.40410} \pgfmath@def{acos}{253}{75.34489}
-\pgfmath@def{acos}{254}{75.28566} \pgfmath@def{acos}{255}{75.22641}
-\pgfmath@def{acos}{256}{75.16715} \pgfmath@def{acos}{257}{75.10787}
-\pgfmath@def{acos}{258}{75.04857} \pgfmath@def{acos}{259}{74.98926}
-\pgfmath@def{acos}{260}{74.92993} \pgfmath@def{acos}{261}{74.87059}
-\pgfmath@def{acos}{262}{74.81123} \pgfmath@def{acos}{263}{74.75185}
-\pgfmath@def{acos}{264}{74.69245} \pgfmath@def{acos}{265}{74.63304}
-\pgfmath@def{acos}{266}{74.57361} \pgfmath@def{acos}{267}{74.51417}
-\pgfmath@def{acos}{268}{74.45471} \pgfmath@def{acos}{269}{74.39523}
-\pgfmath@def{acos}{270}{74.33573} \pgfmath@def{acos}{271}{74.27621}
-\pgfmath@def{acos}{272}{74.21668} \pgfmath@def{acos}{273}{74.15713}
-\pgfmath@def{acos}{274}{74.09757} \pgfmath@def{acos}{275}{74.03798}
-\pgfmath@def{acos}{276}{73.97838} \pgfmath@def{acos}{277}{73.91876}
-\pgfmath@def{acos}{278}{73.85912} \pgfmath@def{acos}{279}{73.79946}
-\pgfmath@def{acos}{280}{73.73979} \pgfmath@def{acos}{281}{73.68010}
-\pgfmath@def{acos}{282}{73.62039} \pgfmath@def{acos}{283}{73.56066}
-\pgfmath@def{acos}{284}{73.50091} \pgfmath@def{acos}{285}{73.44115}
-\pgfmath@def{acos}{286}{73.38136} \pgfmath@def{acos}{287}{73.32156}
-\pgfmath@def{acos}{288}{73.26174} \pgfmath@def{acos}{289}{73.20190}
-\pgfmath@def{acos}{290}{73.14204} \pgfmath@def{acos}{291}{73.08216}
-\pgfmath@def{acos}{292}{73.02226} \pgfmath@def{acos}{293}{72.96235}
-\pgfmath@def{acos}{294}{72.90241} \pgfmath@def{acos}{295}{72.84246}
-\pgfmath@def{acos}{296}{72.78248} \pgfmath@def{acos}{297}{72.72249}
-\pgfmath@def{acos}{298}{72.66248} \pgfmath@def{acos}{299}{72.60244}
-\pgfmath@def{acos}{300}{72.54239} \pgfmath@def{acos}{301}{72.48232}
-\pgfmath@def{acos}{302}{72.42223} \pgfmath@def{acos}{303}{72.36212}
-\pgfmath@def{acos}{304}{72.30198} \pgfmath@def{acos}{305}{72.24183}
-\pgfmath@def{acos}{306}{72.18166} \pgfmath@def{acos}{307}{72.12147}
-\pgfmath@def{acos}{308}{72.06125} \pgfmath@def{acos}{309}{72.00102}
-\pgfmath@def{acos}{310}{71.94077} \pgfmath@def{acos}{311}{71.88049}
-\pgfmath@def{acos}{312}{71.82019} \pgfmath@def{acos}{313}{71.75988}
-\pgfmath@def{acos}{314}{71.69954} \pgfmath@def{acos}{315}{71.63918}
-\pgfmath@def{acos}{316}{71.57880} \pgfmath@def{acos}{317}{71.51840}
-\pgfmath@def{acos}{318}{71.45798} \pgfmath@def{acos}{319}{71.39754}
-\pgfmath@def{acos}{320}{71.33707} \pgfmath@def{acos}{321}{71.27658}
-\pgfmath@def{acos}{322}{71.21608} \pgfmath@def{acos}{323}{71.15555}
-\pgfmath@def{acos}{324}{71.09499} \pgfmath@def{acos}{325}{71.03442}
-\pgfmath@def{acos}{326}{70.97382} \pgfmath@def{acos}{327}{70.91321}
-\pgfmath@def{acos}{328}{70.85257} \pgfmath@def{acos}{329}{70.79190}
-\pgfmath@def{acos}{330}{70.73122} \pgfmath@def{acos}{331}{70.67051}
-\pgfmath@def{acos}{332}{70.60978} \pgfmath@def{acos}{333}{70.54903}
-\pgfmath@def{acos}{334}{70.48826} \pgfmath@def{acos}{335}{70.42746}
-\pgfmath@def{acos}{336}{70.36664} \pgfmath@def{acos}{337}{70.30579}
-\pgfmath@def{acos}{338}{70.24493} \pgfmath@def{acos}{339}{70.18404}
-\pgfmath@def{acos}{340}{70.12312} \pgfmath@def{acos}{341}{70.06218}
-\pgfmath@def{acos}{342}{70.00122} \pgfmath@def{acos}{343}{69.94024}
-\pgfmath@def{acos}{344}{69.87923} \pgfmath@def{acos}{345}{69.81820}
-\pgfmath@def{acos}{346}{69.75714} \pgfmath@def{acos}{347}{69.69606}
-\pgfmath@def{acos}{348}{69.63496} \pgfmath@def{acos}{349}{69.57383}
-\pgfmath@def{acos}{350}{69.51268} \pgfmath@def{acos}{351}{69.45150}
-\pgfmath@def{acos}{352}{69.39030} \pgfmath@def{acos}{353}{69.32908}
-\pgfmath@def{acos}{354}{69.26783} \pgfmath@def{acos}{355}{69.20655}
-\pgfmath@def{acos}{356}{69.14525} \pgfmath@def{acos}{357}{69.08393}
-\pgfmath@def{acos}{358}{69.02258} \pgfmath@def{acos}{359}{68.96120}
-\pgfmath@def{acos}{360}{68.89980} \pgfmath@def{acos}{361}{68.83837}
-\pgfmath@def{acos}{362}{68.77692} \pgfmath@def{acos}{363}{68.71544}
-\pgfmath@def{acos}{364}{68.65394} \pgfmath@def{acos}{365}{68.59241}
-\pgfmath@def{acos}{366}{68.53086} \pgfmath@def{acos}{367}{68.46928}
-\pgfmath@def{acos}{368}{68.40767} \pgfmath@def{acos}{369}{68.34604}
-\pgfmath@def{acos}{370}{68.28438} \pgfmath@def{acos}{371}{68.22269}
-\pgfmath@def{acos}{372}{68.16098} \pgfmath@def{acos}{373}{68.09924}
-\pgfmath@def{acos}{374}{68.03748} \pgfmath@def{acos}{375}{67.97568}
-\pgfmath@def{acos}{376}{67.91386} \pgfmath@def{acos}{377}{67.85202}
-\pgfmath@def{acos}{378}{67.79014} \pgfmath@def{acos}{379}{67.72824}
-\pgfmath@def{acos}{380}{67.66631} \pgfmath@def{acos}{381}{67.60436}
-\pgfmath@def{acos}{382}{67.54237} \pgfmath@def{acos}{383}{67.48036}
-\pgfmath@def{acos}{384}{67.41832} \pgfmath@def{acos}{385}{67.35626}
-\pgfmath@def{acos}{386}{67.29416} \pgfmath@def{acos}{387}{67.23204}
-\pgfmath@def{acos}{388}{67.16988} \pgfmath@def{acos}{389}{67.10770}
-\pgfmath@def{acos}{390}{67.04550} \pgfmath@def{acos}{391}{66.98326}
-\pgfmath@def{acos}{392}{66.92099} \pgfmath@def{acos}{393}{66.85870}
-\pgfmath@def{acos}{394}{66.79637} \pgfmath@def{acos}{395}{66.73402}
-\pgfmath@def{acos}{396}{66.67164} \pgfmath@def{acos}{397}{66.60923}
-\pgfmath@def{acos}{398}{66.54679} \pgfmath@def{acos}{399}{66.48432}
-\pgfmath@def{acos}{400}{66.42182} \pgfmath@def{acos}{401}{66.35929}
-\pgfmath@def{acos}{402}{66.29673} \pgfmath@def{acos}{403}{66.23414}
-\pgfmath@def{acos}{404}{66.17152} \pgfmath@def{acos}{405}{66.10887}
-\pgfmath@def{acos}{406}{66.04619} \pgfmath@def{acos}{407}{65.98348}
-\pgfmath@def{acos}{408}{65.92074} \pgfmath@def{acos}{409}{65.85796}
-\pgfmath@def{acos}{410}{65.79516} \pgfmath@def{acos}{411}{65.73233}
-\pgfmath@def{acos}{412}{65.66946} \pgfmath@def{acos}{413}{65.60657}
-\pgfmath@def{acos}{414}{65.54364} \pgfmath@def{acos}{415}{65.48068}
-\pgfmath@def{acos}{416}{65.41769} \pgfmath@def{acos}{417}{65.35467}
-\pgfmath@def{acos}{418}{65.29161} \pgfmath@def{acos}{419}{65.22853}
-\pgfmath@def{acos}{420}{65.16541} \pgfmath@def{acos}{421}{65.10226}
-\pgfmath@def{acos}{422}{65.03908} \pgfmath@def{acos}{423}{64.97586}
-\pgfmath@def{acos}{424}{64.91261} \pgfmath@def{acos}{425}{64.84933}
-\pgfmath@def{acos}{426}{64.78602} \pgfmath@def{acos}{427}{64.72267}
-\pgfmath@def{acos}{428}{64.65929} \pgfmath@def{acos}{429}{64.59588}
-\pgfmath@def{acos}{430}{64.53244} \pgfmath@def{acos}{431}{64.46896}
-\pgfmath@def{acos}{432}{64.40544} \pgfmath@def{acos}{433}{64.34190}
-\pgfmath@def{acos}{434}{64.27832} \pgfmath@def{acos}{435}{64.21470}
-\pgfmath@def{acos}{436}{64.15105} \pgfmath@def{acos}{437}{64.08737}
-\pgfmath@def{acos}{438}{64.02365} \pgfmath@def{acos}{439}{63.95990}
-\pgfmath@def{acos}{440}{63.89611} \pgfmath@def{acos}{441}{63.83229}
-\pgfmath@def{acos}{442}{63.76844} \pgfmath@def{acos}{443}{63.70455}
-\pgfmath@def{acos}{444}{63.64062} \pgfmath@def{acos}{445}{63.57666}
-\pgfmath@def{acos}{446}{63.51266} \pgfmath@def{acos}{447}{63.44863}
-\pgfmath@def{acos}{448}{63.38456} \pgfmath@def{acos}{449}{63.32045}
-\pgfmath@def{acos}{450}{63.25631} \pgfmath@def{acos}{451}{63.19213}
-\pgfmath@def{acos}{452}{63.12792} \pgfmath@def{acos}{453}{63.06367}
-\pgfmath@def{acos}{454}{62.99938} \pgfmath@def{acos}{455}{62.93506}
-\pgfmath@def{acos}{456}{62.87070} \pgfmath@def{acos}{457}{62.80630}
-\pgfmath@def{acos}{458}{62.74187} \pgfmath@def{acos}{459}{62.67740}
-\pgfmath@def{acos}{460}{62.61289} \pgfmath@def{acos}{461}{62.54834}
-\pgfmath@def{acos}{462}{62.48376} \pgfmath@def{acos}{463}{62.41913}
-\pgfmath@def{acos}{464}{62.35447} \pgfmath@def{acos}{465}{62.28977}
-\pgfmath@def{acos}{466}{62.22504} \pgfmath@def{acos}{467}{62.16026}
-\pgfmath@def{acos}{468}{62.09545} \pgfmath@def{acos}{469}{62.03059}
-\pgfmath@def{acos}{470}{61.96570} \pgfmath@def{acos}{471}{61.90077}
-\pgfmath@def{acos}{472}{61.83580} \pgfmath@def{acos}{473}{61.77079}
-\pgfmath@def{acos}{474}{61.70574} \pgfmath@def{acos}{475}{61.64065}
-\pgfmath@def{acos}{476}{61.57552} \pgfmath@def{acos}{477}{61.51035}
-\pgfmath@def{acos}{478}{61.44514} \pgfmath@def{acos}{479}{61.37988}
-\pgfmath@def{acos}{480}{61.31459} \pgfmath@def{acos}{481}{61.24926}
-\pgfmath@def{acos}{482}{61.18389} \pgfmath@def{acos}{483}{61.11847}
-\pgfmath@def{acos}{484}{61.05302} \pgfmath@def{acos}{485}{60.98752}
-\pgfmath@def{acos}{486}{60.92199} \pgfmath@def{acos}{487}{60.85641}
-\pgfmath@def{acos}{488}{60.79078} \pgfmath@def{acos}{489}{60.72512}
-\pgfmath@def{acos}{490}{60.65941} \pgfmath@def{acos}{491}{60.59367}
-\pgfmath@def{acos}{492}{60.52787} \pgfmath@def{acos}{493}{60.46204}
-\pgfmath@def{acos}{494}{60.39616} \pgfmath@def{acos}{495}{60.33025}
-\pgfmath@def{acos}{496}{60.26428} \pgfmath@def{acos}{497}{60.19828}
-\pgfmath@def{acos}{498}{60.13223} \pgfmath@def{acos}{499}{60.06613}
-\pgfmath@def{acos}{500}{60.00000} \pgfmath@def{acos}{501}{59.93381}
-\pgfmath@def{acos}{502}{59.86759} \pgfmath@def{acos}{503}{59.80132}
-\pgfmath@def{acos}{504}{59.73500} \pgfmath@def{acos}{505}{59.66864}
-\pgfmath@def{acos}{506}{59.60224} \pgfmath@def{acos}{507}{59.53579}
-\pgfmath@def{acos}{508}{59.46929} \pgfmath@def{acos}{509}{59.40275}
-\pgfmath@def{acos}{510}{59.33617} \pgfmath@def{acos}{511}{59.26953}
-\pgfmath@def{acos}{512}{59.20285} \pgfmath@def{acos}{513}{59.13613}
-\pgfmath@def{acos}{514}{59.06936} \pgfmath@def{acos}{515}{59.00254}
-\pgfmath@def{acos}{516}{58.93568} \pgfmath@def{acos}{517}{58.86876}
-\pgfmath@def{acos}{518}{58.80180} \pgfmath@def{acos}{519}{58.73480}
-\pgfmath@def{acos}{520}{58.66774} \pgfmath@def{acos}{521}{58.60064}
-\pgfmath@def{acos}{522}{58.53349} \pgfmath@def{acos}{523}{58.46629}
-\pgfmath@def{acos}{524}{58.39905} \pgfmath@def{acos}{525}{58.33175}
-\pgfmath@def{acos}{526}{58.26441} \pgfmath@def{acos}{527}{58.19702}
-\pgfmath@def{acos}{528}{58.12957} \pgfmath@def{acos}{529}{58.06208}
-\pgfmath@def{acos}{530}{57.99454} \pgfmath@def{acos}{531}{57.92695}
-\pgfmath@def{acos}{532}{57.85931} \pgfmath@def{acos}{533}{57.79162}
-\pgfmath@def{acos}{534}{57.72388} \pgfmath@def{acos}{535}{57.65608}
-\pgfmath@def{acos}{536}{57.58824} \pgfmath@def{acos}{537}{57.52035}
-\pgfmath@def{acos}{538}{57.45240} \pgfmath@def{acos}{539}{57.38441}
-\pgfmath@def{acos}{540}{57.31636} \pgfmath@def{acos}{541}{57.24826}
-\pgfmath@def{acos}{542}{57.18010} \pgfmath@def{acos}{543}{57.11190}
-\pgfmath@def{acos}{544}{57.04364} \pgfmath@def{acos}{545}{56.97533}
-\pgfmath@def{acos}{546}{56.90697} \pgfmath@def{acos}{547}{56.83855}
-\pgfmath@def{acos}{548}{56.77008} \pgfmath@def{acos}{549}{56.70156}
-\pgfmath@def{acos}{550}{56.63298} \pgfmath@def{acos}{551}{56.56435}
-\pgfmath@def{acos}{552}{56.49567} \pgfmath@def{acos}{553}{56.42693}
-\pgfmath@def{acos}{554}{56.35813} \pgfmath@def{acos}{555}{56.28928}
-\pgfmath@def{acos}{556}{56.22038} \pgfmath@def{acos}{557}{56.15141}
-\pgfmath@def{acos}{558}{56.08240} \pgfmath@def{acos}{559}{56.01333}
-\pgfmath@def{acos}{560}{55.94420} \pgfmath@def{acos}{561}{55.87501}
-\pgfmath@def{acos}{562}{55.80577} \pgfmath@def{acos}{563}{55.73647}
-\pgfmath@def{acos}{564}{55.66712} \pgfmath@def{acos}{565}{55.59770}
-\pgfmath@def{acos}{566}{55.52823} \pgfmath@def{acos}{567}{55.45871}
-\pgfmath@def{acos}{568}{55.38912} \pgfmath@def{acos}{569}{55.31947}
-\pgfmath@def{acos}{570}{55.24977} \pgfmath@def{acos}{571}{55.18001}
-\pgfmath@def{acos}{572}{55.11019} \pgfmath@def{acos}{573}{55.04030}
-\pgfmath@def{acos}{574}{54.97036} \pgfmath@def{acos}{575}{54.90036}
-\pgfmath@def{acos}{576}{54.83030} \pgfmath@def{acos}{577}{54.76018}
-\pgfmath@def{acos}{578}{54.69000} \pgfmath@def{acos}{579}{54.61976}
-\pgfmath@def{acos}{580}{54.54945} \pgfmath@def{acos}{581}{54.47909}
-\pgfmath@def{acos}{582}{54.40866} \pgfmath@def{acos}{583}{54.33817}
-\pgfmath@def{acos}{584}{54.26762} \pgfmath@def{acos}{585}{54.19701}
-\pgfmath@def{acos}{586}{54.12633} \pgfmath@def{acos}{587}{54.05559}
-\pgfmath@def{acos}{588}{53.98479} \pgfmath@def{acos}{589}{53.91392}
-\pgfmath@def{acos}{590}{53.84299} \pgfmath@def{acos}{591}{53.77199}
-\pgfmath@def{acos}{592}{53.70093} \pgfmath@def{acos}{593}{53.62981}
-\pgfmath@def{acos}{594}{53.55862} \pgfmath@def{acos}{595}{53.48736}
-\pgfmath@def{acos}{596}{53.41604} \pgfmath@def{acos}{597}{53.34466}
-\pgfmath@def{acos}{598}{53.27320} \pgfmath@def{acos}{599}{53.20168}
-\pgfmath@def{acos}{600}{53.13010} \pgfmath@def{acos}{601}{53.05844}
-\pgfmath@def{acos}{602}{52.98672} \pgfmath@def{acos}{603}{52.91494}
-\pgfmath@def{acos}{604}{52.84308} \pgfmath@def{acos}{605}{52.77115}
-\pgfmath@def{acos}{606}{52.69916} \pgfmath@def{acos}{607}{52.62710}
-\pgfmath@def{acos}{608}{52.55497} \pgfmath@def{acos}{609}{52.48276}
-\pgfmath@def{acos}{610}{52.41049} \pgfmath@def{acos}{611}{52.33815}
-\pgfmath@def{acos}{612}{52.26574} \pgfmath@def{acos}{613}{52.19326}
-\pgfmath@def{acos}{614}{52.12070} \pgfmath@def{acos}{615}{52.04808}
-\pgfmath@def{acos}{616}{51.97538} \pgfmath@def{acos}{617}{51.90261}
-\pgfmath@def{acos}{618}{51.82976} \pgfmath@def{acos}{619}{51.75685}
-\pgfmath@def{acos}{620}{51.68386} \pgfmath@def{acos}{621}{51.61080}
-\pgfmath@def{acos}{622}{51.53766} \pgfmath@def{acos}{623}{51.46445}
-\pgfmath@def{acos}{624}{51.39117} \pgfmath@def{acos}{625}{51.31781}
-\pgfmath@def{acos}{626}{51.24437} \pgfmath@def{acos}{627}{51.17086}
-\pgfmath@def{acos}{628}{51.09728} \pgfmath@def{acos}{629}{51.02361}
-\pgfmath@def{acos}{630}{50.94987} \pgfmath@def{acos}{631}{50.87606}
-\pgfmath@def{acos}{632}{50.80216} \pgfmath@def{acos}{633}{50.72819}
-\pgfmath@def{acos}{634}{50.65414} \pgfmath@def{acos}{635}{50.58001}
-\pgfmath@def{acos}{636}{50.50580} \pgfmath@def{acos}{637}{50.43152}
-\pgfmath@def{acos}{638}{50.35715} \pgfmath@def{acos}{639}{50.28270}
-\pgfmath@def{acos}{640}{50.20818} \pgfmath@def{acos}{641}{50.13357}
-\pgfmath@def{acos}{642}{50.05888} \pgfmath@def{acos}{643}{49.98411}
-\pgfmath@def{acos}{644}{49.90926} \pgfmath@def{acos}{645}{49.83432}
-\pgfmath@def{acos}{646}{49.75930} \pgfmath@def{acos}{647}{49.68420}
-\pgfmath@def{acos}{648}{49.60902} \pgfmath@def{acos}{649}{49.53375}
-\pgfmath@def{acos}{650}{49.45839} \pgfmath@def{acos}{651}{49.38296}
-\pgfmath@def{acos}{652}{49.30743} \pgfmath@def{acos}{653}{49.23182}
-\pgfmath@def{acos}{654}{49.15613} \pgfmath@def{acos}{655}{49.08035}
-\pgfmath@def{acos}{656}{49.00448} \pgfmath@def{acos}{657}{48.92852}
-\pgfmath@def{acos}{658}{48.85248} \pgfmath@def{acos}{659}{48.77634}
-\pgfmath@def{acos}{660}{48.70012} \pgfmath@def{acos}{661}{48.62381}
-\pgfmath@def{acos}{662}{48.54741} \pgfmath@def{acos}{663}{48.47092}
-\pgfmath@def{acos}{664}{48.39434} \pgfmath@def{acos}{665}{48.31767}
-\pgfmath@def{acos}{666}{48.24091} \pgfmath@def{acos}{667}{48.16405}
-\pgfmath@def{acos}{668}{48.08710} \pgfmath@def{acos}{669}{48.01006}
-\pgfmath@def{acos}{670}{47.93293} \pgfmath@def{acos}{671}{47.85570}
-\pgfmath@def{acos}{672}{47.77838} \pgfmath@def{acos}{673}{47.70096}
-\pgfmath@def{acos}{674}{47.62345} \pgfmath@def{acos}{675}{47.54585}
-\pgfmath@def{acos}{676}{47.46814} \pgfmath@def{acos}{677}{47.39034}
-\pgfmath@def{acos}{678}{47.31244} \pgfmath@def{acos}{679}{47.23445}
-\pgfmath@def{acos}{680}{47.15635} \pgfmath@def{acos}{681}{47.07816}
-\pgfmath@def{acos}{682}{46.99987} \pgfmath@def{acos}{683}{46.92147}
-\pgfmath@def{acos}{684}{46.84298} \pgfmath@def{acos}{685}{46.76439}
-\pgfmath@def{acos}{686}{46.68569} \pgfmath@def{acos}{687}{46.60690}
-\pgfmath@def{acos}{688}{46.52800} \pgfmath@def{acos}{689}{46.44899}
-\pgfmath@def{acos}{690}{46.36989} \pgfmath@def{acos}{691}{46.29068}
-\pgfmath@def{acos}{692}{46.21136} \pgfmath@def{acos}{693}{46.13194}
-\pgfmath@def{acos}{694}{46.05241} \pgfmath@def{acos}{695}{45.97278}
-\pgfmath@def{acos}{696}{45.89304} \pgfmath@def{acos}{697}{45.81319}
-\pgfmath@def{acos}{698}{45.73323} \pgfmath@def{acos}{699}{45.65317}
-\pgfmath@def{acos}{700}{45.57299} \pgfmath@def{acos}{701}{45.49271}
-\pgfmath@def{acos}{702}{45.41231} \pgfmath@def{acos}{703}{45.33180}
-\pgfmath@def{acos}{704}{45.25118} \pgfmath@def{acos}{705}{45.17045}
-\pgfmath@def{acos}{706}{45.08961} \pgfmath@def{acos}{707}{45.00865}
-\pgfmath@def{acos}{708}{44.92757} \pgfmath@def{acos}{709}{44.84638}
-\pgfmath@def{acos}{710}{44.76508} \pgfmath@def{acos}{711}{44.68366}
-\pgfmath@def{acos}{712}{44.60212} \pgfmath@def{acos}{713}{44.52046}
-\pgfmath@def{acos}{714}{44.43869} \pgfmath@def{acos}{715}{44.35680}
-\pgfmath@def{acos}{716}{44.27478} \pgfmath@def{acos}{717}{44.19265}
-\pgfmath@def{acos}{718}{44.11039} \pgfmath@def{acos}{719}{44.02802}
-\pgfmath@def{acos}{720}{43.94552} \pgfmath@def{acos}{721}{43.86289}
-\pgfmath@def{acos}{722}{43.78014} \pgfmath@def{acos}{723}{43.69727}
-\pgfmath@def{acos}{724}{43.61427} \pgfmath@def{acos}{725}{43.53115}
-\pgfmath@def{acos}{726}{43.44790} \pgfmath@def{acos}{727}{43.36452}
-\pgfmath@def{acos}{728}{43.28101} \pgfmath@def{acos}{729}{43.19737}
-\pgfmath@def{acos}{730}{43.11360} \pgfmath@def{acos}{731}{43.02970}
-\pgfmath@def{acos}{732}{42.94567} \pgfmath@def{acos}{733}{42.86151}
-\pgfmath@def{acos}{734}{42.77721} \pgfmath@def{acos}{735}{42.69278}
-\pgfmath@def{acos}{736}{42.60821} \pgfmath@def{acos}{737}{42.52351}
-\pgfmath@def{acos}{738}{42.43867} \pgfmath@def{acos}{739}{42.35370}
-\pgfmath@def{acos}{740}{42.26858} \pgfmath@def{acos}{741}{42.18333}
-\pgfmath@def{acos}{742}{42.09793} \pgfmath@def{acos}{743}{42.01240}
-\pgfmath@def{acos}{744}{41.92672} \pgfmath@def{acos}{745}{41.84090}
-\pgfmath@def{acos}{746}{41.75493} \pgfmath@def{acos}{747}{41.66882}
-\pgfmath@def{acos}{748}{41.58257} \pgfmath@def{acos}{749}{41.49617}
-\pgfmath@def{acos}{750}{41.40962} \pgfmath@def{acos}{751}{41.32292}
-\pgfmath@def{acos}{752}{41.23607} \pgfmath@def{acos}{753}{41.14908}
-\pgfmath@def{acos}{754}{41.06193} \pgfmath@def{acos}{755}{40.97463}
-\pgfmath@def{acos}{756}{40.88717} \pgfmath@def{acos}{757}{40.79956}
-\pgfmath@def{acos}{758}{40.71180} \pgfmath@def{acos}{759}{40.62388}
-\pgfmath@def{acos}{760}{40.53580} \pgfmath@def{acos}{761}{40.44756}
-\pgfmath@def{acos}{762}{40.35916} \pgfmath@def{acos}{763}{40.27061}
-\pgfmath@def{acos}{764}{40.18189} \pgfmath@def{acos}{765}{40.09300}
-\pgfmath@def{acos}{766}{40.00396} \pgfmath@def{acos}{767}{39.91474}
-\pgfmath@def{acos}{768}{39.82537} \pgfmath@def{acos}{769}{39.73582}
-\pgfmath@def{acos}{770}{39.64611} \pgfmath@def{acos}{771}{39.55622}
-\pgfmath@def{acos}{772}{39.46617} \pgfmath@def{acos}{773}{39.37594}
-\pgfmath@def{acos}{774}{39.28554} \pgfmath@def{acos}{775}{39.19496}
-\pgfmath@def{acos}{776}{39.10421} \pgfmath@def{acos}{777}{39.01328}
-\pgfmath@def{acos}{778}{38.92218} \pgfmath@def{acos}{779}{38.83089}
-\pgfmath@def{acos}{780}{38.73942} \pgfmath@def{acos}{781}{38.64777}
-\pgfmath@def{acos}{782}{38.55594} \pgfmath@def{acos}{783}{38.46392}
-\pgfmath@def{acos}{784}{38.37171} \pgfmath@def{acos}{785}{38.27932}
-\pgfmath@def{acos}{786}{38.18673} \pgfmath@def{acos}{787}{38.09396}
-\pgfmath@def{acos}{788}{38.00100} \pgfmath@def{acos}{789}{37.90784}
-\pgfmath@def{acos}{790}{37.81448} \pgfmath@def{acos}{791}{37.72093}
-\pgfmath@def{acos}{792}{37.62719} \pgfmath@def{acos}{793}{37.53324}
-\pgfmath@def{acos}{794}{37.43909} \pgfmath@def{acos}{795}{37.34474}
-\pgfmath@def{acos}{796}{37.25019} \pgfmath@def{acos}{797}{37.15542}
-\pgfmath@def{acos}{798}{37.06046} \pgfmath@def{acos}{799}{36.96528}
-\pgfmath@def{acos}{800}{36.86989} \pgfmath@def{acos}{801}{36.77429}
-\pgfmath@def{acos}{802}{36.67848} \pgfmath@def{acos}{803}{36.58245}
-\pgfmath@def{acos}{804}{36.48621} \pgfmath@def{acos}{805}{36.38974}
-\pgfmath@def{acos}{806}{36.29305} \pgfmath@def{acos}{807}{36.19615}
-\pgfmath@def{acos}{808}{36.09901} \pgfmath@def{acos}{809}{36.00165}
-\pgfmath@def{acos}{810}{35.90406} \pgfmath@def{acos}{811}{35.80625}
-\pgfmath@def{acos}{812}{35.70820} \pgfmath@def{acos}{813}{35.60991}
-\pgfmath@def{acos}{814}{35.51139} \pgfmath@def{acos}{815}{35.41263}
-\pgfmath@def{acos}{816}{35.31364} \pgfmath@def{acos}{817}{35.21440}
-\pgfmath@def{acos}{818}{35.11491} \pgfmath@def{acos}{819}{35.01518}
-\pgfmath@def{acos}{820}{34.91520} \pgfmath@def{acos}{821}{34.81497}
-\pgfmath@def{acos}{822}{34.71449} \pgfmath@def{acos}{823}{34.61375}
-\pgfmath@def{acos}{824}{34.51276} \pgfmath@def{acos}{825}{34.41150}
-\pgfmath@def{acos}{826}{34.30999} \pgfmath@def{acos}{827}{34.20821}
-\pgfmath@def{acos}{828}{34.10616} \pgfmath@def{acos}{829}{34.00385}
-\pgfmath@def{acos}{830}{33.90126} \pgfmath@def{acos}{831}{33.79840}
-\pgfmath@def{acos}{832}{33.69526} \pgfmath@def{acos}{833}{33.59184}
-\pgfmath@def{acos}{834}{33.48814} \pgfmath@def{acos}{835}{33.38416}
-\pgfmath@def{acos}{836}{33.27989} \pgfmath@def{acos}{837}{33.17533}
-\pgfmath@def{acos}{838}{33.07047} \pgfmath@def{acos}{839}{32.96532}
-\pgfmath@def{acos}{840}{32.85988} \pgfmath@def{acos}{841}{32.75413}
-\pgfmath@def{acos}{842}{32.64807} \pgfmath@def{acos}{843}{32.54171}
-\pgfmath@def{acos}{844}{32.43504} \pgfmath@def{acos}{845}{32.32806}
-\pgfmath@def{acos}{846}{32.22076} \pgfmath@def{acos}{847}{32.11314}
-\pgfmath@def{acos}{848}{32.00520} \pgfmath@def{acos}{849}{31.89693}
-\pgfmath@def{acos}{850}{31.78833} \pgfmath@def{acos}{851}{31.67939}
-\pgfmath@def{acos}{852}{31.57012} \pgfmath@def{acos}{853}{31.46051}
-\pgfmath@def{acos}{854}{31.35056} \pgfmath@def{acos}{855}{31.24026}
-\pgfmath@def{acos}{856}{31.12961} \pgfmath@def{acos}{857}{31.01860}
-\pgfmath@def{acos}{858}{30.90724} \pgfmath@def{acos}{859}{30.79551}
-\pgfmath@def{acos}{860}{30.68341} \pgfmath@def{acos}{861}{30.57095}
-\pgfmath@def{acos}{862}{30.45811} \pgfmath@def{acos}{863}{30.34489}
-\pgfmath@def{acos}{864}{30.23128} \pgfmath@def{acos}{865}{30.11729}
-\pgfmath@def{acos}{866}{30.00291} \pgfmath@def{acos}{867}{29.88813}
-\pgfmath@def{acos}{868}{29.77294} \pgfmath@def{acos}{869}{29.65736}
-\pgfmath@def{acos}{870}{29.54136} \pgfmath@def{acos}{871}{29.42494}
-\pgfmath@def{acos}{872}{29.30810} \pgfmath@def{acos}{873}{29.19084}
-\pgfmath@def{acos}{874}{29.07315} \pgfmath@def{acos}{875}{28.95502}
-\pgfmath@def{acos}{876}{28.83645} \pgfmath@def{acos}{877}{28.71743}
-\pgfmath@def{acos}{878}{28.59796} \pgfmath@def{acos}{879}{28.47803}
-\pgfmath@def{acos}{880}{28.35763} \pgfmath@def{acos}{881}{28.23677}
-\pgfmath@def{acos}{882}{28.11542} \pgfmath@def{acos}{883}{27.99360}
-\pgfmath@def{acos}{884}{27.87128} \pgfmath@def{acos}{885}{27.74847}
-\pgfmath@def{acos}{886}{27.62516} \pgfmath@def{acos}{887}{27.50134}
-\pgfmath@def{acos}{888}{27.37700} \pgfmath@def{acos}{889}{27.25214}
-\pgfmath@def{acos}{890}{27.12675} \pgfmath@def{acos}{891}{27.00082}
-\pgfmath@def{acos}{892}{26.87434} \pgfmath@def{acos}{893}{26.74731}
-\pgfmath@def{acos}{894}{26.61973} \pgfmath@def{acos}{895}{26.49157}
-\pgfmath@def{acos}{896}{26.36283} \pgfmath@def{acos}{897}{26.23351}
-\pgfmath@def{acos}{898}{26.10359} \pgfmath@def{acos}{899}{25.97306}
-\pgfmath@def{acos}{900}{25.84193} \pgfmath@def{acos}{901}{25.71017}
-\pgfmath@def{acos}{902}{25.57778} \pgfmath@def{acos}{903}{25.44475}
-\pgfmath@def{acos}{904}{25.31106} \pgfmath@def{acos}{905}{25.17671}
-\pgfmath@def{acos}{906}{25.04169} \pgfmath@def{acos}{907}{24.90598}
-\pgfmath@def{acos}{908}{24.76958} \pgfmath@def{acos}{909}{24.63247}
-\pgfmath@def{acos}{910}{24.49464} \pgfmath@def{acos}{911}{24.35608}
-\pgfmath@def{acos}{912}{24.21678} \pgfmath@def{acos}{913}{24.07672}
-\pgfmath@def{acos}{914}{23.93588} \pgfmath@def{acos}{915}{23.79427}
-\pgfmath@def{acos}{916}{23.65185} \pgfmath@def{acos}{917}{23.50863}
-\pgfmath@def{acos}{918}{23.36457} \pgfmath@def{acos}{919}{23.21967}
-\pgfmath@def{acos}{920}{23.07391} \pgfmath@def{acos}{921}{22.92728}
-\pgfmath@def{acos}{922}{22.77975} \pgfmath@def{acos}{923}{22.63132}
-\pgfmath@def{acos}{924}{22.48195} \pgfmath@def{acos}{925}{22.33164}
-\pgfmath@def{acos}{926}{22.18036} \pgfmath@def{acos}{927}{22.02810}
-\pgfmath@def{acos}{928}{21.87483} \pgfmath@def{acos}{929}{21.72053}
-\pgfmath@def{acos}{930}{21.56518} \pgfmath@def{acos}{931}{21.40876}
-\pgfmath@def{acos}{932}{21.25124} \pgfmath@def{acos}{933}{21.09260}
-\pgfmath@def{acos}{934}{20.93281} \pgfmath@def{acos}{935}{20.77185}
-\pgfmath@def{acos}{936}{20.60969} \pgfmath@def{acos}{937}{20.44630}
-\pgfmath@def{acos}{938}{20.28165} \pgfmath@def{acos}{939}{20.11570}
-\pgfmath@def{acos}{940}{19.94844} \pgfmath@def{acos}{941}{19.77982}
-\pgfmath@def{acos}{942}{19.60981} \pgfmath@def{acos}{943}{19.43837}
-\pgfmath@def{acos}{944}{19.26546} \pgfmath@def{acos}{945}{19.09105}
-\pgfmath@def{acos}{946}{18.91509} \pgfmath@def{acos}{947}{18.73754}
-\pgfmath@def{acos}{948}{18.55835} \pgfmath@def{acos}{949}{18.37748}
-\pgfmath@def{acos}{950}{18.19487} \pgfmath@def{acos}{951}{18.01047}
-\pgfmath@def{acos}{952}{17.82423} \pgfmath@def{acos}{953}{17.63609}
-\pgfmath@def{acos}{954}{17.44598} \pgfmath@def{acos}{955}{17.25385}
-\pgfmath@def{acos}{956}{17.05962} \pgfmath@def{acos}{957}{16.86322}
-\pgfmath@def{acos}{958}{16.66457} \pgfmath@def{acos}{959}{16.46359}
-\pgfmath@def{acos}{960}{16.26020} \pgfmath@def{acos}{961}{16.05430}
-\pgfmath@def{acos}{962}{15.84580} \pgfmath@def{acos}{963}{15.63459}
-\pgfmath@def{acos}{964}{15.42057} \pgfmath@def{acos}{965}{15.20360}
-\pgfmath@def{acos}{966}{14.98357} \pgfmath@def{acos}{967}{14.76033}
-\pgfmath@def{acos}{968}{14.53374} \pgfmath@def{acos}{969}{14.30364}
-\pgfmath@def{acos}{970}{14.06986} \pgfmath@def{acos}{971}{13.83221}
-\pgfmath@def{acos}{972}{13.59049} \pgfmath@def{acos}{973}{13.34447}
-\pgfmath@def{acos}{974}{13.09392} \pgfmath@def{acos}{975}{12.83856}
-\pgfmath@def{acos}{976}{12.57811} \pgfmath@def{acos}{977}{12.31225}
-\pgfmath@def{acos}{978}{12.04060} \pgfmath@def{acos}{979}{11.76278}
-\pgfmath@def{acos}{980}{11.47834} \pgfmath@def{acos}{981}{11.18676}
-\pgfmath@def{acos}{982}{10.88748} \pgfmath@def{acos}{983}{10.57984}
-\pgfmath@def{acos}{984}{10.26309} \pgfmath@def{acos}{985}{9.93636}
-\pgfmath@def{acos}{986}{9.59863} \pgfmath@def{acos}{987}{9.24870}
-\pgfmath@def{acos}{988}{8.88512} \pgfmath@def{acos}{989}{8.50614}
-\pgfmath@def{acos}{990}{8.10961} \pgfmath@def{acos}{991}{7.69281}
-\pgfmath@def{acos}{992}{7.25224} \pgfmath@def{acos}{993}{6.78328}
-\pgfmath@def{acos}{994}{6.27958} \pgfmath@def{acos}{995}{5.73196}
-\pgfmath@def{acos}{996}{5.12640} \pgfmath@def{acos}{997}{4.43922}
-\pgfmath@def{acos}{998}{3.62430} \pgfmath@def{acos}{999}{2.56255}
-\pgfmath@def{acos}{1000}{0.00000} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex
deleted file mode 100644
index 07a573c54ba..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex
+++ /dev/null
@@ -1,198 +0,0 @@
-% This file defines utilities common to the \pgfmath files.
-%
-% (c) 2007 Mark Wibrow
-%
-% but subject to the LaTeX Project Public License
-% (http://www.latex-project.org/lppl.txt)
-%
-% and the GNU Public License
-% (http://www.gnu.org/licenses/gpl.txt)
-%
-% Version 0.0 08/03/2007
-
-% Alias some pgf stuff, just in case it needs replacing later.
-%
-\let\pgfmath@x\pgf@x
-\let\pgfmath@xa\pgf@xa
-\let\pgfmath@xb\pgf@xb
-\let\pgfmath@xc\pgf@xc
-
-\let\pgfmath@y\pgf@y
-\let\pgfmath@ya\pgf@ya
-\let\pgfmath@yb\pgf@yb
-\let\pgfmath@yc\pgf@yc
-
-\let\c@pgfmath@counta\c@pgf@counta
-\let\c@pgfmath@countb\c@pgf@countb
-\let\c@pgfmath@countc\c@pgf@countc
-
-\let\pgfmath@ifnextchar\pgfutil@ifnextchar
-
-\let\pgfmath@tonumber\pgf@sys@tonumber
-
-\let\pgfmath@ifundefined\pgfutil@ifundefined
-
-\newif\ifpgfmath@in@
-\def\pgfmath@in@#1#2{%
- \def\pgfmath@in@@##1#1##2##3\pgfmath@in@@{%
- \ifx\pgfmath@in@##2\pgfmath@in@false\else\pgfmath@in@true\fi}%
- \pgfmath@in@@#2#1\pgfmath@in@\pgfmath@in@@}
-
-% Need to redefine to something more appropriate...?
-%
-\def\pgfmath@error#1#2{\PackageError{PGF Math}{#1}{#2}}
-\def\pgfmath@warning#1#2{\PackageWarning{PGF Math}{#1}{#2}}
-
-% \pgfmath@pt
-%
-% Needed to test for 'pt' resulting from
-% expansion using \the.
-%
-{\catcode`\p=12\catcode`\t=12\gdef\PgfmaTh@PT{pt}}
-\edef\pgfmath@pt{\PgfmaTh@PT}%
-
-% \pgfmath@ifin@
-%
-% Interface for \pgfutil@in@
-%
-\def\pgfmath@ifin@#1#2{%
- \pgfutil@in@{#1}{#2}%
- \ifpgfutil@in@%
- \expandafter\pgfmath@firstoftwo%
- \else%
- \expandafter\pgfmath@secondoftwo%
- \fi%
-}
-
-% \pgfmath@empty
-%
-% A handy macro.
-%
-\def\pgfmath@empty{}
-
-
-% \ifpgfmath@empty
-%
-% Has #1 been let to \pgf@empty?
-%
-\def\ifpgfmath@empty#1{%
- \ifx#1\pgfmath@empty\relax
- \expandafter\pgfmath@firstoftwo%
- \else%
- \expandafter\pgfmath@secondoftwo%
- \fi%
-}
-\def\pgfmath@firstoftwo#1#2{#1}
-\def\pgfmath@secondoftwo#1#2{#2}
-
-% \ifpgfmath@ifletto
-%
-% Has #1 been let to #2?
-%
-\def\pgfmath@ifletto#1#2{%
- \ifx#1#2\relax%
- \expandafter\pgfmath@firstoftwo%
- \else%
- \expandafter\pgfmath@secondoftwo%
- \fi%
-}
-
-% \ifpgfmath@iflettoeither
-%
-% Has #1 been let to #2 or #3?
-%
-\def\pgfmath@iflettoeither#1#2#3{%
- \ifx#1#2\relax%
- \let\pgfmath@equaltoeithernext\pgfmath@firstoftwo%
- \else%
- \ifx#1#3\relax%
- \let\pgfmath@equaltoeithernext\pgfmath@firstoftwo%
- \else%
- \let\pgfmath@equaltoeithernext\pgfmath@secondoftwo%
- \fi%
- \fi%
- \pgfmath@equaltoeithernext%
-}
-
-% \pgfmath@gobbletilpgfmath@
-%
-% Gobble stream until \pgfmath@ {which is undefined}.
-%
-\def\pgfmath@gobbletilpgfmath@#1\pgfmath@{}
-\def\pgfmath@gobbleone#1{}%
-
-
-% \pgfmathloop
-%
-% A version of the standard TeX and LaTeX
-% \loop, with an additional macro \pgfmathcounter
-% (which is *not* a TeX counter) which keeps
-% track of the iterations.
-%
-\newif\ifpgfmathcontinueloop
-\def\pgfmathloop#1\repeatpgfmathloop{%
- \def\pgfmathcounter{1}%
- \def\pgfmath@iterate{%
- #1\relax%
- {% Do this inside a group, just in case...
- \c@pgfmath@counta=\pgfmathcounter%
- \advance\c@pgfmath@counta by1\relax%
- \xdef\pgfmathloop@temp{\the\c@pgfmath@counta}%
- }%
- \edef\pgfmathcounter{\pgfmathloop@temp}%
- \expandafter\pgfmath@iterate\fi}%
- \pgfmath@iterate\let\pgfmath@iterate=\relax}
-\let\repeatpgfmathloop=\fi
-
-
-% \pgfmath@returnone
-%
-% \edef \pfgmathresult to the value of #1 after the end
-% of a group.
-%
-% #1 - a dimension/count/skip register or a macro
-% representing a number or dimension.
-%
-\def\pgfmath@returnone#1{%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \pgfmath@x#1pt\relax\pgfmath@%
- \xdef\pgfmath@resulttemp{\pgf@sys@tonumber{\pgfmath@x}}%
- \gdef\pgfmath@returnone@{%
- \edef\pgfmathresult{\pgfmath@resulttemp}%
- }%
- \aftergroup\pgfmath@returnone@}
-
-
-% \pgfmath@returntwo
-%
-% \edef \pfgmathresultx to the value of #1, and
-% \pgfmathresulty to the value of #2, after the end
-% of a group.
-%
-% #1 - a dimension/count/skip register or a macro
-% representing a number or dimension.
-%
-% #2 - a dimension/count/skip register or a macro
-% representing a number or dimension.
-%
-\def\pgfmath@returntwo#1#2{%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \pgfmath@x#1pt\relax\pgfmath@%
- \xdef\pgfmath@resulttempx{\pgf@sys@tonumber{\pgfmath@x}}%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \pgfmath@x#2pt\relax\pgfmath@%
- \xdef\pgfmath@resulttempx{\pgf@sys@tonumber{\pgfmath@x}}%
- \gdef\pgfmath@returntwo@{%
- \edef\pgfmathresultx{\pgfmath@resulttempx}%
- \edef\pgfmathresulty{\pgfmath@resulttempy}%
- }%
- \aftergroup\pgfmath@returntwo@}
-
-% \pgfmath@smuggleone
-%
-% Summgle a macro outside a group.
-%
-\def\pgfmath@smuggleone#1{%
- \xdef\pgfmath@smuggleditem{#1}%
- \gdef\pgfmath@@smuggleone{\edef#1{\pgfmath@smuggleditem}}%
- \aftergroup\pgfmath@@smuggleone} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex
new file mode 100644
index 00000000000..739a28395c2
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex
@@ -0,0 +1,1946 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+
+% The following naming conventions are (more or less) observed:
+%
+% `decorated' : the path that is being decorated.
+% `decoration' : any path created/left by the automaton
+% `decorate' : generic use where distinction is probably unimportant
+% (e.g. internal macros).
+
+
+
+% These should be moved.
+%
+\def\pgfgetpath#1{\pgfsyssoftpath@getcurrentpath{#1}}
+\def\pgfsetpath#1{\pgfsyssoftpath@setcurrentpath{#1}}
+
+
+% Required registers.
+%
+\newdimen\pgfdecoratedcompleteddistance
+\newdimen\pgfdecoratedremainingdistance
+\newdimen\pgfdecoratedinputsegmentcompleteddistance
+\newdimen\pgfdecoratedinputsegmentremainingdistance
+\newdimen\pgf@decorate@distancetomove
+
+\newcount\pgf@decorate@repeatstate
+
+
+% Extra options used in all libraries
+
+\newdimen\pgfdecorationsegmentamplitude
+\newdimen\pgfdecorationsegmentlength
+\pgfdecorationsegmentamplitude2.5pt
+\pgfdecorationsegmentlength10pt
+\def\pgfdecorationsegmentangle{45}
+\def\pgfdecorationsegmentaspect{0.5}
+\def\pgfmetadecorationsegmentamplitude{2.5pt}
+\def\pgfmetadecorationsegmentlength{1cm}
+
+\pgfkeys{%
+ /pgf/decoration/.code={\pgfkeys{/pgf/decoration/.cd,#1}},
+ /pgf/decoration/.cd,
+ amplitude/.code={\pgfmathsetlength\pgfdecorationsegmentamplitude{#1}},
+ meta-amplitude/.store in=\pgfmetadecorationsegmentamplitude,
+ segment length/.code={\pgfmathsetlength\pgfdecorationsegmentlength{#1}},
+ meta-segment length/.store in=\pgfmetadecorationsegmentlength,
+ angle/.code={\pgfmathparse{#1}\let\pgfdecorationsegmentangle\pgfmathresult},
+ aspect/.code={\pgfmathparse{#1}\let\pgfdecorationsegmentaspect\pgfmathresult},
+ start radius/.initial=2.5pt,
+ end radius/.initial=2.5pt,
+ radius/.style={start radius=#1,end radius=#1},
+ path has corners/.is if=pgfdecoratepathhascorners
+}
+\newif\ifpgfdecoratepathhascorners
+
+
+% Declare a decoration
+%
+% #1 = name of the decoration
+% #2 = initial state
+% #3 = states
+%
+% This command declares a new decoration for later use.
+% Inside the code of #3 the command \state may be used. This command
+% will only be defined while #3 is executed.
+%
+% Example:
+%
+% \pgfdeclaredecoration{zigzag}{q}
+% {
+% \state{q}[width=10pt]
+% {
+% \pgfpathlineto{\pgfpoint{2.5pt}{2.5pt}}
+% \pgfpathlineto{\pgfpoint{7.5pt}{-2.5pt}}
+% \pgfpathlineto{\pgfpoint{10pt}{0pt}}
+% }
+% \state{final}
+% {
+% \pgfpathlineto{\pgfpointdecoratedpathlast}
+% }
+% }
+
+\long\def\pgfdeclaredecoration#1#2#3{%
+ \let\pgf@mod@dec@next=\pgf@mod@dec@firstofone%
+ \pgfifmetadecoration{#1}{%
+ \PackageError{pgf}{You cannot declare a decoration of the same
+ name as a meta-decoration}{}%
+ \let\pgf@mod@dec@next=\pgfutil@gobble%
+ }{}%
+ \pgf@mod@dec@next
+ {%
+ \def\pgf@decorate@name{#1}%
+ \pgfutil@namedef{pgf@decorate@@#1@initial}{#2}%
+ \let\pgf@orig@state\state%
+ \let\state\pgf@decorate@state
+ #3%
+ \let\state\pgf@orig@state%
+ }%
+}
+
+\def\pgf@decorate@state#1{\pgfutil@ifnextchar[{\pgf@decorate@@start#1}{\pgf@decorate@@start#1[]}}%}
+\def\pgf@decorate@@start#1[#2]#3{%
+ \pgfutil@namedef{pgf@decorate@@\pgf@decorate@name @#1@options}{#2}%
+ \pgfutil@namedef{pgf@decorate@@\pgf@decorate@name @#1@code}{#3}%
+}
+\long\def\pgf@mod@dec@firstofone#1{#1}
+
+
+% Test whether something is a decoration
+%
+% #1 = name
+% #2 = if-code
+% #3 = else-code
+%
+% Example:
+%
+% \pgfifdecoration{zigzag}{Exists}{Does not exist}
+
+\def\pgfifdecoration#1#2#3{\pgfutil@ifundefined{pgf@decorate@@#1@initial}{#3}{#2}}
+
+
+
+% Declare a meta decoration
+%
+% #1 = name of the meta decoration
+% #2 = initial state
+% #3 = states
+%
+% This command declares a new meta decoration for later use.
+% Inside the code of #3 the command \state may be used.
+
+\long\def\pgfdeclaremetadecoration#1#2#3{%
+ \let\pgf@mod@dec@next=\pgf@mod@dec@firstofone%
+ \pgfifdecoration{#1}{%
+ \PackageError{pgf}{You cannot declare a meta-decoration of the
+ same name as a decoration}{}%
+ \let\pgf@mod@dec@next=\pgfutil@gobble%
+ }{}%
+ \pgf@mod@dec@next{%
+ \def\pgf@metadecoration@name{#1}%
+ \pgfutil@namedef{pgf@metadecoration@@#1@initial}{#2}%
+ \let\pgf@orig@state\state%
+ \let\state\pgf@metadecoration@state
+ #3%
+ \let\state\pgf@orig@state%
+ }%
+}
+
+\def\pgf@metadecoration@state#1{\pgfutil@ifnextchar[{\pgf@metadecoration@@state#1}{\pgf@metadecoration@@state#1[]}}%}
+\def\pgf@metadecoration@@state#1[#2]#3{%
+ \pgfutil@namedef{pgf@metadecoration@@\pgf@metadecoration@name @#1@options}{#2}%
+ \pgfutil@namedef{pgf@metadecoration@@\pgf@metadecoration@name @#1@code}{#3}%
+}
+
+
+% Test whether something is a meta-decoration
+%
+% #1 = name
+% #2 = if-code
+% #3 = else-code
+%
+% Example:
+%
+% \pgfifmetadecoration{zigzag}{Exists}{Does not exist}
+
+\def\pgfifmetadecoration#1#2#3{\pgfutil@ifundefined{pgf@metadecoration@@#1@initial}{#3}{#2}}
+
+
+
+
+
+\let\pgfdecoratebeforecode\pgfutil@empty
+\let\pgfdecorateaftercode\pgfutil@empty
+
+% \pgfdecoratepath
+%
+% Decorate a path.
+%
+% \pgfdecoratebeforecode and \pgfdecorateaftercode can be used to
+% execute code before and after the decoration.
+%
+% #1 - the name of the decoration.
+% #2 - a (non-empty) path specification.
+%
+% Example:
+%
+% \pgfdeclaredecoration{circles}{red circles}{
+% \state{red circles}[width=10pt, repeat state=2, next state=blue circles]
+% {
+% \pgfmathparse{round(rnd*100)}
+% \pgfsetstrokecolor{red!\pgfmathresult!brown}
+% \pgfsetfillcolor{orange!\pgfmathresult!yellow}
+% \pgfpathcircle{\pgfpointorigin}{2.5pt}
+% \pgfusepath{stroke,fill}
+% }
+% \state{blue circles}[width=10pt, repeat state=1, next state=red circles]
+% {
+% \pgfmathparse{round(rnd*100)}
+% \pgfsetstrokecolor{blue!\pgfmathresult!gray}
+% \pgfsetfillcolor{blue!\pgfmathresult!white}
+% \pgfpathcircle{\pgfpointorigin}{2.5pt}
+% \pgfusepath{stroke,fill}
+% }
+% \state{final}{}
+% }
+%
+% \pgfpicture
+% \pgfdecoratepath{circles}
+% {
+% \pgfpathmoveto{\pgfpointorigin}
+% \pgfpathcurveto{\pgfpoint{0cm}{3cm}}{\pgfpoint{4cm}{0cm}}{\pgfpoint{4cm}{3cm}}
+% }
+% \endpgfpicture
+%
+\long\def\pgfdecoratepath#1#2{%
+ \pgfdecoration{{#1}{\pgfdecoratedpathlength}{\pgfdecoratebeforecode}{\pgfdecorateaftercode}}%
+ #2%
+ \endpgfdecoration}
+
+
+
+
+% \pgfdecoratecurrentpath
+%
+% Decorate the current/existing path, but (unavoidably) destroys it.
+%
+% \pgfdecoratebeforecode and \pgfdecorateaftercode can be used to
+% execute code before and after the decoration.
+%
+% #1 - the name of the decoration.
+%
+% Example:
+%
+% \pgfdeclaredecoration{stars}{move}{
+% \state{move}[width=7.5pt, next state=star]{}
+% \state{star}[width=7.5pt, next state=move]
+% {
+% \pgfmathparse{round(rnd*100)}
+% \pgfsetfillcolor{yellow!\pgfmathresult!orange}
+% \pgfsetstrokecolor{yellow!\pgfmathresult!red}
+% \pgfmathparse{rnd*.75+.25}
+% \pgftransformscale{\pgfmathresult}
+% \pgfnode{star}{center}{}{}{\pgfusepath{stroke,fill}}
+% }
+% \state{final}
+% {
+% \pgfpathmoveto{\pgfpointdecoratedpathlast}
+% }
+% }
+%
+% \pgfpicture
+% \pgfpathmoveto{\pgfpointorigin}
+% \pgfpathcurveto{\pgfqpoint{0cm}{2cm}}{\pgfqpoint{3cm}{2cm}}{\pgfqpoint{3cm}{0cm}}
+% \pgfpathcurveto{\pgfqpoint{3cm}{-3cm}}{\pgfqpoint{0cm}{0cm}}{\pgfqpoint{0cm}{-3cm}}
+% \pgfpathcurveto{\pgfqpoint{0cm}{-5cm}}{\pgfqpoint{3cm}{-5cm}}{\pgfqpoint{3cm}{-3cm}}
+% \pgfdecoratecurrentpath{stars}
+% \endpgfpicture
+%
+\def\pgfdecoratecurrentpath#1{%
+ \pgfgetpath\pgf@decorate@currentpath%
+ \pgfsetpath\pgfutil@empty%
+ \pgfdecoration{{#1}{\pgfdecoratedpathlength}{\pgfdecoratebeforecode}{\pgfdecorateaftercode}}%
+ \pgfsetpath\pgf@decorate@currentpath%
+ \endpgfdecoration}
+
+
+
+
+% Environment \pgfdecoration \endpgfdecoration
+%
+% Decorates a path with multiple decorations.
+%
+% Definitions:
+%
+% `existing path'
+% - any unsed path exsiting prior to the environment.
+%
+% `decorated path'
+% - the path that is being decorated.
+%
+% `decoration path'
+% - any unused path left by the decoration automaton.
+%
+% The action of the environment is as follows:
+%
+% 1. Any existing path is saved.
+% 2. Construction commands are executed forming the decorated path.
+% 3. If the first command in the decorated path is not a `move to',
+% the last known position from the exisiting path is inserted.
+% 4. The saved existing path is reinstalled.
+% 5. The decoration automaton is executed along the decorated path.
+%
+% Parameters:
+%
+% #1 - a comma separated list of decoration specifications.
+%
+% A decoration specification takes the format:
+%
+% {<name>}{<distance>}{<before code>}{<after code>}
+%
+% The decoration <name> is applied to a section of the decorated
+% path from the last point on the decorated path the decoration
+% automaton reached to <distance> from that point.
+%
+% When <distance>} is parsed, the dimension
+% \pgfdecoratedreminingdistance holds the distance remaining on the
+% entire decorated path, and the macro \pgfdecoratedpathlength holds
+% the total length of the entire decorated path.
+% After <distance> is parsed, both are set to to the value of
+% <distance> for the automaton to decorate current section of the
+% decorated path.
+%
+% <before code> is executed just before the decoration automaton
+% starts and <after code> is executed just after the automaton stops.
+% If <before code> or <after code> are empty, they can be omitted.
+% The macros \pgfdecoratedpathfirst and \pgfdecoratedpathlast
+% will be set up as the first and last points on the current section
+% of the decorated path.
+%
+% When the environment exits, the following macros will be set up:
+%
+% \pgfdecorateexistingpath
+% - the existing path.
+%
+% \pgfdecoratedpath
+% - the decorated path.
+%
+% \pgfdecorationpath
+% - any unused decoration path.
+%
+% \pgfpointdecoratedpathlast
+% - the last point on the decorated path.
+%
+% Examples (require pgfdecorations library):
+%
+% \pgfpicture
+% \pgfdecoration
+% {
+% {lineto}{\pgfdecoratedpathlength/3},
+% {zigzag}{\pgfdecoratedpathlength/3},
+% {lineto}{\pgfdecoratedpathlength/3}
+% }
+% \pgfpathmoveto{\pgfpointorigin}
+% \pgfpathcurveto{\pgfpoint{0cm}{4cm}}{\pgfpoint{5cm}{0cm}}{\pgfpoint{5cm}{4cm}}
+% \endpgfdecoration
+% \pgfusepath{stroke}
+% \endpgfpicture
+%
+%
+% \pgfpicture
+% \pgfdecoration
+% {
+% {lineto}{\pgfdecoratedpathlength/5}{}{\pgfusepath{stroke}},
+% {zigzag}{\pgfdecoratedpathlength/5}
+% {
+% \pgfpathmoveto{\pgfpointdecoratedpathfirst}
+% }
+% {
+% \pgfsetstrokecolor{red}
+% \pgfusepath{stroke}
+% },
+% {lineto}{\pgfdecoratedpathlength/5}
+% {
+% \pgfpathmoveto{\pgfpointdecoratedpathfirst}
+% }
+% {
+% \pgfsetstrokecolor{black}
+% \pgfusepath{stroke}
+% },
+% {zigzag}{\pgfdecoratedpathlength/5}
+% {
+% \pgfpathmoveto{\pgfpointdecoratedpathfirst}
+% }
+% {
+% \pgfsetstrokecolor{red}
+% \pgfusepath{stroke}
+% },
+% {lineto}{\pgfdecoratedpathlength/5}
+% {
+% \pgfpathmoveto{\pgfpointdecoratedpathfirst}
+% }
+% {
+% \pgfsetstrokecolor{black}
+% \pgfusepath{stroke}
+% }
+% }
+% \pgfpathmoveto{\pgfpointorigin}
+% \pgfpathcurveto{\pgfpoint{0cm}{4cm}}{\pgfpoint{5cm}{0cm}}{\pgfpoint{5cm}{4cm}}
+% \endpgfdecoration
+%
+% \endpgfpicture
+%
+%
+%
+% \pgfdeclaredecoration{polygons}{move}{
+% \state{move}[width=7.5pt, next state=polygon]{}
+% \state{polygon}[width=7.5pt, next state=move]
+% {
+% \pgfmathparse{round(rnd*100)}
+% \pgfsetfillcolor{green!\pgfmathresult!yellow}
+% \pgfsetstrokecolor{green!\pgfmathresult!brown}
+% \pgfnode{regular polygon}{center}{}{}{\pgfusepath{stroke,fill}}
+% }
+% \state{final}
+% {
+% \pgfpathmoveto{\pgfpointdecoratedpathlast}
+% }
+% }
+%
+% \pgfpicture
+% \pgfdecoration
+% {
+% {polygons}{45pt},
+% {lineto}{30pt}
+% {\pgfpathmoveto{\pgfpointdecoratedpathfirst}}
+% {
+% \pgfsetstrokecolor{yellow!50!orange}
+% \pgfusepath{stroke}
+% },
+% {polygons}{45pt},
+% {lineto}{30pt}
+% {\pgfpathmoveto{\pgfpointdecoratedpathfirst}}
+% {
+% \pgfsetstrokecolor{green!50!blue}
+% \pgfusepath{stroke}
+% },
+% {polygons}{\pgfdecoratedremainingdistance}
+% }
+% \pgfpathmoveto{\pgfpointorigin}
+% \pgfpathcurveto{\pgfpoint{0cm}{4cm}}{\pgfpoint{5cm}{0cm}}{\pgfpoint{5cm}{4cm}}
+% \endpgfdecoration
+% \endpgfpicture
+%
+%
+% \pgfpicture
+% \pgfpathmoveto{\pgfpointorigin}
+% \pgfpathcurveto{\pgfpoint{0cm}{4cm}}{\pgfpoint{5cm}{0cm}}{\pgfpoint{5cm}{4cm}}
+% \pgfgetpath\temppath
+% \pgfsetstrokecolor{red}
+% \pgfusepath{stroke}
+%
+% \pgfset{decoration text={Here is some text all the way along this curve!}}
+% \pgfdecoration{{text}{\pgfdecoratedremainingdistance}}
+% \pgfsetpath\temppath
+% \endpgfdecoration
+% \endpgfpicture
+%
+\def\pgfdecoration#1{%
+ \begingroup%
+ \def\pgf@decorate@decorationlist{#1}%
+ \pgf@decoration@env%
+}
+
+\def\endpgfdecoration{%
+ \pgf@decoration@endenv%
+ \ifx\pgfdecoratedpath\pgfutil@empty%
+ \else%
+ %
+ % Perform the decoration(s).
+ %
+ \pgf@decorate@for\pgf@temp:=\pgf@decorate@decorationlist\do{%
+ \ifx\pgf@temp\pgfutil@empty%
+ \else%
+ \expandafter\pgf@decorate@invoke\expandafter{\pgf@temp}%
+ \fi%
+ }%
+ \fi%
+ \pgfgetpath\pgfdecorationpath%
+ %
+ % Take stuff outside the group.
+ %
+ \global\let\pgf@decorate@decorationpathtemp\pgfdecorationpath%
+ \global\let\pgf@decorate@decoratedpathtemp\pgfdecoratedpath%
+ \global\let\pgf@decorate@existingpathtemp\pgfdecorateexistingpath%
+ \global\let\pgfpoint@decorated@pathlasttemp\pgfpoint@decorated@pathlast%
+ \endgroup%
+ %
+ % Are we in LaTeX?
+ %
+ \pgfutil@ifnextchar\@checkend{\aftergroup\pgf@decorate@installmacrosatend}%
+ {\pgf@decorate@installmacrosatend}%
+}
+
+
+% Enviroment \pgfmetadecoration \endpgfmetadecoration
+%
+% Decorate a path with decoration automatons!
+%
+% Example:
+%
+% \pgfdeclaremetadecoration{fancy line}{line to}{
+% \state{line to}[width=1cm, next state=zigzag]
+% {
+% \decoration{lineto}
+% \beforedecoration{\pgfpathmoveto{\pgfpointdecoratedpathfirst}}
+% \afterdecoration
+% {
+% \pgfsetstrokecolor{black}
+% \pgfusepath{stroke}
+% }
+% }
+% \state{zigzag}[width=2cm, next state=line to]
+% {
+% \decoration{zigzag}
+% \beforedecoration{\pgfpathmoveto{\pgfpointdecoratedpathfirst}}
+% \afterdecoration
+% {
+% \pgfsetstrokecolor{red}
+% \pgfusepath{stroke}
+% }
+% }
+% \state{final}
+% {
+% \decoration{lineto}
+% \beforedecoration{\pgfpathmoveto{\pgfpointdecoratedpathfirst}}
+% \afterdecoration
+% {
+% \pgfsetstrokecolor{black}
+% \pgfusepath{stroke}
+% }
+% }
+% }
+%
+% \pgfpicture
+% \pgfmetadecoration{fancy line}
+% \pgfpathmoveto{\pgfpointorigin}
+% \pgfpathcurveto{\pgfqpoint{0cm}{2cm}}{\pgfqpoint{3cm}{2cm}}{\pgfqpoint{3cm}{0cm}}
+% \pgfpathcurveto{\pgfqpoint{3cm}{-3cm}}{\pgfqpoint{0cm}{0cm}}{\pgfqpoint{0cm}{-3cm}}
+% \pgfpathcurveto{\pgfqpoint{0cm}{-5cm}}{\pgfqpoint{3cm}{-5cm}}{\pgfqpoint{3cm}{-3cm}}
+% \endpgfmetadecoration
+% \endpgfpicture
+%
+\def\pgfmetadecoration#1{%
+ \begingroup%
+ \let\decoration\pgf@metadecoration@decoration%
+ \let\beforedecoration\pgf@metadecoration@beforedecoration%
+ \let\afterdecoration\pgf@metadecoration@afterdecoration%
+ \def\pgf@metadecoration@name{#1}%
+ \pgf@decoration@env%
+}
+
+\def\endpgfmetadecoration{%
+ \pgf@decoration@endenv%
+ \ifx\pgfdecoratedpath\pgfutil@empty%
+ \else%
+ \let\pgfmetadecoratedpathlength\pgf@decorate@totalpathlength%
+ \def\pgfmetadecoratedinputsegmentremainingdistance{\pgfdecoratedremainingdistance}%
+ \def\pgfmetadecoratedinputsegmentcompleteddistance{\pgfdecoratedcompleteddistance}%
+ %
+ % Perform the meta decoration...
+ %
+ \expandafter\let\expandafter\pgf@metadecoration@current@state%
+ \csname pgf@metadecoration@@\pgf@metadecoration@name @initial\endcsname%
+ \pgf@metadecoration@run%
+ %
+ % ..until the final state.
+ %
+ \let\pgf@decorate@tempname\pgfutil@empty%
+ \let\pgf@decorate@tempbefore\pgfutil@empty%
+ \let\pgf@decorate@tempafter\pgfutil@empty%
+ \csname pgf@metadecoration@@\pgf@metadecoration@name @\pgf@metadecoration@current@state @code\endcsname%
+ \ifx\pgf@decorate@tempname\pgfutil@empty%
+ \def\pgf@decorate@tempname{moveto}
+ \fi%
+ \pgf@decorate@invoke{%
+ {\pgf@decorate@tempname}{\pgfdecoratedremainingdistance}%
+ {\pgf@decorate@tempbefore}{\pgf@decorate@tempafter}%
+ }%
+ \fi%
+ \pgfgetpath\pgfdecorationpath%
+ %
+ % Take stuff outside the group.
+ %
+ \global\let\pgf@decorate@decorationpathtemp\pgfdecorationpath%
+ \global\let\pgf@decorate@decoratedpathtemp\pgfdecoratedpath%
+ \global\let\pgf@decorate@existingpathtemp\pgfdecorateexistingpath%
+ \global\let\pgfpoint@decorated@pathlasttemp\pgfpoint@decorated@pathlast%
+ \endgroup%
+ %
+ % Are we in LaTeX?
+ %
+ \pgfutil@ifnextchar\@checkend{\aftergroup\pgf@decorate@installmacrosatend}%
+ {\pgf@decorate@installmacrosatend}%
+}
+
+
+
+
+
+
+% Internal macro for the decoration enironment.
+%
+\def\pgf@decoration@env{%
+ \pgfgetpath\pgfdecorateexistingpath%
+ \pgfsetpath\pgfutil@empty%
+ \let\pgfdecorationpath\pgfutil@empty%
+ \let\pgfdecoratedpath\pgfutil@empty%
+ \let\pgfpoint@decorated@pathlast\pgfpointorigin%
+ \edef\pgfpoint@decorate@existingpathlast{\pgf@x\the\pgf@path@lastx\pgf@y\the\pgf@path@lasty}%
+ %
+ % Begin a group so transformations don't mess things up.
+ %
+ \bgroup%
+}
+
+\def\pgf@decoration@endenv{%
+ \egroup%
+ \pgftransformreset%
+ %
+ % Save the existing soft path and restore the existing path.
+ %
+ \pgfgetpath\pgfdecoratedpath%
+ \pgfsetpath\pgfdecorateexistingpath%
+ %
+ \ifx\pgfdecoratedpath\pgfutil@empty%
+ \PackageError{PGF}{I cannot decorate an empty path}{}%
+ \else%
+ %
+ % Remove special round tokens and get points.
+ %
+ \pgfprocessround{\pgfdecoratedpath}{\pgfdecoratedpath}%
+ %
+ % Parse the soft path into a series of decorated input segment objects.
+ %
+ \pgf@decorate@parsesoftpath{\pgfdecoratedpath}{\pgf@decorate@inputsegmentobjects}%
+ %
+ \let\pgf@decorated@remainingdistance\pgf@decorate@totalpathlength%
+ %
+ \let\pgfpoint@decorated@totalpathfirst\pgfpoint@decorated@firstparsed%
+ \let\pgfpoint@decorated@totalpathlast\pgfpoint@decorate@lastnonmovetoparsed%
+ %
+ \let\pgfpoint@decorated@pathfirst\pgfpoint@decorated@totalpathfirst
+ \let\pgfpoint@decorated@pathlast\pgfpoint@decorated@totalpathlast%
+ %
+ % Set up the first input segment.
+ %
+ \let\pgf@decorate@currentinputsegmentobjects\pgf@decorate@inputsegmentobjects%
+ \let\pgf@decorate@transformtoinputsegment\pgfutil@empty%
+ \pgf@decorate@getnextinputsegmentobject\pgf@decorate@nextinputsegmentobject%
+ \pgf@decorate@processnextinputsegmentobject%
+ \pgf@decorate@distancetomove0pt\relax%
+ %
+ % Setup further options
+ %
+ \pgfkeys{/pgf/every decoration/.try}%
+ \fi%
+}%
+
+
+
+
+
+\def\pgf@decorate@installmacrosatend{%
+ \let\pgfdecorationpath\pgf@decorate@decorationpathtemp%
+ \let\pgfdecoratedpath\pgf@decorate@decoratedpathtemp%
+ \let\pgfdecorateexistingpath\pgf@decorate@existingpathtemp%
+ \let\pgfpoint@decorated@pathlast\pgfpoint@decorated@pathlasttemp%
+}
+
+\let\pgfdecorationpath\pgfutil@empty
+\let\pgfdecoratedpath\pgfutil@empty
+\let\pgfdecorateexisitingpath\pgfutil@empty
+
+\let\pgfpoint@decorated@pathlast\pgfpointorigin
+
+
+
+% A version of \pgfutil@for which doesn't expand each value in #3.
+%
+\def\pgf@decorate@for#1:=#2\do#3{%
+ \def\pgf@decorate@for@var{#1}%
+ \def\pgf@decorate@for@action{#3}%
+ \expandafter\pgf@decorate@@for#2,\pgf@stop,}
+
+\def\pgf@decorate@@for#1,{%
+ \ifx#1\pgf@stop%
+ \expandafter\let\pgf@decorate@for@var\pgfutil@empty%
+ \else%
+ \expandafter\def\pgf@decorate@for@var{#1}%
+ \pgf@decorate@for@action%
+ \expandafter\pgf@decorate@@for%
+ \fi%
+}
+
+
+% Invoke a decoration.
+%
+% #1 - {<name>}{<distance>}{<before code>}{<after code>}
+%
+\def\pgf@decorate@invoke#1{%
+ \pgf@decorate@@invoke#1\pgf@decorate@invoke\pgf@decorate@invoke\pgf@decorate@invoke\pgf@stop}
+
+\def\pgf@decorate@@invoke#1#2#3#4#5\pgf@stop{%
+ \pgfutil@ifundefined{pgf@decorate@@#1@initial}%
+ {%
+ \PackageError{PGF}{Unknown decoration `#1'}{}%
+ }%
+ {%
+ \def\pgf@decorate@name{#1}%
+ \ifx\pgf@decorate@invoke#3%
+ \let\pgf@decorate@beforecode\pgfutil@empty%
+ \else%
+ \def\pgf@decorate@beforecode{#3}%
+ \fi%
+ \ifx\pgf@decorate@invoke#4%
+ \let\pgf@decorate@aftercode\pgfutil@empty%
+ \else%
+ \def\pgf@decorate@aftercode{#4}%
+ \fi%
+ %
+ % Make remaining distance and the decorated path length `public'.
+ %
+ \pgfdecoratedremainingdistance\pgf@decorated@remainingdistance\relax%
+ \let\pgfdecoratedpathlength\pgf@decorate@totalpathlength%
+ %
+ \pgfmathsetlength\pgf@xa{#2}%
+ \ifdim\pgf@xa>\pgf@decorated@remainingdistance\relax%
+ \pgf@xa\pgf@decorated@remainingdistance\relax%
+ \fi%
+ \edef\pgf@decorate@currentpathlength{\the\pgf@xa}%
+ %
+ % Calculate the distance remaining to the end of the entire path.
+ %
+ \pgf@xa-\pgf@decorate@currentpathlength\relax%
+ \advance\pgf@xa\pgf@decorated@remainingdistance\relax%
+ \edef\pgf@decorated@remainingdistance{\the\pgf@xa}%
+ %
+ % Set up the macros and distances for the current section
+ % of the decorated path.
+ %
+ \let\pgfdecoratedpathlength\pgf@decorate@currentpathlength%
+ \pgfdecoratedremainingdistance\pgfdecoratedpathlength\relax%
+ \pgfdecoratedcompleteddistance0pt\relax%
+ %
+ % Execute user-defined code beore decoration.
+ %
+ \pgf@decorate@beforecode%
+ %
+ % Run the decoration...
+ %
+ \expandafter\let\expandafter\pgf@decorate@current@state%
+ \csname pgf@decorate@@\pgf@decorate@name @initial\endcsname%
+ \pgf@decorate@run%
+ %
+ % ...until the final state.
+ %
+ \ifdim\pgf@decorated@remainingdistance<1pt\relax% Should be =0pt, but need to control for inaccuracies.
+ \let\pgfpoint@decorated@pathlast\pgfpoint@decorated@totalpathlast%
+ \else%
+ %
+ % Set up \pgfpoint@decorated@pathlast if the end of
+ % the total decorated path has not been reached.
+ %
+ {%
+ \pgf@decorate@movealonginputsegment{\the\pgfdecoratedremainingdistance}%
+ \pgf@decorate@transformtoinputsegment%
+ \pgfpointorigin%
+ \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \global\pgf@x\pgf@x%
+ \global\pgf@y\pgf@y%
+ }%
+ \edef\pgfpoint@decorated@pathlast{\pgf@x\the\pgf@x\pgf@y\the\pgf@y}%
+ \fi%
+ {%
+ \pgftransformreset%
+ \pgf@decorate@transformtoinputsegment%
+ \pgf@decorate@additionaltransform%
+ \csname pgf@decorate@@\pgf@decorate@name @final@code\endcsname%
+ }%
+ \pgf@decorate@movealonginputsegment{\the\pgfdecoratedremainingdistance}%
+ %
+ % Execute user-defined code after decoration.
+ %
+ \pgf@decorate@aftercode%
+ %
+ % Update the input segment objects.
+ %
+ \let\pgf@decorate@additionaltransform\pgfutil@empty%
+ \let\pgf@decorate@inputsegmentobjects\pgf@decorate@inputsegmentobjects@aftersplit%
+ \let\pgfpoint@decorated@pathfirst\pgfpoint@decorated@pathlast%
+ }%
+}
+
+
+
+\let\pgf@decorate@transformtoinputsegment\pgfutil@empty%
+\let\pgf@decorate@additionaltransform\pgfutil@empty%
+
+
+% \pgfpointdecoratedpathfirst
+%
+\def\pgfpointdecoratedpathfirst{%
+ {%
+ \pgftransforminvert%
+ \pgfpoint@decorated@pathfirst%
+ \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \global\pgf@x\pgf@x%
+ \global\pgf@y\pgf@y%
+ }%
+}%
+
+% \pgfpointdecoratedpathlast
+%
+\def\pgfpointdecoratedpathlast{%
+ {%
+ \pgftransforminvert%
+ \pgfpoint@decorated@pathlast%
+ \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \global\pgf@x\pgf@x%
+ \global\pgf@y\pgf@y%
+ }%
+}%
+
+% \pgfpointdecoratedinputsegmentfirst
+%
+% The first point of the current sub-path.
+%
+\def\pgfpointdecoratedinputsegmentfirst{%
+ {%
+ \pgftransforminvert%
+ \pgf@decorate@inputsegment@first%
+ \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \global\pgf@x\pgf@x%
+ \global\pgf@y\pgf@y%
+ }%
+}%
+
+% \pgfpointdecoratedinputsegmentlast
+%
+% The final point of the current sub-path.
+%
+\def\pgfpointdecoratedinputsegmentlast{%
+ {%
+ \pgftransforminvert%
+ \pgf@decorate@inputsegment@last%
+ \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \global\pgf@x\pgf@x%
+ \global\pgf@y\pgf@y%
+ }%
+}%
+
+
+\def\pgf@final@text{final}
+
+% Run a normal decoration.
+%
+\def\pgf@decorate@run{%
+ \let\pgf@decorate@next\pgf@decorate@do@state%
+ \ifx\pgf@decorate@current@state\pgf@final@text%
+ \let\pgf@decorate@next\relax%
+ \fi%
+ \pgf@decorate@next%
+}
+
+\def\pgf@decorate@do@state{%
+ \let\pgf@decorate@next\relax%
+ \let\pgf@decorate@next@state\pgf@decorate@current@state%
+ %
+ % Get the options.
+ %
+ \let\pgf@decorate@persistent@pre=\relax%
+ \let\pgf@decorate@persistent@post=\relax%
+ \expandafter\expandafter\expandafter\pgf@decorate@setter
+ \expandafter\expandafter\expandafter{\csname pgf@decorate@@\pgf@decorate@name @\pgf@decorate@current@state @options\endcsname}%
+ \ifx\pgf@decorate@next\relax%
+ \let\pgf@decorate@next\pgf@decorate@do@code%
+ \fi%
+ \pgf@decorate@next%
+}
+
+\def\pgf@decorate@setter{\pgfqkeys{/pgf/decoration automaton}}
+
+\pgf@decorate@repeatstate-1\relax
+
+\def\pgf@decorate@do@code{%
+ %
+ % Execute code.
+ %
+ \pgf@decorate@persistent@pre%
+ {%
+ \pgftransformreset%
+ \pgf@decorate@transformtoinputsegment%
+ \pgf@decorate@additionaltransform%
+ \csname pgf@decorate@@\pgf@decorate@name @\pgf@decorate@current@state @code\endcsname%
+ }%
+ \pgf@decorate@persistent@post%
+ \pgf@decorate@movealongpath{\pgf@decorate@width}%
+ %
+ % Next iteration.
+ %
+ \ifnum\pgf@decorate@repeatstate>0\relax%
+ \advance\pgf@decorate@repeatstate-1\relax%
+ \else%
+ \pgf@decorate@repeatstate-1\relax%
+ \let\pgf@decorate@current@state\pgf@decorate@next@state%
+ \fi%
+ \pgf@decorate@run%
+}
+
+\pgfkeys{
+ /pgf/decoration automaton/width/.code=\def\pgf@decorate@width{#1}\pgf@decorate@switch@if#1 to final\pgf@stop,%
+ /pgf/decoration automaton/switch if less than/.code=\pgf@decorate@switch@if#1\pgf@stop,%
+ /pgf/decoration automaton/switch if input segment less than/.code=\pgf@decorate@switch@ifinputsegment#1\pgf@stop,%
+ /pgf/decoration automaton/next state/.store in=\pgf@decorate@next@state,%
+ /pgf/decoration automaton/persistent precomputation/.store in=\pgf@decorate@persistent@pre,%
+ /pgf/decoration automaton/persistent postcomputation/.store in=\pgf@decorate@persistent@post,%
+ /pgf/decoration automaton/repeat state/.code={%
+ \ifnum\pgf@decorate@repeatstate=-1\relax%
+ \pgfmathsetcount\pgf@decorate@repeatstate{#1}%
+ \fi%
+ },%
+ /pgf/decoration automaton/if input segment is closepath/.code={%
+ \ifpgf@decorate@is@closepath@%
+ \pgfkeysalso{#1}%
+ \fi%
+ },
+ /pgf/decoration automaton/auto end on length/.code=\pgf@decorate@auto@end{#1},
+ /pgf/decoration automaton/auto corner on length/.code=\pgf@decorate@auto@corner{#1},
+}
+
+\def\pgf@decorate@auto@end#1{%
+ \ifx\pgf@decorate@next\relax%
+ \pgfmathsetlength\pgf@x{#1}%
+ \ifpgf@decorate@is@closepath@%
+ \ifdim\pgfdecoratedremainingdistance>\pgf@x%
+ \ifdim\pgfdecoratedinputsegmentremainingdistance>\pgf@x%
+ \else%
+ \pgfpathclose%
+ \pgf@decorate@movealongpath{\pgfdecoratedinputsegmentremainingdistance}%
+ \pgf@decorate@repeatstate-1\relax%
+ \let\pgf@decorate@next\pgf@decorate@run%
+ \fi%
+ \else%
+ \pgfpathclose%
+ \def\pgf@decorate@current@state{final}%
+ \def\pgf@decorate@width{\pgfdecoratedremainingdistance}
+ \pgf@decorate@repeatstate-1\relax%
+ \let\pgf@decorate@next\pgf@decorate@run%
+ \fi%
+ \else%
+ \ifdim\pgfdecoratedremainingdistance>\pgf@x%
+ \else%
+ {%
+ \pgftransformreset%
+ \pgf@decorate@transformtoinputsegment%
+ \pgf@decorate@additionaltransform%
+ \pgfpathlineto{\pgfpoint{\pgfdecoratedremainingdistance}{0pt}}
+ }%
+ \def\pgf@decorate@current@state{final}%
+ \def\pgf@decorate@width{\pgfdecoratedremainingdistance}
+ \pgf@decorate@repeatstate-1\relax%
+ \let\pgf@decorate@next\pgf@decorate@run%
+ \fi%
+ \fi%
+ \fi%
+}
+
+\def\pgf@decorate@auto@corner#1{%
+ \ifpgfdecoratepathhascorners%
+ \ifx\pgf@decorate@next\relax%
+ \pgfmathsetlength\pgf@x{#1}%
+ \ifdim\pgfdecoratedinputsegmentremainingdistance>\pgf@x%
+ \else%
+ {%
+ \pgftransformreset%
+ \pgf@decorate@transformtoinputsegment%
+ \pgf@decorate@additionaltransform%
+ \pgfpathlineto{\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
+ }%
+ \pgf@decorate@movealongpath{\pgfdecoratedinputsegmentremainingdistance}%
+ \pgf@decorate@repeatstate-1\relax%
+ \let\pgf@decorate@next\pgf@decorate@run%
+ \fi%
+ \fi%
+ \fi%
+}
+
+\def\pgf@decorate@switch@if#1to #2\pgf@stop{%
+ \ifx\pgf@decorate@next\relax%
+ \ifdim\pgfdecoratedremainingdistance=0pt\relax%
+ \def\pgf@decorate@current@state{#2}%
+ \pgf@decorate@repeatstate-1\relax%
+ \let\pgf@decorate@next\pgf@decorate@run%
+ \else%
+ \pgfmathsetlength\pgf@x{#1}%
+ \ifdim\pgfdecoratedremainingdistance<\pgf@x%
+ \def\pgf@decorate@current@state{#2}%
+ \pgf@decorate@repeatstate-1\relax%
+ \let\pgf@decorate@next\pgf@decorate@run%
+ \fi%
+ \fi%
+ \fi%
+}
+
+\def\pgf@decorate@switch@ifinputsegment#1to #2\pgf@stop{%
+ \ifx\pgf@decorate@next\relax%
+ \pgfmathsetlength\pgf@x{#1}%
+ \ifdim\pgfdecoratedinputsegmentremainingdistance<\pgf@x%
+ \def\pgf@decorate@current@state{#2}%
+ \pgf@decorate@repeatstate-1\relax%
+ \let\pgf@decorate@next\pgf@decorate@run%
+ \fi%
+ \fi%
+}
+
+
+
+
+% \pgfsetdecorationsegmenttransformation
+%
+% Set the additional transform for each decoration state.
+%
+% Example:
+%
+% \pgfsetdecorationsegmenttransformation{\pgftransformyshift{5pt}}
+%
+\def\pgfsetdecorationsegmenttransformation#1{\def\pgf@decorate@additionaltransform{#1}}
+\let\pgf@decorate@additionaltransform\pgfutil@empty%
+
+
+
+
+\def\pgf@metadecoration@decoration#1{%
+ \edef\pgf@decorate@tempname{#1}%
+}
+\def\pgf@metadecoration@beforedecoration#1{%
+ \def\pgf@decorate@tempbefore{#1}%
+}
+\def\pgf@metadecoration@afterdecoration#1{%
+ \def\pgf@decorate@tempafter{#1}%
+}
+
+
+\def\pgf@final@text{final}
+
+% Run a meta decoration.
+%
+\def\pgf@metadecoration@run{%
+ \let\pgf@metadecoration@next\pgf@metadecoration@do@state%
+ \ifx\pgf@metadecoration@current@state\pgf@final@text%
+ \let\pgf@metadecoration@next\relax%
+ \fi%
+ \pgf@metadecoration@next%
+}
+
+\def\pgf@metadecoration@do@state{%
+ \let\pgf@metadecoration@next\relax%
+ \let\pgf@metadecoration@next@state\pgf@metadecoration@current@state%
+ %
+ % Set up some macros.
+ %
+ \let\pgfmetadecoratedremainingdistance\pgf@decorated@remainingdistance%
+ \pgf@x-\pgfmetadecoratedremainingdistance\relax%
+ \advance\pgf@x\pgf@decorate@totalpathlength\relax%
+ \edef\pgfmetadecoratedcompleteddistance{\the\pgf@x}%
+ %
+ % Get the options.
+ %
+ \expandafter\expandafter\expandafter\pgf@metadecoration@setter
+ \expandafter\expandafter\expandafter{\csname pgf@metadecoration@@\pgf@metadecoration@name @\pgf@metadecoration@current@state @options\endcsname}%
+ \ifx\pgf@metadecoration@next\relax%
+ \let\pgf@metadecoration@next\pgf@metadecoration@do@code%
+ \fi%
+ \pgf@metadecoration@next%
+}
+
+\def\pgf@metadecoration@do@code{%
+ %
+ % Execute code.
+ %
+ \let\pgf@decorate@tempname\pgfutil@empty%
+ \let\pgf@decorate@tempbefore\pgfutil@empty%
+ \let\pgf@decorate@tempafter\pgfutil@empty%
+ \let\pgfpointmetadecoratedpathfirst\pgfpointdecoratedpathfirst%
+ \let\pgfpointmetadecoratedpathlast\pgfpointdecoratedpathlast%
+ \csname pgf@metadecoration@@\pgf@metadecoration@name @\pgf@metadecoration@current@state @code\endcsname%
+ \ifx\pgf@decorate@tempname\pgfutil@empty%
+ \def\pgf@decorate@tempname{moveto}
+ \fi%
+ \pgf@decorate@invoke{%
+ {\pgf@decorate@tempname}{\pgf@metadecoration@width}%
+ {\pgf@decorate@tempbefore}{\pgf@decorate@tempafter}%
+ }%
+ %
+ % Next iteration.
+ %
+ \let\pgf@metadecoration@current@state\pgf@metadecoration@next@state%
+ \pgf@metadecoration@run%
+}
+
+\def\pgf@metadecoration@setter{\pgfqkeys{/pgf/meta-decoration automaton}}
+
+\pgfkeys{
+ /pgf/meta-decoration automaton/width/.code=\def\pgf@metadecoration@width{#1}\pgf@metadecoration@switch@if#1 to final\pgf@stop,%
+ /pgf/meta-decoration automaton/switch if less than/.code=\pgf@metadecoration@switch@if#1\pgf@stop,%
+ /pgf/meta-decoration automaton/switch if input segment less than/.code=\pgf@metadecoration@switch@ifinputsegment#1\pgf@stop,%
+ /pgf/meta-decoration automaton/next state/.store in=\pgf@metadecoration@next@state,%
+}
+
+\def\pgf@metadecoration@switch@if#1to #2\pgf@stop{%
+ \ifx\pgf@metadecoration@next\relax%
+ \pgfmathsetlength\pgf@x{#1}%
+ \ifdim\pgf@decorated@remainingdistance<\pgf@x%
+ \def\pgf@metadecoration@current@state{#2}%
+ \let\pgf@metadecoration@next\pgf@metadecoration@run%
+ \fi%
+ \fi%
+}
+
+\def\pgf@metadecoration@switch@ifinputsegment#1to #2\pgf@stop{%
+ \ifx\pgf@metadecoration@next\relax%
+ \pgfmathsetlength\pgf@x{#1}%
+ \ifdim\pgfdecoratedinputsegmentremainingdistance<\pgf@x%
+ \def\pgf@metadecoration@current@state{#2}%
+ \let\pgf@metadecoration@next\pgf@metadecoration@run%
+ \fi%
+ \fi%
+}
+
+
+
+% Move along the path by a specified distance.
+%
+\def\pgf@decorate@movealongpath#1{%
+ \pgfmathsetlength\pgf@decorate@distancetomove{#1}%
+ \advance\pgfdecoratedcompleteddistance\pgf@decorate@distancetomove%
+ \advance\pgfdecoratedremainingdistance-\pgf@decorate@distancetomove%
+ \pgf@decorate@@movealongpath%
+}
+\def\pgf@decorate@@movealongpath{%
+ \advance\pgfdecoratedinputsegmentcompleteddistance\pgf@decorate@distancetomove%
+ \advance\pgfdecoratedinputsegmentremainingdistance-\pgf@decorate@distancetomove%
+ \ifdim\pgfdecoratedinputsegmentremainingdistance>0pt\relax%
+ \let\pgf@next\pgf@decorate@@@movealongpath%
+ \else%
+ \pgf@decorate@distancetomove-\pgfdecoratedinputsegmentremainingdistance%
+ \pgf@decorate@processnextinputsegmentobject%
+ \ifx\pgf@decorate@currentinputsegmentobjects\pgfutil@empty%
+ \pgfdecoratedremainingdistance0pt\relax%
+ \let\pgf@next\relax%
+ \else%
+ \let\pgf@next\pgf@decorate@@movealongpath%
+ \fi%
+ \fi%
+ \pgf@next%
+}
+
+\def\pgf@decorate@@@movealongpath{%
+ %
+ % Move along input segment for real.
+ %
+ \pgf@decorate@movealonginputsegment{\the\pgf@decorate@distancetomove}%
+ \pgf@decorate@distancetomove0pt\relax%
+ %
+ % Grrr. Hacking to control some inaccuracies.
+ %
+ \ifdim\pgf@decorate@inputsegmenttime pt>1pt\relax%
+ \let\pgf@decorate@inputsegmenttimetemp\pgf@decorate@inputsegmenttime%
+ \pgf@decorate@processnextinputsegmentobject%
+ \pgf@x\pgf@decorate@inputsegmenttimetemp pt\relax%
+ \advance\pgf@x-1pt\relax%
+ \edef\pgf@decorate@inputsegmenttime{\pgfmath@tonumber{\pgf@x}}%
+ \ifx\pgf@decorate@currentinputsegmentobjects\pgfutil@empty%
+ \pgfdecoratedremainingdistance0pt\relax%
+ \fi%
+ \fi%
+}
+
+% Return the next input segment object in a macro
+%
+\def\pgf@decorate@getnextinputsegmentobject#1{%
+ \ifx\pgf@decorate@currentinputsegmentobjects\pgfutil@empty%
+ \let\pgf@next\relax%
+ \else%
+ \def\pgf@decorate@temp{#1}%
+ \let\pgf@next\pgf@decorate@@getnextinputsegmentobject%
+ \fi%
+ \pgf@next%
+}
+\def\pgf@decorate@@getnextinputsegmentobject{%
+ \expandafter\pgf@decorate@@@getnextinputsegmentobject\pgf@decorate@currentinputsegmentobjects\pgf@stop}
+\def\pgf@decorate@@@getnextinputsegmentobject#1#2\pgf@stop{%
+ \expandafter\def\pgf@decorate@temp{#1}%
+ \def\pgf@decorate@currentinputsegmentobjects{#2}}
+
+% Process the next input segment object.
+%
+\def\pgf@decorate@processnextinputsegmentobject{%
+ %
+ \let\pgf@decorate@currentinputsegmentobject\pgf@decorate@nextinputsegmentobject%
+ \pgf@decorate@getnextinputsegmentobject\pgf@decorate@nextinputsegmentobject%
+ %
+ % If the current input segment object is a moveto, execute the
+ % object macro and get the next input segment object.
+ %
+ \expandafter\pgfutil@in@\expandafter\pgf@decorate@inputsegmentobject@moveto%
+ \expandafter{\pgf@decorate@currentinputsegmentobject}%
+ \ifpgfutil@in@%
+ \pgf@decorate@currentinputsegmentobject%
+ \let\pgf@decorate@currentinputsegmentobject\pgf@decorate@nextinputsegmentobject%
+ \pgf@decorate@getnextinputsegmentobject\pgf@decorate@nextinputsegmentobject%
+ \relax%
+ \fi%
+ %
+ \pgf@decorate@is@closepath@false%
+ \pgf@decorate@currentinputsegmentobject%
+ %
+ % Teensy hack in case a path goes nowhere.
+ %
+ \ifdim\pgfdecoratedinputsegmentlength=0pt\relax%
+ \def\pgfdecoratedinputsegmentlength{0.05pt}% Arbitrary choice >0pt.
+ \fi%
+ \pgfdecoratedinputsegmentremainingdistance\pgfdecoratedinputsegmentlength\relax%
+ \pgfdecoratedinputsegmentcompleteddistance0pt\relax%
+ \def\pgf@decorate@inputsegmenttime{0}%
+ \pgfmathanglebetweenpoints{\pgf@decorate@inputsegment@first}{\pgf@decorate@inputsegment@supporta}%
+ \let\pgfdecoratedangle\pgfmathresult%
+}
+
+
+%
+% Input segment objects
+%
+
+\newif\ifpgf@decorate@is@closepath@%
+
+
+% Input segment object moveto.
+%
+\def\pgf@decorate@inputsegmentobject@moveto#1{%
+ \pgfpathmoveto{#1}%
+ \def\pgf@decorate@inputsegment@first{#1}%
+ \def\pgf@decorate@inputsegment@supporta{#1}%
+ \def\pgf@decorate@inputsegment@supportb{#1}%
+ \def\pgf@decorate@inputsegment@last{#1}%
+ \edef\pgf@decorate@lastmoveto{#1}%
+ \def\pgfdecoratedinputsegmentlength{0pt}%
+ \let\pgf@decorate@splitinputsegmentobject\pgf@decorate@splitinputsegmentobject@move%
+}
+
+% Input segment object lineto.
+%
+\def\pgf@decorate@inputsegmentobject@lineto#1#2#3{%
+ \def\pgfdecoratedinputsegmentlength{#1}%
+ \def\pgf@decorate@inputsegment@first{#2}%
+ %
+ % OK, lines don't need supports, but this means angle calculations
+ % do not have to be done individually for each object.
+ %
+ \def\pgf@decorate@inputsegment@supporta{#3}%
+ \def\pgf@decorate@inputsegment@supportb{#2}%
+ \def\pgf@decorate@inputsegment@last{#3}%
+ %
+ \let\pgf@decorate@movealonginputsegment\pgf@decorate@movealonginputsegment@line%
+ \let\pgf@decorate@transformtoinputsegment\pgf@decorate@transformtoinputsegment@line%
+ \let\pgf@decorate@splitinputsegmentobject\pgf@decorate@splitinputsegmentobject@line%
+}
+
+% Input segment object curveto.
+%
+\def\pgf@decorate@inputsegmentobject@curveto#1#2#3#4#5{%
+ \def\pgfdecoratedinputsegmentlength{#1}%
+ \def\pgf@decorate@inputsegment@first{#2}%
+ \def\pgf@decorate@inputsegment@supporta{#3}%
+ \def\pgf@decorate@inputsegment@supportb{#4}%
+ \def\pgf@decorate@inputsegment@last{#5}%
+ %
+ \let\pgf@decorate@movealonginputsegment\pgf@decorate@movealonginputsegment@curve%
+ \let\pgf@decorate@transformtoinputsegment\pgf@decorate@transformtoinputsegment@curve%
+ \let\pgf@decorate@splitinputsegmentobject\pgf@decorate@splitinputsegmentobject@curve%
+}
+
+% Input segment object closepath.
+%
+% Treated like a lineto, but flag that it is a closepath.
+%
+\def\pgf@decorate@inputsegmentobject@closepath#1#2#3{%
+ \pgf@decorate@is@closepath@true%
+ %
+ \def\pgfdecoratedinputsegmentlength{#1}%
+ \def\pgf@decorate@inputsegment@first{#2}%
+ \def\pgf@decorate@inputsegment@supporta{#3}%
+ \def\pgf@decorate@inputsegment@supportb{#2}%
+ \def\pgf@decorate@inputsegment@last{#3}%
+ %
+ \let\pgf@decorate@movealonginputsegment\pgf@decorate@movealonginputsegment@line%
+ \let\pgf@decorate@transformtoinputsegment\pgf@decorate@transformtoinputsegment@line%
+ \let\pgf@decorate@splitinputsegmentobject\pgf@decorate@splitinputsegmentobject@line%
+}
+
+% Input segment object endofinputsegments.
+%
+\def\pgf@decorate@inputsegmentobject@endofinputsegments{}
+
+
+
+
+% This macro controls how the automaton moves along a line sub-path
+%
+\def\pgf@decorate@movealonginputsegment@line#1{}% Nothing special needed.
+
+% This macro controls how the automaton moves along a curve sub-path.
+%
+\def\pgf@decorate@movealonginputsegment@curve#1{%
+ \ifdim#1=0pt\relax%
+ \else%
+ \pgfpointcurveattime{\pgf@decorate@inputsegmenttime}%
+ {\pgf@decorate@inputsegment@first}{\pgf@decorate@inputsegment@supporta}%
+ {\pgf@decorate@inputsegment@supportb}{\pgf@decorate@inputsegment@last}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \pgf@xb\pgf@decorate@inputsegmenttime pt\relax%
+ %
+ % Reduce the initial time step, depending on the length
+ % of the path. To do: Optimise this step (should also depend on #1).
+ %
+ \ifdim\pgf@decorate@currentpathlength<128pt\relax%
+ \pgf@yb.03125pt\relax%
+ \else%
+ \ifdim\pgf@decorate@currentpathlength<512pt\relax%
+ \pgf@yb.015625pt\relax%
+ \else%
+ \ifdim\pgf@decorate@currentpathlength<2048pt\relax%
+ \pgf@yb.00390625pt\relax%
+ \else%
+ \pgf@yb.0009765625pt\relax%
+ \fi%
+ \fi%
+ \fi%
+ \c@pgf@counta1\relax%
+ \pgfutil@tempdima0pt\relax%
+ \pgfmathloop%
+ \advance\pgf@xb\c@pgf@counta\pgf@yb%
+ %
+ % We would like to use \pgfpointcurveattime. However, we must not
+ % overuse \pgf@process or \pgfmath stuff within this loop,
+ % otherwise we increase the chances of save stack overflow.
+ %
+ \edef\pgf@decorate@temp{%
+ \pgf@xa\the\pgf@xa%
+ \pgf@xb\the\pgf@xb%
+ \pgf@ya\the\pgf@ya%
+ \pgf@yb\the\pgf@yb%
+ }%
+ %
+ \pgfpoint@decorate@curveattime{\pgfmath@tonumber{\pgf@xb}}%
+ {\pgf@decorate@inputsegment@first}{\pgf@decorate@inputsegment@supporta}%
+ {\pgf@decorate@inputsegment@supportb}{\pgf@decorate@inputsegment@last}%
+ %
+ \pgf@decorate@temp%
+ %
+ \pgf@xc\pgf@xa%
+ \pgf@yc\pgf@ya%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \advance\pgf@x-\pgf@xc%
+ \advance\pgf@y-\pgf@yc%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \pgfutil@tempdimb\pgfmathresult pt\relax%
+ \advance\pgfutil@tempdima\c@pgf@counta\pgfutil@tempdimb%
+ \ifnum\c@pgf@counta>0\relax%
+ \ifdim\pgfutil@tempdima>#1\relax%
+ \c@pgf@counta-\c@pgf@counta%
+ \pgf@yb.5\pgf@yb%
+ \fi%
+ \else%
+ \ifdim\pgfutil@tempdima<#1\relax%
+ \c@pgf@counta-\c@pgf@counta%
+ \pgf@yb.5\pgf@yb%
+ \fi%
+ \fi%
+ \ifdim\pgf@yb=0pt\relax% *Should* be OK.
+ \else%
+ \repeatpgfmathloop%
+ \edef\pgf@decorate@inputsegmenttime{\pgfmath@tonumber{\pgf@xb}}%
+ %
+ % Now calculate the angle at the new time on the curve.
+ %
+ % We can use \pgfpointcurveattime safely here.
+ %
+ \pgfpointcurveattime{\pgf@decorate@inputsegmenttime}%
+ {\pgf@decorate@inputsegment@first}{\pgf@decorate@inputsegment@supporta}%
+ {\pgf@decorate@inputsegment@supportb}{\pgf@decorate@inputsegment@last}%
+ \edef\pgf@marshal{%
+ \noexpand\pgfmathanglebetweenpoints%
+ {\pgf@x\the\pgf@xb\pgf@y\pgf@yb}%
+ {\pgf@x\the\pgf@xa\pgf@y\pgf@ya}%
+ }%
+ \pgf@marshal%
+ \let\pgfdecoratedangle\pgfmathresult%
+ \fi%
+}
+
+% \pgfpoint@decorate@curveattime
+%
+% A `quick' version of \pgfpointcurveattime
+%
+% No parsing and no use of \pgf@process.
+% This prevents save stack build up when used inside a loop.
+%
+\def\pgfpoint@decorate@curveattime#1#2#3#4#5{%
+ \edef\pgf@time@s{#1}%
+ \pgf@x-\pgf@time@s pt\relax%
+ \advance\pgf@x1pt\relax%
+ \edef\pgf@time@t{\pgf@sys@tonumber{\pgf@x}}%
+ #5\relax%
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ #4\relax%
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ #3\relax%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ #2\relax%
+ % First iteration:
+ \pgf@x=\pgf@time@t\pgf@x\advance\pgf@x by\pgf@time@s\pgf@xa%
+ \pgf@y=\pgf@time@t\pgf@y\advance\pgf@y by\pgf@time@s\pgf@ya%
+ \pgf@xa=\pgf@time@t\pgf@xa\advance\pgf@xa by\pgf@time@s\pgf@xb%
+ \pgf@ya=\pgf@time@t\pgf@ya\advance\pgf@ya by\pgf@time@s\pgf@yb%
+ \pgf@xb=\pgf@time@t\pgf@xb\advance\pgf@xb by\pgf@time@s\pgf@xc%
+ \pgf@yb=\pgf@time@t\pgf@yb\advance\pgf@yb by\pgf@time@s\pgf@yc%
+ % Second iteration:
+ \pgf@x=\pgf@time@t\pgf@x\advance\pgf@x by\pgf@time@s\pgf@xa%
+ \pgf@y=\pgf@time@t\pgf@y\advance\pgf@y by\pgf@time@s\pgf@ya%
+ \pgf@xa=\pgf@time@t\pgf@xa\advance\pgf@xa by\pgf@time@s\pgf@xb%
+ \pgf@ya=\pgf@time@t\pgf@ya\advance\pgf@ya by\pgf@time@s\pgf@yb%
+ % Save x/y
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ % Third iteration:
+ \pgf@x=\pgf@time@t\pgf@x\advance\pgf@x by\pgf@time@s\pgf@xa%
+ \pgf@y=\pgf@time@t\pgf@y\advance\pgf@y by\pgf@time@s\pgf@ya%
+}
+
+
+% Applies the necessary transform for a line sub-path.
+%
+\def\pgf@decorate@transformtoinputsegment@line{%
+ \pgftransformshift{%
+ \pgfpointadd{\pgf@decorate@inputsegment@first}%
+ {\pgfpointpolar{\pgfdecoratedangle}{\pgfdecoratedinputsegmentcompleteddistance}}%
+ }%
+ \pgftransformrotate{\pgfdecoratedangle}%
+}
+
+% Applies the necessary transform for a curve sub-path.
+%
+\def\pgf@decorate@transformtoinputsegment@curve{%
+ \pgfslopedattimetrue%
+ \pgfallowupsidedownattimetrue%
+ \pgftransformcurveattime{\pgf@decorate@inputsegmenttime}%
+ {\pgf@decorate@inputsegment@first}{\pgf@decorate@inputsegment@supporta}%
+ {\pgf@decorate@inputsegment@supportb}{\pgf@decorate@inputsegment@last}%
+}
+
+
+
+
+
+% \pgf@decorate@parsesoftpath
+%
+% Parses an instance of a soft path into intermediate line and curve
+% sub-path objects which the decoration automaton can use to traverse
+% the decorated path.
+%
+% The soft path should be well formed and only contain `primative'
+% soft path tokens, that is: moveto, lineto, curvetosupporta,
+% curvetosupportb, curveto, rectcorner, rectsize, and closepath.
+% (i.e., all specialround tokens should have removed using
+% \pgfprocessround)
+%
+% The overall length of the path is also calculated and returned
+% in the macro \pgfdecoratedpathlength.
+%
+% Parameters:
+%
+% #1 - a macro containing a well formed soft path.
+% #2 - a macro to store the intermediate sub-path representations.
+%
+% Example:
+%
+% \pgfpathmoveto{\pgfpointorigin}
+% \pgfpathlineto{\pgfpoint{0pt}{12pt}}
+% \pgfpathlineto{\pgfpoint{12pt}{0pt}}
+% \pgfgetpath\softpath
+%
+% \pgf@decorate@parsesoftpath{\softpath}{\parsedsoftpath}{}
+%
+% results in:
+%
+% \parsedsoftpath ->
+% {\pgf@decorate@inputsegmentobject@lineto{12pt}{\pgf@x 0pt\pgf@y 0pt}{\pgf@x 0pt\pgf@y 12pt}}
+% {\pgf@decorate@inputsegmentobject@lineto{12pt}{\pgf@x 0pt\pgf@y 12pt}{\pgf@x 12pt\pgf@y 12pt}}
+%
+% \pgfdecoratedpathlength ->
+% 24pt
+%
+
+\def\pgf@decorate@parsesoftpath#1#2{%
+ \def\pgf@decorate@inputsegmentobjectsmacro{#2}%
+ \let\pgf@decorate@inputsegmentobjects\pgfutil@empty%
+ \pgfutil@tempdima0pt\relax%
+ \let\pgfpoint@decorate@lastparsed\pgfpoint@decorate@existingpathlast%
+ \let\pgfpoint@decorate@lastnonmovetoparsed\pgfpoint@origin%
+ \let\pgf@decorate@queueinputsegmentobject\pgfutil@empty%
+ \let\pgfpoint@decorated@firstparsed\pgfutil@empty%
+ \expandafter\pgf@decorate@@parsesoftpath#1\pgf@stop%
+}
+
+\def\pgf@decorate@@parsesoftpath#1{%
+ \ifx#1\pgf@stop%
+ \let\pgf@decorate@queueinputsegmentobject\pgfutil@empty% <- removes final moveto (may not be desirable).
+ \pgf@decorate@addtoinputsegmentobjects{\pgf@decorate@inputsegmentobject@endofinputsegments}%
+ \pgf@decorate@addtoinputsegmentobjects{\pgf@decorate@inputsegmentobject@endofinputsegments}%
+ \expandafter\let\pgf@decorate@inputsegmentobjectsmacro\pgf@decorate@inputsegmentobjects%
+ \edef\pgf@decorate@totalpathlength{\the\pgfutil@tempdima}%
+ \let\pgf@next\relax%
+ \else%
+ \ifx#1\pgfsyssoftpath@movetotoken%
+ \let\pgf@next\pgf@decorate@parsemoveto%
+ \else%
+ \ifx#1\pgfsyssoftpath@linetotoken%
+ \let\pgf@next\pgf@decorate@parselineto%
+ \else%
+ \ifx#1\pgfsyssoftpath@curvetosupportatoken%
+ \let\pgf@next\pgf@decorate@parsecurveto%
+ \else%
+ \ifx#1\pgfsyssoftpath@closepathtoken%
+ \let\pgf@next\pgf@decorate@parseclosepath%
+ \else%
+ \ifx#1\pgfsyssoftpath@rectcornertoken%
+ \let\pgf@next\pgf@decorate@parserect%
+ \else%
+ \PackageError{PGF}{Unrecognised soft path token `#1'}{}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \pgf@next}
+
+
+\def\pgf@decorate@addtoinputsegmentobjects#1{%
+ %
+ % If there is an input segment object waiting (i.e. a moveto), insert it here.
+ %
+ \ifx\pgf@decorate@queueinputsegmentobject\pgfutil@empty%
+ \else%
+ \let\pgf@decorate@temp\pgf@decorate@queueinputsegmentobject%
+ \let\pgf@decorate@queueinputsegmentobject\pgfutil@empty%
+ \expandafter\pgf@decorate@addtoinputsegmentobjects\expandafter{\pgf@decorate@temp}%
+ \fi%
+ \ifx\pgfpoint@decorated@firstparsed\pgfutil@empty%
+ #1%
+ \let\pgfpoint@decorated@firstparsed\pgf@decorate@inputsegment@first%
+ \fi%
+ \expandafter\def\expandafter\pgf@decorate@inputsegmentobjects\expandafter%
+ {\pgf@decorate@inputsegmentobjects{#1}}%
+}
+
+% Convert \pgfsyssoftpath@movetotoken{<X>}{<Y>} into the following
+% representation:
+%
+% \pgf@decorate@inputsegmentobject@moveto{\pgf@x X\pgf@y Y}
+%
+% The moveto input segment object is not added immediately, so that
+% only the last of multiple movetos is inserted.
+%
+\def\pgf@decorate@parsemoveto#1#2{%
+ \def\pgf@decorate@queueinputsegmentobject{\pgf@decorate@inputsegmentobject@moveto{\pgf@x#1\pgf@y#2}}%
+ \def\pgfpoint@decorate@lastparsed{\pgf@x#1\pgf@y#2}%
+ \pgf@decorate@@parsesoftpath%
+}
+
+% Convert \pgfsyssoftpath@linetotoken{<X>}{<Y>} into the following
+% representation:
+%
+% \pgf@decorate@inputsegmentobject@lineto{<length>}{\pgf@x <Last X> \pgf@y <Last Y}{\pgf@x <X> \pgf@y <Y>}
+%
+\def\pgf@decorate@parselineto#1#2{%
+ \pgf@decorate@linelength{\pgfpoint@decorate@lastparsed}{\pgf@x#1\pgf@y#2}%
+ \advance\pgfutil@tempdima\pgfmathresult pt\relax%
+ \edef\pgf@decorate@temp{%
+ \noexpand\pgf@decorate@inputsegmentobject@lineto{\pgfmathresult pt}{\pgfpoint@decorate@lastparsed}{\pgf@x#1\pgf@y#2}%
+ }%
+ \edef\pgfpoint@decorate@lastparsed{\pgf@x#1\pgf@y#2}%
+ \let\pgfpoint@decorate@lastnonmovetoparsed\pgfpoint@decorate@lastparsed%
+ \expandafter\pgf@decorate@addtoinputsegmentobjects\expandafter{\pgf@decorate@temp}%
+ \pgf@decorate@@parsesoftpath%
+}
+
+% Convert \pgfsyssoftpath@curvetosupportatoken{<Xa>}{<Ya>}...etc
+% into the following representation:
+%
+% \pgf@decorate@inputsegmentobject@curveto{<length>}{\pgf@x <Last X> \pgf@y <Last Y}
+% {\pgf@x <Xa> \pgf@y <Ya>}{\pgf@x <Xb> \pgf@y <Yb>}{\pgf@x <X> \pgf@y <Y>}
+%
+\def\pgf@decorate@parsecurveto#1#2\pgfsyssoftpath@curvetosupportbtoken#3#4\pgfsyssoftpath@curvetotoken#5#6{%
+ \pgf@decorate@curvelength{\pgfpoint@decorate@lastparsed}{\pgf@x#1\pgf@y#2}{\pgf@x#3\pgf@y#4}{\pgf@x#5\pgf@y#6}%
+ \advance\pgfutil@tempdima\pgfmathresult pt\relax%
+ \edef\pgf@decorate@temp{%
+ \noexpand\pgf@decorate@inputsegmentobject@curveto{\pgfmathresult pt}{\pgfpoint@decorate@lastparsed}%
+ {\pgf@x#1\pgf@y#2}{\pgf@x#3\pgf@y#4}{\pgf@x#5\pgf@y#6}%
+ }%
+ \expandafter\pgf@decorate@addtoinputsegmentobjects\expandafter{\pgf@decorate@temp}%
+ \edef\pgfpoint@decorate@lastparsed{\pgf@x#5\pgf@y#6}%
+ \let\pgfpoint@decorate@lastnonmovetoparsed\pgfpoint@decorate@lastparsed%
+ \pgf@decorate@@parsesoftpath%
+}
+
+
+\def\pgf@decorate@parseclosepath#1#2{%
+ \pgf@decorate@linelength{\pgfpoint@decorate@lastparsed}{\pgf@x#1\pgf@y#2}%
+ \advance\pgfutil@tempdima\pgfmathresult pt\relax%
+ \edef\pgf@decorate@temp{%
+ \noexpand\pgf@decorate@inputsegmentobject@closepath{\pgfmathresult pt}{\pgfpoint@decorate@lastparsed}{\pgf@x#1\pgf@y#2}%
+ }%
+ \expandafter\pgf@decorate@addtoinputsegmentobjects\expandafter{\pgf@decorate@temp}%
+ \edef\pgfpoint@decorate@lastparsed{\pgf@x#1\pgf@y#2}%
+ \let\pgfpoint@decorate@lastnonmovetoparsed\pgfpoint@decorate@lastparsed%
+ \pgf@decorate@@parsesoftpath%
+}
+
+% Convert \pgfsyssoftpath@rectcornertoken{<X>}{<Y>}\pgfsyssoftpath@rectsizetoken{<Xa>}{<Ya>}
+% into either (clockwise)
+%
+% \pgf@decorate@inputsegmentobject@moveto{<X>}{<Y>}
+% \pgf@decorate@inputsegmentobject@lineto{<length 1>}{\pgf@x <X> \pgf@y <Y>}{\pgf@x <X> \pgf@y <Ya+Y>}
+% \pgf@decorate@inputsegmentobject@lineto{<length 2>}{\pgf@x <X> \pgf@y <Ya+Y>}{\pgf@x <Xa+X> \pgf@y <Ya+Y>}
+% \pgf@decorate@inputsegmentobject@lineto{<length 1>}{\pgf@x <Xa+X> \pgf@y <Ya+X>}{\pgf@x <Xa+X> \pgf@y <Y>}
+% \pgf@decorate@inputsegmentobject@lineto{<length 2>}{\pgf@x <Xa+X> \pgf@y <Y>}{\pgf@x <X> \pgf@y <Y>}
+% \pgf@decorate@inputsegmentobject@moveto{<Xa>}{<Ya>}
+%
+% ...or (anti-clockwise)
+%
+% \pgf@decorate@inputsegmentobject@moveto{<X>}{<Y>}
+% \pgf@decorate@inputsegmentobject@lineto{<length 2>}{\pgf@x <X> \pgf@y <Y>}{\pgf@x <Xa+X> \pgf@y <Y>}
+% \pgf@decorate@inputsegmentobject@lineto{<length 1>}{\pgf@x <Xa+X> \pgf@y <Y>}{\pgf@x <Xa+X> \pgf@y <Ya+Y>}
+% \pgf@decorate@inputsegmentobject@lineto{<length 2>}{\pgf@x <Xa+X> \pgf@y <Ya+Y>}{\pgf@x <X> \pgf@y <Ya+Y>}
+% \pgf@decorate@inputsegmentobject@lineto{<length 1>}{\pgf@x <X> \pgf@y <Ya+Y>}{\pgf@x <X> \pgf@y <Y>}
+% \pgf@decorate@inputsegmentobject@moveto{<Xa>}{<Ya>}
+%
+\newif\ifpgfdecoraterectangleclockwise
+\def\pgf@decorate@parserect#1#2\pgfsyssoftpath@rectsizetoken#3#4{%
+ %
+ % Subvert \pgf@decorate@parsesoftpath so parsing macros will
+ % return here instead of continuing to parse the soft path.
+ %
+ \let\pgf@decorate@orig@@parsesoftpath\pgf@decorate@@parsesoftpath%
+ \let\pgf@decorate@@parsesoftpath\relax%
+ \pgf@decorate@parsemoveto{#1}{#2}%
+ \pgf@xa#1\relax%
+ \pgf@ya#2\relax%
+ \ifpgfdecoraterectangleclockwise%
+ \advance\pgf@ya#4%
+ \pgf@yb\pgf@ya%
+ \edef\pgf@temp{{\the\pgf@xa}{\the\pgf@ya}}%
+ \expandafter\pgf@decorate@parselineto\pgf@temp%
+ \advance\pgf@xa#3%
+ \pgf@xb\pgf@xa%
+ \edef\pgf@temp{{\the\pgf@xa}{\the\pgf@ya}}%
+ \expandafter\pgf@decorate@parselineto\pgf@temp%
+ \advance\pgf@ya-#4%
+ \edef\pgf@temp{{\the\pgf@xa}{\the\pgf@ya}}%
+ \expandafter\pgf@decorate@parselineto\pgf@temp%
+ \advance\pgf@xa-#3%
+ \edef\pgf@temp{{\the\pgf@xa}{\the\pgf@ya}}%
+ \expandafter\pgf@decorate@parseclosepath\pgf@temp%
+ \else%
+ \advance\pgf@xa#3%
+ \edef\pgf@temp{{\the\pgf@xa}{\the\pgf@ya}}%
+ \pgf@xb\pgf@xa%
+ \expandafter\pgf@decorate@parselineto\pgf@temp%
+ \advance\pgf@ya#4%
+ \pgf@yb\pgf@ya%
+ \edef\pgf@temp{{\the\pgf@xa}{\the\pgf@ya}}%
+ \expandafter\pgf@decorate@parselineto\pgf@temp%
+ \advance\pgf@xa-#3%
+ \edef\pgf@temp{{\the\pgf@xa}{\the\pgf@ya}}%
+ \expandafter\pgf@decorate@parselineto\pgf@temp%
+ \advance\pgf@ya-#4%
+ \edef\pgf@temp{{\the\pgf@xa}{\the\pgf@ya}}%
+ \expandafter\pgf@decorate@parseclosepath\pgf@temp%
+ \fi%
+ %
+ % Restore the parsing.
+ %
+ \let\pgf@decorate@@parsesoftpath\pgf@decorate@orig@@parsesoftpath%
+ \edef\pgf@marshal{\noexpand\pgf@decorate@parsemoveto{\the\pgf@xb}{\the\pgf@yb}}%
+ \pgf@marshal%
+}
+
+
+
+
+% \pgf@decorate@linelength
+%
+% Define \pgfmathresult as the distance between #1 and #2 (without units).
+%
+\def\pgf@decorate@linelength#1#2{%
+ \pgf@process{\pgfpointdiff{#1}{#2}}%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+}
+
+% \pgf@decorate@curvelength
+%
+% Define \pgfmathresult as the length (without units) of the cubic
+% bezier described by #1,#2,#3 and #4.
+%
+% To approximate the length of the curve P (sort of) use:
+%
+% curveLength(P,q)
+% Q = subdivideLeft(P);
+% R = subdivideRight(P);
+% return curveLength'(Q,q) + curveLength'(R,q);
+%
+% curveLength'(P,q)
+% <P1,P2,P3,P4> <- P;
+% P' = P4 - P1;
+% x = P'.x();
+% y = P'.y();
+% if (x < q) && (y < q)
+% return |P'|;
+% else%
+% Q = subdivideLeft(P);
+% R = subdivideRight(P);
+% return curveLength'(Q,q) + curveLength'(R,q);
+%
+% Where q is some small value (`tolerance').
+%
+\newif\ifpgf@decorate@subdivide
+\def\pgf@decorate@curvelength#1#2#3#4{%
+ %
+ % Always begin with a subdivision in case #1 = #4.
+ %
+ \begingroup%
+ \pgf@decorate@recursive@subdividecurve@left{#1}{#2}{#3}{#4}%
+ \pgfutil@tempdimb\pgfmathresult pt\relax%
+ \pgf@decorate@recursive@subdividecurve@right{#1}{#2}{#3}{#4}%
+ \advance\pgfutil@tempdimb\pgfmathresult pt\relax%
+ \pgfmath@returnone\pgfutil@tempdimb%
+ \endgroup%
+}
+
+\def\pgf@decorate@@curvelength#1#2#3#4{%
+ \begingroup%
+ \pgf@decorate@curvecordlength{#1}{#2}{#3}{#4}%
+ \ifpgf@decorate@subdivide%
+ \pgf@decorate@recursive@subdividecurve@left{#1}{#2}{#3}{#4}%
+ \pgfutil@tempdimb\pgfmathresult pt\relax%
+ \pgf@decorate@recursive@subdividecurve@right{#1}{#2}{#3}{#4}%
+ \advance\pgfutil@tempdimb\pgfmathresult pt\relax%
+ \expandafter\pgfmath@returnone\expandafter\pgfutil@tempdimb%
+ \else%
+ \expandafter\pgfmath@returnone\expandafter\pgfmathresult\expandafter p\expandafter t\expandafter%
+ \fi%
+ \endgroup%
+}
+
+\def\pgf@decorate@curvelength@tolerance{1pt}
+
+\def\pgf@decorate@curvecordlength#1#2#3#4{%
+ %
+ % Calculate the curve cord vector.
+ %
+ #4\relax%
+ \pgf@xa\pgf@x\pgf@ya\pgf@y%
+ #1\relax%
+ \advance\pgf@xa-\pgf@x%
+ \advance\pgf@ya-\pgf@y%
+ \ifdim\pgf@xa<0pt\relax\pgf@xa-\pgf@xa\fi%
+ \ifdim\pgf@ya<0pt\relax\pgf@ya-\pgf@ya\fi%
+ %
+ % Always subdivide, unless...
+ %
+ \pgf@decorate@subdividetrue%
+ %
+ % The cord vector is small.
+ %
+ \ifdim\pgf@xa<\pgf@decorate@curvelength@tolerance\relax%
+ \ifdim\pgf@ya<\pgf@decorate@curvelength@tolerance\relax%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@ya}}%
+ \pgf@decorate@subdividefalse%
+ \fi%
+ \fi%
+}
+
+\def\pgf@decorate@recursive@subdividecurve@left#1#2#3#4{%
+ {%
+ %
+ % The left curve (from t=0 to t=.5)
+ %
+ #1\relax%
+ \pgfutil@tempdima\pgf@x%
+ \pgfutil@tempdimb\pgf@y%
+ \pgf@xa.5\pgf@x\pgf@ya.5\pgf@y%
+ \pgf@xb.25\pgf@x\pgf@yb.25\pgf@y%
+ \pgf@xc.125\pgf@x\pgf@yc.125\pgf@y%
+ #2\relax%
+ \advance\pgf@xa.5\pgf@x\advance\pgf@ya.5\pgf@y%
+ \advance\pgf@xb.5\pgf@x\advance\pgf@yb.5\pgf@y%
+ \advance\pgf@xc.375\pgf@x\advance\pgf@yc.375\pgf@y%
+ #3\relax%
+ \advance\pgf@xb.25\pgf@x\advance\pgf@yb.25\pgf@y%
+ \advance\pgf@xc.375\pgf@x\advance\pgf@yc.375\pgf@y%
+ #4\relax%
+ \advance\pgf@xc.125\pgf@x\advance\pgf@yc.125\pgf@y%
+ \xdef\pgf@marshal{%
+ \noexpand\pgf@decorate@@curvelength%
+ {\pgf@x\the\pgfutil@tempdima\pgf@y\the\pgfutil@tempdimb}%
+ {\pgf@x\the\pgf@xa\pgf@y\the\pgf@ya}{\pgf@x\the\pgf@xb\pgf@y\the\pgf@yb}
+ {\pgf@x\the\pgf@xc\pgf@y\the\pgf@yc}%
+ }%
+ }%
+ \pgf@marshal%
+}
+
+\def\pgf@decorate@recursive@subdividecurve@right#1#2#3#4{%
+ {%
+ %
+ % The right curve (from t=0.5 to t=1)
+ %
+ #1\relax%
+ \pgfutil@tempdima.125\pgf@x\pgfutil@tempdimb.125\pgf@y%
+ #2\relax%
+ \advance\pgfutil@tempdima.375\pgf@x\advance\pgfutil@tempdimb.375\pgf@y%
+ \pgf@xa.25\pgf@x\pgf@ya.25\pgf@y%
+ #3\relax%
+ \advance\pgfutil@tempdima.375\pgf@x\advance\pgfutil@tempdimb.375\pgf@y%
+ \advance\pgf@xa.5\pgf@x\advance\pgf@ya.5\pgf@y%
+ \pgf@xb.5\pgf@x\pgf@yb.5\pgf@y%
+ #4\relax%
+ \advance\pgfutil@tempdima.125\pgf@x\advance\pgfutil@tempdimb.125\pgf@y%
+ \advance\pgf@xa.25\pgf@x\advance\pgf@ya.25\pgf@y%
+ \advance\pgf@xb.5\pgf@x\advance\pgf@yb.5\pgf@y%
+ \pgf@xc\pgf@x\pgf@yc\pgf@y%
+ \xdef\pgf@marshal{%
+ \noexpand\pgf@decorate@@curvelength%
+ {\pgf@x\the\pgfutil@tempdima\pgf@y\the\pgfutil@tempdimb}%
+ {\pgf@x\the\pgf@xa\pgf@y\the\pgf@ya}{\pgf@x\the\pgf@xb\pgf@y\the\pgf@yb}
+ {\pgf@x\the\pgf@xc\pgf@y\the\pgf@yc}%
+ }%
+ }%
+ \pgf@marshal%
+}
+
+
+\let\startpgfdecoration=\pgfdecoration
+\let\stoppgfdecoration=\endpgfdecoration
+
+\let\startpgfmetadecoration=\pgfmetadecoration
+\let\stoppgfmetadecoration=\endpgfmetadecoration
+
+
+
+%
+% Predefined decorations
+%
+
+
+% Simple decorations.
+
+\pgfdeclaredecoration{lineto}{initial}{
+ \state{initial}[switch if input segment less than=\pgfdecoratedremainingdistance to input segment,
+ width=\pgfdecoratedremainingdistance]
+ {
+ }
+ \state{input segment}[width=\pgfdecoratedinputsegmentlength,next state=initial]
+ {
+ \pgfpathlineto{\pgfpointdecoratedinputsegmentlast}
+ }
+
+ \state{final}{\pgfpathlineto{\pgfpointdecoratedpathlast}}
+}
+
+\pgfdeclaredecoration{moveto}{initial}{
+ \state{initial}[width=\pgfdecoratedremainingdistance]{}
+ \state{final}{\pgfpathmoveto{\pgfpointdecoratedpathlast}}
+}
+
+% This decorations curves to the end along the line.
+
+\pgfdeclaredecoration{curveto}{initial}{
+ \state{initial}[width=\pgfdecoratedinputsegmentlength/100]
+ {
+ \pgfpathlineto{\pgfpointorigin}
+ }
+ \state{final}{\pgfpathlineto{\pgfpointdecoratedpathlast}}
+}
+
+
+
+
+% Compatibility with old "snakes":
+
+\let\pgfsnakeremainingdistance=\pgfdecoratedremainingdistance
+\let\pgfsnakecompleteddistance=\pgfdecoratedcompleteddistance
+\def\pgfsnakeangle{\pgfdecoratedangle}
+\let\pgfdeclaresnake=\pgfdeclaredecoration
+\let\pgfsetsnakesegmenttransformation=\pgfsetdecorationsegmenttransformation
+\def\pgfpathsnakesto#1#2{%
+ \edef\pgf@temp{#1}%
+ \expandafter\pgfdecoration\expandafter{\pgf@temp}%
+ \pgfpathlineto{#2}%
+ \endpgfdecoration%
+}
+\def\pgfpathsnaketo#1#2{\pgfpathsnakesto{{#1}{\pgfsnakeremainingdistance}}{#2}}
+\def\pgfpathsnakealongvector#1#2#3{%
+ \pgf@process{#3}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgfmathparse{#2}%
+ \pgf@xa=\pgfmathresult\pgf@xa%
+ \pgf@ya=\pgfmathresult\pgf@ya%
+ \advance\pgf@xa by\pgf@path@lastx%
+ \advance\pgf@ya by\pgf@path@lasty%
+ \edef\pgf@snake@lib@temp{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
+ \pgfpathsnaketo{#1}{\pgf@snake@lib@temp}%
+}
+
+\let\pgfsnakesegmentamplitude=\pgfdecorationsegmentamplitude
+\let\pgfsnakesegmentlength=\pgfdecorationsegmentlength
+\def\pgfsnakesegmentangle{\pgfdecorationsegmentangle}
+\def\pgfsnakesegmentobjectlength{\pgfkeysvalueof{/pgf/decoration/shape start width}}
+\def\pgfsnakesegmentaspect{\pgfdecorationsegmentaspect}
+
+\pgfset{%
+ /pgf/segment amplitude/.style={/pgf/decoration={amplitude=#1,shape height=2*#1}},
+ /pgf/segment length/.style={/pgf/decoration={segment length=#1}},
+ /pgf/segment angle/.style={/pgf/decoration={angle=#1}},
+ /pgf/segment aspect/.style={/pgf/decoration={aspect=#1}},
+ /pgf/segment object length/.style={/pgf/decoration={shape width=#1,radius=#1}}}
+
+
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbasematrix.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex
index d72f2206aa7..c808f60d762 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbasematrix.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex
@@ -7,8 +7,9 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfbasematrix.code.tex,v 1.11 2007/03/09 17:49:32 tantau Exp $
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmodulematrix.code.tex,v 1.1 2008/01/15 10:27:34 tantau Exp $
+\usepgfmodule{shapes}
\newif\ifpgfmatrix
\newif\ifpgf@matrix@correct@call
@@ -109,6 +110,11 @@
% rows, an extra space given by the macro \pgfmatrixrowsep is
% added. You can also change this value for each row by using a \gdef.
%
+%
+% Lines are ended using the command \pgfmatrixendrow. The command \\
+% is \let to be the same, but \\ is sometimes overridden by, say,
+% minipage, so it's good to have \pgfmatrixendrow as a "fallback".
+%
% Inside the matrix, \\ must be used to end every line ***including
% the last***. You can pass an optional parameter to \\ as in \\[2pt]
% to give an additional space after this particular line.
@@ -166,7 +172,7 @@
\pgfmatrixcurrentrow=0\relax%
\pgfmatrixcurrentcolumn=0\relax%
\pgf@matrix@numberofcolumns=0\relax%
- \let\\=\pgf@matrix@eol%
+ \let\\=\pgfmatrixendrow%
\tabskip=0pt%
\offinterlineskip%
\pgfmatrixtrue%
@@ -359,7 +365,7 @@
% Find out whether the cell is empty:
\pgfutil@ifnextchar\let%
{% ok, candidate, check following symbol
- \afterassignment\pgf@matrix@empty@check\let\pgf@next=% get rid of \let
+ \afterassignment\pgf@matrix@empty@check\let\pgf@matrix@temp=% get rid of \let
}%
{% no, not empty
\pgf@matrix@empty@cell@false%
@@ -367,19 +373,22 @@
}%
}
-\def\pgf@matrix@empty@check{%
- \pgfutil@ifnextchar\pgf@matrix@signal@cell@end%
- {% Bingo!
+\def\pgf@matrix@empty@check{\futurelet\pgf@matrix@check@token\pgf@matrix@empty@check@cont}
+\def\pgf@matrix@empty@check@cont{%
+ \ifx\pgf@matrix@check@token\pgf@matrix@signal@cell@end%
\pgf@matrix@empty@cell@true%
+ \expandafter%
\pgfmatrixemptycode%
+ \expandafter%
\let% reinserted
- }%
- {% Nope!
+ \else%
\pgf@matrix@empty@cell@false%
+ \expandafter%
\pgfmatrixbegincode%
+ \expandafter
\let% reinserted
- }
-}%
+ \fi%
+}
\newif\ifpgf@matrix@empty@cell@
@@ -582,7 +591,7 @@
% End of line
-\def\pgf@matrix@eol{%
+\def\pgfmatrixendrow{%
% if the cell contains nothing, the following \let will be at the
% beginning (macro expansion has stopped here since neither \omit
% nor \span was found)
@@ -591,13 +600,13 @@
\global\pgf@matrix@fixedfalse%
\pgf@y=0pt%
\pgf@matrix@addtolength\pgf@y{\pgfmatrixrowsep}%
- \pgfutil@ifnextchar[{\pgf@matrix@eol@skip}{\pgf@matrix@finish@line}%
+ \pgfutil@ifnextchar[{\pgfmatrixendrow@skip}{\pgf@matrix@finish@line}%
}
\def\pgf@matrix@signal@cell@end{\pgf@matrix@signal@cell@end}
% exact definition does not matter, only needs to be unique.
-\def\pgf@matrix@eol@skip[#1]{%
+\def\pgfmatrixendrow@skip[#1]{%
\pgf@matrix@addtolength\pgf@y{#1}%
\pgf@matrix@finish@line%
}
@@ -607,7 +616,7 @@
\pgf@ya=-\pgf@y%
\global\advance\pgf@ya by\csname pgf@matrix@miny\the\pgfmatrixcurrentrow\endcsname%
\expandafter\xdef\csname pgf@matrix@miny\the\pgfmatrixcurrentrow\endcsname{\the\pgf@ya}%
- \@ifnextchar\egroup{\cr\pgf@end@matrix}{\pgf@matrix@no@eom@found}%
+ \pgfutil@ifnextchar\egroup{\cr\pgf@end@matrix}{\pgf@matrix@no@eom@found}%
}
\def\pgf@matrix@eom@found{%
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaseplot.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex
index 3e019c5feec..5e7a703fd37 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaseplot.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfbaseplot.code.tex,v 1.7 2007/05/02 14:08:27 tantau Exp $
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmoduleplot.code.tex,v 1.1 2008/01/15 10:27:34 tantau Exp $
% PGF's plotting interface works as follows:
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaseshapes.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
index dc9f660d0c2..63f6bf5be9b 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaseshapes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
@@ -7,7 +7,8 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfbaseshapes.code.tex,v 1.19 2007/06/07 07:41:10 tantau Exp $
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmoduleshapes.code.tex,v 1.4 2008/02/13 15:10:06 tantau Exp $
+
\newbox\pgfnodeparttextbox
@@ -40,14 +41,19 @@
{\PackageError{pgf}{Unknown shape ``#1''}{}}%
{%
{%
+ \let\pgf@sh@savedmacros=\pgfutil@empty% MW
\let\pgf@sh@savedpoints=\pgfutil@empty%
\csname pgf@sh@s@#1\endcsname%
\pgf@sh@savedpoints%
+ \pgf@sh@savedmacros% MW
\pgftransformshift{%
\pgf@sh@reanchor{#1}{#2}%
\pgf@x=-\pgf@x%
\pgf@y=-\pgf@y%
}%
+ \expandafter\pgfsavepgf@process\csname pgf@sh@sa@#3\endcsname{%
+ \pgf@sh@reanchor{#1}{#2}%
+ }%
% Save the saved points and the transformation matrix
\edef\pgf@test{#3}%
\ifx\pgf@test\pgfutil@empty%
@@ -55,6 +61,8 @@
\expandafter\xdef\csname pgf@sh@ns@#3\endcsname{#1}%
\edef\pgf@sh@@temp{\noexpand\gdef\expandafter\noexpand\csname pgf@sh@np@#3\endcsname}%
\expandafter\pgf@sh@@temp\expandafter{\pgf@sh@savedpoints}%
+ \edef\pgf@sh@@temp{\noexpand\gdef\expandafter\noexpand\csname pgf@sh@ma@#3\endcsname}% MW
+ \expandafter\pgf@sh@@temp\expandafter{\pgf@sh@savedmacros}% MW
\pgfgettransform\pgf@temp
\expandafter\xdef\csname pgf@sh@nt@#3\endcsname{\pgf@temp}%
\expandafter\xdef\csname pgf@sh@pi@#3\endcsname{\pgfpictureid}%
@@ -136,6 +144,34 @@
}
}
+% Alias a node
+%
+% #1 = new node name
+% #2 = existing node name
+%
+% Description:
+%
+% This command allows you to subsequently access the node #2 using the
+% name #1.
+%
+% Example:
+%
+% \pgfnode{rectangle}{center}{Hallo}{hellonode}{}
+% \pgfnodealias{mynode}{hellonode}
+
+\def\pgfnodealias#1#2{%
+ \pgf@node@gnamelet{pgf@sh@ns@#1}{pgf@sh@ns@#2}%
+ \pgf@node@gnamelet{pgf@sh@np@#1}{pgf@sh@np@#2}%
+ \pgf@node@gnamelet{pgf@sh@nt@#1}{pgf@sh@nt@#2}%
+ \pgf@node@gnamelet{pgf@sh@pi@#1}{pgf@sh@pi@#2}%
+ \pgf@node@gnamelet{pgf@sh@ma@#1}{pgf@sh@ma@#2}%
+}
+\def\pgf@node@gnamelet#1#2{%
+ \expandafter\let\expandafter\pgf@temp\csname #2\endcsname%
+ \expandafter\global\expandafter\let\csname #1\endcsname=\pgf@temp%
+}
+
+
\def\pgf@sh@resavedanchor#1#2{%
\pgf@process{#2}%
\edef\pgf@sh@marshal{%
@@ -155,6 +191,23 @@
\pgf@sh@marshal%
}
+% MW
+\newtoks\toks@savedmacro
+\def\pgf@sh@resavedmacro#1#2{%
+ \let#1\pgfutil@empty%
+ \def\addtosavedmacro##1{%
+ \expandafter\def\expandafter\pgf@sh@addtomacro@temp\expandafter{#1\noexpand\def\noexpand##1{##1}}%
+ \expandafter\toks@savedmacro\expandafter{\pgf@sh@addtomacro@temp}%
+ \expandafter\def\expandafter#1\expandafter{\the\toks@savedmacro}%
+ }%
+ #2\relax%
+ \edef\pgf@sh@marshal{%
+ \noexpand\pgfutil@g@addto@macro\noexpand\pgf@sh@savedmacros{%
+ \noexpand\def\noexpand#1{#1}%
+ }}%
+ \pgf@sh@marshal%
+}
+
% Invoke an anchor
\def\pgf@sh@reanchor#1#2{%
\pgfutil@ifundefined{pgf@anchor@#1@#2}%
@@ -188,6 +241,8 @@
\pgfpointorigin}%
{%
\pgf@process{%
+ % MW install special macros
+ \csname pgf@sh@ma@#1\endcsname% MW
% install special coordinates
\csname pgf@sh@np@#1\endcsname
\pgf@sh@reanchor{\csname pgf@sh@ns@#1\endcsname}{#2}%
@@ -250,6 +305,8 @@
\pgfpointorigin}%
{%
\pgf@process{%
+ % MW install special macros
+ \csname pgf@sh@ma@#1\endcsname% MW
% install special coordinates
\csname pgf@sh@np@#1\endcsname%
{%
@@ -351,6 +408,7 @@
\def\shape@name{#1}
\let\savedanchor=\pgf@sh@savedanchor
\let\saveddimen=\pgf@sh@saveddimen
+ \let\savedmacro=\pgf@sh@savedmacro% MW
\let\anchor=\pgf@sh@anchor
\let\anchorborder=\pgf@sh@anchorborder
\let\behindbackgroundpath=\pgf@sh@behindbgpath
@@ -382,6 +440,8 @@
\expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@\shape@name\endcsname{\pgf@sh@resavedanchor{#1}{#2}}}
\def\pgf@sh@saveddimen#1#2{%
\expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@\shape@name\endcsname{\pgf@sh@resaveddimen{#1}{#2}}}
+ \def\pgf@sh@savedmacro#1#2{% MW
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@\shape@name\endcsname{\pgf@sh@resavedmacro{#1}{#2}}}% MW
\def\pgf@sh@anchor#1#2{\expandafter\gdef\csname pgf@anchor@\shape@name @#1\endcsname{#2}}
\def\pgf@sh@anchorborder#1{\expandafter\gdef\csname pgf@anchor@\shape@name @border\endcsname##1{\pgf@process{##1}#1}}
\long\def\pgf@sh@behindbgpath#1{\expandafter\gdef\csname pgf@sh@bbg@\shape@name\endcsname{#1}}
@@ -394,7 +454,8 @@
\def\pgf@sh@inheritsavedanchors[from=#1]{%
\expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@\shape@name\endcsname{\csname pgf@sh@s@#1\endcsname}}
-\def\pgf@sh@inheritanchor[from=#1]#2{%
+
+ \def\pgf@sh@inheritanchor[from=#1]#2{%
\edef\pgf@marshal{\global\let\expandafter\noexpand\csname
pgf@anchor@\shape@name @#2\endcsname=\expandafter\noexpand\csname
pgf@anchor@#1@#2\endcsname}%
@@ -460,77 +521,38 @@
}
-% Set the recommended inner x separation
-%
-% #1 = size
-%
-% Example:
-%
-% \pgfsetshapeinnerxsep{2pt}
-
-\def\pgfsetshapeinnerxsep#1{\def\pgfshapeinnerxsep{#1}}
-\pgfsetshapeinnerxsep{.3333em}
-
-
-% Set the recommended inner y separation
-%
-% #1 = size
-%
-% Example:
-%
-% \pgfsetshapeinnerxsep{2pt}
-
-\def\pgfsetshapeinnerysep#1{\def\pgfshapeinnerysep{#1}}
-\pgfsetshapeinnerysep{.3333em}
-
-
-% Set the recommended outer x separation
-%
-% #1 = size
-%
-% Example:
-%
-% \pgfsetshapeouterxsep{2pt}
-
-\def\pgfsetshapeouterxsep#1{\def\pgfshapeouterxsep{#1}}
-\pgfsetshapeouterxsep{.5\pgflinewidth}
-
-
-% Set the recommended outer y separation
-%
-% #1 = size
-%
-% Example:
-%
-% \pgfsetshapeouterxsep{2pt}
-
-\def\pgfsetshapeouterysep#1{\def\pgfshapeouterysep{#1}}
-\pgfsetshapeouterysep{.5\pgflinewidth}
-
+% Value keys for shapes:
+%
+% /pgf/inner xsep : recommended inner x separation
+% /pgf/inner ysep : recommended inner y separation
+% /pgf/outer xsep : recommended outer x separation
+% /pgf/outer ysep : recommended outer y separation
+% /pgf/minimum width : recommended minimum width
+% /pgf/minimum height : recommended minimum height
+
+\pgfset{
+ inner xsep/.initial =.3333em,
+ inner ysep/.initial =.3333em,
+ inner sep/.style ={/pgf/inner xsep=#1,/pgf/inner ysep=#1},
+ outer xsep/.initial =.5\pgflinewidth,
+ outer ysep/.initial =.5\pgflinewidth,
+ outer sep/.style ={/pgf/outer xsep=#1,/pgf/outer ysep=#1},
+ minimum width/.initial =1pt,
+ minimum height/.initial =1pt,
+ minimum size/.style ={/pgf/minimum width=#1,/pgf/minimum height=#1},
+}
-% Set the recommended minimum width
-%
-% #1 = size
-%
-% Example:
+% Keys for rotating the shape border.
+% (may not be supported by all shapes)
%
-% \pgfsetshapeminwidth{1cm}
-
-\def\pgfsetshapeminwidth#1{\def\pgfshapeminwidth{#1}}
-\pgfsetshapeminwidth{1pt}
-
-
-% Set the recommended minimum height
-%
-% #1 = size
-%
-% Example:
-%
-% \pgfsetshapeminheight{1cm}
-
-\def\pgfsetshapeminheight#1{\def\pgfshapeminheight{#1}}
-\pgfsetshapeminheight{1pt}
+% /pgf/shape border uses incircle : Calculate the shape border using the incircle
+% around the node contents (+inner sep).
+%
+% /pgf/shape border rotate : Angle of independent border rotation.
+\newif\ifpgfshapeborderusesincircle
+\pgfkeys{/pgf/shape border uses incircle/.is if=pgfshapeborderusesincircle}
+\pgfkeys{/pgf/shape border rotate/.initial=0}
%
% Rectangle
@@ -543,9 +565,9 @@
%
% First, is width < minimum width?
\pgf@x=\the\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@xc{\pgfshapeinnerxsep}%
+ \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}%
\advance\pgf@x by 2\pgf@xc%
- \pgfmathsetlength\pgf@xb{\pgfshapeminwidth}%
+ \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}%
\ifdim\pgf@x<\pgf@xb%
% yes, too small. Enlarge...
\pgf@x=\pgf@xb%
@@ -553,16 +575,16 @@
% Now, calculate right border: .5\wd\pgfnodeparttextbox + .5 \pgf@x + outer sep
\pgf@x=.5\pgf@x%
\advance\pgf@x by.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@xa{\pgfshapeouterxsep}%
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
\advance\pgf@x by\pgf@xa%
% Calculate y
%
% First, is height+depth < minimum height?
\pgf@y=\ht\pgfnodeparttextbox%
\advance\pgf@y by\dp\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@yc{\pgfshapeinnerysep}%
+ \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}%
\advance\pgf@y by 2\pgf@yc%
- \pgfmathsetlength\pgf@yb{\pgfshapeminheight}%
+ \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}%
\ifdim\pgf@y<\pgf@yb%
% yes, too small. Enlarge...
\pgf@y=\pgf@yb%
@@ -571,7 +593,7 @@
\pgf@y=.5\pgf@y%
\advance\pgf@y by-.5\dp\pgfnodeparttextbox%
\advance\pgf@y by.5\ht\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@ya{\pgfshapeouterysep}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
\advance\pgf@y by\pgf@ya%
}
@@ -580,9 +602,9 @@
%
% First, is width < minimum width?
\pgf@x=\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@xc{\pgfshapeinnerxsep}%
+ \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}%
\advance\pgf@x by 2\pgf@xc%
- \pgfmathsetlength\pgf@xb{\pgfshapeminwidth}%
+ \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}%
\ifdim\pgf@x<\pgf@xb%
% yes, too small. Enlarge...
\pgf@x=\pgf@xb%
@@ -590,16 +612,16 @@
% Now, calculate left border: .5\wd\pgfnodeparttextbox - .5 \pgf@x - outer sep
\pgf@x=-.5\pgf@x%
\advance\pgf@x by.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@xa{\pgfshapeouterxsep}%
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
\advance\pgf@x by-\pgf@xa%
% Calculate y
%
% First, is height+depth < minimum height?
\pgf@y=\ht\pgfnodeparttextbox%
\advance\pgf@y by\dp\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@yc{\pgfshapeinnerysep}%
+ \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}%
\advance\pgf@y by 2\pgf@yc%
- \pgfmathsetlength\pgf@yb{\pgfshapeminheight}%
+ \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}%
\ifdim\pgf@y<\pgf@yb%
% yes, too small. Enlarge...
\pgf@y=\pgf@yb%
@@ -608,7 +630,7 @@
\pgf@y=-.5\pgf@y%
\advance\pgf@y by-.5\dp\pgfnodeparttextbox%
\advance\pgf@y by.5\ht\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@ya{\pgfshapeouterysep}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
\advance\pgf@y by-\pgf@ya%
}
@@ -700,8 +722,8 @@
%
\backgroundpath{
\pgfpathrectanglecorners
- {\pgfpointadd{\southwest}{\pgfpoint{\pgfshapeouterxsep}{\pgfshapeouterysep}}}
- {\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfshapeouterxsep}{\pgfshapeouterysep}}}}
+ {\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
+ {\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}}
}
}
@@ -737,6 +759,29 @@
\expandafter\def\csname pgf@sh@pi@current page\endcsname{pgfpageorigin}
+% Special scope bounding box rectangle:
+\pgfkeys{/pgf/local bounding box/.code={%
+ \expandafter\gdef\csname pgf@sh@ns@#1\endcsname{rectangle}
+ \expandafter\gdef\csname pgf@sh@np@#1\endcsname{%
+ \def\southwest{\pgfqpoint{\csname pgf@lbb@minx@#1\endcsname}{\csname pgf@lbb@miny@#1\endcsname}}%
+ \def\northeast{\pgfqpoint{\csname pgf@lbb@maxx@#1\endcsname}{\csname pgf@lbb@maxy@#1\endcsname}}%
+ }
+ \expandafter\gdef\csname pgf@sh@nt@#1\endcsname{{1}{0}{0}{1}{0pt}{0pt}}
+ \expandafter\gdef\csname pgf@sh@pi@#1\endcsname{\pgfpictureid}
+ \expandafter\gdef\csname pgf@lbb@maxx@#1\endcsname{-16000pt}%
+ \expandafter\gdef\csname pgf@lbb@minx@#1\endcsname{16000pt}%
+ \expandafter\gdef\csname pgf@lbb@maxy@#1\endcsname{-16000pt}%
+ \expandafter\gdef\csname pgf@lbb@miny@#1\endcsname{16000pt}%
+ \pgf@size@hookedtrue%
+ \expandafter\def\expandafter\pgf@path@size@hook\expandafter{\pgf@path@size@hook\pgf@lbb@do{#1}}
+ }%
+}
+\def\pgf@lbb@do#1{%
+ \ifdim\pgf@size@hook@x<\csname pgf@lbb@minx@#1\endcsname\expandafter\xdef\csname pgf@lbb@minx@#1\endcsname{\the\pgf@size@hook@x}\fi%
+ \ifdim\pgf@size@hook@x>\csname pgf@lbb@maxx@#1\endcsname\expandafter\xdef\csname pgf@lbb@maxx@#1\endcsname{\the\pgf@size@hook@x}\fi%
+ \ifdim\pgf@size@hook@y<\csname pgf@lbb@miny@#1\endcsname\expandafter\xdef\csname pgf@lbb@miny@#1\endcsname{\the\pgf@size@hook@y}\fi%
+ \ifdim\pgf@size@hook@y>\csname pgf@lbb@maxy@#1\endcsname\expandafter\xdef\csname pgf@lbb@maxy@#1\endcsname{\the\pgf@size@hook@y}\fi%
+}
%
% Circle
@@ -759,13 +804,13 @@
%
\pgf@ya=.5\ht\pgfnodeparttextbox%
\advance\pgf@ya by.5\dp\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@yb{\pgfshapeinnerysep}%
+ \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/inner ysep}}%
\advance\pgf@ya by\pgf@yb%
%
% Caculate ``width radius''
%
\pgf@xa=.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@xb{\pgfshapeinnerxsep}%
+ \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/inner xsep}}%
\advance\pgf@xa by\pgf@xb%
%
% Calculate length of radius vector:
@@ -795,8 +840,8 @@
% If necessary, adjust radius so that the size requirements are
% met:
%
- \pgfmathsetlength{\pgf@xb}{\pgfshapeminwidth}%
- \pgfmathsetlength{\pgf@yb}{\pgfshapeminheight}%
+ \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}%
+ \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}%
\ifdim\pgf@x<.5\pgf@xb%
\pgf@x=.5\pgf@xb%
\fi%
@@ -806,8 +851,8 @@
%
% Now, add larger of outer sepearations.
%
- \pgfmathsetlength{\pgf@xb}{\pgfshapeouterxsep}%
- \pgfmathsetlength{\pgf@yb}{\pgfshapeouterysep}%
+ \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
\ifdim\pgf@xb<\pgf@yb%
\advance\pgf@x by\pgf@yb%
\else%
@@ -874,8 +919,8 @@
%
\backgroundpath{
\pgfutil@tempdima=\radius%
- \pgfmathsetlength{\pgf@xb}{\pgfshapeouterxsep}%
- \pgfmathsetlength{\pgf@yb}{\pgfshapeouterysep}%
+ \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
\ifdim\pgf@xb<\pgf@yb%
\advance\pgfutil@tempdima by-\pgf@yb%
\else%
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbasesnakes.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesnakes.code.tex
index 5259624c57a..0d3ad5dfdeb 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbasesnakes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesnakes.code.tex
@@ -7,7 +7,16 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfbasesnakes.code.tex,v 1.11 2007/03/09 17:49:32 tantau Exp $
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmodulesnakes.code.tex,v 1.2 2008/01/17 20:09:17 tantau Exp $
+
+\PackageWarning{pgf}{Snakes have been superseded by decorations. Use
+the module decorations instead of snakes}
+
+\usepgfmodule{decorations}
+
+\endinput
+
+
\newdimen\pgfsnakeremainingdistance
\newdimen\pgfsnakecompleteddistance
@@ -119,6 +128,21 @@
\pgfpointtransformed{#2}%
\advance\pgf@x by-\pgf@path@lastx%
\advance\pgf@y by-\pgf@path@lasty%
+ %
+ % MW: Calculate the angle of the snake.
+ %
+ \edef\pgf@marshal{%
+ \noexpand\pgfmathanglebetweenpoints{\noexpand\pgfpointorigin}{%
+ \noexpand\pgf@x\the\pgf@x\noexpand\pgf@y\the\pgf@y}%
+ }%
+ \pgf@marshal%
+ \let\pgfsnakeangle\pgfmathresult%
+ %
+ % MW: Use this instead for length (?). More accurate and only a few operations slower.
+ %
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \pgfsnakeremainingdistance\pgfmathresult pt\relax%
+ %
% Ok, now normalize the vector...
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
@@ -128,39 +152,39 @@
% the normalized x or y. Well...
%
% First, make xa and ya positive:
- \ifdim\pgf@xa<0pt%
- \pgf@xa=-\pgf@xa%
- \fi%
- \ifdim\pgf@ya<0pt%
- \pgf@ya=-\pgf@ya%
- \fi%
- % Now do division:
- \ifdim\pgf@xa>\pgf@ya%
- \c@pgf@counta=\pgf@x%
- \ifnum\c@pgf@counta=0\relax%
- \else%
- \divide\c@pgf@counta by 255\relax%
- \pgf@xa=16\pgf@xa\relax%
- \divide\pgf@xa by\c@pgf@counta%
- \pgf@xa=16\pgf@xa\relax%
- \fi%
- \else%
- \c@pgf@counta=\pgf@y%
- \ifnum\c@pgf@counta=0\relax%
- \else%
- \divide\c@pgf@counta by 255\relax%
- \pgf@ya=16\pgf@ya\relax%
- \divide\pgf@ya by\c@pgf@counta%
- \pgf@xa=16\pgf@ya\relax%
- \fi%
- \fi%
- % Make positive:
- \ifdim\pgf@xa<0pt%
- \pgf@xa=-\pgf@xa%
- \fi%
- % Ok, now we draw things...
+ % \ifdim\pgf@xa<0pt%
+% \pgf@xa=-\pgf@xa%
+% \fi%
+% \ifdim\pgf@ya<0pt%
+% \pgf@ya=-\pgf@ya%
+% \fi%
+% % Now do division:
+% \ifdim\pgf@xa>\pgf@ya%
+% \c@pgf@counta=\pgf@x%
+% \ifnum\c@pgf@counta=0\relax%
+% \else%
+% \divide\c@pgf@counta by 255\relax%
+% \pgf@xa=16\pgf@xa\relax%
+% \divide\pgf@xa by\c@pgf@counta%
+% \pgf@xa=16\pgf@xa\relax%
+% \fi%
+% \else%
+% \c@pgf@counta=\pgf@y%
+% \ifnum\c@pgf@counta=0\relax%
+% \else%
+% \divide\c@pgf@counta by 255\relax%
+% \pgf@ya=16\pgf@ya\relax%
+% \divide\pgf@ya by\c@pgf@counta%
+% \pgf@xa=16\pgf@ya\relax%
+% \fi%
+% \fi%
+% % Make positive:
+% \ifdim\pgf@xa<0pt%
+% \pgf@xa=-\pgf@xa%
+% \fi%
+% % Ok, now we draw things...
\edef\pgf@list{#1}%
- \pgfsnakeremainingdistance=\pgf@xa%
+% \pgfsnakeremainingdistance=\pgf@xa%
\pgfsnakecompleteddistance=0pt%
\pgf@xb=\pgf@x%
\pgf@yb=\pgf@y%
@@ -272,14 +296,16 @@
\let\pgf@snake@next=\relax%
\let\pgf@snake@next@state=\pgf@snake@current@state%
% execute options
- \def\pgf@marshal{\setkeys{pgfsnake}}%
- \expandafter\expandafter\expandafter\pgf@marshal
+ \expandafter\expandafter\expandafter\pgf@snakes@setter
\expandafter\expandafter\expandafter{\csname pgf@snake@@\pgf@snake@name @\pgf@snake@current@state @options\endcsname}%
\ifx\pgf@snake@next\relax%
\let\pgf@snake@next=\pgf@snake@do@code%
\fi%
\pgf@snake@next%
}
+\def\pgf@snakes@setter{%
+ \pgfqkeys{/pgf/snakes}%
+}
\def\pgf@snake@do@code{%
% Ok, execute code:
@@ -297,15 +323,10 @@
\pgf@snake@run%
}
-\define@key{pgfsnake}{width}{%
- \def\pgf@snake@width{#1}%
- \pgf@snake@switch@if#1 to final\pgf@stop%
-}
-\define@key{pgfsnake}{switch if less than}{%
- \pgf@snake@switch@if#1\pgf@stop%
-}
-\define@key{pgfsnake}{next state}{%
- \def\pgf@snake@next@state{#1}%
+\pgfkeys{
+ /pgf/snakes/width/.code=\def\pgf@snake@width{#1}\pgf@snake@switch@if#1 to final\pgf@stop,%
+ /pgf/snakes/switch if less than/.code=\pgf@snake@switch@if#1\pgf@stop,%
+ /pgf/snakes/next state/.store in=\pgf@snake@next@state%
}
\def\pgf@snake@switch@if#1to #2\pgf@stop{%
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg
deleted file mode 100644
index b89169e5a1e..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg
+++ /dev/null
@@ -1,34 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgf.cfg,v 1.4 2007/03/20 09:34:00 tantau Exp $
-
-% Default driver:
-\ifx\pgfsysdriver\@undefined
- \def\pgfsysdriver{pgfsys-\Gin@driver}
-
- % Test for XeTeX and use dvipdfm in this case:
- \ifx\XeTeXversion\@undefined
- \else
- \ifx\XeTeXversion\relax
- \else
- \def\pgfsysdriver{pgfsys-dvipdfm.def}
- \fi
- \fi
-\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-dvipdfm.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf-via-dvi.def
index b97cdc08515..03c1821639f 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfm.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf-via-dvi.def
@@ -7,18 +7,11 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvipdfm.def,v 1.14 2007/06/07 07:41:11 tantau Exp $
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-pdf-via-dvi.def,v 1.4 2008/02/05 10:25:36 tantau Exp $
-% Driver commands for dvipdfm
+% Common driver commands for all drivers that produce pdf via the
+% detour of a dvi file
-%
-% 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{%
@@ -48,16 +41,16 @@
\def\pgf@sys@pdf@addtopageresources@extgs#1{%
\ifx\pgf@sys@pdf@obj\@undefined%
\global\let\pgf@sys@pdf@obj=\relax%
- \special{pdf: obj @pgfopacities << >>}%
+ \special{pdf: obj @pgfopacities << >>}% <<
\fi%
- \special{pdf: put @pgfopacities << #1 >>}%
- \special{pdf: put @resources << /ExtGState @pgfopacities >>}%
+ \special{pdf: put @pgfopacities << #1 >>}% <<
+ \special{pdf: put @resources << /ExtGState @pgfopacities >>}% <<
}
\def\pgf@sys@pdf@readdtopageresources@extgs#1{%
- \special{pdf: put @resources << /ExtGState @pgfopacities >>}%
+ \special{pdf: put @resources << /ExtGState @pgfopacities >>}% <<
}
-\def\pgfsys@imagesuffixlist{pdf:jpg:jpeg:png}
+\def\pgfsys@imagesuffixlist{.pdf:.jpg:.jpeg:.png:}
\def\pgfsys@horishading#1#2#3{%
{%
\pgf@parsefunc{#3}%
@@ -69,7 +62,7 @@
/Domain [\pgf@pdfparseddomain]
/Coords [\pgf@doma\space0 \pgf@domb\space0]
/Function \pgf@pdfparsedfunction
- /Extend [false false] >> >> >>}}}\@temp%
+ /Extend [false false] >> >> >>}}}\@temp% <<
\pgf@sys@atbeginpage{\special{pdf: content /Sh sh}%
\special{pdf: endxobj}}%
\expandafter\xdef\csname @pgfshading#1!\endcsname{%
@@ -87,7 +80,7 @@
/Domain [\pgf@pdfparseddomain]
/Coords [0 \pgf@doma\space0 \pgf@domb]
/Function \pgf@pdfparsedfunction
- /Extend [false false] >> >> >>}}}\@temp%
+ /Extend [false false] >> >> >>}}}\@temp% <<
\pgf@sys@atbeginpage{\special{pdf: content /Sh sh}%
\special{pdf: endxobj}}%
\expandafter\xdef\csname @pgfshading#1!\endcsname{%
@@ -115,7 +108,7 @@
/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%
+ /Extend [true false] >> >> >>}}}\@temp% <<
\pgf@sys@atbeginpage{\special{pdf: content /Sh sh}%
\special{pdf: endxobj}}%
\expandafter\xdef\csname @pgfshading#1!\endcsname{%
@@ -123,42 +116,44 @@
}%
}%
-
+% The following is an ugly hack. We need something like
+% "everyshipout".
+% But it should be ultra-portable...
\def\pgf@sys@atbeginpage#1{\AtBeginDvi{#1}}
-\AtBeginDocument{% hyperref hack
- \ifx\HyPL@EveryPage\@undefined\def\HyPL@EveryPage{}\fi
- \def\@begindvi{\unvbox\@begindvibox\HyPL@EveryPage}
-}
-
-
-%
-% Position tracking (needs pdftex >= 1.40.0-alpha-20051205 in dvi mode)
-%
-\ifx\pdftexversion\@undefined
-\else
- \ifnum\pdftexversion>139
-
-\def\pgfsys@markposition#1{%
- \pdfsavepos%
- \edef\pgf@temp{#1}%
- \expandafter\write\expandafter\pgfutil@auxout\expandafter{%
- \expandafter\noexpand\expandafter\pgfsyspdfmark\expandafter{\pgf@temp}{\the\pdflastxpos}{\the\pdflastypos}}%
+\AtBeginDocument{% hack for old hyperref
+ \ifx\Hy@begindvi\@undefined%
+ \let\pgf@sys@continue@hyper=\pgfutil@empty%
+ \else%
+ \pgf@sys@test@hyper%
+ \fi%
+ \def\@begindvi{\unvbox\@begindvibox\pgf@sys@continue@hyper}
}
-\def\pgfsyspdfmark#1#2#3{%
- \expandafter\gdef\csname pgf@sys@pdf@mark@pos@#1\endcsname{\pgfqpoint{#2sp}{#3sp}}%
+\def\pgf@sys@test@hyper{%
+ \ifHy@implicit%
+ \let\pgf@sys@continue@hyper=\Hy@begindvi%
+ \else%
+ \let\pgf@sys@continue@hyper=\HyPL@EveryPage%
+ \fi%
}
-\def\pgfsys@getposition#1#2{%
- \edef\pgf@marshal{\let\noexpand#2=\expandafter\noexpand\csname pgf@sys@pdf@mark@pos@#1\endcsname}%
- \pgf@marshal%
+\def\pgf@sys@pdf@dvi@tracker{
+ \def\pgfsys@markposition##1{%
+ \pdfsavepos%
+ \edef\pgf@temp{##1}%
+ \expandafter\write\expandafter\pgfutil@auxout\expandafter{%
+ \expandafter\noexpand\expandafter\pgfsyspdfmark\expandafter{\pgf@temp}{\the\pdflastxpos}{\the\pdflastypos}}%
+ }
+ \def\pgfsyspdfmark##1##2##3{%
+ \expandafter\gdef\csname pgf@sys@pdf@mark@pos@##1\endcsname{\pgfqpoint{##2sp}{##3sp}}%
+ }
+ \def\pgfsys@getposition##1##2{%
+ \edef\pgf@marshal{\let\noexpand##2=\expandafter\noexpand\csname pgf@sys@pdf@mark@pos@##1\endcsname}%
+ \pgf@marshal%
+ }
+ \def\pgf@sys@pdf@mark@pos@pgfpageorigin{\pgfpointorigin}
}
-\def\pgf@sys@pdf@mark@pos@pgfpageorigin{\pgfpointorigin}
-
- \fi
-\fi
-
\endinput
%%% Local Variables:
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
deleted file mode 100644
index 1393e4522f7..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
+++ /dev/null
@@ -1,92 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-pdf.def,v 1.7 2006/10/16 22:32:59 tantau Exp $
-
-
-% 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{[}%
- \pgfutil@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@extgs#1{\pgf@sys@fail{adding to page resources}}
-\def\pgf@sys@pdf@readdtopageresources@extgs#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@extgs{/pgf@CA#1 << /CA #1 >>}%
- \else%
- \pgf@sys@pdf@readdtopageresources@extgs{/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@extgs{/pgf@ca#1 << /ca #1 >>}%
- \else%
- \pgf@sys@pdf@readdtopageresources@extgs{/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
deleted file mode 100644
index bb9dde9ea85..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def
+++ /dev/null
@@ -1,389 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-postscript.def,v 1.16 2007/06/07 07:41:11 tantau Exp $
-
-
-% 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{[}%
- \pgfutil@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}
-}
-
-% Objects
-\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\pgfutil@empty%
- \pgfsysprotocol@bufferedtrue%
- #4%
- \pgfsysprotocol@getcurrentprotocol\pgfsys@@temp%
- \pgf@sys@postscript@object{/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\pgfutil@empty%
- \pgfsysprotocol@bufferedfalse%
- #2%
- \pgfsysprotocol@invokecurrentprotocol%
- \pgfsys@invoke{pgf\csname#1\endcsname}%
- }%
- \pgfsysprotocol@setcurrentprotocol\pgfsys@temp}
-
-% Shadings
-
-\def\pgfsys@horishading#1#2#3{%
- {%
- \pgf@parsefunc{#3}%
- \pgfmathsetlength\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@max}{\the\pgf@xa}%
- \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}%
- \pgfmathsetlength\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@xa}{\the\pgf@max}%
- \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@sys@bp@correct{\pgf@x}%
- \pgf@sys@bp@correct{\pgf@y}%
- \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}}%
- }%
-}
-
-%
-% Patterns
-%
-
-
-\def\pgfsys@declarepattern#1#2#3#4#5#6#7#8#9{%
- % Start building the pattern dictionary:
- \pgf@xa=#2\relax%
- \pgf@ya=#3\relax%
- \pgf@xb=#4\relax%
- \pgf@yb=#5\relax%
- \pgf@xc=#6\relax%
- \pgf@yc=#7\relax%
- \pgf@sys@bp@correct\pgf@xa%
- \pgf@sys@bp@correct\pgf@ya%
- \pgf@sys@bp@correct\pgf@xb%
- \pgf@sys@bp@correct\pgf@yb%
- \pgf@sys@bp@correct\pgf@xc%
- \pgf@sys@bp@correct\pgf@yc%
- \pgfsys@outerinvoke{
- save true setglobal globaldict begin /pgfpat#1
- {
- \ifnum#9=0 [/Pattern /DeviceRGB] \else /Pattern \fi\space
- setcolorspace
- gsave
- initgraphics
- <<
- /Type /Pattern
- /PatternType 1
- /PaintType \ifnum#9=0 2 \else 1 \fi
- /TilingType 1
- /BBox [\pgf@sys@tonumber\pgf@xa\space\pgf@sys@tonumber\pgf@ya\space\pgf@sys@tonumber\pgf@xb\space\pgf@sys@tonumber\pgf@yb]
- /XStep \pgf@sys@tonumber\pgf@xc\space
- /YStep \pgf@sys@tonumber\pgf@yc\space
- /PaintProc
- { begin 2 dict begin #8\space end end } bind
- >>
- matrix
- makepattern
- %/pgfpat#1\space exch def
- grestore
- setcolor
- } bind def end restore
- }%
-}
-
-\def\pgfsys@setpatternuncolored#1#2#3#4{%
- \pgfsysprotocol@literal{/pgffc{#2 #3 #4 pgfpat#1}def}%
-% [/Pattern /DeviceRGB] setcolorspace
-% #2 #3 #4 pgfpat#1\space setcolor
-% }def}%
- \pgf@fillcolortrue%
-}
-
-\def\pgfsys@setpatterncolored#1{%
- \pgfsysprotocol@literal{/pgffc{pgfpat#1}def}%/Pattern setcolorspace
-% pgfpat#1\space setcolor}def}%
- \pgf@fillcolortrue%
-}
-
-
-
-\def\pgfsys@atbegindocument{%
- % Parameters to horizontal pre axishade: \pgf@domb x
- \pgf@sys@postscript@header{/pgfH{%
- /pgfheight exch def 0.75 setlinewidth [] 0 setdash
- /pgfshade {pgfA} def /pgfdir { dup 0 moveto
- dup 5 index lineto } bind def} bind def}%
-
- % Parameters to vertical pre axishade: \pgf@domb x
- \pgf@sys@postscript@header{/pgfV{%
- /pgfheight exch def 0.75 setlinewidth [] 0 setdash
- /pgfshade {pgfA} def /pgfdir { dup 0 exch moveto dup 5 index
- exch lineto } bind def} bind def}%
-
- % Parameters to axishade: end x, start x, r-, g-, b- of first color, r-, g-, b- of second color
- % Stack afterwards: end x
- \pgf@sys@postscript@header{/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
- }bind def }
-
- % Parameters to radialshade pre: \pgf@domb y x max
- \pgf@sys@postscript@header{/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
- }bind def }
-
- % Parameters to radialshade post: \pgf@firstcolor \pgf@doma
- \pgf@sys@postscript@header{/pgfR2{
- newpath 0.5 add pgfcircx pgfcircy 3 2 roll 0 360 arc
- setrgbcolor fill pop}bind def }%
-
- % Parameters to radialshade: end x, start x, r-, g-, b- of first color, r-, g-, b- of second color
- % Stack afterwards: end x
- \pgf@sys@postscript@header{/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
- }bind def}
-}
-
-
-\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
deleted file mode 100644
index f1446ce894b..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def
+++ /dev/null
@@ -1,411 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-svg.def,v 1.19 2007/06/12 21:23:32 tantau Exp $
-
-
-% Driver commands for svg
-
-
-% Helping functions:
-\let\pgf@sys@svgpath=\pgfutil@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{\pgfutil@g@addto@macro\pgf@sys@svgpath{#1\space}}
-\def\pgf@sys@flushsvgpath{\pgfsysprotocol@literal{\pgf@sys@svgpath}\global\let\pgf@sys@svgpath=\pgfutil@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=\pgfutil@empty
-\catcode`\%=12
-\def\pgf@sys@svg@percentchar{%}
-\catcode`\%=14
-
-% 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=\pgfutil@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\pgfutil@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@svg@percentchar,\pgf@sys@tonumber\pgf@xb\pgf@sys@svg@percentchar,\pgf@sys@tonumber\pgf@xc\pgf@sys@svg@percentchar)}%
- }%
-}
-\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@svg@percentchar,\pgf@sys@tonumber\pgf@xb\pgf@sys@svg@percentchar,\pgf@sys@tonumber\pgf@xc\pgf@sys@svg@percentchar)}%
- }%
-}
-\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@svg@percentchar,\pgf@sys@tonumber\pgf@xb\pgf@sys@svg@percentchar,\pgf@sys@tonumber\pgf@xc\pgf@sys@svg@percentchar)}%
- }%
-}
-\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@svg@percentchar,\pgf@sys@tonumber\pgf@xa\pgf@sys@svg@percentchar,\pgf@sys@tonumber\pgf@xa\pgf@sys@svg@percentchar)}%
- }%
-}
-
-\def\pgf@sys@svg@gs@color#1{%
- \ifpgfpicture\pgf@sys@svg@gs{#1}\fi%
-}
-
-\def\pgfsys@color@rgb@stroke#1#2#3{%
- \pgf@sys@svg@color@rgb#1,#2,#3\relax%
- \pgf@sys@svg@gs@color{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@color{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@color{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@color{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@color{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@color{fill="\pgf@sys@svg@prepared"}}
-\def\pgfsys@color@gray@stroke#1{%
- \pgf@sys@svg@color@gray#1\relax%
- \pgf@sys@svg@gs@color{stroke="\pgf@sys@svg@prepared"}}
-\def\pgfsys@color@gray@fill#1{%
- \pgf@sys@svg@color@gray#1\relax%
- \pgf@sys@svg@gs@color{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\pgfutil@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=\pgfutil@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}}%
- }%
- }%
-}
-
-
-% Patterns
-
-\def\pgfsys@declarepattern#1#2#3#4#5#6#7#8#9{%
- % Start building the pattern dictionary:
- \pgf@xa=#2\relax%
- \pgf@ya=#3\relax%
- \pgf@xb=#4\relax%
- \pgf@yb=#5\relax%
- \pgf@xc=#6\relax%
- \pgf@yc=#7\relax%
- \ifnum#9=1\relax%
- % Colored. That's easy:
- \pgfsysprotocol@literal{
- <pattern
- id="pgfpat#1"
- patternUnits="userSpaceOnUse"
- width="\the\pgf@xc"
- height="\the\pgf@yc">
- #8
- </pattern>}%
- \else%
- % Uncolored. Yikes!
- \pgfsysprotocol@literal{
- <pattern
- id="pgfpat#1"
- patternUnits="userSpaceOnUse"
- width="\the\pgf@xc"
- height="\the\pgf@yc"/>
- <symbol id="pgfsym#1">
- #8
- </symbol>}%
- \fi%
-}
-
-\def\pgfsys@setpatternuncolored#1#2#3#4{%
- \global\advance\pgf@sys@svg@objectcount by1\relax%
- \pgf@sys@svg@color@rgb#2,#3,#4\relax%
- \pgfsysprotocol@literal{
- <pattern id="pgfupat\the\pgf@sys@svg@objectcount" xlink:href="\#pgfpat#1">
- <g stroke="\pgf@sys@svg@prepared" fill="\pgf@sys@svg@prepared"> <use xlink:href="\#pgfsym#1"/> </g>
- </pattern>}
- \pgf@sys@svg@gs@color{fill="url(\#pgfupat\the\pgf@sys@svg@objectcount)"}%
-}
-
-\def\pgfsys@setpatterncolored#1{%
- \pgf@sys@svg@gs@color{fill="url(\#pgfpat#1)"}%
-}
-
-
-\endinput
-
-
-%%% Local Variables:
-%%% mode: latex
-%%% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvi.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvi.def
deleted file mode 100644
index 05f647fc796..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvi.def
+++ /dev/null
@@ -1,392 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvi.def,v 1.5 2007/06/07 07:41:11 tantau Exp $
-
-% Driver commands for pure, ultra-portable dvi, in the tradition of
-% old-style LaTeX pictures.
-%
-% Do not expect magic from this file
-
-
-\newtoks\pgf@sys@dvi@path
-\def\pgf@sys@dvi@addtopath#1{\pgf@sys@dvi@path\expandafter{\the\pgf@sys@dvi@path#1}}
-
-% Placing an object:
-\def\pgf@sys@dvi@put#1#2#3{%
- {%
- \setbox\pgf@hbox=\hbox{\raise#2\hbox to0pt{\kern#1\relax#3\hss}}%
- \wd\pgf@hbox=0pt%
- \ht\pgf@hbox=0pt%
- \dp\pgf@hbox=0pt%
- \box\pgf@hbox%
- }%
-}
-
-\def\pgf@sys@dvi@drawrect#1#2#3#4{%
- {%
- \pgf@x=#1%
- \pgf@y=#2%
- \pgf@xa=#3%
- \pgf@ya=#4%
- \ifdim\pgf@xa<0pt%
- \advance\pgf@x by\pgf@xa%
- \pgf@xa=-\pgf@xa%
- \fi%
- \ifdim\pgf@ya<0pt%
- \advance\pgf@y by\pgf@ya%
- \pgf@ya=-\pgf@ya%
- \fi%
- \pgf@sys@dvi@put{\pgf@x}{\pgf@y}{\vrule width\pgf@xa height\pgf@ya}%
- }%
-}
-
-\def\pgf@sys@dvi@bezier{%
- {%
- % First iteration:
- \pgf@x=\pgf@time@t\pgf@x\advance\pgf@x by\pgf@time@s\pgf@xa%
- \pgf@y=\pgf@time@t\pgf@y\advance\pgf@y by\pgf@time@s\pgf@ya%
- \pgf@xa=\pgf@time@t\pgf@xa\advance\pgf@xa by\pgf@time@s\pgf@xb%
- \pgf@ya=\pgf@time@t\pgf@ya\advance\pgf@ya by\pgf@time@s\pgf@yb%
- \pgf@xb=\pgf@time@t\pgf@xb\advance\pgf@xb by\pgf@time@s\pgf@xc%
- \pgf@yb=\pgf@time@t\pgf@yb\advance\pgf@yb by\pgf@time@s\pgf@yc%
- % Second iteration:
- \pgf@x=\pgf@time@t\pgf@x\advance\pgf@x by\pgf@time@s\pgf@xa%
- \pgf@y=\pgf@time@t\pgf@y\advance\pgf@y by\pgf@time@s\pgf@ya%
- \pgf@xa=\pgf@time@t\pgf@xa\advance\pgf@xa by\pgf@time@s\pgf@xb%
- \pgf@ya=\pgf@time@t\pgf@ya\advance\pgf@ya by\pgf@time@s\pgf@yb%
- % Third iteration:
- \pgf@x=\pgf@time@t\pgf@x\advance\pgf@x by\pgf@time@s\pgf@xa%
- \pgf@y=\pgf@time@t\pgf@y\advance\pgf@y by\pgf@time@s\pgf@ya%
- %
- \advance\pgf@x by-.5\pgf@sys@dvi@linewidth%
- \advance\pgf@y by-.5\pgf@sys@dvi@linewidth%
- \pgf@sys@dvi@drawrect{\pgf@x}{\pgf@y}{\pgf@sys@dvi@linewidth}{\pgf@sys@dvi@linewidth}%
- }%
-}
-
-\def\pgf@sys@dvi@drawcurve#1#2#3#4#5#6#7#8{%
- {%
- \pgf@x=#1%
- \pgf@y=#2%
- \pgf@xa=#3%
- \pgf@ya=#4%
- \pgf@xb=#5%
- \pgf@yb=#6%
- \pgf@xc=#7%
- \pgf@yc=#8%
- % Compute number of steps:
- \pgfutil@tempdima=\pgf@x%
- \advance\pgfutil@tempdima by-\pgf@xa%
- \ifdim\pgfutil@tempdima<0pt%
- \pgfutil@tempdimb=-\pgfutil@tempdima%
- \else%
- \pgfutil@tempdimb=\pgfutil@tempdima%
- \fi%
- \pgfutil@tempdima=\pgf@y%
- \advance\pgfutil@tempdima by-\pgf@ya%
- \ifdim\pgfutil@tempdima<0pt%
- \pgfutil@tempdima=-\pgfutil@tempdima%
- \fi%
- \ifdim\pgfutil@tempdima>\pgfutil@tempdimb%
- \pgfutil@tempdimb=\pgfutil@tempdima%
- \fi%
- \pgfutil@tempdima=\pgf@xb%
- \advance\pgfutil@tempdima by-\pgf@xc%
- \ifdim\pgfutil@tempdima<0pt%
- \pgfutil@tempdima=-\pgfutil@tempdima%
- \fi%
- \ifdim\pgfutil@tempdima>\pgfutil@tempdimb%
- \pgfutil@tempdimb=\pgfutil@tempdima%
- \fi%
- \pgfutil@tempdima=\pgf@yb%
- \advance\pgfutil@tempdima by-\pgf@yc%
- \ifdim\pgfutil@tempdima<0pt%
- \pgfutil@tempdima=-\pgfutil@tempdima%
- \fi%
- \ifdim\pgfutil@tempdima>\pgfutil@tempdimb%
- \pgfutil@tempdimb=\pgfutil@tempdima%
- \fi%
- \pgfutil@tempdima=\pgf@x%
- \advance\pgfutil@tempdima by-\pgf@xc%
- \ifdim\pgfutil@tempdima<0pt%
- \pgfutil@tempdima=-\pgfutil@tempdima%
- \fi%
- \ifdim\pgfutil@tempdima>\pgfutil@tempdimb%
- \pgfutil@tempdimb=\pgfutil@tempdima%
- \fi%
- \pgfutil@tempdima=\pgf@y%
- \advance\pgfutil@tempdima by-\pgf@yc%
- \ifdim\pgfutil@tempdima<0pt%
- \pgfutil@tempdima=-\pgfutil@tempdima%
- \fi%
- \ifdim\pgfutil@tempdima>\pgfutil@tempdimb%
- \pgfutil@tempdimb=\pgfutil@tempdima%
- \fi%
- \pgfutil@tempcnta=\pgfutil@tempdimb%
- \ifdim\pgf@sys@dvi@linewidth>0.3pt%
- \pgfutil@tempdimb=0.15pt%
- \else%
- \ifdim\pgf@sys@dvi@linewidth<0.05pt%
- \pgfutil@tempdimb=.025pt%
- \else%
- \pgfutil@tempdimb=.5\pgf@sys@dvi@linewidth%
- \fi%
- \fi%
- \pgfutil@tempcntb=\pgfutil@tempdimb%
- \divide\pgfutil@tempcnta by\pgfutil@tempcntb\relax%
- \ifnum\pgfutil@tempcnta>0\relax%
- \pgfutil@tempcntb=0\relax%
- \loop%
- {%
- \pgfutil@tempdima=\the\pgfutil@tempcntb pt%
- \pgfutil@tempdimb=\the\pgfutil@tempcnta pt%
- \advance\pgfutil@tempdimb by-\pgfutil@tempdima\relax%
- \divide\pgfutil@tempdima by\pgfutil@tempcnta\relax%
- \divide\pgfutil@tempdimb by\pgfutil@tempcnta\relax%
- \edef\pgf@time@t{\pgf@sys@tonumber{\pgfutil@tempdima}}%
- \edef\pgf@time@s{\pgf@sys@tonumber{\pgfutil@tempdimb}}%
- \pgf@sys@dvi@bezier%
- }%
- \advance\pgfutil@tempcntb by1\relax
- \ifnum\pgfutil@tempcntb<\pgfutil@tempcnta%
- {\def\pgf@time@t{1}\def\pgf@time@s{0}\pgf@sys@dvi@bezier}%
- \repeat%
- \fi%
- }%
-}
-
-% Text:
-\def\pgfsys@hbox#1{%
- \wd#1=0pt%
- \ht#1=0pt%
- \dp#1=0pt%
- \pgf@sys@dvi@put{\pgf@sys@dvi@pt@x}{\pgf@sys@dvi@pt@y}{\box#1}%
-}
-
-
-
-% Literals:
-
-\def\pgfsys@invoke#1{#1}
-
-
-% Buffered path construction:
-
-\def\pgfsys@moveto#1#2{\pgfsysprotocol@literal{\noexpand\pgf@sys@dvi@addtopath{\noexpand\pgf@sys@dvi@moveto{#1}{#2}}}}
-\def\pgfsys@lineto#1#2{\pgfsysprotocol@literal{\noexpand\pgf@sys@dvi@addtopath{\noexpand\pgf@sys@dvi@lineto{#1}{#2}}}}
-\def\pgfsys@curveto#1#2#3#4#5#6{\pgfsysprotocol@literal{\noexpand\pgf@sys@dvi@addtopath{\noexpand\pgf@sys@dvi@curveto{#1}{#2}{#3}{#4}{#5}{#6}}}}
-\def\pgfsys@rect#1#2#3#4{\pgfsysprotocol@literal{\noexpand\pgf@sys@dvi@addtopath{\noexpand\pgf@sys@dvi@rect{#1}{#2}{#3}{#4}}}}
-\def\pgfsys@closepath{\pgfsysprotocol@literal{\noexpand\pgf@sys@dvi@addtopath{\noexpand\pgf@sys@dvi@closepath}}}
-
-
-% Scoping
-\def\pgfsys@beginscope{\pgfsysprotocol@literal{\noexpand\pgf@sys@dvi@beginscope}}%
-\def\pgfsys@endscope{\pgfsysprotocol@literal{\noexpand\pgf@sys@dvi@endscope}}%
-
-\def\pgf@sys@dvi@beginscope{%
- % Save current stuff...
- \edef\pgf@sys@dvi@return{%
- \global\pgf@sys@dvi@linewidth=\the\pgf@sys@dvi@linewidth%
- \global\pgf@sys@dvi@pt@x=\the\pgf@sys@dvi@pt@x%
- \global\pgf@sys@dvi@pt@y=\the\pgf@sys@dvi@pt@y%
- \gdef\noexpand\pgf@sys@dvi@pt@aa{\pgf@sys@dvi@pt@aa}%
- \gdef\noexpand\pgf@sys@dvi@pt@ab{\pgf@sys@dvi@pt@ab}%
- \gdef\noexpand\pgf@sys@dvi@pt@ba{\pgf@sys@dvi@pt@ba}%
- \gdef\noexpand\pgf@sys@dvi@pt@bb{\pgf@sys@dvi@pt@bb}%
- }%
- \begingroup%
- \ignorespaces%
-}
-
-\def\pgf@sys@dvi@endscope{%
- \endgroup%
- \pgf@sys@dvi@return%
-}
-
-
-
-% Line width
-
-\newdimen\pgf@sys@dvi@linewidth
-\pgf@sys@dvi@linewidth=0.4pt
-
-\def\pgfsys@setlinewidth#1{\global\pgf@sys@dvi@linewidth=#1\relax}
-
-
-% Transformation matrix
-
-\newdimen\pgf@sys@dvi@pt@x
-\newdimen\pgf@sys@dvi@pt@y
-
-\def\pgf@sys@dvi@pt@aa{1.0} \def\pgf@sys@dvi@pt@ab{0.0}
-\def\pgf@sys@dvi@pt@ba{0.0} \def\pgf@sys@dvi@pt@bb{1.0}
-
-\def\pgf@sys@dvi@pos@transform#1#2{%
- \pgf@pt@temp=#1%
- #1=\pgf@sys@dvi@pt@aa#1%
- \advance#1 by\pgf@sys@dvi@pt@ba#2%
- #2=\pgf@sys@dvi@pt@bb#2%
- \advance#2 by\pgf@sys@dvi@pt@ab\pgf@pt@temp%
- \advance#1 by\pgf@sys@dvi@pt@x%
- \advance#2 by\pgf@sys@dvi@pt@y%
-}
-
-\def\pgf@sys@dvi@transformcm#1#2#3#4#5#6{%
- {%
- \pgf@xc=#5%
- \pgf@yc=#6%
- %
- \pgf@x=#1pt%
- \pgf@y=#2pt%
- %
- \pgf@xa=\pgf@sys@dvi@pt@aa\pgf@x%
- \advance\pgf@xa by \pgf@sys@dvi@pt@ba\pgf@y%
- %
- \pgf@ya=\pgf@sys@dvi@pt@ab\pgf@x%
- \advance\pgf@ya by \pgf@sys@dvi@pt@bb\pgf@y%
- %
- \pgf@x=#3pt%
- \pgf@y=#4pt%
- %
- \pgf@xb=\pgf@sys@dvi@pt@aa\pgf@x%
- \advance\pgf@xb by \pgf@sys@dvi@pt@ba\pgf@y%
- %
- \pgf@yb=\pgf@sys@dvi@pt@ab\pgf@x%
- \advance\pgf@yb by \pgf@sys@dvi@pt@bb\pgf@y%
- %
- \pgf@x=\pgf@sys@dvi@pt@aa\pgf@xc%
- \advance\pgf@x by\pgf@sys@dvi@pt@ba\pgf@yc%
- \advance\pgf@x by\pgf@sys@dvi@pt@x%
- %
- \pgf@y=\pgf@sys@dvi@pt@ab\pgf@xc%
- \advance\pgf@y by\pgf@sys@dvi@pt@bb\pgf@yc%
- \advance\pgf@y by\pgf@sys@dvi@pt@y%
- %
- \global\pgf@sys@dvi@pt@x=\pgf@x%
- \global\pgf@sys@dvi@pt@y=\pgf@y%
- \xdef\pgf@sys@dvi@pt@aa{\pgf@sys@tonumber{\pgf@xa}}%
- \xdef\pgf@sys@dvi@pt@ab{\pgf@sys@tonumber{\pgf@ya}}%
- \xdef\pgf@sys@dvi@pt@ba{\pgf@sys@tonumber{\pgf@xb}}%
- \xdef\pgf@sys@dvi@pt@bb{\pgf@sys@tonumber{\pgf@yb}}%
- }%
-}
-
-\def\pgfsys@transformcm#1#2#3#4#5#6{%
- {%
- \pgf@x=#5\relax%
- \pgf@y=#6\relax%
- \pgfsysprotocol@literal{\noexpand\pgf@sys@dvi@transformcm{#1}{#2}{#3}{#4}{\the\pgf@x}{\the\pgf@y}}%
- }%
-}
-
-
-% Stroking
-
-\def\pgfsys@stroke{\pgfsysprotocol@literal{\noexpand\pgf@sys@dvi@stroke}}%
-
-
-\def\pgf@sys@dvi@stroke{%
- \let\pgf@sys@dvi@moveto=\pgf@sys@dvi@moveto@stroke%
- \let\pgf@sys@dvi@lineto=\pgf@sys@dvi@lineto@stroke%
- \let\pgf@sys@dvi@curveto=\pgf@sys@dvi@curveto@stroke%
- \let\pgf@sys@dvi@rect=\pgf@sys@dvi@rect@stroke%
- \let\pgf@sys@dvi@closepath=\pgf@sys@dvi@closepath@stroke%
- {\the\pgf@sys@dvi@path}%
- \pgf@sys@dvi@path{}%
-}
-
-\def\pgf@sys@dvi@moveto@stroke#1#2{%
- % These two store the current position:
- \pgf@xc=#1\relax%
- \pgf@yc=#2\relax%
- % These two store the last moveto:
- \pgf@xb=\pgf@xc%
- \pgf@yb=\pgf@yc%
-}
-
-\def\pgf@sys@dvi@lineto@stroke#1#2{%
- {%
- \pgf@xa=#1\relax%
- \pgf@ya=#2\relax%
- \pgf@x=\pgf@xc%
- \pgf@y=\pgf@yc%
- \pgf@sys@dvi@pos@transform{\pgf@xa}{\pgf@ya}%
- \pgf@sys@dvi@pos@transform{\pgf@x}{\pgf@y}%
- % Now, we need to draw a line from (x/y) to (xa/ya)
- %
- % Horizontal?
- \ifdim\pgf@y=\pgf@ya%
- % Ok, that should be easy...
- \pgf@xb=\pgf@xa%
- \advance\pgf@xb by-\pgf@x%
- \advance\pgf@y by-0.5\pgf@sys@dvi@linewidth%
- \pgf@sys@dvi@drawrect{\pgf@x}{\pgf@y}{\pgf@xb}{\pgf@sys@dvi@linewidth}%
- \else%
- \ifdim\pgf@x=\pgf@xa%
- % Ok, also easy...
- \pgf@yb=\pgf@ya%
- \advance\pgf@yb by-\pgf@y%
- \advance\pgf@x by-0.5\pgf@sys@dvi@linewidth%
- \pgf@sys@dvi@drawrect{\pgf@x}{\pgf@y}{\pgf@sys@dvi@linewidth}{\pgf@yb}%
- \else%
- \edef\pgf@marshal{\noexpand\pgf@sys@dvi@drawcurve{\the\pgf@x}{\the\pgf@y}{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}{\the\pgf@xa}{\the\pgf@ya}}%
- \pgf@marshal%
- \fi%
- \fi%
- }%
- % Remember:
- \pgf@xc=#1\relax%
- \pgf@yc=#2\relax%
-}
-
-
-\def\pgf@sys@dvi@curveto@stroke#1#2#3#4#5#6{%
- \pgf@x=\pgf@xc%
- \pgf@y=\pgf@yc%
- \pgf@xa=#1%
- \pgf@ya=#2%
- \pgf@xb=#3%
- \pgf@yb=#4%
- \pgf@xc=#5%
- \pgf@yc=#6%
- {%
- \pgf@sys@dvi@pos@transform{\pgf@x}{\pgf@y}%
- \pgf@sys@dvi@pos@transform{\pgf@xa}{\pgf@ya}%
- \pgf@sys@dvi@pos@transform{\pgf@xb}{\pgf@yb}%
- \pgf@sys@dvi@pos@transform{\pgf@xc}{\pgf@yc}%
- \pgf@sys@dvi@drawcurve{\pgf@x}{\pgf@y}{\pgf@xa}{\pgf@ya}{\pgf@xb}{\pgf@yb}{\pgf@xc}{\pgf@yc}%
- }%
-}
-
-\def\pgf@sys@dvi@closepath@stroke{%
- \pgf@sys@dvi@lineto@stroke{\pgf@xc}{\pgf@yc}%
-}
-
-\def\pgf@sys@dvi@rect@stroke#1#2#3#4{%
- \pgf@x=#1\relax%
- \pgf@y=#2\relax%
- \pgf@xa=#3\relax%
- \pgf@ya=#4\relax%
- \advance\pgf@xa by\pgf@x%
- \advance\pgf@ya by\pgf@y%
- \pgf@sys@dvi@moveto@stroke{\pgf@x}{\pgf@y}%
- \pgf@sys@dvi@lineto@stroke{\pgf@xa}{\pgf@y}%
- \pgf@sys@dvi@lineto@stroke{\pgf@xa}{\pgf@ya}%
- \pgf@sys@dvi@lineto@stroke{\pgf@x}{\pgf@ya}%
- \pgf@sys@dvi@closepath@stroke%
-}
-
-
-
-\endinput
-
-%%% Local Variables:
-%%% mode: latex
-%%% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx.def
new file mode 100644
index 00000000000..57ccbab304d
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx.def
@@ -0,0 +1,40 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvipdfmx.def,v 1.1 2008/02/05 10:57:46 tantau Exp $
+
+% Driver commands for dvipdfm
+
+%
+% Load common pdf and pdf in dvi commands:
+%
+\input pgfsys-common-pdf.def
+\input pgfsys-common-pdf-via-dvi.def
+
+%
+% dvipdfm-specific stuff:
+%
+
+
+
+%
+% Position tracking (needs pdftex >= 1.40.0-alpha-20051205 in dvi mode)
+%
+\ifx\pdftexversion\@undefined
+\else
+ \ifnum\pdftexversion>139
+ \pgf@sys@pdf@dvi@tracker
+ \fi
+\fi
+
+\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
deleted file mode 100644
index ba01eda368f..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def
+++ /dev/null
@@ -1,126 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvips.def,v 1.17 2007/05/28 18:39:57 tantau Exp $
-
-% Driver commands for dvips
-
-\def\pgfsys@invoke#1{\special{ps:: #1}}
-\def\pgfsys@outerinvoke#1{\special{ps: #1}}
-\def\pgf@sys@postscript@header#1{\AtBeginDvi{\special{! #1}}}
-\def\pgf@sys@postscript@object#1{\special{! #1}}
-
-
-%
-% Load common postscript commands:
-%
-\input pgfsys-common-postscript.def
-
-
-%
-% dvips-specific stuff:
-%
-
-\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}}}
-\def\pgfsys@imagesuffixlist{epsi:eps:ps}
-
-\def\pgfsys@papersize#1#2{%
- \expandafter\gdef\expandafter\pgfsys@atbegindocument\expandafter{\pgfsys@atbegindocument\special{papersize=#1,#2}}}
-
-\expandafter\gdef\expandafter\pgfsys@atbegindocument\expandafter{\pgfsys@atbegindocument%
- \pgf@sys@postscript@header{
- /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 eofill 1 .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
- }%
-}
-
-\AtBeginDocument{ % needed for plain TeX
- \pgfsys@atbegindocument
- \let\pgfsys@atbegindocument=\pgfutil@empty
-}
-
-
-
-%
-% Position tracking (needs pdftex >= 1.40 in dvi mode)
-%
-\ifx\pdftexversion\@undefined
-\else
- \ifnum\pdftexversion>139
-
-\def\pgfsys@markposition#1{%
- \pdfsavepos%
- \edef\pgf@temp{#1}%
- \expandafter\write\expandafter\pgfutil@auxout\expandafter{%
- \expandafter\noexpand\expandafter\pgfsyspdfmark\expandafter{\pgf@temp}{\the\pdflastxpos}{\the\pdflastypos}}%
-}
-
-\def\pgfsyspdfmark#1#2#3{%
- \expandafter\gdef\csname pgf@sys@pdf@mark@pos@#1\endcsname{\pgfqpoint{#2sp}{#3sp}}%
-}
-
-\def\pgfsys@getposition#1#2{%
- \edef\pgf@marshal{\let\noexpand#2=\expandafter\noexpand\csname pgf@sys@pdf@mark@pos@#1\endcsname}%
- \pgf@marshal%
-}
-
-\def\pgf@sys@pdf@mark@pos@pgfpageorigin{\pgfpointorigin}
-
- \fi
-\fi
-
-\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
deleted file mode 100644
index 1f14326ad1f..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
+++ /dev/null
@@ -1,272 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-pdftex.def,v 1.15 2007/06/07 07:41:11 tantau Exp $
-
-
-% 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@extgs=\pgfutil@empty%
-\let\pgf@sys@pgf@resource@list@patterns=\pgfutil@empty%
-
-\def\pgf@sys@pdf@addtopageresources@extgs#1{%
- \xdef\pgf@sys@pgf@resource@list@extgs{\pgf@sys@pgf@resource@list@extgs\space#1}%
- \pgf@sys@pdf@updateresources%
-}
-
-\def\pgf@sys@pdf@addtopageresources@patterns#1{%
- \xdef\pgf@sys@pgf@resource@list@patterns{\pgf@sys@pgf@resource@list@patterns\space#1}%
- \pgf@sys@pdf@updateresources%
-}
-
-\def\pgf@sys@pdf@updateresources{%
- \let\pgf@temp=\pgfutil@empty%
- \ifx\pgf@sys@pgf@resource@list@extgs\pgfutil@empty%
- \else%
- \immediate\pdfobj{<<\pgf@sys@pgf@resource@list@extgs>>}%
- \edef\pgf@temp{/ExtGState \the\pdflastobj\space 0 R\space}%
- \fi%
- \ifx\pgf@sys@pgf@resource@list@patterns=\pgfutil@empty%
- \else%
- \immediate\pdfobj{<<\pgf@sys@pgf@resource@list@patterns>>}%
- \edef\pgf@temp{%
- \pgf@temp%
- /ColorSpace << /pgfprgb [/Pattern /DeviceRGB] >>
- /Pattern \the\pdflastobj\space 0 R\space%
- }%
- \fi%
- \expandafter\global\expandafter\pdfpageresources\expandafter{\pgf@temp}%
-}
-
-
-\def\pgfsys@imagesuffixlist{pdf:jpg:jpeg:png}
-\def\pgfsys@defineimage{% width, height, page number
- \ifx\pgf@imagewidth\pgfutil@empty\else\edef\pgf@imagewidth{ width \pgf@imagewidth }\fi%
- \ifx\pgf@imageheight\pgfutil@empty\else\edef\pgf@imageheight{ height \pgf@imageheight }\fi%
- \ifx\pgf@imagepage\pgfutil@empty\else\edef\pgf@imagepage{ page \pgf@imagepage }\fi%
- \ifx\pdfximage\@undefined% old version of pdflatex
- \ifx\pgf@imagepage\pgfutil@empty\else%
- \PackageWarning{pgf}{Page selection not supported. Ignoring
- page selection}%
- \fi%
- \setbox\pgfutil@tempboxa=\hbox{%
- \pdfimage \pgf@imageheight \pgf@imagewidth {\pgf@filename}}%
- \pdfform\pgfutil@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\pgfutil@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\pgfutil@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] >> >>}\pgfutil@tempboxa%
- \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\pdfrefxform\the\pdflastxform}%
- }%
-}
-\def\pgfsys@vertshading#1#2#3{%
- {%
- \pgf@parsefunc{#3}%
- \setbox\pgfutil@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] >> >>}\pgfutil@tempboxa%
- \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\pdfrefxform\the\pdflastxform}%
- }%
-}
-\def\pgfsys@radialshading#1#2#3{%
- {%
- \pgf@parsefunc{#3}%
- \setbox\pgfutil@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%
- \pgf@sys@bp@correct{\pgf@x}%
- \pgf@sys@bp@correct{\pgf@y}%
- \pgf@sys@bp@correct{\pgf@xa}%
- \pgf@sys@bp@correct{\pgf@ya}%
- \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] >> >>}\pgfutil@tempboxa%
- \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\pdfrefxform\the\pdflastxform}%
- }%
-}%
-
-
-
-% Patterns
-
-\def\pgfsys@declarepattern#1#2#3#4#5#6#7#8#9{%
- % Start building the pattern dictionary:
- \pgf@xa=#2\relax%
- \pgf@ya=#3\relax%
- \pgf@xb=#4\relax%
- \pgf@yb=#5\relax%
- \pgf@xc=#6\relax%
- \pgf@yc=#7\relax%
- \pgf@sys@bp@correct\pgf@xa%
- \pgf@sys@bp@correct\pgf@ya%
- \pgf@sys@bp@correct\pgf@xb%
- \pgf@sys@bp@correct\pgf@yb%
- \pgf@sys@bp@correct\pgf@xc%
- \pgf@sys@bp@correct\pgf@yc%
- % Now create the pattern object:
- \immediate\pdfobj stream
- attr
- {
- /Type /Pattern
- /PatternType 1
- /PaintType \ifnum#9=0 2 \else 1 \fi
- /TilingType 1
- /BBox [\pgf@sys@tonumber\pgf@xa\space\pgf@sys@tonumber\pgf@ya\space\pgf@sys@tonumber\pgf@xb\space\pgf@sys@tonumber\pgf@yb]
- /XStep \pgf@sys@tonumber\pgf@xc\space
- /YStep \pgf@sys@tonumber\pgf@yc\space
- /Resources << >>
- }
- {#8}%
- \pgf@sys@pdf@addtopageresources@patterns{/pgfpat#1\space \the\pdflastobj\space 0 R}%
-}
-
-\def\pgfsys@setpatternuncolored#1#2#3#4{%
- \pgfsysprotocol@literal{/pgfprgb cs #2 #3 #4 /pgfpat#1\space scn}%
-}
-
-\def\pgfsys@setpatterncolored#1{%
- \pgfsysprotocol@literal{/Pattern cs /pgfpat#1\space scn}%
-}
-
-
-\def\pgfsys@papersize#1#2{%
- \pdfpageheight#2%
- \pdfpagewidth#1}
-
-
- % 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}
-
-
-
-%
-% Position tracking
-%
-\def\pgfsys@markposition#1{%
- \pdfsavepos%
- \edef\pgf@temp{#1}%
- \expandafter\write\expandafter\pgfutil@auxout\expandafter{%
- \expandafter\noexpand\expandafter\pgfsyspdfmark\expandafter{\pgf@temp}{\the\pdflastxpos}{\the\pdflastypos}}%
-}
-
-\def\pgfsyspdfmark#1#2#3{%
- \expandafter\gdef\csname pgf@sys@pdf@mark@pos@#1\endcsname{\pgfqpoint{#2sp}{#3sp}}%
-}
-
-\def\pgfsys@getposition#1#2{%
- \edef\pgf@marshal{\let\noexpand#2=\expandafter\noexpand\csname pgf@sys@pdf@mark@pos@#1\endcsname}%
- \pgf@marshal%
-}
-
-\def\pgf@sys@pdf@mark@pos@pgfpageorigin{\pgfpointorigin}
-
-
-
-\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
deleted file mode 100644
index f332a046031..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def
+++ /dev/null
@@ -1,189 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-tex4ht.def,v 1.15 2007/06/07 07:41:11 tantau Exp $
-
-
-\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%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \pgfsysprotocol@flushcurrentprotocol%
- \HCode{<object data="\jobname-\the\pgf@sys@svg@picnum.svg"
- width="}%
- % Calculate pixel coordinates (this does not really make sense, but
- % we have to do it anyway). Assume 96dpi.
- \pgf@x=1.3333333\pgf@x%
- \pgf@y=1.3333333\pgf@y%
- % Add one pixel for security:
- \advance\pgf@x by1pt%
- \advance\pgf@y by1pt%
- \pgf@sys@pt\pgf@x%
- \pgfsysprotocol@flushcurrentprotocol%
- \pgfsys@invoke{" height="}%
- \pgf@sys@pt\pgf@y%
- \pgfsysprotocol@flushcurrentprotocol%
- \pgfsys@invoke{" type="image/svg+xml"><p>SVG-Viewer needed.</p></object>}%
- \special{t4ht>\jobname-\the\pgf@sys@svg@picnum.svg}%
- \pgfsys@invoke{<svg xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink" width="\the\pgf@xc"
- height="\the\pgf@yc" viewBox="}%
- \pgf@sys@pt{\pgf@xa}\pgf@sys@pt{\pgf@ya}\pgf@sys@pt{\pgf@xc}\pgf@sys@pt{\pgf@yc}%
- \pgfsysprotocol@flushcurrentprotocol%
- \pgf@ya=-\pgf@ya%
- \pgfsys@invoke{">\Hnewline <g transform="translate(0,}
- \pgf@sys@pt\pgf@yb\pgfsysprotocol@flushcurrentprotocol%
- \pgfsys@invoke{) scale(1,-1) translate(0,}%
- \pgf@sys@pt\pgf@ya\pgfsysprotocol@flushcurrentprotocol%
- \pgfsys@invoke{)">\Hnewline }%
- \pgfmathsetlength\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\pgfutil@empty%
- \pgfsetfillcolor{.}%
- \else%
- \pgfsetfillcolor{\tikz@textcolor}%
- \fi%
- \fi% tweak for TikZ
- \HCode{<text
- style="stroke:none"
- transform="scale(1,-1) translate(\pgf@sys@tonumber{\pgf@x},0)"
- text-anchor="middle"
- }%
- \ifx\f@size\pgfutil@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\pgfutil@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-textures.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-textures.def
deleted file mode 100644
index 2239a0166ec..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-textures.def
+++ /dev/null
@@ -1,87 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-textures.def,v 1.4 2006/10/11 15:22:26 tantau Exp $
-
-
-% Driver commands for textures driver
-
-
-\def\pgfsys@invoke#1{\special{rawpostscript #1}}
-\def\pgf@sys@postscript@header#1{\special{prepostscript #1}}
-\def\pgf@sys@postscript@object#1{\special{rawpostscript #1}}
-
-
-%
-% Load common postscript commands:
-%
-\input pgfsys-common-postscript.def
-
-
-%
-% textures-specific stuff:
-%
-
-\def\pgfsys@beginpicture{%
- \special{rawpostscript save}%
- \special{rawpostscript save pgfgetcoords}%
- \special{postscript}% here come the coordinates
- \special{rawpostscript restore}%
- \special{rawpostscript pgfbeginpicture}}
-\def\pgfsys@endpicture{\special{rawpostscript restore}}
-\def\pgfsys@hbox#1{%
- \pgfsys@invoke{save pgfbeginhbox}%
- \wd#1=0pt%
- \ht#1=0pt%
- \dp#1=0pt%
- \box#1%
- \pgfsys@invoke{restore}%
-}
-\def\pgfsys@begininvisible{%
- \special{rawpostscript gsave nulldevice}%
-}
-\def\pgfsys@endinvisible{%
- \special{rawpostscript grestore}%
-}
-\def\pgfsys@color@unstacked#1{\special{rawpostscript \XC@usecolor{#1}}}
-
-\def\pgfsys@imagesuffixlist{epsi:eps:ps}
-
-\AtBeginDocument{
- % Always present specials.
- \special{prepostscript
- /pgfsc{}bind def% stroke color is empty by default
- /pgffc{}bind def% fill color is empty by default
- /pgfe{moveto dup 0 rlineto exch 0 exch rlineto neg 0 rlineto closepath}bind def% rectangle
- /pgfstr{stroke}bind def%
- /pgffill{fill}bind def%
- /pgfeofill{eofill}bind def%
- /pgfw{setlinewidth}bind def% setlinewidth
- /pgfgetcoords{/sps{globaldict begin /pgfgy exch def /pgfgx exch def
- end pop pop}def/eps{}def userdict begin}bind def
- /pgfbeginpicture{/pgfx pgfgx def /pgfy pgfgy def pgfx pgfy translate 1 1 72.27 72 div mul2 neg scale}bind def
- /pgfbeginhbox{1 1 72 72.27 div mul2 neg scale
- pgfx neg pgfy neg translate
- pgffoa .setopacityalpha}bind def% save
- /.setopacityalpha where {pop} {/.setopacityalpha{pop}def} ifelse % install .setopacityalpha
- /.pgfsetfillopacityalpha{/pgffoa exch def
- /pgffill{gsave pgffoa .setopacityalpha fill 1 .setopacityalpha newpath fill grestore}bind def
- /pgfeofill{gsave pgffoa .setopacityalpha eofill1 .setopacityalpha newpath eofill grestore}bind def}bind def
- /.pgfsetstrokeopacityalpha{/pgfsoa exch def
- /pgfstr{gsave pgfsoa .setopacityalpha stroke grestore}bind def}bind def
- /pgffoa 1 def
- /pgfsoa 1 def
- }
-}
-
-\endinput
-
-%%% Local Variables:
-%%% mode: latex
-%%% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def
deleted file mode 100644
index 06fdc4fe187..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def
+++ /dev/null
@@ -1,99 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-vtex.def,v 1.7 2006/10/16 22:32:59 tantau Exp $
-
-
-% Driver commands for vtex
-
-% Invoking things:
-\def\pgfsys@invoke#1{\special{pS: grestore #1 gsave}} % to protect against things happeing in between
-\def\pgfsys@outerinvoke#1{\special{pS: #1}}
-\def\pgf@sys@postscript@header#1{\special{pS: #1}}
-\def\pgf@sys@postscript@object#1{\special{pS: #1}}
-
-
-%
-% Load common postscript commands:
-%
-\input pgfsys-common-postscript.def
-
-
-%
-% vtex-specific stuff:
-%
-
-
-% Starting and ending a picture:
-\def\pgfsys@beginpicture{\special{pS:
- save
- /pgfx currentpoint /pgfy exch def def
- currentpoint translate
- gsave}%
- \let\set@color=\pgf@sys@vtex@set@color%
- \let\reset@color=\pgf@sys@vtex@reset@color%
-}
-\def\pgf@sys@vtex@setcolor#1{%
- \pgfutil@colorlet{pgf@tempcolor}{#1}%
- \pgfutil@ifundefined{applycolormixins}{}{\applycolormixins{pgf@tempcolor}}%
- \expandafter\expandafter\expandafter\pgf@sys@vtex@@setcolor\csname\string\color@pgf@tempcolor\endcsname%
-}
-\def\pgf@sys@vtex@@setcolor#1#2#3#4#5{%
- \pgfsysps@color@resetnow%
- \expandafter\ifx\csname pgfsys@color@#4\endcsname\relax%
- \PackageError{pgfbase}{Unsupported color model `#4'. Sorry}{}%
- \else%
- \edef\pgf@colmarshal{\expandafter\noexpand\csname pgfsys@color@#4\endcsname}%
- \pgf@uncomma#5,,%
- \pgf@colmarshal%
- \fi}
-\def\pgf@sys@vtex@set@color{\pgf@sys@vtex@setcolor{.}\aftergroup\reset@color}
-\def\pgf@sys@vtex@reset@color{\pgf@sys@vtex@setcolor{.}}
-\def\pgfsys@endpicture{\special{pS:
- newpath
- grestore
- newpath
- restore}}
-
-% Graphics:
-\def\pgfsys@imagesuffixlist{epsi:eps:ps:pdf}
-
-% Starting and ending a box:
-\def\pgfsys@hbox#1{%
- \pgfsys@invoke{save pgfx neg pgfy neg translate}%
- \wd#1=0pt%
- \ht#1=0pt%
- \dp#1=0pt%
- \box#1
- \pgfsys@invoke{restore}%
-}
-
-\def\pgfsys@color@unstacked#1{\special{pS: \XC@usecolor{#1}}}
-
-\def\pgfsys@fill@opacity#1{\pgf@sys@fail{opacity}}
-\def\pgfsys@stroke@opacity#1{\pgf@sys@fail{opacity}}
-
-\AtBeginDocument{
- % Always present specials.
- \special{pS:
- /pgfsc{} bind def% stroke color is empty by default
- /pgffc{} bind def% fill color is empty by default
- /pgfstr{stroke} bind def%
- /pgffill{fill} bind def%
- /pgfeofill{eofill} bind def%
- /pgfe{moveto dup 0 rlineto exch 0 exch rlineto neg 0 rlineto closepath} bind def% rectangle
- /pgfw{setlinewidth} bind def % setlinewidth
- }
-}
-
-\endinput
-
-%%% Local Variables:
-%%% mode: latex
-%%% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def
new file mode 100644
index 00000000000..08a26fdcef0
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def
@@ -0,0 +1,40 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-xetex.def,v 1.1 2007/12/17 14:52:31 tantau Exp $
+
+% Driver commands for dvipdfm
+
+%
+% Load common pdf and pdf in dvi commands:
+%
+\input pgfsys-common-pdf.def
+\input pgfsys-common-pdf-via-dvi.def
+
+%
+% dvipdfm-specific stuff:
+%
+\ifx\XeTeXversion\@undefined
+ \PackageError{pgfsys}{XeTeX is not running, but it should. Somehow
+ the wrong driver got selected}{}
+\fi
+
+
+%
+% Position tracking always on
+%
+\pgf@sys@pdf@dvi@tracker
+
+
+
+\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
deleted file mode 100644
index 37d370990ba..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
+++ /dev/null
@@ -1,866 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys.code.tex,v 1.24 2007/06/07 07:41:11 tantau Exp $
-
-
-%
-% 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
-
-% internal counters that are alwyas present when pgfsys is loaded
-\newcount\c@pgf@counta
-\newcount\c@pgf@countb
-\newcount\c@pgf@countc
-\newcount\c@pgf@countd
-
-
-% 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\pgfutil@empty%
- \else%
- \expandafter\global\expandafter\let\csname pgf@sys@fail@#1\endcsname=\pgfutil@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 \pgfutil@color command. Thus, each \pgfutil@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 \pgfutil@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 \pgfutil@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 \pgfutil@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.
-
-
-
-
-
-%
-%
-% Pattern stuff
-%
-%
-
-\def\pgfsys@declarepattern#1#2#3#4#5#6#7#8#9{\pgf@sys@fail{patterns}}
-% This command declares a new colored or uncolored pattern. Uncolored
-% patterns have no inherent color, the color is provided when they are
-% set. Colored patters have an inherent color.
-% #1 = name of the pattern (must be a plain suffix for use in
-% postscript/pdf/etc.)
-% #2 to #5 = four coordinates describing the corners of a bounding box
-% of pattern cells
-% #6 = x-step
-% #7 = y-step
-% #8 = pattern code
-% #9 = 0 if uncolored patter, 1 if colored pattern.
-
-\def\pgfsys@setpatternuncolored#1#2#3#4{\pgf@sys@fail{patterns}}
-% Sets an uncolored pattern #1 as filling color. The numbers #2, #3,
-% #4 must be an rgb-value to be used as the color of the pattern.
-
-\def\pgfsys@setpatterncolored#1{\pgf@sys@fail{patterns}}
-% Sets an colored pattern #1 as filling color.
-
-
-%
-%
-% Page size stuff
-%
-%
-\def\pgfsys@papersize#1#2{\pgf@sys@fail{papersize}}
-% This command sets the paper size in a portable way.
-% #1 = width
-% #2 = height
-
-
-
-%
-%
-% Position tracking commands
-%
-%
-
-% Marks the current position on the page. This position can later be
-% referenced using \pgfsys@getposition
-\def\pgfsys@markposition#1{\pgf@sys@fail{marking the current position}}
-
-% Sets #2 to a pgfpoint macro that returns the position #1 is
-% returned in a coordinate system where the x-axis goes right and the
-% y-axis goes up. The origin of this coordinate system may or may not
-% lie in the lower left corner; you should shift the coordinate system
-% to the position "pgfpageorigin" to make sure that the origin is at
-% the lower left corner. Typically, getting this position
-% requires two runs of TeX. On the first run, the macro will be set to
-% \relax, indicating that the position is not available.
-%
-% If #1 is set to the special position "pgfpageorigin", the position
-% of the the lower left page corner is returned.
-
-\def\pgfsys@getposition#1#2{\let#2=\relax}
-
-
-
-%
-%
-% Commands having a default implementation. These commands only need
-% not be implemented by drivers if this results in a better
-% preformance.
-%
-%
-
-
-\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.
-
-
-
-
-
-\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%
- \setbox#1=\hbox{\box#1}%
- \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
-% coordinate 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{%
- \pgfmathsetlength\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\pgfutil@empty\else\edef\pgf@imagewidth{width=\pgf@imagewidth,}\fi%
- \ifx\pgf@imageheight\pgfutil@empty\else\edef\pgf@imageheight{height=\pgf@imageheight,}\fi%
- \ifx\pgf@imagepage\pgfutil@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\pgfutil@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\pgfutil@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.
-
-
-\def\pgfsys@atbegindocument{}
-% This command will be executed at the begin of the document. If for
-% whatever reason this is not done, you may wish to execute this
-% command yourself. It will setup certain specials that need to be
-% inserted into the resulting .pdf/.ps/.xxx file.
-
-
-
-
-
-% Discern the driver:
-\input pgf.cfg
-
-\PackageInfo{pgfsys}{Driver file for pgf: \pgfsysdriver}
-\pgfutil@InputIfFileExists{\pgfsysdriver}{}{%
- \PackageError{pgfsys}{Driver file ``\pgfsysdriver'' not found.}{}}
-
-
-
-% This will insert always-present-specials at the beginning of the
-% code.
-\AtBeginDocument{
- \pgfsys@atbegindocument
- \let\pgfsys@atbegindocument=\pgfutil@empty
-}
-
-
-
-% Read aux file in plain and context mode:
-
-\pgfutil@aux@read@hook
-
-
-\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
deleted file mode 100644
index b34ae3bcdc7..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
+++ /dev/null
@@ -1,70 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsysprotocol.code.tex,v 1.4 2006/10/16 22:32:59 tantau Exp $
-
-
-
-% 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=\pgfutil@empty
-\newif\ifpgfsysprotocol@buffered
-
-
-% Add to the protocol buffered
-\def\pgfsysprotocol@literalbuffered#1{%
- \edef\pgfsysprotocol@temp{{#1\space}}%
- \expandafter\pgfutil@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\pgfutil@empty%
- \else%
- \expandafter\pgfsys@invoke\expandafter{\pgfsysprotocol@currentprotocol}%
- \fi%
-}
-
-\def\pgfsysprotocol@flushcurrentprotocol{%
- \pgfsysprotocol@invokecurrentprotocol%
- \pgfsysprotocol@setcurrentprotocol\pgfutil@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
deleted file mode 100644
index 943da39770c..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
+++ /dev/null
@@ -1,136 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsyssoftpath.code.tex,v 1.5 2007/02/19 13:18:57 tantau Exp $
-
-
-% 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=\pgfutil@empty
-% The current path
-
-\def\pgfsyssoftpath@lastmoveto{{0pt}{0pt}}
-
-\newif\ifpgfsyssoftpathmovetorelevant
-\pgfsyssoftpathmovetorelevanttrue
-
-% Add a moveto element to the current path
-\def\pgfsyssoftpath@moveto#1#2{%
- \edef\pgfsyssoftpath@temp{{%
- \noexpand\pgfsyssoftpath@movetotoken{#1}{#2}%
- }}%
- \expandafter\pgfutil@g@addto@macro\expandafter\pgfsyssoftpath@currentpath\pgfsyssoftpath@temp%
- \ifpgfsyssoftpathmovetorelevant%
- \xdef\pgfsyssoftpath@lastmoveto{{#1}{#2}}%
- \fi%
-}
-
-% Add a lineto element to the current path
-\def\pgfsyssoftpath@lineto#1#2{%
- \edef\pgfsyssoftpath@temp{{%
- \noexpand\pgfsyssoftpath@linetotoken{#1}{#2}%
- }}%
- \expandafter\pgfutil@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\pgfutil@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\pgfutil@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\pgfutil@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\pgfutil@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\pgfutil@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=\pgfutil@gobbletwo
-
-
-\endinput
-
-%%% Local Variables:
-%%% mode: latex
-%%% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex
deleted file mode 100644
index 1542ac71204..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex
+++ /dev/null
@@ -1,723 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgfcalendar.code.tex,v 1.9 2007/05/31 10:31:52 tantau Exp $
-
-
-% Translation stuff
-
-\ifx\translate\@undefined
- \def\translate#1{#1}
-\fi
-
-% Load month dictionary, if possible
-
-\ifx\usedictionary\@undefined
-\else
- \usedictionary{translator-months-dictionary}
-\fi
-
-
-
-
-% Typeset a calendar
-%
-% #1 = prefix for the calendar nodes
-% #2 = begin date in ISO format
-% #3 = end date in ISO format
-% #4 = date rendering code
-%
-% Description:
-%
-% First note that this macro need not be called inside a pgfpicture
-% (even though it often will be). You can use it to typeset
-% calendars also using packages other than pgf. You do not even need
-% to load pgf to use this file.
-%
-% A calendar is typeset as follows: You specify a range of dates (by
-% providing a begin and an end date). Then, for each date the code #4
-% is executed. When the code is called, lots of information about the
-% current date (like its day of week) is available. The job of
-% #4 is to render the date. Typically, this is done by placing nodes
-% somewhere, but the function could do other things as well.
-% It is also the job of #4 to position the calendar correctly.
-%
-% The different calls of #4 are not surrounded by TeX groups (though
-% you can do so yourself, of course). This means that settings can
-% accumulate between different calls, which is often desirable and
-% useful.
-%
-% Inside #4 code, different macros can be access:
-%
-% \pgfcalendarprefix
-% The parameter #1. This prefix is recomended for nodes inside the
-% calendar, but you have to use it yourself explicitly.
-%
-% \pgfcalendarbeginiso
-% Start date of range being typeset in ISO format (like 2006-01-10)
-%
-% \pgfcalendarbeginjulian
-% Julian day number of start date begin typeset
-%
-% \pgfcalendarendiso
-% End date of range begin typeset
-%
-% \pgfcalendarendjulian
-% Same as Julian day number
-%
-% \pgfcalendarcurrentjulian (a TeX-count)
-% Julian day number of day to be rendered/considered
-%
-% \pgfcalendarcurrentweekday
-% Weekday (0 = Monday) of day to be checked
-%
-% \pgfcalendarcurrentyear
-% Year of day to be checked
-%
-% \pgfcalendarcurrentmonth
-% Month of day to be chjeck
-%
-% \pgfcalendarcurrentday
-% Day of monath of day to be checked
-%
-%
-% Inside the \pgfcalendar macro the macro \ifdate is available, which
-% has the same effect as \pgfcalendarifdate{\pgfcalendarcurrentjulian}
-% (only faster). This means that you
-% can write, say, \ifdate{Monday}{current date is a Monday}{Not a Monday}.
-%
-% Example:
-%
-% \begin{tikzpicture}
-% \pgfcalendar{cal}{2007-01-20}{2007-02-10}
-% {\node[anchor=base] {\pgfcalendaronday}; \pgftransformyshift{-1.5em}}
-% \end{tikzpicture}
-%
-% \pgfcalendar{cal}{2007-01-20}{2007-02-10}{ \pgfcalendaronday\ }
-
-\long\def\pgfcalendar#1#2#3#4{%
- \begingroup%
- % Setup local \ifdate
- \let\ifdate=\pgfcalendar@local@ifdate%
- % Let's start with computing start and end dates...
- \def\pgfcalendarprefix{#1}%
- \pgfcalendardatetojulian{#2}{\pgfcalendarcurrentjulian}%
- \edef\pgfcalendarbeginjulian{\the\pgfcalendarcurrentjulian}%
- \edef\pgfcalendarbeginiso{#2}%
- \pgfcalendardatetojulian{#3}{\pgfutil@tempcnta}%
- \edef\pgfcalendarendjulian{\the\pgfutil@tempcnta}%
- \advance\pgfutil@tempcnta by1\relax%
- \edef\pgfcalendarendjulianplus{\the\pgfutil@tempcnta}%
- \edef\pgfcalendarendiso{#3}%
- %
- % Start main loop
- %
- \loop%
- \ifnum\pgfcalendarcurrentjulian<\pgfcalendarendjulianplus\relax%
- % Setup information about current date
- \pgfcalendarjuliantodate{\pgfcalendarcurrentjulian}%
- {\pgfcalendarcurrentyear}{\pgfcalendarcurrentmonth}{\pgfcalendarcurrentday}%
- \pgfcalendarjuliantoweekday{\pgfcalendarcurrentjulian}{\pgfutil@tempcntb}%
- \edef\pgfcalendarcurrentweekday{\the\pgfutil@tempcntb}%
- % Render:
- #4%
- % Advance day:
- \advance\pgfcalendarcurrentjulian by1\relax%
- \repeat%
- \endgroup%
-}
-
-\newcount\pgfcalendarcurrentjulian
-
-\def\pgfcalendar@local@ifdate{%
- \let\pgfcalendarifdatejulian=\pgfcalendarcurrentjulian%
- \let\pgfcalendarifdateyear=\pgfcalendarcurrentyear%
- \let\pgfcalendarifdatemonth=\pgfcalendarcurrentmonth%
- \let\pgfcalendarifdateday=\pgfcalendarcurrentday%
- \let\pgfcalendarifdateweekday=\pgfcalendarcurrentweekday%
- \pgfcalendar@launch@ifdate%
-}
-
-
-
-% Execute on specific kinds of dates
-%
-% #1 = ISO-format date
-% #2 = date specification
-% #3 = code
-%
-% Description:
-%
-% The given code #3 is execute on every day that matches the date
-% specification #2. This specification is a comma-separated list of
-% key-value pairs of the kind pgfcalendar, defined in the usual way
-% using \define@key. The code for a key-value should check whether the
-% given day matches its specification. If so, it should set
-% \pgfcalendarmatches to true.
-%
-% When the key-value code is executed, the following macros will have
-% been setup:
-%
-% \pgfcalendarifdatejulian
-% Julian day number of day to be checked
-%
-% \pgfcalendarifdateweekday
-% Weekday (0 = Monday) of day to be checked
-%
-% \pgfcalendarifdateyear
-% Year of day to be checked
-%
-% \pgfcalendarifdatemonth
-% Month of day to be chjeck
-%
-% \pgfcalendarifdateday
-% Day of month of day to be checked
-%
-% The setting of these macros will persist after the call, so a
-% sideeffect of callling this macro is to setup these macros.
-%
-% By setting \ifpgfcalendar@do@not@recompute to false, the computation
-% of the year, month etc. is suppressed.
-%
-% Examples:
-%
-% \pgfcalendarifdate{2007-01-10}{all}{}
-% % Simply setup the macros
-%
-% \pgfcalendarifdate{2007-01-10}{mondays}{Is a monday}
-%
-% \pgfcalendarifdate{\mydate}{date=05-01}{\mydate is a Worker's Day}
-
-\def\pgfcalendarifdate#1#2#3#4{%
- \pgfcalendardatetojulian{#1}{\pgfutil@tempcnta}%
- \pgfcalendarjuliantodate{\pgfutil@tempcnta}
- {\pgfcalendarifdateyear}{\pgfcalendarifdatemonth}{\pgfcalendarifdateday}%
- \edef\pgfcalendarifdatejulian{\the\pgfutil@tempcnta}%
- % Compute info about date
- \pgfcalendarjuliantoweekday{\pgfutil@tempcnta}{\pgfutil@tempcntb}%
- \edef\pgfcalendarifdateweekday{\the\pgfutil@tempcntb}%
- %
- \pgfcalendar@launch@ifdate{#2}{#3}{#4}%
-}
-
-
-\long\def\pgfcalendar@launch@ifdate#1#2#3{%
- % When this macro is called, the pgfcalendarifdatexxxx macros must
- % be setup correctly
- %
- % Set match to false
- \pgfcalendarmatchesfalse%
- \setkeys{pgfcalendar}{#1}% cleanup and change to \pgfutil@setkeys
- \ifpgfcalendarmatches%
- #2%
- \else%
- #3%
- \fi%
-}
-
-\newif\ifpgfcalendarmatches
-
-
-% Keys for matching
-
-\define@key{pgfcalendar}{all}[]{\pgfcalendarmatchestrue}
-
-\define@key{pgfcalendar}{Monday}[]{\ifnum\pgfcalendarifdateweekday=0\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{Tuesday}[]{\ifnum\pgfcalendarifdateweekday=1\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{Wednesday}[]{\ifnum\pgfcalendarifdateweekday=2\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{Thursday}[]{\ifnum\pgfcalendarifdateweekday=3\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{Friday}[]{\ifnum\pgfcalendarifdateweekday=4\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{Saturday}[]{\ifnum\pgfcalendarifdateweekday=5\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{Sunday}[]{\ifnum\pgfcalendarifdateweekday=6\relax\pgfcalendarmatchestrue\fi}
-
-\define@key{pgfcalendar}{workday}[]{\ifnum\pgfcalendarifdateweekday<5\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{weekend}[]{\ifnum\pgfcalendarifdateweekday>4\relax\pgfcalendarmatchestrue\fi}
-
-\define@key{pgfcalendar}{equals}{%
- \pgfcalendar@special@datetojulian{#1}%
- \ifnum\pgfcalendarifdatejulian=\pgfutil@tempcnta\relax%
- \pgfcalendarmatchestrue%
- \fi%
-}
-
-\define@key{pgfcalendar}{day of month}{\ifnum#1=\pgfcalendarifdateday\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{end of month}[1]{%
- % Tricky and expensive ... do only if necessary
- \ifpgfcalendarmatches%
- \else% sigh
- {%
- \pgfutil@tempcnta=\pgfcalendarifdatejulian\relax%
- \advance\pgfutil@tempcnta by#1\relax%
- \pgfcalendarjuliantodate{\pgfutil@tempcnta}{\pgf@dummy}{\pgf@dummy}{\pgf@cal@temp}%
- \global\let\pgf@cal@temp=\pgf@cal@temp%
- }%
- \ifnum\pgf@cal@temp=1\relax\pgfcalendarmatchestrue\fi%
- \fi%
-}
-
-\define@key{pgfcalendar}{at least}{%
- \pgfcalendar@special@datetojulian{#1}%
- \ifnum\pgfcalendarifdatejulian<\pgfutil@tempcnta\relax%
- \else%
- \pgfcalendarmatchestrue%
- \fi%
-}
-\define@key{pgfcalendar}{at most}{%
- \pgfcalendar@special@datetojulian{#1}%
- \ifnum\pgfcalendarifdatejulian>\pgfutil@tempcnta\relax%
- \else%
- \pgfcalendarmatchestrue%
- \fi%
-}
-\define@key{pgfcalendar}{between}{%
- \pgfcalendar@between#1\relax%
- \pgfcalendar@special@datetojulian{\pgfcalendar@start}%
- \ifnum\pgfcalendarifdatejulian<\pgfutil@tempcnta\relax%
- \else%
- \pgfcalendar@special@datetojulian{\pgfcalendar@end}%
- \ifnum\pgfcalendarifdatejulian>\pgfutil@tempcnta\relax%
- \else%
- \pgfcalendarmatchestrue%
- \fi%
- \fi%
-}
-
-\def\pgfcalendar@between#1and#2\relax{%
- \def\pgfcalendar@start{#1}%
- \def\pgfcalendar@end{#2}%
-}
-
-
-\def\pgfcalendar@special@datetojulian#1{%
- \edef\pgf@temp{#1}%
- \expandafter\pgfcalendar@special@split@test\pgf@temp-\relax{#1}%
-}
-
-\def\pgfcalendar@special@split@test#1-#2-#3\relax#4{%
- \def\pgf@temp{#3}%
- \ifx\pgf@temp\pgfutil@empty%
- \def\pgf@temp{\pgfcalendarifdateyear-#1-#2}%
- \else%
- \def\pgf@temp{#4}%
- \fi%
- \pgfcalendardatetojulian{\pgf@temp}{\pgfutil@tempcnta}%
-}
-
-
-% Suggested name for nodes inside a calendar
-%
-% Description:
-%
-% It is suggested that (main) nodes (if present) in a calendar should
-% get this name.
-%
-% Example:
-%
-% \pgfcalendar{cal}{2007-01-20}{2007-02-10}{}
-% { \node[anchor=base] (\pgfcalendarsuggestedname) {\pgfcalendarifdateday};
-% \pgftransformyshift{-1.5em} }
-%
-% \draw (cal-2007-01-30) -- (cal-2007-02-08);
-
-\def\pgfcalendarsuggestedname{%
- \ifx\pgfcalendarprefix\pgfutil@empty\else\pgfcalendarprefix-%
- \pgfcalendarcurrentyear-\pgfcalendarcurrentmonth-\pgfcalendarcurrentday\fi%
-}
-
-
-
-%
-%
-% Date conversion functions
-%
-%
-
-
-
-% Convert a date to the Julian day number (number of days since
-% January 1st, -4712)
-%
-% #1 = date specification
-% #2 = counter that should be set to the number of days
-%
-% Description:
-%
-% The conversion is taken from the Wikipedia entry on Julian days.
-%
-% The date specification works as follows:
-%
-% - It starts with a year. Use \year for the current year (the year
-% the file is being typeset).
-% - Next comes a hyphen.
-% - Next comes a month (number). Use \month for the current month.
-% - Next comes a hyphen.
-% - Next comes either a day of month (number, use \day for current
-% day) or "last". The keyword "last" refers the last day of the
-% month. Thus, 2006-01-last is the same as 2006-01-31 and
-% 2000-02-last is the same as 2002-02-29.
-% - Next may come a plus sign, followed by a number (positive or
-% negative). This will adjust the date by the given number of
-% days. Thus, 2006-01-31+1 is the same as 2006-02-01 and
-% 2006-02-01+-2 is the same as 2006-01-30. And \year-\month-day+1 is
-% tomorrow. You may add a space before the +.
-%
-% Example:
-%
-% \pgfcalendardatetojulian{2006-01-10}{\mycount}
-
-\def\pgfcalendardatetojulian#1#2{\edef\pgf@temp{#1}\expandafter\pgfcalendar@datetojulian\pgf@temp+/{#2}}
-\def\pgfcalendar@datetojulian#1-#2-#3+#4/#5{%
- {%
- %
- % Store year, month and days.
- %
- \count1=#1\relax%
- \count2=#2\relax%
- % If #3=="last", then calculate first day of next month
- \edef\pgf@temp{#3}%
- \ifx\pgf@temp\pgfcalendar@last@text%
- \advance\count2 by1\relax%
- \count3=1\relax%
- \else%
- \count3=#3\relax%
- \fi%
- %
- % Store offset
- %
- \edef\pgf@@temp{#4}%
- \ifx\pgf@@temp\pgfutil@empty%
- \count8=0\relax%
- \else%
- \pgfcalendar@unpack#4%
- \fi%
- %
- %
- % 4) a = \lfloor (14-month) /12 \rfloor
- %
- \ifnum\count2<3\relax%
- \count4=1\relax%
- \else%
- \count4=0\relax%
- \fi%
- %
- % 5) y = year + 4800 - a
- %
- \count5=\count1\relax%
- \advance\count5 by 4800\relax%
- \advance\count5 by-\count4\relax%
- %
- % 6) m = month + 12a - 3
- %
- \count6=\count2\relax%
- \count0=\count4\relax%
- \multiply\count0 by12\relax
- \advance\count6 by\count0\relax%
- \advance\count6 by-3\relax%
- %
- % 7) jdn = day + \floor{(153 m+2)/5} + 365y + \floor{y/4} -
- % \floor{y/100} + \florr{y/400} - 32045
- %
- \count7=\count3\relax%
- % + \floor{(153 m+2)/5} :
- \count0=\count6\relax%
- \multiply\count0 by 153\relax%
- \advance\count0 by 2\relax%
- \divide\count0 by 5\relax%
- \advance\count7 by \count0\relax%
- % + 365y :
- \count0=\count5%
- \multiply\count0by365\relax%
- \advance\count7 by\count0\relax%
- % + \floor{y/4}
- \count0=\count5\relax%
- \divide\count0 by 4\relax%
- \advance\count7 by\count0%
- % - \floor{y/100}
- \count0=\count5\relax%
- \divide\count0 by 100\relax%
- \advance\count7 by-\count0\relax%
- % + \floor{y/400}
- \count0=\count5\relax%
- \divide\count0 by 400\relax%
- \advance\count7 by\count0%
- % - 32045
- \advance\count7 by-32045\relax%
- %
- % Undo "last" advance
- \ifx\pgf@temp\pgfcalendar@last@text%
- \advance\count7by-1\relax%
- \fi%
- % Add offset
- \advance\count7by\count8\relax%
- \xdef\pgf@temp{\the\count7}%
- }%
- #5=\pgf@temp\relax%
-}
-\def\pgfcalendar@last@text{last}
-\def\pgfcalendar@unpack#1+{%
- \count8=#1\relax%
-}
-
-% Convert Julian day number date.
-%
-% #1 = the number of Julian days
-% #2 = a macro in which the year should be stored.
-% #3 = a macro in which the month should be stored.
-% #4 = a macro in which the day should be stored.
-%
-% Formula used:
-%
-% 1) J = Julian day number
-% 2) j = J + 32044
-% 3) g = j div 146097
-% 4) dg = j mod 146097
-% 5) c = (dg div 36524 + 1) * 3 div 4
-% 6) dc = dg - c * 36524
-% 7) b = dc div 1461
-% 8) db = dc mod 1461
-% 9) a = (db div 365 + 1) * 3 div 4
-% 10)da = db - a * 365
-% 11)y = g * 400 + c * 100 + b * 4 + a
-% 12)m = (da * 5 + 308) div 153 - 2
-% 13)d = da - (m + 4) * 153 div 5 + 122
-% 14)Y = y - 4800 + (m + 2) div 12
-% 15)M = (m + 2) mod 12 + 1
-% 16)D = d + 1
-%
-% Example
-%
-% \pgfcalendarjuliantodate{\mynumber}{\myyear}{\mymonth}{\myday}
-
-\def\pgfcalendarjuliantodate#1#2#3#4{%
- {%
- % 1) J = Julian day number
- \count1=#1\relax%
- % 2) j = J + 32044
- \count2=\count1\relax%
- \advance\count2 by 32044\relax%
- % 3) g = j div 146097
- \count3=\count2\relax%
- \divide\count3 by 146097\relax%
- % 4) dg = j mod 146097
- \count4=\count3\relax%
- \multiply\count4 by-146097\relax%
- \advance\count4 by\count2\relax%
- % 5) c = (dg div 36524 + 1) * 3 div 4
- \count5=\count4\relax%
- \divide\count5 by36524\relax%
- \advance\count5 by1\relax%
- \multiply\count5 by3\relax%
- \divide\count5 by4\relax%
- % 6) dc = dg - c * 36524
- \count6=\count4\relax%
- \count0=\count5\relax%
- \multiply\count0 by-36524\relax%
- \advance\count6 by\count0\relax%
- % 7) b = dc div 1461
- \count7=\count6\relax%
- \divide\count7 by1461\relax%
- % 8) db = dc mod 1461
- \count8=\count7\relax%
- \multiply\count8 by-1461\relax%
- \advance\count8 by\count6\relax%
- % 9) a = (db div 365 + 1) * 3 div 4
- \count9=\count8\relax%
- \divide\count9 by 365\relax%
- \advance\count9 by 1\relax%
- \multiply\count9 by3\relax%
- \divide\count9 by4\relax%
- % 10)da = db - a * 365
- \count10=\count8\relax%
- \count0=\count9\relax%
- \multiply\count0 by-365\relax%
- \advance\count10 by\count0\relax%
- % 11)y = g * 400 + c * 100 + b * 4 + a
- \count11=\count3\relax%
- \multiply\count11 by400\relax%
- \count0=\count5\relax%
- \multiply\count0 by100\relax%
- \advance\count11 by\count0\relax%
- \count0=\count7\relax%
- \multiply\count0 by4\relax%
- \advance\count11 by\count0\relax%
- \advance\count11 by\count9\relax%
- % 12)m = (da * 5 + 308) div 153 - 2
- \count12=\count10\relax%
- \multiply\count12 by5\relax%
- \advance\count12 by 308\relax%
- \divide\count12 by 153\relax%
- \advance\count12 by -2\relax%
- % 13)d = - (m + 4) * 153 div 5 + 122 + da
- \count13=\count12\relax%
- \advance\count13 by 4\relax%
- \multiply\count13 by153\relax%
- \divide\count13 by5\relax%
- \count13=-\count13\relax%
- \advance\count13 by 122\relax%
- \advance\count13 by \count10\relax%
- % 14)Y = (m + 2) div 12 + y - 4800
- \count14=\count12\relax%
- \advance\count14 by 2\relax%
- \divide\count14 by12\relax%
- \advance\count14 by\count11\relax%
- \advance\count14 by-4800\relax%
- % 15)M = (m + 2) mod 12 + 1
- \count15=\count12\relax%
- \advance\count15 by2\relax%
- \count0=\count15\relax%
- \divide\count0 by12\relax%
- \multiply\count0 by12\relax%
- \advance\count15 by-\count0\relax%
- \advance\count15 by1\relax%
- % 16)D = d + 1
- \count16=\count13%
- \advance\count16by 1\relax%
- %
- \xdef\pgf@temp@year{\the\count14}%
- \xdef\pgf@temp@month{\ifnum\count15<10 0\fi\the\count15}%
- \xdef\pgf@temp@day{\ifnum\count16<10 0\fi\the\count16}%
- }%
- \let#2=\pgf@temp@year%
- \let#3=\pgf@temp@month%
- \let#4=\pgf@temp@day%
-}
-
-
-
-% Returns the day of week as a number between 0 = Monday and 6 =
-% Sunday
-%
-% #1 = a Julian day number
-% #2 = a counter into which the weekday should be put.
-%
-% Example:
-%
-% \pgfcalendardatetojulian{2006-01-10}{\mycount}
-% \pgfcalendarjuliantoweekday{\mycount}{\myweekday}
-
-\def\pgfcalendarjuliantoweekday#1#2{%
- {%
- \pgfutil@tempcnta=#1\relax%
- #2=\pgfutil@tempcnta%
- \divide#2by7\relax%
- \multiply#2by-7\relax%
- \advance#2by\pgfutil@tempcnta\relax%
- \xdef\pgf@temp{\the#2}%
- }%
- #2=\pgf@temp\relax%
-}
-
-
-
-% Converts a day of week into a weekday name (long or short)
-%
-% #1 = a number representing a weekday (0=Monday)
-%
-% Example:
-%
-% \pgfcalendardatetojulian{2006-01-10}{\mycount}
-% \pgfcalendarjuliantoweekday{\mycount}{\myweekday}
-% October 1st, 2006 was a \pgfcalendarweekdayname{\myweekday}
-
-\def\pgfcalendarweekdayname#1{%
- \translate{\ifcase#1Monday\or Tuesday\or Wednesday\or Thursday\or Friday\or Saturday\or Sunday\fi}%
-}
-
-\def\pgfcalendarweekdayshortname#1{%
- \translate{\ifcase#1Mon\or Tue\or Wed\or Thu\or Fri\or Sat\or Sun\fi}%
-}
-
-
-% Converts a month of year number into a month name (long or short)
-%
-% #1 = a number representing a month (1=January)
-%
-% Example:
-%
-% \pgfcalendarmonthname
-
-\def\pgfcalendarmonthname#1{%
- \translate{\ifcase#1\or January\or February\or March\or April\or
- May\or June\or July\or August\or September\or October\or
- November\or December\fi}%
-}
-
-\def\pgfcalendarmonthshortname#1{%
- \translate{\ifcase#1\or Jan\or Feb\or Mar\or Apr\or
- May\or Jun\or Jul\or Aug\or Sep\or Oct\or
- Nov\or Dec\fi}%
-}
-
-
-
-
-
-
-% Macro for easy typesetting of days, etc.
-%
-% #1 = kind selection
-% #2 = length and representation selection
-%
-% Description:
-%
-% Replaces the shorthand according to the following rules: The
-% first letter of the shorthand describes the kind of
-% shorthand. Possible kinds are:
-%
-% d = day of current date (in an invocation of \pgfcalendar)
-% m = month of current date
-% y = year of current date
-% w = week day of current date
-%
-% The second parameter determines how the kind is represented:
-%
-% - = shortest possible numerical way (allowed only for d, m, y)
-% = = same, but always of the same length (padded with blanks as
-% needed, allowed only for d, m, y)
-% 0 = numerical representation for d and m padded with leading zeros.
-% t = textual representation (allowed only for d, m, w)
-% . = abbreviated textual representation (allowed only for d, m, w)
-%
-% It is adivsed that you say, for example,
-% \let\%=\pgfcalendarshorthand.
-%
-% With this setting, you can typeset an ISO-date by saying \%y0-\%m0-\%d0.
-% For another example, on 2007-02-09, which is a
-% Friday, you can write "\%wt, \%mt \%d-, \%y0" to get "Friday, February 9, 2007"
-
-\def\pgfcalendarshorthand#1#2{\csname pgfcalendar@shorthand@#1#2\endcsname}
-\expandafter\def\csname pgfcalendar@shorthand@d-\endcsname{%
- {\pgfutil@tempcnta=\pgfcalendarcurrentday\relax\the\pgfutil@tempcnta}}
-\expandafter\def\csname pgfcalendar@shorthand@d=\endcsname{%
- {\pgfutil@tempcnta=\pgfcalendarcurrentday\relax\ifnum\pgfutil@tempcnta<10\relax\setbox0=\hbox{1}\kern\wd0\relax\fi\the\pgfutil@tempcnta}}
-\expandafter\def\csname pgfcalendar@shorthand@d0\endcsname{%
- \pgfcalendarcurrentday}
-\expandafter\def\csname pgfcalendar@shorthand@m-\endcsname{%
- {\pgfutil@tempcnta=\pgfcalendarcurrentmonth\relax\the\pgfutil@tempcnta}}
-\expandafter\def\csname pgfcalendar@shorthand@m=\endcsname{%
- {\pgfutil@tempcnta=\pgfcalendarcurrentmonth\relax\ifnum\pgfutil@tempcnta<10\relax\setbox0=\hbox{1}\kern\wd0\relax\fi\the\pgfutil@tempcnta}}
-\expandafter\def\csname pgfcalendar@shorthand@m0\endcsname{%
- \pgfcalendarcurrentmonth}
-\expandafter\def\csname pgfcalendar@shorthand@y-\endcsname{%
- \pgfcalendarcurrentyear}
-\expandafter\def\csname pgfcalendar@shorthand@y=\endcsname{%
- \pgfcalendarcurrentyear}
-\expandafter\def\csname pgfcalendar@shorthand@y0\endcsname{%
- \pgfcalendarcurrentyear}
-\expandafter\def\csname pgfcalendar@shorthand@w.\endcsname{%
- \pgfcalendarweekdayshortname{\pgfcalendarcurrentweekday}}
-\expandafter\def\csname pgfcalendar@shorthand@wt\endcsname{%
- \pgfcalendarweekdayname{\pgfcalendarcurrentweekday}}
-\expandafter\def\csname pgfcalendar@shorthand@m.\endcsname{%
- \pgfcalendarmonthshortname{\pgfcalendarcurrentmonth}}
-\expandafter\def\csname pgfcalendar@shorthand@mt\endcsname{%
- \pgfcalendarmonthname{\pgfcalendarcurrentmonth}}
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfexternal.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfexternal.tex
deleted file mode 100644
index ff53e5e182f..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfexternal.tex
+++ /dev/null
@@ -1,32 +0,0 @@
-% Copyright 2007 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-%
-% In addition to the above licenses, this particular file may also be
-% directly inlined into other documents and this copyright notice may
-% be removed. Additionally, when you inline this file, you may modify
-% it as needed and you may remove comments.
-%
-% This file is intended to be distributed or even inlined into a file
-% when a document needs to be typeset on a system that does not have
-% pgf/TikZ installed.
-
-% "environment" for reading an external graphic. Note that there are
-% no (!) braces around the "name" of the environment
-%
-% #1 = name of the graphics file
-%
-% Example:
-%
-% \beginpgfgraphicnamed{mygraph}
-% \begin{tikzpicture}
-% ...
-% \end{tikzpicture}
-% \endpgfgraphicnamed
-
-\long\def\beginpgfgraphicnamed#1#2\endpgfgraphicnamed{\includegraphics{#1}}
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
deleted file mode 100644
index 6f2cc5f1996..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
+++ /dev/null
@@ -1,224 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgffor.code.tex,v 1.5 2006/10/16 22:32:59 tantau Exp $
-
-\newdimen\pgffor@iter
-\newdimen\pgffor@skip
-\newif\ifpgffor@continue
-
-\let\pgffor@beginhook=\pgfutil@empty
-\let\pgffor@endhook=\pgfutil@empty
-\let\pgffor@afterhook=\pgfutil@empty
-
-\def\pgffor@emptyvalues{, \pgffor@stop,}%
-
-\def\foreach#1in#2{%
- \def\pgffor@var{#1}%
- \def\pgffor@values{#2, \pgffor@stop,}%
- \ifx\pgffor@values\pgffor@emptyvalues
- \def\pgffor@values{\pgffor@stop,}%
- \fi%
- \let\pgffor@body\pgfutil@empty%
- \global\pgffor@continuetrue%
- \pgffor@collectbody}
-
-\def\pgffor@collectbody{%
- \pgfutil@ifnextchar\foreach{\pgffor@collectforeach}{%
- \pgfutil@ifnextchar\bgroup{\pgffor@collectargument}{\pgffor@collectsemicolon}}%
-}
-
-\def\pgffor@collectforeach\foreach#1in#2{%
- \expandafter\long\expandafter\def\expandafter\pgffor@body\expandafter{\pgffor@body\foreach#1in{#2}}%
- \pgffor@collectbody%
-}
-
-\long\def\pgffor@collectargument#1{%
- \expandafter\long\expandafter\def\expandafter\pgffor@body\expandafter{\pgffor@body{#1}}%
- \pgffor@iterate%
-}
-
-
-\def\pgffor@collectsemicolon{%
- \let\pgffor@next=\pgffor@collectnormalsemicolon%
- \ifnum\the\catcode`\;=\active\relax%
- \let\pgffor@next=\pgffor@collectactivesemicolon%
- \fi%
- \pgffor@next%
-}
-
-\def\pgffor@collectnormalsemicolon#1;{%
- \expandafter\long\expandafter\def\expandafter\pgffor@body\expandafter{\pgffor@body#1;}%
- \pgffor@iterate%
-}
-
-{
- \catcode`\;=\active
-
- \gdef\pgffor@collectactivesemicolon#1;{%
- \expandafter\long\expandafter\def\expandafter\pgffor@body\expandafter{\pgffor@body#1;}%
- \pgffor@iterate%
- }
-}
-
-\def\pgffor@iterate{%
- \let\pgffor@last\pgfutil@empty%
- \let\pgffor@prevlast\pgfutil@empty%
- \expandafter\pgffor@scan\pgffor@values}
-
-\def\pgffor@stop{\pgffor@stop}%
-\def\pgffor@dots{...}%
-
-\def\pgffor@scan{\pgfutil@ifnextchar({\pgffor@scanround}{\pgffor@scanone}}
-\def\pgffor@scanround(#1)#2,{\def\pgffor@value{(#1)}\pgffor@scanned}
-\def\pgffor@scanone#1,{\def\pgffor@value{#1}\pgffor@scanned}
-
-\def\pgffor@scanned{%
- \ifx\pgffor@value\pgffor@stop%
- \let\pgffor@next=\pgffor@after% done!
- \else%
- \ifx\pgffor@value\pgffor@dots%
- \let\pgffor@next=\pgffor@handledots%
- \else%
- \let\pgffor@next=\pgffor@handlevalue%
- \fi%
- \ifpgffor@continue%
- \else%
- \let\pgffor@next=\pgffor@scan% done!
- \fi%
- \fi%
- \pgffor@next}
-
-\def\pgffor@after{%
- \global\pgffor@continuetrue%
- \pgffor@afterhook}
-
-\def\pgffor@handlevalue{%
- \let\pgffor@prevlast\pgffor@last%
- \let\pgffor@last\pgffor@value%
- \pgffor@invokebody%
- \pgffor@scan%
-}
-
-\def\pgffor@invokebody{%
- \begingroup%
- \expandafter\in@\expandafter/\expandafter{\pgffor@var}%
- \ifin@%
- \expandafter\def\expandafter\pgffor@valuerest\expandafter{\pgffor@value//\relax}%
- \expandafter\pgffor@multiassign\pgffor@var/\pgffor@stop/\pgffor@stop/\relax%
- \else%
- \expandafter\expandafter\expandafter\def\expandafter\pgffor@var\expandafter{\pgffor@value}%
- \fi%
- \expandafter\pgffor@beginhook\pgffor@body\pgffor@endhook%
- \endgroup%
-}
-
-
-\def\pgffor@multiassign#1/#2/\relax{%
- \def\pgffor@currentvar{#1}%
- \def\pgffor@rest{#2}%
- \ifx\pgffor@currentvar\pgffor@stop%
- \let\pgffor@next=\relax%
- \else%
- \let\pgffor@next=\pgffor@multiassignrest%
- \fi%
- \pgffor@next%
-}
-
-\def\pgffor@multiassignrest{\expandafter\pgffor@multiassignfinal\pgffor@valuerest}
-\def\pgffor@multiassignfinal#1/#2/\relax{%
- \def\pgffor@test{#2}%
- \ifx\pgffor@test\pgfutil@empty%
- \def\pgffor@valuerest{#1//\relax}% repeat
- \else%
- \def\pgffor@valuerest{#2/\relax}%
- \fi%
- \expandafter\def\pgffor@currentvar{#1}%
- \expandafter\pgffor@multiassign\pgffor@rest/\relax%
-}
-
-
-
-
-\def\pgffor@handledots{%
- \ifx\pgffor@last\pgfutil@empty%
- \PackageError{pgffor}{``...'' not allowed without prior value}{}%
- \fi%
- \pgffor@dotsscanend%
-}
-\def\pgffor@dotsscanend#1,{%
- \def\pgffor@dotsend{#1}%
- % calculate skip%
- \ifx\pgffor@prevlast\pgfutil@empty%
- \ifdim\pgffor@dotsend pt>\pgffor@last pt%
- \pgffor@skip=1pt%
- \else%
- \pgffor@skip=-1pt%
- \fi%
- \else%
- \pgffor@skip=\pgffor@last pt%
- \pgffor@iter=\pgffor@prevlast pt%
- \advance\pgffor@skip by-\pgffor@iter%
- \fi%
- \pgffor@iter=\pgffor@last pt%
- % do loop
- \pgffor@loop%
-}
-
-\def\pgffor@loop{%
- \advance\pgffor@iter by\pgffor@skip%
- \let\pgffor@next=\pgffor@doloop%
- \ifdim\pgffor@skip<0pt%
- \ifdim\pgffor@iter<\pgffor@dotsend pt%
- \let\pgffor@next=\pgffor@endloop%
- \fi%
- \else%
- \ifdim\pgffor@iter>\pgffor@dotsend pt%
- \let\pgffor@next=\pgffor@endloop%
- \fi%
- \fi%
- \ifpgffor@continue%
- \else%
- \let\pgffor@next=\pgffor@endloop% done!
- \fi%
- \pgffor@next%
-}
-
-\def\pgffor@endloop{%
- \pgffor@scan%
-}
-
-{\catcode`\p=12\catcode`\t=12\gdef\Pgffor@geT#1pt{#1}}
-
-\def\pgffor@doloop{%
- \begingroup%
- \edef\pgffor@temp{\expandafter\Pgffor@geT\the\pgffor@iter}%
- \edef\pgffor@incheck{{.0/}{\pgffor@temp/}}%
- \expandafter\in@\pgffor@incheck%
- \ifin@%
- \expandafter\pgffor@strip\pgffor@temp%
- \fi%
- \expandafter\in@\expandafter/\expandafter{\pgffor@var}%
- \ifin@%
- \expandafter\def\expandafter\pgffor@valuerest\expandafter{\pgffor@temp//\relax}%
- \expandafter\pgffor@multiassign\pgffor@var/\pgffor@stop/\pgffor@stop/\relax%
- \else%
- \expandafter\expandafter\expandafter\def\expandafter\pgffor@var\expandafter{\pgffor@temp}%
- \fi%
- \expandafter\pgffor@beginhook\pgffor@body\pgffor@endhook%
- \endgroup%
- \pgffor@loop%
-}
-
-\def\pgffor@strip#1.0{\def\pgffor@temp{#1}}
-
-
-\def\breakforeach{\global\pgffor@continuefalse}
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
new file mode 100644
index 00000000000..dd660fd6ab7
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
@@ -0,0 +1,699 @@
+% Copyright 2007 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+
+% This file is perfectly self-contained, except that the catcode of @ should be made a letter.
+
+
+% Guard against reading twice
+\ifx\pgfkeysloaded\undefined
+ \let\pgfkeysloaded=\relax
+\else
+ \expandafter\endinput
+\fi
+
+% The purpose of this file is to provide a general settings engine that
+% works with all TeX formats and has no save-stack impact
+
+
+% This is useful:
+
+\def\pgfkeys@ifcsname#1\endcsname#2\else#3\fi{\expandafter\ifx\csname#1\endcsname\relax#3\else#2\fi}%
+\ifx\eTeXrevision\undefined%
+\else%
+ \expandafter\let\expandafter\pgfkeys@ifcsname\csname ifcsname\endcsname%
+\fi
+
+\def\pgfkeys@empty{}
+
+% This also:
+
+\ifx\PackageError\undefined
+ \def\pgfkeys@error#1{\immediate\write-1{Package pgfkeys: Error! #1.}}%
+\else
+ \def\pgfkeys@error#1{\PackageError{pgfkeys}{#1}{}}%
+\fi
+
+% Set a key to a value
+%
+% #1 = key
+% #2 = tokens
+%
+% Description:
+%
+% This command sets the key to the given tokens. The tokens are stored as
+% is and can even contain things like #9.
+%
+% Keys are organized hierarchically using something similar to Unix
+% paths. Thus, a typically key might be called "/tikz/length" or
+% "/tikz/length dimension/.@cmd". Some keys starting with a dot are
+% special, so they should not be used as normal key names (they are
+% similar to Unix files starting with a dot -- you can use them, but
+% be careful).
+%
+% Keys are always local to the current TeX group.
+%
+% Example:
+%
+% \pgfkeyssetvalue{/tikz/length}{2cm-3cm}
+% \pgfkeyssetvalue{/algo/swap}{{#2}{#1}}
+
+\def\pgfkeyssetvalue#1#2{%
+ \pgfkeys@temptoks{#2}\expandafter\edef\csname pgfk@#1\endcsname{\the\pgfkeys@temptoks}%
+}
+
+
+
+% Add text to a key at the end
+%
+% #1 = key
+% #2 = a value to be added at the beginning
+% #3 = a value to be added at the end
+%
+% Description:
+%
+% This command adds #2 to the definition of the key. The key should
+% have been set previously using \pgfkeyssetvalue.
+%
+% Example:
+%
+% \pgfkeysaddvalue{/tikz/length}{}{-3cm}
+
+\def\pgfkeysaddvalue#1#2#3{%
+ {%
+ \toks0{#1}%
+ \pgfkeysifdefined{#1}
+ {\pgfkeys@temptoks\expandafter\expandafter\expandafter{\csname pgfk@#1\endcsname}}%
+ {\pgfkeys@temptoks{}}%
+ \toks1{#2}%
+ \xdef\pgfkeys@global@temp{\the\toks0 \the\pgfkeys@temptoks \the\toks1}% believe or don't: the spaces are important
+ }%
+ \pgfkeyslet{#1}\pgfkeys@global@temp%
+}
+
+
+
+% Makes a key equal a given code
+%
+% #1 = key
+% #2 = a code name
+%
+% Description:
+%
+% This command executes a \let command so that a key gets the same
+% value as the parameter #2.
+%
+% Keys are always local to the current TeX group.
+%
+% Example:
+%
+% \pgfkeyslet{/algo/swap}{\myswap}
+
+\def\pgfkeyslet#1#2{%
+ \expandafter\let\csname pgfk@#1\endcsname#2%
+}
+
+
+% Retrieve the code stored in a key into a code
+%
+% #1 = key
+% #2 = code
+%
+% Description:
+%
+% This command will set #2 to "point" to the value stored in the key.
+%
+% Example:
+%
+% \pgfkeysgetvalue{/tikz/swap}{\myswap}
+
+\def\pgfkeysgetvalue#1#2{\expandafter\let\expandafter#2\csname pgfk@#1\endcsname}
+
+
+
+% Retrieve the value stored in a key
+%
+% #1 = key
+%
+% Description:
+%
+% This command will expand to the value stored in the key. The key
+% should previously have been set using \pgfkeyasetkey or \pgfkeyslet.
+%
+% Example:
+%
+% The length is \pgfkeysvalue{/tikz/length}.
+
+\def\pgfkeysvalueof#1{\csname pgfk@#1\endcsname}
+
+
+
+% If for testing whether a key exists
+%
+% #1 = key
+% #2 = if-case
+% #3 = else-case
+%
+% Description:
+%
+% This if will be executed if the key exists. In eTeX mode this works
+% like a normal if, in normal TeX mode you need to provide an \else.
+%
+% Example:
+%
+% \pgfkeysifdefined{/tikz/length}{key exists}{does not exist}
+
+\def\pgfkeysifdefined#1#2#3{\pgfkeys@ifcsname pgfk@#1\endcsname#2\else#3\fi}
+
+
+
+
+% Execute settings
+%
+% #1 = list of settings
+%
+% Description:
+%
+% The list of settings should contain comma-separated settings. Each
+% setting has the following form:
+%
+% /path/key=value
+%
+% The parts "/path/" and "=value" are optional. When the path is not
+% specified, the value of the token register "\pgfkeypath" is used. If
+% "=value" is missing, the value of the setting "/path/key/.@def" is used
+% instead. If this key is set to "\pgfvaluerequired", the key
+% "/errors/value required/.@cmd" is executed. Theis error handler,
+% like all other error handlers, will get the current key as its first
+% parameter (unexpanded) and the current value as its second value
+% (also unexpanded).
+%
+% Any spaces at the beginning and at the end and around the
+% equals-sign are removed. The key with the complete path is set to
+% the code \pgfcurrentkey.
+%
+% The setting is then processed according to the following rules:
+%
+% 1) If the key /path/key/.@cmd" is present, its code is executed
+% with the value computed above, followed by \pgfeov (end of
+% value). So, to handle
+%
+% "/stuff/height= 1.5 ,"
+%
+% /stuff/height/.@cmd should be set to some code, that can
+% handle the parameter
+%
+% "1.5\pgfeov"
+%
+% For instance, saying
+%
+% \pgfkeys{/stuff/height/.@cmd}{#1\pgfeov}{\def\myheight{#1}}
+%
+% will do nicely.
+%
+% 2) Otherwise, if the key /path/key is present, this key is
+% set to the value computed above.
+%
+% 3) Otherwise, if the key /handlers/key/.@cmd is present, it is executed
+% with the same parameters as in 1). Additionally, the
+% token register \pgfcurrentkeypath will be set to "/path/" and the
+% macor \pgfcurrentkeywithoutpath to "key". So, in the above
+% example if neither "/stuff/height/.@cmd" nor
+% "/stuff/height" is present, but "/handlers/height" is,
+% then "/handlers/height" is executed with the parameters:
+%
+% "1.5\pgfeov"
+%
+% and \pgfcurrentkey is set to "/stuff/height" and \pgfcurrentkeypath
+% is set to "/stuff/" and \pgfcurrentkeywithoutpath to "height".
+%
+% 4) Otherwise, if the key "/path/.unknown/.@cmd" is present, its code is
+% executed with the same parameters as in 3).
+%
+% 5) Otherwise, the key "/handlers/.unknown/.@cmd" is executed with the same
+% parameters as in 1).
+%
+% After all settings have been processed, the value of the token
+% register \pgfdefaultkeypath is set to its original value. Thus, any local
+% change of this token register has no effect outside the call.
+%
+% Example:
+%
+% \pgfkeys{/tikz/.is family}
+% \pgfkeys{/tikz/line width/.cd,
+% .def=\pgfsetlinewidth{##1},
+% .set default=.4pt}
+% \pgfkeys{tikz,line width=1pt}
+
+\newtoks\pgfkeys@pathtoks
+\def\pgfkeyscurrentpath{\the\pgfkeys@pathtoks}
+\newtoks\pgfkeys@temptoks
+
+\def\pgfkeys@root{/}
+\let\pgfkeysdefaultpath\pgfkeys@root
+
+\def\pgfkeys{\expandafter\pgfkeys@@set\expandafter{\pgfkeysdefaultpath}}%
+\def\pgfkeys@@set#1#2{%
+ \let\pgfkeysdefaultpath\pgfkeys@root%
+ \pgfkeys@parse#2,\pgfkeys@mainstop%
+ \def\pgfkeysdefaultpath{#1}}
+
+\def\pgfkeys@parse{\futurelet\pgfkeys@possiblerelax\pgfkeys@parse@main}
+\def\pgfkeys@parse@main{%
+ \ifx\pgfkeys@possiblerelax\pgfkeys@mainstop%
+ \expandafter\pgfkeys@cleanup%
+ \else%
+ \expandafter\pgfkeys@normal%
+ \fi%
+}
+\def\pgfkeys@normal#1,{%
+ \pgfkeys@unpack#1=\pgfkeysnovalue=\pgfkeys@stop%
+ \pgfkeys@parse%
+}
+\def\pgfkeys@cleanup\pgfkeys@mainstop{}
+
+\def\pgfkeys@mainstop{\pgfkeys@mainstop} % equals only itself
+\def\pgfkeys@novalue{} % equals only itself
+\def\pgfkeysnovalue{\pgfkeys@novalue} % equals only itself
+\def\pgfkeysnovalue@text{\pgfkeysnovalue}
+\def\pgfkeysvaluerequired{\pgfkeysvaluerequired} % equals only itself
+
+\def\pgfkeys@unpack#1=#2=#3\pgfkeys@stop{%
+ \pgfkeys@spdef\pgfkeyscurrentkey{#1}%
+ \edef\pgfkeyscurrentkey{\pgfkeyscurrentkey}%
+ \ifx\pgfkeyscurrentkey\pgfkeys@empty%
+ % Skip
+ \else%
+ \pgfkeys@add@path@as@needed%
+ \pgfkeys@spdef\pgfkeyscurrentvalue{#2}%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text% Hmm... no value
+ \pgfkeysifdefined{\pgfkeyscurrentkey/.@def}%
+ {\pgfkeysgetvalue{\pgfkeyscurrentkey/.@def}{\pgfkeyscurrentvalue}}
+ {}% no default, so leave it
+ \fi%
+ \ifx\pgfkeyscurrentvalue\pgfkeysvaluerequired%
+ \pgfkeysvalueof{/errors/value required/.@cmd}\pgfkeyscurrentkey\pgfkeyscurrentvalue\pgfeov%
+ \else%
+ \pgfkeys@case@one%
+ \fi%
+ \fi}
+
+\def\pgfkeys@case@one{%
+ \pgfkeysifdefined{\pgfkeyscurrentkey/.@cmd}%
+ {\pgfkeysgetvalue{\pgfkeyscurrentkey/.@cmd}{\pgfkeys@code}%
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov}
+ {\pgfkeys@case@two}%
+}
+
+\def\pgfkeys@case@two{%
+ \pgfkeysifdefined{\pgfkeyscurrentkey}%
+ {\pgfkeys@case@two@extern}%
+ {\pgfkeys@case@three}%
+}
+
+\def\pgfkeys@case@two@extern{%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text%
+ \pgfkeysvalueof{\pgfkeyscurrentkey}%
+ \else%
+ \pgfkeyslet{\pgfkeyscurrentkey}\pgfkeyscurrentvalue%
+ \fi%
+}
+
+
+\def\pgfkeys@case@three{%
+ \pgfkeys@split@path%
+ \pgfkeysifdefined{/handlers/\pgfkeyscurrentname/.@cmd}%
+ {\pgfkeysgetvalue{/handlers/\pgfkeyscurrentname/.@cmd}{\pgfkeys@code}%
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov}
+ {\pgfkeys@unknown}%
+}
+
+\def\pgfkeys@unknown{%
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.unknown/.@cmd}%
+ {%
+ \pgfkeysgetvalue{\pgfkeyscurrentpath/.unknown/.@cmd}{\pgfkeys@code}%
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov}
+ {%
+ \pgfkeysgetvalue{/handlers/.unknown/.@cmd}{\pgfkeys@code}%
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov%
+ }%
+}
+
+
+\def\pgfkey@argumentisspace#1{%
+ \def\pgfkeys@spdef##1##2{%
+ \futurelet\pgfkeys@possiblespace\pgfkeys@sp@a##2\pgfkeys@stop\pgfkeys@stop#1\pgfkeys@stop\relax##1}%
+ \def\pgfkeys@sp@a{%
+ \ifx\pgfkeys@possiblespace\pgfkeys@sptoken%
+ \expandafter\pgfkeys@sp@b%
+ \else%
+ \expandafter\pgfkeys@sp@b\expandafter#1%
+ \fi}%
+ \def\pgfkeys@sp@b#1##1 \pgfkeys@stop{\pgfkeys@sp@c##1}%
+}
+\pgfkey@argumentisspace{ }
+\def\pgfkeys@sp@c#1\pgfkeys@stop#2\relax#3{\pgfkeys@temptoks{#1}\edef#3{\the\pgfkeys@temptoks}}
+{\def\:{\global\let\pgfkeys@sptoken= } \: }
+
+
+
+\def\pgfkeys@add@path@as@needed{% Should add the path if the
+ % \pgfkeyscurrentkey does not start with /
+ \expandafter\futurelet\expandafter\pgfkeys@possibleslash\expandafter\pgfkeys@check@slash\pgfkeyscurrentkey\relax%
+}
+\def\pgfkeys@check@slash{%
+ \ifx\pgfkeys@possibleslash/%
+ \expandafter\pgfkeys@nevermind%
+ \else%
+ \expandafter\pgfkeys@addpath%
+ \fi%
+}
+
+\def\pgfkeys@nevermind#1\relax{}
+\def\pgfkeys@addpath#1\relax{\edef\pgfkeyscurrentkey{\pgfkeysdefaultpath#1}}
+
+\def\pgfkeys@split@path{% Should assign the two codes
+ % \pgfkeyscurrentname and \pgfcurrentlkeypath
+ \pgfkeys@pathtoks{}%
+ \expandafter\pgfkeys@splitter\pgfkeyscurrentkey//%
+}
+\def\pgfkeys@splitter#1/#2/{%
+ \def\pgfkeys@temp{#2}%
+ \ifx\pgfkeys@temp\pgfkeys@empty%
+ % Ah. done
+ \def\pgfkeyscurrentname{#1}%
+ \expandafter\pgfkeys@gobbletoslash%
+ \else%
+ \expandafter\pgfkeys@pathtoks\expandafter{\the\pgfkeys@pathtoks#1/}%
+ \fi%
+ \pgfkeys@splitter#2/%
+}
+\def\pgfkeys@gobbletoslash\pgfkeys@splitter/{\expandafter\pgfkeys@remove@slash\the\pgfkeys@pathtoks\relax}%
+\def\pgfkeys@remove@slash#1/\relax{\pgfkeys@pathtoks{#1}}
+
+
+
+% Quickly set keys
+%
+% #1 = default path
+% #2 = key-value pairs
+%
+% Desscription:
+%
+% This command starts the execution with the default path set to
+% #1. This command should only be used when speed is important (like
+% in a heavily used macro like \tikzset). Normally, keys should be
+% used to set the path. Note that if #1 equals /, then \pgfkeys will
+% actually be quicker!
+%
+% Example:
+%
+% \pgfqkeys{/tikz}{myother length/.code=\def\myotherlength{#1}\pgfkeysalso{length=#1}}
+
+\def\pgfqkeys{\expandafter\pgfkeys@@qset\expandafter{\pgfkeysdefaultpath}}%
+\def\pgfkeys@@qset#1#2#3{\def\pgfkeysdefaultpath{#2/}\pgfkeys@parse#3,\pgfkeys@mainstop\def\pgfkeysdefaultpath{#1}}
+
+
+% Sets keys while setting keys
+%
+% #1 = key-value pairs
+%
+% Desscription:
+%
+% This code may only be called inside the code that is executed for a
+% key. The #1 should be a list of settings pairs. They will be executed
+% as if they had been given as the argument to the \pgfkeys command.
+%
+% Example:
+%
+% \pgfkeys{tikz,myother length/.code=\def\myotherlength{#1}\pgfkeysalso{length=#1}}
+
+\def\pgfkeysalso#1{\pgfkeys@parse#1,\pgfkeys@mainstop}
+
+
+
+% Quickly sets keys while setting keys
+%
+% #1 = default path
+% #2 = key-value pairs
+%
+% Desscription:
+%
+% This command executes #2 with the default path set to #1. This
+% command will cause chaos if used incorrectly. The only safe
+% place to use it instead of \pgfkeys is at the beginning of a TeX group.
+%
+% Example:
+%
+% \begingroup
+% \pgfqkeysalso{/tikz}{myother length/.code=\def\myotherlength{#1}\pgfkeysalso{length=#1}}
+
+\def\pgfqkeysalso#1#2{\def\pgfkeysdefaultpath{#1/}\pgfkeys@parse#2,\pgfkeys@mainstop}
+
+
+
+
+% Now setup the default handelers and keys:
+
+% Define a key macro with one argument (\def or \edef)
+%
+% #1 = key
+% #2 = code
+%
+% Description:
+%
+% This command will setup things so the key/.@cmd contains a macro
+% that takes one parameter and has #2 as its code.
+%
+% Example:
+%
+% \pgfkeysdef{/my key}{\show#1}
+
+\def\pgfkeysdef#1#2{%
+ \def\pgfkeys@temp##1\pgfeov{#2}%
+ \pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}%
+}
+\def\pgfkeysedef#1#2{%
+ \edef\pgfkeys@temp##1\pgfeov{#2}%
+ \pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}%
+}
+
+
+% Define a key macro with mutliple arguments (\def or \edef)
+%
+% #1 = key
+% #2 = argument pattern
+% #2 = code
+%
+% Description:
+%
+% This command will setup things so the key/.@cmd contains a macro
+% that takes #2 as its parameter pattern and has #3 as its code.
+%
+% Example:
+%
+% \pgfkeysdefargs{/swap}{#1#2}{#2#1}
+
+\def\pgfkeysdefargs#1#2#3{%
+ \def\pgfkeys@temp#2\pgfeov{#3}%
+ \pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}%
+ \pgfkeyssetvalue{#1/.@args}{#2\pgfeov}%
+ \pgfkeyssetvalue{#1/.@body}{#3}%
+}
+\def\pgfkeysedefargs#1#2#3{%
+ \edef\pgfkeys@temp#2\pgfeov{#3}%
+ \pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}%
+ \pgfkeyssetvalue{#1/.@args}{#2\pgfeov}%
+ \pgfkeyssetvalue{#1/.@body}{#3}%
+}
+
+
+
+% Defining a key command
+
+\pgfkeysdef{/handlers/.code}{\pgfkeysdef{\pgfkeyscurrentpath}{#1}}
+\pgfkeysdef{/handlers/.code 2 args}{\pgfkeysdefargs{\pgfkeyscurrentpath}{##1##2}{#1}}
+\pgfkeysdef{/handlers/.ecode}{\pgfkeysedef{\pgfkeyscurrentpath}{#1}}
+\pgfkeysdef{/handlers/.ecode 2 args}{\pgfkeysedefargs{\pgfkeyscurrentpath}{##1##2}{#1}}
+\pgfkeysdefargs{/handlers/.code args}{#1#2}{\pgfkeysdefargs{\pgfkeyscurrentpath}{#1}{#2}}
+\pgfkeysdefargs{/handlers/.ecode args}{#1#2}{\pgfkeysedefargs{\pgfkeyscurrentpath}{#1}{#2}}
+
+% Adding to a key command
+
+\pgfkeys{/handlers/.add code/.code 2 args=%
+ % Find out, whether with args or not.
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.@args}%
+ {% Yes, so add to body and reuse args
+ \pgfkeysaddvalue{\pgfkeyscurrentpath/.@body}{#1}{#2}%
+ % Redefine code
+ \pgfkeysgetvalue{\pgfkeyscurrentpath/.@args}{\pgfkeys@tempargs}
+ \pgfkeysgetvalue{\pgfkeyscurrentpath/.@body}{\pgfkeys@tempbody}
+ \expandafter\expandafter\expandafter\def\expandafter\pgfkeys@temp\expandafter\pgfkeys@tempargs\expandafter{\pgfkeys@tempbody}%
+ \pgfkeyslet{\pgfkeyscurrentpath/.@cmd}{\pgfkeys@temp}%
+ }%
+ {%
+ % No, so single argument. Redefine accordingly.
+ {%
+ \toks0{#1}%
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.@cmd}%
+ {\pgfkeys@temptoks\expandafter\expandafter\expandafter{\csname pgfk@\pgfkeyscurrentpath/.@cmd\endcsname##1\pgfeov}}%
+ {\pgfkeys@temptoks{}}%
+ \toks1{#2}%
+ \xdef\pgfkeys@global@temp{\the\toks0 \the\pgfkeys@temptoks \the\toks1}%
+ }%
+ \expandafter\def\expandafter\pgfkeys@temp\expandafter##\expandafter1\expandafter\pgfeov\expandafter{\pgfkeys@global@temp}%
+ \pgfkeyslet{\pgfkeyscurrentpath/.@cmd}\pgfkeys@temp%
+ }%
+}
+\pgfkeys{/handlers/.prefix code/.code=\pgfkeys{\pgfkeyscurrentpath/.add code={#1}{}}}%
+\pgfkeys{/handlers/.append code/.code=\pgfkeys{\pgfkeyscurrentpath/.add code={}{#1}}}%
+
+
+% Defining a style
+
+\pgfkeys{/handlers/.style/.code=\pgfkeys{\pgfkeyscurrentpath/.code=\pgfkeysalso{#1}}}
+\pgfkeys{/handlers/.estyle/.code=\pgfkeys{\pgfkeyscurrentpath/.ecode=\noexpand\pgfkeysalso{#1}}}
+\pgfkeys{/handlers/.style args/.code 2 args=\pgfkeys{\pgfkeyscurrentpath/.code args={#1}{\pgfkeysalso{#2}}}}
+\pgfkeys{/handlers/.estyle args/.code 2 args=\pgfkeys{\pgfkeyscurrentpath/.ecode args={#1}{\noexpand\pgfkeysalso{#2}}}}
+\pgfkeys{/handlers/.style 2 args/.code=\pgfkeys{\pgfkeyscurrentpath/.code 2 args=\pgfkeysalso{#1}}}
+
+% Adding to a style
+
+\pgfkeys{/handlers/.add style/.code 2 args=\pgfkeys{\pgfkeyscurrentpath/.add code={\pgfkeysalso{#1}}{\pgfkeysalso{#2}}}}%
+\pgfkeys{/handlers/.prefix style/.code=\pgfkeys{\pgfkeyscurrentpath/.add code={\pgfkeysalso{#1}}{}}}%
+\pgfkeys{/handlers/.append style/.code=\pgfkeys{\pgfkeyscurrentpath/.add code={}{\pgfkeysalso{#1}}}}%
+
+
+% Defining a value
+
+\pgfkeys{/handlers/.initial/.code=\pgfkeyssetvalue{\pgfkeyscurrentpath}{#1}}
+\pgfkeys{/handlers/.add/.code 2 args=\pgfkeysaddvalue{\pgfkeyscurrentpath}{#1}{#2}}
+\pgfkeys{/handlers/.get/.code=\pgfkeysgetvalue{\pgfkeyscurrentpath}{#1}}
+
+% Defining a default
+
+\pgfkeys{/handlers/.default/.code=\pgfkeyssetvalue{\pgfkeyscurrentpath/.@def}{#1}}
+\pgfkeys{/handlers/.value required/.code=\pgfkeyssetvalue{\pgfkeyscurrentpath/.@def}{\pgfkeysvaluerequired}}
+\pgfkeys{/handlers/.value forbidden/.code=\pgfkeys{\pgfkeyscurrentpath/.add code=%
+{%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text%
+ \else%
+ \pgfkeysvalueof{/errors/value forbidden/.@cmd}\pgfkeyscurrentkey\pgfkeyscurrentvalue\pgfeov%
+ \fi%
+}{}}}
+
+
+% High-level cmds
+
+\pgfkeys{/handlers/.store in/.code=\pgfkeysalso{\pgfkeyscurrentpath/.code=\def#1{##1}}}
+\pgfkeys{/handlers/.estore in/.code=\pgfkeysalso{\pgfkeyscurrentpath/.code=\edef#1{##1}}}
+
+\pgfkeys{/handlers/.is if/.code=\pgfkeysalso{%
+ \pgfkeyscurrentpath/.code=\pgfkeys@handle@boolean{#1}{##1},
+ \pgfkeyscurrentpath/.default=true%
+ }%
+}
+\def\pgfkeys@handle@boolean#1#2{%
+ \pgfkeys@ifcsname#1#2\endcsname%
+ \csname#1#2\endcsname%
+ \else%
+ \pgfkeysvalueof{/errors/boolean expected/.@cmd}\pgfkeyscurrentkey{#2}\pgfeov%
+ \fi
+}
+
+\pgfkeys{/handlers/.is choice/.code=%
+ \pgfkeys{%
+ \pgfkeyscurrentpath/.cd,%
+ .code=\expandafter\pgfkeysalso\expandafter{\pgfkeyscurrentkey/##1},
+ .unknown/.style={/errors/unknown choice value=\pgfkeyscurrentkey\pgfkeyscurrentvalue}}}
+
+
+% Inspection handlers
+
+\pgfkeys{/handlers/.show value/.code=\pgfkeysgetvalue{\pgfkeyscurrentpath}{\pgfkeysshower}\show\pgfkeysshower} % inspect the value
+\pgfkeys{/handlers/.show code/.code=\pgfkeysgetvalue{\pgfkeyscurrentpath/.@cmd}{\pgfkeysshower}\show\pgfkeysshower} % inspect the body of the command
+
+
+% Path handling
+
+\pgfkeys{/handlers/.is family/.code=\pgfkeys{\pgfkeyscurrentpath/.ecode=\edef\noexpand\pgfkeysdefaultpath{\pgfkeyscurrentpath/}}}
+\pgfkeys{/handlers/.cd/.code=\edef\pgfkeysdefaultpath{\pgfkeyscurrentpath/}}
+
+
+% Value expansion
+
+\pgfkeys{/handlers/.expand once/.code=\expandafter\pgfkeys@exp@call\expandafter{#1}}
+\pgfkeys{/handlers/.expand twice/.code=\expandafter\expandafter\expandafter\pgfkeys@exp@call\expandafter\expandafter\expandafter{#1}}
+\pgfkeys{/handlers/.expanded/.code=\edef\pgfkeys@temp{#1}\expandafter\pgfkeys@exp@call\expandafter{\pgfkeys@temp}}
+
+\def\pgfkeys@exp@call#1{\pgfkeysalso{\pgfkeyscurrentpath=#1}}
+
+% Try to set a key and do nothing if not define
+
+\newif\ifpgfkeyssuccess
+\pgfkeys{/handlers/.try/.code=\pgfkeys@try}
+\pgfkeys{/handlers/.retry/.code=\ifpgfkeyssuccess\else\pgfkeys@try\fi}
+\def\pgfkeys@try{%
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.@cmd}%
+ {%
+ \pgfkeysgetvalue{\pgfkeyscurrentpath/.@cmd}{\pgfkeys@code}%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text% Hmm... no value
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.@def}%
+ {\pgfkeysgetvalue{\pgfkeyscurrentpath/.@def}{\pgfkeyscurrentvalue}}
+ {}% no default, so leave it
+ \fi%
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov%
+ \pgfkeyssuccesstrue%
+ }%
+ {%
+ \pgfkeysifdefined{\pgfkeyscurrentpath}%
+ {%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text%
+ \pgfkeysvalueof{\pgfkeyscurrentpath}%
+ \else%
+ \pgfkeyslet{\pgfkeyscurrentpath}\pgfkeyscurrentvalue%
+ \fi%
+ \pgfkeyssuccesstrue%
+ }%
+ {\pgfkeyssuccessfalse}%
+ }%
+}
+
+% Utilities
+
+\pgfkeys{/utils/exec/.code=#1} % simply execute the given code directly.
+
+
+% Errors
+
+\pgfkeys{/errors/boolean expected/.code 2 args=\pgfkeys@error{%
+ Boolean parameter of key '#1' must be 'true' or 'false', not
+ '#2'. I am going to ignore it}}
+\pgfkeys{/errors/value required/.code 2 args=\pgfkeys@error{%
+ The key '#1' requires a value. I am going to ignore this key}{}}
+\pgfkeys{/errors/value forbidden/.code 2 args=\pgfkeys@error{%
+ You may not specify a value for the key '#1'. I am going to ignore
+ the value '#2' that you provided}}
+\pgfkeys{/errors/unknown choice value/.code 2 args=\pgfkeys@error{%
+ Choice '\pgfkeyscurrentname' unknown in key
+ '\pgfkeyscurrentpath'. I am going to ignore this key}}
+\pgfkeys{/errors/unknown key/.code 2 args=\pgfkeys@error{%
+ I do not know the key '#1' and I am going to ignore it. Perhaps
+ you misspelled it}}
+
+\pgfkeys{/handlers/.unknown/.code=%
+ {%
+ \let\pgfkeys@orig@key=\pgfkeyscurrentkey%
+ \pgfkeysalso{/errors/unknown key=\pgfkeys@orig@key{}}%
+ }
+}
+
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
deleted file mode 100644
index 25aae47b840..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
+++ /dev/null
@@ -1,94 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-
-
-% The purpose of this file is to define the command
-% \ProvidesPackageRCS, which should be followed by an RCS id
-% string. This command will also be available in plain TeX, where it
-% prints out a message to the log.
-
-
-\def\pgfversion{1.18}
-
-
-\ifx\pgfrcsloaded\undefined
-\def\pgfrcsloaded{}
-
-\edef\pgfrcsatcode{\the\catcode`\@}
-\catcode`\@=11
-
-% Get date and version from RCS Ids
-\def\pgf@parseid $#1: #2.#3,v #4 #5/#6/#7 #8${%
- \pgf@parsercsfile$#2/$
- \def\pgf@rcssuffix{#3}
- \def\pgf@rcsrevision{#4}
- \def\pgf@rcsdate{#5/#6/#7}
-}
-\def\pgf@parsercsfile$#1/#2${
- \def\pgf@temp{#2}
- \ifx\pgf@temp\pgfutil@empty
- \def\pgf@rcsfile{#1}
- \else
- \pgf@parsercsfile$#2$
- \fi}
-
-\def\ProvidesFileRCS{%
- \def\pgfrcs@marshal{\ProvidesFile{\pgf@rcsfile.\pgf@rcssuffix}}%
- \pgfrcs@parserest%
-}
-
-\def\ProvidesPackageRCS{%
- \def\pgfrcs@marshal{\ProvidesPackage{\pgf@rcsfile}}%
- \pgfrcs@parserest%
-}
-
-\def\pgfrcs@parserest{%
- \def\pgf@rcsadditional{}%
- \afterassignment\pgfrcs@checkforoptional\let\next=}
-
-\def\pgfrcs@checkforoptional{%
- \ifx\next[%
- \let\next=\pgfrcs@getoptional%
- \else
- \let\next=\pgfrcs@package%
- \fi%
- \next}%}
-
-\def\pgfrcs@getoptional#1] ${%
- \def\pgf@rcsadditional{#1}%
- \pgfrcs@package%
-}
-
-\def\pgfrcs@package#1${
- \pgf@parseid $#1$
- \pgfrcs@marshal[\pgf@rcsdate\space\pgf@rcsadditional\space(rcs-revision \pgf@rcsrevision)]
-}
-
-\def\ProvidesClassRCS $#1$ [#2]{%
- \pgf@parseid $#1$
- \ProvidesClass{\pgf@rcsfile}[\pgf@rcsdate\space#2\space (rcs-revision \pgf@rcsrevision)]
-}
-
-\ifx\ProvidesPackage\@undefined
- % plain tex
- \def\ProvidesPackage#1[#2]{\wlog{Loading package #1 version #2.}}
-\fi
-
-\ifx\ProvidesFile\@undefined
- % plain tex
- \def\ProvidesFile#1[#2]{\wlog{Loading file #1 version #2.}}
-\fi
-
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgfrcs.code.tex,v 1.16 2007/06/08 11:24:59 tantau Exp $
-
-\catcode`\@=\pgfrcsatcode
-
-\fi
-
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
deleted file mode 100644
index 0ead47d4fea..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
+++ /dev/null
@@ -1,125 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-
-%
-% This file provides utitiliy commands that are used throughout pgf.
-%
-% For most commands, the definition of these commands is just given
-% below. We cannot use the LaTeX definition of these commands since
-% LaTeX may not be the current format and since LaTeX packages tend to
-% redefine these commands.
-%
-% For some commands the actual definition of the format (like latex or
-% context) is to be preferred over the generic definition below. In
-% this case, the definition of the format is installed when the file
-% pgfutil-XXXX.tex is read, where XXXX is the format name (latex,
-% plain, or context).
-
-
-
-\catcode`\@=11\relax
-
-
-% Simple stuff
-
-\long\def\pgfutil@ifundefined#1{%
- \expandafter\ifx\csname#1\endcsname\relax
- \expandafter\pgfutil@firstoftwo
- \else
- \expandafter\pgfutil@secondoftwo
- \fi}
-\def\pgfutil@firstofone#1{#1}
-\def\pgfutil@firstoftwo#1#2{#1}
-\def\pgfutil@secondoftwo#1#2{#2}
-\def\pgfutil@empty{}
-\def\pgfutil@gobble#1{}
-\def\pgfutil@gobbletwo#1#2{}
-\def\pgfutil@namedef#1{\expandafter\def\csname #1\endcsname}
-\long\def\pgfutil@g@addto@macro#1#2{%
- \begingroup
- \toks@\expandafter{#1#2}%
- \xdef#1{\the\toks@}%
- \endgroup}
-\newif\ifpgfutil@tempswa
-
-% pgfutil@ifnextchar
-
-\long\def\pgfutil@ifnextchar#1#2#3{%
- \let\pgfutil@reserved@d=#1%
- \def\pgfutil@reserved@a{#2}%
- \def\pgfutil@reserved@b{#3}%
- \futurelet\pgfutil@let@token\pgfutil@ifnch}
-\def\pgfutil@ifnch{%
- \ifx\pgfutil@let@token\pgfutil@sptoken
- \let\pgfutil@reserved@c\pgfutil@xifnch
- \else
- \ifx\pgfutil@let@token\pgfutil@reserved@d
- \let\pgfutil@reserved@c\pgfutil@reserved@a
- \else
- \let\pgfutil@reserved@c\pgfutil@reserved@b
- \fi
- \fi
- \pgfutil@reserved@c}
-{%
- \def\:{\global\let\pgfutil@sptoken= } \:
- \def\:{\pgfutil@xifnch} \expandafter\gdef\: {\futurelet\pgfutil@let@token\pgfutil@ifnch}
-}
-
-% pgfutil@in@
-
-\newif\ifpgfutil@in@
-\def\pgfutil@in@#1#2{%
- \def\pgfutil@in@@##1#1##2##3\pgfutil@in@@{%
- \ifx\pgfutil@in@##2\pgfutil@in@false\else\pgfutil@in@true\fi}%
- \pgfutil@in@@#2#1\pgfutil@in@\pgfutil@in@@}
-
-
-% pgfutil@for
-
-\def\pgfutil@nnil{\pgfutil@nil}
-\def\pgfutil@fornoop#1\@@#2#3{}
-\long\def\pgfutil@for#1:=#2\do#3{%
- \expandafter\def\expandafter\pgfutil@fortmp\expandafter{#2}%
- \ifx\pgfutil@fortmp\pgfutil@empty \else
- \expandafter\pgfutil@forloop#2,\pgfutil@nil,\pgfutil@nil\@@#1{#3}\fi}
-\long\def\pgfutil@forloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\pgfutil@nnil \else
- #5\def#4{#2}\ifx #4\pgfutil@nnil \else#5\pgfutil@iforloop #3\@@#4{#5}\fi\fi}
-\long\def\pgfutil@iforloop#1,#2\@@#3#4{\def#3{#1}\ifx #3\pgfutil@nnil
- \expandafter\pgfutil@fornoop \else
- #4\relax\expandafter\pgfutil@iforloop\fi#2\@@#3{#4}}
-\def\pgfutil@tfor#1:={\pgfutil@tf@r#1 }
-\long\def\pgfutil@tf@r#1#2\do#3{\def\pgfutil@fortmp{#2}\ifx\pgfutil@fortmp\space\else
- \pgfutil@tforloop#2\pgfutil@nil\pgfutil@nil\@@#1{#3}\fi}
-\long\def\pgfutil@tforloop#1#2\@@#3#4{\def#3{#1}\ifx #3\pgfutil@nnil
- \expandafter\pgfutil@fornoop \else
- #4\relax\expandafter\pgfutil@tforloop\fi#2\@@#3{#4}}
-
-
-% pgfutil@IfFileExists
-
-\chardef\pgfutil@inputcheck0
-\def\pgfutil@IfFileExists#1#2#3{%
- \openin\pgfutil@inputcheck#1 %
- \ifeof\pgfutil@inputcheck
- #3\relax
- \else
- #2\relax
- \fi
- \closein\pgfutil@inputcheck}
-
-\def\pgfutil@InputIfFileExists#1#2#3{\pgfutil@IfFileExists{#1}{\input #1\relax#2}{#3}}%
-
-
-% aux-read-hook
-
-\let\pgfutil@aux@read@hook=\relax
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def
deleted file mode 100644
index 4cd975d6600..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def
+++ /dev/null
@@ -1,297 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-
-
-
-% The aux files, needed for reading back coordinates
-\def\pgfutil@aux@read@hook{
- \pgfutil@IfFileExists{\jobname.pgf}{\input \jobname.pgf\relax}{}
- \csname newwrite\endcsname\pgfutil@auxout
- \csname openout\endcsname\pgfutil@auxout\jobname.pgf
-}
-
-% XColor-like support for ConTeXt
-
-\def\pgfutil@definecolor#1#2#3{\csname pgfutil@emu@#2\endcsname{#1}#3\@nil}
-
-\def\pgfutil@emu@rgb#1#2,#3,#4\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#3,#4}}}
-\def\pgfutil@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#2,#2}}}
-
-\pgfutil@definecolor{white}{gray}{1}
-\pgfutil@definecolor{black}{gray}{0}
-\pgfutil@definecolor{gray}{gray}{0.5}
-\pgfutil@definecolor{red}{rgb}{1,0,0}
-\pgfutil@definecolor{green}{rgb}{0,1,0}
-\pgfutil@definecolor{blue}{rgb}{0,0,1}
-\pgfutil@definecolor{cyan}{rgb}{0,1,1}
-\pgfutil@definecolor{magenta}{rgb}{1,0,1}
-\pgfutil@definecolor{yellow}{rgb}{1,1,0}
-\pgfutil@definecolor{orange}{rgb}{1,0.5,0}
-\pgfutil@definecolor{violet}{rgb}{0.5,0,0.5}
-\pgfutil@definecolor{purple}{rgb}{0.75,0,0.25}
-\pgfutil@definecolor{brown}{rgb}{0.75,0.5,0.25}
-
-\def\pgfutil@color#1{%
- \pgfutil@colorlet{.}{#1}%
- \pgfsysprotocol@getcurrentprotocol\pgfutil@emu@temp%
- {%
- \pgfsysprotocol@setcurrentprotocol\pgfutil@empty%
- \pgfsysprotocol@bufferedtrue%
- \pgfsetcolor{.}%
- \expandafter\pgfsys@outerinvoke\expandafter{\pgfsysprotocol@currentprotocol}%
- }%
- \pgfsysprotocol@setcurrentprotocol\pgfutil@emu@temp%
- \aftergroup\pgfutil@reset@color%
-}
-
-\def\pgfutil@extractcolorspec#1#2{%
- \def#2{{#1}}%
-}
-
-\def\pgfutil@convertcolorspec#1#2#3{%
- \edef#3{\expandafter\expandafter\expandafter\pgfutil@emu@select\csname\string\color@#1\endcsname}%
-}
-
-\let\pgfutil@doifcolorelse=\doifcolorelse
-
-
-\def\pgfutil@reset@color{%
- \pgfsysprotocol@getcurrentprotocol\pgfutil@emu@temp%
- {%
- \pgfsysprotocol@setcurrentprotocol\pgfutil@empty%
- \pgfsysprotocol@bufferedtrue%
- \pgfsetcolor{.}%
- \expandafter\pgfsys@outerinvoke\expandafter{\pgfsysprotocol@currentprotocol}%
- }%
- \pgfsysprotocol@setcurrentprotocol\pgfutil@emu@temp%
-}
-\expandafter\def\csname\string\color@.\endcsname{\xcolor@{}{}{rgb}{0,0,0}}
-
-\def\pgfutil@colorlet#1#2{%
- \edef\pgf@marshal{#2}%
- \expandafter\pgfutil@in@\expandafter!\expandafter{\pgf@marshal}%
- \ifpgfutil@in@%
- % compute mixture
- {%
- \expandafter\pgfutil@emu@mix\pgf@marshal!white!\@nil%
- \xdef\pgf@marshal{\noexpand\def\expandafter\noexpand\csname\string\color@#1\endcsname{%
- \noexpand\xcolor@{}{}{rgb}{\pgf@sys@tonumber\pgf@xa,\pgf@sys@tonumber\pgf@xb,\pgf@sys@tonumber\pgf@xc}}}%
- }%
- \pgf@marshal%
- \else%
- \expandafter\ifx\csname\string\color@#2\endcsname\relax%
- \pgfutil@registercolor{#2}%
- \fi%
- \edef\pgf@marshal{\noexpand\let\expandafter\noexpand\csname\string\color@#1\endcsname=%
- \expandafter\noexpand\csname\string\color@#2\endcsname}%
- \pgf@marshal%
- \fi%
-}
-\def\pgfutil@emu@mix#1!#2!#3!#4\@nil{%
- \expandafter\ifx\csname\string\color@#1\endcsname\relax%
- \pgfutil@registercolor{#1}%
- \fi%
- \expandafter\ifx\csname\string\color@#3\endcsname\relax%
- \pgfutil@registercolor{#3}%
- \fi%
- \expandafter\expandafter\expandafter\pgfutil@emu@unpack\csname\string\color@#1\endcsname%
- \pgf@ya=\pgf@xa%
- \pgf@yb=\pgf@xb%
- \pgf@yc=\pgf@xc%
- \expandafter\expandafter\expandafter\pgfutil@emu@unpack\csname\string\color@#3\endcsname%
- \c@pgf@counta=#2\relax%
- \c@pgf@countb=100\relax%
- \advance\c@pgf@countb by-\c@pgf@counta\relax%
- \pgf@xa=\c@pgf@countb\pgf@xa%
- \advance\pgf@xa by\c@pgf@counta\pgf@ya%
- \divide\pgf@xa by 100\relax%
- \pgf@xb=\c@pgf@countb\pgf@xb%
- \advance\pgf@xb by\c@pgf@counta\pgf@yb%
- \divide\pgf@xb by 100\relax%
- \pgf@xc=\c@pgf@countb\pgf@xc%
- \advance\pgf@xc by\c@pgf@counta\pgf@yc%
- \divide\pgf@xc by 100\relax%
-}
-\def\pgfutil@emu@unpack#1#2#3#4#5{%
- \pgfutil@emu@@unpack#5\@nil%
-}
-\def\pgfutil@emu@@unpack#1,#2,#3\@nil{%
- \pgf@xa=#1pt%
- \pgf@xb=#2pt%
- \pgf@xc=#3pt%
-}
-
-\def\pgfutil@emu@select#1#2#3#4#5{#5}
-
-
-\def\pgfutil@registercolor#1{%
- \edef\pgf@temp{\PDFcolor{#1}}%
- \edef\pgf@marshal{\noexpand\pgfutil@in@{ g}{\pgf@temp}}%
- \pgf@marshal%
- \ifpgfutil@in@%
- \expandafter\pgfutil@context@parse@gray\pgf@temp{#1}%
- \else%
- \edef\pgf@marshal{\noexpand\pgfutil@in@{ rg}{\pgf@temp}}%
- \pgf@marshal%
- \ifpgfutil@in@%
- \expandafter\pgfutil@context@parse@rgb\pgf@temp{#1}%
- \else%
- \PackageError{pgf}{Color #1 has an unsupported color model.}{}%
- \pgfutil@definecolor{#1}{gray}{0}
- \fi%
- \fi%
-}
-
-\def\pgfutil@context@parse@gray#1 g#2{%
- \pgfutil@definecolor{#2}{gray}{#1}
-}
-
-\def\pgfutil@context@parse@rgb#1 #2 #3 rg#4{%
- \pgfutil@definecolor{#4}{rgb}{#1,#2,#3}
-}
-
-
-
-% pgfutil@minipage
-
-\def\pgfutil@minipage[#1]#2{%
- \hbox to#2\bgroup%
- \hsize=#2\relax%
- \vbox\bgroup\leavevmode%
-}
-\def\pgfutil@endminipage{\egroup\egroup}
-
-
-
-% Driver detector (how should we do this in ConTeXt?) :
-
-\ifx\pdfoutput\@undefined\newcount\pdfoutput\fi
-\ifx\pdfoutput\relax\newcount\pdfoutput\fi
-\ifcase\pdfoutput%
- \gdef\Gin@driver{dvips.def}%
-\else%
- \gdef\Gin@driver{pdftex.def}%
-\fi%
-
-
-
-% Global colors
-
-\let\pgfutil@globalcolorsfalse=\relax
-\let\pgfutil@globalcolorstrue=\relax
-
-
-
-% Font stuff
-
-\def\pgfutil@font@tiny{\tfxx} % How to do this correctly?
-\def\pgfutil@font@scriptsize{\tfxx}
-\def\pgfutil@font@footnotesize{\tfx}
-\def\pgfutil@font@small{\tfx}
-\def\pgfutil@font@normalsize{\tf}
-\def\pgfutil@font@large{\tfa}
-\def\pgfutil@font@Large{\tfb}
-\def\pgfutil@font@huge{\tfc}
-\def\pgfutil@font@Huge{\tfc}
-
-\def\pgfutil@font@itshape{\it}
-\def\pgfutil@font@bfseries{\bf}
-
-\let\pgfutil@font@normalfont=\rm
-
-\let\pgfutil@selectfont=\rm
-
-
-% Extra counters, registers, boxes
-
-\newcount\pgfutil@tempcnta
-\newcount\pgfutil@tempcntb
-
-\newbox\pgfutil@tempboxa
-
-\newdimen\pgfutil@tempdima
-\newdimen\pgfutil@tempdimb
-
-
-% Module stuff
-
-\def\pgfutil@usemodule#1{\usemodule[#1]}
-
-
-
-% The following is still messy and needs to be cleanup up (everything
-% prefixed by pgfutil@):
-
-\def\PackageInfo#1#2{}
-\def\PackageWarning#1#2{\immediate\write-1{Package #1: Warning! #2.}}%
-\def\PackageError#1#2#3{\immediate\write-1{Package #1: Error! #2.}}%
-\long\def\AtBeginDocument#1{#1}%
-\long\def\AtBeginDvi#1{#1}%
-
-\ifx\setkeys\@undefined
-\def\setkeys#1#2{%
- \def\KV@prefix{KV@#1@}%
- \let\@tempc\relax
- \KV@do#2,\relax,}
-\def\KV@do#1,{%
- \ifx\relax#1\pgfutil@empty\else
- \KV@split#1==\relax
- \expandafter\KV@do\fi}
-\def\KV@split#1=#2=#3\relax{%
- \KV@@sp@def\@tempa{#1}%
- \ifx\@tempa\pgfutil@empty\else
- \expandafter\let\expandafter\@tempc
- \csname\KV@prefix\@tempa\endcsname
- \ifx\@tempc\relax
- \KV@errx
- {\@tempa\space undefined}%
- \else
- \ifx\pgfutil@empty#3\pgfutil@empty
- \KV@default
- \else
- \KV@@sp@def\@tempb{#2}%
- \expandafter\@tempc\expandafter{\@tempb}\relax
- \fi
- \fi
- \fi}
-\def\KV@default{%
- \expandafter\let\expandafter\@tempb
- \csname\KV@prefix\@tempa @default\endcsname
- \ifx\@tempb\relax
- \KV@errx{No value specified for \@tempa}%
- \else
- \@tempb\relax
- \fi}
-\def\KV@errx#1{\PackageError{keyval}{#1}{}}
-\def\@tempa#1{%
-\def\KV@@sp@def##1##2{%
- \futurelet\KV@tempa\KV@@sp@d##2\@nil\@nil#1\@nil\relax##1}%
-\def\KV@@sp@d{%
- \ifx\KV@tempa\@sptoken
- \expandafter\KV@@sp@b
- \else
- \expandafter\KV@@sp@b\expandafter#1%
- \fi}%
-\def\KV@@sp@b#1##1 \@nil{\KV@@sp@c##1}%
- }
-\@tempa{ }
-\def\KV@@sp@c#1\@nil#2\relax#3{\KV@toks@{#1}\edef#3{\the\KV@toks@}}
-\def\define@key#1#2{%
- \pgfutil@ifnextchar[{\KV@def{#1}{#2}}{\pgfutil@namedef{KV@#1@#2}####1}}
-\def\KV@def#1#2[#3]{%
- \pgfutil@namedef{KV@#1@#2@default\expandafter}\expandafter
- {\csname KV@#1@#2\endcsname{#3}}%
- \pgfutil@namedef{KV@#1@#2}##1}
-\fi%
-
-
-\newtoks\KV@toks@
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
deleted file mode 100644
index 5941eeb2b80..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
+++ /dev/null
@@ -1,62 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-
-\catcode`\@=11\relax
-
-\let\pgfutil@auxout=\@auxout
-\let\pgfutil@tempcnta=\@tempcnta
-\let\pgfutil@tempcntb=\@tempcntb
-
-\def\pgfutil@definecolor{\definecolor}
-\def\pgfutil@color{\color}
-\def\pgfutil@colorlet{\colorlet}
-\def\pgfutil@extractcolorspec{\extractcolorspec}
-\def\pgfutil@convertcolorspec{\convertcolorspec}
-
-\def\pgfutil@globalcolorsfalse{\let\ifglobalcolors\iffalse}
-\def\pgfutil@globalcolorstrue{\let\ifglobalcolors\iftrue}
-
-\let\pgfutil@minipage=\minipage
-\let\pgfutil@endminipage=\endminipage
-
-\def\pgfutil@doifcolorelse#1#2#3{%
- \expandafter\ifx\csname\string\color@#1\endcsname\relax%
- \let\pgf@next=\pgfutil@secondoftwo%
- \else
- \let\pgf@next=\pgfutil@firstoftwo%
- \fi%
- \pgf@next{#2}{#3}%
-}
-
-\def\pgfutil@font@tiny{\tiny}
-\def\pgfutil@font@scriptsize{\scriptsize}
-\def\pgfutil@font@footnotesize{\footnotesize}
-\def\pgfutil@font@small{\small}
-\def\pgfutil@font@normalsize{\normalsize}
-\def\pgfutil@font@large{\large}
-\def\pgfutil@font@Large{\Large}
-\def\pgfutil@font@huge{\huge}
-\def\pgfutil@font@Huge{\Huge}
-
-\def\pgfutil@font@itshape{\itshape}
-\def\pgfutil@font@bfseries{\bfseries}
-
-\def\pgfutil@font@normalfont{\normalfont}
-
-\def\pgfutil@usemodule#1{\usepackage{#1}}
-
-\let\pgfutil@selectfont=\selectfont
-
-\let\pgfutil@tempboxa=\@tempboxa
-
-\let\pgfutil@tempdima=\@tempdima
-\let\pgfutil@tempdimb=\@tempdimb
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def
deleted file mode 100644
index e69159cabb0..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def
+++ /dev/null
@@ -1,281 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-
-
-
-
-% The aux files, needed for reading back coordinates
-\def\pgfutil@aux@read@hook{
- \pgfutil@IfFileExists{\jobname.pgf}{\input \jobname.pgf\relax}{}
- \csname newwrite\endcsname\pgfutil@auxout
- \csname openout\endcsname\pgfutil@auxout\jobname.pgf
-}
-
-
-% XColor-like support for plain TeX
-
-\def\pgfutil@definecolor#1#2#3{\csname pgfutil@emu@#2\endcsname{#1}#3\@nil}
-
-\def\pgfutil@emu@rgb#1#2,#3,#4\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#3,#4}}}
-\def\pgfutil@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#2,#2}}}
-
-\pgfutil@definecolor{white}{gray}{1}
-\pgfutil@definecolor{black}{gray}{0}
-\pgfutil@definecolor{gray}{gray}{0.5}
-\pgfutil@definecolor{red}{rgb}{1,0,0}
-\pgfutil@definecolor{green}{rgb}{0,1,0}
-\pgfutil@definecolor{blue}{rgb}{0,0,1}
-\pgfutil@definecolor{cyan}{rgb}{0,1,1}
-\pgfutil@definecolor{magenta}{rgb}{1,0,1}
-\pgfutil@definecolor{yellow}{rgb}{1,1,0}
-\pgfutil@definecolor{orange}{rgb}{1,0.5,0}
-\pgfutil@definecolor{violet}{rgb}{0.5,0,0.5}
-\pgfutil@definecolor{purple}{rgb}{0.75,0,0.25}
-\pgfutil@definecolor{brown}{rgb}{0.75,0.5,0.25}
-
-\def\pgfutil@color#1{%
- \pgfutil@colorlet{.}{#1}%
- \pgfsysprotocol@getcurrentprotocol\pgfutil@emu@temp%
- {%
- \pgfsysprotocol@setcurrentprotocol\pgfutil@empty%
- \pgfsysprotocol@bufferedtrue%
- \pgfsetcolor{.}%
- \expandafter\pgfsys@outerinvoke\expandafter{\pgfsysprotocol@currentprotocol}%
- }%
- \pgfsysprotocol@setcurrentprotocol\pgfutil@emu@temp%
- \aftergroup\pgfutil@reset@color%
-}
-
-\def\pgfutil@extractcolorspec#1#2{%
- \def#2{{#1}}%
-}
-
-\def\pgfutil@convertcolorspec#1#2#3{%
- \edef#3{\expandafter\expandafter\expandafter\pgfutil@emu@select\csname\string\color@#1\endcsname}%
-}
-
-
-\def\pgfutil@doifcolorelse#1#2#3{%
- \expandafter\ifx\csname\string\color@#1\endcsname\relax%
- \let\pgf@next=\pgfutil@secondoftwo%
- \else
- \let\pgf@next=\pgfutil@firstoftwo%
- \fi%
- \pgf@next{#2}{#3}%
-}
-
-
-\def\pgfutil@reset@color{%
- \pgfsysprotocol@getcurrentprotocol\pgfutil@emu@temp%
- {%
- \pgfsysprotocol@setcurrentprotocol\pgfutil@empty%
- \pgfsysprotocol@bufferedtrue%
- \pgfsetcolor{.}%
- \expandafter\pgfsys@outerinvoke\expandafter{\pgfsysprotocol@currentprotocol}%
- }%
- \pgfsysprotocol@setcurrentprotocol\pgfutil@emu@temp%
-}
-\expandafter\def\csname\string\color@.\endcsname{\xcolor@{}{}{rgb}{0,0,0}}
-
-\def\pgfutil@colorlet#1#2{%
- \edef\pgf@marshal{#2}%
- \expandafter\pgfutil@in@\expandafter!\expandafter{\pgf@marshal}%
- \ifpgfutil@in@%
- % compute mixture
- {%
- \expandafter\pgfutil@emu@mix\pgf@marshal!white!\@nil%
- \xdef\pgf@marshal{\noexpand\def\expandafter\noexpand\csname\string\color@#1\endcsname{%
- \noexpand\xcolor@{}{}{rgb}{\pgf@sys@tonumber\pgf@xa,\pgf@sys@tonumber\pgf@xb,\pgf@sys@tonumber\pgf@xc}}}%
- }%
- \pgf@marshal%
- \else%
- \edef\pgf@marshal{\noexpand\let\expandafter\noexpand\csname\string\color@#1\endcsname=%
- \expandafter\noexpand\csname\string\color@#2\endcsname}%
- \pgf@marshal%
- \fi%
-}
-\def\pgfutil@emu@mix#1!#2!#3!#4\@nil{%
- \expandafter\expandafter\expandafter\pgfutil@emu@unpack\csname\string\color@#1\endcsname%
- \pgf@ya=\pgf@xa%
- \pgf@yb=\pgf@xb%
- \pgf@yc=\pgf@xc%
- \expandafter\expandafter\expandafter\pgfutil@emu@unpack\csname\string\color@#3\endcsname%
- \c@pgf@counta=#2\relax%
- \c@pgf@countb=100\relax%
- \advance\c@pgf@countb by-\c@pgf@counta\relax%
- \pgf@xa=\c@pgf@countb\pgf@xa%
- \advance\pgf@xa by\c@pgf@counta\pgf@ya%
- \divide\pgf@xa by 100\relax%
- \pgf@xb=\c@pgf@countb\pgf@xb%
- \advance\pgf@xb by\c@pgf@counta\pgf@yb%
- \divide\pgf@xb by 100\relax%
- \pgf@xc=\c@pgf@countb\pgf@xc%
- \advance\pgf@xc by\c@pgf@counta\pgf@yc%
- \divide\pgf@xc by 100\relax%
-}
-\def\pgfutil@emu@unpack#1#2#3#4#5{%
- \pgfutil@emu@@unpack#5\@nil%
-}
-\def\pgfutil@emu@@unpack#1,#2,#3\@nil{%
- \pgf@xa=#1pt%
- \pgf@xb=#2pt%
- \pgf@xc=#3pt%
-}
-
-\def\pgfutil@emu@select#1#2#3#4#5{#5}
-
-
-
-\let\definecolor=\pgfutil@definecolor
-\let\color=\pgfutil@color
-\let\colorlet=\pgfutil@colorlet
-\let\extractcolorspec=\pgfutil@extractcolorspec
-\let\convertcolorspec=\pgfutil@convertcolorspec
-
-
-
-
-% pgfutil@minipage
-
-\def\pgfutil@minipage[#1]#2{%
- \hbox to#2\bgroup%
- \hsize=#2\relax%
- \vbox\bgroup\leavevmode%
-}
-\def\pgfutil@endminipage{\egroup\egroup}
-
-
-
-% Driver detector (not so good):
-
-\ifx\pdfoutput\@undefined\alloc@0\count\countdef\insc@unt\pdfoutput\fi
-\ifx\pdfoutput\relax\alloc@0\count\countdef\insc@unt\pdfoutput\fi
-\ifcase\pdfoutput%
- \gdef\Gin@driver{dvips.def}%
-\else%
- \gdef\Gin@driver{pdftex.def}%
-\fi%
-
-
-% Global colors
-
-\let\pgfutil@globalcolorsfalse=\relax
-\let\pgfutil@globalcolorstrue=\relax
-
-
-
-% Font stuff
-
-\def\pgfutil@font@tiny{\fam\z@\fiverm} % How to do this correctly?
-\def\pgfutil@font@scriptsize{\fam\z@\sevenrm}
-\def\pgfutil@font@footnotesize{\rm}
-\def\pgfutil@font@small{\fam\z@\ninerm}
-\def\pgfutil@font@normalsize{\rm}
-\def\pgfutil@font@large{\rm}
-\def\pgfutil@font@Large{\rm}
-\def\pgfutil@font@huge{\rm}
-\def\pgfutil@font@Huge{\rm}
-
-\def\pgfutil@font@itshape{\it}
-\def\pgfutil@font@bfseries{\bf}
-
-\let\pgfutil@font@normalfont=\rm
-
-\let\pgfutil@selectfont=\rm
-
-
-% Extra counters, registers, boxes
-
-\newcount\pgfutil@tempcnta
-\newcount\pgfutil@tempcntb
-
-\newbox\pgfutil@tempboxa
-
-\newdimen\pgfutil@tempdima
-\newdimen\pgfutil@tempdimb
-
-
-% Module stuff
-
-\def\pgfutil@usemodule#1{\input #1.tex}
-
-
-
-% The following is still messy and needs to be cleanup up (everything
-% prefixed by pgfutil@):
-
-\def\PackageInfo#1#2{}
-\def\PackageWarning#1#2{\immediate\write-1{Package #1: Warning! #2.}}%
-\def\PackageError#1#2#3{\immediate\write-1{Package #1: Error! #2.}}%
-\long\def\AtBeginDocument#1{#1}%
-\long\def\AtBeginDvi#1{#1}%
-
-\ifx\setkeys\@undefined
-\def\setkeys#1#2{%
- \def\KV@prefix{KV@#1@}%
- \let\@tempc\relax
- \KV@do#2,\relax,}
-\def\KV@do#1,{%
- \ifx\relax#1\pgfutil@empty\else
- \KV@split#1==\relax
- \expandafter\KV@do\fi}
-\def\KV@split#1=#2=#3\relax{%
- \KV@@sp@def\@tempa{#1}%
- \ifx\@tempa\pgfutil@empty\else
- \expandafter\let\expandafter\@tempc
- \csname\KV@prefix\@tempa\endcsname
- \ifx\@tempc\relax
- \KV@errx
- {\@tempa\space undefined}%
- \else
- \ifx\pgfutil@empty#3\pgfutil@empty
- \KV@default
- \else
- \KV@@sp@def\@tempb{#2}%
- \expandafter\@tempc\expandafter{\@tempb}\relax
- \fi
- \fi
- \fi}
-\def\KV@default{%
- \expandafter\let\expandafter\@tempb
- \csname\KV@prefix\@tempa @default\endcsname
- \ifx\@tempb\relax
- \KV@errx{No value specified for \@tempa}%
- \else
- \@tempb\relax
- \fi}
-\def\KV@errx#1{\PackageError{keyval}{#1}{}}
-\def\@tempa#1{%
-\def\KV@@sp@def##1##2{%
- \futurelet\KV@tempa\KV@@sp@d##2\@nil\@nil#1\@nil\relax##1}%
-\def\KV@@sp@d{%
- \ifx\KV@tempa\@sptoken
- \expandafter\KV@@sp@b
- \else
- \expandafter\KV@@sp@b\expandafter#1%
- \fi}%
-\def\KV@@sp@b#1##1 \@nil{\KV@@sp@c##1}%
- }
-\@tempa{ }
-\def\KV@@sp@c#1\@nil#2\relax#3{\KV@toks@{#1}\edef#3{\the\KV@toks@}}
-\def\define@key#1#2{%
- \pgfutil@ifnextchar[{\KV@def{#1}{#2}}{\pgfutil@namedef{KV@#1@#2}####1}}
-\def\KV@def#1#2[#3]{%
- \pgfutil@namedef{KV@#1@#2@default\expandafter}\expandafter
- {\csname KV@#1@#2\endcsname{#3}}%
- \pgfutil@namedef{KV@#1@#2}##1}
-\fi%
-
-
-\newtoks\KV@toks@
-
-
-
-\endinput