summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex101
1 files changed, 59 insertions, 42 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex
index 3c3532b394d..0967f817d27 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex
@@ -8,16 +8,16 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex,v 1.20 2013/08/05 18:22:47 tantau Exp $
+\ProvidesFileRCS{tikzlibrarygraphdrawing.code.tex}
-\usepgflibrary{graphdrawing}
+\usepgflibrary{graphdrawing}%
-\def\tikz@lib@ensure@gd@loaded{}
+\def\tikz@lib@ensure@gd@loaded{}%
% Patch the level and sibling distances so that gd and plain tikz are
% in sync
-\tikzset{level distance=1cm, sibling distance=1cm}
+\tikzset{level distance=1cm, sibling distance=1cm}%
% Patch node distance because of its special syntax.
@@ -31,27 +31,27 @@
\else%
\tikz@gd@convert@and#1 and #1\pgf@stop%
\fi%
-}
-\def\tikz@gd@convert@and#1 and #2\pgf@stop{\pgfkeys{/graph drawing/node distance/orig={#1}}}
+}%
+\def\tikz@gd@convert@and#1 and #2\pgf@stop{\pgfkeys{/graph drawing/node distance/orig={#1}}}%
%
% Setup graph drawing for tikz
-%
+%
\def\tikz@gd@request@callback#1#2{%
\tikzset{
execute at begin scope={
- \tikzset{
+ \tikzset{
--/.style={arrows=-},
-!-/.style={draw=none,fill=none},
- }
+ }
\pgfgdsetedgecallback{\pgfgdtikzedgecallback}%
- %
+ %
% Setup for plain syntax
- %
+ %
\pgfgdaddspecificationhook{\tikz@lib@gd@spec@hook}%
#1
\let\tikzgdeventcallback\pgfgdevent%
@@ -62,27 +62,27 @@
#2%
}
}%
-}
+}%
\pgfgdsetrequestcallback\tikz@gd@request@callback
-\pgfgdappendtoforwardinglist{/tikz/,/tikz/graphs/}
+\pgfgdappendtoforwardinglist{/tikz/,/tikz/graphs/}%
\def\tikz@lib@gd@spec@hook{%
\tikzset{
edge macro=\tikz@gd@plain@edge@macro,
/tikz/at/.style={/graph drawing/desired at={##1}},
- %
+ %
% Setup for the tree syntax (do this late so that grow options
% are still valid after a layout has been chosen)
- %
+ %
/tikz/growth function=\relax,
/tikz/edge from parent macro=\tikz@gd@edge@from@parent@macro,
- %
- % Setup for the graphs syntax
- %
+ %
+ % Setup for the graphs syntax
+ %
/tikz/graphs/new ->/.code n args={4}{\pgfgdedge{##1}{##2}{->}{/tikz,##3}{##4}},
/tikz/graphs/new <-/.code n args={4}{\pgfgdedge{##1}{##2}{<-}{/tikz,##3}{##4}},
/tikz/graphs/new --/.code n args={4}{\pgfgdedge{##1}{##2}{--}{/tikz,##3}{##4}},
@@ -90,41 +90,58 @@
/tikz/graphs/new -!-/.code n args={4}{\pgfgdedge{##1}{##2}{-!-}{/tikz,##3}{##4}},
/tikz/graphs/placement/compute position/.code=,%
}
-}
+}%
\pgfgdaddprepareedgehook{
\tikz@enable@edge@quotes%
\let\tikz@transform=\pgfutil@empty%
\let\tikz@options=\pgfutil@empty%
\let\tikz@tonodes=\pgfutil@empty%
-}
+}%
\tikzset{
parent anchor/.forward to=/graph drawing/tail anchor,
child anchor/.forward to=/graph drawing/head anchor
-}
+}%
-\def\pgfgdtikzedgecallback#1#2#3#4#5#6#7{%
- \draw (#1)
- edge [to path={#7 \tikztonodes},#3,#4,/graph drawing/.cd,#6,/tikz/.cd]
- #5
- (#2);
-}
+\def\pgfgdtikzedgecallback#1#2#3#4#5#6#7#8{%
+ \def\pgf@temp{#8}%
+ \ifx\pgf@temp\pgfutil@empty%
+ \else%
+ \pgfscope%
+ \pgfset{every graphdrawing animation/.try}%
+ \pgfset{every graphdrawing edge animation/.try}%
+ #8%
+ \pgfuseid{pgf@gd}%
+ \pgfidscope%
+ \fi%
+ \begingroup
+ \draw (#1)
+ edge [to path={#7 \tikztonodes},#3,#4,/graph drawing/.cd,#6,/tikz/.cd]
+ #5
+ (#2);
+ \endgroup
+ \ifx\pgf@temp\pgfutil@empty%
+ \else%
+ \endpgfidscope%
+ \endpgfscope%
+ \fi%
+}%
\def\tikz@gd@edge@from@parent@macro#1#2{
[/utils/exec=\pgfgdedge{\tikzparentnode}{\tikzchildnode}{--}{/tikz,#1}{#2}]
-}
+}%
\def\tikz@gd@plain@edge@macro#1#2{
\pgfgdedge{\tikztostart}{\tikztotarget}{--}{/tikz,#1}{#2}
-}
+}%
-%
+%
% Conversions: Convert coordinates into pairs of values surrounded by
-% braces.
+% braces.
%
\pgfgdset{
@@ -140,7 +157,7 @@
\pgfmathsetmacro{\tikz@gd@temp@y}{\pgf@y}
\edef\pgfgdresult{pgf.gd.model.Coordinate.new(\tikz@gd@temp@x,\tikz@gd@temp@y)}
}
-}
+}%
@@ -150,11 +167,11 @@
\def\pgfgdcallbackcreatevertex#1#2#3#4{%
\node[every generated node/.try,name={#1},shape={#2},/graph drawing/.cd,#3]{#4};%
-}
+}%
-%
-% Subgraph handling
+%
+% Subgraph handling
%
% "General" text placement for subgraph nodes that works with all node
@@ -173,7 +190,7 @@
\vrule width0pt height.5\pgf@y depth.5\pgf@y\hfil}%
}%
},
-}
+}%
\def\tikz@lg@simple@contents@top#1{%
\def\pgfgdsubgraphnodecontents##1{%
@@ -190,13 +207,13 @@
\fi%
\fi%
\pgfmathparse{\pgfkeysvalueof{/tikz/subgraph text sep}}%
- \kern\pgfmathresult pt\relax%
+ \kern\pgfmathresult pt\relax%
\pgf@y=\pgfkeysvalueof{/graph drawing/subgraph bounding box height}\relax%
\hbox to \pgfkeysvalueof{/graph drawing/subgraph bounding box width}{%
\vrule width0pt height.5\pgf@y depth.5\pgf@y\hfil}%
}%
}%
-}
+}%
\def\tikz@lg@simple@contents@bottom#1{%
\def\pgfgdsubgraphnodecontents##1{%
@@ -205,7 +222,7 @@
\setbox0=\vbox{%
\hbox to \pgfkeysvalueof{/graph drawing/subgraph bounding box width}{\vrule width0pt height\pgf@y\hfil}%
\pgfmathparse{\pgfkeysvalueof{/tikz/subgraph text sep}}%
- \kern\pgfmathresult pt\relax%
+ \kern\pgfmathresult pt\relax%
\def\pgf@temp{##1}%
\ifx\pgf@temp\pgfutil@empty%
\else%
@@ -225,15 +242,15 @@
\box0\relax%
}%
}%
-}
+}%
-\tikzset{subgraph text top}
+\tikzset{subgraph text top}%
\tikzset{
subgraph nodes/.style={/tikz/every subgraph node/.style={#1}},
graphs/subgraph nodes/.style={/tikz/every subgraph node/.style={#1}},
graphs/@graph drawing setup/.style={/graph drawing/anchor at={(\tikz@lastx,\tikz@lasty)}}
-}
+}%