summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-08-08 03:01:09 +0000
committerNorbert Preining <norbert@preining.info>2020-08-08 03:01:09 +0000
commit1c9455caf30309c8b8ba69afdc5a16a83d9f9a58 (patch)
tree0bc3971e599005a7420c53782539e789de57b40d /graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
parent3710c23789342d9d88783cbe9ad23eb5263a7c33 (diff)
CTAN sync 202008080301
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex')
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex324
1 files changed, 324 insertions, 0 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
index 692b6ec40c..d889f4ab0a 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
@@ -369,6 +369,11 @@
\northwest
\pgf@y=0pt
}
+ \anchor{right}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
\anchor{1}{
\northwest
\pgf@y=0pt
@@ -437,6 +442,33 @@
\northwest
\pgf@x=0pt
}
+ \anchor{e}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{w}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{s}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{n}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{down}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{up}{
+ \northwest
+ \pgf@x=0pt
+ }
\anchor{south west}{
\northwest
\pgf@y=-\pgf@y
@@ -453,6 +485,12 @@
\pgf@x=-\pgf@x
\pgf@y=-\pgf@y
}
+ \anchorborder{
+ \pgf@circ@res@left=\pgf@x
+ \pgf@circ@res@up=\pgf@y
+ \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
+ }{\pgfpoint{\ctikzvalof{tripoles/mixer/width}*\scaledRlen/2}{\ctikzvalof{tripoles/mixer/width}*\scaledRlen/2}}
+ }
\backgroundpath{
\pgfsetcolor{\ctikzvalof{color}}
\pgf@circ@scaled@Rlen=\scaledRlen
@@ -517,6 +555,11 @@
\northwest
\pgf@y=0pt
}
+ \anchor{right}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
\anchor{1}{
\northwest
\pgf@y=0pt
@@ -585,6 +628,33 @@
\northwest
\pgf@x=0pt
}
+ \anchor{e}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{w}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{s}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{n}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{down}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{up}{
+ \northwest
+ \pgf@x=0pt
+ }
\anchor{south west}{
\northwest
\pgf@y=-\pgf@y
@@ -601,6 +671,12 @@
\pgf@x=-\pgf@x
\pgf@y=-\pgf@y
}
+ \anchorborder{
+ \pgf@circ@res@left=\pgf@x
+ \pgf@circ@res@up=\pgf@y
+ \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
+ }{\pgfpoint{\ctikzvalof{tripoles/adder/width}*\scaledRlen/2}{\ctikzvalof{tripoles/adder/width}*\scaledRlen/2}}
+ }
\backgroundpath{
\pgfsetcolor{\ctikzvalof{color}}
\pgf@circ@scaled@Rlen=\scaledRlen
@@ -679,6 +755,51 @@
\northwest
\pgf@y=0pt
}
+ \anchor{up}{
+ \northwest
+ \pgf@x=.5\pgf@x
+ }
+ \anchor{down}{
+ \northwest
+ \pgf@x=.5\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \anchor{n}{
+ \northwest
+ \pgf@x=.5\pgf@x
+ }
+ \anchor{s}{
+ \northwest
+ \pgf@x=.5\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \anchor{e}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=0pt
+ }
+ \anchor{w}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{up}{
+ \northwest
+ \pgf@x=.5\pgf@x
+ }
+ \anchor{down}{
+ \northwest
+ \pgf@x=.5\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \anchor{right}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=0pt
+ }
+ \anchor{left}{
+ \northwest
+ \pgf@y=0pt
+ }
\anchor{south west}{ \northwest \pgf@y=-\pgf@y}
\anchor{north east}{ \northwest \pgf@x=0pt\relax}
\anchor{north west}{ \northwest }
@@ -688,6 +809,13 @@
\advance \pgf@x by -.5\wd\pgfnodeparttextbox
\advance \pgf@y by -1.5\ht\pgfnodeparttextbox
}
+ \anchorborder{
+ \pgf@circ@res@left=\pgf@x
+ \pgf@circ@res@up=\pgf@y
+ \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
+ }{\pgfpoint{\ctikzvalof{tripoles/oscillator/width}*\scaledRlen/2}{\ctikzvalof{tripoles/oscillator/width}*\scaledRlen/2}}
+ \pgfmathsetlength{\pgf@x}{\pgf@x-\ctikzvalof{tripoles/oscillator/width}*\scaledRlen/2}
+ }
\backgroundpath{
\pgfsetcolor{\ctikzvalof{color}}
\pgf@circ@scaled@Rlen=\scaledRlen
@@ -755,6 +883,11 @@
\northwest
\pgf@y=0pt
}
+ \anchor{right}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
\anchor{1}{
\northwest
\pgf@y=0pt
@@ -787,6 +920,33 @@
\northwest
\pgf@x=0pt
}
+ \anchor{e}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{w}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{s}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{n}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{down}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{up}{
+ \northwest
+ \pgf@x=0pt
+ }
\anchor{south west}{
\northwest
\pgf@y=-\pgf@y
@@ -803,6 +963,12 @@
\pgf@x=-\pgf@x
\pgf@y=-\pgf@y
}
+ \anchorborder{
+ \pgf@circ@res@left=\pgf@x
+ \pgf@circ@res@up=\pgf@y
+ \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
+ }{\pgfpoint{\ctikzvalof{tripoles/circulator/width}*\scaledRlen/2}{\ctikzvalof{tripoles/circulator/width}*\scaledRlen/2}}
+ }
\backgroundpath{
\pgfsetcolor{\ctikzvalof{color}}
\pgf@circ@scaled@Rlen=\scaledRlen
@@ -1175,6 +1341,24 @@
\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
@@ -1282,3 +1466,143 @@
\endpgfscope
}
+% mach zehnder modulator
+\pgfdeclareshape{mzm}{
+ \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/mzm/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/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
+ }
+ \anchor{text}{
+ \northwest
+ \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
+ \pgf@x=-.5\wd\pgfnodeparttextbox
+ }
+ \backgroundpath{
+ \pgfsetcolor{\ctikzvalof{color}}
+ \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
+
+ % 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}
+
+ }
+}