summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex94
1 files changed, 70 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
index f8c1e8792f4..09d9a2fa122 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/tikz.code.tex,v 1.142 2013/12/13 15:11:58 tantau Exp $
+\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/tikz.code.tex,v 1.151 2015/08/07 10:17:34 cfeuersaenger Exp $
\def\tikzerror#1{\pgfutil@packageerror{tikz}{#1}{}}
@@ -375,25 +375,28 @@
\tikzset{rotate around x/.code={%
\tikz@xyz@rotate@let%
- \tikz@xyz@rotate@xyz@xaxis{0pt}{1pt}{0pt}{#1}%
+ \pgfmathparse{#1}\let\tikz@xyz@angle=\pgfmathresult%
+ \tikz@xyz@rotate@xyz@xaxis{0pt}{1pt}{0pt}{\tikz@xyz@angle}%
\pgfextract@process\tikz@xyz@rotate@yvec{\pgfpointxyz{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@z}}}%
- \tikz@xyz@rotate@xyz@xaxis{0pt}{0pt}{1pt}{#1}%
+ \tikz@xyz@rotate@xyz@xaxis{0pt}{0pt}{1pt}{\tikz@xyz@angle}%
\pgfsetzvec{\pgfpointxyz{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@z}}}%
\pgfsetyvec{\tikz@xyz@rotate@yvec}%
},
rotate around y/.code={%
\tikz@xyz@rotate@let%
- \tikz@xyz@rotate@xyz@yaxis{1pt}{0pt}{0pt}{#1}%
+ \pgfmathparse{#1}\let\tikz@xyz@angle=\pgfmathresult%
+ \tikz@xyz@rotate@xyz@yaxis{1pt}{0pt}{0pt}{\tikz@xyz@angle}%
\pgfextract@process\tikz@xyz@rotate@xvec{\pgfpointxyz{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@z}}}%
- \tikz@xyz@rotate@xyz@yaxis{0pt}{0pt}{1pt}{#1}%
+ \tikz@xyz@rotate@xyz@yaxis{0pt}{0pt}{1pt}{\tikz@xyz@angle}%
\pgfsetzvec{\pgfpointxyz{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@z}}}%
\pgfsetxvec{\tikz@xyz@rotate@xvec}%
},
rotate around z/.code={%
\tikz@xyz@rotate@let%
- \tikz@xyz@rotate@xyz@zaxis{1pt}{0pt}{0pt}{#1}%
+ \pgfmathparse{#1}\let\tikz@xyz@angle=\pgfmathresult%
+ \tikz@xyz@rotate@xyz@zaxis{1pt}{0pt}{0pt}{\tikz@xyz@angle}%
\pgfextract@process\tikz@xyz@rotate@xvec{\pgfpointxyz{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@z}}}%
- \tikz@xyz@rotate@xyz@zaxis{0pt}{1pt}{0pt}{#1}%
+ \tikz@xyz@rotate@xyz@zaxis{0pt}{1pt}{0pt}{\tikz@xyz@angle}%
\pgfsetyvec{\pgfpointxyz{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@z}}}%
\pgfsetxvec{\tikz@xyz@rotate@xvec}%
}
@@ -641,6 +644,7 @@
\pgfextra{\let\tikz@save@last@node=\tikzlastnode\tikz@node@is@a@labelfalse}%
node [every pin,
tikz@label@angle = #2,
+ anchor=@auto,
#1,
append after command = {%
(\tikz@save@last@node)
@@ -670,6 +674,7 @@
\pgfextra{\let\tikz@save@last@node=\tikzlastnode\tikz@node@is@a@labelfalse}%
node [every pin,
tikz@label@angle = #2,
+ anchor=@auto,
#1,
append after command = {%
(\tikz@save@last@node)
@@ -697,6 +702,7 @@
\tikzset{tikz@label@post/.code 2 args={
\edef\tikz@label@angle{\tikz@label@angle}%
+ \expandafter\pgfkeys@spdef\expandafter\tikz@label@angle\expandafter{\tikz@label@angle}%
\csname tikz@label@angle@is@\tikz@label@angle\endcsname
\ifx\tikz@label@angle\tikz@on@text%
\def\tikz@node@at{\pgfpointanchor{\tikzlastnode}{center}}%
@@ -742,7 +748,9 @@
\pgf@yc=\pgf@y%
\pgf@x=\pgf@yc%
\pgf@y=-\pgf@xc%
- \tikz@auto@anchor%
+ \ifx\tikz@anchor\tikz@auto@text%
+ \tikz@auto@anchor%
+ \fi%
\fi%
\fi%
\fi}
@@ -797,6 +805,7 @@
\pgfextra{\let\tikz@save@last@fig@name=\tikz@last@fig@name\tikz@node@is@a@labelfalse}
node [every label,
tikz@label@angle = #2,
+ anchor=@auto,
#1,
tikz@label@post = \tikz@label@distance] {\iftikz@handle@active@nodes\expandafter\scantokens\else\expandafter\pgfutil@firstofone\fi{#3}}
\pgfextra{\global\let\tikz@last@fig@name=\tikz@save@last@fig@name}
@@ -826,6 +835,7 @@
\pgfextra{\let\tikz@save@last@fig@name=\tikz@last@fig@name\tikz@node@is@a@labelfalse}
node [every label,
tikz@label@angle = #2,
+ anchor=@auto,
#1,
tikz@label@post = \tikz@label@distance] {\iftikz@handle@active@nodes\expandafter\scantokens\else\expandafter\pgfutil@firstofone\fi{#3}}
\pgfextra{\global\let\tikz@last@fig@name=\tikz@save@last@fig@name}
@@ -841,6 +851,7 @@
\expandafter\def\csname tikz@label@angle@is@below right\endcsname{\def\tikz@label@angle{315}}
\def\tikz@compute@direction#1{%
+ \ifx\tikz@anchor\tikz@auto@text%
\let\tikz@do@auto@anchor=\relax
\pgfmathsetcount{\c@pgf@counta}{#1}%
\ifnum\c@pgf@counta<0\relax
@@ -868,8 +879,9 @@
\else%
\def\tikz@anchor{west}%
\fi\fi\fi\fi\fi\fi\fi\fi%
+ \fi%
}
-
+\def\tikz@auto@text{@auto}
% General node options
\tikzset{
@@ -898,7 +910,18 @@
\tikzoption{nodes}{\tikzstyle{every node}+=[#1]}
-\tikzset{alias/.code={\tikz@fig@mustbenamed\expandafter\def\expandafter\tikz@alias\expandafter{\tikz@alias\pgfnodealias{#1}{\tikz@fig@name}}}}
+\tikzset{alias/.code={%
+ \tikz@fig@mustbenamed
+ \begingroup
+ \toks0=\expandafter{\tikz@alias}%
+ \edef\pgf@temp{\noexpand\pgfnodealias{\tikz@pp@name{#1}}{\noexpand\tikz@fig@name}}%
+ \toks1=\expandafter{\pgf@temp}%
+ \xdef\pgf@marshal{%
+ \noexpand\def\noexpand\tikz@alias{\the\toks0 \the\toks1 }%
+ }%
+ \endgroup
+ \pgf@marshal
+}}
% deprecated:
\def\tikzaddafternodepathoption#1{#1\tikzset{prefix after command={\pgfextra{#1}}}}
@@ -933,7 +956,8 @@
\tikzoption{below right}[]%
{\def\tikz@anchor{north west}%
\tikz@possibly@transform{x}{}{#1}\tikz@possibly@transform{y}{-}{#1}}
-
+\tikzset{centered/.code=\def\tikz@anchor{center}}
+
\tikzoption{node distance}{\def\tikz@node@distance{#1}}
\def\tikz@node@distance{1cm}
@@ -996,7 +1020,12 @@
% Inter-picture options
\tikzoption{remember picture}[true]{\csname pgfrememberpicturepositiononpage#1\endcsname}
-\tikzoption{overlay}[]{\pgf@relevantforpicturesizefalse}
+\tikzset{
+ overlay/.is choice,
+ overlay/true/.code={\pgf@relevantforpicturesizefalse},
+ overlay/false/.code={\pgf@relevantforpicturesizetrue},
+ overlay/.default=true
+}
@@ -1577,10 +1606,10 @@
}
\def\tikz@compat@color@set#1{%
\pgfutil@color{#1}\pgfutil@colorlet{pgffillcolor}{#1}%
- \expandafter\expandafter\expandafter\global%
- \expandafter\expandafter\expandafter\let\expandafter\csname\expandafter\string\expandafter\color@pgffillcolor\expandafter\endcsname\csname\string\color@pgffillcolor\endcsname%
- \expandafter\expandafter\expandafter\global%
- \expandafter\expandafter\expandafter\let\expandafter\csname\expandafter\string\expandafter\color@pgfstrokecolor\expandafter\endcsname\csname\string\color@pgffillcolor\endcsname%
+ \expandafter\let\expandafter\pgf@temp\csname\string\color@pgffillcolor\endcsname
+ % for arrow tips:
+ \global\let\pgf@strokecolor@global=\pgf@temp
+ \global\let\pgf@fillcolor@global=\pgf@temp
}
\def\tikz@startup@env{%
@@ -2214,8 +2243,10 @@
\ifx\tikz@options\pgfutil@empty%
\else%
\pgfsys@beginscope%
+ \let\pgfscope@stroke@color=\pgf@strokecolor@global%
+ \let\pgfscope@fill@color=\pgf@fillcolor@global%
\begingroup%
- \tikz@options%
+ \tikz@options%
\fi%
%
% Step 6: Do a fill if shade or a path picture follows.
@@ -2323,6 +2354,8 @@
\ifx\tikz@options\pgfutil@empty%
\else%
\endgroup%
+ \global\let\pgf@strokecolor@global=\pgfscope@stroke@color%
+ \global\let\pgf@fillcolor@global=\pgfscope@fill@color%
\pgfsys@endscope%
\iftikz@mode@clip%
\tikzerror{Extra options not allowed for clipping path command.}%
@@ -2341,6 +2374,18 @@
\let\tikz@lib@scope@check\pgfutil@empty% this is a hook for the scopes library
\def\tikz@path@do@at@end{\tikz@lib@scope@check}
+\def\pgf@outer@auto@adjust@hook{%
+ {%
+ \tikz@mode@drawfalse%
+ \tikz@mode%
+ \expandafter%
+ }%
+ \iftikz@mode@draw\else%xxx
+ \pgfkeyslet{/pgf/outer xsep}\pgf@zero@text
+ \pgfkeyslet{/pgf/outer ysep}\pgf@zero@text
+ \fi%
+}
+
% Extra actions
\def\tikz@extra@preaction#1{%
@@ -3497,17 +3542,17 @@
\def\tikz@do@arc#1#2#3#4{%
\let\tikz@tangent\tikz@tangent@lookup%
\edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
- \edef\tikz@timer@start@angle{#1}%
- \edef\tikz@timer@end@angle{#2}%
+ \pgfmathsetmacro\tikz@timer@start@angle{#1}%
+ \pgfmathsetmacro\tikz@timer@end@angle{#2}%
\pgfmathparse{#3}%
\let\tikz@arc@x=\pgfmathresult%
\ifpgfmathunitsdeclared%
\pgfmathparse{#4}%
\let\tikz@arc@y=\pgfmathresult%
\ifpgfmathunitsdeclared%
- \tikz@@@arcfinal{\pgfpatharc{#1}{#2}{\tikz@arc@x pt and \tikz@arc@y pt}}
- {\pgfpointpolar{#1}{\tikz@arc@x pt and \tikz@arc@y pt}}
- {\pgfpointpolar{#2}{\tikz@arc@x pt and \tikz@arc@y pt}}%
+ \tikz@@@arcfinal{\pgfpatharc{\tikz@timer@start@angle}{\tikz@timer@end@angle}{\tikz@arc@x pt and \tikz@arc@y pt}}
+ {\pgfpointpolar{\tikz@timer@start@angle}{\tikz@arc@x pt and \tikz@arc@y pt}}
+ {\pgfpointpolar{\tikz@timer@end@angle}{\tikz@arc@x pt and \tikz@arc@y pt}}%
\edef\tikz@timer@zero@axis{\noexpand\pgfqpoint{\tikz@arc@x pt}{0pt}}
\edef\tikz@timer@ninety@axis{\noexpand\pgfqpoint{0pt}{\tikz@arc@y pt}}
\else%
@@ -3519,8 +3564,8 @@
\ifpgfmathunitsdeclared%
\tikzerror{You cannot mix dimensions and dimensionless values in an arc}%
\else%
- \tikz@@@arcfinal{\pgfpatharcaxes{#1}{#2}{\pgfpointxy{\tikz@arc@x}{0}}{\pgfpointxy{0}{\tikz@arc@y}}}
- {\pgfpointpolarxy{#1}{\tikz@arc@x and \tikz@arc@y}}{\pgfpointpolarxy{#2}{\tikz@arc@x and \tikz@arc@y}}%
+ \tikz@@@arcfinal{\pgfpatharcaxes{\tikz@timer@start@angle}{\tikz@timer@end@angle}{\pgfpointxy{\tikz@arc@x}{0}}{\pgfpointxy{0}{\tikz@arc@y}}}
+ {\pgfpointpolarxy{\tikz@timer@start@angle}{\tikz@arc@x and \tikz@arc@y}}{\pgfpointpolarxy{\tikz@timer@end@angle}{\tikz@arc@x and \tikz@arc@y}}%
\pgf@process{\pgfpointxy{\tikz@arc@x}{0}}
\edef\tikz@timer@zero@axis{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}
\pgf@process{\pgfpointxy{0}{\tikz@arc@y}}
@@ -3912,6 +3957,7 @@
\setbox\tikz@figbox@bg=\box\tikz@tempbox@bg%
\global\pgflinewidth=\tikz@save@line@width%
\tikz@do@after@path@smuggle%
+ \tikz@node@is@picfalse
\tikz@do@after@node%
}
\let\tikz@fig@continue@orig=\tikz@fig@continue