summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-12-11 03:01:17 +0000
committerNorbert Preining <norbert@preining.info>2022-12-11 03:01:17 +0000
commit6e749f2b4d0cbb91f8d2c872981d7ebba3a0fb52 (patch)
treee3b57f2d4f741f6919b9761eecd8a60f4edd19e7 /graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
parent6e1509aea8d6baf0753bf9bedbb4633a4808d0c3 (diff)
CTAN sync 202212110301
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex')
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex2460
1 files changed, 698 insertions, 1762 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
index b34df68a01..568caa1f64 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
@@ -517,6 +517,7 @@
\ctikzset{bipoles/twoport/height/.initial=.7}
\ctikzset{bipoles/twoport/text/.initial=}
\ctikzset{bipoles/twoportsplit/width/.initial=.7}
+\ctikzset{bipoles/twoportsplit/height/.initial=.7}
\ctikzset{bipoles/twoport/text in/.initial=}
\ctikzset{bipoles/twoport/text out/.initial=}
\ctikzset{text/.style={t=#1}}
@@ -563,6 +564,9 @@
\ctikzset{tripoles/splitter/height/.initial=1.3}
\ctikzset{tripoles/splitter/width/.initial=1.3}
+\ctikzset{tripoles/genericsplitter/height/.initial=1.3}
+\ctikzset{tripoles/genericsplitter/width/.initial=1.3}
+
\ctikzset{tripoles/mzm/height/.initial=1.3}
\ctikzset{tripoles/mzm/width/.initial=1.3}
@@ -590,7 +594,12 @@
\newif\ifpgf@circuit@dashed
\pgfkeys{/tikz/dashed/.add code={}{\pgf@circuit@dashedtrue}}
\ctikzset{dashed/.add code={}{\pgf@circuit@dashedtrue}}%
-
+% Also draw internal things dashed
+\newif\ifpgf@circuit@full@dashed
+\ctikzset{inner blocks dashed/.is if=pgf@circuit@full@dashed}%
+% Default block dash
+\ctikzset{dashed blocks pattern/.initial={{0.1cm}{0.1cm}}}
+%
% powerelectronic blocks
\ctikzset{bipoles/sacdc/width/.initial=.7}
\ctikzset{bipoles/sdcac/width/.initial=.7}
@@ -621,1231 +630,429 @@
}%
\fi
}
+%%% blocks additional anchors
+\def\pgcirc@twoport@additional@anchors{%
+ \anchor{right down}{\northeast\pgf@y=-0.5\pgf@y}
+ \anchor{left down}{\northeast\pgf@x=-\pgf@x\pgf@y=-0.5\pgf@y}
+ \anchor{left up}{\northeast\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{right up}{\northeast\pgf@y=0.5\pgf@y}
+ \anchor{up}{\northeast\pgf@x=0pt\relax}
+ \anchor{down}{\northeast\pgf@y=-\pgf@y\pgf@x=0pt\relax}
+}
+
+%%% definition to help define the blocks. Notice that the height, width, etc are different, so we can't
+%%% simplify more...
+\def\pfgcirc@twoport@get@symbol@rotation{
+ %%% put the needed rotation in \@@rotation
+ \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+ \def\@@rotation{0}
+ \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+ \def\@@rotation{270}
+ \fi\fi
+ \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225
+ \def\@@rotation{180}
+ \fi\fi
+ \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+ \def\@@rotation{90}
+ \fi\fi
+}
+%
+\def\pfgcirc@twoport@rotate@inner@symbol{%
+ % rotate inner symbol
+ \pfgcirc@twoport@get@symbol@rotation
+ \pgftransformrotate{\@@rotation}
+}
+% enact dashing if needed
+\def\pgfcirc@twoport@maybedash{%
+ \ifpgf@circuit@dashed
+ \edef\@@tmp{\ctikzvalof{dashed blocks pattern}}
+ \expandafter\pgfsetdash\expandafter{\@@tmp}{0cm}
+ \fi
+}
+% debug
+\def\@@printrot{%
+ \pgfsetcolor{red}
+ \pgftext[center,x=0,y=0,]{\tiny\ttfamily\pgf@circ@direction > \@@rotation}
+}
+%
+\def\pgfcirc@twoport@setup#1{%
+ \pgf@circ@res@step = #1\pgf@circ@scaled@Rlen%6 is the real width parameter
+ \divide \pgf@circ@res@step by 2
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-}
+ % let set the dash for the next operations
+ \pgfcirc@twoport@maybedash
+}
+%
+\def\pgfcirc@twoport@draw@sine#1#2{% #1 -> y shift; #2 -> crossed out if != 0
+ % draw inner sine waves; ...res@step must be defined
+ \pgfscope
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgftransformyshift{#1\pgf@circ@res@step}
+ \pgfpathmoveto{\pgfpoint{-.5\pgf@circ@res@step}{0\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \ifnum #2=0\else
+ \pgfpathmoveto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
+ \fi
+ \pgfusepath{draw}
+ \endpgfscope
+}
+%
+\def\pgfcirc@twoport@draw@splitline{%
+ \pgfscope
+ \pgfcirc@twoport@maybedash
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
+%
+\long\def\pgfcirc@define@twoports#1#2#3#4#5#6#7{
+\pgfcircdeclarebipolescaled{#1}
+ {
+ \pgcirc@twoport@additional@anchors
+ #2
+ }
+ {#3}
+ {#4}
+ {#5}
+ {#6}
+ {
+ \pgfcirc@twoport@setup{#6}
+ % draw outer box
+ \pgf@circ@twoportbox
+ % draw solid line for inner symbol if no box is drawn and not fully dashed
+ \ifpgf@circuit@full@dashed\else\pgfsetdash{}{0pt}\fi
+ \pgf@circ@inputarrow
+ \pfgcirc@twoport@rotate@inner@symbol
+ #7
+ }
+}
+%
+\long\def\pgfcirc@define@twoports@norotate#1#2#3#4#5#6#7{
+\pgfcircdeclarebipolescaled{#1}
+ {
+ \pgcirc@twoport@additional@anchors
+ #2
+ }
+ {#3}
+ {#4}
+ {#5}
+ {#6}
+ {
+ \pgfcirc@twoport@setup{#6}
+ % draw outer box
+ \pgf@circ@twoportbox
+ % draw solid line for inner symbol if no box is drawn and not fully dashed
+ \ifpgf@circuit@full@dashed\else\pgfsetdash{}{0pt}\fi
+ \pgf@circ@inputarrow
+ #7
+ }
+}
%% Generic two port box
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/twoport/height}}
{twoport}
{\ctikzvalof{bipoles/twoport/height}}
{\ctikzvalof{bipoles/twoport/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
% draw inner symbol
\pgf@circ@text@strokecolor
\pgftext[center,x=0,y=0]{\ctikzvalof{bipoles/twoport/text}}
}
-
%% twoport split
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
-{\ctikzvalof{bipoles/twoportsplit/width}}
+{\ctikzvalof{bipoles/twoportsplit/height}}
{twoportsplit}
-{\ctikzvalof{bipoles/twoportsplit/width}}
+{\ctikzvalof{bipoles/twoportsplit/height}}
{\ctikzvalof{bipoles/twoportsplit/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/twoportsplit/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
%get texts
\def\pgfcirc@tin{\ctikzvalof{bipoles/twoport/text in}}
\def\pgfcirc@tout{\ctikzvalof{bipoles/twoport/text out}}
-
- % rotate inner symbol
- \def\texti{\pgfcirc@tin}
- \def\textii{\pgfcirc@tout}
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \def\texti{\pgfcirc@tout}
- \def\textii{\pgfcirc@tin}
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \def\texti{\pgfcirc@tout}
- \def\textii{\pgfcirc@tin}
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \def\texti{\pgfcirc@tin}
- \def\textii{\pgfcirc@tout}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfusepath{draw}
-
+ % shuffle text depending on rotation
+ \pgfcirc@twoport@draw@splitline
+ %
\pgf@circ@text@strokecolor
- \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\texti}
- \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textii}
-}
-
-%% voltage controled oscillator
-\pgfcircdeclarebipolescaled{blocks}
-{}
-{\ctikzvalof{bipoles/vco/width}}
-{vco}
-{\ctikzvalof{bipoles/twoport/width}}
-{\ctikzvalof{bipoles/vco/width}}
-{
- \pgf@circ@res@step = \ctikzvalof{bipoles/vco/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
- % draw circle
- \pgfscope
- \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
- \pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@step}
- \pgf@circ@draworfill
- \endpgfscope
- \ifpgf@circuit@inputarrow
- {
- \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
- \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
- \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
- }
+ \ifnum\@@rotation<145
+ \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\pgfcirc@tin}
+ \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\pgfcirc@tout}
+ \else
+ \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\pgfcirc@tout}
+ \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\pgfcirc@tin}
\fi
-
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner sine waves
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{-.5\pgf@circ@res@step}{0\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
}
-
%% bandpass filter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/bandpass/width}}
{bandpass}
{\ctikzvalof{bipoles/bandpass/width}}
{\ctikzvalof{bipoles/bandpass/width}}
{
-
- \pgf@circ@res@step = \ctikzvalof{bipoles/bandpass/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{0.35\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
- \pgfusepath{draw}
+ \pgfcirc@twoport@draw@sine{0.5}{1}
+ \pgfcirc@twoport@draw@sine{0.0}{0}
+ \pgfcirc@twoport@draw@sine{-0.5}{1}
}
-
%% bandstop filter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/bandstop/width}}
{bandstop}
{\ctikzvalof{bipoles/bandstop/width}}
{\ctikzvalof{bipoles/bandstop/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/bandstop/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225% 134 degree, because >= 135 is not possible
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt}% always draw solid line for inner symbol
- \pgfsetarrows{-}%never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
+ \pgfcirc@twoport@draw@sine{0.5}{0}
+ \pgfcirc@twoport@draw@sine{0.0}{1}
+ \pgfcirc@twoport@draw@sine{-0.5}{0}
}
-
%% highpass filter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/highpass/width}}
{highpass}
{\ctikzvalof{bipoles/highpass/width}}
{\ctikzvalof{bipoles/highpass/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/highpass/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
- \pgfusepath{draw}
+ \pgfcirc@twoport@draw@sine{0.5}{0}
+ \pgfcirc@twoport@draw@sine{0.0}{1}
+ \pgfcirc@twoport@draw@sine{-0.5}{1}
}
-
%% highpass2 filter ---simplyfied with just two waves
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/highpass2/width}}
{highpass2}
{\ctikzvalof{bipoles/highpass2/width}}
{\ctikzvalof{bipoles/highpass2/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/highpass2/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-0.3\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.3\pgf@circ@res@step}{-0.1\pgf@circ@res@step}}
- \pgfusepath{draw}
+ \pgfcirc@twoport@draw@sine{0.25}{0}
+ \pgfcirc@twoport@draw@sine{-0.25}{1}
}
-
%% lowpass filter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/lowpass/width}}
{lowpass}
{\ctikzvalof{bipoles/lowpass/width}}
{\ctikzvalof{bipoles/lowpass/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/lowpass/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{0.35\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
+ \pgfcirc@twoport@draw@sine{0.5}{1}
+ \pgfcirc@twoport@draw@sine{0.0}{1}
+ \pgfcirc@twoport@draw@sine{-0.5}{0}
}
-
%% lowpass2 filter: simplyfied with just two waves
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/lowpass2/width}}
{lowpass2}
{\ctikzvalof{bipoles/lowpass2/width}}
{\ctikzvalof{bipoles/lowpass2/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/lowpass2/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-0.3\pgf@circ@res@step}{0.1\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.3\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
+ \pgfcirc@twoport@draw@sine{0.25}{1}
+ \pgfcirc@twoport@draw@sine{-0.25}{0}
}
-
%% allpass filter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/allpass/width}}
{allpass}
{\ctikzvalof{bipoles/allpass/width}}
{\ctikzvalof{bipoles/allpass/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/allpass/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
- \pgfusepath{draw}
+ \pgfcirc@twoport@draw@sine{0.5}{0}
+ \pgfcirc@twoport@draw@sine{0.0}{0}
+ \pgfcirc@twoport@draw@sine{-0.5}{0}
}
-
%% ADC
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/adc/width}}
{adc}
{\ctikzvalof{bipoles/adc/width}}
{\ctikzvalof{bipoles/adc/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/adc/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\texti{A}
- \def\textii{D}
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \def\texti{D}
- \def\textii{A}
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \def\texti{D}
- \def\textii{A}
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \def\texti{A}
- \def\textii{D}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfusepath{draw}
-
+ \pgfcirc@twoport@draw@splitline
+ %
\pgf@circ@text@strokecolor
- \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}}
- \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}}
+ \ifnum\@@rotation<145
+ \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{A}
+ \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{D}
+ \else
+ \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{D}
+ \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{A}
+ \fi
}
%% DAC
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/dac/width}}
{dac}
{\ctikzvalof{bipoles/dac/width}}
{\ctikzvalof{bipoles/dac/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/dac/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\texti{D}
- \def\textii{A}
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \def\texti{A}
- \def\textii{D}
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \def\texti{A}
- \def\textii{D}
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \def\texti{D}
- \def\textii{A}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfusepath{draw}
-
+ \pgfcirc@twoport@draw@splitline
+ %
\pgf@circ@text@strokecolor
- \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}}
- \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}}
+ \ifnum\@@rotation<145
+ \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{D}
+ \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{A}
+ \else
+ \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{A}
+ \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{D}
+ \fi
}
%% DSP
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/dsp/width}}
{dsp}
{\ctikzvalof{bipoles/dsp/width}}
{\ctikzvalof{bipoles/dsp/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/dsp/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
\pgf@circ@text@strokecolor
\pgftext[center,x=0,y=0]{\textsf{DSP}}
}
-
%% FFT
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/fft/width}}
{fft}
{\ctikzvalof{bipoles/fft/width}}
{\ctikzvalof{bipoles/fft/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/fft/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
\pgf@circ@text@strokecolor
\pgftext[center,x=0,y=0]{\textsf{FFT}}
}
-
-%% Amplifier
-\pgfcircdeclarebipolescaled{blocks}
-{}
-{
- \ifpgf@circuit@boxed
- \ctikzvalof{bipoles/twoport/width}
- \else
- \ctikzvalof{bipoles/amp/width}
- \fi
-}
-{amp}
-{
- \ifpgf@circuit@boxed
- \ctikzvalof{bipoles/twoport/width}
- \else
- \ctikzvalof{bipoles/amp/width}
- \fi
-}
-{
- \ifpgf@circuit@boxed
- \ctikzvalof{bipoles/twoport/width}
- \else
- \ctikzvalof{bipoles/amp/width}
- \fi
-}
-{
- \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@scaled@Rlen
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \ifpgf@circuit@boxed
- \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
- \pgfnode{blockbox}{center}{}{pgf@box}{\pgfusepath{draw}}
- \pgf@circ@draworfill
- \fi
-
- % draw input arrow
- \ifpgf@circuit@inputarrow
- {
- \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
- \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
- \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
- }
- \fi
-
- \ifpgf@circuit@boxed
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn
- \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box
- \else
- \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
- \fi
-
- \pgfsetarrows{-} %never draw arrows
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
- \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
-
- \pgfpathclose
- \pgf@circ@draworfill
-
- % draw inner text
- \pgf@circ@text@strokecolor
- \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
-}
-
-
-%% variable amplifier
-\pgfcircdeclarebipolescaled{blocks}
-{}
-{
- \ifpgf@circuit@boxed
- \ctikzvalof{bipoles/twoport/width}
- \else
- \ctikzvalof{bipoles/amp/width}
- \fi
-}
-{vamp}
-{
- \ifpgf@circuit@boxed
- \ctikzvalof{bipoles/twoport/width}
- \else
- \ctikzvalof{bipoles/amp/width}
- \fi
-}
-{
- \ifpgf@circuit@boxed
- \ctikzvalof{bipoles/twoport/width}
- \else
- \ctikzvalof{bipoles/amp/width}
- \fi
-}
-{
- \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@scaled@Rlen
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \ifpgf@circuit@boxed
- \pgfnode{blockbox}{center}{}{pgf@box}{\pgfusepath{draw}}
- \fi
-
- % draw input arrow
- \ifpgf@circuit@inputarrow
- {
- \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
- \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
- \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
- }
- \fi
-
- \ifpgf@circuit@boxed
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn
- \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box
- \else
- \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
- \fi
-
-
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
-
- \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
- \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
-
- \pgfpathclose
- \pgf@circ@draworfill
-
-
- % draw arrow
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfsetarrowsend{latex}
- \pgfpathmoveto{\pgfpoint{-0.8\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@step}{0.6\pgf@circ@res@step}}
- \pgfusepath{draw}
- % draw inner text
- \pgf@circ@text@strokecolor
- \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
-}
-
%% pi attenuator
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/piattenuator/width}}
{piattenuator}
{\ctikzvalof{bipoles/piattenuator/width}}
{\ctikzvalof{bipoles/piattenuator/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/piattenuator/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
% draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
- \pgfusepath{draw}
\pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
- \pgfusepath{draw}
\pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
\pgfusepath{draw}
}
-
%% variable pi attenuator
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/vpiattenuator/width}}
{vpiattenuator}
{\ctikzvalof{bipoles/vpiattenuator/width}}
{\ctikzvalof{bipoles/vpiattenuator/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/vpiattenuator/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
% draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
- \pgfusepath{draw}
\pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
- \pgfusepath{draw}
\pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
\pgfusepath{draw}
-
- \pgfsetarrowsend{latex}
+ \pgfcirc@set@arrows{tunable}{}{latex}
\pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
\pgfusepath{draw}
}
-
%% T attenuator
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/tattenuator/width}}
{tattenuator}
{\ctikzvalof{bipoles/tattenuator/width}}
{\ctikzvalof{bipoles/tattenuator/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/tattenuator/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
% draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
- \pgfusepath{draw}
\pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
\pgfusepath{draw}
}
-
%% variable T attenuator
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/vtattenuator/width}}
{vtattenuator}
{\ctikzvalof{bipoles/vtattenuator/width}}
{\ctikzvalof{bipoles/vtattenuator/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/vtattenuator/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
% draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
- \pgfusepath{draw}
\pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
\pgfusepath{draw}
-
- \pgfsetarrowsend{latex}
+ \pgfcirc@set@arrows{tunable}{}{latex}
\pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
\pgfusepath{draw}
}
-
%% phase shifter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/phaseshifter/width}}
{phaseshifter}
{\ctikzvalof{bipoles/phaseshifter/width}}
{\ctikzvalof{bipoles/phaseshifter/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/phaseshifter/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
% inner symbol
\pgf@circ@text@strokecolor
\pgftext[center,x=0,y=0]{\Large$\varphi$}
}
-
%% variable phase shifter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{}
{\ctikzvalof{bipoles/phaseshifter/width}}
{vphaseshifter}
{\ctikzvalof{bipoles/vphaseshifter/width}}
{\ctikzvalof{bipoles/vphaseshifter/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/vphaseshifter/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
\pgfsetlinewidth{\pgfstartlinewidth}
- \pgfsetarrowsend{latex}
+ \pgfcirc@set@arrows{tunable}{}{latex}
\pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0.65\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.65\pgf@circ@res@up}}
\pgfusepath{draw}
% inner symbol
\pgf@circ@text@strokecolor
\pgftext[center,x=0,y=0]{\Large$\varphi$}
-
}
%% detector
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports@norotate{blocks}
{}
{\ctikzvalof{bipoles/detector/width}}
{detector}
{\ctikzvalof{bipoles/detector/width}}
{\ctikzvalof{bipoles/detector/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/detector/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
% draw inner stuff
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{0.8\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0}}
\pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@right}{0}}
\pgfusepath{draw}
-
\ifpgf@circuit@fulldiode
\pgfmathparse{2\pgf@circ@res@up / \pgf@circ@scaled@Rlen / \ctikzvalof{bipoles/generic/width}}
\pgftransformscale{\pgfmathresult}
@@ -1855,414 +1062,360 @@
\pgftransformscale{\pgfmathresult}
\pgfnode{emptydiodeshape}{center}{}{pgf@emptydiode}{\pgfusepath{fill}}
\fi
-
}
+%% converters help function
+\def\pgf@circ@twoport@converter@dc#1#2{%
+ \pgfscope
+ \pgftransformshift{\pgfpoint{#1\pgf@circ@res@step}{#2\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{-0.25\pgf@circ@res@step}{0.125\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.25\pgf@circ@res@step}{0.125\pgf@circ@res@step}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{-0.25\pgf@circ@res@step}{-0.125\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.25\pgf@circ@res@step}{-0.125\pgf@circ@res@step}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
+\def\pgf@circ@twoport@converter@dc@up{%
+ \pgf@circ@twoport@converter@dc{-0.5}{0.5}
+}
+\def\pgf@circ@twoport@converter@dc@down{%
+ \pgf@circ@twoport@converter@dc{0.5}{-0.5}
+}
+\def\pgf@circ@twoport@converter@ac#1#2{%
+ \pgfscope
+ \pgftransformshift{\pgfpoint{#1\pgf@circ@res@step}{#2\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{-.31\pgf@circ@res@step}{0\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
+\def\pgf@circ@twoport@converter@ac@up{%
+ \pgf@circ@twoport@converter@ac{-0.45}{0.5}
+ }
+\def\pgf@circ@twoport@converter@ac@down{%
+ \pgf@circ@twoport@converter@ac{0.45}{-0.5}
+}
+\def\pgf@circ@twoport@converter@tac@up{%
+ \pgf@circ@twoport@converter@ac{-0.45}{0.65}
+ \pgf@circ@twoport@converter@ac{-0.45}{0.5}
+ \pgf@circ@twoport@converter@ac{-0.45}{0.35}
+}
+\def\pgf@circ@twoport@converter@tac@down{%
+ \pgf@circ@twoport@converter@ac{0.45}{-0.65}
+ \pgf@circ@twoport@converter@ac{0.45}{-0.5}
+ \pgf@circ@twoport@converter@ac{0.45}{-0.35}
+}
%% single phase ac/dc converter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{
- \anchor{dc1}{
- \northeast
- \pgf@y=.4\pgf@y
- }
- \anchor{dc2}{
- \northeast
- \pgf@y=-.4\pgf@y
- }
+ % these two are left for backward compatibiliyt
+ \anchor{dc1}{\northeast\pgf@y=.4\pgf@y}
+ \anchor{dc2}{\northeast\pgf@y=-.4\pgf@y}
+ % better
+ \anchor{ac up in}{\northeast\pgf@y=.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{ac down in}{\northeast\pgf@y=-.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{dc up out}{\northeast\pgf@y=.4\pgf@y}
+ \anchor{dc down out}{\northeast\pgf@y=-.4\pgf@y}
}
{\ctikzvalof{bipoles/sacdc/width}}
{sacdc}
{\ctikzvalof{bipoles/sacdc/width}}
{\ctikzvalof{bipoles/sacdc/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/sacdc/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \pgfcirc@twoport@draw@splitline
+ \ifnum\@@rotation<145 % swap dc/ac for "backward" and "up" symbol
+ \pgf@circ@twoport@converter@ac@up
+ \pgf@circ@twoport@converter@dc@down
+ \else
+ \pgf@circ@twoport@converter@dc@up
+ \pgf@circ@twoport@converter@ac@down
\fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- % draw sin wave
- \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- % draw equal sign
- \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.375\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.375\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.625\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.625\pgf@circ@res@step}}
- \pgfusepath{draw}
}
-
-
%% dc/dc converter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{
- \anchor{dc1}{
- \northeast
- \pgf@y=.4\pgf@y
- \pgf@x=-\pgf@x
- }
- \anchor{dc2}{
- \northeast
- \pgf@y=-.4\pgf@y
- \pgf@x=-\pgf@x
- }
+ % these two are left for backward compatibiliyt
+ \anchor{dc1}{\northeast\pgf@y=.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{dc2}{\northeast\pgf@y=-.4\pgf@y\pgf@x=-\pgf@x}
+ % better
+ \anchor{dc up in}{\northeast\pgf@y=.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{dc down in}{\northeast\pgf@y=-.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{dc up out}{\northeast\pgf@y=.4\pgf@y}
+ \anchor{dc down out}{\northeast\pgf@y=-.4\pgf@y}
}
{\ctikzvalof{bipoles/sdcdc/width}}
{sdcdc}
{\ctikzvalof{bipoles/sdcdc/width}}
{\ctikzvalof{bipoles/sdcdc/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/sdcdc/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- % draw equal sign
- \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.375\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.375\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.625\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.625\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- % draw equal sign
- \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.375\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.375\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.625\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.625\pgf@circ@res@step}}
- \pgfusepath{draw}
+ \pgfcirc@twoport@draw@splitline
+ % No need to switch here
+ \pgf@circ@twoport@converter@dc@up
+ \pgf@circ@twoport@converter@dc@down
}
-
-
%% single phase dc/ac converter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{
- \anchor{dc1}{
- \northeast
- \pgf@y=.4\pgf@y
- \pgf@x=-\pgf@x
- }
- \anchor{dc2}{
- \northeast
- \pgf@y=-.4\pgf@y
- \pgf@x=-\pgf@x
- }
+ % these two are left for backward compatibiliyt
+ \anchor{dc1}{\northeast\pgf@y=.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{dc2}{\northeast\pgf@y=-.4\pgf@y\pgf@x=-\pgf@x}
+ % better
+ \anchor{dc up in}{\northeast\pgf@y=.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{dc down in}{\northeast\pgf@y=-.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{ac up out}{\northeast\pgf@y=.4\pgf@y}
+ \anchor{ac down out}{\northeast\pgf@y=-.4\pgf@y}
}
{\ctikzvalof{bipoles/sdcac/width}}
{sdcac}
{\ctikzvalof{bipoles/sdcac/width}}
{\ctikzvalof{bipoles/sdcac/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/sdcac/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \pgfcirc@twoport@draw@splitline
+ \ifnum\@@rotation<145 % swap dc/ac for "backward" and "up" symbol
+ \pgf@circ@twoport@converter@dc@up
+ \pgf@circ@twoport@converter@ac@down
+ \else
+ \pgf@circ@twoport@converter@ac@up
+ \pgf@circ@twoport@converter@dc@down
\fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- % draw sin wave
- \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfusepath{draw}
-
- % draw equal sign
- \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.375\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.375\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.625\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.625\pgf@circ@res@step}}
- \pgfusepath{draw}
}
-
-
+%% single phase ac/ac converter
+\pgfcirc@define@twoports{blocks}
+{
+ \anchor{ac up in}{\northeast\pgf@y=.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{ac down in}{\northeast\pgf@y=-.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{ac up out}{\northeast\pgf@y=.4\pgf@y}
+ \anchor{ac down out}{\northeast\pgf@y=-.4\pgf@y}
+}
+{\ctikzvalof{bipoles/sdcac/width}}
+{sacac}
+{\ctikzvalof{bipoles/sdcac/width}}
+{\ctikzvalof{bipoles/sdcac/width}}
+{
+ \pgfcirc@twoport@draw@splitline
+ \pgf@circ@twoport@converter@ac@up
+ \pgf@circ@twoport@converter@ac@down
+}
%% threephase ac/dc converter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{
- \anchor{dc1}{
- \northeast
- \pgf@y=.4\pgf@y
- }
- \anchor{dc2}{
- \northeast
- \pgf@y=-.4\pgf@y
- }
- \anchor{ac1}{
- \northeast
- \pgf@y=.6\pgf@y
- \pgf@x=-\pgf@x
- }
- \anchor{ac2}{
- \northeast
- \pgf@y=0\pgf@y
- \pgf@x=-\pgf@x
- }
- \anchor{ac3}{
- \northeast
- \pgf@y=-.6\pgf@y
- \pgf@x=-\pgf@x
- }
+ % legacy, let for compatibility
+ \anchor{dc1}{\northeast\pgf@y=.4\pgf@y}
+ \anchor{dc2}{\northeast\pgf@y=-.4\pgf@y}
+ \anchor{ac1}{\northeast\pgf@y=.6\pgf@y\pgf@x=-\pgf@x}
+ \anchor{ac2}{\northeast\pgf@y=0\pgf@y\pgf@x=-\pgf@x}
+ \anchor{ac3}{\northeast\pgf@y=-.6\pgf@y\pgf@x=-\pgf@x}
+ %better
+ \anchor{dc up out}{\northeast\pgf@y=.4\pgf@y}
+ \anchor{dc down out}{\northeast\pgf@y=-.4\pgf@y}
+ \anchor{ac up in}{\northeast\pgf@y=.6\pgf@y\pgf@x=-\pgf@x}
+ \anchor{ac mid in}{\northeast\pgf@y=0\pgf@y\pgf@x=-\pgf@x}
+ \anchor{ac down in}{\northeast\pgf@y=-.6\pgf@y\pgf@x=-\pgf@x}
}
{\ctikzvalof{bipoles/tacdc/width}}
{tacdc}
{\ctikzvalof{bipoles/tacdc/width}}
{\ctikzvalof{bipoles/tacdc/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/tacdc/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \pgfcirc@twoport@draw@splitline
+ \ifnum\@@rotation<145 % swap dc/ac for "backward" and "up" symbol
+ \pgf@circ@twoport@converter@tac@up
+ \pgf@circ@twoport@converter@dc@down
+ \else
+ \pgf@circ@twoport@converter@dc@up
+ \pgf@circ@twoport@converter@tac@down
\fi
-
- % draw outer box
- \pgf@circ@twoportbox
- \pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- % draw sin waves
- \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.65\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.35\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfusepath{draw}
-
-
-
-
- % draw equal sign
- \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.375\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.375\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.625\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.625\pgf@circ@res@step}}
- \pgfusepath{draw}
}
-
-
%% threephase dc/ac converter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports{blocks}
{
- \anchor{dc1}{
- \northeast
- \pgf@y=.4\pgf@y
- \pgf@x=-\pgf@x
- }
- \anchor{dc2}{
- \northeast
- \pgf@y=-.4\pgf@y
- \pgf@x=-\pgf@x
- }
- \anchor{ac1}{
- \northeast
- \pgf@y=.6\pgf@y
- }
- \anchor{ac2}{
- \northeast
- \pgf@y=0\pgf@y
- }
- \anchor{ac3}{
- \northeast
- \pgf@y=-.6\pgf@y
- }
+ % legacy, let for compatibility
+ \anchor{dc1}{\northeast\pgf@y=.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{dc2}{\northeast\pgf@y=-.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{ac1}{\northeast\pgf@y=.6\pgf@y}
+ \anchor{ac2}{\northeast\pgf@y=0\pgf@y}
+ \anchor{ac3}{\northeast\pgf@y=-.6\pgf@y}
+ %better
+ \anchor{dc up in}{\northeast\pgf@y=.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{dc down in}{\northeast\pgf@y=-.4\pgf@y\pgf@x=-\pgf@x}
+ \anchor{ac up out}{\northeast\pgf@y=.6\pgf@y}
+ \anchor{ac mid out}{\northeast\pgf@y=0\pgf@y}
+ \anchor{ac down out}{\northeast\pgf@y=-.6\pgf@y}
}
{\ctikzvalof{bipoles/tdcac/width}}
{tdcac}
{\ctikzvalof{bipoles/tdcac/width}}
{\ctikzvalof{bipoles/tdcac/width}}
{
- \pgf@circ@res@step = \ctikzvalof{bipoles/tdcac/width}\pgf@circ@scaled@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \pgfcirc@twoport@draw@splitline
+ \ifnum\@@rotation<145 % swap dc/ac for "backward" and "up" symbol
+ \pgf@circ@twoport@converter@dc@up
+ \pgf@circ@twoport@converter@tac@down
+ \else
+ \pgf@circ@twoport@converter@tac@up
+ \pgf@circ@twoport@converter@dc@down
\fi
-
+}
+%% threephase ac/ac converter
+\pgfcirc@define@twoports{blocks}
+{
+ \anchor{ac up in}{\northeast\pgf@y=.6\pgf@y\pgf@x=-\pgf@x}
+ \anchor{ac mid in}{\northeast\pgf@y=0\pgf@y\pgf@x=-\pgf@x}
+ \anchor{ac down in}{\northeast\pgf@y=-.6\pgf@y\pgf@x=-\pgf@x}
+ \anchor{ac up out}{\northeast\pgf@y=.6\pgf@y}
+ \anchor{ac mid out}{\northeast\pgf@y=0\pgf@y}
+ \anchor{ac down out}{\northeast\pgf@y=-.6\pgf@y}
+}
+{\ctikzvalof{bipoles/tdcac/width}}
+{tacac}
+{\ctikzvalof{bipoles/tdcac/width}}
+{\ctikzvalof{bipoles/tdcac/width}}
+{
+ \pgfcirc@twoport@draw@splitline
+ \pgf@circ@twoport@converter@tac@down
+ \pgf@circ@twoport@converter@tac@up
+}
+%%%% Non-square blocks. We do not use the standard macros
+%%%% this one is adapted to do the boxed thing
+%
+\long\def\pgfcirc@define@twoports@boxed#1#2#3#4#5#6#7{
+\pgfcircdeclarebipolescaled{#1}
+ {
+ \savedmacro{\componentisboxed}{\edef\componentisboxed{\ifpgf@circuit@boxed 1\else 0\fi}}
+ \pgcirc@twoport@additional@anchors
+ #2
+ }
+ {#3}
+ {#4}
+ {#5}
+ {#6}
+ {
+ \pgf@circ@res@step=#6\pgf@circ@scaled@Rlen %6 is the real width parameter
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-}
+ \pgfcirc@twoport@maybedash
% draw outer box
- \pgf@circ@twoportbox
+ \ifpgf@circuit@boxed
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfnode{blockbox}{center}{}{pgf@box}{\pgfusepath{draw}}
+ \pgf@circ@draworfill
+ \fi
\pgf@circ@inputarrow
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
+ \ifpgf@circuit@boxed
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ % draw solid line for inner symbol if no box is drawn and not fully dashed
+ \ifpgf@circuit@full@dashed\else\pgfsetdash{}{0pt}\fi
+ \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box
+ \else
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \fi
+ #7
+ }
+}
+%% voltage controled oscillator
+\pgfcirc@define@twoports@boxed{blocks}
+{}
+{\ctikzvalof{bipoles/vco/width}}
+{vco}
+{\ctikzvalof{bipoles/twoport/width}}
+{\ctikzvalof{bipoles/vco/width}}
+{
+ % ok, this is a bit of incoherence
+ \divide \pgf@circ@res@step by 2
+ % draw circle
+ \pgfscope
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@step}
+ \pgf@circ@draworfill
+ \endpgfscope
+ \pfgcirc@twoport@rotate@inner@symbol
+ \pgfcirc@twoport@draw@sine{0}{0}
+}
+%% amplifier and vamplifier
+%% Amplifier %% Beware, not using the generic twoport(s) macros.
+\pgfcirc@define@twoports@boxed{blocks}
+{
+ \anchor{up}{%
+ \northeast\pgf@x=0pt\relax
+ \ifnum\componentisboxed=0
+ \pgf@y=0.55\pgf@y
+ \fi
+ }
+ \anchor{down}{%
+ \northeast\pgf@x=0pt\pgf@y=-\pgf@y\relax
+ \ifnum\componentisboxed=0
+ \pgf@y=0.55\pgf@y
+ \fi
+ }
+}
+{\ifpgf@circuit@boxed\ctikzvalof{bipoles/twoport/width}\else\ctikzvalof{bipoles/amp/width}\fi}
+{amp}
+{\ifpgf@circuit@boxed\ctikzvalof{bipoles/twoport/width}\else\ctikzvalof{bipoles/amp/width}\fi}
+{\ifpgf@circuit@boxed\ctikzvalof{bipoles/twoport/width}\else\ctikzvalof{bipoles/amp/width}\fi}
+{
+ % draw triangle
+ \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
+ \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ \pfgcirc@twoport@get@symbol@rotation
+ % draw inner text
+ \pgf@circ@text@strokecolor
+ \ifnum\@@rotation=180
\pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
+ \pgftext[center,x=0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
+ \else
+ \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
+ \fi
+}
+%% variable amplifier %% Beware, not using the generic twoport(s) macros.
+% \pgfcircdeclarebipolescaled{blocks}
+\pgfcirc@define@twoports@boxed{blocks}
+{
+ \anchor{up}{%
+ \northeast\pgf@x=0pt\relax
+ \ifnum\componentisboxed=0
+ \pgf@y=0.55\pgf@y
+ \fi
+ }
+ \anchor{down}{%
+ \northeast\pgf@x=0pt\pgf@y=-\pgf@y\relax
+ \ifnum\componentisboxed=0
+ \pgf@y=0.55\pgf@y
+ \fi
+ }
+}
+{\ifpgf@circuit@boxed\ctikzvalof{bipoles/twoport/width}\else\ctikzvalof{bipoles/amp/width}\fi}
+{vamp}
+{\ifpgf@circuit@boxed\ctikzvalof{bipoles/twoport/width}\else\ctikzvalof{bipoles/amp/width}\fi}
+{\ifpgf@circuit@boxed\ctikzvalof{bipoles/twoport/width}\else\ctikzvalof{bipoles/amp/width}\fi}
+{
+ % draw triangle
+ \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
+ \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ \pfgcirc@twoport@get@symbol@rotation
+ % draw arrow
\pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- % draw sin waves
- \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.65\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.5\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.35\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
- \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
- \pgfusepath{draw}
-
-
-
-
- % draw equal sign
- \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.375\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.375\pgf@circ@res@step}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.625\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.625\pgf@circ@res@step}}
+ \pgfcirc@set@arrows{tunable}{}{latex}
+ \pgfpathmoveto{\pgfpoint{-0.8\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@step}{0.6\pgf@circ@res@step}}
\pgfusepath{draw}
+ % draw inner text
+ \pgf@circ@text@strokecolor
+ \ifnum\@@rotation=180
+ \pgftransformrotate{180}
+ \pgftext[center,x=0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
+ \else
+ \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
+ \fi
}
% %>>>
@@ -2294,8 +1447,10 @@
\pgfcirc@activate@bipole@simple{l}{sacdc}
\pgfcirc@activate@bipole@simple{l}{sdcac}
\pgfcirc@activate@bipole@simple{l}{sdcdc}
+\pgfcirc@activate@bipole@simple{l}{sacac}
\pgfcirc@activate@bipole@simple{l}{tacdc}
\pgfcirc@activate@bipole@simple{l}{tdcac}
+\pgfcirc@activate@bipole@simple{l}{tacac}
% %>>>
%% Node shapes for Block elements %<<<
@@ -2344,6 +1499,13 @@
\anchor{in 2}{\northwest\pgf@y=-\pgf@y\pgf@x=0pt}
\anchor{in2}{\northwest\pgf@y=-\pgf@y\pgf@x=0pt}
\anchor{out}{\northwest\pgf@y=0pt\pgf@x=-\pgf@x}
+ \anchor{left down}{\northwest\pgf@y=-0.5\pgf@y}
+ \anchor{right down}{\northwest\pgf@x=-\pgf@x\pgf@y=-0.5\pgf@y}
+ \anchor{right up}{\northwest\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{left up}{\northwest\pgf@y=0.5\pgf@y}
+ \anchor{text}{\northwest
+ \advance\pgf@y\dimexpr-.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox\relax
+ \pgf@x=-.5\wd\pgfnodeparttextbox\relax}
}
% draw the body rectangle and circle if and when needed
\def\pgf@circ@circular@rf@box@circle{%
@@ -2355,7 +1517,8 @@
% draw outer circle
\ifpgf@circuit@boxed
\pgf@circ@res@step=.7\pgf@circ@res@step
- \pgfsetdash{}{0pt} % draw solid circle if boxed
+ % draw solid line for inner symbol if no box is drawn and not fully dashed
+ \ifpgf@circuit@full@dashed\else\pgfsetdash{}{0pt}\fi
\else
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\fi
@@ -2380,7 +1543,8 @@
\pgfscope
\pgf@circ@circular@rf@box@circle
% draw inner stuff
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ % draw solid line for inner symbol if no box is drawn and not fully dashed
+ \ifpgf@circuit@full@dashed\else\pgfsetdash{}{0pt}\fi
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathmoveto{\pgfpointpolar{135}{0.5\pgf@circ@res@step}}
@@ -2408,7 +1572,8 @@
\pgfscope
\pgf@circ@circular@rf@box@circle
% draw inner stuff
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ % draw solid line for inner symbol if no box is drawn and not fully dashed
+ \ifpgf@circuit@full@dashed\else\pgfsetdash{}{0pt}\fi
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathmoveto{\pgfpointpolar{0}{0.3\pgf@circ@res@step}}
@@ -2443,7 +1608,8 @@
\pgfscope
\pgf@circ@circular@rf@box@circle
% draw inner sine waves
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ % draw solid line for inner symbol if no box is drawn and not fully dashed
+ \ifpgf@circuit@full@dashed\else\pgfsetdash{}{0pt}\fi
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
\pgfpathmoveto{\pgfpoint{-0.3\pgf@circ@res@step}{0\pgf@circ@res@step}}
@@ -2471,7 +1637,8 @@
\pgfscope
\pgf@circ@circular@rf@box@circle
% inner arrow
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ % draw solid line for inner symbol if no box is drawn and not fully dashed
+ \ifpgf@circuit@full@dashed\else\pgfsetdash{}{0pt}\fi
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfsetarrowsend{latex}
\pgfpathmoveto{\pgfpoint{-0.25\pgf@circ@res@step}{0}}
@@ -2494,63 +1661,16 @@
\pgf@x=-\ctikzvalof{quadpoles/gridnode/width}\pgf@circ@scaled@Rlen
\pgf@x=.5\pgf@x
}
- \anchor{center}{
- \pgfpointorigin
- }
-
- \anchor{north}{
- \northwest
- \pgf@x=0pt
- }
- \anchor{up}{
- \northwest
- \pgf@x=0pt
- }
- \anchor{south}{
- \northwest
- \pgf@x=0pt
- \pgf@y=-\pgf@y
- }
- \anchor{down}{
- \northwest
- \pgf@x=0pt
- \pgf@y=-\pgf@y
- }
- \anchor{east}{
- \northwest
- \pgf@y=0pt
- \pgf@x=-\pgf@x
- }
- \anchor{right}{
- \northwest
- \pgf@y=0pt
- \pgf@x=-\pgf@x
- }
- \anchor{west}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{left}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{south west}{
- \northwest
- \pgf@y=-\pgf@y
- }
- \anchor{north east}{
- \northwest
- \pgf@x=-\pgf@x
- \relax
- }
- \anchor{north west}{
- \northwest
- }
- \anchor{south east}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-\pgf@y
- }
+ \pgfcirc@northwest@symmetric@geoanchors
+ \anchor{center}{\pgfpointorigin}
+ \anchor{up}{\northwest\pgf@x=0pt}
+ \anchor{down}{\northwest\pgf@x=0pt\pgf@y=-\pgf@y}
+ \anchor{right}{\northwest\pgf@y=0pt\pgf@x=-\pgf@x}
+ \anchor{left}{\northwest\pgf@y=0pt}
+ \anchor{left down}{\northwest\pgf@y=-0.5\pgf@y}
+ \anchor{right down}{\northwest\pgf@x=-\pgf@x\pgf@y=-0.5\pgf@y}
+ \anchor{right up}{\northwest\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{left up}{\northwest\pgf@y=0.5\pgf@y}
\anchor{text}{
\pgf@x=-2\pgf@x
\advance \pgf@x by -.5\wd\pgfnodeparttextbox
@@ -2559,50 +1679,39 @@
\pgf@circ@draw@component{
\pgf@circ@setcolor
\pgf@circ@scaled@Rlen=\scaledRlen
-
\pgf@circ@res@step=\ctikzvalof{quadpoles/gridnode/width}\pgf@circ@scaled@Rlen
-
\northwest
\pgf@circ@res@up = \pgf@y
\pgf@circ@res@down = -\pgf@y
\pgf@circ@res@right = -\pgf@x
\pgf@circ@res@left = \pgf@x
-
\pgf@circ@res@step = \ctikzvalof{quadpoles/gridnode/width}\pgf@circ@scaled@Rlen
\divide \pgf@circ@res@step by 2
-
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \ifpgf@circuit@dashed
- \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
- \fi
-
+ \pgfcirc@twoport@maybedash
% draw outer box
\pgf@circ@twoportbox
\pgf@circ@inputarrow
-
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
\pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{0.05mm}
-
% draw grid
\foreach \line in {-1,-.5,...,1}
{
\pgfpathmoveto{\pgfpoint{\line\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\line\pgf@circ@res@up}}
-
+ %
\pgfpathmoveto{\pgfpoint{\line\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\line\pgf@circ@res@down}}
}
-
%prevent from draw the inner cross twice
\foreach \line in {-.5,0,...,.5}
{
\pgfpathmoveto{\pgfpoint{\line\pgf@circ@res@right}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\line\pgf@circ@res@up}}
-
+ %
\pgfpathmoveto{\pgfpoint{\line\pgf@circ@res@right}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\line\pgf@circ@res@down}}
}
@@ -2623,59 +1732,19 @@
\pgf@x=.5\pgf@x
\pgf@x=-\ctikzvalof{tripoles/wilkinson/width}\pgf@x
}
- \anchor{center}{
- \northwest
- \pgf@x=0pt
- \pgf@y=0pt
- }
- \anchor{north}{
- \northwest
- \pgf@x=0pt
- }
- \anchor{south}{
- \northwest
- \pgf@x=0pt
- \pgf@y=-\pgf@y
- }
- \anchor{west}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{east}{
- \northwest
- \pgf@y=0pt
- \pgf@x=-\pgf@x
- }
- \anchor{south west}{
- \northwest
- \pgf@y=-\pgf@y
- }
- \anchor{north east}{
- \northwest
- \pgf@x=-\pgf@x
- }
- \anchor{north west}{
- \northwest
- }
- \anchor{south east}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-\pgf@y
- }
- \anchor{in}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{out1}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-0.5\pgf@y
- }
- \anchor{out2}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=0.5\pgf@y
- }
+ \pgfcirc@northwest@symmetric@geoanchors
+ \anchor{up}{\northwest\pgf@x=0pt}
+ \anchor{down}{\northwest\pgf@x=0pt\pgf@y=-\pgf@y}
+ \anchor{right}{\northwest\pgf@y=0pt\pgf@x=-\pgf@x}
+ \anchor{left}{\northwest\pgf@y=0pt}
+ \anchor{center}{\pgfpointorigin}
+ \anchor{in}{\northwest\pgf@y=0pt}
+ \anchor{out1}{\northwest\pgf@x=-\pgf@x\pgf@y=-0.5\pgf@y}
+ \anchor{out2}{\northwest\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{left down}{\northwest\pgf@y=-0.5\pgf@y}
+ \anchor{right down}{\northwest\pgf@x=-\pgf@x\pgf@y=-0.5\pgf@y}
+ \anchor{right up}{\northwest\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{left up}{\northwest\pgf@y=0.5\pgf@y}
\anchor{text}{
\northwest
\advance \pgf@y by 0.5\ht\pgfnodeparttextbox
@@ -2684,20 +1753,17 @@
\pgf@circ@draw@component{
\pgf@circ@setcolor
\pgf@circ@scaled@Rlen=\scaledRlen
-
+ %
\northwest
\pgf@circ@res@up = \pgf@y
\pgf@circ@res@down = -\pgf@y
\pgf@circ@res@right = -\pgf@x
\pgf@circ@res@left = \pgf@x
-
+ %
\pgfstartlinewidth=\pgflinewidth
-
% draw outer box
\pgf@circ@twoportbox
\pgf@circ@inputarrow
-
-
% draw inner stuff
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
\pgfsetarrows{-} %never draw arrows
@@ -2709,15 +1775,12 @@
\pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
\pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
-
\pgfusepath{draw}
-
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
% draw inner resisitor - european or american style is recognised
{
\pgftransformshift{\pgfpoint{0.5\pgf@circ@res@right}{0pt}}
\pgftransformrotate{90}
-
% calculate size of resistor
\ifpgf@circuit@europeanresistor
\pgfmathparse{\pgf@circ@res@up / \pgf@circ@scaled@Rlen / \ctikzvalof{bipoles/generic/width} / 2}
@@ -2729,14 +1792,11 @@
\pgfnode{resistorshape}{center}{}{wilk@int@R}{\pgfusepath{fill}}
\fi
}
-
\pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
\pgfpathlineto{\pgfpointanchor{wilk@int@R}{right}}
-
\pgfpathmoveto{\pgfpointanchor{wilk@int@R}{left}}
\pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
\pgfusepath{draw}
-
}
}
@@ -2746,65 +1806,25 @@
\saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
\savedanchor\northwest{%
\pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
- \pgf@y=\ctikzvalof{tripoles/wilkinson/height}\pgf@circ@scaled@Rlen
+ \pgf@y=\ctikzvalof{tripoles/splitter/height}\pgf@circ@scaled@Rlen
\pgf@y=.5\pgf@y
\pgf@x= \pgf@circ@scaled@Rlen
\pgf@x=.5\pgf@x
- \pgf@x=-\ctikzvalof{tripoles/wilkinson/width}\pgf@x
- }
- \anchor{center}{
- \northwest
- \pgf@x=0pt
- \pgf@y=0pt
- }
- \anchor{north}{
- \northwest
- \pgf@x=0pt
- }
- \anchor{south}{
- \northwest
- \pgf@x=0pt
- \pgf@y=-\pgf@y
- }
- \anchor{west}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{east}{
- \northwest
- \pgf@y=0pt
- \pgf@x=-\pgf@x
- }
- \anchor{south west}{
- \northwest
- \pgf@y=-\pgf@y
- }
- \anchor{north east}{
- \northwest
- \pgf@x=-\pgf@x
- }
- \anchor{north west}{
- \northwest
- }
- \anchor{south east}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-\pgf@y
- }
- \anchor{in}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{out1}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-0.5\pgf@y
- }
- \anchor{out2}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=0.5\pgf@y
+ \pgf@x=-\ctikzvalof{tripoles/splitter/width}\pgf@x
}
+ \pgfcirc@northwest@symmetric@geoanchors
+ \anchor{center}{\pgfpointorigin}
+ \anchor{up}{\northwest\pgf@x=0pt}
+ \anchor{down}{\northwest\pgf@x=0pt\pgf@y=-\pgf@y}
+ \anchor{right}{\northwest\pgf@y=0pt\pgf@x=-\pgf@x}
+ \anchor{left}{\northwest\pgf@y=0pt}
+ \anchor{in}{\northwest\pgf@y=0pt}
+ \anchor{out1}{\northwest\pgf@x=-\pgf@x\pgf@y=-0.5\pgf@y}
+ \anchor{out2}{\northwest\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{left down}{\northwest\pgf@y=-0.5\pgf@y}
+ \anchor{right down}{\northwest\pgf@x=-\pgf@x\pgf@y=-0.5\pgf@y}
+ \anchor{right up}{\northwest\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{left up}{\northwest\pgf@y=0.5\pgf@y}
\anchor{text}{
\northwest
\advance \pgf@y by 0.5\ht\pgfnodeparttextbox
@@ -2813,15 +1833,14 @@
\pgf@circ@draw@component{
\pgf@circ@setcolor
\pgf@circ@scaled@Rlen=\scaledRlen
-
+ %
\northwest
\pgf@circ@res@up = \pgf@y
\pgf@circ@res@down = -\pgf@y
\pgf@circ@res@right = -\pgf@x
\pgf@circ@res@left = \pgf@x
-
+ %
\pgfstartlinewidth=\pgflinewidth
-
% draw outer box
\pgf@circ@twoportbox
\pgf@circ@inputarrow
@@ -2836,9 +1855,8 @@
\pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
\pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
-
\pgfusepath{draw}
-
+ %
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
% draw inner resisitors - european or american style is recognised
\foreach \respt/\resang/\linepta/\lineptb in %
@@ -2852,7 +1870,6 @@
{
\pgftransformshift{\respt}
\pgftransformrotate{\resang}
-
% calculate size of resistor
\ifpgf@circuit@europeanresistor
\pgfmathparse{\pgf@circ@res@up / \pgf@circ@scaled@Rlen / \ctikzvalof{bipoles/generic/width} / 2}
@@ -2864,10 +1881,8 @@
\pgfnode{resistorshape}{center}{}{wilk@int@R}{\pgfusepath{fill}}
\fi
}
-
\pgfpathmoveto{\linepta}
\pgfpathlineto{\pgfpointanchor{wilk@int@R}{right}}
-
\pgfpathmoveto{\pgfpointanchor{wilk@int@R}{left}}
\pgfpathlineto{\lineptb}
\pgfusepath{draw}
@@ -2875,17 +1890,81 @@
}
}
+%% generic splitter
+\pgfdeclareshape{genericsplitter}{
+ \savedmacro{\ctikzclass}{\edef\ctikzclass{blocks}}
+ \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
+ \savedanchor\northwest{%
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@y=\ctikzvalof{tripoles/genericsplitter/height}\pgf@circ@scaled@Rlen
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgf@circ@scaled@Rlen
+ \pgf@x=.5\pgf@x
+ \pgf@x=-\ctikzvalof{tripoles/genericsplitter/width}\pgf@x
+ }
+ \pgfcirc@northwest@symmetric@geoanchors
+ \anchor{center}{\pgfpointorigin}
+ \anchor{up}{\northwest\pgf@x=0pt}
+ \anchor{down}{\northwest\pgf@x=0pt\pgf@y=-\pgf@y}
+ \anchor{right}{\northwest\pgf@y=0pt\pgf@x=-\pgf@x}
+ \anchor{left}{\northwest\pgf@y=0pt}
+ \anchor{in}{\northwest\pgf@y=0pt}
+ \anchor{out1}{\northwest\pgf@x=-\pgf@x\pgf@y=-0.5\pgf@y}
+ \anchor{out2}{\northwest\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{left down}{\northwest\pgf@y=-0.5\pgf@y}
+ \anchor{right down}{\northwest\pgf@x=-\pgf@x\pgf@y=-0.5\pgf@y}
+ \anchor{right up}{\northwest\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{left up}{\northwest\pgf@y=0.5\pgf@y}
+ \anchor{text}{
+ \northwest
+ \pgf@y=-.5\ht\pgfnodeparttextbox
+ \pgf@x=-.2\wd\pgfnodeparttextbox
+ }
+ \pgf@circ@draw@component{
+ \pgf@circ@setcolor
+ \pgf@circ@scaled@Rlen=\scaledRlen
+ %
+ \northwest
+ \pgf@circ@res@up = \pgf@y
+ \pgf@circ@res@down = -\pgf@y
+ \pgf@circ@res@right = -\pgf@x
+ \pgf@circ@res@left = \pgf@x
+ %
+ \pgfstartlinewidth=\pgflinewidth
+ % draw outer box
+ \pgf@circ@twoportbox
+ \pgf@circ@inputarrow
+ % draw inner stuff
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
+ \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ %
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ % draw inner resisitors - european or american style is recognised
+ \foreach \linepta/\lineptb in %
+ { \pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}/\pgfpoint{0.5\pgf@circ@res@left}{0},%
+ \pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}/\pgfpoint{0.5\pgf@circ@res@left}{0}}
+ {
+ \pgfpathmoveto{\linepta}
+ \pgfpathlineto{\lineptb}
+ \pgfusepath{draw}
+ }
+ }
+}
+
%% couplers generics
\long\def\pgfcircdeclarefourport#1#2{
-
\pgfdeclareshape{#1}{
\savedmacro{\ctikzclass}{\edef\ctikzclass{blocks}}
\saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
- \anchor{center}{
- \northwest
- \pgf@x=0pt
- \pgf@y=0pt
- }
\savedanchor\northwest{%
\pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
\pgf@y=\ctikzvalof{quadpoles/#1/height}\pgf@circ@scaled@Rlen
@@ -2893,95 +1972,25 @@
\pgf@x=.5\pgf@circ@scaled@Rlen
\pgf@x=-\ctikzvalof{quadpoles/#1/width}\pgf@x
}
- \anchor{north}{
- \northwest
- \pgf@x=0pt
- }
- \anchor{south}{
- \northwest
- \pgf@x=0pt
- \pgf@y=-\pgf@y
- }
- \anchor{west}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{east}{
- \northwest
- \pgf@y=0pt
- \pgf@x=-\pgf@x
- }
- \anchor{south west}{
- \northwest
- \pgf@y=-\pgf@y
- }
- \anchor{north east}{
- \northwest
- \pgf@x=-\pgf@x
- }
- \anchor{north west}{
- \northwest
- }
- \anchor{south east}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-\pgf@y
- }
- \anchor{port1}{
- \northwest
- \pgf@y=-0.5\pgf@y
- }
- \anchor{port2}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-0.5\pgf@y
- }
- \anchor{port3}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=0.5\pgf@y
- }
- \anchor{port4}{
- \northwest
- \pgf@y=0.5\pgf@y
- }
- \anchor{left down}{
- \northwest
- \pgf@y=-0.5\pgf@y
- }
- \anchor{right down}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-0.5\pgf@y
- }
- \anchor{right up}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=0.5\pgf@y
- }
- \anchor{left up}{
- \northwest
- \pgf@y=0.5\pgf@y
- }
- \anchor{1}{
- \northwest
- \pgf@y=-0.5\pgf@y
- }
- \anchor{2}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-0.5\pgf@y
- }
- \anchor{3}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=0.5\pgf@y
- }
- \anchor{4}{
- \northwest
- \pgf@y=0.5\pgf@y
- }
-
+ \pgfcirc@northwest@symmetric@geoanchors
+ \anchor{center}{\pgfpointorigin}
+ \anchor{up}{\northwest\pgf@x=0pt}
+ \anchor{down}{\northwest\pgf@x=0pt\pgf@y=-\pgf@y}
+ \anchor{right}{\northwest\pgf@y=0pt\pgf@x=-\pgf@x}
+ \anchor{left}{\northwest\pgf@y=0pt}
+ \anchor{port1}{\northwest\pgf@y=-0.5\pgf@y}
+ \anchor{port2}{\northwest\pgf@x=-\pgf@x\pgf@y=-0.5\pgf@y}
+ \anchor{port3}{\northwest\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{port4}{\northwest\pgf@y=0.5\pgf@y}
+ \anchor{left down}{\northwest\pgf@y=-0.5\pgf@y}
+ \anchor{right down}{\northwest\pgf@x=-\pgf@x\pgf@y=-0.5\pgf@y}
+ \anchor{right up}{\northwest\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{left up}{\northwest\pgf@y=0.5\pgf@y}
+ %1,2,3,4 are deprecated
+ \anchor{1}{\northwest\pgf@y=-0.5\pgf@y}
+ \anchor{2}{\northwest\pgf@x=-\pgf@x\pgf@y=-0.5\pgf@y}
+ \anchor{3}{\northwest\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{4}{\northwest\pgf@y=0.5\pgf@y}
\anchor{text}{
\northwest
\advance \pgf@y by 0.5\ht\pgfnodeparttextbox
@@ -2989,16 +1998,14 @@
}
\pgf@circ@draw@component{
\pgf@circ@setcolor
-
\northwest
\pgf@circ@res@up = \pgf@y
\pgf@circ@res@down = -\pgf@y
\pgf@circ@res@right = -\pgf@x
\pgf@circ@res@left = \pgf@x
\pgf@circ@scaled@Rlen=\scaledRlen
-
+ %
\pgfstartlinewidth=\pgflinewidth
-
% draw outer box
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -3081,58 +2088,11 @@
\pgf@x=.5\pgf@x
\pgf@x=-\ctikzvalof{tripoles/mzm/width}\pgf@x
}
- \anchor{center}{
- \northwest
- \pgf@x=0pt
- \pgf@y=0pt
- }
- \anchor{north}{
- \northwest
- \pgf@x=0pt
- }
- \anchor{south}{
- \northwest
- \pgf@x=0pt
- \pgf@y=-\pgf@y
- }
- \anchor{west}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{east}{
- \northwest
- \pgf@y=0pt
- \pgf@x=-\pgf@x
- }
- \anchor{south west}{
- \northwest
- \pgf@y=-\pgf@y
- }
- \anchor{north east}{
- \northwest
- \pgf@x=-\pgf@x
- }
- \anchor{north west}{
- \northwest
- }
- \anchor{south east}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-\pgf@y
- }
- \anchor{in}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{mod}{
- \northwest
- \pgf@x=0pt
- }
- \anchor{out}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=0pt
- }
+ \pgfcirc@northwest@symmetric@geoanchors
+ \anchor{center}{\pgfpointorigin}
+ \anchor{in}{ \northwest \pgf@y=0pt }
+ \anchor{mod}{ \northwest \pgf@x=0pt }
+ \anchor{out}{ \northwest \pgf@x=-\pgf@x \pgf@y=0pt }
\anchor{text}{
\northwest
\advance \pgf@y by 0.5\ht\pgfnodeparttextbox
@@ -3141,74 +2101,50 @@
\pgf@circ@draw@component{
\pgf@circ@setcolor
\pgf@circ@scaled@Rlen=\scaledRlen
-
\northwest
\pgf@circ@res@up = \pgf@y
\pgf@circ@res@down = -\pgf@y
\pgf@circ@res@right = -\pgf@x
\pgf@circ@res@left = \pgf@x
-
\pgfstartlinewidth=\pgflinewidth
-
% draw outer box
\pgf@circ@twoportbox
\pgf@circ@inputarrow
-
% draw inner stuff
- % rotate inner symbol
- \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
- \pgftransformrotate{270}
- \fi\fi
- \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
- \pgftransformrotate{180}
- \fi\fi
- \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
- \pgftransformrotate{90}
- \fi\fi
-
- % draw inner symbol
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
- \pgfsetarrows{-} %never draw arrows
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@down}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
- \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@right}{\pgf@circ@res@zero}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@right}{\pgf@circ@res@zero}}
- \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@right}{\pgf@circ@res@zero}}
- \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@down}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{0.35\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0.25\pgf@circ@res@right}{0.1\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- }
+ \pfgcirc@twoport@rotate@inner@symbol
+ % draw inner symbol
+ \ifpgf@circuit@full@dashed\else\pgfsetdash{}{0pt}\fi
+ \pgfsetarrows{-} %never draw arrows
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ %
+ \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@up}}
+ %
+ \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@down}}
+ %
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ %
+ \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}}
+ %
+ \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}}
+ %
+ \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@up}}
+ %
+ \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@down}}
+ %
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{0.35\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.25\pgf@circ@res@right}{0.1\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ }
}
% %>>>