summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/basiclayer
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-05 22:40:38 +0000
committerKarl Berry <karl@freefriends.org>2019-01-05 22:40:38 +0000
commit22536bb2b5257046d271b1eaa11b4a275d5ec041 (patch)
tree2500eaf5c26b11e00ebd33a64fccfa332cd5a66c /Master/texmf-dist/tex/generic/pgf/basiclayer
parentcf794f0e2db6857972a9d48d4466a4f03a7057a0 (diff)
pgf (5jan19)
git-svn-id: svn://tug.org/texlive/trunk@49607 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/basiclayer')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex164
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex37
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex3
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex16
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex21
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex655
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex46
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex183
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex14
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex417
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex228
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex228
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex42
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex124
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex26
18 files changed, 1393 insertions, 821 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
index 8a7ab4a2862..cae780ebfba 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
@@ -7,9 +7,10 @@
%
% 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.7 2010/04/11 07:09:19 ludewich Exp $
+\ProvidesPackageRCS{pgfcore.code.tex}
\newif\ifpgf@draftmode
+\def\pgf@typeout{\immediate\write0}
\input pgfmath.code.tex
@@ -28,8 +29,9 @@
\input pgfcorelayers.code.tex
\input pgfcoretransparency.code.tex
\input pgfcorepatterns.code.tex
+\input pgfcorerdf.code.tex
\pgfutil@ifundefined{pgf@texdist@protect}{%
- \def\pgf@texdist@protect{}%
+ \def\pgf@texdist@protect{}%
}{}
\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
index 887e86e00e7..843a8cd23f4 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorearrows.code.tex,v 1.43 2015/05/14 14:43:05 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfcorearrows.code.tex}
@@ -19,7 +19,7 @@
%
% This command is used to define a new arrow tip kind. For more
% details on the description of the keys, please see the pgfmanual.
-%
+%
% name = Name of the arrow. If the name contains a dash
% (hyphen), the text before the hyphen is the start name
% and the text behind it the end name.
@@ -36,7 +36,7 @@
% will then be available inside the "code". Values needed
% only for the "... end" keys and the convex hull do not
% need to be saved since these are also executed only
-% once.
+% once.
% drawing code = Code for drawing the arrow. When the cache key is set to
% true, which is the default, the code will be protocolled
% and the resulting code is inserted using \pgflowlevelobj.
@@ -56,10 +56,10 @@
% arrow tip was already installed with the same macro
% names (and caching is true), the cached code is
% used. Note that when you use dimensions here, add \the.
-%
-% Inside the setup code, the following macros are available:
%
-% \pgfarrowsettipend
+% Inside the setup code, the following macros are available:
+%
+% \pgfarrowssettipend
% The code should draw an arrow pointing "right along the x
% axis". The "tip" key specifies how far the arrow goes
% along the x axis, that is, it should be the x coordinate
@@ -69,20 +69,20 @@
% "\pgfarrowresult", which is \let to be equal to
% \pgf@x. A \relax will be added after the code provided
% here, so you can write things like "\pgfarrowresult=1pt".
-% \pgfarrowsetbackend
+% \pgfarrowssetbackend
% The leftmost x-coordinate that is still part of the
% arrow tip (the "back end" of the arrow"). This coordinate
% will be used when multiple arrow tips are
% composed. Defaults to 0pt.
-% \pgfarrowsetlineend
+% \pgfarrowssetlineend
% The x-coordinate where a line should stop inside the arrow
% tip so that it gets "obscured" by the arrow. Defaults to 0pt.
-% \pgfarrowsetvisualtipend
+% \pgfarrowssetvisualtipend
% When the arrow tip is drawn in flex mode, it is rotated
% such that the x-coordinates of "visual tip end" and "visual
-% back end" lie on the path. Defaults to \pgfarrowsettipend.
-% \pgfarrowsetvisualbackend
-% See above. Defaults to \pgfarrowsetbackend
+% back end" lie on the path. Defaults to \pgfarrowssettipend.
+% \pgfarrowssetvisualbackend
+% See above. Defaults to \pgfarrowssetbackend
\def\pgfdeclarearrow#1{%
\let\pgf@decl@arrow@defaults\pgfutil@empty%
@@ -136,10 +136,10 @@
\expandafter\let\csname pgf@ar@do@cache@\pgf@decl@arrow@name@end\endcsname\pgf@decl@arrow@cache%
\else%
\pgferror{Arrow tip '\pgf@decl@arrow@name@end' was already
- defined with key 'means' previously and you cannot change this}%
+ defined with key 'means' previously and you cannot change this}%
\fi%
\else%
- \pgferror{You cannot set both the 'means' and also the 'drawing code'
+ \pgferror{You cannot set both the 'means' and also the 'drawing code'
keys for arrow tip '\pgf@decl@arrow@name@end'}%
\fi%
\fi%
@@ -185,11 +185,11 @@
% Handler for defining arrow tips:
-%
+%
% Description:
-%
+%
% When you write "my name/.tip = arrow spec", this has the same
-% effect as writeing \pgfdeclarearrow{name = my name, means = arrow spec}.
+% effect as writing \pgfdeclarearrow{name = my name, means = arrow spec}.
\pgfkeys{/handlers/.tip/.code=%
\expandafter\expandafter\expandafter\pgf@arrows@unravel\pgfkeyscurrentpath/\pgf@stop%
@@ -201,11 +201,11 @@
% Draw an arrow
-%
+%
% #1 = arrow specification
-%
+%
% Description:
-%
+%
% Draws the arrow in the given specification (and "end"
% specification). The arrow will be drawn such that it touches the
% origin "from the left", that is, the arrow will lie completely in
@@ -223,14 +223,14 @@
% Compute the length of an arrow
-%
+%
% #1 = arrow specification
-%
+%
% Description:
-%
+%
% In \pgf@x, this will return the total length of the arrow given as
% #1, in \pgf@xa it will return the distance from the tip to the line
-% end.
+% end.
\def\pgfarrowtotallength#1{%
{%
@@ -250,10 +250,10 @@
% #1 = An arrow specification
%
% Description:
-%
+%
% An "arrow specification" is a sequence of names of meta arrow tips
% together with options in brackets. In detail:
-%
+%
% In #1, consider the text from the start up to the first bracket. If
% this text is the name of a (meta) arrow tip, we use this arrow tip
% with the provided options. If it is the name of a arrow tip
@@ -261,8 +261,8 @@
% each arrow tip inside the shorthand. If the text is neither or the
% above, the first letter of text is treated as a shorthand without
% options.
-%
-% The special arrow tip "." is used to indicate the end of the line.
+%
+% The special arrow tip "." is used to indicate the end of the line.
%
% \pgfsetarrowsend{stealth[reversed]}
% \pgfsetarrowsend{stealth[length=1pt] . stealth[length=2pt]}
@@ -322,11 +322,11 @@
\fi%
\fi%
\fi%
- \expandafter\pgf@next\pgf@temp[%
+ \expandafter\pgf@next\pgf@temp[%
}
\def\pgf@arrows@empty[#1]{%
- \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
+ \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
}
\def\pgf@arrows@single@char@parser#1{%
@@ -343,13 +343,13 @@
\let\pgf@temp\pgf@untranslated%
\let\pgf@next\pgf@arrows@unknown%
\else%
- \let\pgf@next\pgf@arrows@shorthand@parsed%
+ \let\pgf@next\pgf@arrows@shorthand@parsed%
\fi%
\else%
- \let\pgf@next\pgf@arrows@meta@parsed%
+ \let\pgf@next\pgf@arrows@meta@parsed%
\fi
\fi
- \expandafter\pgf@next\pgf@temp[]%
+ \expandafter\pgf@next\pgf@temp[]%
}
\def\pgf@arrows@unknown#1[]#2[#3]{%
\pgferror{Unknown arrow tip kind '#1#2'}%
@@ -357,12 +357,12 @@
\def\pgf@arrows@meta@parsed#1[#2]{%
% Ok, run the keys #2. This will add commands to \pgf@arrows@options:
- %
+ %
\let\pgf@arrows@options\pgf@arrows@options@initial%
\pgfkeys{/pgf/arrow keys/.cd,#2}%
% Append the arrow and its options to the arrow tip sequence:
\expandafter\pgf@arrows@meta@set\expandafter{\pgf@arrows@options}{#1}{\pgf@arrow@handle}%
- \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
+ \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
}
\def\pgf@arrows@parser@done#1{%
@@ -370,7 +370,7 @@
\def\pgf@arrows@dot@parsed#1[#2]{%
\pgf@arrows@append@to@tips{\pgf@arrow@handle@dot}%
- \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
+ \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
}
\def\pgf@arrows@meta@set#1#2#3{%
@@ -385,7 +385,7 @@
\fi%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\pgf@arrow@tip@sequence%
- \expandafter\expandafter\expandafter{\expandafter\pgf@tempa\pgf@tempb}%
+ \expandafter\expandafter\expandafter{\expandafter\pgf@tempa\pgf@tempb}%
}
\def\pgf@arrows@shorthand@parsed#1[#2]{%
@@ -398,7 +398,7 @@
\expandafter\expandafter\expandafter\pgf@arrows@meta@set\expandafter\expandafter\expandafter{%
\expandafter\pgf@arrows@options\expandafter}\expandafter{\csname pgf@ar@means@#1\endcsname}{\pgf@arrow@handle@shorthand}%
\fi%
- \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
+ \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
}
@@ -426,7 +426,7 @@
% #1 = An arrow specification
%
% Description:
-%
+%
% This works like \pgfsetarrowsend, only the order of the tips in the
% arrow specification is reversed and the "reversed names" are used.
%
@@ -517,14 +517,14 @@
},
fill/.value required,
open/.style={fill=none},
- .unknown/.code={
+ .unknown/.code={
\expandafter\pgfutil@in@\expandafter!\expandafter{\pgfkeyscurrentname}%
\ifpgfutil@in@%
% this is a color!
\expandafter\pgfarrowsaddtooptions\expandafter{\expandafter\def\expandafter\pgf@arrows@stroke@color\expandafter{\pgfkeyscurrentname}}%
\else%
\pgfutil@doifcolorelse{\pgfkeyscurrentname}
- {%
+ {%
\expandafter\pgfarrowsaddtooptions\expandafter{\expandafter\def\expandafter\pgf@arrows@stroke@color\expandafter{\pgfkeyscurrentname}}%
}
{%
@@ -586,7 +586,7 @@
\pgf@x#1%
\ifdim\pgfinnerlinewidth>0pt%
\pgf@arrows@inner@line@width@dep{#2}{#3}%
- \else%
+ \else%
\advance\pgf@x by#2\pgflinewidth%
\fi%
}
@@ -618,12 +618,12 @@
\def\pgf@arrow@id@count{0}%
% Compute the arrow id of an arrow
-%
+%
% #1 = arrow name
% #2 = options
-%
+%
% Description:
-%
+%
% Returns the an id in \pgf@arrow@id that identifies the instantiation
% of the given arrow. If the arrow was not instantiated, this happens now.
@@ -637,7 +637,7 @@
% 3. Local:
#2\relax%
% 4. Nested:
- \pgf@arrows@nested@options%
+ \pgf@arrows@nested@options%
% 5. Last options:
\pgf@arrows@late@options%
% 6. Scaling:
@@ -658,6 +658,7 @@
\expandafter\global\expandafter\let\csname\pgf@arrow@fullname{#1}\endcsname\pgf@arrow@id@count%
\global\let\pgf@arrow@id\pgf@arrow@id@count%
{%
+ \pgfclearid%
\csname pgf@ar@setup@#1\endcsname%
% Handle reversal
\ifpgfarrowreversed%
@@ -773,12 +774,12 @@
\def\pgfarrowssetvisualbackend#1{\pgf@x#1\edef\pgf@arrows@the@visualbackend{\the\pgf@x}}
-% Internal computatin of the line end (shortening) for an arrow
-%
+% Internal computation of the line end (shortening) for an arrow
+%
% #1 = arrow tip list
-%
+%
% Description:
-%
+%
% \pgf@xa will contain the necessary path shortening for the given
% arrow tip list, \pgf@xb will contain the total length of the arrow
% tip list (sum of the differences between tip end and back end plus
@@ -820,15 +821,52 @@
+\def\pgf@arrow@rigid@arrow#1#2{%
+ {%
+ \pgf@xb=#2%
+ \pgftransformxshift{-\pgf@xb}%
+ \let\pgf@arrow@handle\pgf@arrow@rigid
+ \let\pgf@arrow@handle@dot\relax%
+ #1%
+ }%
+}
+
+
+\def\pgf@arrow@rigid#1#2{%
+ % Prepare:
+ {%
+ \pgfarrows@getid{#1}{#2}%
+ % Do shift:
+ \expandafter\expandafter\expandafter\pgf@arrow@drawer@shift\csname pgf@ar@ends@\pgf@arrow@id\endcsname%
+ % Do slant:
+ \ifdim\pgfarrows@slant pt=0pt%
+ \else%
+ \pgftransformxslant{\pgfarrows@slant}%
+ \fi%
+ % do swap:
+ \ifpgfarrowswap%
+ \pgftransformyscale{-1}%
+ \fi%
+ {%
+ \csname pgf@ar@saves@\pgf@arrow@id\endcsname%
+ \pgf@arrows@rigid@hull%
+ }%
+ \expandafter}%
+ % Transform to next tip:
+ \expandafter\pgftransformxshift\expandafter{\the\pgf@xc}%
+}
+
+
+
% Draw an arrow
-%
+%
% #1 = arrow tip list
% #2 = total length of the arrow (the value of \pgf@xb computed by
% \pgf@arrow@compute@shortening)
-%
+%
% Description:
-%
+%
% Draws an arrow tip list. The coordinate system must have been
% transformed so that the to-be-drawn arrow points right and should
% "end" at the origin.
@@ -850,7 +888,7 @@
\pgfarrows@getid{#1}{#2}%
% Do shift:
\expandafter\expandafter\expandafter\pgf@arrow@drawer@shift\csname pgf@ar@ends@\pgf@arrow@id\endcsname%
- % Do slant:
+ % Do slant:
\ifdim\pgfarrows@slant pt=0pt%
\else%
\pgftransformxslant{\pgfarrows@slant}%
@@ -866,7 +904,7 @@
\pgflowlevelsynccm\csname pgf@ar@cache@\pgf@arrow@id\endcsname%
\endpgfscope%
\pgf@arrows@rigid@hull%
- }%
+ }%
\expandafter}%
% Transform to next tip:
\expandafter\pgftransformxshift\expandafter{\the\pgf@xc}%
@@ -890,7 +928,7 @@
\pgf@arrows@color@setup@restore@std@colors
\pgfsetfillcolor{pgfstrokecolor}%
\fi%
- \else%
+ \else%
\pgf@arrows@color@setup@restore@std@colors
\pgfsetfillcolor{\pgf@arrows@fill@color}%
\fi%
@@ -958,12 +996,13 @@
}
+
% Sets arrows
%
% #1 = An arrow specification of the form
% <start spec>-<end spec>. This will call \pgfsetstartarrow{start
% spec} and \pgfsetendarrow{end spec}.
-%
+%
% Alternatively, it may be of the form [options]. In this case,
% the arrow options are set for the local scope and all arrows in
% the current scope will have these options set.
@@ -986,7 +1025,7 @@
\pgfutil@ifnextchar\pgf@stop{%
\let\pgf@arrows@options\pgf@arrows@options@scope%
\pgfkeys{/pgf/arrow keys/.cd,#1}%
- \let\pgf@arrows@options@scope\pgf@arrows@options%
+ \let\pgf@arrows@options@scope\pgf@arrows@options%
% Ok, setup the options
\pgfutil@gobble%
}{%
@@ -999,10 +1038,9 @@
-
%
% Predefined arrows:
-%
+%
% A dot is used to indicate the end of the line:
@@ -1036,7 +1074,7 @@
-% Compatibility with old arrow system:
+% Compatibility with old arrow system:
\pgfkeys {}
@@ -1054,7 +1092,7 @@
\def\pgfsetarrowoptions#1#2{\expandafter\def\csname pgf@arrow@compat@opt@#1\endcsname{#2}}
\def\pgfgetarrowoptions#1{\csname pgf@arrow@compat@opt@#1\endcsname}
\def\pgfarrowsdeclare#1#2#3#4{%
- \pgfdeclarearrow{ name ={#1}-{#2}, setup code ={#3}, drawing code={#4}, parameters/.expand once={\csname pgf@arrow@compat@opt@#2\endcsname}}
+ \pgfdeclarearrow{ name ={#1}-{#2}, setup code ={#3}, drawing code={#4}, parameters/.expand once={\csname pgf@arrow@compat@opt@#2\endcsname}}%
\expandafter\def\csname pgf@arrow@compat@opt@#2\endcsname{0}}
\def\pgfarrowsleftextend#1{\pgfmathsetlength\pgf@xa{#1}\pgfarrowssetbackend{\pgf@xa}}
\def\pgfarrowsrightextend#1{\pgfmathsetlength\pgf@xb{#1}\pgfarrowssettipend{\pgf@xb}}
@@ -1213,5 +1251,3 @@
\endinput
-
-
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
index 31fa80f3635..8e150972a97 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreexternal.code.tex,v 1.21 2014/07/09 14:01:22 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfcoreexternal.code.tex}
@@ -51,8 +51,8 @@
% ignored. Otherwise, the code is executed normally.
%
% Things change when you run tex on your file with the \jobname set to
-% the name of a decalred graphics name. In this case, only your
-% graphic will be typeset, the rest of the document will be "thrown away".
+% the name of a declared graphics name. In this case, only your
+% graphic will be typeset, the rest of the document will be "thrown away".
% To be more precise, everything is gobbled up to the beginning
% of the first \beginpgfexternal with the given graphics name. Then,
% the content of the "environment" is put in a box (this "environment"
@@ -80,7 +80,7 @@
%
% This command is used to tell pgf that the file named #1 should be
% typeset normally. If \jobname is not equal to #1, only
-% the graphic called \jobname will be typeset.
+% the graphic called \jobname will be typeset.
%
% Example:
%
@@ -128,7 +128,7 @@
% this context anyway).
%
% This here works well:
- \immediate\write16{Package TikZ externalization: calling \string\geometry{driver=none} during externalization.^^J}%
+ \pgf@typeout{Package TikZ externalization: calling \string\geometry{driver=none} during externalization.^^J}%
\geometry{driver=none}%
}%
}%
@@ -141,7 +141,7 @@
\let\pgfexternal@nofiles@=\relax
\def\relax{\relax}%
%
- % suppress generation of LaTeX .aux, .toc etc files.
+ % suppress generation of LaTeX .aux, .toc etc files.
% generation of these files is not thread-safe.
% the \csname \endcsname yields \relax if \nofiles doesn't exist.
\csname nofiles\endcsname
@@ -211,7 +211,7 @@
\AtBeginDocument{
- \let\beginpgfgraphicnamed=\pgf@externalbegin% overwrite definition of pgfexternal.tex if necessary
+ \let\beginpgfgraphicnamed=\pgf@externalbegin% overwrite definition of pgfexternal.tex if necessary
\let\endpgfgraphicnamed=\unskip
}
@@ -227,7 +227,7 @@
\else%
\let\pgf@next=\pgf@replacepicturebygraphic%
\fi%
- \pgf@next%
+ \pgf@next%
}
\long\def\pgf@replacepicturebygraphic#1\endpgfgraphicnamed{%
@@ -262,12 +262,12 @@
% Reads the .dpth file which contains meta data of the external
% picture.
-%
+%
% This command handles the following stuff:
% - it defines \pgfexternaldepth . The macro contains the contents of
% a line which does not start with a control sequence (for example a
% line containing '50pt')
-% - it defines \pgfexternaltrimleft and \pgfexternaltrimright
+% - it defines \pgfexternaltrimleft and \pgfexternaltrimright
% - it checks if the .dpth file contains content stored by means of
% \pgfexternalstorecommand. If so, the argument of
% \pgfexternalstorecommand will be restored.
@@ -339,11 +339,11 @@
\toks0={#1}%
% believe it or not, but the
% \def\dpthimport{...}\dpthimport *makes* a
- % difference! In ensures any occuring `##' characters are properly expanded to `#'.
+ % difference! In ensures any occurring `##' characters are properly expanded to `#'.
\immediate\write\@auxout{%
\noexpand\def\noexpand\dpthimport{\the\toks0}\noexpand\dpthimport}%
}%
- \fi
+ \fi
}%
\fi
\else% it is the depth (which is simply a number for backwards compatibility)
@@ -352,7 +352,7 @@
}%
% Stores '#1' (expanded!) into the .dpth file of the currently
-% exported image.
+% exported image.
%
% This command has only an effect if an image is being exported.
%
@@ -369,12 +369,12 @@
% Grab operation: If jobname matches the graphic name, typeset this
-% picture normall.
+% picture normal.
% REMARK:
% this method is also invoked from within the tikz external library.
\def\pgf@external@grab#1{%
\def\pgf@filename{#1}%
- \ifpgfexternal@aux@in@dpth
+ \ifpgfexternal@aux@in@dpth
\begingroup
\pgf@external@init@aux@in@dpth
\let\G@refundefinedtrue=\pgf@external@grab@refundefinedtrue
@@ -394,11 +394,16 @@
\begingroup
\def\n{\pgfexternal@hat\pgfexternal@hat J}%
\pgfexternalstorecommand{%
+ \pgf@external@grab@refundefinedtrue@code
\noexpand\immediate\noexpand\write16{\pgf@external@grab@refundefinedtrue@warning}%
\noexpand\G@refundefinedtrue
}%
\endgroup
}%
+
+% A hook. will be overwritten by \usetikzlibrary{external}
+\def\pgf@external@grab@refundefinedtrue@code{}
+
\def\pgf@external@grab@refundefinedtrue@warning{%
LaTeX Warning: External picture `\pgfactualjobname' contains undefined references\noexpand\on@line.\n
}%
@@ -456,7 +461,7 @@
\if1\pgf@external@trim
% UNDO the trimming! export to pdf doesn't supported trimmed
% bounding boxes (has to do with the mediabox/trimbox etc).
- % I'll keep the bounding box intact and store the trim information
+ % I'll keep the bounding box intact and store the trim information
% into the .dpth file.
\setbox\pgfpic=\hbox{%
\ifx\pgf@trimleft@final\pgfutil@empty\else\kern-\pgf@trimleft@final\fi
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
index a0a7ac9651e..7b11d45d630 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex,v 1.12 2014/11/02 21:38:01 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfcoregraphicstate.code.tex}
% Globals
@@ -77,6 +77,7 @@
% \pgfsetmiterlimit{3}
\def\pgfsetmiterlimit#1{%
+ \ifdim#1pt<1pt\pgferror{miter limit cannot be less than 1}\fi%
\pgfsys@setmiterlimit{#1}%
\ignorespaces}
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
index 1f2d6ea5d17..710ece1fa80 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreimage.code.tex,v 1.18 2013/07/15 15:41:24 tantau Exp $
+\ProvidesFileRCS{pgfcoreimage.code.tex}
@@ -22,7 +22,7 @@
%
% This command declares an image file for later use. Even if the image
% is used several times in the document, in PDF it will only be stored
-% once.
+% once.
%
% Example:
%
@@ -41,7 +41,7 @@
\ifx\pgf@filename\pgfutil@empty%
\expandafter\pgf@findfile\pgfsys@imagesuffixlist:+{#3}%
\else%
- \pgfkeys{/pgf/images/page=}% make page empty
+ \pgfkeys{/pgf/images/page=}% make page empty
\fi%
\ifx\pgf@filename\pgfutil@empty%
\pgfwarning%
@@ -60,8 +60,8 @@
\pgfkeys{
- /pgf/images/draft/.is if=pgf@draftmode,
- /pgf/images/draft/.default=true}
+ /pgf/images/draft/.is if=pgf@draftmode,
+ /pgf/images/draft/.default=true}
\pgfkeys{/pgf/images/width/.estore in=\pgf@imagewidth}
\pgfkeys{/pgf/images/height/.estore in=\pgf@imageheight}
\pgfkeys{/pgf/images/page/.estore in=\pgf@imagepage}
@@ -99,7 +99,7 @@
\ifx\pgf@imageheight\pgfutil@empty%
\pgfwarning{Missing height for image "#1" ("#2") in draft mode. Using 1cm instead}%
\edef\pgf@imageheight{1cm}%
- \fi%
+ \fi%
\ifx\pgf@imagepage\pgfutil@empty\else\edef\pgf@imagepagetext{ page \pgf@imagepage}\fi%
\edef\pgf@image{%
\hbox to \pgf@imagewidth{%
@@ -117,7 +117,7 @@
% Declare a soft mask
%
% #1 = optional argument: matte specification. default matte is
-% white.
+% white.
% #2 = name of the mask for later use
% #3 = filename without extension, automatic extensions are .pdf,
% .jpg, and .png for PDF. Postscript is not supported.
@@ -171,7 +171,7 @@
\expandafter\global\expandafter\let\csname pgf@image@#1!\endcsname=\pgf@temp%
}
-
+
% Use an image
%
% #1 = name of a previously declared image
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
index 880b41c4a30..1c7c01d1eac 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.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.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorelayers.code.tex,v 1.7 2013/07/18 17:07:38 tantau Exp $
+\ProvidesFileRCS{pgfcorelayers.code.tex}
% Creates a new pgf layer
@@ -44,7 +44,24 @@
%
% \pgfsetlayers{background,main}
-\def\pgfsetlayers#1{\edef\pgf@layerlist{#1}}
+\def\pgfsetlayers#1{%
+ \let\pgf@layerlist\pgfutil@empty%
+ \pgf@dosetlayer#1,,\relax%
+}
+
+\def\pgf@dosetlayer#1,#2,\relax{%
+ \ifx\pgf@layerlist\pgfutil@empty%
+ \edef\pgf@layerlist{\pgfutil@trimspaces{#1}}%
+ \else
+ \edef\pgf@layerlist{\pgf@layerlist,\pgfutil@trimspaces{#1}}%
+ \fi
+ \def\pgf@test{#2}%
+ \ifx\pgf@test\pgfutil@empty%
+ \else%
+ \pgf@dosetlayer#2,\relax%
+ \fi%
+}
+
\pgfsetlayers{main}
% Adds code to a layer
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
index 557558d82ef..1cbdfa0dd22 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
@@ -7,7 +7,7 @@
%
% 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 $
+\ProvidesFileRCS{pgfcoreobjects.code.tex}
% Object reuse
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
index 60cede3f006..c5b9ee1e99a 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex,v 1.29 2013/10/07 15:51:46 tantau Exp $
+\ProvidesFileRCS{pgfcorepathconstruct.code.tex}
\newdimen\pgf@path@lastx
@@ -22,9 +22,9 @@
%
% #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
@@ -33,9 +33,9 @@
% 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.
-%
-%
+% must use the \pgfpatharc command.
+%
+%
% Example: One rounded corner.
%
% \pgfpathmoveto{\pgfpointxy{0}{0}}
@@ -80,7 +80,7 @@
% The following protocol the passed sizes and all the corresponding
% softpath commands. The nonlinear transformation (nlt) module
-% overwrites these commands.
+% overwrites these commands.
\def\pgf@lt@moveto#1#2{%
\pgf@protocolsizes{#1}{#2}%
@@ -110,7 +110,7 @@
% Move current point to #1.
%
% #1 = new current point
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfxy(0,0)}
@@ -169,7 +169,7 @@
% Append a line from the current point to #1 to the current path.
%
% #1 = end of line
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfxy(0,0)}
@@ -213,7 +213,7 @@
% #1 = first control point
% #2 = second control point
% #3 = end point
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfpointxy{0}{0}}
@@ -241,7 +241,7 @@
%
% #1 = control point
% #2 = end point
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfpointxy{0}{0}}
@@ -279,7 +279,7 @@
% #1 = angle of first point
% #2 = angle of second point
% #3 = radius or x-radius/y-radius
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfxy(0,0)}
@@ -347,7 +347,7 @@
\pgfutil@tempdima=\pgf@arc@radius@a pt%
\pgfutil@tempdimb=\pgf@arc@radius@b pt%
%
- \pgf@xa=\pgf@arc@local@angle@a\relax%
+ \pgf@xa=\pgf@arc@local@angle@a\relax%
\pgf@xb=\pgf@arc@local@angle@b\relax%
\advance\pgf@xb by-\pgf@xa\relax%
\ifdim\pgf@xb<0pt\relax%
@@ -368,7 +368,7 @@
\else%
\advance\pgf@xa by -90pt\relax%
\fi%
- \edef\pgf@arc@angle{\pgf@sys@tonumber{\pgf@xa}}%
+ \edef\pgf@arc@angle{\pgf@sys@tonumber{\pgf@xa}}%
\pgfpointtransformed{\pgfpointpolar{\pgf@arc@angle}{\pgfutil@tempdima and \pgfutil@tempdimb}}%
\advance\pgf@x by-\pgf@pt@x%
\advance\pgf@y by-\pgf@pt@y%
@@ -412,7 +412,7 @@
% #2 = angle of second point
% #3 = first axis
% #4 = second axis
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfxy(0,0)}
@@ -428,7 +428,7 @@
-% Append an arc to the current point that ends at a given position.
+% Append an arc to the current point that ends at a given position.
%
% #1 = x-radius
% #2 = y-radius
@@ -442,18 +442,18 @@
% This command implements an arc drawing where a given target
% coordinate (#6) is given and the task is to draw an arc of an
% ellipse with the given radii. The center point of the ellipse is not
-% give, but computed automatically.
+% give, but computed automatically.
%
% This kind of "endpoint parameterization" of an arc is exactly the
% same as the one specified by the SVG-specification for the "A" and
% "a" path commands. Please see the SVG-specification for details.
-%
+%
% Note that the problem is internally converted to drawing an arc
% using \pgfpatharc. This means that there may be a heavy loss of
% accuracy.
-%
+%
% Example:
-%
+%
% \pgfpathmoveto{\pgfpoint{1cm}{1cm}}
% \pgfpatharcto{1cm}{1cm}{0}{0}{0}{\pgfpoint{0cm}{2cm}}
@@ -461,10 +461,10 @@
{%
% The following code is based on the transformation described in svg
% 1.1 specification Section F.6.5
- %
+ %
% Step 1: store the simple parameters (xa=x1 since TeX does not
% allow numbers in names)
- %
+ %
\pgfmathsetmacro\pgf@arcto@rx{abs(#1)}%
\pgfmathsetmacro\pgf@arcto@ry{abs(#2)}%
\ifdim\pgf@arcto@rx pt=0pt% special rule: zero radius=straight line
@@ -487,11 +487,11 @@
\pgf@process{#6}
\edef\pgf@arcto@xb{\the\pgf@x}%
\edef\pgf@arcto@yb{\the\pgf@y}%
- %
+ %
% Step 2: x1,y1 is more complicated to compute: It is given by lastx
% and lasty, but these are transformed coordinates, we need the
% untransformed ones. So, we inverse the transformation (arghh...)
- %
+ %
\pgftransforminvert%
\pgf@process{\pgfpointtransformed{\pgfqpoint{\pgf@path@lastx}{\pgf@path@lasty}}}
\edef\pgf@arcto@xa{\the\pgf@x}
@@ -504,15 +504,15 @@
%
% Ok, now we got all the parameters setup. Now comes the
% computation...
- %
- %
+ %
+ %
% Step 3: Start with a new coordinate system and rotate everything
% by the negated phi.
- %
+ %
\pgftransformreset
\pgftransformrotate{-\pgf@arcto@phi}
% Ok, using \pgfpointtransformed we now get transformed points...
- %
+ %
% Step 4: Compute x1' and y1' (xaprime and yaprime)
%
\pgf@process{
@@ -524,8 +524,8 @@
}
\edef\pgf@arcto@xaprime{\pgf@sys@tonumber\pgf@x}
\edef\pgf@arcto@yaprime{\pgf@sys@tonumber\pgf@y}
- %
- % Compute Lambda
+ %
+ % Compute Lambda
%
\pgfmathsetmacro\pgf@arcto@frac@x{\pgf@arcto@xaprime/\pgf@arcto@rx}
\pgfmathsetmacro\pgf@arcto@frac@y{\pgf@arcto@yaprime/\pgf@arcto@ry}
@@ -537,9 +537,9 @@
\pgfmathsetmacro\pgf@arcto@rx{\pgf@arcto@sqrt@lambda*\pgf@arcto@rx}
\pgfmathsetmacro\pgf@arcto@ry{\pgf@arcto@sqrt@lambda*\pgf@arcto@ry}
\fi
- %
- % Do some scaling
- %
+ %
+ % Do some scaling
+ %
\pgfmathsetmacro\pgf@arcto@xaprime@abs{abs(\pgf@arcto@xaprime)}
\pgfmathsetmacro\pgf@arcto@yaprime@abs{abs(\pgf@arcto@yaprime)}
\pgfmathmax@{\pgf@arcto@rx,\pgf@arcto@ry,\pgf@arcto@xaprime@abs,\pgf@arcto@yaprime@abs}
@@ -548,9 +548,9 @@
\pgfmathsetmacro\pgf@arcto@ry@scaled{\pgf@arcto@scaling*\pgf@arcto@ry}
\pgfmathsetmacro\pgf@arcto@xaprime@scaled{\pgf@arcto@scaling*\pgf@arcto@xaprime}
\pgfmathsetmacro\pgf@arcto@yaprime@scaled{\pgf@arcto@scaling*\pgf@arcto@yaprime}
- %
- % Step 5: Now comes the messy computation of c1' and c2'.
- %
+ %
+ % Step 5: Now comes the messy computation of c1' and c2'.
+ %
\ifdim\pgf@arcto@rx pt>\pgf@arcto@ry pt%
\pgfmathsetmacro\pgf@arcto@rx@over@ry{\pgf@arcto@rx/\pgf@arcto@ry}
\pgfmathsetmacro\pgf@arcto@ry@over@rx{\pgf@arcto@ry/\pgf@arcto@rx}
@@ -595,9 +595,9 @@
\pgfmathsetmacro\pgf@arcto@cyprime{
-\pgf@arcto@factor*\pgf@arcto@ry@over@rx*\pgf@arcto@xaprime
}
- %
- % Step 6: Ok, now compute cx,cy
- %
+ %
+ % Step 6: Ok, now compute cx,cy
+ %
\pgftransformreset
\pgftransformrotate{\pgf@arcto@phi}
\pgf@process{
@@ -613,9 +613,9 @@
}
\edef\pgf@arcto@cx{\the\pgf@x}
\edef\pgf@arcto@cy{\the\pgf@y}
- %
- % Step 7: Compute start angle:
- %
+ %
+ % Step 7: Compute start angle:
+ %
\pgfmathsetmacro\pgf@arcto@vec@x{(\pgf@arcto@xaprime-\pgf@arcto@cxprime)/\pgf@arcto@rx}
\pgfmathsetmacro\pgf@arcto@vec@y{(\pgf@arcto@yaprime-\pgf@arcto@cyprime)/\pgf@arcto@ry}
\pgfmathsetmacro\pgf@arcto@denominator{veclen(\pgf@arcto@vec@x,\pgf@arcto@vec@y)}
@@ -624,9 +624,9 @@
\ifdim\pgf@arcto@vec@y pt<0pt
\pgfmathsetmacro\pgf@arcto@theta@start{-\pgf@arcto@theta@start}
\fi
- %
- % Step 8: Compute end angle:
- %
+ %
+ % Step 8: Compute end angle:
+ %
\pgfmathsetmacro\pgf@arcto@vec@x{(-\pgf@arcto@xaprime-\pgf@arcto@cxprime)/\pgf@arcto@rx}
\pgfmathsetmacro\pgf@arcto@vec@y{(-\pgf@arcto@yaprime-\pgf@arcto@cyprime)/\pgf@arcto@ry}
\pgfmathsetmacro\pgf@arcto@denominator{veclen(\pgf@arcto@vec@x,\pgf@arcto@vec@y)}
@@ -695,190 +695,190 @@
% #7 the ratio xradius/yradius of the ellipse
% #8 the ratio yradius/xradius of the ellipse
% Example:
-% \def\cx{1cm}% center x
-% \def\cy{1cm}% center y
-% \def\startangle{0}%
-% \def\endangle{45}%
-% \def\a{5cm}% xradius
-% \def\b{10cm}% yradius
-% \pgfmathparse{\a/\b}\let\abratio=\pgfmathresult
-% \pgfmathparse{\b/\a}\let\baratio=\pgfmathresult
+% \def\cx{1cm}% center x
+% \def\cy{1cm}% center y
+% \def\startangle{0}%
+% \def\endangle{45}%
+% \def\a{5cm}% xradius
+% \def\b{10cm}% yradius
+% \pgfmathparse{\a/\b}\let\abratio=\pgfmathresult
+% \pgfmathparse{\b/\a}\let\baratio=\pgfmathresult
%
% \pgfpathmoveto{\pgfpoint{\cx+\a*cos(\startangle)}{\cy+\b*sin(\startangle)}}%
% \pgfpatharctoprecomputed
-% {\pgfpoint{\cx}{\cy}}
-% {\startangle}
-% {\endangle}
-% {\pgfpoint{\cx+\a*cos(\endangle)}{\cy+\b*sin(\endangle)}}%
-% {\a}
-% {\b}
-% {\abratio}
-% {\baratio}
+% {\pgfpoint{\cx}{\cy}}
+% {\startangle}
+% {\endangle}
+% {\pgfpoint{\cx+\a*cos(\endangle)}{\cy+\b*sin(\endangle)}}%
+% {\a}
+% {\b}
+% {\abratio}
+% {\baratio}
%
\def\pgfpatharctoprecomputed#1#2#3#4#5#6#7#8{%
- \begingroup
- % Implementation idea:
- %
- % let
- % m = center (#1)
- % \gamma_0 = start angle
- % \gamma_1 = end angle
- % a = x radius
- % b = y radius
- %
- % an axis parallel ellipse is parameterized by
- % C(\gamma) = m + ( a cos(\gamma), b sin(\gamma) ), \gamma in [0,360].
- %
- % Now, consider the segment \gamma(t),
- % \gamma:[0,1] -> [\gamma_0,\gamma_1],
- % t -> \gamma_0 + t(\gamma_1 - \gamma_0)
- % and
- % C(\gamma(t)) which is defined on [0,1].
- %
- % I'd like to approximate the arc by one or more cubic bezier
- % splines which interpolate through the last and first provided
- % points.
- %
- % In general, a Bezier spline C:[0,1] -> \R of order n fulfills
- % C'(0) = n ( P_1 - P_0 ),
- % C'(1) = n ( P_n - P_{n-1} ).
- % For n=3 and given P_0 and P_3, I can directly compute P_1 and P_2 once I know
- % the derivatives at t=0 and t=1.
- %
- % The derivatives in our case are
- % ( C \circ \gamma )'(t) = C'[\gamma(t)] * \gamma'(t)
- % = ( -a pi/180 sin(\gamma(t)), b pi/180 cos(\gamma(t)) ) * (\gamma_1 - \gamma_0).
- % The pi/180 comes into play since we are working with degrees.
- %
- % Expression (C\circ\gamma)'(0) using P_0 and (C \circ \gamma)'(1)
- % using P_3 yields the expressions
- % (C \circ \gamma)'(0) =
- % pi/180 * (\gamma_1 - \gamma_0)* [ - a/b(P_0^y - my), b/a (P_0^x - mx) ]
- % (C \circ \gamma)'(1) =
- % pi/180 * (\gamma_1 - \gamma_0)* [ - a/b(P_3^y - my), b/a (P_3^x - mx) ]
- %
- % defining
- % scaleA = a/b * pi / (3*180) * (\gamma_1 - \gamma_0)
- % and
- % scaleB = b/a * pi / (3*180) * (\gamma_1 - \gamma_0)
- % yields the direct expressions for the intermediate bezier
- % control points
- %
- % P_1 = [
- % P_0^x - scaleA* ( P_0^y -my),
- % P_0^y + scaleB* ( P_0^x -mx) ]
- % and
- % P_2 = [
- % P_3^x + scaleA* ( P_3^y -my),
- % P_3^y - scaleB* ( P_3^x -mx) ].
- %
- % This works fast, with few operations, if
- % - a/b and b/a are known in advance
- % - P_0 and P_3 are known in advance
- % - \gamma_0 and \gamma_1 are known.
- %
- % It is also reliable if (\gamma_1 - \gamma_0) is small
- %
- \pgf@process{#1}%
- \edef\pgfpath@center@x{\the\pgf@x}%
- \edef\pgfpath@center@y{\the\pgf@y}%
- \def\pgfpath@completearcend{#4}%
- % compute scale (#3-#2) * pi/(3*180) = (#3 - #2) * pi/27 * 1/20
- % splitting pi/(3*180) into two scales has higher TeX accuracy
- \pgf@xa=#2pt
- \pgf@xb=#3pt
- \edef\pgfpath@startangle{#2pt}%
- \edef\pgfpath@endangle{\pgf@sys@tonumber\pgf@xb}%
- %
- \pgf@ya=\pgf@xb
- \advance\pgf@ya by-\pgf@xa
- %
- \ifx\pgfpatharctomaxstepsize\pgfutil@empty
- \def\pgfpath@N{1}%
- \pgf@xc=\pgf@ya
- \else
- \pgf@xc=\pgf@ya% compute N = floor((gamma_1 - gamma_0) / max) +1
- \ifdim\pgf@xc<0pt
- \multiply\pgf@xc by-1
- \fi
- \divide\pgf@xc by\pgfpatharctomaxstepsize\relax
- \afterassignment\pgfutil@gobble@until@relax
- \c@pgf@counta=\the\pgf@xc\relax
- \advance\c@pgf@counta by1
- \edef\pgfpath@N{\the\c@pgf@counta}%
- %
- \pgf@xc=\pgf@ya
- \divide\pgf@xc by\c@pgf@counta
- \fi
- %
- \edef\pgfpath@h{\pgf@sys@tonumber\pgf@xc}%
- %
+ \begingroup
+ % Implementation idea:
+ %
+ % let
+ % m = center (#1)
+ % \gamma_0 = start angle
+ % \gamma_1 = end angle
+ % a = x radius
+ % b = y radius
+ %
+ % an axis parallel ellipse is parameterized by
+ % C(\gamma) = m + ( a cos(\gamma), b sin(\gamma) ), \gamma in [0,360].
+ %
+ % Now, consider the segment \gamma(t),
+ % \gamma:[0,1] -> [\gamma_0,\gamma_1],
+ % t -> \gamma_0 + t(\gamma_1 - \gamma_0)
+ % and
+ % C(\gamma(t)) which is defined on [0,1].
+ %
+ % I'd like to approximate the arc by one or more cubic bezier
+ % splines which interpolate through the last and first provided
+ % points.
+ %
+ % In general, a Bezier spline C:[0,1] -> \R of order n fulfills
+ % C'(0) = n ( P_1 - P_0 ),
+ % C'(1) = n ( P_n - P_{n-1} ).
+ % For n=3 and given P_0 and P_3, I can directly compute P_1 and P_2 once I know
+ % the derivatives at t=0 and t=1.
+ %
+ % The derivatives in our case are
+ % ( C \circ \gamma )'(t) = C'[\gamma(t)] * \gamma'(t)
+ % = ( -a pi/180 sin(\gamma(t)), b pi/180 cos(\gamma(t)) ) * (\gamma_1 - \gamma_0).
+ % The pi/180 comes into play since we are working with degrees.
+ %
+ % Expression (C\circ\gamma)'(0) using P_0 and (C \circ \gamma)'(1)
+ % using P_3 yields the expressions
+ % (C \circ \gamma)'(0) =
+ % pi/180 * (\gamma_1 - \gamma_0)* [ - a/b(P_0^y - my), b/a (P_0^x - mx) ]
+ % (C \circ \gamma)'(1) =
+ % pi/180 * (\gamma_1 - \gamma_0)* [ - a/b(P_3^y - my), b/a (P_3^x - mx) ]
+ %
+ % defining
+ % scaleA = a/b * pi / (3*180) * (\gamma_1 - \gamma_0)
+ % and
+ % scaleB = b/a * pi / (3*180) * (\gamma_1 - \gamma_0)
+ % yields the direct expressions for the intermediate bezier
+ % control points
+ %
+ % P_1 = [
+ % P_0^x - scaleA* ( P_0^y -my),
+ % P_0^y + scaleB* ( P_0^x -mx) ]
+ % and
+ % P_2 = [
+ % P_3^x + scaleA* ( P_3^y -my),
+ % P_3^y - scaleB* ( P_3^x -mx) ].
+ %
+ % This works fast, with few operations, if
+ % - a/b and b/a are known in advance
+ % - P_0 and P_3 are known in advance
+ % - \gamma_0 and \gamma_1 are known.
+ %
+ % It is also reliable if (\gamma_1 - \gamma_0) is small
+ %
+ \pgf@process{#1}%
+ \edef\pgfpath@center@x{\the\pgf@x}%
+ \edef\pgfpath@center@y{\the\pgf@y}%
+ \def\pgfpath@completearcend{#4}%
+ % compute scale (#3-#2) * pi/(3*180) = (#3 - #2) * pi/27 * 1/20
+ % splitting pi/(3*180) into two scales has higher TeX accuracy
+ \pgf@xa=#2pt
+ \pgf@xb=#3pt
+ \edef\pgfpath@startangle{#2pt}%
+ \edef\pgfpath@endangle{\pgf@sys@tonumber\pgf@xb}%
+ %
+ \pgf@ya=\pgf@xb
+ \advance\pgf@ya by-\pgf@xa
+ %
+ \ifx\pgfpatharctomaxstepsize\pgfutil@empty
+ \def\pgfpath@N{1}%
+ \pgf@xc=\pgf@ya
+ \else
+ \pgf@xc=\pgf@ya% compute N = floor((gamma_1 - gamma_0) / max) +1
+ \ifdim\pgf@xc<0pt
+ \multiply\pgf@xc by-1
+ \fi
+ \divide\pgf@xc by\pgfpatharctomaxstepsize\relax
+ \afterassignment\pgfutil@gobble@until@relax
+ \c@pgf@counta=\the\pgf@xc\relax
+ \advance\c@pgf@counta by1
+ \edef\pgfpath@N{\the\c@pgf@counta}%
+ %
+ \pgf@xc=\pgf@ya
+ \divide\pgf@xc by\c@pgf@counta
+ \fi
+ %
+ \edef\pgfpath@h{\pgf@sys@tonumber\pgf@xc}%
+ %
%\message{pgfpathellipse: using N =\pgfpath@N\space spline points y0 = \pgfpath@startangle, y0+i*h, yN=\pgfpath@endangle, i=1,...,(\pgfpath@N-1), with h=\pgfpath@h\space mesh width (total arc angle \pgf@sys@tonumber\pgf@ya).}%
- %
- %
- \pgf@xc=0.116355283466289\pgf@xc % pi/27
- \divide\pgf@xc by20
- \pgf@xa=#7\pgf@xc
- \edef\pgfpath@scale@A{\pgf@sys@tonumber\pgf@xa}%
- \pgf@xa=#8\pgf@xc
- \edef\pgfpath@scale@B{\pgf@sys@tonumber\pgf@xa}%
- %
- % compute intermediate spline segments for
- % i = 1,...,N-1
- % this is a no-op for N=1.
- \c@pgf@countd=1
- \pgfutil@loop
- \ifnum\c@pgf@countd<\pgfpath@N\relax
- %
- \pgf@xa=\pgfpath@startangle % compute \pgf@xa = y_0 + i*h
- \pgf@xb=\pgfpath@h pt
- \multiply\pgf@xb by\c@pgf@countd
- \advance\pgf@xa by\pgf@xb
- \edef\pgfpath@angle@i{\pgf@sys@tonumber\pgf@xa}%
+ %
+ %
+ \pgf@xc=0.116355283466289\pgf@xc % pi/27
+ \divide\pgf@xc by20
+ \pgf@xa=#7\pgf@xc
+ \edef\pgfpath@scale@A{\pgf@sys@tonumber\pgf@xa}%
+ \pgf@xa=#8\pgf@xc
+ \edef\pgfpath@scale@B{\pgf@sys@tonumber\pgf@xa}%
+ %
+ % compute intermediate spline segments for
+ % i = 1,...,N-1
+ % this is a no-op for N=1.
+ \c@pgf@countd=1
+ \pgfutil@loop
+ \ifnum\c@pgf@countd<\pgfpath@N\relax
+ %
+ \pgf@xa=\pgfpath@startangle % compute \pgf@xa = y_0 + i*h
+ \pgf@xb=\pgfpath@h pt
+ \multiply\pgf@xb by\c@pgf@countd
+ \advance\pgf@xa by\pgf@xb
+ \edef\pgfpath@angle@i{\pgf@sys@tonumber\pgf@xa}%
%\message{angle \the\c@pgf@countd: \pgfpath@angle@i...}%
- %
- \pgfpatharcofellipse@{%
- \pgfpoint
- {\pgfpath@center@x + #5*cos(\pgfpath@angle@i)}
- {\pgfpath@center@y + #6*sin(\pgfpath@angle@i)}%
- }%
- %
- \advance\c@pgf@countd by1
- \pgfutil@repeat
- %
- % compute final spline segment. It only differs insofar as the
- % final point is already known explicitly and should be
- % interpolated without additional math error.
+ %
+ \pgfpatharcofellipse@{%
+ \pgfpoint
+ {\pgfpath@center@x + #5*cos(\pgfpath@angle@i)}
+ {\pgfpath@center@y + #6*sin(\pgfpath@angle@i)}%
+ }%
+ %
+ \advance\c@pgf@countd by1
+ \pgfutil@repeat
+ %
+ % compute final spline segment. It only differs insofar as the
+ % final point is already known explicitly and should be
+ % interpolated without additional math error.
%\message{angle \pgfpath@N: \pgfpath@endangle...}%
- \pgfpatharcofellipse@{\pgfpath@completearcend}%
- \endgroup
+ \pgfpatharcofellipse@{\pgfpath@completearcend}%
+ \endgroup
}%
\def\pgfpatharcofellipse@#1{%
- \begingroup
- \pgf@process{#1}%
- \edef\pgfpath@endpt{\global\pgf@x=\the\pgf@x\space\global\pgf@y=\the\pgf@y\space}%
- %
- \pgfpathcurveto{
- \begingroup
- \global\pgf@x=\pgf@path@lastx
- \global\pgf@y=\pgf@path@lasty
- \pgf@xa=\pgf@x \advance\pgf@xa by-\pgfpath@center@x
- \pgf@ya=\pgf@y \advance\pgf@ya by-\pgfpath@center@y
- \global\advance\pgf@x by-\pgfpath@scale@A\pgf@ya
- \global\advance\pgf@y by \pgfpath@scale@B\pgf@xa
- \endgroup
- }{%
- \begingroup
- \pgfpath@endpt
- \pgf@xa=\pgf@x \advance\pgf@xa by-\pgfpath@center@x
- \pgf@ya=\pgf@y \advance\pgf@ya by-\pgfpath@center@y
- \global\advance\pgf@x by \pgfpath@scale@A\pgf@ya
- \global\advance\pgf@y by-\pgfpath@scale@B\pgf@xa
- \endgroup
- }{%
- \pgfpath@endpt
- }%
- \endgroup
+ \begingroup
+ \pgf@process{#1}%
+ \edef\pgfpath@endpt{\global\pgf@x=\the\pgf@x\space\global\pgf@y=\the\pgf@y\space}%
+ %
+ \pgfpathcurveto{
+ \begingroup
+ \global\pgf@x=\pgf@path@lastx
+ \global\pgf@y=\pgf@path@lasty
+ \pgf@xa=\pgf@x \advance\pgf@xa by-\pgfpath@center@x
+ \pgf@ya=\pgf@y \advance\pgf@ya by-\pgfpath@center@y
+ \global\advance\pgf@x by-\pgfpath@scale@A\pgf@ya
+ \global\advance\pgf@y by \pgfpath@scale@B\pgf@xa
+ \endgroup
+ }{%
+ \begingroup
+ \pgfpath@endpt
+ \pgf@xa=\pgf@x \advance\pgf@xa by-\pgfpath@center@x
+ \pgf@ya=\pgf@y \advance\pgf@ya by-\pgfpath@center@y
+ \global\advance\pgf@x by \pgfpath@scale@A\pgf@ya
+ \global\advance\pgf@y by-\pgfpath@scale@B\pgf@xa
+ \endgroup
+ }{%
+ \pgfpath@endpt
+ }%
+ \endgroup
}
@@ -894,7 +894,7 @@
% #1 = center
% #2 = first axis
% #3 = second axis
-%
+%
% Example:
%
% % Add a circle of radius 3cm around the origin
@@ -980,7 +980,7 @@
\advance\pgf@x by\pgf@xc%
\advance\pgf@y by\pgf@yc%
\advance\pgf@xb by\pgf@xc%
- \advance\pgf@yb by\pgf@yc%
+ \advance\pgf@yb by\pgf@yc%
\pgf@temp%
\pgf@nlt@curveto{\pgf@xc}{\pgf@yc}{\pgf@x}{\pgf@y}{\pgf@xb}{\pgf@yb}%
}%
@@ -1001,7 +1001,7 @@
\advance\pgf@x by\pgf@xc%
\advance\pgf@y by\pgf@yc%
\advance\pgf@xa by\pgf@xc%
- \advance\pgf@ya by\pgf@yc%
+ \advance\pgf@ya by\pgf@yc%
\pgf@temp%
\pgf@nlt@curveto{\pgf@xc}{\pgf@yc}{\pgf@x}{\pgf@y}{\pgf@xa}{\pgf@ya}%
}%
@@ -1015,10 +1015,10 @@
%
% #1 = center
% #2 = radius
-%
+%
% Example:
%
-% % Append a circle of radius 3cm around the the point (1,1)
+% % Append a circle of radius 3cm around the point (1,1)
% \pgfpathcircle{\pgxy(1,1)}{3cm}
\def\pgfpathcircle#1#2{\pgfpathellipse{#1}{\pgfpoint{#2}{0pt}}{\pgfpoint{0pt}{#2}}}
@@ -1030,7 +1030,7 @@
%
% #1 = lower left corner point of rectangle
% #2 = width and height vector
-%
+%
% Example:
%
% % A rectangle with corners (2,2) and (3,3)
@@ -1082,7 +1082,7 @@
%
% #1 = one corner of the rectangle
% #2 = opposite corner of the rectangle
-%
+%
% Example:
%
% % A rectangle with corners (2,2) and (3,3)
@@ -1103,13 +1103,13 @@
%
% #1 = first corner point of grid
% #2 = second corner point of grid
-%
-% Options:
-%
+%
+% Options:
+%
% stepx = x-step dimension (default 1cm)
% stepy = y-step dimension (default 1cm)
-% step = dimesion vector
-%
+% step = dimension vector
+%
% Example:
%
% \pgfsetlinewidth{0.8pt}
@@ -1146,75 +1146,82 @@
\pgf@yb=\pgf@ya%
\pgf@ya=\pgf@y%
\fi%
- \c@pgf@counta=\pgf@ya\relax%
- \c@pgf@countb=\pgf@yc\relax%
- \divide\c@pgf@counta by\c@pgf@countb\relax%
- \pgfutil@tempdima=\c@pgf@counta\pgf@yc\relax%
- \ifdim\pgfutil@tempdima<\pgf@ya%
+ \ifdim \pgf@yc > .01pt\relax% if to draw horizontal lines
+ \c@pgf@counta=\pgf@ya\relax%
+ \c@pgf@countb=\pgf@yc\relax%
+ \divide\c@pgf@counta by\c@pgf@countb\relax%
+ \pgfutil@tempdima=\c@pgf@counta\pgf@yc\relax%
+ \ifdim\pgfutil@tempdima<\pgf@ya%
+ \advance\pgfutil@tempdima by\pgf@yc%
+ \fi%
+ \pgfutil@tempdimb\pgf@x
+ \pgfutil@loop% horizontal lines
+ {%
+ \pgf@xa=\pgfutil@tempdimb%
+ \pgf@ya=\pgfutil@tempdima%
+ \pgf@pos@transform{\pgf@xa}{\pgf@ya}
+ \pgf@nlt@moveto{\pgf@xa}{\pgf@ya}%
+ \pgf@xa=\pgf@xb%
+ \pgf@ya=\pgfutil@tempdima%
+ \pgf@pos@transform{\pgf@xa}{\pgf@ya}
+ \pgf@nlt@lineto{\pgf@xa}{\pgf@ya}%
+ }%
\advance\pgfutil@tempdima by\pgf@yc%
+ \ifdim\pgfutil@tempdima<\pgf@yb%
+ \pgfutil@repeat%
+ \advance\pgfutil@tempdima by-0.01pt\relax%
+ \ifdim\pgfutil@tempdima<\pgf@yb%
+ {%
+ \pgf@xa=\pgfutil@tempdimb%
+ \pgf@ya=\pgfutil@tempdima%
+ \pgf@pos@transform{\pgf@xa}{\pgf@ya}
+ \pgf@nlt@moveto{\pgf@xa}{\pgf@ya}%
+ \pgf@xa=\pgf@xb%
+ \pgf@ya=\pgfutil@tempdima%
+ \pgf@pos@transform{\pgf@xa}{\pgf@ya}
+ \pgf@nlt@lineto{\pgf@xa}{\pgf@ya}%
+ }%
+ \fi%
\fi%
- \pgfutil@tempdimb\pgf@x
- \pgfutil@loop% horizontal lines
- {%
- \pgf@xa=\pgfutil@tempdimb%
- \pgf@ya=\pgfutil@tempdima%
- \pgf@pos@transform{\pgf@xa}{\pgf@ya}
- \pgf@nlt@moveto{\pgf@xa}{\pgf@ya}%
- \pgf@xa=\pgf@xb%
- \pgf@ya=\pgfutil@tempdima%
- \pgf@pos@transform{\pgf@xa}{\pgf@ya}
- \pgf@nlt@lineto{\pgf@xa}{\pgf@ya}%
- }%
- \advance\pgfutil@tempdima by\pgf@yc%
- \ifdim\pgfutil@tempdima<\pgf@yb%
- \pgfutil@repeat%
- \advance\pgfutil@tempdima by-0.01pt\relax%
- \ifdim\pgfutil@tempdima<\pgf@yb%
- {%
- \pgf@xa=\pgfutil@tempdimb%
- \pgf@ya=\pgfutil@tempdima%
- \pgf@pos@transform{\pgf@xa}{\pgf@ya}
- \pgf@nlt@moveto{\pgf@xa}{\pgf@ya}%
- \pgf@xa=\pgf@xb%
- \pgf@ya=\pgfutil@tempdima%
- \pgf@pos@transform{\pgf@xa}{\pgf@ya}
- \pgf@nlt@lineto{\pgf@xa}{\pgf@ya}%
- }%
- \fi%
- \c@pgf@counta=\pgfutil@tempdimb\relax%
- \c@pgf@countb=\pgf@xc\relax%
- \divide\c@pgf@counta by\c@pgf@countb\relax%
- \pgfutil@tempdimb=\c@pgf@counta\pgf@xc\relax%
- \ifdim\pgfutil@tempdimb<\pgf@xa%
- \advance\pgfutil@tempdimb by\pgf@xc%
- \fi%
- \pgfutil@loop% vertical lines
- {%
- \pgf@xc=\pgfutil@tempdimb%
- \pgf@yc=\pgf@ya%
- \pgf@pos@transform{\pgf@xc}{\pgf@yc}
- \pgf@nlt@moveto{\pgf@xc}{\pgf@yc}%
- \pgf@xc=\pgfutil@tempdimb%
- \pgf@yc=\pgf@yb%
- \pgf@pos@transform{\pgf@xc}{\pgf@yc}
- \pgf@nlt@lineto{\pgf@xc}{\pgf@yc}%
- }%
- \advance\pgfutil@tempdimb by\pgf@xc%
- \ifdim\pgfutil@tempdimb<\pgf@xb%
- \pgfutil@repeat%
- \advance\pgfutil@tempdimb by-0.01pt\relax%
- \ifdim\pgfutil@tempdimb<\pgf@xb%
- {%
- \pgf@xc=\pgfutil@tempdimb%
- \pgf@yc=\pgf@ya%
- \pgf@pos@transform{\pgf@xc}{\pgf@yc}
- \pgf@nlt@moveto{\pgf@xc}{\pgf@yc}%
- \pgf@xc=\pgfutil@tempdimb%
- \pgf@yc=\pgf@yb%
- \pgf@pos@transform{\pgf@xc}{\pgf@yc}
- \pgf@nlt@lineto{\pgf@xc}{\pgf@yc}%
- }%
+ \ifdim \pgf@xc > .01pt\relax% if to draw vertical lines
+ \c@pgf@counta=\pgf@xa\relax%
+ \c@pgf@countb=\pgf@xc\relax%
+ \divide\c@pgf@counta by\c@pgf@countb\relax%
+ \pgfutil@tempdimb=\c@pgf@counta\pgf@xc\relax%
+ \ifdim\pgfutil@tempdimb<\pgf@xa%
+ \advance\pgfutil@tempdimb by\pgf@xc%
+ \fi%
+ \pgfutil@loop% vertical lines
+ {%
+ \pgf@xc=\pgfutil@tempdimb%
+ \pgf@yc=\pgf@ya%
+ \pgf@pos@transform{\pgf@xc}{\pgf@yc}
+ \pgf@nlt@moveto{\pgf@xc}{\pgf@yc}%
+ \pgf@xc=\pgfutil@tempdimb%
+ \pgf@yc=\pgf@yb%
+ \pgf@pos@transform{\pgf@xc}{\pgf@yc}
+ \pgf@nlt@lineto{\pgf@xc}{\pgf@yc}%
+ }%
+ \advance\pgfutil@tempdimb by\pgf@xc%
+ \ifdim\pgfutil@tempdimb<\pgf@xb%
+ \pgfutil@repeat%
+ \advance\pgfutil@tempdimb by-0.01pt\relax%
+ \ifdim\pgfutil@tempdimb<\pgf@xb%
+ {%
+ \pgf@xc=\pgfutil@tempdimb%
+ \pgf@yc=\pgf@ya%
+ \pgf@pos@transform{\pgf@xc}{\pgf@yc}
+ \pgf@nlt@moveto{\pgf@xc}{\pgf@yc}%
+ \pgf@xc=\pgfutil@tempdimb%
+ \pgf@yc=\pgf@yb%
+ \pgf@pos@transform{\pgf@xc}{\pgf@yc}
+ \pgf@nlt@lineto{\pgf@xc}{\pgf@yc}%
+ }%
+ \fi%
\fi%
+ \pgf@process{#3}%
+ \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@nlt@moveto{\pgf@x}{\pgf@y}%
}
@@ -1223,20 +1230,20 @@
%
% #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.
-%
+% 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.
-%
+% bend at the current point.
+%
% Examples:
%
% % Half-parabola going ``up and right''
@@ -1264,7 +1271,7 @@
\ifdim\pgf@yb=0pt\relax%
\pgfutil@tempswafalse%
\fi%
- \fi%
+ \fi%
{%
\ifpgfutil@tempswa%
\pgf@arccornersfalse
@@ -1276,7 +1283,7 @@
\pgfutil@tempswafalse%
\fi%
\fi%
- \ifpgfutil@tempswa
+ \ifpgfutil@tempswa
{%
\pgf@pt@x=\pgf@path@lastx%
\pgf@pt@y=\pgf@path@lasty%
@@ -1299,8 +1306,8 @@
{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
}%
\fi%
- }%
-}
+ }%
+}
@@ -1308,12 +1315,12 @@
% 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]
@@ -1329,16 +1336,16 @@
\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{.3260\pgf@xc}{.5120\pgf@yc}}%
+ {\pgfqpoint{.6380\pgf@xc}{\pgf@yc}}%
{\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]
@@ -1354,11 +1361,11 @@
\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{.3620\pgf@xc}{0pt}}%
+ {\pgfqpoint{.6740\pgf@xc}{.4880\pgf@yc}}%
{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
- }%
-}
+ }%
+}
@@ -1371,7 +1378,7 @@
% #5 - second control
% #6 - end point of the curve
%
-% There are two versions, \pgfpathcurvebetweentime and
+% There are two versions, \pgfpathcurvebetweentime and
% \pgfpathcurvebetweentimecontinue. The latter does not insert a
% moveto to the first point.
%
@@ -1395,7 +1402,7 @@
\def\pgf@@@pathcurvebetweentime#1#2#3#4#5{%
% Q1 = P1.
- \pgf@process{#2}%
+ \pgf@process{#2}%
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
% Q2 = P1 + t*(P2-P1).
@@ -1417,7 +1424,7 @@
\pgf@process{%
\pgf@process{#4}%
\pgf@xa=#1\pgf@x%
- \pgf@ya=#1\pgf@y%
+ \pgf@ya=#1\pgf@y%
%
\pgf@process{#3}%
\pgf@xc=\pgf@x%
@@ -1428,7 +1435,7 @@
\pgf@x=\pgf@xb%
\pgf@y=\pgf@yb%
\advance\pgf@x by#1\pgf@xa%
- \advance\pgf@y by#1\pgf@ya%
+ \advance\pgf@y by#1\pgf@ya%
\advance\pgf@x by-#1\pgf@xb%
\advance\pgf@y by-#1\pgf@yb%
\advance\pgf@x by#1\pgf@xc%
@@ -1437,7 +1444,7 @@
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
% Q4 = (1-t)^3*P1 + 3*t(1-t)^2*P2 + 3*t^2(1-t)*P3 + t^3*P4.
- \pgf@process{\pgfpointcurveattime{#1}{#2}{#3}{#4}{#5}}%
+ \pgf@process{\pgfpointcurveattime{#1}{#2}{#3}{#4}{#5}}%
\ifx#1\pgf@time@t%
% First time round...
\pgfmathdivide@{\pgf@time@s}{\pgf@time@t}%
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
index b9c47231afa..0f52985c194 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
@@ -7,20 +7,20 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex,v 1.9 2013/09/09 10:05:41 tantau Exp $
+\ProvidesFileRCS{pgfcorepathprocessing.code.tex}
% Split a path at the last subpath of a path
%
% #1 = a macro that stores a path
-%
+%
% Description:
%
% This command will split the path into two parts:
%
% \pgfprocessresultpathprefix
% The part of the path before the last subpath.
-%
+%
% \pgfprocessresultpathsuffix
% The last subpath on the path.
%
@@ -31,7 +31,7 @@
\def\pgfprocesssplitpath#1{%
\let\pgfprocessresultpathprefix\pgfutil@empty%
\let\pgfprocessresultpathsuffix\pgfutil@empty%
- \let\pgf@next\pgf@process@split%
+ \let\pgf@next\pgf@process@split%
\expandafter\pgf@process@split#1\pgfsyssoftpath@movetotoken{}{}\pgf@stop%
}
@@ -51,13 +51,13 @@
% Split a subpath at the end
-%
+%
% #1 = a macro that stores an open subpath that contains at least two
% path commands (so, not just a moveto);
-%
+%
% Description:
-%
-% Splits the supath into two parts:
+%
+% Splits the subpath into two parts:
%
% \pgfprocessresultsubpathsuffix
% This macro contains the last two "relevant" path commands: The end
@@ -87,7 +87,7 @@
\expandafter\def\expandafter\pgfprocessresultsubpathsuffix\expandafter{\pgfprocessresultsubpathsuffix#1{#2}{#3}}%
\let\pgf@next\pgfutil@gobble%
\else%
- \pgf@split@movetrue%
+ \pgf@split@movetrue%
\ifx#1\pgfsyssoftpath@curvetosupportatoken%
\pgf@split@movefalse%
\else
@@ -122,7 +122,7 @@
% put in the pgfpoint-macros \pgfpointfirstonpath,
% \pgfpointsecondonpath, \pgfpointsecondlastonpath, and
% \pgfpointlastonpath. If the path is empty, these macros are set to
-% \pgfpointorigin.
+% \pgfpointorigin.
%
% Example:
%
@@ -131,7 +131,7 @@
% \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}
@@ -234,7 +234,7 @@
\pgf@proc@todo%
}
-
+
% Resolve specialround
%
% #1 = a macro that stores a path
@@ -243,7 +243,7 @@
% Description:
%
% Resolves all specialround tokens. When such a token is encountered,
-% the objective is to replace the next corner by a rounded corner.
+% the objective is to replace the next corner by a rounded corner.
%
\def\pgfprocessround#1#2{%
@@ -264,7 +264,7 @@
}
-\def\pgf@@processround#1#2{%
+\def\pgf@@processround#1#2{%
\let\pgfprocess@newpath\pgfutil@empty%
\let\pgfprocess@moveto\pgfutil@empty%
\let\pgfprocess@firstto\pgfutil@empty%
@@ -309,7 +309,7 @@
\let\next=\pgfprocess@round%
\fi%
\fi%
- \next%
+ \next%
}
\def\pgfprocess@specialround#1#2#3{%
@@ -322,7 +322,7 @@
\let\next=\pgfprocess@specialroundcope%
\else%
\ifx#1\pgfsyssoftpath@curvetosupportatoken%
- % Ok, round a curveto.
+ % Ok, round a curveto.
\let\next=\pgfprocess@specialroundcurveto%
\else%
\ifx#1\pgfsyssoftpath@closepathtoken%
@@ -343,17 +343,17 @@
\pgf@yc=#6%
\let\next=\pgfprocess@@specialround%
\else%
- \ifx#4\pgfsyssoftpath@curvetosupportatoken%
+ \ifx#4\pgfsyssoftpath@curvetosupportatoken%
\pgf@xc=#5%
\pgf@yc=#6%
\let\next=\pgfprocess@@specialround%
\else%
- \ifx#4\pgfsyssoftpath@closepathtoken%
+ \ifx#4\pgfsyssoftpath@closepathtoken%
\pgf@xc=#5%
\pgf@yc=#6%
\let\next=\pgfprocess@@specialround%
\else
- \ifx#4\pgfsyssoftpath@specialroundtoken%
+ \ifx#4\pgfsyssoftpath@specialroundtoken%
\let\next=\pgfprocess@@findrightcoordinates%
\fi%
\fi%
@@ -445,7 +445,7 @@
\expandafter\expandafter\expandafter\noexpand\expandafter\pgfprocess@@specialclosemoveto\pgfprocess@moveto%
}%
\fi%
- \fi%
+ \fi%
\next%
}
@@ -462,7 +462,7 @@
\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%
+ \pgf@marshal%
}
@@ -546,7 +546,7 @@
\pgfsyssoftpath@addtocurrentpath{#1{#2}{#3}}%
\fi%
\pgf@next#4%
-}
+}
\def\pgf@replace@handle@move{%
\pgfsyssoftpath@getcurrentpath\pgf@restpath%
@@ -559,5 +559,5 @@
% Redo first.
\let\pgf@@next=\pgf@replaceprocessfirst%
}
-
+
\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
index 0c36d3c1a4f..4ca277c9923 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepathusage.code.tex,v 1.24 2014/11/02 21:38:01 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfcorepathusage.code.tex}
% Stroke/fill/clip/etc. the current path. Depending on the options,
@@ -15,7 +15,7 @@
% 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:
+% #1 = action(s) to be applied to the current path. Valid actions are:
% stroke - strokes the path.
% draw - strokes the path and adds arrow tips.
% tips - adds arrow tips.
@@ -101,11 +101,11 @@
\let\pgf@up@action=\pgfutil@empty%
\ifx\pgf@up@clip\pgfutil@empty%
\else%
- % only clipping
+ % only clipping
\let\pgf@up@action=\pgfsys@discardpath%
\fi%
\fi%
- \fi%
+ \fi%
\pgfsyssoftpath@getcurrentpath\pgf@last@processed@path
\pgfprocessround{\pgf@last@processed@path}{\pgf@last@processed@path}% change the path
\pgfsyssoftpath@setcurrentpath\pgf@last@processed@path%
@@ -139,7 +139,7 @@
\ifnum\pgf@tips@mode=4\relax%
\pgf@up@draw@arrows@only%
\fi%
- \else%
+ \else%
\pgfsyssoftpath@invokecurrentpath%
\pgf@up@action%
\fi%
@@ -149,13 +149,16 @@
\pgfprocesscheckclosed{\pgf@arrowpath}{\pgfutil@tempswafalse}%
\pgf@path@check@proper%
\ifpgfutil@tempswa%
+ \pgf@check@for@arrow@and@animation%
\pgf@prepare@end@of@path%
\begingroup%
\pgf@prepare@start@of@path%
\fi%
- \pgfsyssoftpath@invokecurrentpath%
+ \pgfsyssoftpath@invokecurrentpath%
\pgf@up@action%
- \pgf@stroke@inner@line@if@needed%
+ \ifdim\pgfinnerlinewidth>0pt\relax%
+ \pgf@stroke@inner@line%
+ \fi%
\ifpgfutil@tempswa%
\pgf@add@arrow@at@start%
\endgroup%
@@ -186,6 +189,7 @@
\pgfprocesscheckclosed{\pgf@arrowpath}{\pgfutil@tempswafalse}%
\pgf@path@check@proper%
\ifpgfutil@tempswa%
+ \pgf@check@for@arrow@and@animation%
\pgf@prepare@end@of@path%
\begingroup%
\pgf@prepare@start@of@path%
@@ -195,6 +199,22 @@
\fi%
}
+\def\pgf@check@for@arrow@and@animation{\pgfsys@if@fresh@currentid{\pgf@check@for@arrow@and@animation@}{}}%
+\def\pgf@check@for@arrow@and@animation@{%
+ \expandafter\ifx\csname pgfsysanim@path@is@animated@\pgf@sys@id@current@id @\pgfsys@current@type\endcsname\pgfutil@empty%
+ % Ok, an animation is here!
+ \ifx\pgf@end@tip@sequence\pgfutil@empty%
+ \ifx\pgf@start@tip@sequence\pgfutil@empty%
+ \else%
+ \pgf@check@for@arrow@and@animation@error%
+ \fi%
+ \else%
+ \pgf@check@for@arrow@and@animation@error%
+ \fi%
+ \fi%
+}
+\def\pgf@check@for@arrow@and@animation@error{\pgferror{Animated path may not have normal arrow tips. Use a base path with arrow tips}}
+
\def\pgf@path@check@proper{%
\ifpgfutil@tempswa%
\ifnum\pgf@tips@mode>2\relax%
@@ -203,7 +223,6 @@
\fi%
}
-
\def\pgf@path@check@proper@{%
{%
\pgf@x0pt\pgf@y\pgf@x%
@@ -234,24 +253,20 @@
-\def\pgf@stroke@inner@line@if@needed{%
- \ifdim\pgfinnerlinewidth>0pt\relax%
- \let\pgf@temp@save=\pgf@strokecolor@global
- \pgfsys@beginscope%
- {%
- \pgfsys@setlinewidth{\pgfinnerlinewidth}%
- \pgfsetstrokecolor{\pgfinnerstrokecolor}%
- \pgfsyssoftpath@invokecurrentpath%
- \pgfsys@stroke%
- }%
- \pgfsys@endscope%
- \global\let\pgf@strokecolor@global=\pgf@temp@save
- \fi%
+\def\pgf@stroke@inner@line{%
+ \let\pgf@temp@save=\pgf@strokecolor@global
+ \pgfsys@beginscope%
+ {%
+ \pgfsys@setlinewidth{\pgfinnerlinewidth}%
+ \pgfsetstrokecolor{\pgfinnerstrokecolor}%
+ \pgfsyssoftpath@invokecurrentpath%
+ \pgfsys@stroke%
+ }%
+ \pgfsys@endscope%
+ \global\let\pgf@strokecolor@global=\pgf@temp@save
}
\let\pgf@prepare@start@of@path\relax%
-\let\pgf@add@arrow@at@end\relax%
-\let\pgf@add@arrow@at@start\relax%
@@ -278,11 +293,11 @@
-%
-%
-% Handling the end of a path
-%
-%
+%
+%
+% Handling the end of a path
+%
+%
% The "handling" consists of first testing whether we need to do
% anything at all, namely because either an arrow tip should be drawn
% at the end or because the path should be shortened at the end. If
@@ -296,20 +311,23 @@
% (step 0) and, if so, split the path (step 1), extract the interesting points from
% the path (step 2), prepare further computations (step 3), shorten
% the path (step 4) if necessary, and add the arrow tip (step 4 in
-% macro \pgf@add@arrow@at@end, which is called later).
+% macro \pgf@add@arrow@at@end, which is called later).
\def\pgf@prepare@end@of@path{%
\let\pgfprocessresultpathsuffix\relax% flag that nothing has happened...
\let\pgfprocessresultsubpathsuffix\relax%
\pgfsyssoftpath@getcurrentpath\pgf@arrowpath%
- %
+ %
% Step 0 start:
- %
- % Do we need to worry about the end?
- %
+ %
+ % Do we need to worry about the end?
+ %
\ifx\pgf@arrowpath\pgfutil@empty\else%
\pgf@worryfalse%
- \ifx\pgf@end@tip@sequence\pgfutil@empty\else\pgf@worrytrue\fi% Yes, worry if we have to draw an arrow
+ \ifx\pgf@end@tip@sequence\pgfutil@empty%
+ \else%
+ \pgf@worrytrue% Yes, worry if we have to draw an arrow
+ \fi%
\pgf@precise@shorteningfalse%
\pgf@arrow@compute@shortening\pgf@end@tip@sequence%
\advance\pgf@xa by\pgf@shorten@end@additional%
@@ -317,28 +335,28 @@
\ifdim\pgf@xa=0pt\relax\else\pgf@worrytrue\fi% Also, worry if shortening is requested
\edef\pgf@path@shortening@distance{\the\pgf@xa}%
\edef\pgf@arrow@tip@total@length{\the\pgf@xb}%
- %
+ %
% Step 0 done.
- %
+ %
\ifpgf@worry%
% Ok, need to "worry" about the end, either because we need to
% shorten it or to draw an arrow head.
%
% Step 1: Split
- %
+ %
\pgfprocesssplitpath{\pgf@arrowpath}%
\pgfprocesssplitsubpath{\pgfprocessresultpathsuffix}%
- %
+ %
% Step 2: extract
%
\expandafter\pgf@parse@end\pgfprocessresultsubpathsuffix\pgf@stop\pgf@stop\pgf@stop%
- %
- % Step 3: prep
- %
+ %
+ % Step 3: prep
+ %
\pgf@prep@end%
- %
+ %
% Step 4: shorten
- %
+ %
\ifdim\pgf@path@shortening@distance=0pt\else\pgf@do@shorten@end\fi%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\pgf@arrowpath%
@@ -376,7 +394,7 @@
\def\pgfpointlastonpath{\pgfqpoint{#5}{#6}}%
\let\pgfpointfourthlastonpath\relax%
\let\pgfpointthirdlastonpath\relax%
- \let\pgf@next\pgf@parse@end@gobble@three%
+ \let\pgf@next\pgf@parse@end@gobble@three%
\let\pgf@do@shorten@end\pgf@do@shorten@straightend%
\let\pgf@do@draw@end\pgf@do@draw@straightend%
\let\pgf@prep@end\pgf@prep@straightend%
@@ -394,8 +412,8 @@
\fi%
}
-%
-% Preps
+%
+% Preps
%
\def\pgf@prep@movetoend{%
\pgf@process{\pgfpointlastonpath}%
@@ -422,7 +440,7 @@
}
-%
+%
% Line shortening for straight lines:
%
\def\pgf@do@shorten@straightend{%
@@ -433,21 +451,21 @@
}
-%
+%
% Draw an end arrow by calling an appropriate subfunction, if necessary
-%
+%
\def\pgf@add@arrow@at@end{%
\ifx\pgf@arrowpath\pgfutil@empty\else%
\ifx\pgf@end@tip@sequence\pgfutil@empty\else%
\pgf@do@draw@end%
- \fi%
+ \fi%
\fi%
}
-%
+%
% Draw an end arrow at the end of a straight line
-%
+%
\def\pgf@do@draw@straightend{%
{%
\pgftransformreset%
@@ -458,29 +476,31 @@
-%
-%
-% Handling the start of a path
-%
-%
+
+
+%
+%
+% Handling the start of a path
+%
+%
% The "handling" is similar to the case for the start of the path. We
% may be able to skip the splitting if that was done already for the
% end. Otherwise, things are basically the same.
%
% Prepare the start of the path: Test whether anything must be done
-% (step 0) and, if so, split the path (step 1) if necesssary, extract
+% (step 0) and, if so, split the path (step 1) if necessary, extract
% the interesting points from the path (step 2), prepare computations
% (step 3) needed for both shortening and tip adding, shorten the path
% (step 4), and add the arrow tip (step 5 in macro
-% \pgf@add@arrow@at@start, which is called later).
+% \pgf@add@arrow@at@start, which is called later).
\def\pgf@prepare@start@of@path{%
- %
+ %
% Step 0 start:
- %
- % Do we need to worry about the start?
- %
+ %
+ % Do we need to worry about the start?
+ %
\ifx\pgf@arrowpath\pgfutil@empty\else%
\pgf@worryfalse%
\ifx\pgf@start@tip@sequence\pgfutil@empty\else\pgf@worrytrue\fi% Yes, worry if we have to draw an arrow
@@ -491,30 +511,30 @@
\ifdim\pgf@xa=0pt\relax\else\pgf@worrytrue\fi% Also, worry if shortening is requested
\edef\pgf@path@shortening@distance{\the\pgf@xa}%
\edef\pgf@arrow@tip@total@length{\the\pgf@xb}%
- %
+ %
% Step 0 done.
- %
+ %
\ifpgf@worry%
% Ok, need to "worry" about the start, either because we need to
% shorten it or to draw an arrow head.
%
% Step 1: Split
- %
+ %
\ifx\pgfprocessresultpathsuffix\relax%
% Ok, still need to compute the split:
\pgfprocesssplitpath{\pgf@arrowpath}%
\fi%
- %
+ %
% Step 2: extract
%
\expandafter\pgf@parse@start\pgfprocessresultpathsuffix\pgf@stop\pgf@stop\pgf@stop%
- %
+ %
% Step 3: prep
%
\pgf@prep@start%
- %
+ %
% Step 4: shorten
- %
+ %
\ifdim\pgf@path@shortening@distance=0pt\else\pgf@do@shorten@start\fi%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\pgf@arrowpath%
@@ -549,7 +569,7 @@
\let\pgf@prep@start\pgf@prep@straightstart%
\fi%
\else% A straight line -> great!
- \let\pgf@next\pgf@parse@start@till@stop%
+ \let\pgf@next\pgf@parse@start@till@stop%
\let\pgf@do@shorten@start\pgf@do@shorten@straightstart%
\let\pgf@do@draw@start\pgf@do@draw@straightstart%
\let\pgf@prep@start\pgf@prep@straightstart%
@@ -571,8 +591,8 @@
\def\pgfsubpathend{#1{#2}{#3}#4{#5}{#6}#7}%
}
-%
-% Preps
+%
+% Preps
%
\def\pgf@prep@movetostart{%
\pgf@process{\pgfpointfirstonpath}%
@@ -598,7 +618,7 @@
\pgf@ya\pgf@y%
}
-%
+%
% Line shortening for straight lines:
%
\def\pgf@do@shorten@straightstart{%
@@ -609,21 +629,21 @@
}
-%
+%
% Draw a start arrow by calling an appropriate subfunction, if necessary
-%
+%
\def\pgf@add@arrow@at@start{%
\ifx\pgf@arrowpath\pgfutil@empty\else%
\ifx\pgf@start@tip@sequence\pgfutil@empty\else%
\pgf@do@draw@start%
- \fi%
+ \fi%
\fi%
}
-%
+%
% Draw an start arrow at the start of a straight line
-%
+%
\def\pgf@do@draw@straightstart{%
{%
\pgftransformreset%
@@ -639,8 +659,3 @@
\endinput%
-
-
-
-
-
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
index 54b5afcf6ae..d2186d66bc2 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.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.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepatterns.code.tex,v 1.5 2013/11/07 15:45:46 tantau Exp $
+\ProvidesFileRCS{pgfcorepatterns.code.tex}
% Creates a new uncolored pattern
%
@@ -110,16 +110,16 @@
\pgf@next}
\long\def\pgf@declarepatternformonly#1#2#3#4#5{\pgf@declarepattern{#1}{#2}{#3}{#4}{#5}{0}}
-
+
\long\def\pgf@declarepatterninherentlycolored#1#2#3#4#5{\pgf@declarepattern{#1}{#2}{#3}{#4}{#5}{1}}
-
+
\long\def\pgf@declarepatternformonly@mutable#1#2#3#4#5{%
- \def\pgf@marshal{\pgf@declarepatternmutable{#1}}%
+ \def\pgf@marshal{\pgf@declarepatternmutable{#1}}%
\expandafter\pgf@marshal\expandafter{\pgf@pattern@tempvars}{#2}{#3}{#4}{#5}{2}%
}
\long\def\pgf@declarepatterninherentlycolored@mutable#1#2#3#4#5#6{%
- \def\pgf@marshal{\pgf@declarepatternmutable{#1}}%
+ \def\pgf@marshal{\pgf@declarepatternmutable{#1}}%
\expandafter\pgf@marshal\expandafter{\pgf@pattern@tempvars}{#2}{#3}{#4}{#5}{3}%
}
@@ -177,7 +177,7 @@
\expandafter\gdef\csname pgf@pattern@upperright@#1\endcsname{#4}%
\expandafter\gdef\csname pgf@pattern@tilesize@#1\endcsname{#5}%
\expandafter\long\expandafter\gdef\csname pgf@pattern@code@#1\endcsname{#6}%
- \expandafter\gdef\csname pgf@pattern@type@#1\endcsname{7}%
+ \expandafter\gdef\csname pgf@pattern@type@#1\endcsname{7}%
}{\pgferror{The pattern `#1' is already defined}}%
}
@@ -218,7 +218,7 @@
{%
\pgf@ifpatternismutable{#1}%
{%
- % So, a mutable pattern. Check to see if the pattern
+ % So, a mutable pattern. Check to see if the pattern
% has been used with the current variable values...
\let\pgf@pattern@tempvars\pgfutil@empty%
\expandafter\expandafter\expandafter\pgf@pattern@check@vars%
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
index b546d5df40f..57db0d20ba2 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepoints.code.tex,v 1.27 2013/10/07 15:51:46 tantau Exp $
+\ProvidesFileRCS{pgfcorepoints.code.tex}
\newdimen\pgf@picminx
\newdimen\pgf@picmaxx
@@ -34,18 +34,18 @@
% \pgfextract@process\myarcpoint{\pgfpointpolar{30}{5cm and 2cm}}
\def\pgfextract@process#1#2{%
- \pgf@process{#2}%
- \edef#1{\noexpand\pgf@x=\the\pgf@x\noexpand\relax\noexpand\pgf@y=\the\pgf@y\noexpand\relax}%
+ \pgf@process{#2}%
+ \edef#1{\noexpand\global\pgf@x=\the\pgf@x\noexpand\relax\noexpand\global\pgf@y=\the\pgf@y\noexpand\relax}%
}
% This needed until old shapes code changed.
\let\pgfsavepgf@process\pgfextract@process%
% Return a point
-%
-% #1 = x-coordinate of the point
-% #2 = y-coordinate of the point
-%
+%
+% #1 = x-coordinate of the point
+% #2 = y-coordinate of the point
+%
% x = #1
% y = #2
%
@@ -59,10 +59,10 @@
% 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
%
@@ -70,12 +70,12 @@
%
% \pgfpathmoveto{\pgfqpoint{2pt}{3cm}}
-\def\pgfqpoint#1#2{\pgf@x=#1\pgf@y=#2}
+\def\pgfqpoint#1#2{\global\pgf@x=#1\relax\global\pgf@y=#2\relax}
% Return the origin.
-%
+%
% x = 0
% y = 0
%
@@ -83,12 +83,12 @@
%
% \pgfpathmoveto{\pgfpointorigin}
-\def\pgfpointorigin{\pgf@x=0pt\pgf@y=\pgf@x\ignorespaces}
+\def\pgfpointorigin{\global\pgf@x=0pt \global\pgf@y=\pgf@x\ignorespaces}
% Return a transformed point
-%
+%
% #1 = a point
%
% Description:
@@ -108,18 +108,18 @@
\def\pgfpointtransformed#1{%
\pgf@process{%
#1%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@pos@transform@glob%
}%
}
% 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
+%
+% #1 = start of vector
+% #2 = end of vector
+%
+% x = x-component of difference
+% y = y-component of difference
%
% Example:
%
@@ -130,14 +130,14 @@
\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
-%
+ \global\advance\pgf@x by-\pgf@xa\relax%
+ \global\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
%
@@ -150,15 +150,15 @@
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\pgf@process{#2}%
- \advance\pgf@x by\pgf@xa%
- \advance\pgf@y by\pgf@ya}
+ \global\advance\pgf@x by\pgf@xa%
+ \global\advance\pgf@y by\pgf@ya}
% Multiply a vector by a factor.
-%
-% #1 = factor
-% #2 = vector
+%
+% #1 = factor
+% #2 = vector
%
% Example:
%
@@ -167,20 +167,20 @@
\def\pgfpointscale#1#2{%
\pgf@process{#2}%
\pgfmathparse{#1}%
- \pgf@x=\pgfmathresult\pgf@x%
- \pgf@y=\pgfmathresult\pgf@y%
+ \global\pgf@x=\pgfmathresult\pgf@x%
+ \global\pgf@y=\pgfmathresult\pgf@y%
}
% A "quick" variant of \pgfpointscale which doesn't invoke the math parser for '#1'.
% #1 must be a number without units, no registers are accepted.
\def\pgfqpointscale#1#2{%
\pgf@process{#2}%
- \pgf@x=#1\pgf@x%
- \pgf@y=#1\pgf@y%
+ \global\pgf@x=#1\pgf@x%
+ \global\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
@@ -196,9 +196,9 @@
\def\pgfpointintersectionoflines#1#2#3#4{%
{%
- %
+ %
% Compute orthogonal vector to #1--#2
- %
+ %
\pgf@process{#2}%
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
@@ -226,12 +226,12 @@
%
\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%
@@ -259,12 +259,12 @@
%
\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
+ %
+ % Setup transformation matrix (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}}}%
@@ -273,7 +273,7 @@
% The intersection of two circles
-%
+%
% #1 = center of first circle
% #2 = center of second circle
% #3 = radius of first circle
@@ -404,7 +404,7 @@
\pgf@xb=\pgf@sys@tonumber{\dimen0}\dimen9%
\pgf@xb=-\pgf@xb%
\advance\pgf@y by\pgf@xb\relax%
- \else%
+ \else%
% x = a + ek/p - (f/p)sqrt(r^2 - k^2)
\pgf@x=\pgf@xa%
\advance\pgf@x by\pgf@sys@tonumber{\dimen0}\dimen8\relax%
@@ -426,13 +426,13 @@
% 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
-%
+% #3 = end point
+%
% x = x-component of #1*start + (1-#1)*end
-% y = y-component of #1*start + (1-#1)*end
+% y = y-component of #1*start + (1-#1)*end
% xa/ya = #1*start + (1-#1)*end
% xb/yb = start point
% xc/yc = end point
@@ -454,21 +454,21 @@
\pgfmathsetmacro\pgf@temp{#1}%
\advance\pgf@xa by-\pgf@x%
\advance\pgf@ya by-\pgf@y%
- \advance\pgf@x by\pgf@temp\pgf@xa%
- \advance\pgf@y by\pgf@temp\pgf@ya%
+ \global\advance\pgf@x by\pgf@temp\pgf@xa%
+ \global\advance\pgf@y by\pgf@temp\pgf@ya%
}
% Move point #2 #1 many units in the direction of #3.
-%
+%
% #1 = a distance
% #2 = start point
-% #3 = end point
+% #3 = end point
%
% Description:
%
% Computes
-%
+%
% x/y = start + #1*(normalise(end-start))
%
% and additionally
@@ -490,27 +490,27 @@
\pgf@process{#3}%
\pgf@xc\pgf@x%
\pgf@yc\pgf@y%
- \advance\pgf@x by-\pgf@xb\relax%
- \advance\pgf@y by-\pgf@yb\relax%
+ \global\advance\pgf@x by-\pgf@xb\relax%
+ \global\advance\pgf@y by-\pgf@yb\relax%
\pgf@process{\pgfpointnormalised{}}% x/y = normalised vector
\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%
+ \global\pgf@x=\pgf@xb\relax%
+ \global\pgf@y=\pgf@yb\relax%
+ \global\advance\pgf@x by\pgf@xa\relax%
+ \global\advance\pgf@y by\pgf@ya\relax%
}
% 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
-%
+% #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
%
@@ -528,8 +528,8 @@
\def\pgfpointcurveattime#1#2#3#4#5{%
\pgfmathparse{#1}%
\let\pgf@time@s=\pgfmathresult%
- \pgf@x=\pgfmathresult pt%
- \pgf@x=-\pgf@x%
+ \global\pgf@x=\pgfmathresult pt%
+ \global\pgf@x=-\pgf@x%
\advance\pgf@x by 1pt%
\edef\pgf@time@t{\pgf@sys@tonumber{\pgf@x}}%
\pgf@process{#5}%
@@ -543,30 +543,30 @@
\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%
+ \global\pgf@x=\pgf@time@t\pgf@x\global\advance\pgf@x by\pgf@time@s\pgf@xa%
+ \global\pgf@y=\pgf@time@t\pgf@y\global\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%
+ \global\pgf@x=\pgf@time@t\pgf@x\global\advance\pgf@x by\pgf@time@s\pgf@xa%
+ \global\pgf@y=\pgf@time@t\pgf@y\global\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%
+ \global\pgf@x=\pgf@time@t\pgf@x\global\advance\pgf@x by\pgf@time@s\pgf@xa%
+ \global\pgf@y=\pgf@time@t\pgf@y\global\advance\pgf@y by\pgf@time@s\pgf@ya%
}
% Returns point on an arc at a certain "time"
-%
-% #1 = a time
+%
+% #1 = a time
% #2 = center of a ellipse
% #3 = 0-degree exis of the ellipse
% #4 = 90-degree exis of the ellipse
@@ -589,8 +589,8 @@
\pgfmathsetmacro\pgf@angle@start{#5}%
\pgfmathsetmacro\pgf@angle@end{#6}%
\pgfmathparse{#1}%
- \pgf@x=\pgfmathresult pt%
- \pgf@x=-\pgf@x%
+ \global\pgf@x=\pgfmathresult pt%
+ \global\pgf@x=-\pgf@x%
\advance\pgf@x by 1pt%
\pgfmathsetmacro\pgf@angle@mid{\pgf@angle@end*\pgfmathresult+\pgf@angle@start*\pgf@sys@tonumber{\pgf@x}}%
\pgfmathcos@{\pgf@angle@mid}%
@@ -605,11 +605,11 @@
\pgf@process{\pgfpointadd{\pgfpointscale{\pgf@angle@sin}{\pgf@angle@zero@axis}}%
{\pgfpointscale{-\pgf@angle@cos}{\pgf@angle@ninety@axis}}}%
\ifdim\pgf@angle@start pt>\pgf@angle@end pt%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
\else%
- \pgf@xa=-\pgf@x%
- \pgf@ya=-\pgf@y%
+ \pgf@xa=-\pgf@x%
+ \pgf@ya=-\pgf@y%
\fi%
% Compute position
\pgf@process{\pgfpointadd{#2}{%
@@ -632,12 +632,12 @@
% A polar coordinate
%
% #1 = a degree
-% #2 = a radius -- either a dimension or two dimensions separated by
-% " and ".
+% #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}}
@@ -649,29 +649,29 @@
\pgf@polar@#2\@@%
\else%
\pgf@polar@#2 and #2\@@%
- \fi%
+ \fi%
\pgfmathparse{#1}%
\let\pgfpoint@angle=\pgfmathresult%
\pgfmathcos@{\pgfpoint@angle}%
- \pgf@x=\pgfmathresult\pgf@x%
+ \global\pgf@x=\pgfmathresult\pgf@x%
\pgfmathsin@{\pgfpoint@angle}%
- \pgf@y=\pgfmathresult\pgf@y%
+ \global\pgf@y=\pgfmathresult\pgf@y%
}
\def\pgf@polar@#1and #2\@@{%
\pgfmathsetlength{\pgf@y}{#2}%
- \pgfmathsetlength{\pgf@x}{#1}%
+ \pgfmathsetlength{\pgf@x}{#1}%
}
% Quick version of the polar coordinate method
\def\pgfqpointpolar#1#2{%
- \pgf@x=#2%
- \pgf@y=\pgf@x%
+ \global\pgf@x=#2%
+ \global\pgf@y=\pgf@x%
\pgfmathcos@{#1}%
- \pgf@x=\pgfmathresult\pgf@x%
+ \global\pgf@x=\pgfmathresult\pgf@x%
\pgfmathsin@{#1}%
- \pgf@y=\pgfmathresult\pgf@y\relax%
+ \global\pgf@y=\pgfmathresult\pgf@y\relax%
}
@@ -680,11 +680,11 @@
% A polar coordinate in the xy plane.
%
% #1 = a degree
-% #2 = a radius given as a number or two radi
+% #2 = a radius given as a number or two radii
%
% result = (first dim in #2) * x-vector * cos(#1) +
% (second dim in #2) * y-vector * sin(#1)
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfpointpolarxy{30}{2}}
@@ -695,17 +695,17 @@
\pgf@polarxy@#2\@@%
\else%
\pgf@polarxy@#2and #2\@@%
- \fi%
+ \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}
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@xx%
+ \global\advance\pgf@x by \pgf@sys@tonumber{\pgf@ya}\pgf@yx%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xa}\pgf@xy%
+ \global\advance\pgf@y by \pgf@sys@tonumber{\pgf@ya}\pgf@yy}
\def\pgf@polarxy@#1and #2\@@{%
\pgfmathsetlength{\pgf@xa}{#1}%
@@ -721,7 +721,7 @@
% #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}}
@@ -729,8 +729,8 @@
\def\pgfpointcylindrical#1#2#3{%
\pgfpointpolarxy{#1}{#2}%
\pgfmathparse{#3}%
- \advance\pgf@x by \pgfmathresult\pgf@zx%
- \advance\pgf@y by \pgfmathresult\pgf@zy}
+ \global\advance\pgf@x by \pgfmathresult\pgf@zx%
+ \global\advance\pgf@y by \pgfmathresult\pgf@zy}
% A spherical coordinate.
@@ -740,7 +740,7 @@
% #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}}
@@ -764,33 +764,33 @@
\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%
+ \global\pgf@x=\pgfmathresult\pgf@xc%
+ \global\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
+% #2 = a factor for 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}}
@@ -802,40 +802,40 @@
\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}
+ \global\pgf@x=\pgftemp@x\pgf@xx%
+ \global\advance\pgf@x by \pgftemp@y\pgf@yx%
+ \global\pgf@y=\pgftemp@x\pgf@xy%
+ \global\advance\pgf@y by \pgftemp@y\pgf@yy}
% "Quick" variant for \pgfpointxy.
%
% Only numbers without unit are allowed here.
\def\pgfqpointxy#1#2{%
- \pgf@x=#1\pgf@xx%
- \advance\pgf@x by #2\pgf@yx%
- \pgf@y=#1\pgf@xy%
- \advance\pgf@y by #2\pgf@yy}
+ \global\pgf@x=#1\pgf@xx%
+ \global\advance\pgf@x by #2\pgf@yx%
+ \global\pgf@y=#1\pgf@xy%
+ \global\advance\pgf@y by #2\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
+% #2 = a factor for the y-vector
+% #3 = a factor for 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}}
@@ -856,23 +856,23 @@
\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}
+ \global\pgf@x=\pgftemp@x\pgf@xx%
+ \global\advance\pgf@x by \pgftemp@y\pgf@yx%
+ \global\advance\pgf@x by \pgftemp@z\pgf@zx%
+ \global\pgf@y=\pgftemp@x\pgf@xy%
+ \global\advance\pgf@y by \pgftemp@y\pgf@yy%
+ \global\advance\pgf@y by \pgftemp@z\pgf@zy}
% "Quick" variant for \pgfpointxyz.
%
% Only numbers without unit are allowed.
\def\pgfqpointxyz#1#2#3{%
- \pgf@x=#1\pgf@xx%
- \advance\pgf@x by #2\pgf@yx%
- \advance\pgf@x by #3\pgf@zx%
- \pgf@y=#1\pgf@xy%
- \advance\pgf@y by #2\pgf@yy%
- \advance\pgf@y by #3\pgf@zy}
+ \global\pgf@x=#1\pgf@xx%
+ \global\advance\pgf@x by #2\pgf@yx%
+ \global\advance\pgf@x by #3\pgf@zx%
+ \global\pgf@y=#1\pgf@xy%
+ \global\advance\pgf@y by #2\pgf@yy%
+ \global\advance\pgf@y by #3\pgf@zy}
@@ -946,7 +946,7 @@
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\ifdim\pgf@x<0pt\relax% move into first quadrant
- \pgf@x=-\pgf@x%
+ \global\pgf@x=-\pgf@x%
\fi%
\ifdim\pgf@y<0pt\relax%
\pgf@y=-\pgf@y%
@@ -958,29 +958,29 @@
\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%
+ \global\divide\pgf@x by\c@pgf@counta%
+ \global\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%
+ \global\pgf@x=.125\pgf@x%
+ \global\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%
+ \global\pgf@x=1pt\relax%
+ \global\pgf@y=0pt\relax%
\else%
\divide\c@pgf@countb by \c@pgf@counta%
- \pgf@x=\csname pgf@cosfrac\the\c@pgf@countb\endcsname pt%
+ \global\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%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@ya%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@x}\pgf@y%
\fi%
\ifdim\pgf@xa<0pt%
- \pgf@x=-\pgf@x%
+ \global\pgf@x=-\pgf@x%
\fi%
\else% x <= y
% make point small
@@ -989,29 +989,29 @@
\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%
+ \global\divide\pgf@x by\c@pgf@counta%
+ \global\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%
+ \global\pgf@x=.125\pgf@x%
+ \global\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%
+ \global\pgf@y=1pt\relax%
+ \global\pgf@x=0pt\relax%
\else%
\divide\c@pgf@countb by \c@pgf@counta%
- \pgf@y=\csname pgfmath@cosfrac@\the\c@pgf@countb\endcsname pt%
+ \global\pgf@y=\csname pgfmath@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%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@xc}\pgf@xa%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@y}\pgf@x%
\fi%
\ifdim\pgf@ya<0pt%
- \pgf@y=-\pgf@y%
+ \global\pgf@y=-\pgf@y%
\fi%
\fi\ignorespaces%
}
@@ -1043,10 +1043,10 @@
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\ifnum\pgf@xa<0\relax% move into first quadrant
- \pgf@x=-\pgf@x%
+ \global\pgf@x=-\pgf@x%
\fi%
\ifnum\pgf@ya<0\relax%
- \pgf@y=-\pgf@y%
+ \global\pgf@y=-\pgf@y%
\fi%
\pgf@xc=.125\pgf@x%
\pgf@yc=.125\pgf@y%
@@ -1054,62 +1054,62 @@
\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%
+ \global\pgf@y=\pgf@yb\relax%
+ \global\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%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@y%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xb}\pgf@y%
\ifnum\pgf@y<\pgf@yb%
- \pgf@x=\pgf@xb%
+ \global\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%
+ \global\pgf@x=\pgf@xb\relax%
+ \global\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%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@yc}\pgf@x%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@yb}\pgf@x%
+ \global\pgf@y=\pgf@yb%
\fi%
- \fi%
+ \fi%
\fi%
\else%
\ifnum\c@pgf@countb<255\relax%
- \pgf@x=\pgf@xb\relax%
- \pgf@y=0pt\relax%
+ \global\pgf@x=\pgf@xb\relax%
+ \global\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%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@yc}\pgf@x%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@yb}\pgf@x%
\ifnum\pgf@x<\pgf@xb%
- \pgf@y=\pgf@yb%
+ \global\pgf@y=\pgf@yb%
\else%
\ifnum\c@pgf@counta<255\relax%
- \pgf@y=\pgf@yb\relax%
- \pgf@x=0pt\relax%
+ \global\pgf@y=\pgf@yb\relax%
+ \global\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%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@y%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xb}\pgf@y%
+ \global\pgf@x=\pgf@xb%
\fi%
- \fi%
+ \fi%
\fi%
- \fi%
- \ifnum\pgf@xa<0\relax\pgf@x=-\pgf@x\fi%
- \ifnum\pgf@ya<0\relax\pgf@y=-\pgf@y\fi%
+ \fi%
+ \ifnum\pgf@xa<0\relax\global\pgf@x=-\pgf@x\fi%
+ \ifnum\pgf@ya<0\relax\global\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.
+% 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
@@ -1128,44 +1128,44 @@
\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%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@x%
+ \global\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%
+ \global\divide\pgf@x by\c@pgf@countb%
+ \global\divide\pgf@y by\c@pgf@countb%
\pgf@xc=\pgf@x%
\pgf@yc=8192pt%
- \pgf@y=.125\pgf@y%
+ \global\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%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@yc}\pgf@y%
+ \global\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%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@x%
+ \global\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%
+ \global\divide\pgf@x by\c@pgf@countb%
+ \global\divide\pgf@y by\c@pgf@countb%
\pgf@yc=\pgf@y%
\pgf@xc=8192pt%
- \pgf@x=.125\pgf@x%
+ \global\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%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@yc}\pgf@x%
+ \global\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%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@x%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@ya}\pgf@y%
+ \fi%
\fi%
}
@@ -1174,7 +1174,7 @@
% Extract the x-coordinate of a point to a dimensions
-%
+%
% #1 = a TeX dimension
% #2 = a point
%
@@ -1190,7 +1190,7 @@
% Extract the y-coordinate of a point to a dimensions
-%
+%
% #1 = a TeX dimension
% #2 = a point
%
@@ -1205,11 +1205,10 @@
#1=\pgf@y\relax}
-% Stores the most recently used (x,y) coordinates into two macros, #1
-% and #2.
+% Stores the most recently used (x,y) coordinates into two macros, #1 and #2.
\def\pgfgetlastxy#1#2{%
- \edef#1{\the\pgf@x}%
- \edef#2{\the\pgf@y}%
+ \edef#1{\the\pgf@x}%
+ \edef#2{\the\pgf@y}%
}%
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
index d5817ce4282..21e115846fc 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorequick.code.tex,v 1.3 2008/10/09 16:46:56 tantau Exp $
+\ProvidesFileRCS{pgfcorequick.code.tex}
% Quick version of basic drawing commands. Most high-level commands
% are not available if these commands are used.
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex
new file mode 100644
index 00000000000..ae7e5351716
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex
@@ -0,0 +1,228 @@
+% Copyright 2016 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{pgfcorerdf.code.tex}
+
+
+
+%
+%
+% The Resource Description Framework (RDF) is a method of enriching
+% output files with semantic information. In PGF, you can use the
+% following commands to create RDF information that will be inserted
+% into the output, provided the output format allows this (SVG
+% does). You call any of these commands before an ID-scope and it will
+% attach the attribute(s) to this id scope.
+%
+%
+% Example:
+%
+% ...
+% \pgfrdftypeof{http://purl.org/dc/dcmitype/Image}
+% \pgfrdfresource{/paper/figures/1}
+% \pgfidscope
+% % This ID scope will be flagged as the resource "/paper/figures/1"
+% % and typeof "Image" from the Dublin Core.
+% ...
+% \endidscope
+
+
+
+
+
+% Adds the rdf attribute "about" with value #1 to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% The RDF-spec says: "a SafeCURIEorCURIEorIRI, used for stating what
+% the data is about (a 'subject' in RDF terminology);"
+
+\def\pgfrdfabout#1{\pgfsys@rdf@about{#1}}
+
+
+
+% Adds the rdf attribute content with value #1 to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% The RDF-spec says: "a CDATA string, for supplying machine-readable
+% content for a literal (a 'literal object', in RDF terminology);"
+
+\def\pgfrdfcontent#1{\pgfsys@rdf@content{#1}}
+
+
+
+% Adds the rdf attribute datatype with value #1 to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% The RDF-spec says: "a TERMorCURIEorAbsIRI representing a datatype,
+% to express the datatype of a literal;"
+
+\def\pgfrdfdatatype#1{\pgfsys@rdf@datatype{#1}}
+
+
+
+% Adds the rdf attribute href with value #1 to the next idscope
+% The RDF-spec says: "a traditionally navigable IRI for
+% expressing the partner resource of a relationship (a 'resource object', in RDF terminology);"
+
+\def\pgfrdfhref#1{\pgfsys@rdf@href{#1}}
+
+
+
+% Adds the rdf attribute inlist to the next idscope.
+%
+% Description:
+%
+% The RDF-spec says: "An attribute used to indicate that the object
+% associated with a rel or property attribute on the same element is
+% to be added to the list for that predicate. Presence of this
+% attribute causes a list to be created if it does not already exist."
+
+\def\pgfrdfinlist{\pgfsys@rdf@inlist}
+
+
+
+
+% Adds #1 to the list of the rdf prefix attribute to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% Can be called several times, in which case all values of #1 are
+% concatenated with whitespaces. The RDF-spec says: "a white space
+% separated list of prefix-name IRI pairs of the form NCName ':' ' '+
+% xsd:anyURI"
+
+\def\pgfrdfprefix#1{\pgfsys@rdf@prefix{#1}}
+
+
+
+
+% Adds #1 to the list of the rdf property attribute to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% Can be called repeatedly. The RDF-spec says: "a white space
+% separated list of TERMorCURIEorAbsIRIs, used for expressing
+% relationships between a subject and either a resource object if
+% given or some literal text (also a 'predicate');"
+
+\def\pgfrdfproperty#1{\pgfsys@rdf@property{#1}}
+
+
+
+% Adds #1 to the list of the rdf rel attribute to the next
+% next idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% Can be called repeatedly. The RDF-spec says: "a white space
+% separated list of TERMorCURIEorAbsIRIs, used for expressing
+% relationships between two resources ('predicates' in RDF
+% terminology);"
+
+\def\pgfrdfrel#1{\pgfsys@rdf@rel{#1}}
+
+
+% Adds the rdf attribute resource with value #1 to the next idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% The RDF-spec says: "a SafeCURIEorCURIEorIRI for expressing the
+% partner resource of a relationship that is not intended to be
+% navigable (e.g., a 'clickable' link) (also an 'object');"
+
+\def\pgfrdfresource#1{\pgfsys@rdf@resource{#1}}
+
+
+
+
+% Adds #1 to the list of the rdf rev attribute to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% Can be called repeatedly. The RDF-spec says: "a white space
+% separated list of TERMorCURIEorAbsIRIs, used for expressing reverse
+% relationships between two resources (also 'predicates');
+
+\def\pgfrdfrev#1{\pgfsys@rdf@rev{#1}}
+
+
+
+
+% Adds an rdf attribute src with value #1 to the next idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% The RDF-spec says: "an IRI for expressing the partner resource of a
+% relationship when the resource is embedded (also a 'resource object');"
+
+\def\pgfrdfsrc#1{\pgfsys@rdf@src{#1}}
+
+
+
+
+% Adds #1 to the list of the rdf typeof attribute to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% Can be called repeatedly. The RDF-spec says: "a white space
+% separated list of TERMorCURIEorAbsIRIs that indicate the RDF type(s)
+% to associate with a subject;"
+
+\def\pgfrdftypeof#1{\pgfsys@rdf@typeof{#1}}
+
+
+
+
+% Adds an rdf attribute vocab with value #1 to the next idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% The RDF-spec says: "an IRI that defines the mapping to use when a
+% TERM is referenced in an attribute value. See General Use of Terms
+% in Attributes and the section on Vocabulary Expansion."
+
+\def\pgfrdfvocab#1{\pgfsys@rdf@vocab{#1}}
+
+
+
+
+
+\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
index 02687fc29c3..50a820f6126 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorescopes.code.tex,v 1.46 2015/05/08 10:23:50 tantau Exp $
+\ProvidesFileRCS{pgfcorescopes.code.tex}
% Globals
@@ -37,7 +37,7 @@
% Pgf scope environment. All changes of the graphic state are local to
% the scope.
-%
+%
% Example:
%
% \begin{pgfscope}
@@ -64,30 +64,30 @@
% 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.
-%
+% translations.
+%
% Example:
%
% \pgfqboxsynced{\mybox}
@@ -99,11 +99,11 @@
% 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}}
@@ -173,7 +173,7 @@
\def\pgf@textdone{%
\endpgfinterruptpicture%
\egroup%
- \pgf@@maketextafter%
+ \pgf@@maketextafter%
}
\long\def\pgf@makehbox#1{%
@@ -248,10 +248,10 @@
\def\endpgfpicture{%
\ifpgfrememberpicturepositiononpage%
\hbox to0pt{\pgfsys@markposition{\pgfpictureid}}%
- \fi%
+ \fi%
% ok, now let's position the box
\ifdim\pgf@picmaxx=-16000pt\relax%
- % empty picture. make size 0.
+ % empty picture. make size 0.
\global\pgf@picmaxx=0pt\relax%
\global\pgf@picminx=0pt\relax%
\global\pgf@picmaxy=0pt\relax%
@@ -261,14 +261,14 @@
\pgf@relevantforpicturesizefalse%
\pgf@process{\pgf@baseline}%
\xdef\pgf@shift@baseline{\the\pgf@y}%
- %
+ %
\pgf@process{\pgf@trimleft}%
\global\advance\pgf@x by-\pgf@picminx
% prepare \hskip\pgf@trimleft@final.
% note that \pgf@trimleft@final is also queried
% by the pgf image externalization.
\xdef\pgf@trimleft@final{-\the\pgf@x}%
- %
+ %
\pgf@process{\pgf@trimright}%
\global\advance\pgf@x by-\pgf@picmaxx
% prepare \hskip\pgf@trimright@final.
@@ -282,7 +282,7 @@
\egroup%
\pgf@restore@layerlist@from@global
\pgf@insertlayers%
- \endgroup%
+ \endgroup%
\pgfsys@discardpath%
\endgroup%
\pgfsys@endscope%
@@ -328,7 +328,7 @@
%
% 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*.
+% picture*.
%
% Example:
%
@@ -434,7 +434,7 @@
% 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.
+% However, you must ward against graphic state changes using a scope.
%
% Example: Draw two parallel lines
%
@@ -458,7 +458,6 @@
\pgfsyssoftpath@setcurrentpath\pgfutil@empty%
\edef\pgfscope@linewidth{\the\pgflinewidth}%
\let\pgf@interrupt@lastmoveto=\pgfsyssoftpath@lastmoveto%
- \let\pgf@interrupt@nlt@infos=\pgf@nlt@infos%
\begingroup%
}
\def\endpgfinterruptpath
@@ -470,7 +469,6 @@
\global\pgf@path@lastx\pgf@interrupt@savex%
\global\pgf@path@lasty\pgf@interrupt@savey%
\global\let\pgfsyssoftpath@lastmoveto\pgf@interrupt@lastmoveto%
- \global\let\pgf@nlt@infos=\pgf@interrupt@nlt@infos%
\endgroup%
}
@@ -483,9 +481,9 @@
% 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.
+% environment.
%
-% Example:
+% Example:
%
% \begin{pgfinterruptboundinbox}
% \pgfmoveto{\pgfpoint{1cm}{0cm}}
@@ -519,6 +517,190 @@
+% Creates an id scope.
+%
+% Description:
+%
+% An id scope is not (conceptually) a graphic scope, but a scope that
+% has a unique name or "id". This id can be used as a reference point
+% for instance for a hyperlink or for an animation (currently, only
+% SVG supports ids, all other drivers ignore id scopes).
+%
+% Prior to using \pgfidscope, call \pgfuseid to install an
+% id (and possibly \pgfusetype). The scope will then get this id and,
+% likely, a graphic scope is installed. If \pgfuseid has not been
+% called or if you try to call \pgfidscope again for the same id,
+% nothing happens (except for a \TeX\ group being established).
+
+\def\pgfidscope{\pgfsys@begin@idscope}
+\def\endpgfidscope{\pgfsys@end@idscope}
+
+\let\startpgfidscope\pgfidscope
+\let\stoppgfidscope\pgfendidscope
+
+
+
+
+% Use an id on the next graphic object
+%
+% #1 = a name
+%
+% The next scope or path can be the target of an animation command or
+% a hyperlink.
+
+\def\pgfuseid#1{%
+ \edef\pgf@temp{#1}%
+ \ifx\pgf@temp\pgfutil@empty%
+ \else%
+ \pgf@lookup@id{#1}%
+ \pgfsys@use@id{\pgf@next@id}%
+ \expandafter\xdef\csname pgf@id@names@#1\endcsname{{\pgf@next@id}{}}%
+ \fi%
+}
+
+\def\pgf@lookup@id#1{%
+ \expandafter\let\expandafter\pgf@id@name\csname pgf@id@names@#1\endcsname%
+ \ifx\pgf@id@name\relax%
+ \let\pgf@prev@id\pgfutil@empty%
+ \let\pgf@next@id\pgfutil@empty%
+ \else%
+ \expandafter\pgf@id@parse\pgf@id@name%
+ \fi%
+ \ifx\pgf@next@id\pgfutil@empty%
+ \pgfsys@new@id\pgf@next@id%
+ \expandafter\xdef\csname pgf@id@names@#1\endcsname{{\pgf@prev@id}{\pgf@next@id}}%
+ \fi%
+}
+\def\pgf@id@parse#1#2{%
+ \def\pgf@prev@id{#1}%
+ \def\pgf@next@id{#2}%
+}
+
+
+
+% Clear the current id
+%
+% Description:
+%
+% Sets the current id to be empty so that it cannot be referenced.
+
+\def\pgfclearid{%
+ \pgfsys@clear@id%
+}
+
+
+% Get the id that will be given to a name upon the next use
+%
+% #1 = a macro
+% #2 = a name
+%
+% Description:
+%
+% #1 will get the id that will be used by \pgfuseid next time for the
+% given name.
+
+\def\pgfidrefnextuse#1#2{%
+ \edef\pgf@temp{#2}\ifx\pgf@temp\pgfutil@empty\pgferror{Missing name reference for ``\string#1''}\fi%
+ \pgf@lookup@id{#2}%
+ \let#1\pgf@next@id%
+}
+
+
+% Get the id was last used
+%
+% #1 = a macro
+% #2 = a name
+%
+% Description:
+%
+% #1 will get the id that was last used by \pgfuseid for #2.
+
+\def\pgfidrefprevuse#1#2{%
+ \edef\pgf@temp{#2}\ifx\pgf@temp\pgfutil@empty\pgferror{Missing name reference for ``\string#1''}\fi%
+ \pgf@lookup@id{#2}%
+ \let#1\pgf@prev@id%
+}
+
+
+% Use a type
+%
+% #1 = an id type; when starting with a dot, it is added to the
+% current type.
+%
+% The next scope or path can be the target of an animation command or
+% a hyperlink.
+
+\def\pgfusetype#1{%
+ \edef\pgf@temp{#1}%
+ \expandafter\pgfutil@ifnextchar\expandafter.\expandafter\pgf@id@use@type@add\expandafter\pgf@id@use@type@replace\pgf@temp\pgf@stop
+}
+\def\pgf@id@use@type@add.#1\pgf@stop{\pgfsys@append@type{#1}}
+\def\pgf@id@use@type@replace#1\pgf@stop{\pgfsys@use@type{#1}}
+
+% Push the current type on a global stack
+%
+% Description:
+%
+% The current type is pushed onto a global type stack. It can be
+% restored using \pgfpoptype.
+
+\def\pgfpushtype{\pgfsys@push@type}
+
+
+% Pop a type from the type stack
+%
+% Description:
+%
+% Restores the most current value from the type stack.
+
+\def\pgfpoptype{\pgfsys@pop@type}
+
+
+
+
+% Alias an id locally or globally
+%
+% #1 = the alias name
+% #2 = a existing id name
+%
+% Description:
+%
+% Creates an alias of a name
+
+\def\pgfaliasid#1#2{%
+ \expandafter\let\expandafter\pgf@temp\csname pgf@id@names@#2\endcsname%
+ \expandafter\let\csname pgf@id@names@#1\endcsname\pgf@temp%
+}
+\def\pgfgaliasid#1#2{%
+ \expandafter\let\expandafter\pgf@temp\csname pgf@id@names@#2\endcsname%
+ \expandafter\global\expandafter\let\csname pgf@id@names@#1\endcsname\pgf@temp%
+}
+
+
+% Check whether a name has been forward-referenced
+%
+% #1 = a name
+% #2 = what to do, when has been forward-referenced
+% #3 = what to do otherwise
+%
+% Description:
+%
+% Depending on whether #1 has been forward-referenced, #2 or #3 will be executed.
+
+\def\pgfifidreferenced#1#2#3{%
+ \expandafter\let\expandafter\pgf@id@name\csname pgf@id@names@#1\endcsname%
+ \ifx\pgf@id@name\relax%
+ #3%
+ \else
+ \expandafter\pgf@id@parse\pgf@id@name%
+ \ifx\pgf@next@id\pgfutil@empty%
+ #3%
+ \else%
+ #2%
+ \fi%
+ \fi%
+}
+
% Interrupts a picture
%
@@ -528,7 +710,7 @@
% normal TeX mode. All sorts of things are saved and restored by this
% environment.
%
-% WARNING: Using this environment in conjuction with low level
+% WARNING: Using this environment in conjunction with low level
% transformations can *strongly* upset the typesetting. Typically, the
% contents of this environment should have size/height/depth 0pt in
% the end.
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
index 86bd57c32fe..971752304a7 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreshade.code.tex,v 1.15 2013/07/15 14:24:02 tantau Exp $
+\ProvidesFileRCS{pgfcoreshade.code.tex}
%
% Parsing functions
@@ -170,11 +170,11 @@
% "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.
+% order.
%
% Description:
%
-% The optional dependecies have the following effect: If present, it
+% The optional dependencies have the following effect: If present, it
% should consist of a list of colors, separated by commas. Each time
% the shading is used, these colors will be reevaluated. It will be
% checked whether the colors still have their "original meaning". If
@@ -204,12 +204,12 @@
\fi}
-% Declares a vertical shading for later use.
+% Declares a vertical shading for later use.
%
-% #1 = optinal dependecies
+% #1 = optional dependencies
% #2 = name of the shading for later use
% #3 = height of the shading
-% #4 = color specification
+% #4 = color specification
%
% Example:
%
@@ -234,12 +234,12 @@
\fi}
-% Declares a radial shading for later use.
+% Declares a radial shading for later use.
%
% #1 = optional dependencies
% #2 = name of the shading for later use
% #3 = center of inner circle
-% #4 = color specification
+% #4 = color specification
%
% Description:
%
@@ -248,7 +248,7 @@
% 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)".
+% 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
@@ -279,14 +279,14 @@
-% Declares a functional shading for later use.
+% Declares a functional shading for later use.
%
-% #1 = optional dependecies
+% #1 = optional dependencies
% #2 = name of the shading for later use
% #3 = lower left corner of the shading as a pgfpoint.
% #4 = upper right corner of the shading as a pgfpoint.
% #5 = Preparation code
-% #6 = a PDF type 4 function (restricted Postscript function), see the
+% #6 = a PDF type 4 function (restricted Postscript function), see the
% PDF-specification 1.7, section 3.9.4
%
% Description:
@@ -297,7 +297,7 @@
% color as an output. Note that the function is evaluated by the
% *renderer*, not by PGF or TeX or someone else at compile-time. This
% means that the evaluation of this function has to be done *extremely
-% quickly* and the funciton should be *very simple*. For this reason,
+% quickly* and the function should be *very simple*. For this reason,
% only a very restricted set of operations are possible in the
% function (see 3.9.4 of the PDF-spec 1.7). Also functions should be
% kept small. Any errors in the function will only be noticed by the
@@ -318,9 +318,9 @@
%
% Because of the rather difficult PostScript syntax, use this macro
% only *if you know what you are doing* (or if you are advanterous, of
-% course).
+% course).
%
-% As for other shadings, the optional depencies argument is used to
+% As for other shadings, the optional dependencies argument is used to
% determine whether a shading needs to be recalculated when a color
% has changed.
%
@@ -331,10 +331,10 @@
% Inside the PostScript function #6 you cannot use colors
% directly. Rather, you must push the color components on the
% stack. For this, it is useful to call \pgfshadergb in the startup
-% code #4. The macro takes a color name as input and stores the color's
+% code #4. The macro takes a color name as input and stores the color's
% red/green/blue components real numbers between 0.0 and 1.0 separated
% by spaces (which is exactly what you need if you want to push it on
-% a stack) in a macro.
+% a stack) in a macro.
%
% Example:
%
@@ -412,7 +412,7 @@
% Inserts a box into the text that contains a previously defined
-% shading.
+% shading.
%
% #1 = Name of a shading
%
@@ -467,7 +467,7 @@
\ifpgfpicture%
\pgfsys@shadinginsidepgfpicture{#1}%
\else%
- \pgfsys@shadingoutsidepgfpicture{#1}%
+ \pgfsys@shadingoutsidepgfpicture{#1}%
\fi%
}
@@ -533,7 +533,7 @@
\ifdim\pgf@pathminx=16000pt%
\pgfwarning{No path specified that can be filled}%
\else%
- \begingroup%
+ \begingroup%
% Calculate center:
\pgf@xb=.5\pgf@pathmaxx%
\advance\pgf@xb by.5\pgf@pathminx%
@@ -573,7 +573,7 @@
\fi%
\pgfuseshading{#1}%
\pgfsys@endscope%
- \fi%
+ \fi%
\endgroup%
\fi%
}
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
index 5e13c6cb660..961c657e8cd 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoretransformations.code.tex,v 1.20 2015/08/07 10:17:34 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfcoretransformations.code.tex}
% Position transformations
@@ -34,7 +34,7 @@
% \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}}
+ \edef#1{{\pgf@pt@aa}{\pgf@pt@ab}{\pgf@pt@ba}{\pgf@pt@bb}{\the\pgf@pt@x}{\the\pgf@pt@y}}%
}
% Store the current transformation matrix in a set of macros, one for
@@ -50,7 +50,7 @@
% \pgfgettransform\aa\ab\ba\bb\shiftx\shifty
%
% ->
-%
+%
% \pgftransformcm\aa\ab\ba\bb{\pgfqpoint{\shiftx}{\shifty}}
%
% or
@@ -127,6 +127,18 @@
\advance#1 by\pgf@pt@x%
\advance#2 by\pgf@pt@y%
}
+\def\pgf@pos@transform@glob{%
+ \ifpgf@pt@identity%
+ \else%
+ \pgf@pt@temp=\pgf@x%
+ \global\pgf@x=\pgf@pt@aa\pgf@x%
+ \global\advance\pgf@x by\pgf@pt@ba\pgf@y%
+ \global\pgf@y=\pgf@pt@bb\pgf@y%
+ \global\advance\pgf@y by\pgf@pt@ab\pgf@pt@temp%
+ \fi%
+ \global\advance\pgf@x by\pgf@pt@x%
+ \global\advance\pgf@y by\pgf@pt@y%
+}
% Invert the current transformation matrix
@@ -135,7 +147,7 @@
%
% This command replaces the current transformation matrix by its
% inverse. The inversion is not very exact if the matrix is nearly
-% singular.
+% singular.
%
% Example:
%
@@ -196,7 +208,7 @@
% PGF-Level concatenation of the transformation matrix with a given
-% matrix.
+% matrix.
%
% #1 - #5 = a concatenation matrix (see pdf spec). Entry #5 is a
% translation point.
@@ -213,7 +225,7 @@
%
% \pgftransformcm{1}{0}{0}{1}{\pgfpoint{100pt}{0pt}} % 100pt to the right.
%
-% \pgftransformcm{2}{0}{0}{2}{\pgfpointorigin} % double in in size
+% \pgftransformcm{2}{0}{0}{2}{\pgfpointorigin} % double in size
% \pgfpathmoveto{\pgfpoint{0cm}{0cm}}
% \pgfpathlineto{\pgflineto{1cm}{1cm}} % actually 2cm/2cm
@@ -280,7 +292,7 @@
% 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".
+% "y".
%
% #1 = origin
% #2 = x
@@ -419,14 +431,14 @@
%
% \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.
+% text drawn in this coordinate 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.
+% to the text, but you do want the rotation to apply.
\newif\ifpgfslopedattime
\newif\ifpgfallowupsidedownattime
@@ -469,7 +481,7 @@
\advance\pgf@yc by-\pgf@yb%
\ifpgfallowupsidedownattime%
\else%
- \ifdim\pgf@xc<0pt%
+ \ifdim\pgf@xc<0pt%
\pgf@xc=-\pgf@xc%
\pgf@yc=-\pgf@yc%
\fi%
@@ -503,7 +515,7 @@
% }
\def\pgftransformarcaxesattime#1#2#3#4#5#6{%
- \pgfpointarcaxesattime{#1}{#2}{#3}{#4}{#5}{#6}%
+ \pgfpointarcaxesattime{#1}{#2}{#3}{#4}{#5}{#6}%
\pgftransformshift{\pgfqpoint{\pgf@x}{\pgf@y}}%
\ifpgfresetnontranslationattime%
\pgftransformresetnontranslations%
@@ -612,10 +624,10 @@
% Computes transformations adjustments for the current transformation
-% matrix
+% matrix
%
% Description:
-%
+%
% This command is used when you install a transformation matrix that
% scales everything by a certain factor, but you still wish to draw
% something with "an absolute size". Suppose for instance that you
@@ -624,18 +636,18 @@
% if you do not reset the transformation matrix, you can draw a line
% of logical length 2.5mm, which will then get scaled to a line of
% 1cm.
-%
+%
% Things get more difficult in case you scale things only, say,
-% vertically. In this case, the adjustement necessary for horizontal
+% vertically. In this case, the adjustment necessary for horizontal
% lines is different from the one needed for vertical lines.
-%
+%
% This function computes the necessary scaling factors and puts them
% in the macros \pgfhorizontaltransformationadjustment and
% \pgfverticaltransformationadjustment.
-%
+%
% Note that the "right" way to draw a line of absolute length 1cm in a
% transformed coordinate system is to first compute the start point
-% and to then reset the transformation matrix. The transofmration
+% and to then reset the transformation matrix. The transformation
% adjustments computed here are important only in situations where you
% cannot do this, for instance when an "outer xsep" must be set.
@@ -660,7 +672,7 @@
\let\pgfhorizontaltransformationadjustment\pgf@temp@hori%
\let\pgfverticaltransformationadjustment\pgf@temp@vert%
\fi%
-}
+}
\let\pgfhorizontaltransformationadjustment\pgf@one@text
\let\pgfverticaltransformationadjustment\pgf@one@text
@@ -685,12 +697,12 @@
{\pgf@pt@x}{\pgf@pt@y}%
\pgftransformreset%
\pgf@relevantforpicturesizefalse%
-}
+}
% Causes a transformation command to be applied to the ``lowlevel''
-% transformation matrix.
+% transformation matrix.
%
% #1 - a high-level transformation command
%
@@ -706,7 +718,7 @@
%
% \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
+% \begin{pgflowlevelscope}{\pgftransformcm{2}{0}{0}{2}{\pgfpointorigin}} % double in size
% \pgfmoveto{\pgfpoint{0cm}{0cm}}
% \pgflineto{\pgflineto{1cm}{1cm}} % actually 2cm/2cm
% \end{pgflowlevelscope}
@@ -727,6 +739,74 @@
+% View boxes
+
+% Establishes a view box scope
+%
+% #1 and #2 = two opposite corners of the source rectangle
+% #3 and #4 = two opposite corners of the target rectangle
+% #5 = "meet" or "slice"
+%
+% Description:
+%
+% Inside the viewbox scope, the source rectangle will be translated
+% and scaled so that it becomes centered on the target rectangle and
+% will, for "meet", be as large as possible so that it fits inside the
+% target and, for "slice", be as small as possible so that it
+% encompasses the target.
+
+\def\pgfviewboxscope#1#2#3#4#5{%
+ {% Compute rectangle corners
+ \pgf@process{#1}%
+ \pgf@pos@transform@glob
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{#2}%
+ \pgf@pos@transform@glob
+ \ifdim\pgf@x<\pgf@xa%
+ \pgf@xb\pgf@x%
+ \pgf@xc\pgf@xa%
+ \else%
+ \pgf@xb\pgf@xa%
+ \pgf@xc\pgf@x%
+ \fi%
+ \ifdim\pgf@y<\pgf@ya%
+ \pgf@yb\pgf@y%
+ \pgf@yc\pgf@ya%
+ \else%
+ \pgf@yb\pgf@ya%
+ \pgf@yc\pgf@y%
+ \fi%
+ \pgf@process{#3}%
+ \pgf@pos@transform@glob
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{#4}%
+ \pgf@pos@transform@glob
+ \ifdim\pgf@x<\pgf@xa%
+ \else%
+ \pgfutil@tempdima\pgf@x
+ \pgf@x\pgf@xa%
+ \pgf@xa\pgfutil@tempdima%
+ \fi%
+ \ifdim\pgf@y<\pgf@ya%
+ \else%
+ \pgfutil@tempdima\pgf@y
+ \pgf@y\pgf@ya%
+ \pgf@ya\pgfutil@tempdima%
+ \fi%
+ \pgfusetype{.view}%
+ \edef\pgf@marshal{\expandafter\noexpand\csname pgfsys@viewbox#5\endcsname{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}{\the\pgf@xb}{\the\pgf@yb}{\the\pgf@xc}{\the\pgf@yc}}%
+ \pgf@marshal%
+ }%
+ \pgf@relevantforpicturesizefalse%
+}
+
+\def\endpgfviewboxscope{\pgfsys@endviewbox}
+
+\let\startpgfviewboxscope=\pgfviewboxscope
+\let\stoppgfviewboxscope=\endpgfviewboxscope
+
% Forward declarations for nonlinear stuff (have no effect till module
% nonlineartransformations is loaded)
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
index 47484997af7..181450ac27a 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
@@ -7,13 +7,13 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoretransparency.code.tex,v 1.5 2013/09/30 18:30:15 tantau Exp $
+\ProvidesFileRCS{pgfcoretransparency.code.tex}
% Sets the opacity of stroking operations.
-%
+%
% #1 = opacity, where 1 means fully opaque and 0 means fully
-% transparent.
+% transparent.
%
% Example:
%
@@ -25,9 +25,9 @@
% Sets the opacity of stroking operations.
-%
+%
% #1 = opacity, where 1 means fully opaque and 0 means fully
-% transparent.
+% transparent.
%
% Example:
%
@@ -40,8 +40,8 @@
% Sets the current blend mode. See Section 7.2.4 of the PDF
-% Specification 1.7 for an introduction to blend modes in general.
-%
+% Specification 1.7 for an introduction to blend modes in general.
+%
% #1 = One of the following modes, see also section 7.2.4 of the
% PDF Specification 1.7. (The PGF names, which are all lowercase with
% spaces as usual, must be mapped to the PDF or SVG by the drivers.)
@@ -81,7 +81,7 @@
% 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
+% beginning, the mask is completely transparent. Wherever 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
@@ -121,7 +121,7 @@
% Description:
%
% The command should be used *inside* a pgfpicture to install a
-% fading. The fading is a part of the graphic state. (This command
+% 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
@@ -153,7 +153,7 @@
% 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.
+% used.
%
% If no transformations occur, the lower left corner of the path will
% lie on (25bp, 25bp), the upper right corner on (75bp, 75bp).
@@ -253,13 +253,13 @@
%
% 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
+% 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{%
\pgfutil@ifnextchar[{\pgftransparencygroup@}{\pgftransparencygroup@[]}%
@@ -277,7 +277,7 @@
isolated/.is if=pgfsys@transparency@group@isolated,
knockout/.is if=pgfsys@transparency@group@knockout
}
-
+
\def\endpgftransparencygroup{%
\egroup%
% Now compute the correct position. This is a bit tricky...