| 1 |
% Copyright 2022 by Qrrbrbirlbel |
| 2 |
% |
| 3 |
% This file may be distributed and/or modified |
| 4 |
% |
| 5 |
% 1. under the LaTeX Project Public License and/or |
| 6 |
% 2. under the GNU Free Documentation License. |
| 7 |
% |
| 8 |
|
| 9 |
\unless\ifcsname tikzextset\endcsname |
| 10 |
\input tikzext-util.tex |
| 11 |
\fi |
| 12 |
|
| 13 |
\def\tikzext@nf@write#1{% |
| 14 |
\immediate\write\pgfutil@auxout{% |
| 15 |
\noexpand\expandafter\noexpand\gdef\noexpand\csname tikzext@nf@#1@previous\endcsname |
| 16 |
{\csname tikzext@nf@#1@next\endcsname}% |
| 17 |
}% |
| 18 |
} |
| 19 |
\pgfkeyssetvalue{/tikz/ext/node family/prefix}{\pgfpictureid-}% no md5 |
| 20 |
\pgfutil@IfUndefined{mmz@mode}{% \mmz@mode is only defined with memoizable, not with memoizable or nomemoize |
| 21 |
\let\tikzext@nf@save\tikzext@nf@write |
| 22 |
}{% |
| 23 |
% #1 = family type + name |
| 24 |
\def\tikzext@nf@save#1{% |
| 25 |
\pgfutil@IfUndefined{tikzext@nf@#1@previous}{% |
| 26 |
\mmzAbort |
| 27 |
\ifmemoize |
| 28 |
\mmzset{after memoization=\tikzext@nf@write{#1}}% |
| 29 |
\else |
| 30 |
\tikzext@nf@write{#1}% |
| 31 |
\fi |
| 32 |
}{% |
| 33 |
\ifdim\csname tikzext@nf@#1@previous\expandafter\endcsname=% |
| 34 |
\csname tikzext@nf@#1@next\endcsname |
| 35 |
\ifmemoize |
| 36 |
\mmzset{after memoization=\tikzext@nf@write{#1}}% |
| 37 |
\else |
| 38 |
\tikzext@nf@write{#1}% |
| 39 |
\fi |
| 40 |
\else |
| 41 |
\mmzAbort |
| 42 |
\ifmemoize |
| 43 |
\mmzset{after memoization=\tikzext@nf@write{#1}}% |
| 44 |
\else |
| 45 |
\tikzext@nf@write{#1}% |
| 46 |
\fi |
| 47 |
\fi |
| 48 |
}% |
| 49 |
}% |
| 50 |
} |
| 51 |
|
| 52 |
\def\tikzext@nf@align@left#1{\unhbox#1\hfil} |
| 53 |
\def\tikzext@nf@align@center#1{\hfil\unhbox#1\hfil} |
| 54 |
\def\tikzext@nf@align@right#1{\hfil\unhbox#1} |
| 55 |
|
| 56 |
\pgfqkeys{/tikz/ext/node family}{ |
| 57 |
width/.initial=, |
| 58 |
width/.append style={/pgf/minimum width=ext_nf_width}, |
| 59 |
height/.initial=, |
| 60 |
height/.append style={/pgf/minimum height=ext_nf_height}, |
| 61 |
size/.code=\pgfqkeys{/tikz/ext/node family}{width={#1},height={#1}}, |
| 62 |
text depth/.initial=, |
| 63 |
text height/.initial=, |
| 64 |
text width align/.is choice, |
| 65 |
text width align/left/.code=\let\tikzext@nf@align@action\tikzext@nf@align@left, |
| 66 |
text width align/center/.code=\let\tikzext@nf@align@action\tikzext@nf@align@center, |
| 67 |
text width align/right/.code=\let\tikzext@nf@align@action\tikzext@nf@align@right, |
| 68 |
text width align=center, |
| 69 |
text width/.initial=, |
| 70 |
text/.code=\pgfqkeys{/tikz/ext/node family}{text depth={#1},text height={#1},text width={#1}}, |
| 71 |
} |
| 72 |
\tikzextset{node family/.code=\pgfqkeys{/tikz/ext/node family}{#1}} |
| 73 |
|
| 74 |
% #1 = value to set |
| 75 |
% #2 = family type |
| 76 |
% #3 = return dimen |
| 77 |
\def\tikzext@nf@getandset#1#2#3{% |
| 78 |
% what's our family's name? |
| 79 |
#3=0pt\relax |
| 80 |
\pgfkeysgetvalue{/tikz/ext/node family/#2}\tikzext@nf@familyname |
| 81 |
\pgfutil@ifxempty\tikzext@nf@familyname{% no family to deal with |
| 82 |
}{% |
| 83 |
\edef\tikzext@nf@familyname{\pgfkeysvalueof{/tikz/ext/node family/prefix}\tikzext@nf@familyname}% |
| 84 |
% we need to save the value for the next run |
| 85 |
\pgfutil@IfUndefined{tikzext@nf@#2@\tikzext@nf@familyname @next}{% |
| 86 |
% first time: define first value and install hook at end of picture |
| 87 |
\expandafter\xdef\csname tikzext@nf@#2@\tikzext@nf@familyname @next\endcsname{#1}% |
| 88 |
\edef\tikz@temp{\noexpand\tikzext@nf@save{#2@\tikzext@nf@familyname}}% |
| 89 |
%\expandafter\AtVeryEndDocument\expandafter{\tikz@temp}% |
| 90 |
\expandafter\pgfutil@g@addto@macro\expandafter\tikz@atend@picture\expandafter{\tikz@temp}% |
| 91 |
}{% |
| 92 |
\ifdim\csname tikzext@nf@#2@\tikzext@nf@familyname @next\endcsname<#1\relax |
| 93 |
\expandafter\xdef\csname tikzext@nf@#2@\tikzext@nf@familyname @next\endcsname{#1}% |
| 94 |
\fi |
| 95 |
}% |
| 96 |
\pgfutil@IfUndefined{tikzext@nf@#2@\tikzext@nf@familyname @previous}{% first run, ignore |
| 97 |
}{% set previous value |
| 98 |
#3=\csname tikzext@nf@#2@\tikzext@nf@familyname @previous\endcsname\relax |
| 99 |
}% |
| 100 |
}% |
| 101 |
} |
| 102 |
|
| 103 |
% #1 = family type |
| 104 |
% #2 = family |
| 105 |
\def\tikzext@nf@get#1#2{% |
| 106 |
\pgfutil@IfUndefined{tikzext@nf@#1@\pgfkeysvalueof{/tikz/ext/node family/prefix}#2@previous} |
| 107 |
{0pt} |
| 108 |
{\csname tikzext@nf@#1@\pgfkeysvalueof{/tikz/ext/node family/prefix}#2@previous\endcsname}% |
| 109 |
} |
| 110 |
\def\tikzextnodefamiliesgetwidth{\tikzext@nf@get{width}} |
| 111 |
\def\tikzextnodefamiliesgetheight{\tikzext@nf@get{height}} |
| 112 |
\def\tikzextnodefamiliesgettextwidth{\tikzext@nf@get{text width}} |
| 113 |
\def\tikzextnodefamiliesgettextdepth{\tikzext@nf@get{text depth}} |
| 114 |
\def\tikzextnodefamiliesgettextheight{\tikzext@nf@get{text height}} |
| 115 |
|
| 116 |
\pgfdeclareshape{Rectangle}{% |
| 117 |
\savedanchor\northeast{% |
| 118 |
% Calculate x |
| 119 |
% |
| 120 |
% First, is width < minimum width? |
| 121 |
\pgf@x=\the\wd\pgfnodeparttextbox% |
| 122 |
\pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}% |
| 123 |
\advance\pgf@x by 2\pgf@xc% |
| 124 |
% Qrr: family width |
| 125 |
\tikzext@nf@getandset{\the\pgf@x}{width}{\pgfutil@tempdima}% |
| 126 |
\ifdim\pgf@x<\pgfutil@tempdima |
| 127 |
\pgf@x=\pgfutil@tempdima |
| 128 |
\fi |
| 129 |
% |
| 130 |
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}% |
| 131 |
\ifdim\pgf@x<\pgf@xb% |
| 132 |
% yes, too small. Enlarge... |
| 133 |
\pgf@x=\pgf@xb% |
| 134 |
\fi% |
| 135 |
% Now, calculate right border: .5\wd\pgfnodeparttextbox + .5 \pgf@x + outer sep |
| 136 |
\pgf@x=.5\pgf@x% |
| 137 |
\advance\pgf@x by.5\wd\pgfnodeparttextbox% |
| 138 |
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}% |
| 139 |
\advance\pgf@x by\pgf@xa% |
| 140 |
% Calculate y |
| 141 |
% |
| 142 |
% First, is height+depth < minimum height? |
| 143 |
\pgf@y=\ht\pgfnodeparttextbox% |
| 144 |
\advance\pgf@y by\dp\pgfnodeparttextbox% |
| 145 |
\pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}% |
| 146 |
\advance\pgf@y by 2\pgf@yc% |
| 147 |
% Qrr: family height |
| 148 |
\tikzext@nf@getandset{\the\pgf@y}{height}{\pgfutil@tempdima}% |
| 149 |
\ifdim\pgf@y<\pgfutil@tempdima |
| 150 |
\pgf@y=\pgfutil@tempdima |
| 151 |
\fi |
| 152 |
% |
| 153 |
\pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}% |
| 154 |
\ifdim\pgf@y<\pgf@yb% |
| 155 |
% yes, too small. Enlarge... |
| 156 |
\pgf@y=\pgf@yb% |
| 157 |
\fi% |
| 158 |
% Now, calculate upper border: .5\ht-.5\dp + .5 \pgf@y + outer sep |
| 159 |
\pgf@y=.5\pgf@y% |
| 160 |
\advance\pgf@y by-.5\dp\pgfnodeparttextbox% |
| 161 |
\advance\pgf@y by.5\ht\pgfnodeparttextbox% |
| 162 |
\pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% |
| 163 |
\advance\pgf@y by\pgf@ya% |
| 164 |
}% |
| 165 |
|
| 166 |
\savedanchor\southwest{% |
| 167 |
% Calculate x |
| 168 |
% |
| 169 |
% First, is width < minimum width? |
| 170 |
\pgf@x=\wd\pgfnodeparttextbox% |
| 171 |
\pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}% |
| 172 |
\advance\pgf@x by 2\pgf@xc% |
| 173 |
% Qrr: family width |
| 174 |
\tikzext@nf@getandset{\the\pgf@x}{width}{\pgfutil@tempdima}% |
| 175 |
\ifdim\pgf@x<\pgfutil@tempdima |
| 176 |
\pgf@x=\pgfutil@tempdima |
| 177 |
\fi |
| 178 |
% |
| 179 |
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}% |
| 180 |
\ifdim\pgf@x<\pgf@xb% |
| 181 |
% yes, too small. Enlarge... |
| 182 |
\pgf@x=\pgf@xb% |
| 183 |
\fi% |
| 184 |
% Now, calculate left border: .5\wd\pgfnodeparttextbox - .5 \pgf@x - outer sep |
| 185 |
\pgf@x=-.5\pgf@x% |
| 186 |
\advance\pgf@x by.5\wd\pgfnodeparttextbox% |
| 187 |
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}% |
| 188 |
\advance\pgf@x by-\pgf@xa% |
| 189 |
% Calculate y |
| 190 |
% |
| 191 |
% First, is height+depth < minimum height? |
| 192 |
\pgf@y=\ht\pgfnodeparttextbox% |
| 193 |
\advance\pgf@y by\dp\pgfnodeparttextbox% |
| 194 |
\pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}% |
| 195 |
\advance\pgf@y by 2\pgf@yc% |
| 196 |
% Qrr: family height |
| 197 |
\tikzext@nf@getandset{\the\pgf@y}{height}{\pgfutil@tempdima}% |
| 198 |
\ifdim\pgf@y<\pgfutil@tempdima |
| 199 |
\pgf@y=\pgfutil@tempdima |
| 200 |
\fi |
| 201 |
% |
| 202 |
\pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}% |
| 203 |
\ifdim\pgf@y<\pgf@yb% |
| 204 |
% yes, too small. Enlarge... |
| 205 |
\pgf@y=\pgf@yb% |
| 206 |
\fi% |
| 207 |
% Now, calculate upper border: .5\ht-.5\dp - .5 \pgf@y - outer sep |
| 208 |
\pgf@y=-.5\pgf@y% |
| 209 |
\advance\pgf@y by-.5\dp\pgfnodeparttextbox% |
| 210 |
\advance\pgf@y by.5\ht\pgfnodeparttextbox% |
| 211 |
\pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% |
| 212 |
\advance\pgf@y by-\pgf@ya% |
| 213 |
}% |
| 214 |
\inheritbackgroundpath[from=rectangle] |
| 215 |
\inheritbeforebackgroundpath[from=rectangle] |
| 216 |
\inheritbehindforegroundpath[from=rectangle] |
| 217 |
\inheritforegroundpath[from=rectangle] |
| 218 |
\inheritbeforeforegroundpath[from=rectangle] |
| 219 |
\inheritanchor[from=rectangle]{center} |
| 220 |
\inheritanchor[from=rectangle]{mid} |
| 221 |
\inheritanchor[from=rectangle]{base} |
| 222 |
\inheritanchor[from=rectangle]{north} |
| 223 |
\inheritanchor[from=rectangle]{south} |
| 224 |
\inheritanchor[from=rectangle]{west} |
| 225 |
\inheritanchor[from=rectangle]{mid west} |
| 226 |
\inheritanchor[from=rectangle]{base west} |
| 227 |
\inheritanchor[from=rectangle]{north west} |
| 228 |
\inheritanchor[from=rectangle]{south west} |
| 229 |
\inheritanchor[from=rectangle]{east} |
| 230 |
\inheritanchor[from=rectangle]{mid east} |
| 231 |
\inheritanchor[from=rectangle]{base east} |
| 232 |
\inheritanchor[from=rectangle]{north east} |
| 233 |
\inheritanchor[from=rectangle]{south east} |
| 234 |
\inheritanchorborder[from=rectangle] |
| 235 |
} |
| 236 |
|
| 237 |
\pgfdeclareshape{Circle}{% |
| 238 |
\savedanchor\centerpoint{% tex/generic/pgf/modules/pgfmoduleshapes.code.tex |
| 239 |
\pgf@x=.5\wd\pgfnodeparttextbox |
| 240 |
\pgf@y=.5\ht\pgfnodeparttextbox |
| 241 |
\advance\pgf@y by-.5\dp\pgfnodeparttextbox |
| 242 |
}% |
| 243 |
\saveddimen\radius{% tex/generic/pgf/modules/pgfmoduleshapes.code.tex |
| 244 |
% Calculate ``height radius'' |
| 245 |
\pgf@ya=.5\ht\pgfnodeparttextbox |
| 246 |
\advance\pgf@ya by.5\dp\pgfnodeparttextbox |
| 247 |
\pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/inner ysep}}% |
| 248 |
\advance\pgf@ya by\pgf@yb |
| 249 |
% Calculate ``width radius'' |
| 250 |
\pgf@xa=.5\wd\pgfnodeparttextbox |
| 251 |
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/inner xsep}}% |
| 252 |
\advance\pgf@xa by\pgf@xb |
| 253 |
% Calculate length of radius vector: |
| 254 |
\pgf@process{\pgfpointnormalised{\pgfqpoint{\pgf@xa}{\pgf@ya}}}% |
| 255 |
\ifdim\pgf@x>\pgf@y |
| 256 |
\c@pgf@counta=\pgf@x |
| 257 |
\ifnum\c@pgf@counta=0\relax |
| 258 |
\else |
| 259 |
\divide\c@pgf@counta by 255\relax |
| 260 |
\pgf@xa=16\pgf@xa\relax |
| 261 |
\divide\pgf@xa by\c@pgf@counta |
| 262 |
\pgf@xa=16\pgf@xa\relax |
| 263 |
\fi |
| 264 |
\else |
| 265 |
\c@pgf@counta=\pgf@y |
| 266 |
\ifnum\c@pgf@counta=0\relax |
| 267 |
\else |
| 268 |
\divide\c@pgf@counta by 255\relax |
| 269 |
\pgf@ya=16\pgf@ya\relax |
| 270 |
\divide\pgf@ya by\c@pgf@counta |
| 271 |
\pgf@xa=16\pgf@ya\relax |
| 272 |
\fi |
| 273 |
\fi |
| 274 |
\pgf@x=\pgf@xa% |
| 275 |
% Qrr: check for families |
| 276 |
\tikzext@nf@getandset{\the\dimexpr2\pgf@x\relax}{width}{\pgfutil@tempdima}% |
| 277 |
\tikzext@nf@getandset{\the\dimexpr2\pgf@x\relax}{height}{\pgfutil@tempdimb}% |
| 278 |
% Qrr: and adjust like minimum width and minimum height |
| 279 |
\ifdim\pgf@x<.5\pgfutil@tempdima |
| 280 |
\pgf@x=.5\pgfutil@tempdima |
| 281 |
\fi |
| 282 |
\ifdim\pgf@x<.5\pgfutil@tempdimb |
| 283 |
\pgf@x=.5\pgfutil@tempdimb |
| 284 |
\fi |
| 285 |
% If necessary, adjust radius so that the size requirements are met: |
| 286 |
\pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}% |
| 287 |
\pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}% |
| 288 |
\ifdim\pgf@x<.5\pgf@xb |
| 289 |
\pgf@x=.5\pgf@xb |
| 290 |
\fi |
| 291 |
\ifdim\pgf@x<.5\pgf@yb |
| 292 |
\pgf@x=.5\pgf@yb |
| 293 |
\fi |
| 294 |
% Now, add larger of outer separations. |
| 295 |
\pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% |
| 296 |
\pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% |
| 297 |
\ifdim\pgf@xb<\pgf@yb |
| 298 |
\advance\pgf@x by\pgf@yb |
| 299 |
\else |
| 300 |
\advance\pgf@x by\pgf@xb |
| 301 |
\fi |
| 302 |
}% |
| 303 |
\inheritbackgroundpath[from=circle] |
| 304 |
\inheritbeforebackgroundpath[from=circle] |
| 305 |
\inheritbehindforegroundpath[from=circle] |
| 306 |
\inheritforegroundpath[from=circle] |
| 307 |
\inheritbeforeforegroundpath[from=circle] |
| 308 |
\inheritanchor[from=circle]{center} |
| 309 |
\inheritanchor[from=circle]{mid} |
| 310 |
\inheritanchor[from=circle]{base} |
| 311 |
\inheritanchor[from=circle]{north} |
| 312 |
\inheritanchor[from=circle]{south} |
| 313 |
\inheritanchor[from=circle]{west} |
| 314 |
\inheritanchor[from=circle]{mid west} |
| 315 |
\inheritanchor[from=circle]{base west} |
| 316 |
\inheritanchor[from=circle]{north west} |
| 317 |
\inheritanchor[from=circle]{south west} |
| 318 |
\inheritanchor[from=circle]{east} |
| 319 |
\inheritanchor[from=circle]{mid east} |
| 320 |
\inheritanchor[from=circle]{base east} |
| 321 |
\inheritanchor[from=circle]{north east} |
| 322 |
\inheritanchor[from=circle]{south east} |
| 323 |
\inheritanchorborder[from=circle] |
| 324 |
} |
| 325 |
|
| 326 |
\def\pgfutil@prefixto@macro#1#2{% |
| 327 |
\def\pgf@temp{#2}% |
| 328 |
\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter#1% |
| 329 |
\expandafter\expandafter\expandafter{\expandafter\pgf@temp#1}% |
| 330 |
} |
| 331 |
|
| 332 |
\pgfqkeys{/tikz/ext/node family}{ |
| 333 |
setup shape/.code={% |
| 334 |
\expandafter\pgfutil@prefixto@macro\csname pgf@sh@s@#1\endcsname{% |
| 335 |
\tikzext@nf@getandset{\the\wd\pgfnodeparttextbox}{text width}{\pgfutil@tempdima}% |
| 336 |
\ifdim\wd\pgfnodeparttextbox<\pgfutil@tempdima |
| 337 |
\setbox\pgfnodeparttextbox=\hbox to \pgfutil@tempdima{\tikzext@nf@align@action\pgfnodeparttextbox}% |
| 338 |
\fi |
| 339 |
\tikzext@nf@getandset{\the\dp\pgfnodeparttextbox}{text depth}{\pgfutil@tempdima}% |
| 340 |
\ifdim\dp\pgfnodeparttextbox<\pgfutil@tempdima |
| 341 |
\dp\pgfnodeparttextbox=\pgfutil@tempdima |
| 342 |
\fi |
| 343 |
\tikzext@nf@getandset{\the\ht\pgfnodeparttextbox}{text height}{\pgfutil@tempdima}% |
| 344 |
\ifdim\ht\pgfnodeparttextbox<\pgfutil@tempdima |
| 345 |
\ht\pgfnodeparttextbox=\pgfutil@tempdima |
| 346 |
\fi |
| 347 |
}% |
| 348 |
}, |
| 349 |
setup shape/.list={rectangle,circle,Rectangle,Circle} |
| 350 |
} |
| 351 |
|
| 352 |
%% nf functions |
| 353 |
\def\tikzext@nf@function@default{{\the\pgf@x}{\the\pgf@y}} |
| 354 |
\def\tikzext@nf@function@default@double{{\the\dimexpr2\pgf@x\relax}{\the\dimexpr2\pgf@y\relax}} |
| 355 |
\def\tikzext@nf@function@circle{{\the\pgf@x}{\the\pgf@x}} |
| 356 |
\def\tikzext@nf@function@circle@double{{\the\dimexpr2\pgf@x\relax}{\the\dimexpr2\pgf@x\relax}} |
| 357 |
|
| 358 |
\pgfmathdeclarefunction{ext_nf_width}{0}{% |
| 359 |
\begingroup |
| 360 |
\pgfutil@IfUndefined{tikzext@nf@function@\pgf@sm@shape@name}{% |
| 361 |
\let\tikzext@nf@function\tikzext@nf@function@default |
| 362 |
}{% |
| 363 |
\pgfutil@IfUndefined{tikzext@nf@function@\pgf@sm@shape@name @extra}{}{\csname tikzext@nf@function@\pgf@sm@shape@name @extra\endcsname}% |
| 364 |
\expandafter\let\expandafter\tikzext@nf@function\csname tikzext@nf@function@\pgf@sm@shape@name\endcsname |
| 365 |
}% |
| 366 |
\tikzext@nf@getandset{\expandafter\pgfutil@firstoftwo\tikzext@nf@function}{width}{\pgfutil@tempdima}% |
| 367 |
\edef\pgfmathresult{\pgf@sys@tonumber\pgfutil@tempdima}% |
| 368 |
\pgfmath@smuggleone\pgfmathresult |
| 369 |
\endgroup |
| 370 |
} |
| 371 |
\pgfmathdeclarefunction{ext_nf_height}{0}{% |
| 372 |
\begingroup |
| 373 |
\pgfutil@IfUndefined{tikzext@nf@function@\pgf@sm@shape@name}{% |
| 374 |
\let\tikzext@nf@function\tikzext@nf@function@default |
| 375 |
}{% |
| 376 |
\pgfutil@IfUndefined{tikzext@nf@function@\pgf@sm@shape@name @extra}{}{\csname tikzext@nf@function@\pgf@sm@shape@name @extra\endcsname}% |
| 377 |
\expandafter\let\expandafter\tikzext@nf@function\csname tikzext@nf@function@\pgf@sm@shape@name\endcsname |
| 378 |
}% |
| 379 |
\tikzext@nf@getandset{\expandafter\pgfutil@secondoftwo\tikzext@nf@function}{height}{\pgfutil@tempdima}% |
| 380 |
\edef\pgfmathresult{\pgf@sys@tonumber\pgfutil@tempdima}% |
| 381 |
\pgfmath@smuggleone\pgfmathresult |
| 382 |
\endgroup |
| 383 |
} |
| 384 |
|
| 385 |
%%% Compatibility |
| 386 |
\tikzextset{ |
| 387 |
/tikz-ext/compat/add library={node-families}{pre 0.6}, |
| 388 |
compat/node-families/warn/.append code=% |
| 389 |
\tikzextutil@compatwarning@valuekey{node-families}{pre 0.6}{/tikz/node family/prefix} {/tikz/ext/node family/prefix}% |
| 390 |
\tikzextutil@compatwarning@valuekey{node-families}{pre 0.6}{/tikz/node family/text height} {/tikz/ext/node family/text height}% |
| 391 |
\tikzextutil@compatwarning@valuekey{node-families}{pre 0.6}{/tikz/node family/text depth} {/tikz/ext/node family/text depth}% |
| 392 |
\tikzextutil@compatwarning@valuekey{node-families}{pre 0.6}{/tikz/node family/text width} {/tikz/ext/node family/text width}% |
| 393 |
\tikzextutil@compatwarning@key {node-families}{pre 0.6}{/tikz/node family/text} {/tikz/ext/node family/text}% |
| 394 |
\tikzextutil@compatwarning@key {node-families}{pre 0.6}{/tikz/node family/text width align}{/tikz/ext/node family/text width align}% |
| 395 |
\tikzextutil@compatwarning@key {node-families}{pre 0.6}{/tikz/node family/setup shape} {/tikz/ext/node family/setup shape}% |
| 396 |
\tikzextutil@compatwarning@key {node-families}{pre 0.6}{/tikz/node family/width} {/tikz/ext/node family/width}% |
| 397 |
\tikzextutil@compatwarning@key {node-families}{pre 0.6}{/tikz/node family/height} {/tikz/ext/node family/height}% |
| 398 |
\tikzextutil@compatwarning@key {node-families}{pre 0.6}{/tikz/node family/size} {/tikz/ext/node family/size}, |
| 399 |
compat/node-families/pre 0.6/.append code=% |
| 400 |
\pgfkeysdef{/tikz/node family/prefix} {\pgfkeyssetvalue{/tikz/ext/node family/prefix}{##1}}% |
| 401 |
\pgfkeysdef{/tikz/node family/text height} {\pgfkeyssetvalue{/tikz/ext/node family/text height}{##1}}% |
| 402 |
\pgfkeysdef{/tikz/node family/text depth} {\pgfkeyssetvalue{/tikz/ext/node family/text depth}{##1}}% |
| 403 |
\pgfkeysdef{/tikz/node family/text width} {\pgfkeyssetvalue{/tikz/ext/node family/text width}{##1}}% |
| 404 |
\pgfkeysdef{/tikz/node family/text} {\pgfkeysvalueof{/tikz/ext/node family/text/.@cmd}##1\pgfeov}% |
| 405 |
\pgfkeysdef{/tikz/node family/text width align}{\pgfkeysvalueof{/tikz/ext/node family/text width align/.@cmd}##1\pgfeov}% |
| 406 |
\pgfkeysdef{/tikz/node family/setup shape} {\pgfkeysvalueof{/tikz/ext/node family/setup shape/.@cmd}##1\pgfeov}% |
| 407 |
\pgfkeysdef{/tikz/node family/width} {\pgfkeysvalueof{/tikz/ext/node family/width/.@cmd}##1\pgfeov}% |
| 408 |
\pgfkeysdef{/tikz/node family/height} {\pgfkeysvalueof{/tikz/ext/node family/height/.@cmd}##1\pgfeov}% |
| 409 |
\pgfkeysdef{/tikz/node family/size} {\pgfkeysvalueof{/tikz/ext/node family/size/.@cmd}##1\pgfeov}, |
| 410 |
compat/node-families/\pgfkeysvalueof{/tikz/ext/compat/node-families}% |
| 411 |
} |