diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex | 90 |
1 files changed, 61 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex index 657d0664f60..fdaad445ce1 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex @@ -38,7 +38,7 @@ \pgfpointorigin } \savedanchor\northwest{% - \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/nodes width}\pgf@circ@Rlen + \pgf@y=\ctikzvalof{nodes width}\pgf@circ@Rlen \pgf@x=-\pgf@y } \anchor{center}{ \pgf@y=0pt \pgf@x=0pt } @@ -58,13 +58,13 @@ \pgf@circ@res@left=\pgf@x \pgf@circ@res@up=\pgf@y \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up} - }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}} + }{\pgfpoint{\ctikzvalof{nodes width}*\pgf@circ@Rlen}{\ctikzvalof{nodes width}*\pgf@circ@Rlen}} } \behindforegroundpath{ \pgfscope - \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen} - \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfpathcircle{\pgfpointorigin}{\ctikzvalof{nodes width}*\pgf@circ@Rlen} + \pgfsetcolor{\ctikzvalof{color}} \pgfsetfillopacity{1.0} \pgfusepath{draw,fill} \endpgfscope @@ -79,7 +79,7 @@ \pgfpointorigin } \savedanchor\northwest{% - \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/nodes width}\pgf@circ@Rlen + \pgf@y=\ctikzvalof{nodes width}\pgf@circ@Rlen \pgf@x=-\pgf@y } \anchor{center}{ \pgf@y=0pt \pgf@x=0pt } @@ -99,16 +99,21 @@ \pgf@circ@res@left=\pgf@x \pgf@circ@res@up=\pgf@y \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up} - }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}} + }{\pgfpoint{\ctikzvalof{nodes width}*\pgf@circ@Rlen}{\ctikzvalof{nodes width}*\pgf@circ@Rlen}} } \behindforegroundpath{ \pgfscope - \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen} - \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfpathcircle{\pgfpointorigin}{\ctikzvalof{nodes width}*\pgf@circ@Rlen} + \pgfsetcolor{\ctikzvalof{color}} \ifx\tikz@fillcolor\pgfutil@empty + % set the default fill color to white \pgfsetfillcolor{white} + % ...but override it if the class is defined! + % note that this element has no class, but will inherit it when used + % into another component + \pgf@circ@setifdefinedfill{draw, fill}{draw, fill} \else \pgfsetfillcolor{\tikz@fillcolor} \fi @@ -165,7 +170,7 @@ \pgfpathrectanglecorners {\pgfpoint{-\pgf@circ@res@temp}{-\pgf@circ@res@temp}} {\pgfpoint{\pgf@circ@res@temp}{\pgf@circ@res@temp}} - \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetcolor{\ctikzvalof{color}} \pgfsetfillopacity{1.0} \pgfusepath{draw,fill} \endpgfscope @@ -218,9 +223,14 @@ \pgfpathrectanglecorners {\pgfpoint{-\pgf@circ@res@temp}{-\pgf@circ@res@temp}} {\pgfpoint{\pgf@circ@res@temp}{\pgf@circ@res@temp}} - \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetcolor{\ctikzvalof{color}} \ifx\tikz@fillcolor\pgfutil@empty + % set the default fill color to white \pgfsetfillcolor{white} + % ...but override it if the class is defined! + % note that this element has no class, but will inherit it when used + % into another component + \pgf@circ@setifdefinedfill{draw, fill}{draw, fill} \else \pgfsetfillcolor{\tikz@fillcolor} \fi @@ -267,7 +277,7 @@ \pgfpathrectanglecorners {\pgfpoint{-\pgf@circ@res@temp}{-\pgf@circ@res@temp}} {\pgfpoint{\pgf@circ@res@temp}{\pgf@circ@res@temp}} - \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetcolor{\ctikzvalof{color}} \pgfsetfillopacity{1.0} \pgfusepath{draw,fill} \endpgfscope @@ -310,9 +320,14 @@ \pgfpathrectanglecorners {\pgfpoint{-\pgf@circ@res@temp}{-\pgf@circ@res@temp}} {\pgfpoint{\pgf@circ@res@temp}{\pgf@circ@res@temp}} - \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetcolor{\ctikzvalof{color}} \ifx\tikz@fillcolor\pgfutil@empty + % set the default fill color to white \pgfsetfillcolor{white} + % ...but override it if the class is defined! + % note that this element has no class, but will inherit it when used + % into another component + \pgf@circ@setifdefinedfill{draw, fill}{draw, fill} \else \pgfsetfillcolor{\tikz@fillcolor} \fi @@ -329,7 +344,7 @@ } % BNC size is 2.5 times the size of the internal "ocirc" \savedanchor\northwest{% - \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/nodes width}\pgf@circ@Rlen + \pgf@y=\ctikzvalof{nodes width}\pgf@circ@Rlen \pgf@y=2.5\pgf@y \pgf@x=-\pgf@y } @@ -359,15 +374,15 @@ \pgf@circ@res@left=\pgf@x \pgf@circ@res@up=\pgf@y \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up} - }{\pgfpoint{2.5*\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}{2.5*\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}} + }{\pgfpoint{2.5*\ctikzvalof{nodes width}*\pgf@circ@Rlen}{2.5*\ctikzvalof{nodes width}*\pgf@circ@Rlen}} } \behindforegroundpath{ \pgfextracty{\pgf@circ@res@other}{\northwest} - \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/nodes width}\pgf@circ@Rlen + \pgf@circ@res@step=\ctikzvalof{nodes width}\pgf@circ@Rlen \pgfscope \pgfstartlinewidth=\pgflinewidth - \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgflinewidth} - \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgf@circ@setlinewidth{bipoles}{\pgflinewidth} + \pgfsetcolor{\ctikzvalof{color}} % external circle \pgfscope % clipping path: first a rectangle bigger then the shape @@ -422,7 +437,7 @@ \pgfpathrectanglecorners {\pgfpoint{0}{.5\pgflinewidth}} {\pgfpoint{0}{-.5\pgflinewidth}} - \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetcolor{\ctikzvalof{color}} \pgfusepath{draw,fill} \endpgfscope } @@ -434,7 +449,7 @@ \pgfdeclareshape{currarrow}{ \savedanchor{\northeast}{% \pgf@circ@res@step = \pgf@circ@Rlen - \divide \pgf@circ@res@step by \pgfkeysvalueof{/tikz/circuitikz/current arrow scale} + \divide \pgf@circ@res@step by \ctikzvalof{current arrow scale} \pgf@x=.5\pgf@circ@res@step \pgf@y=\pgf@x% } @@ -452,20 +467,20 @@ \anchor{tip}{ \pgfpointorigin \pgf@circ@res@step = \pgf@circ@Rlen - \divide \pgf@circ@res@step by \pgfkeysvalueof{/tikz/circuitikz/current arrow scale} + \divide \pgf@circ@res@step by \ctikzvalof{current arrow scale} \pgf@x =\pgf@circ@res@step } \behindforegroundpath{ \pgfscope \pgf@circ@res@step = \pgf@circ@Rlen - \divide \pgf@circ@res@step by \pgfkeysvalueof{/tikz/circuitikz/current arrow scale} + \divide \pgf@circ@res@step by \ctikzvalof{current arrow scale} \pgfpathmoveto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}} \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}} \pgfpathlineto{\pgfpoint{1\pgf@circ@res@step}{0pt}} \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{.8\pgf@circ@res@step}} \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}} - \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetcolor{\ctikzvalof{color}} \pgfusepath{draw,fill} \endpgfscope @@ -477,7 +492,7 @@ \pgfdeclareshape{flowarrow}{ \savedanchor{\northeast}{% \pgf@circ@res@step = \pgf@circ@Rlen - \divide \pgf@circ@res@step by \pgfkeysvalueof{/tikz/circuitikz/current arrow scale} + \divide \pgf@circ@res@step by \ctikzvalof{current arrow scale} \pgf@y=.5\pgf@circ@res@step \pgf@circ@res@step = \pgf@circ@Rlen \divide \pgf@circ@res@step by 4 @@ -497,7 +512,7 @@ \anchor{tip}{ \pgfpointorigin \pgf@circ@res@step = \pgf@circ@Rlen - \divide \pgf@circ@res@step by \pgfkeysvalueof{/tikz/circuitikz/current arrow scale} + \divide \pgf@circ@res@step by \ctikzvalof{current arrow scale} \pgf@x =\pgf@circ@res@step } \behindforegroundpath{ @@ -506,7 +521,7 @@ \divide \pgf@circ@res@step by 4 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{0pt}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}} - \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetcolor{\ctikzvalof{color}} \pgfusepath{draw} \pgftransformshift{\pgfpoint{\pgf@circ@res@step}{0pt}} \pgfnode{currarrow}{tip}{}{}{\pgfusepath{fill}} @@ -519,7 +534,7 @@ \pgfdeclareshape{inputarrow}{ \savedanchor{\northeast}{% this is really not northeast, really -northwest \pgf@circ@res@step = \pgf@circ@Rlen - \divide \pgf@circ@res@step by \pgfkeysvalueof{/tikz/circuitikz/current arrow scale} + \divide \pgf@circ@res@step by \ctikzvalof{current arrow scale} \pgf@y=.5\pgf@circ@res@step \pgf@x=1.7\pgf@circ@res@step } @@ -551,7 +566,7 @@ \pgfpathlineto{\pgfpoint{0pt}{0pt}} \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{.8\pgf@circ@res@step}} \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}} - \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetcolor{\ctikzvalof{color}} \pgfusepath{fill} \endpgfscope @@ -570,14 +585,31 @@ \pgfscope \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@Rlen \pgf@circ@res@step = 0.5\pgf@circ@res@step - \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} \pgfpathrectanglecorners{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@step}}{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} \pgf@circ@draworfill \endpgfscope } - } +%% box scaled with blocks + +\pgfdeclareshape{blockbox}{ + \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{blocks/scale}\pgf@circ@Rlen}} + \anchor{center}{ + \pgfpointorigin + } + \behindforegroundpath{ + \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{blocks/scale}\pgf@circ@Rlen} + \pgfscope + \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@scaled@Rlen + \pgf@circ@res@step = 0.5\pgf@circ@res@step + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} + \pgfpathrectanglecorners{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@step}}{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgf@circ@draworfill + \endpgfscope + } +} % full nodes for wire crossing |