Debian Codegraph @

texmf-dist/tex/context/third/circuitikz/t-circuitikz-0.8.3.tex

raw
1 \def\pgfcircversion{0.8.3}
2 \def\pgfcircversiondate{2017/05/28}
3 \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
4
5 \usemodule[tikz]
6
7 \startmodule[circuitikzgit-0.8.3]
8 \usetikzlibrary[calc]
9 \usetikzlibrary[arrows]
10
11 \unprotect
12
13 \edef\tikzatcode{\the\catcode`\@}
14 \edef\tikzbarcode{\the\catcode`\|}
15 \edef\tikzexclaimcode{\the\catcode`\!}
16 \catcode`\@=11
17 \catcode`\|=12
18 \catcode`\!=12
19
20 %%%%%%%%%%% Springe nach tex/pgfcirc.defines
21 %%%---------- open: tex/pgfcirc.defines.tex
22
23 %% Options
24
25 %%%%%%%%%%%%
26 %% Dimensions
27
28 % coordinates
29 \newdimen\pgf@circ@res@up
30 \newdimen\pgf@circ@res@down
31 \newdimen\pgf@circ@res@zero
32 \newdimen\pgf@circ@res@left
33 \newdimen\pgf@circ@res@right
34 \newdimen\pgf@circ@res@other
35 \newdimen\pgf@circ@res@step
36 \newdimen\pgf@circ@res@temp
37 % inital thickness
38 \newdimen \pgfstartlinewidth
39 %% Keys
40
41 \long\def\pgf@circ@comment#1{}
42
43 \def\circuitikzbasekey{/tikz/circuitikz}
44
45 \pgfkeys{\circuitikzbasekey/.is family}
46
47 \def\circuitikzset#1{\pgfkeys{\circuitikzbasekey,#1}}
48 \let\ctikzset\circuitikzset
49 \def\ctikzvalof#1{\pgfkeysvalueof{\circuitikzbasekey/#1}}
50 \def\ctikzsetvalof#1#2{\pgfkeyssetvalue{\circuitikzbasekey/#1}{#2}}
51
52 \newif\ifpgf@circ@siunitx
53 \newif\ifpgf@circuit@compat
54 \newif\ifpgf@circ@oldvoltagedirection
55
56 % Option ">" for twoports
57 \newif\ifpgf@circuit@inputarrow
58 \ctikzset{>/.add code={}{\pgf@circuit@inputarrowtrue}}
59 \ctikzset{inputarrow/.is choice}
60 \ctikzset{inputarrow/true/.code={\pgf@circuit@inputarrowtrue}}
61 \ctikzset{inputarrow/false/.code={\pgf@circuit@inputarrowfalse}}
62
63 % Option "boxed" for nodes and twoports
64 \newif\ifpgf@circuit@boxed
65 \pgfkeys{/tikz/boxed/.add code={}{\pgf@circuit@boxedtrue}}
66 \ctikzset{boxed/.add code={}{\pgf@circuit@boxedtrue}}
67 \pgfkeys{/tikz/box/.add code={}{\pgf@circuit@boxedtrue}}
68 \ctikzset{box/.add code={}{\pgf@circuit@boxedtrue}}
69
70 % Option "dashed" for nodes and twoports
71 \newif\ifpgf@circuit@dashed
72 \pgfkeys{/tikz/dashed/.add code={}{\pgf@circuit@dashedtrue}}
73 \ctikzset{dashed/.add code={}{\pgf@circuit@dashedtrue}}
74
75 % Option "t=*" for nodes
76 \pgfkeys{/tikz/t/.add code={}{\ctikzset{text=#1}}}
77
78
79
80 \ctikzset{bipoles/.is family}
81 \ctikzset{bipoles/border margin/.initial=1.1}
82 \ctikzset{bipoles/thickness/.initial=2}
83 \ctikzset{nodes width/.initial=.04}
84 \newdimen\pgf@circ@Rlen
85 \ctikzset{bipoles/length/.code={\pgf@circ@Rlen = #1}}
86 \pgf@circ@Rlen = 1.4cm
87
88 \ctikzset{monopoles/.is family}
89 \ctikzset{monopoles/ground/width/.initial=.25}
90 \ctikzset{monopoles/tground/thickness/.initial=3}
91 \ctikzset{monopoles/vcc/width/.initial=.2}
92 \ctikzset{monopoles/match/width/.initial=.4}
93 \ctikzset{monopoles/chassis/width/.initial=.25}
94 \ctikzset{monopoles/alternative chassis/width/.initial=.25}
95 \ctikzset{monopoles/equipotentiality/width/.initial=.25}
96 \ctikzset{monopoles/tlinestub/width/.initial=.25}
97 \ctikzset{monopoles/antenna/width/.initial=.25}
98 \ctikzset{monopoles/antenna/label/xanchor/.initial=.4}
99 \ctikzset{monopoles/antenna/label/yanchor/.initial=.75}
100 \ctikzset{monopoles/txantenna/label/xanchor/.initial=.4}
101 \ctikzset{monopoles/txantenna/label/yanchor/.initial=.75}
102 \ctikzset{monopoles/txantenna/width/.initial=.25}
103 \ctikzset{monopoles/rxantenna/label/xanchor/.initial=.4}
104 \ctikzset{monopoles/rxantenna/label/yanchor/.initial=.75}
105 \ctikzset{monopoles/rxantenna/width/.initial=.25}
106
107 \ctikzset{bipoles/resistor/height/.initial=.3}
108 \ctikzset{bipoles/resistor/width/.initial=.8}
109 \ctikzset{bipoles/potentiometer/height/.initial=.8}
110 \ctikzset{bipoles/potentiometer/height 2/.initial=.3}
111 \ctikzset{bipoles/potentiometer/width/.initial=.8}
112 \ctikzset{bipoles/photoresistor/height/.initial=.6}
113 \ctikzset{bipoles/photoresistor/height 2/.initial=.3}
114 \ctikzset{bipoles/photoresistor/width/.initial=.8}
115 \ctikzset{bipoles/thermistor/main/.initial=.7}
116 \ctikzset{bipoles/thermistor/height/.initial=.428}%.3/.7
117 \ctikzset{bipoles/thermistorntc/width/.initial=.8}
118 \ctikzset{bipoles/thermistorntc/main/.initial=.7}
119 \ctikzset{bipoles/thermistorntc/height/.initial=.428}%.3/.7
120 \ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.3/.7
121 \ctikzset{bipoles/thermistorptc/width/.initial=.8}
122 \ctikzset{bipoles/thermistorptc/main/.initial=.7}
123 \ctikzset{bipoles/thermistorptc/height/.initial=.428}%.3/.7
124 \ctikzset{bipoles/thermistorptc/height 2/.initial=.75}%.3/.7
125 \ctikzset{bipoles/thermistor/width/.initial=.8}
126 \ctikzset{bipoles/varistor/main/.initial=.7}
127 \ctikzset{bipoles/varistor/height/.initial=.428}%.3/.7
128 \ctikzset{bipoles/varistor/width/.initial=.8}
129 \ctikzset{bipoles/vresistor/height/.initial=.6}
130 \ctikzset{bipoles/vresistor/width/.initial=.8}
131 \ctikzset{bipoles/cuteinductor/height/.initial=.3}
132 \ctikzset{bipoles/cuteinductor/lower coil height/.initial=.15}
133 \ctikzset{bipoles/cuteinductor/width/.initial=.6}
134 \ctikzset{bipoles/cuteinductor/coils/.initial=5}
135 \ctikzset{bipoles/cuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
136 \ctikzset{bipoles/americaninductor/height/.initial=.3}
137 \ctikzset{bipoles/americaninductor/height 2/.initial=.1}
138 \ctikzset{bipoles/americaninductor/width/.initial=.8}
139 \ctikzset{bipoles/americaninductor/coils/.initial=4}
140 \ctikzset{bipoles/americaninductor/coil height/.initial=.15}
141 \ctikzset{bipoles/vcuteinductor/height/.initial=.6}
142 \ctikzset{bipoles/vcuteinductor/lower coil height/.initial=.3}
143 \ctikzset{bipoles/vcuteinductor/width/.initial=.6}
144 \ctikzset{bipoles/vcuteinductor/coils/.initial=5}
145 \ctikzset{bipoles/vcuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
146 \ctikzset{bipoles/vamericaninductor/height/.initial=.6}
147 \ctikzset{bipoles/vamericaninductor/height 2/.initial=.2}
148 \ctikzset{bipoles/vamericaninductor/width/.initial=.8}
149 \ctikzset{bipoles/vamericaninductor/coils/.initial=4}
150 \ctikzset{bipoles/vamericaninductor/coil height/.initial=.15}
151 \ctikzset{bipoles/esource/height/.initial=.60}
152 \ctikzset{bipoles/esource/width/.initial=.60}
153 \ctikzset{bipoles/pvsource/height/.initial=.60}
154 \ctikzset{bipoles/pvsource/width/.initial=.60}
155 \ctikzset{bipoles/isource/height/.initial=.60}
156 \ctikzset{bipoles/isource/width/.initial=.60}
157 \ctikzset{bipoles/oosource/height/.initial=.60}
158 \ctikzset{bipoles/oosource/width/.initial=.60}
159 \ctikzset{bipoles/oosource/circlesize/.initial=.65}%circlesize+circleoffset should be =1
160 \ctikzset{bipoles/oosource/circleoffset/.initial=.35}%circlesize+circleoffset should be =1
161 \ctikzset{bipoles/dcisource/height/.initial=.60}
162 \ctikzset{bipoles/dcisource/width/.initial=.60}
163 \ctikzset{bipoles/dcvsource/height/.initial=.60}
164 \ctikzset{bipoles/dcvsource/width/.initial=.60}
165 \ctikzset{bipoles/vsourcetri/height/.initial=.60}
166 \ctikzset{bipoles/vsourcetri/width/.initial=.60}
167 \ctikzset{bipoles/isourceam/height/.initial=.60}
168 \ctikzset{bipoles/isourceam/width/.initial=.60}
169 \ctikzset{bipoles/vsource/height/.initial=.60}
170 \ctikzset{bipoles/vsource/width/.initial=.60}
171 \ctikzset{bipoles/vsourceam/height/.initial=.60}
172 \ctikzset{bipoles/vsourceam/width/.initial=.60}
173 \ctikzset{bipoles/vsourceam/margin/.initial=.7}
174 \ctikzset{bipoles/isourcesin/height/.initial=.60}
175 \ctikzset{bipoles/isourcesin/width/.initial=.60}
176 \ctikzset{bipoles/vsourcesin/height/.initial=.60}
177 \ctikzset{bipoles/vsourcesin/width/.initial=.60}
178 \ctikzset{bipoles/vsourcesquare/height/.initial=.60}
179 \ctikzset{bipoles/vsourcesquare/width/.initial=.60}
180 \ctikzset{bipoles/cisource/height/.initial=.7}
181 \ctikzset{bipoles/cisource/width/.initial=.7}
182 \ctikzset{bipoles/cisourceam/height/.initial=.7}
183 \ctikzset{bipoles/cisourceam/width/.initial=.7}
184 \ctikzset{bipoles/cvsource/height/.initial=.7}
185 \ctikzset{bipoles/cvsource/width/.initial=.7}
186 \ctikzset{bipoles/cvsourceam/height/.initial=.7}
187 \ctikzset{bipoles/cvsourceam/width/.initial=.7}
188 \ctikzset{bipoles/cvsourceam/margin/.initial=.7}
189 \ctikzset{bipoles/cvsourceam/text scale/.initial=1}
190 \ctikzset{bipoles/cisourcesin/width/.initial=.7}
191 \ctikzset{bipoles/cvsourcesin/height/.initial=.7}
192 \ctikzset{bipoles/cvsourcesin/width/.initial=.7}
193 \ctikzset{bipoles/capacitor/height/.initial=.6}
194 \ctikzset{bipoles/capacitor/width/.initial=.2}
195 \ctikzset{bipoles/ecapacitor/height/.initial=.5}
196 \ctikzset{bipoles/ecapacitor/width/.initial=.2}
197 \ctikzset{bipoles/ecapacitor/font/.initial= \fontsize{6}{0}\selectfont\boldmath}
198 \ctikzset{bipoles/pcapacitor/height/.initial=.6}
199 \ctikzset{bipoles/pcapacitor/width/.initial=.2}
200 \ctikzset{bipoles/pcapacitor/bend width/.initial=1.1}
201 \ctikzset{bipoles/vcapacitor/height/.initial=.6}
202 \ctikzset{bipoles/vcapacitor/width/.initial=.5}
203 \ctikzset{bipoles/vcapacitor/capacitor width/.initial=.4}
204 \ctikzset{bipoles/piezoelectric/height/.initial=.7}
205 \ctikzset{bipoles/piezoelectric/width/.initial=.5}
206 \ctikzset{bipoles/battery/height/.initial=.6}
207 \ctikzset{bipoles/battery/width/.initial=.3}
208 \ctikzset{bipoles/battery1/height/.initial=.6}
209 \ctikzset{bipoles/battery1/width/.initial=.3}
210 \ctikzset{bipoles/battery2/height/.initial=.6}
211 \ctikzset{bipoles/battery2/width/.initial=.3}
212 \ctikzset{bipoles/diode/height/.initial=.50}
213 \ctikzset{bipoles/diode/width/.initial=.40}
214 \ctikzset{bipoles/varcap/height/.initial=.50}
215 \ctikzset{bipoles/varcap/width/.initial=.45}
216 \ctikzset{bipoles/spst/height/.initial=.35}
217 \ctikzset{bipoles/spst/width/.initial=.35}
218 \ctikzset{bipoles/spst/depth/.initial=.2}
219 \ctikzset{bipoles/nos/height/.initial=.3}
220 \ctikzset{bipoles/nos/width/.initial=.35}
221 \ctikzset{bipoles/ncs/height/.initial=.35}
222 \ctikzset{bipoles/ncs/width/.initial=.35}
223 \ctikzset{bipoles/generic/height/.initial=.30}
224 \ctikzset{bipoles/generic/width/.initial=.80}
225 \ctikzset{bipoles/european gas filled surge arrester/height/.initial=.30}
226 \ctikzset{bipoles/european gas filled surge arrester/width/.initial=.80}
227 \ctikzset{bipoles/european gas filled surge arrester/inside/.initial=.30}
228 \ctikzset{bipoles/american gas filled surge arrester/height/.initial=.60}
229 \ctikzset{bipoles/american gas filled surge arrester/width/.initial=.60}
230 \ctikzset{bipoles/american gas filled surge arrester/inside/.initial=.15}
231 \ctikzset{bipoles/american gas filled surge arrester/dot x/.initial=.25}
232 \ctikzset{bipoles/american gas filled surge arrester/dot y/.initial=.45}
233 \ctikzset{bipoles/american gas filled surge arrester/size/.initial=.1}
234 \ctikzset{bipoles/fuse/height/.initial=.20}
235 \ctikzset{bipoles/fuse/width/.initial=.50}
236 \ctikzset{bipoles/afuse/height/.initial=.20}
237 \ctikzset{bipoles/afuse/width/.initial=.50}
238 \ctikzset{bipoles/generic potentiometer/height/.initial=.80}
239 \ctikzset{bipoles/generic potentiometer/height 2/.initial=.30}
240 \ctikzset{bipoles/generic potentiometer/width/.initial=.80}
241 \ctikzset{bipoles/ageneric/height/.initial=.30}
242 \ctikzset{bipoles/ageneric/width/.initial=.80}
243 \ctikzset{bipoles/memristor/height/.initial=.30}
244 \ctikzset{bipoles/memristor/wave height/.initial=.5}
245 \ctikzset{bipoles/memristor/width/.initial=.80}
246 \ctikzset{bipoles/tgeneric/height/.initial=.70}
247 \ctikzset{bipoles/tgeneric/width/.initial=.80}
248 \ctikzset{bipoles/tfullgeneric/height/.initial=.70}
249 \ctikzset{bipoles/tfullgeneric/width/.initial=.80}
250 \ctikzset{bipoles/fullgeneric/height/.initial=.30}
251 \ctikzset{bipoles/fullgeneric/width/.initial=.80}
252 \ctikzset{bipoles/open/height/.initial=.3} %necessary for curly voltages
253 \ctikzset{bipoles/open/width/.initial=.3} %necessary for curly voltages
254 \ctikzset{bipoles/open/voltage/straight label distance/.initial=0}
255 \ctikzset{bipoles/open/voltage/distance from node/.initial=.2}
256 \ctikzset{bipoles/short/height/.initial=0} %dummy height for voltage positioning
257 \ctikzset{bipoles/short/width/.initial=0} %dummy width for voltage positioning
258 %\ctikzset{bipoles/short/voltage/straight label distance/.initial=.2}
259 %\ctikzset{bipoles/short/voltage/distance from node/.initial=.5}
260 \ctikzset{bipoles/ammeter/height/.initial=.60}
261 \ctikzset{bipoles/ammeter/width/.initial=.60}
262 \ctikzset{bipoles/ohmmeter/height/.initial=.60}
263 \ctikzset{bipoles/ohmmeter/width/.initial=.60}
264 \ctikzset{bipoles/voltmeter/height/.initial=.60}
265 \ctikzset{bipoles/voltmeter/width/.initial=.60}
266 \ctikzset{bipoles/buffer/height/.initial=1}
267 \ctikzset{bipoles/buffer/width/.initial=1}
268 \ctikzset{bipoles/not port/width/.initial=1}
269 \ctikzset{bipoles/not port/height/.initial=.8}
270 \ctikzset{bipoles/not port/circle width/.initial=.15}
271 \ctikzset{bipoles/lamp/height/.initial=.60}
272 \ctikzset{bipoles/lamp/width/.initial=.60}
273 \ctikzset{bipoles/tline/height/.initial=.3}
274 \ctikzset{bipoles/tline/width/.initial=.8}
275 \ctikzset{bipoles/squid/height/.initial=.60}
276 \ctikzset{bipoles/squid/width/.initial=.60}
277 \ctikzset{bipoles/barrier/height/.initial=.60}
278 \ctikzset{bipoles/barrier/width/.initial=.60}
279 \ctikzset{bipoles/thermocouple/height/.initial=.250}
280 \ctikzset{bipoles/thermocouple/height 2/.initial=.60}
281 \ctikzset{bipoles/thermocouple/width/.initial=.140}
282 \ctikzset{bipoles/pushbutton/height/.initial=.5}
283 \ctikzset{bipoles/pushbutton/height 2/.initial=.0}
284 \ctikzset{bipoles/pushbutton/width/.initial=.50}
285
286 \ctikzset{bipoles/twoport/width/.initial=.7}
287 \ctikzset{bipoles/twoport/height/.initial=.7}
288 \ctikzset{bipoles/twoport/text/.initial=}
289 \ctikzset{bipoles/vco/width/.initial=.7}
290 \ctikzset{bipoles/bandpass/width/.initial=.7}
291 \ctikzset{bipoles/bandstop/width/.initial=.7}
292 \ctikzset{bipoles/highpass/width/.initial=.7}
293 \ctikzset{bipoles/lowpass/width/.initial=.7}
294 \ctikzset{bipoles/adc/width/.initial=.7}
295 \ctikzset{bipoles/dac/width/.initial=.7}
296 \ctikzset{bipoles/dsp/width/.initial=.7}
297 \ctikzset{bipoles/fft/width/.initial=.7}
298 \ctikzset{bipoles/amp/width/.initial=.7}
299 \ctikzset{bipoles/vamp/width/.initial=.7}
300 \ctikzset{bipoles/piattenuator/width/.initial=.7}
301 \ctikzset{bipoles/vpiattenuator/width/.initial=.7}
302 \ctikzset{bipoles/tattenuator/width/.initial=.7}
303 \ctikzset{bipoles/vtattenuator/width/.initial=.7}
304 \ctikzset{bipoles/phaseshifter/width/.initial=.7}
305 \ctikzset{bipoles/vphaseshifter/width/.initial=.7}
306 \ctikzset{bipoles/detector/width/.initial=.7}
307
308
309 \newif\ifpgf@circuit@trans@depletiontype
310 \pgf@circuit@trans@depletiontypefalse
311
312 \newif\ifpgf@circuit@mos@arrows
313 \ctikzset{tripoles/mos style/.is choice}
314 \ctikzset{tripoles/mos style/no arrows/.code={\pgf@circuit@mos@arrowsfalse}}
315 \ctikzset{tripoles/mos style/arrows/.code={\pgf@circuit@mos@arrowstrue}}
316
317 % Option solderdot for fet
318 \newif\ifpgf@circuit@fet@solderdot
319 \pgfkeys{/tikz/solderdot/.add code={}{\pgf@circuit@fet@solderdottrue}}
320 \ctikzset{solderdot/.add code={}{\pgf@circuit@fet@solderdottrue}}
321 \pgfkeys{/tikz/nosolderdot/.add code={}{\pgf@circuit@fet@solderdotfalse}}
322 \ctikzset{nosolderdot/.add code={}{\pgf@circuit@fet@solderdotfalse}}
323
324 % Option bodydiode for fet
325 \newif\ifpgf@circuit@fet@bodydiode
326 \pgfkeys{/tikz/bodydiode/.add code={}{\pgf@circuit@fet@bodydiodetrue}}
327 \ctikzset{bodydiode/.add code={}{\pgf@circuit@fet@bodydiodetrue}}
328 \pgfkeys{/tikz/nobodydiode/.add code={}{\pgf@circuit@fet@bodydiodefalse}}
329 \ctikzset{nobodydiode/.add code={}{\pgf@circuit@fet@bodydiodefalse}}
330
331 % Option draw fet without gate connection
332 \newif\ifpgf@circuit@bpt@drawgate
333 \pgf@circuit@bpt@drawgatetrue
334 \pgfkeys{/tikz/nogate/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
335 \ctikzset{nogate/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
336 \pgfkeys{/tikz/nobase/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
337 \ctikzset{nobase/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
338
339 % Option draw bpt without base connection
340 \newif\ifpgf@circuit@bpt@drawbase
341 \pgf@circuit@bpt@drawbasetrue
342 \pgfkeys{/tikz/nobase/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
343 \ctikzset{nobase/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
344 \pgfkeys{/tikz/nogate/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
345 \ctikzset{nogate/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
346
347 % Option draw bpt with optical input
348 \newif\ifpgf@circuit@bpt@drawphoto
349 \pgf@circuit@bpt@drawphotofalse
350 \pgfkeys{/tikz/photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
351 \ctikzset{photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
352 \pgfkeys{/tikz/photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
353 \ctikzset{photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
354
355 % Option draw pmos with empty circle
356 \newif\ifpgf@circuit@pmos@emptycircle
357 \newif\ifpgf@circuit@pmos@emptycircle
358 \pgf@circuit@pmos@emptycirclefalse
359 \pgfkeys{/tikz/emptycircle/.add code={}{\pgf@circuit@pmos@emptycircletrue}}
360 \ctikzset{tripoles/pmos style/emptycircle/.add code={}{\pgf@circuit@pmos@emptycircletrue}}
361
362
363 \newif\ifpgf@circuit@trans@ntype
364 \pgf@circuit@trans@ntypetrue %default true
365 %\newif\ifpgf@circuit@trans@ptype
366 %\ctikzset{tripoles/nmos/.add code={\pgf@circuit@trans@ntypetrue}}
367 \ctikzset{tripoles/nmos/width/.initial=.7}
368 \ctikzset{tripoles/nmos/gate height/.initial=.35}
369 \ctikzset{tripoles/nmos/base height/.initial=.5}
370 \ctikzset{tripoles/nmos/conn height/.initial=0}
371 \ctikzset{tripoles/nmos/height/.initial=1.1}
372 \ctikzset{tripoles/nmos/base width/.initial=.5}
373 \ctikzset{tripoles/nmos/gate width/.initial=.62}
374 \ctikzset{tripoles/nmos/bodydiode scale/.initial=.3}
375 \ctikzset{tripoles/nmos/bodydiode distance/.initial=.3}
376 \ctikzset{tripoles/nmos/bodydiode conn/.initial=.6}
377 \ctikzset{tripoles/nmos/curr direction/.initial=1}
378
379 \ctikzset{tripoles/pmos/width/.initial=.7}
380 \ctikzset{tripoles/pmos/gate height/.initial=.35}
381 \ctikzset{tripoles/pmos/base height/.initial=.5}
382 \ctikzset{tripoles/pmos/conn height/.initial=0}
383 \ctikzset{tripoles/pmos/height/.initial=1.1}
384 \ctikzset{tripoles/pmos/base width/.initial=.5}
385 \ctikzset{tripoles/pmos/gate width/.initial=.62}
386 \ctikzset{tripoles/pmos/bodydiode scale/.initial=.3}
387 \ctikzset{tripoles/pmos/bodydiode distance/.initial=.3}
388 \ctikzset{tripoles/pmos/bodydiode conn/.initial=.6}
389 \ctikzset{tripoles/pmos/curr direction/.initial=-1}
390
391 \ctikzset{tripoles/nfet/width/.initial=.7}
392 \ctikzset{tripoles/nfet/gate height/.initial=.35}
393 \ctikzset{tripoles/nfet/base height/.initial=.5}
394 \ctikzset{tripoles/nfet/conn height/.initial=0}
395 \ctikzset{tripoles/nfet/height/.initial=1.1}
396 \ctikzset{tripoles/nfet/base width/.initial=.5}
397 \ctikzset{tripoles/nfet/gate width/.initial=.62}
398 \ctikzset{tripoles/nfet/bodydiode scale/.initial=.3}
399 \ctikzset{tripoles/nfet/bodydiode distance/.initial=.3}
400 \ctikzset{tripoles/nfet/bodydiode conn/.initial=.6}
401 \ctikzset{tripoles/nfet/curr direction/.initial=1}
402
403 \ctikzset{tripoles/pfet/width/.initial=.7}
404 \ctikzset{tripoles/pfet/gate height/.initial=.35}
405 \ctikzset{tripoles/pfet/base height/.initial=.5}
406 \ctikzset{tripoles/pfet/conn height/.initial=0}
407 \ctikzset{tripoles/pfet/height/.initial=1.1}
408 \ctikzset{tripoles/pfet/base width/.initial=.5}
409 \ctikzset{tripoles/pfet/gate width/.initial=.62}
410 \ctikzset{tripoles/pfet/bodydiode scale/.initial=.3}
411 \ctikzset{tripoles/pfet/bodydiode distance/.initial=.3}
412 \ctikzset{tripoles/pfet/bodydiode conn/.initial=.6}
413 \ctikzset{tripoles/pfet/curr direction/.initial=-1}
414
415 \ctikzset{tripoles/nigfete/width/.initial=.7}
416 \ctikzset{tripoles/nigfete/gate height/.initial=.35}
417 \ctikzset{tripoles/nigfete/base height/.initial=.5}
418 \ctikzset{tripoles/nigfete/conn height/.initial=.35}
419 \ctikzset{tripoles/nigfete/height/.initial=1.1}
420 \ctikzset{tripoles/nigfete/base width/.initial=.5}
421 \ctikzset{tripoles/nigfete/gate width/.initial=.62}
422 \ctikzset{tripoles/nigfete/bodydiode scale/.initial=.3}
423 \ctikzset{tripoles/nigfete/bodydiode distance/.initial=.3}
424 \ctikzset{tripoles/nigfete/bodydiode conn/.initial=.6}
425 \ctikzset{tripoles/nigfete/curr direction/.initial=1}
426
427 \ctikzset{tripoles/nigfetd/width/.initial=.7}
428 \ctikzset{tripoles/nigfetd/gate height/.initial=.35}
429 \ctikzset{tripoles/nigfetd/base height/.initial=.5}
430 \ctikzset{tripoles/nigfetd/conn height/.initial=.35}
431 \ctikzset{tripoles/nigfetd/height/.initial=1.1}
432 \ctikzset{tripoles/nigfetd/base width/.initial=.5}
433 \ctikzset{tripoles/nigfetd/gate width/.initial=.62}
434 \ctikzset{tripoles/nigfetd/bodydiode scale/.initial=.3}
435 \ctikzset{tripoles/nigfetd/bodydiode distance/.initial=.3}
436 \ctikzset{tripoles/nigfetd/bodydiode conn/.initial=.6}
437 \ctikzset{tripoles/nigfetd/curr direction/.initial=1}
438
439 \ctikzset{tripoles/nigfetebulk/width/.initial=.7}
440 \ctikzset{tripoles/nigfetebulk/gate height/.initial=.35}
441 \ctikzset{tripoles/nigfetebulk/base height/.initial=.5}
442 \ctikzset{tripoles/nigfetebulk/conn height/.initial=.35}
443 \ctikzset{tripoles/nigfetebulk/height/.initial=1.1}
444 \ctikzset{tripoles/nigfetebulk/base width/.initial=.5}
445 \ctikzset{tripoles/nigfetebulk/gate width/.initial=.62}
446 \ctikzset{tripoles/nigfetebulk/bodydiode scale/.initial=.3}
447 \ctikzset{tripoles/nigfetebulk/bodydiode distance/.initial=.3}
448 \ctikzset{tripoles/nigfetebulk/bodydiode conn/.initial=.6}
449 \ctikzset{tripoles/nigfetebulk/curr direction/.initial=1}
450
451 \ctikzset{tripoles/pigfete/width/.initial=.7}
452 \ctikzset{tripoles/pigfete/gate height/.initial=.35}
453 \ctikzset{tripoles/pigfete/base height/.initial=.5}
454 \ctikzset{tripoles/pigfete/conn height/.initial=.35}
455 \ctikzset{tripoles/pigfete/height/.initial=1.1}
456 \ctikzset{tripoles/pigfete/base width/.initial=.5}
457 \ctikzset{tripoles/pigfete/gate width/.initial=.62}
458 \ctikzset{tripoles/pigfete/bodydiode scale/.initial=.3}
459 \ctikzset{tripoles/pigfete/bodydiode distance/.initial=.3}
460 \ctikzset{tripoles/pigfete/bodydiode conn/.initial=.6}
461 \ctikzset{tripoles/pigfete/curr direction/.initial=-1}
462
463 \ctikzset{tripoles/pigfetd/width/.initial=.7}
464 \ctikzset{tripoles/pigfetd/gate height/.initial=.35}
465 \ctikzset{tripoles/pigfetd/base height/.initial=.5}
466 \ctikzset{tripoles/pigfetd/conn height/.initial=.35}
467 \ctikzset{tripoles/pigfetd/height/.initial=1.1}
468 \ctikzset{tripoles/pigfetd/base width/.initial=.5}
469 \ctikzset{tripoles/pigfetd/gate width/.initial=.62}
470 \ctikzset{tripoles/pigfetd/bodydiode scale/.initial=.3}
471 \ctikzset{tripoles/pigfetd/bodydiode distance/.initial=.3}
472 \ctikzset{tripoles/pigfetd/bodydiode conn/.initial=.6}
473 \ctikzset{tripoles/pigfetd/curr direction/.initial=-1}
474
475 \ctikzset{tripoles/pigfetebulk/width/.initial=.7}
476 \ctikzset{tripoles/pigfetebulk/gate height/.initial=.35}
477 \ctikzset{tripoles/pigfetebulk/conn height/.initial=.35}
478 \ctikzset{tripoles/pigfetebulk/base height/.initial=.5}
479 \ctikzset{tripoles/pigfetebulk/height/.initial=1.1}
480 \ctikzset{tripoles/pigfetebulk/base width/.initial=.5}
481 \ctikzset{tripoles/pigfetebulk/gate width/.initial=.62}
482 \ctikzset{tripoles/pigfetebulk/bodydiode scale/.initial=.3}
483 \ctikzset{tripoles/pigfetebulk/bodydiode distance/.initial=.3}
484 \ctikzset{tripoles/pigfetebulk/bodydiode conn/.initial=.6}
485 \ctikzset{tripoles/pigfetebulk/curr direction/.initial=-1}
486
487 \ctikzset{tripoles/npn/width/.initial=.6}
488 \ctikzset{tripoles/npn/base height/.initial=.45}
489 \ctikzset{tripoles/npn/base height 2/.initial=.15}
490 \ctikzset{tripoles/npn/base height/.initial=.4}
491 \ctikzset{tripoles/npn/conn height/.initial=0}
492 \ctikzset{tripoles/npn/height/.initial=1.1}
493 \ctikzset{tripoles/npn/base width/.initial=.5}
494 \ctikzset{tripoles/npn/bodydiode scale/.initial=.3}
495 \ctikzset{tripoles/npn/bodydiode distance/.initial=.3}
496 \ctikzset{tripoles/npn/bodydiode conn/.initial=.6}
497 \ctikzset{tripoles/npn/curr direction/.initial=1}
498
499 \ctikzset{tripoles/pnp/width/.initial=.6}
500 \ctikzset{tripoles/pnp/base height/.initial=.45}
501 \ctikzset{tripoles/pnp/base height 2/.initial=.15}
502 \ctikzset{tripoles/pnp/base height/.initial=.4}
503 \ctikzset{tripoles/pnp/conn height/.initial=0}
504 \ctikzset{tripoles/pnp/height/.initial=1.1}
505 \ctikzset{tripoles/pnp/base width/.initial=.5}
506 \ctikzset{tripoles/pnp/bodydiode scale/.initial=.3}
507 \ctikzset{tripoles/pnp/bodydiode distance/.initial=.3}
508 \ctikzset{tripoles/pnp/bodydiode conn/.initial=.6}
509 \ctikzset{tripoles/pnp/curr direction/.initial=-1}
510
511 \ctikzset{tripoles/pigbt/width/.initial=.6}
512 \ctikzset{tripoles/pigbt/gate height/.initial=.45}
513 \ctikzset{tripoles/pigbt/gate height 2/.initial=.15}
514 \ctikzset{tripoles/pigbt/base height/.initial=.4}
515 \ctikzset{tripoles/pigbt/conn height/.initial=0}
516 \ctikzset{tripoles/pigbt/height/.initial=1.1}
517 \ctikzset{tripoles/pigbt/gate width/.initial=.62}
518 \ctikzset{tripoles/pigbt/base width/.initial=.5}
519 \ctikzset{tripoles/pigbt/bodydiode scale/.initial=.3}
520 \ctikzset{tripoles/pigbt/bodydiode distance/.initial=.3}
521 \ctikzset{tripoles/pigbt/bodydiode conn/.initial=.6}
522 \ctikzset{tripoles/pigbt/curr direction/.initial=-1}
523
524 \ctikzset{tripoles/nigbt/width/.initial=.6}
525 \ctikzset{tripoles/nigbt/gate height/.initial=.45}
526 \ctikzset{tripoles/nigbt/gate height 2/.initial=.15}
527 \ctikzset{tripoles/nigbt/base height/.initial=.4}
528 \ctikzset{tripoles/nigbt/conn height/.initial=0}
529 \ctikzset{tripoles/nigbt/height/.initial=1.1}
530 \ctikzset{tripoles/nigbt/gate width/.initial=.62}
531 \ctikzset{tripoles/nigbt/base width/.initial=.5}
532 \ctikzset{tripoles/nigbt/bodydiode scale/.initial=.3}
533 \ctikzset{tripoles/nigbt/bodydiode distance/.initial=.3}
534 \ctikzset{tripoles/nigbt/bodydiode conn/.initial=.6}
535 \ctikzset{tripoles/nigbt/curr direction/.initial=1}
536
537 \ctikzset{tripoles/Lpigbt/width/.initial=.6}
538 \ctikzset{tripoles/Lpigbt/gate height/.initial=.45}
539 \ctikzset{tripoles/Lpigbt/gate height 2/.initial=.15}
540 \ctikzset{tripoles/Lpigbt/base height/.initial=.4}
541 \ctikzset{tripoles/Lpigbt/conn height/.initial=.4}
542 \ctikzset{tripoles/Lpigbt/height/.initial=1.1}
543 \ctikzset{tripoles/Lpigbt/gate width/.initial=.62}
544 \ctikzset{tripoles/Lpigbt/base width/.initial=.5}
545 \ctikzset{tripoles/Lpigbt/bodydiode scale/.initial=.3}
546 \ctikzset{tripoles/Lpigbt/bodydiode distance/.initial=.3}
547 \ctikzset{tripoles/Lpigbt/bodydiode conn/.initial=.6}
548 \ctikzset{tripoles/Lpigbt/curr direction/.initial=-1}
549
550 \ctikzset{tripoles/Lnigbt/width/.initial=.6}
551 \ctikzset{tripoles/Lnigbt/gate height/.initial=.45}
552 \ctikzset{tripoles/Lnigbt/gate height 2/.initial=.15}
553 \ctikzset{tripoles/Lnigbt/base height/.initial=.4}
554 \ctikzset{tripoles/Lnigbt/conn height/.initial=.4}
555 \ctikzset{tripoles/Lnigbt/height/.initial=1.1}
556 \ctikzset{tripoles/Lnigbt/gate width/.initial=.62}
557 \ctikzset{tripoles/Lnigbt/base width/.initial=.5}
558 \ctikzset{tripoles/Lnigbt/bodydiode scale/.initial=.3}
559 \ctikzset{tripoles/Lnigbt/bodydiode distance/.initial=.3}
560 \ctikzset{tripoles/Lnigbt/bodydiode conn/.initial=.6}
561 \ctikzset{tripoles/Lnigbt/curr direction/.initial=1}
562
563 \ctikzset{tripoles/njfet/width/.initial=.7}
564 \ctikzset{tripoles/njfet/gate height/.initial=.5}
565 \ctikzset{tripoles/njfet/gate height 2/.initial=.35}
566 \ctikzset{tripoles/njfet/gate width/.initial=.5}
567 \ctikzset{tripoles/njfet/conn height/.initial=.35}
568 \ctikzset{tripoles/njfet/height/.initial=1.1}
569 \ctikzset{tripoles/njfet/bodydiode scale/.initial=.3}
570 \ctikzset{tripoles/njfet/bodydiode distance/.initial=.3}
571 \ctikzset{tripoles/njfet/bodydiode conn/.initial=.6}
572 \ctikzset{tripoles/njfet/curr direction/.initial=1}
573
574 \ctikzset{tripoles/pjfet/width/.initial=.7}
575 \ctikzset{tripoles/pjfet/gate height/.initial=.5}
576 \ctikzset{tripoles/pjfet/gate height 2/.initial=.35}
577 \ctikzset{tripoles/pjfet/gate width/.initial=.5}
578 \ctikzset{tripoles/pjfet/conn height/.initial=.35}
579 \ctikzset{tripoles/pjfet/height/.initial=1.1}
580 \ctikzset{tripoles/pjfet/bodydiode scale/.initial=.3}
581 \ctikzset{tripoles/pjfet/bodydiode distance/.initial=.3}
582 \ctikzset{tripoles/pjfet/bodydiode conn/.initial=.6}
583 \ctikzset{tripoles/pjfet/curr direction/.initial=-1}
584
585 \ctikzset{tripoles/isfet/width/.initial=1}
586 \ctikzset{tripoles/isfet/gate height/.initial=.35}
587 \ctikzset{tripoles/isfet/base height/.initial=.5}
588 \ctikzset{tripoles/isfet/height/.initial=1.1}
589 \ctikzset{tripoles/isfet/base width/.initial=.3}
590 \ctikzset{tripoles/isfet/gate width/.initial=.5}
591 \ctikzset{tripoles/isfet/conn height/.initial=0}
592 \ctikzset{tripoles/isfet/wave width/.initial=.16}
593 \ctikzset{tripoles/isfet/wave amp/.initial=.06}
594 \ctikzset{tripoles/isfet/waves y sep/.initial=.22}
595 \ctikzset{tripoles/isfet/waves x sep/.initial=.8}
596 \ctikzset{tripoles/isfet/bodydiode scale/.initial=.3}
597 \ctikzset{tripoles/isfet/bodydiode distance/.initial=.3}
598 \ctikzset{tripoles/isfet/bodydiode conn/.initial=.6}
599 \ctikzset{tripoles/isfet/curr direction/.initial=1}
600
601 \newif\ifpgf@circuit@europeanlogicport
602 \ctikzset{logic ports/.is choice}
603 \ctikzset{logic ports/european/.code= {\pgf@circuit@europeanlogicporttrue } }
604 \ctikzset{logic ports/american/.code= {\pgf@circuit@europeanlogicportfalse } }
605
606
607 \ctikzset{tripoles/american and port/width/.initial=1.1}
608 \ctikzset{tripoles/american and port/height/.initial=.8}
609 \ctikzset{tripoles/american and port/port width/.initial=.7}
610 \ctikzset{tripoles/american and port/input height/.initial=.5}
611 \ctikzset{tripoles/american nand port/width/.initial=1.1}
612 \ctikzset{tripoles/american nand port/height/.initial=.8}
613 \ctikzset{tripoles/american nand port/port width/.initial=.7}
614 \ctikzset{tripoles/american nand port/circle width/.initial=.15}
615 \ctikzset{tripoles/american nand port/input height/.initial=.5}
616 \ctikzset{tripoles/american or port/width/.initial=1.1}
617 \ctikzset{tripoles/american or port/height/.initial=.8}
618 \ctikzset{tripoles/american or port/port width/.initial=.7}
619 \ctikzset{tripoles/american or port/input height/.initial=.5}
620 \ctikzset{tripoles/american or port/input skip/.initial=.25}
621 \ctikzset{tripoles/american or port/aaa/.initial=.6}
622 \ctikzset{tripoles/american or port/bbb/.initial=.4}
623 \ctikzset{tripoles/american or port/ccc/.initial=.5}
624 \ctikzset{tripoles/american or port/ddd/.initial=.0}
625 \ctikzset{tripoles/american nor port/width/.initial=1.1}
626 \ctikzset{tripoles/american nor port/height/.initial=.8}
627 \ctikzset{tripoles/american nor port/port width/.initial=.7}
628 \ctikzset{tripoles/american nor port/input height/.initial=.5}
629 \ctikzset{tripoles/american nor port/input skip/.initial=.25}
630 \ctikzset{tripoles/american nor port/circle width/.initial=.15}
631 \ctikzset{tripoles/american nor port/aaa/.initial=.6}
632 \ctikzset{tripoles/american nor port/bbb/.initial=.4}
633 \ctikzset{tripoles/american nor port/ccc/.initial=.5}
634 \ctikzset{tripoles/american nor port/ddd/.initial=.0}
635 \ctikzset{tripoles/american xor port/width/.initial=1.1}
636 \ctikzset{tripoles/american xor port/height/.initial=.8}
637 \ctikzset{tripoles/american xor port/port width/.initial=.7}
638 \ctikzset{tripoles/american xor port/input height/.initial=.5}
639 \ctikzset{tripoles/american xor port/input skip/.initial=.15}
640 \ctikzset{tripoles/american xor port/distance/.initial=.1}
641 \ctikzset{tripoles/american xor port/aaa/.initial=.6}
642 \ctikzset{tripoles/american xor port/bbb/.initial=.4}
643 \ctikzset{tripoles/american xor port/ccc/.initial=.5}
644 \ctikzset{tripoles/american xor port/ddd/.initial=.0}
645 \ctikzset{tripoles/american xnor port/width/.initial=1.1}
646 \ctikzset{tripoles/american xnor port/height/.initial=.8}
647 \ctikzset{tripoles/american xnor port/port width/.initial=.7}
648 \ctikzset{tripoles/american xnor port/input height/.initial=.5}
649 \ctikzset{tripoles/american xnor port/input skip/.initial=.15}
650 \ctikzset{tripoles/american xnor port/distance/.initial=.1}
651 \ctikzset{tripoles/american xnor port/aaa/.initial=.6}
652 \ctikzset{tripoles/american xnor port/bbb/.initial=.4}
653 \ctikzset{tripoles/american xnor port/ccc/.initial=.5}
654 \ctikzset{tripoles/american xnor port/ddd/.initial=.0}
655 \ctikzset{tripoles/american xnor port/circle width/.initial=.15}
656 \ctikzset{tripoles/european and port/width/.initial=1.4}
657 \ctikzset{tripoles/european and port/height/.initial=.65}
658 \ctikzset{tripoles/european and port/reserved/.initial=.6}
659 \ctikzset{tripoles/european and port/input height/.initial=.6}
660 \ctikzset{tripoles/european or port/width/.initial=1.4}
661 \ctikzset{tripoles/european or port/height/.initial=.65}
662 \ctikzset{tripoles/european or port/reserved/.initial=.6}
663 \ctikzset{tripoles/european or port/input height/.initial=.6}
664 \ctikzset{tripoles/european xor port/width/.initial=1.4}
665 \ctikzset{tripoles/european xor port/height/.initial=.65}
666 \ctikzset{tripoles/european xor port/reserved/.initial=.6}
667 \ctikzset{tripoles/european xor port/input height/.initial=.6}
668 \ctikzset{tripoles/european nand port/width/.initial=1.4}
669 \ctikzset{tripoles/european nand port/not height/.initial=.3}
670 \ctikzset{tripoles/european nand port/not width/.initial=.8}
671 \ctikzset{tripoles/european nand port/height/.initial=.65}
672 \ctikzset{tripoles/european nand port/reserved/.initial=.6}
673 \ctikzset{tripoles/european nand port/input height/.initial=.6}
674 \ctikzset{tripoles/european not port/width/.initial=1.4}
675 \ctikzset{tripoles/european not port/not height/.initial=.3}
676 \ctikzset{tripoles/european not port/not width/.initial=.8}
677 \ctikzset{tripoles/european not port/height/.initial=.65}
678 \ctikzset{tripoles/european not port/reserved/.initial=.6}
679 \ctikzset{tripoles/european not port/input height/.initial=0}
680 \ctikzset{tripoles/european xnor port/width/.initial=1.4}
681 \ctikzset{tripoles/european xnor port/not height/.initial=.3}
682 \ctikzset{tripoles/european xnor port/not width/.initial=.8}
683 \ctikzset{tripoles/european xnor port/height/.initial=.65}
684 \ctikzset{tripoles/european xnor port/reserved/.initial=.6}
685 \ctikzset{tripoles/european xnor port/input height/.initial=.6}
686 \ctikzset{tripoles/european nor port/width/.initial=1.4}
687 \ctikzset{tripoles/european nor port/not height/.initial=.3}
688 \ctikzset{tripoles/european nor port/not width/.initial=.8}
689 \ctikzset{tripoles/european nor port/height/.initial=.65}
690 \ctikzset{tripoles/european nor port/reserved/.initial=.6}
691 \ctikzset{tripoles/european nor port/input height/.initial=.6}
692 \ctikzset{tripoles/op amp/width/.initial=1.7}
693 \ctikzset{tripoles/op amp/port width/.initial=.7}
694 \ctikzset{tripoles/op amp/height/.initial=1.4}
695 \ctikzset{tripoles/op amp/input height/.initial=.5}
696 \ctikzset{tripoles/op amp/up pos/.initial=.45}
697 \ctikzset{tripoles/op amp/font/.initial= \fontsize{10}{0}\selectfont\boldmath}%absolut font size needed!
698 \ctikzset{tripoles/en amp/width/.initial=1.7}
699 \ctikzset{tripoles/en amp/port width/.initial=.7}
700 \ctikzset{tripoles/en amp/height/.initial=1.6}
701 \ctikzset{tripoles/en amp/input height/.initial=.3}
702 \ctikzset{tripoles/en amp/up pos/.initial=.45}
703 \ctikzset{tripoles/en amp/font/.initial= \fontsize{10}{0}\selectfont\boldmath}%absolut font size needed!
704 \ctikzset{tripoles/en amp/font2/.initial= \fontsize{14}{0}\selectfont\boldmath}%absolut font size needed!
705 \ctikzset{tripoles/gm amp/width/.initial=1.7}
706 \ctikzset{tripoles/gm amp/port width/.initial=.7}
707 \ctikzset{tripoles/gm amp/height/.initial=1.4}
708 \ctikzset{tripoles/gm amp/input height/.initial=.5}
709 \ctikzset{tripoles/gm amp/up pos/.initial=.45}
710 \ctikzset{tripoles/plain amp/width/.initial=1.7}
711 \ctikzset{tripoles/plain amp/port width/.initial=.7}
712 \ctikzset{tripoles/plain amp/height/.initial=1.4}
713 \ctikzset{tripoles/plain amp/input height/.initial=.5}
714 \ctikzset{tripoles/plain amp/up pos/.initial=.45}
715
716 \ctikzset{tripoles/thyristor/height/.initial=1.10}
717 \ctikzset{tripoles/thyristor/height 2/.initial=.5}
718 \ctikzset{tripoles/thyristor/width/.initial=1.0}
719 \ctikzset{tripoles/thyristor/diode height/.initial=.5}
720 \ctikzset{tripoles/thyristor/diode width left/.initial=.4}
721 \ctikzset{tripoles/thyristor/diode width right/.initial=.3}
722
723 \ctikzset{tripoles/triac/height/.initial=1.1}
724 \ctikzset{tripoles/triac/width/.initial=1}
725 \ctikzset{tripoles/triac/diode width left/.initial=.3}
726 \ctikzset{tripoles/triac/diode width right/.initial=.3}
727
728 \ctikzset{tripoles/spdt/width/.initial=.85}
729 \ctikzset{tripoles/spdt/height/.initial=.45}
730 \ctikzset{tripoles/spdt/margin/.initial=.45}
731
732 \ctikzset{tripoles/toggleswitch/height/.initial=.8}
733 \ctikzset{tripoles/toggleswitch/height 2/.initial=.0}
734 \ctikzset{tripoles/toggleswitch/width/.initial=.80}
735
736 \ctikzset{tripoles/mixer/width/.initial=0.7}
737 \ctikzset{tripoles/adder/width/.initial=0.7}
738 \ctikzset{tripoles/circulator/width/.initial=.7}
739 \ctikzset{tripoles/oscillator/width/.initial=.7}
740
741
742 \ctikzset{tripoles/wilkinson/height/.initial=1.3}
743 \ctikzset{tripoles/wilkinson/width/.initial=1.3}
744
745 \ctikzset{quadpoles/transformer/width/.initial=1.5}
746 \ctikzset{quadpoles/transformer/width1/.initial=.4}
747 \ctikzset{quadpoles/transformer/height/.initial=1.5}
748 \ctikzset{quadpoles/transformer/height1/.initial=.8}
749 \ctikzset{quadpoles/transformer core/width/.initial=1.5}
750 \ctikzset{quadpoles/transformer core/height/.initial=1.5}
751 \ctikzset{quadpoles/transformer core/core height/.initial=.5}
752 \ctikzset{quadpoles/transformer core/core width/.initial=.05}
753 \ctikzset{quadpoles/gyrator/width/.initial=1.5}
754 \ctikzset{quadpoles/gyrator/height/.initial=1.5}
755 \ctikzset{quadpoles/fourport/width/.initial=1.3}
756 \ctikzset{quadpoles/fourport/height/.initial=1.3}
757 \ctikzset{quadpoles/coupler/width/.initial=1.3}
758 \ctikzset{quadpoles/coupler/height/.initial=1.3}
759 \ctikzset{quadpoles/coupler2/width/.initial=1.3}
760 \ctikzset{quadpoles/coupler2/height/.initial=1.3}
761
762 \ctikzset{/tikz/circuitikz/tripoles/magnetron/width/.initial=1}
763
764
765 % %Mechanical section
766 \ctikzset{/tikz/circuitikz/tripoles/elmech/height/.initial=.8}
767 \ctikzset{/tikz/circuitikz/tripoles/elmech/width/.initial=.6}
768 \ctikzset{bipoles/spring/height/.initial=.5}
769 \ctikzset{bipoles/spring/width/.initial=.5}
770 \ctikzset{bipoles/mass/height/.initial=.55}
771 \ctikzset{bipoles/mass/box height/.initial=.4}
772 \ctikzset{bipoles/mass/width/.initial=.5}
773
774 \ctikzset{bipoles/damper/height/.initial=.35}
775 \ctikzset{bipoles/damper/length/.initial=.3}
776 \ctikzset{bipoles/damper/width/.initial=.4}
777
778
779 \ctikzset{bipole/.is family}
780 \ctikzset{bipole/kind/.initial = }
781 \ctikzset{bipole/name/.initial = }
782 \newif\ifpgf@circuit@bipole@isvoltage
783 \ctikzset{bipole/is voltage/.is if=pgf@circuit@bipole@isvoltage}
784 \newif\ifpgf@circuit@bipole@voltageoutsideofsymbol
785 \ctikzset{bipole/is voltageoutsideofsymbol/.is if=pgf@circuit@bipole@voltageoutsideofsymbol}
786 \newif\ifpgf@circuit@bipole@strokedsymbol
787 \ctikzset{bipole/is strokedsymbol/.is if=pgf@circuit@bipole@strokedsymbol}
788 \newif\ifpgf@circuit@bipole@iscurrent
789 \ctikzset{bipole/is current/.is if=pgf@circuit@bipole@iscurrent}
790
791 \ctikzset{bipole/voltage/.is family}
792 \newif\ifpgf@circuit@bipole@voltage@backward
793 \ctikzset{bipole/voltage/direction/.is choice}
794 \ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}}
795 \ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}}
796 \newif\ifpgf@circuit@bipole@voltage@below
797 \ctikzset{bipole/voltage/position/.is choice}
798 \ctikzset{bipole/voltage/position/above/.code={\pgf@circuit@bipole@voltage@belowfalse}}
799 \ctikzset{bipole/voltage/position/below/.code={\pgf@circuit@bipole@voltage@belowtrue}}
800
801 \ctikzset{bipole/voltage/label/unit/.initial=}
802 \ctikzset{bipole/voltage/label/name/.initial=}
803
804 \ctikzset{bipole/current/.is family}
805 \newif\ifpgf@circuit@bipole@current@backward
806 \ctikzset{bipole/current/direction/.is choice}
807 \ctikzset{bipole/current/direction/forward/.code={\pgf@circuit@bipole@current@backwardfalse}}
808 \ctikzset{bipole/current/direction/backward/.code={\pgf@circuit@bipole@current@backwardtrue}}
809 \newif\ifpgf@circuit@bipole@current@before
810 \ctikzset{bipole/current/x position/.is choice}
811 \ctikzset{bipole/current/x position/after/.code={\pgf@circuit@bipole@current@beforefalse}}
812 \ctikzset{bipole/current/x position/before/.code={\pgf@circuit@bipole@current@beforetrue}}
813 \newif\ifpgf@circuit@bipole@current@below
814 \ctikzset{bipole/current/y position/.is choice}
815 \ctikzset{bipole/current/y position/above/.code={\pgf@circuit@bipole@current@belowfalse}}
816 \ctikzset{bipole/current/y position/below/.code={\pgf@circuit@bipole@current@belowtrue}}
817 \ctikzset{bipole/current/label/unit/.initial=}
818 \ctikzset{bipole/current/label/name/.initial=}
819
820 \ctikzset{bipole/flow/.is family}
821 \newif\ifpgf@circuit@bipole@flow@backward
822 \ctikzset{bipole/flow/direction/.is choice}
823 \ctikzset{bipole/flow/direction/forward/.code={\pgf@circuit@bipole@flow@backwardfalse}}
824 \ctikzset{bipole/flow/direction/backward/.code={\pgf@circuit@bipole@flow@backwardtrue}}
825 \newif\ifpgf@circuit@bipole@flow@before
826 \ctikzset{bipole/flow/x position/.is choice}
827 \ctikzset{bipole/flow/x position/after/.code={\pgf@circuit@bipole@flow@beforefalse}}
828 \ctikzset{bipole/flow/x position/before/.code={\pgf@circuit@bipole@flow@beforetrue}}
829 \newif\ifpgf@circuit@bipole@flow@below
830 \ctikzset{bipole/flow/y position/.is choice}
831 \ctikzset{bipole/flow/y position/above/.code={\pgf@circuit@bipole@flow@belowfalse}}
832 \ctikzset{bipole/flow/y position/below/.code={\pgf@circuit@bipole@flow@belowtrue}}
833 \ctikzset{bipole/flow/label/unit/.initial=}
834 \ctikzset{bipole/flow/label/name/.initial=}
835 \ctikzset{flow/distance/.initial = .5}
836 \ctikzset{flow/offset/.initial = .2}%distance between flow-arrow and conductor
837
838
839 \ctikzset{bipole/label/.is family}
840 \ctikzset{bipole/label/position/.initial=90}
841 \ctikzset{bipole/label/unit/.initial=}
842 \ctikzset{bipole/label/name/.initial=}
843 \ctikzset{bipole/annotation/.is family}
844 \ctikzset{bipole/annotation/position/.initial=-90}
845 \ctikzset{bipole/annotation/unit/.initial=}
846 \ctikzset{bipole/annotation/name/.initial=}
847 \ctikzset{bipole/nodes/.is family}
848 \ctikzset{bipole/nodes/left/.is choice}
849 \ctikzset{bipole/nodes/left/none/.code={\ctikzsetvalof{bipole/nodes/left}{none}}}
850 \ctikzset{bipole/nodes/left/empty/.code={\ctikzsetvalof{bipole/nodes/left}{empty}}}
851 \ctikzset{bipole/nodes/left/full/.code={\ctikzsetvalof{bipole/nodes/left}{full}}}
852 \ctikzset{bipole/nodes/left/diamond/.code={\ctikzsetvalof{bipole/nodes/left}{diamond}}}
853 \ctikzset{bipole/nodes/left/rectjoinfill/.code={\ctikzsetvalof{bipole/nodes/left}{rectjoinfill}}}
854 \ctikzset{bipole/nodes/right/.is choice}
855 \ctikzset{bipole/nodes/right/none/.code={\ctikzsetvalof{bipole/nodes/right}{none}}}
856 \ctikzset{bipole/nodes/right/empty/.code={\ctikzsetvalof{bipole/nodes/right}{empty}}}
857 \ctikzset{bipole/nodes/right/full/.code={\ctikzsetvalof{bipole/nodes/right}{full}}}
858 \ctikzset{bipole/nodes/right/diamond/.code={\ctikzsetvalof{bipole/nodes/right}{diamond}}}
859 \ctikzset{bipole/nodes/right/rectjoinfill/.code={\ctikzsetvalof{bipole/nodes/right}{rectjoinfill}}}
860
861
862
863
864 \newif\ifpgf@circuit@europeanresistor
865 \ctikzset{resistor/.is choice}
866 \ctikzset{resistor/american/.code = \pgf@circuit@europeanresistorfalse }
867 \ctikzset{resistor/european/.code = \pgf@circuit@europeanresistortrue }
868
869 \ctikzset{inductor/.is choice}
870 \ctikzset{inductor/cute/.code={\ctikzsetvalof{inductor}{cute}}}
871 \ctikzset{inductor/european/.code={\ctikzsetvalof{inductor}{european}}}
872 \ctikzset{inductor/american/.code={\ctikzsetvalof{inductor}{american}}}
873
874 \newif\ifpgf@circuit@strokediode
875 \newif\ifpgf@circuit@fulldiode
876 \pgf@circuit@strokediodefalse
877 \pgf@circuit@fulldiodefalse
878
879 \ctikzset{diode/.is choice}
880 \ctikzset{diode/empty/.code = \pgf@circuit@fulldiodefalse\pgf@circuit@strokediodefalse}%default
881 \ctikzset{diode/full/.code = \pgf@circuit@fulldiodetrue }
882 \ctikzset{diode/stroke/.code = \pgf@circuit@strokediodetrue}
883
884 \tikzset{full diodes/.style = { \circuitikzbasekey/diode = full }}
885 \tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty }}
886 \tikzset{stroke diodes/.style = { \circuitikzbasekey/diode = stroke }}
887
888 \ctikzset{thickness/.initial=2}
889 \ctikzset{color/.initial=black}
890 \pgfkeys{/tikz/color/.add code={}{\ctikzset{color={#1}}}}
891
892
893 \newif\ifpgf@circ@siunitx
894 \newif\ifpgf@circ@siunitx@res
895
896 \ctikzset{straight/.is choice}
897 \ctikzset{straightvoltage value/.initial=true}
898 \ctikzset{straight/true/.code = {\pgf@circuit@bipole@voltage@straighttrue}}
899 \ctikzset{straight/false/.code = {\pgf@circuit@bipole@voltage@straightfalse}}
900 \ctikzset{straightvoltage/.style = {/tikz/circuitikz/straight=true}}
901 \newif\ifpgf@circuit@bipole@voltage@straight
902 \ctikzset{bipole/straight/.is if=pgf@circuit@bipole@voltage@straight}
903
904
905 \ctikzset{voltage/.is family}
906 \ctikzset{voltage/distance from node/.initial=.5} %\pgf@circ@Rlen units
907 \ctikzset{voltage/distance from line/.initial=.08} % pos, tra 0 e 1
908 \ctikzset{voltage/bump a/.initial=1.2}
909 \ctikzset{voltage/bump b/.initial=1.5}
910 \ctikzset{voltage/european label distance/.initial=1.4}
911 \ctikzset{voltage/american label distance/.initial=1.1}
912 % special cases
913 \ctikzset{bipoles/generic/voltage/distance from node/.initial=.4}
914 \ctikzset{bipoles/generic/voltage/bump b/.initial=2}
915 \ctikzset{bipoles/generic/voltage/european label distance/.initial=1.8}
916 %\ctikzset{bipoles/thermocouple/voltage/distance from node/.initial=.3}
917 \ctikzset{bipoles/thermocouple/voltage/bump b/.initial=2.2}
918 \ctikzset{bipoles/thermocouple/voltage/european label distance/.initial=1.5}
919 \ctikzset{bipoles/ageneric/voltage/distance from node/.initial=.4}
920 \ctikzset{bipoles/ageneric/voltage/bump b/.initial=2}
921 \ctikzset{bipoles/ageneric/voltage/european label distance/.initial=1.8}
922 \ctikzset{bipoles/fullgeneric/voltage/distance from node/.initial=.4}
923 \ctikzset{bipoles/fullgeneric/voltage/bump b/.initial=2}
924 \ctikzset{bipoles/fullgeneric/voltage/european label distance/.initial=1.8}
925 \ctikzset{bipoles/memristor/voltage/distance from node/.initial=.4}
926 \ctikzset{bipoles/memristor/voltage/bump b/.initial=2}
927 \ctikzset{bipoles/memristor/voltage/european label distance/.initial=1.8}
928 %\ctikzset{bipoles/tline/voltage/distance from node/.initial=.2}
929 \ctikzset{bipoles/tline/voltage/bump b/.initial=2.4}
930 \ctikzset{bipoles/tline/voltage/european label distance/.initial=2.1}
931 %\ctikzset{bipoles/varistor/voltage/distance from node/.initial=.2}
932 \ctikzset{bipoles/varistor/voltage/bump b/.initial=2.4}
933 \ctikzset{bipoles/varistor/voltage/european label distance/.initial=2}
934 %\ctikzset{bipoles/photoresistor/voltage/distance from node/.initial=.2}
935 \ctikzset{bipoles/photoresistor/voltage/bump b/.initial=2}
936 \ctikzset{bipoles/photoresistor/voltage/european label distance/.initial=1.8}
937 %\ctikzset{bipoles/thermistor/voltage/distance from node/.initial=.2}
938 \ctikzset{bipoles/thermistor/voltage/bump b/.initial=2.4}
939 \ctikzset{bipoles/thermistor/voltage/european label distance/.initial=2}
940 %\ctikzset{bipoles/thermistorntc/voltage/distance from node/.initial=.2}
941 \ctikzset{bipoles/thermistorntc/voltage/bump b/.initial=1.6}
942 %\ctikzset{bipoles/thermistorptc/voltage/distance from node/.initial=.2}
943 \ctikzset{bipoles/thermistorptc/voltage/bump b/.initial=1.6}
944
945 \ctikzset{current/.is family}
946 \ctikzset{current/distance/.initial = .5}
947
948
949 \tikzset{american currents/.style = { \circuitikzbasekey/current = american } }
950 \tikzset{european currents/.style = { \circuitikzbasekey/current = european } }
951 \tikzset{american voltages/.style = { \circuitikzbasekey/voltage = american } }
952 \tikzset{european voltages/.style = { \circuitikzbasekey/voltage = european } }
953 \tikzset{american resistors/.style = { \circuitikzbasekey/resistor = american } }
954 \tikzset{european resistors/.style = { \circuitikzbasekey/resistor = european } }
955
956 \newif\ifpgf@circuit@europeangfsurgearrester
957 \ctikzset{gas filled surge arrester choice/.is choice}
958 \ctikzset{gas filled surge arrester choice/european/.code= {\pgf@circuit@europeangfsurgearrestertrue } }
959 \ctikzset{gas filled surge arrester choice/american/.code= {\pgf@circuit@europeangfsurgearresterfalse } }
960
961 \tikzset{american gas filled surge arrester set/.style = { \circuitikzbasekey/gas filled surge arrester choice=american } }
962 \tikzset{european gas filled surge arrester set/.style = { \circuitikzbasekey/gas filled surge arrester choice=european } }
963 \tikzset{american inductors/.style = { \circuitikzbasekey/inductor = american } }
964 \tikzset{european inductors/.style = { \circuitikzbasekey/inductor = european } }
965 \tikzset{cute inductors/.style = { \circuitikzbasekey/inductor = cute } }
966 \tikzset{american ports/.style = { \circuitikzbasekey/logic ports = american } }
967 \tikzset{european ports/.style = { \circuitikzbasekey/logic ports = european } }
968 \tikzset{european/.style = { european currents, european voltages, european resistors, european inductors, european ports, european gas filled surge arrester set} }
969 \tikzset{american/.style = { american currents, american voltages, american resistors, american inductors, american ports, american gas filled surge arrester set} }
970 \tikzset{cute/.style = { european currents, european voltages, american resistors, cute inductors, american ports } }
971
972 % I should try to make the tree clearer (this voltaege conflicts with the options above)
973
974 \newif\ifpgf@circuit@europeanvoltage
975 \ctikzset{voltage/.is choice}
976 \ctikzset{voltage/american/.code = {\pgf@circuit@europeanvoltagefalse } }
977 \ctikzset{voltage/european/.code = {\pgf@circuit@europeanvoltagetrue } }
978
979 \newif\ifpgf@circuit@europeancurrent
980 \ctikzset{current/.is choice}
981 \ctikzset{current/american/.code = \pgf@circuit@europeancurrentfalse }
982 \ctikzset{current/european/.code = \pgf@circuit@europeancurrenttrue }
983
984 \ctikzset{label/align/.is choice}
985 \ctikzset{label/align/straight/.code={\ctikzsetvalof{label/align}{straight}}}
986 \ctikzset{label/align/rotate/.code={\ctikzsetvalof{label/align}{rotate}}}
987 \ctikzset{label/align/smart/.code={\ctikzsetvalof{label/align}{smart}}}
988
989 %%%%%%%%%% new
990 \pgfkeys{\circuitikzbasekey/.search also={/tikz}}
991 %%%---------- close: tex/pgfcirc.defines
992 %%%%%%%%%%% Springe nach tex/pgfcircutils
993 %%%---------- open: tex/pgfcircutils.tex
994 % Copyright 2007-2009 by Massimo Redaelli
995 %
996 % This file may be distributed and/or modified
997 %
998 % 1. under the LaTeX Project Public License and/or
999 % 2. under the GNU Public License.
1000 %
1001 % See the file doc/LICENSE for more details.
1002
1003 %\def\pgf@circ@handleSI#1{%
1004 % \pgf@circ@siunitx@resfalse
1005 %
1006 % \edef\len{\stringlength[e]{#1}}
1007 %\testmatchingchar[e]{#1}{\len}{>}%
1008 %\ifmatchingchar%
1009 % \ifnum\findchars{#1}{<}=0
1010 % \def\pgf@circ@handleSI@val{\substring{#1}{1}{\findchars{#1}{<}-1}}
1011 %\def\pgf@circ@handleSI@unit{\substring{#1}{\findchars{#1}{<}-1}+1}{\stringlength{#1}}
1012 %\pgf@circ@siunitx@restrue
1013 % \else
1014 % \fi
1015 %\else
1016 %\fi
1017 %}
1018
1019 \def\pgf@circ@handleSI#1{
1020 \noexpandarg
1021 \def\pgf@temp{}
1022 \StrBetween{#1}{<}{>}[\pgf@circ@handleSI@unit]
1023 \StrLen{\pgf@circ@handleSI@unit}[\pgf@circ@handleSI@unit@len]
1024
1025 \ifnum\pgf@circ@handleSI@unit@len=0
1026 \pgf@circ@siunitx@resfalse
1027 \else
1028 \IfEndWith{#1}{>}{
1029 \pgf@circ@siunitx@restrue
1030 \noexpandarg
1031 \StrBefore{#1}{<}[\pgf@circ@handleSI@val]
1032 %\typeout{si |#1|}
1033 }{
1034 \pgf@circ@siunitx@resfalse
1035 %\typeout{no si |#1|}
1036 }
1037 \fi
1038 }
1039
1040 \def\pgf@circ@ifkeyempty#1{
1041 \pgfextra{
1042 \ctikzset{#1/.get=\pgf@circ@temp}
1043 \edef\pgf@temp{}
1044 }
1045 \ifx\pgf@circ@temp\pgf@temp
1046 }
1047
1048 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1049 %% Math routines
1050
1051 \def\pgf@circ@stripdecimals#1.#2\pgf@nil{#1}
1052
1053
1054 %%%---------- close: tex/pgfcircutils
1055
1056 %%%%%%%%%%% Springe nach tex/pgfcircshapes
1057 %%%---------- open: tex/pgfcircshapes.tex
1058 % Copyright 2007-2009 by Massimo Redaelli
1059 %
1060 % This file may be distributed and/or modified
1061 %
1062 % 1. under the LaTeX Project Public License and/or
1063 % 2. under the GNU Public License.
1064 %
1065 % See the file doc/LICENSE for more details.
1066
1067 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1068 %% Other shapes
1069
1070
1071 %% Nothing
1072
1073 \pgfdeclareshape{emptyshape}{
1074 \savedanchor{\northeast}{%
1075 \pgf@x=.5\wd\pgfnodeparttextbox%
1076 \pgf@y=.5\ht\pgfnodeparttextbox%
1077 }
1078 \anchor{north}{
1079 \northeast
1080 \pgf@x=0cm
1081 }
1082 \anchor{east}{%
1083 \northeast
1084 \pgf@y=0cm
1085 }
1086 \anchor{south}{%
1087 \northeast
1088 \pgf@y=-\pgf@y
1089 \pgf@x=0cm
1090 }
1091 \anchor{west}{
1092 \northeast
1093 \pgf@y=0cm
1094 \pgf@x=-\pgf@x
1095 }
1096 \anchor{text}{%
1097 \pgfpointorigin
1098 }
1099 \anchor{center}{
1100 \pgfpointorigin
1101 }
1102 }
1103
1104 %% Full terminal
1105
1106 \pgfdeclareshape{circ}{
1107 \anchor{center}{
1108 \pgfpointorigin
1109 }
1110 \anchorborder{
1111 \pgf@circ@res@left=\pgf@x
1112 \pgf@circ@res@up=\pgf@y
1113 \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
1114 }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}}
1115 }
1116 \behindforegroundpath{
1117
1118 \pgfscope
1119 \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
1120 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1121 \pgfusepath{draw,fill}
1122 \endpgfscope
1123
1124 }
1125 }
1126
1127 %% Empty terminal
1128
1129 \pgfdeclareshape{ocirc}{
1130 \anchor{center}{
1131 \pgfpointorigin
1132 }
1133 \anchorborder{
1134 \pgf@circ@res@left=\pgf@x
1135 \pgf@circ@res@up=\pgf@y
1136 \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
1137 }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}}
1138 }
1139
1140 \behindforegroundpath{
1141
1142 \pgfscope
1143 \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
1144 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1145 \pgfsetfillcolor{white}
1146 \pgfusepath{draw,fill}
1147 \endpgfscope
1148
1149 }
1150 }
1151
1152 %% Diamond terminal
1153
1154 \pgfdeclareshape{diamondpole}{
1155 \anchor{center}{
1156 \pgfpointorigin
1157 }
1158 \anchorborder{
1159 \pgf@circ@res@left=\pgf@x
1160 \pgf@circ@res@up=\pgf@y
1161 }
1162 \behindforegroundpath{
1163 \pgfscope
1164 \pgfmathsetlength{\pgf@circ@res@temp}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
1165 \pgftransformrotate{45}
1166 \pgfpathrectanglecorners
1167 {\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@temp}{\pgf@circ@res@up+\pgf@circ@res@temp}}
1168 {\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@temp}{\pgf@circ@res@up-\pgf@circ@res@temp}}
1169 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1170 \pgfusepath{draw,fill}
1171 \endpgfscope
1172 }
1173 }
1174
1175 %% Fill for correct rectangular joins
1176
1177 \pgfdeclareshape{rectjoinfill}{
1178 \anchor{center}{
1179 \pgfpointorigin
1180 }
1181 \anchorborder{
1182 \pgf@circ@res@left=\pgf@x
1183 \pgf@circ@res@up=\pgf@y
1184 }
1185 \behindforegroundpath{
1186 \pgfscope
1187 \pgfpathrectanglecorners
1188 {\pgfpoint{0}{.5\pgflinewidth}}
1189 {\pgfpoint{0}{-.5\pgflinewidth}}
1190 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1191 \pgfusepath{draw,fill}
1192 \endpgfscope
1193 }
1194 }
1195
1196
1197 %% Current arrow
1198
1199 \pgfdeclareshape{currarrow}{
1200 \anchor{center}{
1201 \pgfpointorigin
1202 }
1203 \anchor{tip}{
1204 \pgfpointorigin
1205 \pgf@circ@res@step = \pgf@circ@Rlen
1206 \divide \pgf@circ@res@step by 16
1207 \pgf@x =\pgf@circ@res@step
1208 }
1209 \behindforegroundpath{
1210
1211 \pgfscope
1212 \pgf@circ@res@step = \pgf@circ@Rlen
1213 \divide \pgf@circ@res@step by 16
1214
1215 \pgfpathmoveto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
1216 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
1217 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@step}{0pt}}
1218 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1219 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
1220 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1221 \pgfusepath{draw,fill}
1222
1223 \endpgfscope
1224 }
1225
1226 }
1227
1228 %% Flow arrow
1229
1230 \pgfdeclareshape{flowarrow}{
1231 \anchor{center}{
1232 \pgfpointorigin
1233 }
1234 \anchor{tip}{
1235 \pgfpointorigin
1236 \pgf@circ@res@step = \pgf@circ@Rlen
1237 \divide \pgf@circ@res@step by 16
1238 \pgf@x =\pgf@circ@res@step
1239 }
1240 \behindforegroundpath{
1241 \pgfscope
1242 \pgf@circ@res@step = \pgf@circ@Rlen
1243 \divide \pgf@circ@res@step by 4
1244 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
1245 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
1246 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1247 \pgfusepath{draw}
1248 \pgftransformshift{\pgfpoint{\pgf@circ@res@step}{0pt}}
1249 \pgfnode{currarrow}{tip}{}{}{\pgfusepath{fill}}
1250 \endpgfscope
1251 }
1252 }
1253
1254 %% Input arrow
1255
1256 \pgfdeclareshape{inputarrow}{
1257 \savedanchor{\tip}{
1258 \pgfpointorigin
1259 }
1260 \anchor{center}{
1261 \tip
1262 }
1263 \anchor{tip}{
1264 \tip
1265 }
1266 \behindforegroundpath{
1267
1268 \pgfscope
1269 \pgf@circ@res@step = \pgf@circ@Rlen
1270 \divide \pgf@circ@res@step by 16
1271
1272 \pgfpathmoveto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}}
1273 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
1274 \pgfpathlineto{\pgfpoint{0pt}{0pt}}
1275 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1276 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}}
1277 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1278 \pgfusepath{fill}
1279
1280 \endpgfscope
1281 }
1282
1283 }
1284
1285
1286 %% box
1287
1288 \pgfdeclareshape{box}{
1289 \anchor{center}{
1290 \pgfpointorigin
1291 }
1292 \behindforegroundpath{
1293
1294 \pgfscope
1295 \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@Rlen
1296 \pgf@circ@res@step = 0.5\pgf@circ@res@step
1297 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1298 \pgfpathrectanglecorners{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@step}}{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1299 \pgfusepath{draw}
1300 \endpgfscope
1301 }
1302
1303 }
1304
1305 %%%---------- close: tex/pgfcircshapes
1306 %%%%%%%%%%% Springe nach tex/pgfcircmonopoles
1307 %%%---------- open: tex/pgfcircmonopoles.tex
1308 % Copyright 2007-2009 by Massimo Redaelli
1309 %
1310 % This file may be distributed and/or modified
1311 %
1312 % 1. under the LaTeX Project Public License and/or
1313 % 2. under the GNU Public License.
1314 %
1315 % See the file doc/LICENSE for more details.
1316
1317 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1318 %% Monopoles
1319
1320 %% Ground symbol
1321
1322 \pgfdeclareshape{ground}{
1323 \anchor{center}{
1324 \pgfpointorigin
1325 }
1326 \behindforegroundpath{
1327 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1328
1329 \pgfscope
1330 \pgfpathmoveto{\pgfpointorigin}
1331 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1332 \pgfusepath{draw}
1333
1334 \pgfstartlinewidth=\pgflinewidth
1335 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1336
1337 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1338 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1339 \pgfusepath{draw}
1340
1341 \pgfsetlinewidth{\pgfstartlinewidth}
1342 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1343 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1344 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1345 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1346 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1347 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1348 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1349 \pgfusepath{draw}
1350
1351
1352 \pgfsetlinewidth{\pgfstartlinewidth}
1353
1354 \endpgfscope
1355 }
1356
1357 }
1358
1359
1360
1361 \pgfdeclareshape{rground}{
1362 \anchor{center}{
1363 \pgfpointorigin
1364 }
1365 \behindforegroundpath{
1366 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1367
1368 \pgfscope
1369 \pgfpathmoveto{\pgfpointorigin}
1370 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1371 \pgfusepath{draw}
1372
1373 \pgfstartlinewidth=\pgflinewidth
1374 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1375
1376 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1377 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1378 \pgfusepath{draw}
1379
1380
1381 \pgfsetlinewidth{\pgfstartlinewidth}
1382
1383 \endpgfscope
1384 }
1385 }
1386
1387 \pgfdeclareshape{tground}{
1388 \anchor{center}{
1389 \pgfpointorigin
1390 }
1391 \behindforegroundpath{
1392 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1393
1394 \pgfscope
1395 \pgfpathmoveto{\pgfpointorigin}
1396 %\pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1397 \pgfusepath{draw}
1398
1399 \pgfstartlinewidth=\pgflinewidth
1400 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth}
1401
1402 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
1403 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
1404 \pgfusepath{draw}
1405
1406
1407 \pgfsetlinewidth{\pgfstartlinewidth}
1408
1409 \endpgfscope
1410 }
1411 }
1412
1413 \pgfdeclareshape{sground}{
1414 \anchor{center}{
1415 \pgfpointorigin
1416 }
1417 \behindforegroundpath{
1418 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1419
1420 \pgfscope
1421 \pgfpathmoveto{\pgfpointorigin}
1422 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1423 \pgfusepath{draw}
1424
1425 \pgfstartlinewidth=\pgflinewidth
1426 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1427
1428 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1429 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1430 \pgfpathlineto{\pgfpoint{0}{-1.8\pgf@circ@res@step}}
1431 \pgfpathclose
1432 \pgfusepath{draw}
1433
1434
1435 \pgfsetlinewidth{\pgfstartlinewidth}
1436
1437 \endpgfscope
1438 }
1439
1440 }
1441
1442 % noiseless ground
1443 \pgfdeclareshape{nground}{
1444 \anchor{center}{
1445 \pgfpointorigin
1446 }
1447 \behindforegroundpath{
1448 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1449
1450 \pgfscope
1451 \pgfpathmoveto{\pgfpointorigin}
1452 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1453 \pgfusepath{draw}
1454
1455 \pgfstartlinewidth=\pgflinewidth
1456 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1457
1458 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1459 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1460 \pgfusepath{draw}
1461
1462 \pgfsetlinewidth{\pgfstartlinewidth}
1463 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1464 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1465 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1466 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1467 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1468 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1469 \pgfusepath{draw}
1470
1471 \pgfpathmoveto{\pgfpoint{1.3\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1472 \pgfpatharc{0}{180}{1.3\pgf@circ@res@step}
1473 \pgfusepath{draw}
1474
1475 \pgfsetlinewidth{\pgfstartlinewidth}
1476 \endpgfscope
1477 }
1478 }
1479
1480 % protective ground
1481 \pgfdeclareshape{pground}{
1482 \anchor{center}{
1483 \pgfpointorigin
1484 }
1485 \behindforegroundpath{
1486 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1487
1488 \pgfscope
1489 \pgfpathmoveto{\pgfpointorigin}
1490 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1491 \pgfusepath{draw}
1492
1493 \pgfstartlinewidth=\pgflinewidth
1494 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1495
1496 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1497 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1498 \pgfpathcircle{\pgfpoint{0pt}{-\pgf@circ@res@step}} {1.2\pgf@circ@res@step}
1499 \pgfusepath{draw}
1500
1501 \pgfsetlinewidth{\pgfstartlinewidth}
1502 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1503 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1504 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1505 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1506 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1507 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1508 \pgfusepath{draw}
1509
1510 \pgfsetlinewidth{\pgfstartlinewidth}
1511 \endpgfscope
1512 }
1513 }
1514
1515 % chassis ground
1516 \pgfdeclareshape{cground}{
1517 \anchor{center}{
1518 \pgfpointorigin
1519 }
1520 \behindforegroundpath{
1521 \pgf@circ@res@step=\ctikzvalof{monopoles/chassis/width}\pgf@circ@Rlen
1522
1523 \pgfscope
1524 \pgfpathmoveto{\pgfpointorigin}
1525 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1526 \pgfusepath{draw}
1527
1528 \pgfpathmoveto{\pgfpoint{-1.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1529 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1530 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1531 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1532 \pgfpathmoveto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1533 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1534 \pgfusepath{draw}
1535 \endpgfscope
1536 }
1537 }
1538
1539 % Contributed by Leonardo Azzinnari
1540 \pgfdeclareshape{tlinestub}{
1541 \anchor{center}{\pgfpointorigin}
1542 \behindforegroundpath{
1543 \pgfstartlinewidth=\pgflinewidth
1544
1545 \pgf@circ@res@step=\ctikzvalof{bipoles/tline/width} \pgf@circ@Rlen
1546 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1547
1548 \pgfpathmoveto{\pgfpointorigin}
1549 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0pt}}
1550 \pgfusepath{draw}
1551 \pgfscope
1552 \pgfpathellipse{\pgfpoint{0.5\pgf@circ@res@step}{0\pgf@circ@res@step}}{\pgfpoint{0.125\pgf@circ@res@step}{0\pgf@circ@res@step}}{\pgfpoint{0\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1553 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1554 \pgfpathlineto{\pgfpoint{1.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1555 \pgfpatharc{90}{-90}{0.125\pgf@circ@res@step and 0.25\pgf@circ@res@step}
1556 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-0.25\pgf@circ@res@step}}
1557 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1558 \pgfusepath{draw}
1559 \endpgfscope
1560 }
1561 }
1562
1563
1564
1565
1566 \pgfdeclareshape{antenna}{
1567 \anchor{center}{\pgfpointorigin}
1568 \savedanchor{\northeast}{
1569 \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen
1570 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1571 \pgf@y=6\pgf@circ@res@step
1572 }
1573 \anchor{text}{
1574 \northeast
1575 \pgf@x=\ctikzvalof{monopoles/antenna/label/xanchor}\pgf@x
1576 \pgf@y=\ctikzvalof{monopoles/antenna/label/yanchor}\pgf@y
1577 }
1578 \behindforegroundpath{
1579 \pgfstartlinewidth=\pgflinewidth
1580 \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen
1581
1582 % \pgfpathmoveto{\pgfpointorigin}
1583 % \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1584 % \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1585 % \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1586
1587 \pgftransformxshift{ -4\pgf@circ@res@step }
1588
1589 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1590 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1591
1592 \pgfusepath{draw}
1593
1594 \pgfscope
1595 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1596 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1597 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1598 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1599 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1600 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1601 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1602 \pgfusepath{draw}
1603 \endpgfscope
1604 \pgfsetlinewidth{\pgfstartlinewidth}
1605
1606 }
1607 }
1608
1609
1610 \pgfdeclareshape{txantenna}{
1611 \anchor{center}{\pgfpointorigin}
1612 \savedanchor{\northeast}{
1613 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1614 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1615 \pgf@y=6\pgf@circ@res@step
1616 }
1617 \anchor{text}{
1618 \northeast
1619 \pgf@x=\ctikzvalof{monopoles/txantenna/label/xanchor}\pgf@x
1620 \pgf@y=\ctikzvalof{monopoles/txantenna/label/yanchor}\pgf@y
1621 }
1622 \behindforegroundpath{
1623 \pgfstartlinewidth=\pgflinewidth
1624 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1625
1626 \pgfpathmoveto{\pgfpointorigin}
1627 \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1628 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1629 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1630
1631 \pgfusepath{draw}
1632
1633 \pgfscope
1634 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1635 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1636 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1637 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1638 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1639 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1640 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1641 \pgfusepath{draw}
1642 \endpgfscope
1643 \pgfpathmoveto{\pgfpoint{5.5\pgf@circ@res@step}{6\pgf@circ@res@step}}
1644 % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step}
1645 \pgfpatharc{30}{-30}{2\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{6.25\pgf@circ@res@step}}
1646 \pgfpatharc{30}{-30}{2.5\pgf@circ@res@step}
1647 \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.5\pgf@circ@res@step}}
1648 \pgfpatharc{30}{-30}{3\pgf@circ@res@step}
1649 \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.75\pgf@circ@res@step}}
1650 \pgfpatharc{30}{-30}{3.5\pgf@circ@res@step}
1651 \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{7\pgf@circ@res@step}}
1652 \pgfpatharc{30}{-30}{4\pgf@circ@res@step}
1653 \pgfusepath{draw}
1654 \pgfsetlinewidth{\pgfstartlinewidth}
1655
1656 }
1657 }
1658
1659
1660 \pgfdeclareshape{rxantenna}{
1661 \anchor{center}{\pgfpointorigin}
1662 \savedanchor{\northeast}{
1663 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1664 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1665 \pgf@y=6\pgf@circ@res@step
1666 }
1667 \anchor{text}{
1668 \northeast
1669 \pgf@x=\ctikzvalof{monopoles/rxantenna/label/xanchor}\pgf@x
1670 \pgf@y=\ctikzvalof{monopoles/rxantenna/label/yanchor}\pgf@y
1671 }
1672 \behindforegroundpath{
1673 \pgfstartlinewidth=\pgflinewidth
1674 \pgf@circ@res@step=\ctikzvalof{monopoles/rxantenna/width}\pgf@circ@Rlen
1675
1676 \pgfpathmoveto{\pgfpointorigin}
1677 \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1678 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1679 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1680
1681 \pgfusepath{draw}
1682
1683 \pgfscope
1684 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1685 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1686 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1687 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1688 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1689 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1690 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1691 \pgfusepath{draw}
1692 \endpgfscope
1693
1694 \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{7\pgf@circ@res@step}}
1695 % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step}
1696 \pgfpatharc{150}{210}{4\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.75\pgf@circ@res@step}}
1697 \pgfpatharc{150}{210}{3.5\pgf@circ@res@step}
1698 \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.5\pgf@circ@res@step}}
1699 \pgfpatharc{150}{210}{3\pgf@circ@res@step}
1700 \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{6.25\pgf@circ@res@step}}
1701 \pgfpatharc{150}{210}{2.5\pgf@circ@res@step}
1702 \pgfpathmoveto{\pgfpoint{8\pgf@circ@res@step}{6\pgf@circ@res@step}}
1703 \pgfpatharc{150}{210}{2\pgf@circ@res@step}
1704 \pgfusepath{draw}
1705 \pgfsetlinewidth{\pgfstartlinewidth}
1706
1707 }
1708 }
1709
1710 % Vcc
1711 \pgfdeclareshape{vcc}{
1712 \anchor{center}{\pgfpointorigin}
1713 \anchor{text}{
1714 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
1715 \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}}
1716 \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}}
1717 \pgf@x=0pt
1718 \pgf@y=2\pgf@circ@res@step
1719 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
1720 \pgf@x=-.5\wd\pgfnodeparttextbox
1721 }
1722 \behindforegroundpath{
1723 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
1724 \pgfscope
1725 \pgfpathmoveto{\pgfpointorigin}
1726 \pgfpathlineto{\pgfpoint{0pt}{1.5\pgf@circ@res@step}}
1727 \pgfusepath{draw}
1728
1729 \pgfstartlinewidth=\pgflinewidth
1730 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1731
1732 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1733 \pgfpathlineto{\pgfpoint{0}{1.5\pgf@circ@res@step}}
1734 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1735 \pgfusepath{draw}
1736
1737 \pgfsetlinewidth{\pgfstartlinewidth}
1738
1739 \endpgfscope
1740 }
1741
1742 }
1743
1744 % Vee
1745 \pgfdeclareshape{vee}{
1746 \anchor{center}{\pgfpointorigin}
1747 \anchor{text}{
1748 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
1749 \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}}
1750 \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}}
1751 \pgf@x=0pt
1752 \pgf@y=-2\pgf@circ@res@step
1753 \advance \pgf@y by -1.5\ht\pgfnodeparttextbox
1754 \pgf@x=-.5\wd\pgfnodeparttextbox
1755 }
1756
1757 \behindforegroundpath{
1758 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
1759
1760 \pgfscope
1761 \pgfpathmoveto{\pgfpointorigin}
1762 \pgfpathlineto{\pgfpoint{0pt}{-1.5\pgf@circ@res@step}}
1763 \pgfusepath{draw}
1764
1765 \pgfstartlinewidth=\pgflinewidth
1766 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1767
1768 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
1769 \pgfpathlineto{\pgfpoint{0}{-1.5\pgf@circ@res@step}}
1770 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
1771 \pgfusepath{draw}
1772 \pgfsetlinewidth{\pgfstartlinewidth}
1773
1774 \endpgfscope
1775 }
1776
1777 }
1778
1779
1780 % match
1781 \pgfdeclareshape{match}{
1782 \anchor{center}{
1783 \pgfpointorigin
1784 }
1785 \anchor{text}{
1786 \pgf@x=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen
1787 \pgf@x=1.5\pgf@x
1788 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
1789 \pgf@y=-1.5\ht\pgfnodeparttextbox
1790 }
1791 \behindforegroundpath{
1792 \pgf@circ@res@step=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen
1793
1794 \pgfscope
1795 \pgfpathmoveto{\pgfpointorigin}
1796 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0pt}}
1797 \pgfusepath{draw}
1798
1799 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
1800 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
1801 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0}}
1802 \pgfusepath{fill}
1803
1804 \pgfsetlinewidth{\pgfstartlinewidth}
1805
1806 \endpgfscope
1807 }
1808
1809 }
1810
1811
1812 %%%---------- close: tex/pgfcircmonopoles
1813 %%%%%%%%%%% Springe nach tex/pgfcircbipoles
1814 %%%---------- open: tex/pgfcircbipoles.tex
1815 % Copyright 2007-2009 by Massimo Redaelli
1816 %
1817 % This file may be distributed and/or modified
1818 %
1819 % 1. under the LaTeX Project Public License and/or
1820 % 2. under the GNU Public License.
1821 %
1822 % See the file doc/LICENSE for more details.
1823
1824 %% Generic macro for defining a bipole shape
1825 % #1 - additional anchors
1826 % #2 - lower y-size of the bipole (from the center).
1827 % #3 - #shape is the name of the shape
1828 % #4 - upper y-size of the bipole (from the center)
1829 % #5 - width of the bipole
1830 % #6 - macros drawing the bipole
1831
1832
1833 \long\def\pgfcircdeclarebipole#1#2#3#4#5#6{
1834 \pgfdeclareshape{#3shape}{
1835
1836 \savedanchor{\northeast}{
1837 \pgf@y=#4\pgf@circ@Rlen
1838 \pgf@y=.5\pgf@y
1839 \pgf@x=#5\pgf@circ@Rlen
1840 \pgf@x=.5\pgf@x
1841 }
1842 \savedanchor{\northeastborder}{
1843 \pgf@y=#4\pgf@circ@Rlen
1844 \pgf@y=.5\pgf@y
1845 \pgf@y=\ctikzvalof{bipoles/border margin}\pgf@y
1846 \pgf@x=#5\pgf@circ@Rlen
1847 \pgf@x=.5\pgf@x
1848 \pgf@x=\ctikzvalof{bipoles/border margin}\pgf@x
1849 }
1850 \savedanchor{\southwestborder}{
1851 \pgf@y=-#2\pgf@circ@Rlen
1852 \pgf@y=.5\pgf@y
1853 \pgf@y=\ctikzvalof{bipoles/border margin}\pgf@y
1854 \pgf@x=-#5\pgf@circ@Rlen
1855 \pgf@x=.5\pgf@x
1856 \pgf@x=\ctikzvalof{bipoles/border margin}\pgf@x
1857 }
1858 \savedanchor{\southwest}{
1859 \pgf@y=-#2\pgf@circ@Rlen
1860 \pgf@y=.5\pgf@y
1861 \pgf@x=-#5\pgf@circ@Rlen
1862 \pgf@x=.5\pgf@x
1863 }
1864 \savedanchor{\centerpoint}{
1865 \pgf@circ@res@down=-#2\pgf@circ@Rlen
1866 \pgf@circ@res@up=#4\pgf@circ@Rlen
1867 \pgfpointorigin
1868 \pgf@y=\pgf@circ@res@up
1869 \advance\pgf@y by\pgf@circ@res@down
1870 \pgf@y=.5\pgf@y
1871 }
1872 \anchor{center}{\pgfpointorigin}
1873 \anchor{n}{
1874 \northeast
1875 \pgf@x=0cm
1876 }
1877 \anchor{ne}{
1878 \northeast
1879 }
1880 \anchor{nw}{
1881 \northeast
1882 \pgf@x=-\pgf@x
1883 }
1884 \anchor{e}{%
1885 \northeast
1886 \pgf@y=0cm
1887 }
1888 \anchor{s}{%
1889 \southwest
1890 \pgf@x=0cm
1891 }
1892 \anchor{se}{%
1893 \southwest
1894 \pgf@x=-\pgf@x
1895 }
1896 \anchor{sw}{%
1897 \southwest
1898 }
1899 \anchor{w}{
1900 \southwest
1901 \pgf@y=0cm
1902 }
1903 \anchor{north}{
1904 \northeast
1905 \pgf@x=0cm
1906 }
1907 \anchor{east}{%
1908 \northeast
1909 \pgf@y=0cm
1910 }
1911 \anchor{south}{%
1912 \southwest
1913 \pgf@x=0cm
1914 }
1915 \anchor{west}{
1916 \southwest
1917 \pgf@y=0cm
1918 }
1919 \anchor{right}{
1920 \northeast
1921 \pgf@y=0cm
1922 }
1923 \anchor{above}{
1924 \northeast
1925 \pgf@x=0cm
1926 }
1927 \anchor{left}{%
1928 \southwest
1929 \pgf@y=0cm
1930 }
1931 \anchor{below}{%
1932 \southwest
1933 \pgf@x=0cm
1934 }
1935 \anchor{a}{%
1936 \northeast
1937 \pgf@y=0cm
1938 }
1939 \anchor{b} {
1940 \southwest
1941 \pgf@y=0cm
1942 }
1943 \savedanchor{\textanchor}{%
1944 \pgf@y=\ht\pgfnodeparttextbox
1945 \pgf@x=-.5\wd\pgfnodeparttextbox
1946 }
1947 \anchor{text}{%
1948 \textanchor
1949 }
1950 \anchorborder{%
1951 \ifpgf@circuit@bipole@inverted
1952 \pgf@circ@res@left=-\pgf@x
1953 \pgf@circ@res@right=-\pgf@y
1954 \else
1955 \pgf@circ@res@left=\pgf@x
1956 \pgf@circ@res@right=\pgf@y
1957 \fi
1958 \ifdim\pgf@circ@res@right>0cm
1959 \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\northeastborder}
1960 \else
1961 \southwestborder
1962 \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\pgfpoint{-\pgf@x}{-\pgf@y}}
1963 \fi
1964 }
1965
1966 #1
1967
1968 \backgroundpath{
1969 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1970
1971 \northeast
1972 \pgf@circ@res@up = \pgf@y
1973 \pgf@circ@res@zero = 0cm
1974 \pgf@circ@res@left = -\pgf@x
1975 \pgf@circ@res@right = \pgf@x
1976 \southwest
1977 \pgf@circ@res@down = \pgf@y
1978
1979 \pgfstartlinewidth=\pgflinewidth
1980 \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
1981 #6
1982
1983 \pgfsetlinewidth{\pgfstartlinewidth}
1984 }
1985 }
1986 }
1987
1988 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1989 %% Standard bipole shapes declarations
1990
1991 %% Resistor
1992 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/resistor/height}}{resistor}{\ctikzvalof{bipoles/resistor/height}}{\ctikzvalof{bipoles/resistor/width}}{
1993 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1994 \pgftransformationadjustments
1995 \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
1996 \divide \pgf@circ@res@step by 12
1997
1998 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
1999 \pgf@circ@res@other = \pgf@circ@res@left
2000 \advance\pgf@circ@res@other by \pgf@circ@res@step
2001 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
2002 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2003 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2004 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2005 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
2006 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2007 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2008 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2009 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
2010 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2011 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2012 \advance\pgf@circ@res@other by \pgf@circ@res@step
2013 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
2014 \pgfsetbeveljoin
2015 \pgfusepath{draw}
2016 }
2017
2018
2019
2020 %% Variable resistor
2021 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistor/height}}{vresistor}{\ctikzvalof{bipoles/vresistor/height}}{\ctikzvalof{bipoles/vresistor/width}}{ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2022 \pgftransformationadjustments
2023 \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
2024 \divide \pgf@circ@res@step by 12
2025
2026 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
2027
2028 \pgf@circ@res@other = \pgf@circ@res@left
2029 \advance\pgf@circ@res@other by \pgf@circ@res@step
2030 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
2031 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2032 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
2033 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2034 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
2035 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2036 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
2037 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2038 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
2039 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2040 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
2041 \advance\pgf@circ@res@other by \pgf@circ@res@step
2042 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
2043 \pgfsetbeveljoin
2044 \pgfusepath{draw}
2045
2046 \pgfscope
2047 \pgfsetarrowsend{latex'}
2048 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@other}{\pgf@circ@res@up}}
2049 \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@other}{\pgf@circ@res@down}}
2050 \pgfusepath{draw}
2051 \endpgfscope
2052 }
2053
2054
2055
2056 %% Capacitor
2057
2058 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/capacitor/height}}{capacitor}{\ctikzvalof{bipoles/capacitor/height}}{\ctikzvalof{bipoles/capacitor/width}}{
2059 \pgf@circ@res@step = \ctikzvalof{bipoles/capacitor/width}\pgf@circ@Rlen
2060 \divide \pgf@circ@res@step by 5
2061
2062 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2063 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2064 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
2065
2066 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2067 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2068 \pgfusepath{draw}
2069 }
2070
2071
2072 %% Polar Capacitor
2073
2074 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pcapacitor/height}}{polarcapacitor}{\ctikzvalof{bipoles/pcapacitor/height}}{\ctikzvalof{bipoles/pcapacitor/width}}{
2075 \pgf@circ@res@step = \ctikzvalof{bipoles/pcapacitor/width}\pgf@circ@Rlen
2076 \divide \pgf@circ@res@step by 5
2077
2078 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2079
2080 \pgfscope
2081 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left+ \ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}{\pgf@circ@res@up}}
2082 \pgftransformrotate{-90}
2083 \pgfpathsine{\pgfpoint{\pgf@circ@res@up}{-\ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}}
2084 \pgfpathcosine{\pgfpoint{\pgf@circ@res@up}{\ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}}
2085 \pgfusepath{draw}
2086 \endpgfscope
2087
2088 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2089 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2090 \pgfusepath{draw}
2091
2092 }
2093
2094 %% Electrolytic Capacitor
2095
2096 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ecapacitor/height}}{ecapacitor}{\ctikzvalof{bipoles/ecapacitor/height}}{\ctikzvalof{bipoles/ecapacitor/width}}{
2097 \pgf@circ@res@step = \ctikzvalof{bipoles/ecapacitor/width}\pgf@circ@Rlen
2098 \divide \pgf@circ@res@step by 5
2099 \pgfsetrectcap
2100 % % % Draw plus pole
2101 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2102 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2103 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@up}}
2104 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
2105 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
2106 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2107 \pgfsetfillcolor{white}
2108 \pgfusepath{draw,fill}
2109 % % Draw minus pole
2110 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2111 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2112 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@down}}
2113 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2114 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2115 \pgfsetfillcolor{black}
2116 \pgfusepath{draw,fill}
2117 \pgfsetfillcolor{black}
2118 % % plus pole annotation
2119 \pgftext[right,at=\pgfpoint{1.2\pgf@circ@res@left}{.6\pgf@circ@res@up}]
2120 {\pgfkeysvalueof{/tikz/circuitikz/bipoles/ecapacitor/font} $+$}
2121 }
2122
2123 %% Battery
2124
2125 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery/height}}{battery}{\ctikzvalof{bipoles/battery/height}}{\ctikzvalof{bipoles/battery/width}}{
2126 \pgf@circ@res@step = \ctikzvalof{bipoles/battery/width}\pgf@circ@Rlen
2127 \divide \pgf@circ@res@step by 6
2128
2129 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2130 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2131 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
2132
2133 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{.5\pgf@circ@res@up}}
2134 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{.5\pgf@circ@res@down}}
2135
2136 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2137 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
2138
2139 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}
2140 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}
2141
2142 \pgfusepath{draw}
2143 }
2144
2145
2146 %% Battery 1 % poles with equl thickness
2147
2148 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery1/height}}{battery1}{\ctikzvalof{bipoles/battery1/height}}{\ctikzvalof{bipoles/battery1/width}}{
2149 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{0}}
2150 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
2151 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{0}}
2152 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}}
2153 \pgfusepath{draw}
2154
2155 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2156 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@up}}
2157 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@down}}
2158
2159 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@up}}
2160 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@down}}
2161 \pgfusepath{draw}
2162 }
2163
2164 %% Battery 2 % negative pole thicker
2165
2166 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery2/height}}{battery2}{\ctikzvalof{bipoles/battery2/height}}{\ctikzvalof{bipoles/battery2/width}}{
2167 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{0}}
2168 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
2169 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{0}}
2170 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}}
2171 \pgfusepath{draw}
2172
2173 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2174 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@up}}
2175 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@down}}
2176 \pgfusepath{draw}
2177 \pgfsetlinewidth{3\pgflinewidth}
2178 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@up}}
2179 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@down}}
2180 \pgfusepath{draw}
2181 }
2182
2183
2184 %% cute inductor
2185
2186 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/lower coil height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
2187 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2188 \pgftransformationadjustments
2189
2190 \pgfmathsetlength{\pgf@circ@res@other}%width of small coil
2191 {0.5*\ctikzvalof{bipoles/cuteinductor/coil aspect}*\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/cuteinductor/coils}-1)}
2192
2193
2194 \pgfmathsetlength{\pgf@circ@res@step}
2195 {(\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/cuteinductor/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/cuteinductor/coils}/2}
2196
2197 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
2198 \foreach \x in {2,...,\ctikzvalof{bipoles/cuteinductor/coils}}
2199 {
2200 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up}
2201 \pgfpatharc{0}{-180}{\pgf@circ@res@other and -\pgf@circ@res@down}
2202 }
2203 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up}
2204 \pgfsetbuttcap
2205 \pgfsetbeveljoin
2206 \pgfusepath{stroke}
2207 }
2208
2209 %% variable cute inductor
2210
2211 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcuteinductor/lower coil height}}{vcuteinductor}{\ctikzvalof{bipoles/vcuteinductor/height}}{\ctikzvalof{bipoles/vcuteinductor/width}}{
2212 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2213 \pgftransformationadjustments
2214
2215 \pgfmathsetlength{\pgf@circ@res@other}%width of small coil
2216 {0.5*\ctikzvalof{bipoles/vcuteinductor/coil aspect}*\ctikzvalof{bipoles/vcuteinductor/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/vcuteinductor/coils}-1)}
2217
2218
2219 \pgfmathsetlength{\pgf@circ@res@step}
2220 {(\ctikzvalof{bipoles/vcuteinductor/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/vcuteinductor/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/vcuteinductor/coils}/2}
2221
2222 \pgfscope
2223 \pgfsetarrowsend{latex'}
2224 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
2225 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2226 \pgfusepath{draw}
2227 \endpgfscope
2228
2229 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
2230 \foreach \x in {2,...,\ctikzvalof{bipoles/vcuteinductor/coils}}
2231 {
2232 \pgfpatharc{180}{0}{\pgf@circ@res@step and .5\pgf@circ@res@up}
2233 \pgfpatharc{0}{-180}{\pgf@circ@res@other and -.5\pgf@circ@res@down}
2234 }
2235 \pgfpatharc{180}{0}{\pgf@circ@res@step and .5\pgf@circ@res@up}
2236 \pgfsetbuttcap
2237 \pgfsetbeveljoin
2238 \pgfusepath{stroke}
2239 }
2240
2241 %% american inductor
2242
2243 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/americaninductor/height 2}}{americaninductor}{\ctikzvalof{bipoles/americaninductor/height}}{\ctikzvalof{bipoles/americaninductor/width}}{
2244 \pgf@circ@res@step=\ctikzvalof{bipoles/americaninductor/width}\pgf@circ@Rlen
2245 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2246 \pgftransformationadjustments
2247 \advance \pgf@circ@res@step by \pgfhorizontaltransformationadjustment\pgflinewidth
2248 \divide \pgf@circ@res@step by \ctikzvalof{bipoles/americaninductor/coils}
2249 \divide \pgf@circ@res@step by 2
2250 \pgf@circ@res@other = \ctikzvalof{bipoles/americaninductor/coil height}\pgf@circ@Rlen
2251
2252 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
2253 \foreach \x in {1,...,\ctikzvalof{bipoles/americaninductor/coils}}
2254 {
2255 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2256 }
2257 \pgfsetbuttcap
2258 \pgfsetbeveljoin
2259 \pgfusepath{stroke}
2260 }
2261
2262 %% variable american inductor
2263
2264 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{
2265 \pgf@circ@res@step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf@circ@Rlen
2266 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2267 \pgftransformationadjustments
2268 \advance \pgf@circ@res@step by \pgfhorizontaltransformationadjustment\pgflinewidth
2269 \divide \pgf@circ@res@step by \ctikzvalof{bipoles/vamericaninductor/coils}
2270 \divide \pgf@circ@res@step by 2
2271 \pgf@circ@res@other = \ctikzvalof{bipoles/vamericaninductor/coil height}\pgf@circ@Rlen
2272
2273 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
2274 \foreach \x in {1,...,\ctikzvalof{bipoles/vamericaninductor/coils}}
2275 {
2276 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2277 }
2278 \pgfsetbuttcap
2279 \pgfsetbeveljoin
2280 \pgfusepath{stroke}
2281
2282 \pgfscope
2283 \pgfsetarrowsend{latex'}
2284 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
2285 \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@up}}
2286 \pgfusepath{draw}
2287 \endpgfscope
2288 }
2289
2290
2291 %% Independent voltage source
2292
2293 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsource/height}}{vsource}{\ctikzvalof{bipoles/vsource/height}}{\ctikzvalof{bipoles/vsource/width}}{
2294
2295 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2296
2297 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2298 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2299 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2300 \pgfusepath{draw}
2301 }
2302
2303
2304 %% Independent voltage source - American style
2305
2306 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourceam/height}}{vsourceAM}{\ctikzvalof{bipoles/vsourceam/height}}{\ctikzvalof{bipoles/vsourceam/width}}{
2307
2308 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2309 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2310 \pgfusepath{draw}
2311 \ifpgf@circ@oldvoltagedirection
2312 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$+$}
2313 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$-$}
2314 \else
2315 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$-$}
2316 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$+$}
2317 \fi
2318 }
2319
2320
2321
2322 %% Independent sinusoidal voltage source
2323
2324 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesin/height}}{vsourcesin}{\ctikzvalof{bipoles/vsourcesin/height}}{\ctikzvalof{bipoles/vsourcesin/width}}{
2325
2326 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2327 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2328 \pgfusepath{draw}
2329
2330 \pgf@circ@res@up = .5\pgf@circ@res@up
2331 \pgfscope
2332 \pgftransformrotate{90}
2333 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2334 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2335 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2336 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2337 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2338 \pgfusepath{draw}
2339 \endpgfscope
2340 }
2341
2342 % Triangle Voltage source - contributed by Ralf Farkas
2343 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcetri/height}}{vsourcetri}{\ctikzvalof{bipoles/vsourcetri/height}}{\ctikzvalof{bipoles/vsourcetri/width}}{
2344
2345 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2346 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2347 \pgfusepath{draw}
2348
2349 \pgf@circ@res@up = .5\pgf@circ@res@up
2350 \pgfscope
2351 \pgftransformrotate{90}
2352 \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}}
2353 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@up}{0.75\pgf@circ@res@up}}
2354 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@up}{-0.75\pgf@circ@res@up}}
2355 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}}
2356 \pgfusepath{draw}
2357 \endpgfscope
2358 }
2359
2360
2361 % Square Voltage source - contributed by Alistair Kwan
2362 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesquare/height}}{vsourcesquare}{\ctikzvalof{bipoles/vsourcesquare/height}}{\ctikzvalof{bipoles/vsourcesquare/width}}{
2363 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2364 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2365 \pgfusepath{draw}
2366 \pgf@circ@res@up = .5\pgf@circ@res@up
2367 \pgfscope
2368 \pgftransformrotate{90}
2369 \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}}
2370 \pgfpathlineto{\pgfpoint{-1\pgf@circ@res@up}{1\pgf@circ@res@up}}
2371 \pgfpathlineto{\pgfpoint{0\pgf@circ@res@up}{1\pgf@circ@res@up}}
2372 \pgfpathlineto{\pgfpoint{0\pgf@circ@res@up}{-1\pgf@circ@res@up}}
2373 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{-1\pgf@circ@res@up}}
2374 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}}
2375 \pgfusepath{draw}
2376 \endpgfscope
2377 }
2378
2379 % Triangle Voltage source - contributed by Ralf Farkas
2380 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcetri/height}}{vsourcetri}{\ctikzvalof{bipoles/vsourcetri/height}}{\ctikzvalof{bipoles/vsourcetri/width}}{
2381
2382 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2383 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2384 \pgfusepath{draw}
2385
2386 \pgf@circ@res@up = .5\pgf@circ@res@up
2387 \pgfscope
2388 \pgftransformrotate{90}
2389 \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}}
2390 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@up}{0.75\pgf@circ@res@up}}
2391 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@up}{-0.75\pgf@circ@res@up}}
2392 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}}
2393 \pgfusepath{draw}
2394 \endpgfscope
2395 }
2396
2397
2398 %% Empty Source
2399 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/esource/height}}{esource}{\ctikzvalof{bipoles/esource/height}}{\ctikzvalof{bipoles/esource/width}}{
2400 \pgfpointorigin
2401 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2402 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2403 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2404 \pgfusepath{draw}
2405 }
2406
2407 %% PV Source
2408 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pvsource/height}}{pvsource}{\ctikzvalof{bipoles/pvsource/height}}{\ctikzvalof{bipoles/pvsource/width}}{
2409 \pgfpointorigin
2410 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2411 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2412 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2413 \pgfusepath{draw}
2414
2415 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@right}{0}}
2416 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
2417 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@left}{0}}
2418 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}}
2419 \pgfusepath{draw}
2420
2421 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2422 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@left}{.4\pgf@circ@res@up}}
2423 \pgfpathlineto{\pgfpoint{.15\pgf@circ@res@left}{.4\pgf@circ@res@down}}
2424
2425 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@right}{.6\pgf@circ@res@up}}
2426 \pgfpathlineto{\pgfpoint{.15\pgf@circ@res@right}{.6\pgf@circ@res@down}}
2427 \pgfusepath{draw}
2428
2429 %Arrow Part
2430 \pgfscope
2431 \pgfsetarrowsend{latex}
2432 \pgfpathmoveto{\pgfpointadd{\pgfpoint{.3\pgf@circ@res@left}{0}}{\pgfpointpolar{-45}{2.2\pgf@circ@res@up}}}
2433 \pgfpathlineto{\pgfpointadd{\pgfpoint{.3\pgf@circ@res@left}{0}}{\pgfpointpolar{-45}{1.3\pgf@circ@res@up}}}
2434 \pgfusepath{draw}
2435 \pgfpathmoveto{\pgfpointadd{\pgfpoint{0}{0.3\pgf@circ@res@up}}{\pgfpointpolar{-45}{2.2\pgf@circ@res@up}}}
2436 \pgfpathlineto{\pgfpointadd{\pgfpoint{0}{0.3\pgf@circ@res@up}}{\pgfpointpolar{-45}{1.3\pgf@circ@res@up}}}
2437 \pgfusepath{draw}
2438 \endpgfscope
2439
2440 }
2441
2442 %% Empty Source
2443 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/esource/height}}{esource}{\ctikzvalof{bipoles/esource/height}}{\ctikzvalof{bipoles/esource/width}}{
2444 \pgfpointorigin
2445 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2446 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2447 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2448 \pgfusepath{draw}
2449 }
2450
2451 %% DC Current Source with open shape
2452 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dcisource/height}}{dcisource}{\ctikzvalof{bipoles/dcisource/height}}{\ctikzvalof{bipoles/dcisource/width}}{
2453 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2454 \pgfpathmoveto{\pgfpointorigin}
2455 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}}\pgfpatharc{0}{90}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2456 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}}\pgfpatharc{0}{-90}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2457 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}\pgfpatharc{180}{270}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2458 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}\pgfpatharc{180}{90}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2459 \pgfusepath{draw}
2460
2461 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2462 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@zero}}
2463 \pgfusepath{draw}
2464 \pgfscope
2465
2466 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2467 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
2468 \endpgfscope
2469 }
2470
2471 %% DC-Voltage source
2472 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dcvsource/height}}{dcvsource}{\ctikzvalof{bipoles/dcvsource/height}}{\ctikzvalof{bipoles/dcvsource/width}}{
2473 \pgfpointorigin
2474 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2475 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2476 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2477 \pgfusepath{draw}
2478 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@up}{.5\pgf@circ@res@left}}
2479 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@up}{.5\pgf@circ@res@right}}
2480 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@down}{.5\pgf@circ@res@left}}
2481 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@down}{.5\pgf@circ@res@right}}
2482 \pgfusepath{draw}
2483 }
2484
2485
2486 %% Independent current source
2487
2488 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isource}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
2489 \pgfpointorigin
2490 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2491 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2492 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2493 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
2494 \pgfusepath{draw}
2495 }
2496
2497 %% Independent double oo source
2498
2499 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/oosource/height}}{oosource}{\ctikzvalof{bipoles/oosource/height}}{\ctikzvalof{bipoles/oosource/width}}{
2500 \pgfpointorigin
2501 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2502 \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf@circ@res@left}{0}}
2503 {\ctikzvalof{bipoles/oosource/circlesize}\pgf@circ@res@left}
2504 \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf@circ@res@right}{0}}
2505 {\ctikzvalof{bipoles/oosource/circlesize}\pgf@circ@res@right}
2506 \pgfusepath{draw}
2507 }
2508
2509
2510 %% Independent current source - American
2511
2512 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isourceam/height}}{isourceAM}{\ctikzvalof{bipoles/isourceam/height}}{\ctikzvalof{bipoles/isourceam/width}}{
2513 \pgfpointorigin
2514 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2515 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2516 \pgfusepath{draw}
2517
2518 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2519 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@zero}}
2520 \pgfusepath{draw}
2521 \pgfscope
2522 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2523 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
2524 \endpgfscope
2525 }
2526
2527
2528 %% Independent sinusoidal current source
2529
2530 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isourcesin}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
2531 \pgfpointorigin
2532 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2533 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2534 \pgfusepath{draw}
2535
2536 \pgf@circ@res@up = .5\pgf@circ@res@up
2537 \pgfscope
2538 \pgftransformrotate{90}
2539 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2540 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2541 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2542 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2543 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2544 \pgfusepath{draw}
2545 \endpgfscope
2546
2547 }
2548
2549
2550 %% Controlled voltage source
2551
2552 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsource/height}}{cvsource}{\ctikzvalof{bipoles/cvsource/height}}{\ctikzvalof{bipoles/cvsource/width}}{
2553
2554 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2555
2556 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2557 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2558 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2559 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2560 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2561 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2562 \pgfusepath{draw}
2563 }
2564
2565
2566
2567
2568 %% Controlled voltage source - American
2569 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourceam/height}}{cvsourceAM}{\ctikzvalof{bipoles/cvsourceam/height}}{\ctikzvalof{bipoles/cvsourceam/width}}{
2570 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2571 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2572 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2573 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2574 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2575 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2576 \pgfusepath{draw}
2577
2578 \ifpgf@circ@oldvoltagedirection
2579 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@left]{$+$}
2580 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@right]{$-$}
2581 \else
2582 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@left]{$-$}
2583 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@right]{$+$}
2584 \fi
2585 }
2586
2587
2588 %% Controlled sinusoidal voltage source
2589 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cvsourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
2590
2591 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2592
2593 \pgfscope
2594 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2595 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2596 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2597 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2598 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2599 \pgfusepath{draw}
2600 \endpgfscope
2601
2602 \pgf@circ@res@up = .5\pgf@circ@res@up
2603 \pgfscope
2604 \pgftransformrotate{90}
2605 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2606 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2607 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2608 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2609 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2610 \pgfusepath{draw}
2611 \endpgfscope
2612 }
2613
2614
2615
2616 %% Controlled sinusoidal current source
2617
2618 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cisourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
2619
2620 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2621
2622 \pgfscope
2623 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2624 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2625 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2626 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2627 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2628 \pgfusepath{draw}
2629 \endpgfscope
2630
2631 \pgf@circ@res@up = .5\pgf@circ@res@up
2632 \pgfscope
2633 \pgftransformrotate{90}
2634 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2635 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2636 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2637 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2638 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2639 \pgfusepath{draw}
2640 \endpgfscope
2641 }
2642
2643
2644
2645
2646 %% Controlled current source
2647
2648 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisource/height}}{cisource}{\ctikzvalof{bipoles/cisource/height}}{\ctikzvalof{bipoles/cisource/width}}{
2649
2650 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2651
2652 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2653 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2654 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2655 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2656 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2657 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2658 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2659 \pgfusepath{draw}
2660 }
2661
2662
2663
2664
2665 %% Controlled current source - American
2666
2667 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisourceam/height}}{cisourceAM}{\ctikzvalof{bipoles/cisourceam/height}}{\ctikzvalof{bipoles/cisourceam/width}}{
2668
2669 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2670
2671 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2672 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2673 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2674 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2675 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2676 \pgfusepath{draw}
2677
2678 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2679 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@zero}}
2680 \pgfusepath{draw}
2681 \pgfscope
2682 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2683 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
2684 \endpgfscope
2685 }
2686
2687 %% Black generic diode
2688
2689 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulldiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2690
2691 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2692
2693 \pgfscope
2694 \pgftransformxshift{\pgf@circ@res@left}
2695 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2696 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2697 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2698 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2699 \pgfusepath{draw,fill}
2700 \endpgfscope
2701 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2702 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2703 \pgfusepath{draw}
2704 }
2705
2706 %% Black Zener diode
2707
2708 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2709
2710 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2711
2712 \pgfscope
2713 \pgftransformxshift{\pgf@circ@res@left}
2714 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2715 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2716 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2717 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2718 \pgfusepath{draw,fill}
2719 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2720 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2721 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2722 \pgfusepath{draw}
2723 \endpgfscope
2724 }
2725
2726 %% Black alternative zigzag Zener diode
2727 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2728
2729 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2730
2731 \pgfscope
2732 \pgftransformxshift{\pgf@circ@res@left}
2733 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2734 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2735 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2736 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2737 \pgfusepath{draw,fill}
2738 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@up}}
2739 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2740 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2741 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@down}}
2742 \pgfusepath{draw}
2743 \endpgfscope
2744 }
2745
2746 %% Black Schottky diode
2747
2748 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullsdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2749
2750 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2751 \pgfscope
2752 \pgftransformxshift{\pgf@circ@res@left}
2753 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2754 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2755 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2756 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2757 \pgfusepath{draw,fill}
2758
2759 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@down}}
2760 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
2761 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2762 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2763 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2764 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2765 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@up}}
2766 \pgfusepath{draw}
2767 \endpgfscope
2768
2769 }
2770
2771 %% Black tunnel diode
2772
2773 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulltdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2774
2775 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2776 \pgfscope
2777 \pgftransformxshift{\pgf@circ@res@left}
2778 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2779 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2780 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2781 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2782 \pgfusepath{draw,fill}
2783
2784 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
2785 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2786 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2787 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2788 \pgfusepath{draw}
2789 \endpgfscope
2790 }
2791
2792 %% Black light emitting diode
2793
2794 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulllediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2795
2796 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2797 \pgfscope
2798 \pgftransformxshift{\pgf@circ@res@left}
2799 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2800 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2801 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2802 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2803 \pgfusepath{draw,fill}
2804 \endpgfscope
2805 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2806 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2807 \pgfusepath{draw}
2808
2809 \pgfsetlinewidth{\pgfstartlinewidth}
2810 \pgfsetarrowsend{latex'}
2811 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2812 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
2813 \pgfusepath{draw}
2814 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
2815 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
2816 \pgfusepath{draw}
2817
2818 }
2819
2820 %% Black photodiode
2821
2822 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullpdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2823
2824 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2825 \pgfscope
2826 \pgftransformxshift{\pgf@circ@res@left}
2827 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2828 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2829 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2830 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2831 \pgfusepath{draw,fill}
2832 \endpgfscope
2833 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2834 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2835 \pgfusepath{draw}
2836
2837 \pgfsetlinewidth{\pgfstartlinewidth}
2838 \pgfsetarrowsstart{latex'}
2839 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2840 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
2841 \pgfusepath{draw}
2842 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
2843 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
2844 \pgfusepath{draw}
2845 }
2846
2847 %% Black varcap
2848
2849 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{fullvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
2850 \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
2851 \pgfsetlinewidth{\pgf@circ@res@temp}
2852 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
2853 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2854 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
2855 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
2856 \pgfusepath{draw,fill}
2857 %
2858 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@down}}
2859 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@up}}
2860 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2861 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2862 \pgfusepath{draw}
2863 }
2864
2865 %% Empty generic diode
2866
2867 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptydiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2868
2869
2870 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2871
2872 \pgfscope
2873 \pgftransformxshift{\pgf@circ@res@left}
2874 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2875 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2876 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2877 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2878 \pgfusepath{draw}
2879 \endpgfscope
2880 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2881 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2882 \pgfusepath{draw}
2883 }
2884
2885 %% Empty Zener diode
2886
2887 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2888
2889 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2890
2891 \pgfscope
2892 \pgftransformxshift{\pgf@circ@res@left}
2893 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2894 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2895 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2896 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2897 \pgfusepath{draw}
2898 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2899 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2900 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2901 \pgfusepath{draw}
2902 \endpgfscope
2903 }
2904
2905 %% Empty alternative zigzag Zener diode
2906 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2907
2908 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2909
2910 \pgfscope
2911 \pgftransformxshift{\pgf@circ@res@left}
2912 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2913 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2914 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2915 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2916 \pgfusepath{draw}
2917 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@up}}
2918 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2919 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2920 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@down}}
2921 \pgfusepath{draw}
2922 \endpgfscope
2923 }
2924 %% Empty Schottky diode
2925
2926 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptysdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2927
2928 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2929 \pgfscope
2930 \pgftransformxshift{\pgf@circ@res@left}
2931 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2932 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2933 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2934 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2935 \pgfusepath{draw}
2936
2937 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@down}}
2938 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
2939 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2940 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2941 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2942 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2943 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@up}}
2944 \pgfusepath{draw}
2945 \endpgfscope
2946
2947 }
2948
2949 %% Empty tunnel diode
2950
2951 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptytdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2952
2953 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2954 \pgfscope
2955 \pgftransformxshift{\pgf@circ@res@left}
2956 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2957 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2958 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2959 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2960 \pgfusepath{draw}
2961
2962 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
2963 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2964 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2965 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2966 \pgfusepath{draw}
2967 \endpgfscope
2968 }
2969
2970 %% Empty light emitting diode
2971
2972 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptylediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2973
2974 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2975 \pgfscope
2976 \pgftransformxshift{\pgf@circ@res@left}
2977 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2978 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2979 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2980 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2981 \pgfusepath{draw}
2982 \endpgfscope
2983 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2984 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2985 \pgfusepath{draw}
2986
2987 \pgfsetlinewidth{\pgfstartlinewidth}
2988 \pgfsetarrowsend{latex'}
2989 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2990 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
2991 \pgfusepath{draw}
2992 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
2993 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
2994 \pgfusepath{draw}
2995 }
2996
2997 %% Empty photodiode
2998
2999 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptypdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3000
3001 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3002 \pgfscope
3003 \pgftransformxshift{\pgf@circ@res@left}
3004 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3005 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3006 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3007 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3008 \pgfusepath{draw}
3009 \endpgfscope
3010 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3011 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3012 \pgfusepath{draw}
3013
3014 \pgfsetlinewidth{\pgfstartlinewidth}
3015 \pgfsetarrowsstart{latex'}
3016 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
3017 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
3018 \pgfusepath{draw}
3019 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
3020 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
3021 \pgfusepath{draw}
3022 }
3023
3024 %% Empty varcap
3025
3026 \pgfcircdeclarebipole{
3027 \anchor{strokepathstart}{
3028 \northeast
3029 \pgf@y=0cm
3030 \advance\pgf@x by -\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth
3031 \advance\pgf@x by -\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth
3032 }
3033 \anchor{strokepathend}{
3034 \northeast
3035 \pgf@y=0cm
3036 }
3037 }{\ctikzvalof{bipoles/varcap/height}}{emptyvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
3038 \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3039 \pgfsetlinewidth{\pgf@circ@res@temp}
3040 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
3041 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3042 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3043 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
3044 \pgfusepath{draw}
3045 %
3046 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@down}}
3047 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@up}}
3048 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3049 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3050 \pgfusepath{draw}
3051 }
3052
3053 %% (Closing) SPST
3054 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/spst/depth}}{cspst}{\ctikzvalof{bipoles/spst/height}}{\ctikzvalof{bipoles/spst/width}}{
3055 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3056 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3057 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
3058 \pgfusepath{draw}
3059
3060 \pgfsetarrowsstart{latex'}
3061 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@right}{\pgf@circ@res@down}}
3062 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{0\pgf@circ@res@down}}
3063 \pgfpatharcto{1.2\pgf@circ@res@right}{1.2\pgf@circ@res@right}{0}{0}{1}{\pgfpoint{.9\pgf@circ@res@left}{.9\pgf@circ@res@up}}
3064 \pgfsetbeveljoin
3065 \pgfusepath{draw}
3066 }
3067
3068 %% Opening SPST
3069 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/spst/depth}}{ospst}{\ctikzvalof{bipoles/spst/height}}{\ctikzvalof{bipoles/spst/width}}{
3070
3071 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3072 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3073 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
3074 \pgfusepath{draw}
3075
3076 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
3077 \pgfpatharcto{1.1\pgf@circ@res@right}{1.1\pgf@circ@res@right}{0}{0}{1}{\pgfpoint{.7\pgf@circ@res@left}{.9\pgf@circ@res@up}}
3078 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@left}{1\pgf@circ@res@up}}
3079 \pgfsetarrowsend{latex'}
3080 \pgfsetbeveljoin
3081 \pgfusepath{draw}
3082 }
3083
3084 %% Normal open Switch
3085 \pgfcircdeclarebipole{}{0}{nos}{\ctikzvalof{bipoles/nos/height}}{\ctikzvalof{bipoles/nos/width}}{
3086
3087 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3088 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3089 \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@right}{\pgf@circ@res@up}}
3090 \pgfsetbuttcap
3091 \pgfusepath{draw}
3092 }
3093
3094 %% Normal closed Switch
3095 \pgfcircdeclarebipole{}{0}{ncs}{\ctikzvalof{bipoles/ncs/height}}{\ctikzvalof{bipoles/ncs/width}}{
3096 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3097 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3098 \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@right}{\pgf@circ@res@up}}
3099 \pgfusepath{draw}
3100 \pgfsetlinewidth{\pgfstartlinewidth}
3101 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3102 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{0pt}}
3103 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{\pgf@circ@res@up}}
3104 \pgfusepath{draw}
3105 }
3106
3107 %% Push Button
3108 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pushbutton/height 2}}{pushbutton}{\ctikzvalof{bipoles/pushbutton/height}}{\ctikzvalof{bipoles/pushbutton/width}}{
3109 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3110 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@up}}
3111 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}
3112 \pgfpathmoveto{\pgfpoint{0}{.5\pgf@circ@res@up}}
3113 \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@up}}
3114 \pgfusepath{draw}
3115
3116 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3117 \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
3118 \pgftransformshift{\pgfpoint{2\pgf@circ@res@right}{0pt}}
3119 \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
3120 }
3121
3122 % % METERINGSHAPE
3123 \long\def\drawmeteringcircle{
3124 \def\pgf@circ@temp{right}
3125 \ifx\tikz@res@label@pos\pgf@circ@temp
3126 \pgf@circ@res@step=-1.2\pgf@circ@res@up
3127 \else
3128 \def\pgf@circ@temp{below}
3129 \ifx\tikz@res@label@pos\pgf@circ@temp
3130 \pgf@circ@res@step=-1.2\pgf@circ@res@up
3131 \else
3132 \pgf@circ@res@step=1.2\pgf@circ@res@up
3133 \fi
3134 \fi
3135 %draw connections to circle
3136 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3137 \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@left}{\pgf@circ@res@zero}}
3138 \pgfpathmoveto{\pgfpoint{.9\pgf@circ@res@right}{\pgf@circ@res@zero}}
3139 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
3140 \pgfusepath{draw}
3141 %draw circle
3142 \pgfscope
3143 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3144 \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
3145 \pgfusepath{draw}
3146 \endpgfscope
3147 %draw arrow
3148 \pgfscope
3149 \pgfsetarrowsend{latex}
3150 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3151 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3152 \pgfusepath{draw}
3153 \endpgfscope
3154 }
3155 %AMPEREMETER
3156 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ammeter/height}}{ammeter}{\ctikzvalof{bipoles/ammeter/height}}{\ctikzvalof{bipoles/ammeter/width}}{
3157 \drawmeteringcircle
3158 \pgfnode{circle}{center}{\textbf{A}}{}{}
3159 }
3160 %OHMMETER
3161 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ohmmeter/height}}{ohmmeter}{\ctikzvalof{bipoles/ohmmeter/height}}{\ctikzvalof{bipoles/ohmmeter/width}}{
3162 \drawmeteringcircle
3163 \pgfnode{circle}{center}{\boldmath$\Omega$}{}{}
3164 }
3165 %VOLTMETER
3166 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/voltmeter/height}}{voltmeter}{\ctikzvalof{bipoles/voltmeter/height}}{\ctikzvalof{bipoles/voltmeter/width}}{
3167 \drawmeteringcircle
3168 \pgfnode{circle}{center}{\textbf{V}}{}{}
3169
3170 }
3171
3172 %% Short circuit
3173
3174 \pgfcircdeclarebipole{}{0}{short}{0}{0}{ }
3175
3176 %% Open circuit
3177
3178 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/open/height}}{open}{\ctikzvalof{bipoles/open/height}}{\ctikzvalof{bipoles/open/width}}{
3179
3180 }
3181
3182 %% Generic bipole - used as resistor by some (bleah)
3183
3184 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/generic/height}}{generic}{\ctikzvalof{bipoles/generic/height}}{\ctikzvalof{bipoles/generic/width}}{
3185
3186 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3187 %\divide \pgf@circ@res@step by 14
3188
3189 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3190 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3191
3192 \pgfusepath{draw}
3193 }
3194
3195
3196 %% fuse
3197
3198 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fuse/height}}{fuse}{\ctikzvalof{bipoles/fuse/height}}{\ctikzvalof{bipoles/fuse/width}}{
3199
3200 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
3201 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
3202 \pgfusepath{draw}
3203
3204 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3205 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3206
3207 \pgfusepath{draw}
3208 }
3209
3210
3211
3212 %% Generic bipole, filled - used as inductor by some (bleah)
3213
3214 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fullgeneric/height}}{fullgeneric}{\ctikzvalof{bipoles/fullgeneric/height}}{\ctikzvalof{bipoles/fullgeneric/width}}{
3215
3216 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3217 %\divide \pgf@circ@res@step by 14
3218
3219 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3220 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3221
3222 \pgfusepath{draw,fill}
3223 }
3224
3225
3226 %% Generic asymmetric bipole
3227
3228 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ageneric/height}}{ageneric}{\ctikzvalof{bipoles/ageneric/height}}{\ctikzvalof{bipoles/ageneric/width}}{
3229 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3230 %\divide \pgf@circ@res@step by 14
3231
3232 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3233 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3234
3235 \pgfusepath{draw}
3236
3237 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3238 \pgfusepath{stroke,fill}
3239 }
3240
3241
3242 %% asymmetric fuse
3243
3244 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/afuse/height}}{afuse}{\ctikzvalof{bipoles/afuse/height}}{\ctikzvalof{bipoles/afuse/width}}{
3245
3246 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
3247 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
3248 \pgfusepath{draw}
3249
3250 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3251 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3252
3253 \pgfusepath{draw}
3254
3255 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3256 \pgfusepath{stroke,fill}
3257 }
3258
3259
3260
3261
3262 %% Memristor
3263
3264 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/memristor/height}}{memristor}{\ctikzvalof{bipoles/memristor/height}}{\ctikzvalof{bipoles/memristor/width}}{
3265 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3266 \divide \pgf@circ@res@step by 14
3267
3268 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3269 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3270
3271 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3272 \pgfpathlineto{\pgfpoint{.72*\pgf@circ@res@left}{0pt}}
3273 \pgfpathlineto{\pgfpoint{.72*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3274 \pgfpathlineto{\pgfpoint{.35*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3275 \pgfpathlineto{\pgfpoint{.35*\pgf@circ@res@left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3276 \pgfpathlineto{\pgfpoint{-.05*\pgf@circ@res@left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3277 \pgfpathlineto{\pgfpoint{-.05*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3278 \pgfpathlineto{\pgfpoint{.42*\pgf@circ@res@right}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3279 \pgfpathlineto{\pgfpoint{.42*\pgf@circ@res@right}{0pt}}
3280 \pgfpathlineto{\pgfpoint{.8*\pgf@circ@res@right}{0pt}}
3281
3282 \pgfusepath{draw}
3283
3284 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3285 \pgfusepath{stroke,fill}
3286 }
3287
3288
3289
3290
3291 %% Generic empty tunable
3292
3293 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tgeneric/height}}{tgeneric}{\ctikzvalof{bipoles/tgeneric/height}}{\ctikzvalof{bipoles/tgeneric/width}}{
3294 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}}
3295 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3296 \pgfusepath{draw}
3297
3298 \pgfscope
3299 \pgfsetarrowsend{latex'}
3300 \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}}
3301 \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}}
3302 \pgfusepath{draw}
3303 \endpgfscope
3304 }
3305
3306 %% Photoresistor
3307
3308 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/photoresistor/height 2}}{photoresistor}{\ctikzvalof{bipoles/photoresistor/height}}{\ctikzvalof{bipoles/photoresistor/width}}{
3309 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@down}}
3310 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3311 \pgfusepath{draw}
3312
3313 \pgfscope
3314 \pgfsetarrowsend{latex'}
3315 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}
3316 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{-1.2\pgf@circ@res@down}}
3317 \pgfusepath{draw}
3318 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@right}{\pgf@circ@res@up}}
3319 \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@right}{-1.2\pgf@circ@res@down}}
3320 \pgfusepath{draw}
3321 \endpgfscope
3322 }
3323
3324
3325
3326
3327 %% Thermistor
3328 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistor/height}}{thermistor}{\ctikzvalof{bipoles/thermistor/height}}{\ctikzvalof{bipoles/thermistor/width}}{
3329 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistor/main}\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistor/main}\pgf@circ@res@up}}
3330 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3331 \pgfusepath{draw}
3332
3333 %\pgfscope
3334 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}}
3335 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
3336 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3337 \pgfusepath{draw}
3338 %\endpgfscope
3339 }
3340
3341
3342 %% Thermistor PTC
3343 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorptc/height 2}}{thermistorptc}{\ctikzvalof{bipoles/thermistorptc/height}}{\ctikzvalof{bipoles/thermistorptc/width}}{
3344 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorptc/main}\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorptc/main}\pgf@circ@res@up}}
3345 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3346 \pgfusepath{draw}
3347
3348 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3349 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}}
3350 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
3351 \pgfusepath{draw}
3352
3353 \pgfsetlinewidth{\pgfstartlinewidth}
3354 \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$}
3355 \pgfsetarrowsend{latex'}
3356 \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}}
3357 \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3358 \pgfusepath{draw}
3359 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}}
3360 \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3361 \pgfusepath{draw}
3362 }
3363
3364 %% Thermistor NTC
3365 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorntc/height 2}}{thermistorntc}{\ctikzvalof{bipoles/thermistorntc/height}}{\ctikzvalof{bipoles/thermistorntc/width}}{
3366 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorntc/main}\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorntc/main}\pgf@circ@res@up}}
3367 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3368 \pgfusepath{draw}
3369
3370 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3371 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}}
3372 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
3373 \pgfusepath{draw}
3374
3375 \pgfsetlinewidth{\pgfstartlinewidth}
3376 \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$}
3377 \pgfsetarrowsend{latex'}
3378 \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}}
3379 \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3380 \pgfusepath{draw}
3381 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3382 \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}}
3383 \pgfusepath{draw}
3384 }
3385
3386 %% thermocouple
3387 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermocouple/height 2}}{thermocouple}{\ctikzvalof{bipoles/thermocouple/height}}{\ctikzvalof{bipoles/thermocouple/width}}{
3388
3389 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
3390 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
3391 \pgfusepath{draw}
3392 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
3393 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3394 \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@down}}
3395 \pgfusepath{draw}
3396 \pgfsetlinewidth{\pgfstartlinewidth}
3397 \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@down}}
3398 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}
3399 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
3400 \pgfusepath{draw}
3401 }
3402
3403 %% Varistor
3404 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varistor/height}}{varistor}{\ctikzvalof{bipoles/varistor/height}}{\ctikzvalof{bipoles/varistor/width}}{
3405 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/varistor/main}\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/varistor/main}\pgf@circ@res@up}}
3406 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3407 \pgfusepath{draw}
3408
3409 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}}
3410 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
3411 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3412 \pgfusepath{draw}
3413
3414 \pgftext[top,x=.65\pgf@circ@res@left,y=1.2\pgf@circ@res@down]{{\tiny\textsf{U}}}
3415 }
3416
3417
3418
3419 %% Generic full tunable
3420
3421 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tfullgeneric/height}}{tfullgeneric}{\ctikzvalof{bipoles/tfullgeneric/height}}{\ctikzvalof{bipoles/tfullgeneric/width}}{
3422 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3423 \divide \pgf@circ@res@step by 14
3424
3425 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}}
3426 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3427 \pgfusepath{draw,fill}
3428
3429 \pgfscope
3430 \pgfsetarrowsend{latex'}
3431 \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}}
3432 \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}}
3433 \pgfusepath{draw}
3434 \endpgfscope
3435 }
3436
3437
3438
3439
3440
3441
3442
3443 %% Variable Capacitor
3444
3445 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcapacitor/height}}{vcapacitor}{\ctikzvalof{bipoles/vcapacitor/height}}{\ctikzvalof{bipoles/vcapacitor/width}}{
3446 %\pgf@circ@res@step = \ctikzvalof{bipoles/vcapacitor/width}\pgf@circ@Rlen
3447 \pgf@circ@res@step = \ctikzvalof{bipoles/vcapacitor/capacitor width} \pgf@circ@res@right
3448
3449 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3450 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@up}}
3451 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@down}}
3452
3453 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
3454 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
3455 \pgfusepath{draw}
3456
3457 \pgfscope
3458 \pgfsetarrowsend{latex'}
3459 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3460 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3461 \pgfusepath{draw}
3462 \endpgfscope
3463
3464 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3465 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
3466 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3467 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3468 \pgfsetlinewidth{\pgfstartlinewidth}
3469 \pgfusepath{draw}
3470 }
3471
3472
3473 %% Piezoelectric Element
3474
3475 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piezoelectric/height}}{piezoelectric}{\ctikzvalof{bipoles/piezoelectric/height}}{\ctikzvalof{bipoles/piezoelectric/width}}{
3476 \pgf@circ@res@step = \ctikzvalof{bipoles/piezoelectric/width}\pgf@circ@Rlen
3477 \divide \pgf@circ@res@step by 5
3478
3479 %% Outer markings
3480 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3481 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3482 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3483
3484 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3485 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3486 \pgfusepath{draw}
3487
3488 %% Inner Box
3489 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3490 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left+4}{\pgf@circ@res@up-1}}{\pgfpoint{\pgf@circ@res@right-4}{\pgf@circ@res@down+1}}
3491 \pgfusepath{draw}
3492
3493 }
3494
3495
3496
3497
3498
3499 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3500 %% Handling of terminals
3501
3502
3503 %% Easily usable styles
3504
3505 \ctikzset{o-o/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=empty}}
3506 \ctikzset{-o/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=empty}}
3507 \ctikzset{o-/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=none}}
3508 \ctikzset{*-o/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=empty}}
3509 \ctikzset{o-*/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=full}}
3510 \ctikzset{d-o/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=empty}}
3511 \ctikzset{o-d/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=diamond}}
3512 \ctikzset{*-/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=none}}
3513 \ctikzset{-*/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=full}}
3514 \ctikzset{d-/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=none}}
3515 \ctikzset{-d/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=diamond}}
3516 \ctikzset{*-*/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=full}}
3517 \ctikzset{d-*/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=full}}
3518 \ctikzset{*-d/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=diamond}}
3519 \ctikzset{d-d/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=diamond}}
3520
3521 \ctikzset{.-/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=none}}
3522 \ctikzset{.-*/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=full}}
3523 \ctikzset{.-o/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=empty}}
3524 \ctikzset{.-d/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=diamond}}
3525 \ctikzset{-./.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
3526 \ctikzset{o-./.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
3527 \ctikzset{*-./.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
3528 \ctikzset{d-./.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
3529 \ctikzset{.-./.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
3530
3531 \tikzset{reversed/.style = {\circuitikzbasekey/bipole/inverted=true}}
3532
3533
3534 %% The output routine
3535
3536 \def\drawpoles{
3537 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{diamond} }
3538 \ifx\pgf@temp\pgf@circ@temp
3539 (\tikztostart) node[diamondpole] {}
3540 \else
3541 \pgfextra{ \def\pgf@temp{empty} }
3542 \ifx\pgf@temp\pgf@circ@temp
3543 (\tikztostart) node[ocirc] {}
3544 \else
3545 \pgfextra{ \def\pgf@temp{full} }
3546 \ifx\pgf@temp\pgf@circ@temp
3547 (\tikztostart) node[circ] {}
3548 \else
3549 \pgfextra{ \def\pgf@temp{rectjoinfill} }
3550 \ifx\pgf@temp\pgf@circ@temp
3551 (\tikztostart) node[rectjoinfill] {}
3552 \else
3553 \fi
3554 \fi
3555 \fi
3556 \fi
3557 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{diamond} }
3558 \ifx\pgf@temp\pgf@circ@temp
3559 (\tikztotarget) node[diamondpole] {}
3560 \else
3561 \pgfextra{ \def\pgf@temp{empty} }
3562 \ifx\pgf@temp\pgf@circ@temp
3563 (\tikztotarget) node[ocirc] {}
3564 \else
3565 \pgfextra{ \def\pgf@temp{full} }
3566 \ifx\pgf@temp\pgf@circ@temp
3567 (\tikztotarget) node[circ] {}
3568 \else
3569 \pgfextra{ \def\pgf@temp{rectjoinfill} }
3570 \ifx\pgf@temp\pgf@circ@temp
3571 (\tikztotarget) node[rectjoinfill] {}
3572 \else
3573 \fi
3574 \fi
3575 \fi
3576 \fi
3577 }
3578
3579
3580
3581 %% Lamp
3582
3583 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lamp/height}}{lamp}{\ctikzvalof{bipoles/lamp/height}}{\ctikzvalof{bipoles/lamp/width}}{
3584
3585 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3586
3587 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
3588 \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@up}}
3589 \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@down}}
3590 \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@down}}
3591 \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@up}}
3592 \pgfusepath{draw}
3593 }
3594
3595
3596 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tline/height}
3597 }{tline}{\ctikzvalof{bipoles/tline/height}
3598 }{\ctikzvalof{bipoles/tline/width}
3599 }
3600 {
3601 \pgf@circ@res@step=.2\pgf@circ@res@right % half x axis
3602 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3603 \pgfpathellipse{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{0}}
3604 {\pgfpoint{\pgf@circ@res@step}{0}}
3605 {\pgfpoint{0}{-\pgf@circ@res@up}}
3606 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@up}}
3607 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@step}{\pgf@circ@res@up}}
3608 \pgfpatharc{-90}{90}{-\pgf@circ@res@step and -\pgf@circ@res@up}
3609 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@down}}
3610 \pgfusepath{draw}
3611 }
3612
3613
3614
3615
3616 %% SQUID added by Cor Molenaar 5 March 2010
3617
3618 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/squid/height}}{squid}{\ctikzvalof{bipoles/squid/height}}{\ctikzvalof{bipoles/squid/width}}{
3619
3620 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3621
3622 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
3623 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{1.35*\pgf@circ@res@up}}
3624 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.65*\pgf@circ@res@up}}
3625 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.65*\pgf@circ@res@up}}
3626 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{1.35*\pgf@circ@res@up}}
3627 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{1.35*\pgf@circ@res@down}}
3628 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.65*\pgf@circ@res@down}}
3629 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.65*\pgf@circ@res@down}}
3630 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{1.35*\pgf@circ@res@down}}
3631
3632 \pgfusepath{draw}
3633 }
3634
3635
3636
3637 % Generic barrier added by Cor Molenaar 5 March 2010
3638
3639 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/barrier/height}}{barrier}{\ctikzvalof{bipoles/barrier/height}}{\ctikzvalof{bipoles/barrier/width}}{
3640
3641 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3642
3643 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@step}}
3644 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@step}}
3645 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@up}}
3646 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@down}}
3647 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@down}}
3648 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@up}}
3649
3650 \pgfusepath{draw}
3651 }
3652
3653
3654 % Contributed by Danilo Piazzalunga
3655
3656 \pgfdeclareshape{buffer}
3657 {
3658 \anchor{center}{\pgfpointorigin}
3659 \savedanchor\northwest{%
3660 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/height}\pgf@circ@Rlen
3661 \pgf@y=.5\pgf@y
3662 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/width}\pgf@circ@Rlen
3663 \pgf@x=.5\pgf@x
3664 }
3665 \anchor{south}{
3666 \northwest
3667 \pgf@y=-\pgf@y
3668 }
3669 \savedanchor\left{%
3670 \pgf@y=0pt
3671 }
3672 \anchor{in}{
3673 \northwest
3674 \pgf@y=0pt
3675 }
3676 \anchor{out}{
3677 \northwest
3678 \pgf@y=0pt
3679 \pgf@x=-\pgf@x
3680 }
3681
3682 \backgroundpath{
3683 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
3684
3685
3686 \northwest
3687 \pgf@circ@res@up = \pgf@y
3688 \pgf@circ@res@down = -\pgf@y
3689 \pgf@circ@res@right = -\pgf@x
3690 \pgf@circ@res@left = \pgf@x
3691
3692 \pgfscope
3693 \pgfsetlinewidth{2\pgflinewidth}
3694 \pgftransformxshift{.7\pgf@circ@res@left}
3695 \pgf@circ@res@step=\pgf@circ@res@right
3696 \advance\pgf@circ@res@step by -\pgf@circ@res@left
3697 \pgf@circ@res@step=.7\pgf@circ@res@step
3698
3699 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3700 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3701 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3702 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3703 \pgfusepath{draw}
3704 \endpgfscope
3705
3706 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3707 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
3708
3709 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3710 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
3711
3712 \pgfusepath{draw}
3713
3714 }
3715 }
3716
3717
3718
3719
3720
3721 \pgfdeclareshape{plain amp}
3722 {
3723 \anchor{center}{\pgfpointorigin}
3724 \savedanchor\northwest{%
3725 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@circ@Rlen
3726 \pgf@y=.5\pgf@y
3727 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@circ@Rlen
3728 \pgf@x=.5\pgf@x
3729 }
3730 \anchor{south}{
3731 \northwest
3732 \pgf@y=-\pgf@y
3733 }
3734 \savedanchor\left{%
3735 \pgf@y=0pt
3736 }
3737 \savedanchor\inOne{%
3738 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@circ@Rlen
3739 \pgf@y=.5\pgf@y
3740 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@y
3741 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@circ@Rlen
3742 \pgf@x=.5\pgf@x
3743 }
3744 \anchor{-}{
3745 \inOne
3746 }
3747 \anchor{+}{
3748 \inOne
3749 \pgf@y=-\pgf@y
3750 }
3751 \savedanchor\up{%
3752 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@circ@Rlen
3753 \pgf@y=.5\pgf@y
3754 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@circ@Rlen
3755 \pgf@x=.5\pgf@x
3756 \pgf@circ@res@up = \pgf@y
3757 \pgf@circ@res@right = -\pgf@x
3758 \pgf@circ@res@left = \pgf@x
3759 \pgfpointlineattime{
3760 \pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/up pos}}{
3761 \pgfpoint{
3762 \pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
3763 {\pgf@circ@res@up}}
3764 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
3765 }
3766 \anchor{up}{
3767 \up
3768 }
3769 \anchor{down}{
3770 \up
3771 \pgf@y=-\pgf@y
3772 }
3773 \anchor{out}{
3774 \northwest
3775 \pgf@y=0pt
3776 \pgf@x=-\pgf@x
3777 }
3778
3779 \backgroundpath{
3780 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
3781
3782
3783 \northwest
3784 \pgf@circ@res@up = \pgf@y
3785 \pgf@circ@res@down = -\pgf@y
3786 \pgf@circ@res@right = -\pgf@x
3787 \pgf@circ@res@left = \pgf@x
3788
3789 \pgfpathmoveto{\pgfpoint
3790 {\pgf@circ@res@left}
3791 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@up}}
3792 \pgfpathlineto{\pgfpoint
3793 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
3794 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@up}}
3795
3796
3797 \pgfpathmoveto{\pgfpoint
3798 {\pgf@circ@res@left}
3799 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@down}}
3800 \pgfpathlineto{\pgfpoint
3801 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
3802 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@down}}
3803
3804 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3805 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
3806
3807 \pgfusepath{draw}
3808
3809
3810 \pgfscope
3811 \pgfsetlinewidth{2\pgflinewidth}
3812 \pgftransformxshift{.7\pgf@circ@res@left}
3813 \pgf@circ@res@step=\pgf@circ@res@right
3814 \advance\pgf@circ@res@step by -\pgf@circ@res@left
3815 \pgf@circ@res@step=.7\pgf@circ@res@step
3816
3817 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3818 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3819 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3820 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3821 \pgfusepath{draw}
3822 \endpgfscope
3823
3824
3825
3826 }
3827 }
3828
3829 %% Generic two port box
3830 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/twoport/height}}{twoport}{\ctikzvalof{bipoles/twoport/height}}{\ctikzvalof{bipoles/twoport/width}}{
3831 \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@Rlen
3832 \divide \pgf@circ@res@step by 2
3833
3834 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3835 \pgf@circ@res@other = \pgf@circ@res@left
3836 \advance\pgf@circ@res@other by \pgf@circ@res@step
3837 \ifpgf@circuit@dashed
3838 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
3839 \fi
3840 % draw outer box
3841 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3842 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3843 \pgfusepath{draw}
3844
3845 \ifpgf@circuit@inputarrow
3846 {
3847 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3848 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3849 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
3850 }
3851 \fi
3852
3853 % rotate inner symbol
3854 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
3855 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
3856 \pgftransformrotate{270}
3857 \fi\fi
3858 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
3859 \pgftransformrotate{180}
3860 \fi\fi
3861 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
3862 \pgftransformrotate{90}
3863 \fi\fi
3864
3865 % draw inner symbol
3866 \pgftext[center,x=0,y=0]{\ctikzvalof{bipoles/twoport/text}}
3867
3868 }
3869
3870 %% voltage controled oscillator
3871 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vco/width}}{vco}{\ctikzvalof{bipoles/twoport/width}}{\ctikzvalof{bipoles/vco/width}}{
3872 \pgf@circ@res@step = \ctikzvalof{bipoles/vco/width}\pgf@circ@Rlen
3873 \divide \pgf@circ@res@step by 2
3874
3875 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3876 \pgf@circ@res@other = \pgf@circ@res@left
3877 \advance\pgf@circ@res@other by \pgf@circ@res@step
3878
3879 \ifpgf@circuit@dashed
3880 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
3881 \fi
3882 % draw circle
3883 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3884 \pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@step}
3885 \pgfusepath{draw}
3886
3887 \ifpgf@circuit@inputarrow
3888 {
3889 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3890 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3891 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
3892 }
3893 \fi
3894
3895 % rotate inner symbol
3896 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
3897 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
3898 \pgftransformrotate{270}
3899 \fi\fi
3900 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
3901 \pgftransformrotate{180}
3902 \fi\fi
3903 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
3904 \pgftransformrotate{90}
3905 \fi\fi
3906
3907 % draw inner sine waves
3908 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
3909 \pgfsetlinewidth{\pgfstartlinewidth}
3910 \pgfpathmoveto{\pgfpoint{-.5\pgf@circ@res@step}{0\pgf@circ@res@step}}
3911 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3912 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3913 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3914 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3915 \pgfusepath{draw}
3916
3917 }
3918
3919 %% bandpass filter
3920 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/bandpass/width}}{bandpass}{\ctikzvalof{bipoles/bandpass/width}}{\ctikzvalof{bipoles/bandpass/width}}{
3921
3922 \pgf@circ@res@step = \ctikzvalof{bipoles/bandpass/width}\pgf@circ@Rlen
3923 \divide \pgf@circ@res@step by 2
3924
3925 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3926 \pgf@circ@res@other = \pgf@circ@res@left
3927 \advance\pgf@circ@res@other by \pgf@circ@res@step
3928
3929 \ifpgf@circuit@dashed
3930 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
3931 \fi
3932
3933 % draw outer box
3934 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3935 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3936 \pgfusepath{draw}
3937
3938 \ifpgf@circuit@inputarrow
3939 {
3940 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3941 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3942 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
3943 }
3944 \fi
3945
3946 % rotate inner symbol
3947 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
3948 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
3949 \pgftransformrotate{270}
3950 \fi\fi
3951 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
3952 \pgftransformrotate{180}
3953 \fi\fi
3954 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
3955 \pgftransformrotate{90}
3956 \fi\fi
3957
3958 % draw inner symbol
3959 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
3960 \pgfsetarrows{-} %never draw arrows
3961 \pgfsetlinewidth{\pgfstartlinewidth}
3962 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
3963 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3964 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3965 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3966 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3967 \pgfusepath{draw}
3968 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{0.35\pgf@circ@res@step}}
3969 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}}
3970 \pgfusepath{draw}
3971
3972 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
3973 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3974 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3975 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3976 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3977 \pgfusepath{draw}
3978
3979 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
3980 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3981 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3982 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3983 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3984 \pgfusepath{draw}
3985 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}}
3986 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
3987 \pgfusepath{draw}
3988 }
3989
3990 %% bandstop filter
3991 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/bandstop/width}}{bandstop}{\ctikzvalof{bipoles/bandstop/width}}{\ctikzvalof{bipoles/bandstop/width}}{
3992 \pgf@circ@res@step = \ctikzvalof{bipoles/bandstop/width}\pgf@circ@Rlen
3993 \divide \pgf@circ@res@step by 2
3994
3995 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3996 \pgf@circ@res@other = \pgf@circ@res@left
3997 \advance\pgf@circ@res@other by \pgf@circ@res@step
3998
3999 \ifpgf@circuit@dashed
4000 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4001 \fi
4002
4003 % draw outer box
4004 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4005 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4006 \pgfusepath{draw}
4007
4008 \ifpgf@circuit@inputarrow
4009 {
4010 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4011 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4012 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4013 }
4014 \fi
4015
4016 % rotate inner symbol
4017 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4018 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4019 \pgftransformrotate{270}
4020 \fi\fi
4021 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225% 134 degree, because >= 135 is not possible
4022 \pgftransformrotate{180}
4023 \fi\fi
4024 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4025 \pgftransformrotate{90}
4026 \fi\fi
4027
4028 % draw inner symbol
4029 \pgfsetdash{}{0pt}% always draw solid line for inner symbol
4030 \pgfsetarrows{-}%never draw arrows
4031 \pgfsetlinewidth{\pgfstartlinewidth}
4032 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
4033 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4034 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4035 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4036 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4037 \pgfusepath{draw}
4038
4039 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
4040 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4041 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4042 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4043 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4044 \pgfusepath{draw}
4045 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
4046 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
4047 \pgfusepath{draw}
4048
4049 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4050 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4051 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4052 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4053 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4054 \pgfusepath{draw}
4055 }
4056
4057 %% highpass filter
4058 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/highpass/width}}{highpass}{\ctikzvalof{bipoles/highpass/width}}{\ctikzvalof{bipoles/highpass/width}}{
4059 \pgf@circ@res@step = \ctikzvalof{bipoles/highpass/width}\pgf@circ@Rlen
4060 \divide \pgf@circ@res@step by 2
4061
4062 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4063 \pgf@circ@res@other = \pgf@circ@res@left
4064 \advance\pgf@circ@res@other by \pgf@circ@res@step
4065
4066 \ifpgf@circuit@dashed
4067 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4068 \fi
4069
4070 % draw outer box
4071 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4072 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4073 \pgfusepath{draw}
4074
4075 \ifpgf@circuit@inputarrow
4076 {
4077 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4078 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4079 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4080 }
4081 \fi
4082
4083 % rotate inner symbol
4084 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4085 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4086 \pgftransformrotate{270}
4087 \fi\fi
4088 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4089 \pgftransformrotate{180}
4090 \fi\fi
4091 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4092 \pgftransformrotate{90}
4093 \fi\fi
4094
4095 % draw inner symbol
4096 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4097 \pgfsetarrows{-} %never draw arrows
4098 \pgfsetlinewidth{\pgfstartlinewidth}
4099 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
4100 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4101 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4102 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4103 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4104 \pgfusepath{draw}
4105
4106 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
4107 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4108 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4109 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4110 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4111 \pgfusepath{draw}
4112 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
4113 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
4114 \pgfusepath{draw}
4115
4116 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4117 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4118 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4119 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4120 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4121 \pgfusepath{draw}
4122 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}}
4123 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
4124 \pgfusepath{draw}
4125 }
4126
4127 %% lowpass filter
4128 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lowpass/width}}{lowpass}{\ctikzvalof{bipoles/lowpass/width}}{\ctikzvalof{bipoles/lowpass/width}}{
4129 \pgf@circ@res@step = \ctikzvalof{bipoles/lowpass/width}\pgf@circ@Rlen
4130 \divide \pgf@circ@res@step by 2
4131
4132 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4133 \pgf@circ@res@other = \pgf@circ@res@left
4134 \advance\pgf@circ@res@other by \pgf@circ@res@step
4135
4136 \ifpgf@circuit@dashed
4137 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4138 \fi
4139
4140 % draw outer box
4141 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4142 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4143 \pgfusepath{draw}
4144
4145 \ifpgf@circuit@inputarrow
4146 {
4147 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4148 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4149 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4150 }
4151 \fi
4152
4153 % rotate inner symbol
4154 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4155 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4156 \pgftransformrotate{270}
4157 \fi\fi
4158 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4159 \pgftransformrotate{180}
4160 \fi\fi
4161 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4162 \pgftransformrotate{90}
4163 \fi\fi
4164
4165 % draw inner symbol
4166 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4167 \pgfsetarrows{-} %never draw arrows
4168 \pgfsetlinewidth{\pgfstartlinewidth}
4169 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
4170 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4171 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4172 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4173 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4174 \pgfusepath{draw}
4175 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{0.35\pgf@circ@res@step}}
4176 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}}
4177 \pgfusepath{draw}
4178
4179 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
4180 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4181 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4182 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4183 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4184 \pgfusepath{draw}
4185 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
4186 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
4187 \pgfusepath{draw}
4188
4189 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4190 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4191 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4192 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4193 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4194 \pgfusepath{draw}
4195 }
4196
4197 %% ADC
4198 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/adc/width}}{adc}{\ctikzvalof{bipoles/adc/width}}{\ctikzvalof{bipoles/adc/width}}{
4199 \pgf@circ@res@step = \ctikzvalof{bipoles/adc/width}\pgf@circ@Rlen
4200 \divide \pgf@circ@res@step by 2
4201
4202 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4203 \pgf@circ@res@other = \pgf@circ@res@left
4204 \advance\pgf@circ@res@other by \pgf@circ@res@step
4205
4206 \ifpgf@circuit@dashed
4207 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4208 \fi
4209
4210 % draw outer box
4211 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4212 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4213 \pgfusepath{draw}
4214
4215 \ifpgf@circuit@inputarrow
4216 {
4217 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4218 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4219 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4220 }
4221 \fi
4222
4223 % rotate inner symbol
4224 \def\texti{A}
4225 \def\textii{D}
4226 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4227 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4228 \def\texti{D}
4229 \def\textii{A}
4230 \pgftransformrotate{270}
4231 \fi\fi
4232 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4233 \def\texti{D}
4234 \def\textii{A}
4235 \pgftransformrotate{180}
4236 \fi\fi
4237 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4238 \pgftransformrotate{90}
4239 \def\texti{A}
4240 \def\textii{D}
4241 \fi\fi
4242
4243 % draw inner symbol
4244 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4245 \pgfsetarrows{-} %never draw arrows
4246 \pgfsetlinewidth{\pgfstartlinewidth}
4247 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
4248 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
4249 \pgfusepath{draw}
4250
4251 \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}}
4252 \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}}
4253 }
4254
4255 %% DAC
4256 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dac/width}}{dac}{\ctikzvalof{bipoles/dac/width}}{\ctikzvalof{bipoles/dac/width}}{
4257 \pgf@circ@res@step = \ctikzvalof{bipoles/dac/width}\pgf@circ@Rlen
4258 \divide \pgf@circ@res@step by 2
4259
4260 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4261 \pgf@circ@res@other = \pgf@circ@res@left
4262 \advance\pgf@circ@res@other by \pgf@circ@res@step
4263
4264 \ifpgf@circuit@dashed
4265 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4266 \fi
4267
4268 % draw outer box
4269 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4270 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4271 \pgfusepath{draw}
4272
4273 \ifpgf@circuit@inputarrow
4274 {
4275 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4276 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4277 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4278 }
4279 \fi
4280
4281 % rotate inner symbol
4282 \def\texti{D}
4283 \def\textii{A}
4284 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4285 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4286 \def\texti{A}
4287 \def\textii{D}
4288 \pgftransformrotate{270}
4289 \fi\fi
4290 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4291 \def\texti{A}
4292 \def\textii{D}
4293 \pgftransformrotate{180}
4294 \fi\fi
4295 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4296 \pgftransformrotate{90}
4297 \def\texti{D}
4298 \def\textii{A}
4299 \fi\fi
4300
4301 % draw inner symbol
4302 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4303 \pgfsetarrows{-} %never draw arrows
4304 \pgfsetlinewidth{\pgfstartlinewidth}
4305 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
4306 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
4307 \pgfusepath{draw}
4308
4309 \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}}
4310 \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}}
4311 }
4312
4313 %% DSP
4314 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dsp/width}}{dsp}{\ctikzvalof{bipoles/dsp/width}}{\ctikzvalof{bipoles/dsp/width}}{
4315 \pgf@circ@res@step = \ctikzvalof{bipoles/dsp/width}\pgf@circ@Rlen
4316 \divide \pgf@circ@res@step by 2
4317
4318 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4319 \pgf@circ@res@other = \pgf@circ@res@left
4320 \advance\pgf@circ@res@other by \pgf@circ@res@step
4321
4322 \ifpgf@circuit@dashed
4323 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4324 \fi
4325
4326 % draw outer box
4327 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4328 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4329 \pgfusepath{draw}
4330
4331 \ifpgf@circuit@inputarrow
4332 {
4333 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4334 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4335 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4336 }
4337 \fi
4338
4339 % rotate inner symbol
4340 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4341 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4342 \pgftransformrotate{270}
4343 \fi\fi
4344 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4345 \pgftransformrotate{180}
4346 \fi\fi
4347 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4348 \pgftransformrotate{90}
4349 \fi\fi
4350
4351 % draw inner symbol
4352 \pgftext[center,x=0,y=0]{\textsf{DSP}}
4353 }
4354
4355 %% FFT
4356 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fft/width}}{fft}{\ctikzvalof{bipoles/fft/width}}{\ctikzvalof{bipoles/fft/width}}{
4357 \pgf@circ@res@step = \ctikzvalof{bipoles/fft/width}\pgf@circ@Rlen
4358 \divide \pgf@circ@res@step by 2
4359
4360 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4361 \pgf@circ@res@other = \pgf@circ@res@left
4362 \advance\pgf@circ@res@other by \pgf@circ@res@step
4363
4364 \ifpgf@circuit@dashed
4365 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4366 \fi
4367
4368 % draw outer box
4369 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4370 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4371 \pgfusepath{draw}
4372
4373 \ifpgf@circuit@inputarrow
4374 {
4375 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4376 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4377 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4378 }
4379 \fi
4380
4381 % rotate inner symbol
4382 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4383 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4384 \pgftransformrotate{270}
4385 \fi\fi
4386 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4387 \pgftransformrotate{180}
4388 \fi\fi
4389 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4390 \pgftransformrotate{90}
4391 \fi\fi
4392
4393 % draw inner symbol
4394 \pgftext[center,x=0,y=0]{\textsf{FFT}}
4395 }
4396
4397 %% Amplifier
4398 \pgfcircdeclarebipole{}{
4399 \ifpgf@circuit@boxed
4400 \ctikzvalof{bipoles/twoport/width}
4401 \else
4402 \ctikzvalof{bipoles/amp/width}
4403 \fi
4404 }{amp}{
4405 \ifpgf@circuit@boxed
4406 \ctikzvalof{bipoles/twoport/width}
4407 \else
4408 \ctikzvalof{bipoles/amp/width}
4409 \fi
4410 }{
4411 \ifpgf@circuit@boxed
4412 \ctikzvalof{bipoles/twoport/width}
4413 \else
4414 \ctikzvalof{bipoles/amp/width}
4415 \fi
4416 }{
4417 \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@Rlen
4418
4419 \ifpgf@circuit@dashed
4420 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4421 \fi
4422
4423 % draw outer box
4424 \ifpgf@circuit@boxed
4425 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4426 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
4427 \fi
4428
4429 % draw input arrow
4430 \ifpgf@circuit@inputarrow
4431 {
4432 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4433 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4434 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4435 }
4436 \fi
4437
4438 \ifpgf@circuit@boxed
4439 \pgfsetlinewidth{\pgfstartlinewidth}
4440 \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn
4441 \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box
4442 \else
4443 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4444 \fi
4445
4446 \pgfsetarrows{-} %never draw arrows
4447 \pgfsetlinewidth{\pgfstartlinewidth}
4448
4449 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
4450 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
4451 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
4452
4453 \pgfpathclose
4454 \pgfusepath{draw}
4455
4456 % draw inner text
4457 \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
4458 }
4459
4460
4461 %% variable amplifier
4462 \pgfcircdeclarebipole{}{
4463 \ifpgf@circuit@boxed
4464 \ctikzvalof{bipoles/twoport/width}
4465 \else
4466 \ctikzvalof{bipoles/amp/width}
4467 \fi
4468 }{vamp}{
4469 \ifpgf@circuit@boxed
4470 \ctikzvalof{bipoles/twoport/width}
4471 \else
4472 \ctikzvalof{bipoles/amp/width}
4473 \fi
4474 }{
4475 \ifpgf@circuit@boxed
4476 \ctikzvalof{bipoles/twoport/width}
4477 \else
4478 \ctikzvalof{bipoles/amp/width}
4479 \fi
4480 }{
4481 \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@Rlen
4482
4483 \ifpgf@circuit@dashed
4484 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4485 \fi
4486
4487 % draw outer box
4488 \ifpgf@circuit@boxed
4489 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
4490 \fi
4491
4492 % draw input arrow
4493 \ifpgf@circuit@inputarrow
4494 {
4495 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4496 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4497 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4498 }
4499 \fi
4500
4501 \ifpgf@circuit@boxed
4502 \pgfsetlinewidth{\pgfstartlinewidth}
4503 \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn
4504 \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box
4505 \else
4506 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4507 \fi
4508
4509
4510 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4511 \pgfsetarrows{-} %never draw arrows
4512 \pgfsetlinewidth{\pgfstartlinewidth}
4513
4514 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
4515 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
4516 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
4517
4518 \pgfpathclose
4519 \pgfusepath{draw}
4520
4521 % draw inner text
4522 \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
4523
4524 % draw arrow
4525 \pgfsetlinewidth{\pgfstartlinewidth}
4526 \pgfsetarrowsend{latex}
4527 \pgfpathmoveto{\pgfpoint{-0.8\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4528 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@step}{0.6\pgf@circ@res@step}}
4529 \pgfusepath{draw}
4530 }
4531
4532 %% pi attenuator
4533 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piattenuator/width}}{piattenuator}{\ctikzvalof{bipoles/piattenuator/width}}{\ctikzvalof{bipoles/piattenuator/width}}{
4534 \pgf@circ@res@step = \ctikzvalof{bipoles/piattenuator/width}\pgf@circ@Rlen
4535 \divide \pgf@circ@res@step by 2
4536
4537 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4538 \pgf@circ@res@other = \pgf@circ@res@left
4539 \advance\pgf@circ@res@other by \pgf@circ@res@step
4540
4541 \ifpgf@circuit@dashed
4542 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4543 \fi
4544
4545 % draw outer box
4546 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4547 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4548 \pgfusepath{draw}
4549
4550 \ifpgf@circuit@inputarrow
4551 {
4552 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4553 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4554 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4555 }
4556 \fi
4557
4558 % rotate inner symbol
4559 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4560 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4561 \pgftransformrotate{270}
4562 \fi\fi
4563 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4564 \pgftransformrotate{90}
4565 \fi\fi
4566
4567 % draw inner symbol
4568 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4569 \pgfsetarrows{-} %never draw arrows
4570 \pgfsetlinewidth{\pgfstartlinewidth}
4571 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
4572 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4573 \pgfusepath{draw}
4574 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
4575 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4576 \pgfusepath{draw}
4577 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4578 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4579 \pgfusepath{draw}
4580 }
4581
4582 %% variable pi attenuator
4583 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vpiattenuator/width}}{vpiattenuator}{\ctikzvalof{bipoles/vpiattenuator/width}}{\ctikzvalof{bipoles/vpiattenuator/width}}{
4584 \pgf@circ@res@step = \ctikzvalof{bipoles/vpiattenuator/width}\pgf@circ@Rlen
4585 \divide \pgf@circ@res@step by 2
4586
4587 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4588 \pgf@circ@res@other = \pgf@circ@res@left
4589 \advance\pgf@circ@res@other by \pgf@circ@res@step
4590
4591 \ifpgf@circuit@dashed
4592 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4593 \fi
4594
4595 % draw outer box
4596 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4597 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4598 \pgfusepath{draw}
4599
4600 \ifpgf@circuit@inputarrow
4601 {
4602 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4603 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4604 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4605 }
4606 \fi
4607
4608 % rotate inner symbol
4609 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4610 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4611 \pgftransformrotate{270}
4612 \fi\fi
4613 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4614 \pgftransformrotate{90}
4615 \fi\fi
4616
4617 % draw inner symbol
4618 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4619 \pgfsetarrows{-} %never draw arrows
4620 \pgfsetlinewidth{\pgfstartlinewidth}
4621 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
4622 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4623 \pgfusepath{draw}
4624 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
4625 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4626 \pgfusepath{draw}
4627 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4628 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4629 \pgfusepath{draw}
4630
4631 \pgfsetarrowsend{latex}
4632 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
4633 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
4634 \pgfusepath{draw}
4635 }
4636
4637 %% T attenuator
4638 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tattenuator/width}}{tattenuator}{\ctikzvalof{bipoles/tattenuator/width}}{\ctikzvalof{bipoles/tattenuator/width}}{
4639 \pgf@circ@res@step = \ctikzvalof{bipoles/tattenuator/width}\pgf@circ@Rlen
4640 \divide \pgf@circ@res@step by 2
4641
4642 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4643 \pgf@circ@res@other = \pgf@circ@res@left
4644 \advance\pgf@circ@res@other by \pgf@circ@res@step
4645
4646 \ifpgf@circuit@dashed
4647 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4648 \fi
4649
4650 % draw outer box
4651 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4652 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4653 \pgfusepath{draw}
4654
4655 \ifpgf@circuit@inputarrow
4656 {
4657 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4658 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4659 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4660 }
4661 \fi
4662
4663 % rotate inner symbol
4664 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4665 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4666 \pgftransformrotate{270}
4667 \fi\fi
4668 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4669 \pgftransformrotate{90}
4670 \fi\fi
4671
4672 % draw inner symbol
4673 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4674 \pgfsetarrows{-} %never draw arrows
4675 \pgfsetlinewidth{\pgfstartlinewidth}
4676 \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
4677 \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
4678 \pgfusepath{draw}
4679 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4680 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4681 \pgfusepath{draw}
4682 }
4683
4684 %% variable T attenuator
4685 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vtattenuator/width}}{vtattenuator}{\ctikzvalof{bipoles/vtattenuator/width}}{\ctikzvalof{bipoles/vtattenuator/width}}{
4686 \pgf@circ@res@step = \ctikzvalof{bipoles/vtattenuator/width}\pgf@circ@Rlen
4687 \divide \pgf@circ@res@step by 2
4688
4689 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4690 \pgf@circ@res@other = \pgf@circ@res@left
4691 \advance\pgf@circ@res@other by \pgf@circ@res@step
4692
4693 \ifpgf@circuit@dashed
4694 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4695 \fi
4696
4697 % draw outer box
4698 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4699 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4700 \pgfusepath{draw}
4701
4702 \ifpgf@circuit@inputarrow
4703 {
4704 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4705 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4706 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4707 }
4708 \fi
4709
4710 % rotate inner symbol
4711 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4712 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4713 \pgftransformrotate{270}
4714 \fi\fi
4715 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4716 \pgftransformrotate{90}
4717 \fi\fi
4718
4719 % draw inner symbol
4720 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4721 \pgfsetarrows{-} %never draw arrows
4722 \pgfsetlinewidth{\pgfstartlinewidth}
4723 \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
4724 \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
4725 \pgfusepath{draw}
4726 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4727 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4728 \pgfusepath{draw}
4729
4730 \pgfsetarrowsend{latex}
4731 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
4732 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
4733 \pgfusepath{draw}
4734 }
4735
4736 %% phase shifter
4737 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{phaseshifter}{\ctikzvalof{bipoles/phaseshifter/width}}{\ctikzvalof{bipoles/phaseshifter/width}}{
4738 \pgf@circ@res@step = \ctikzvalof{bipoles/phaseshifter/width}\pgf@circ@Rlen
4739 \divide \pgf@circ@res@step by 2
4740
4741 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4742 \pgf@circ@res@other = \pgf@circ@res@left
4743 \advance\pgf@circ@res@other by \pgf@circ@res@step
4744
4745 \ifpgf@circuit@dashed
4746 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4747 \fi
4748
4749 % draw outer box
4750 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4751 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4752 \pgfusepath{draw}
4753
4754 \ifpgf@circuit@inputarrow
4755 {
4756 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4757 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4758 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4759 }
4760 \fi
4761
4762 % rotate inner symbol
4763 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4764 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4765 \pgftransformrotate{270}
4766 \fi\fi
4767 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4768 \pgftransformrotate{180}
4769 \fi\fi
4770 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4771 \pgftransformrotate{90}
4772 \fi\fi
4773
4774 % inner symbol
4775 \pgftext[center,x=0,y=0]{\Large$\varphi$}
4776 }
4777
4778 %% variable phase shifter
4779 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{vphaseshifter}{\ctikzvalof{bipoles/vphaseshifter/width}}{\ctikzvalof{bipoles/vphaseshifter/width}}{
4780 \pgf@circ@res@step = \ctikzvalof{bipoles/vphaseshifter/width}\pgf@circ@Rlen
4781 \divide \pgf@circ@res@step by 2
4782
4783 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4784 \pgf@circ@res@other = \pgf@circ@res@left
4785 \advance\pgf@circ@res@other by \pgf@circ@res@step
4786
4787 \ifpgf@circuit@dashed
4788 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4789 \fi
4790
4791 % draw outer box
4792 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4793 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4794 \pgfusepath{draw}
4795
4796 \ifpgf@circuit@inputarrow
4797 {
4798 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4799 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4800 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4801 }
4802 \fi
4803
4804 % rotate inner symbol
4805 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4806 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4807 \pgftransformrotate{270}
4808 \fi\fi
4809 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4810 \pgftransformrotate{180}
4811 \fi\fi
4812 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4813 \pgftransformrotate{90}
4814 \fi\fi
4815
4816 % inner symbol
4817 \pgftext[center,x=0,y=0]{\Large$\varphi$}
4818
4819 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4820 \pgfsetlinewidth{\pgfstartlinewidth}
4821 \pgfsetarrowsend{latex}
4822 \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0.65\pgf@circ@res@down}}
4823 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.65\pgf@circ@res@up}}
4824 \pgfusepath{draw}
4825 }
4826
4827 %% detector
4828 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/detector/width}}{detector}{\ctikzvalof{bipoles/detector/width}}{\ctikzvalof{bipoles/detector/width}}{
4829 \pgf@circ@res@step = \ctikzvalof{bipoles/detector/width}\pgf@circ@Rlen
4830 \divide \pgf@circ@res@step by 2
4831
4832 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4833 \pgf@circ@res@other = \pgf@circ@res@left
4834 \advance\pgf@circ@res@other by \pgf@circ@res@step
4835
4836 \ifpgf@circuit@dashed
4837 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4838 \fi
4839
4840 % draw outer box
4841 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4842 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4843 \pgfusepath{draw}
4844
4845 \ifpgf@circuit@inputarrow
4846 {
4847 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4848 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4849 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4850 }
4851 \fi
4852
4853 % draw inner stuff
4854 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4855 \pgfsetarrows{-} %never draw arrows
4856 \pgfsetlinewidth{0.8\pgfstartlinewidth}
4857 \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0}}
4858 \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@right}{0}}
4859 \pgfusepath{draw}
4860
4861 \ifpgf@circuit@fulldiode
4862 \pgfmathparse{2\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/generic/width}}
4863 \pgftransformscale{\pgfmathresult}
4864 \pgfnode{fulldiodeshape}{center}{}{pgf@fulldiode}{\pgfusepath{fill}}
4865 \else
4866 \pgfmathparse{2\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/resistor/width}}
4867 \pgftransformscale{\pgfmathresult}
4868 \pgfnode{emptydiodeshape}{center}{}{pgf@emptydiode}{\pgfusepath{fill}}
4869 \fi
4870
4871 }
4872
4873
4874
4875
4876 %% european gas filled surge arrester
4877
4878 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/european gas filled surge arrester/height}}{european gas filled surge arrester}{\ctikzvalof{bipoles/european gas filled surge arrester/height}}{\ctikzvalof{bipoles/european gas filled surge arrester/width}}{
4879
4880 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
4881 %\divide \pgf@circ@res@step by 14
4882
4883 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4884 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4885
4886 \pgfusepath{draw}
4887
4888 \pgfscope
4889 \pgfsetarrowsend{latex'}
4890 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
4891 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/european gas filled surge arrester/inside}\pgf@circ@res@left}{0pt}}
4892 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4893 \pgfusepath{draw}
4894
4895 \endpgfscope
4896 }
4897
4898
4899
4900
4901 %% american gas filled surge arrester
4902
4903 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/american gas filled surge arrester/height}}{american gas filled surge arrester}{\ctikzvalof{bipoles/american gas filled surge arrester/height}}{\ctikzvalof{bipoles/american gas filled surge arrester/width}}{
4904 %\def\pgf@circ@temp{right}
4905 %\ifx\tikz@res@label@pos\pgf@circ@temp
4906 % \pgf@circ@res@step=-1.2\pgf@circ@res@up
4907 %\else
4908 % \def\pgf@circ@temp{below}
4909 % \ifx\tikz@res@label@pos\pgf@circ@temp
4910 % \pgf@circ@res@step=-1.2\pgf@circ@res@up
4911 % \else
4912 % \pgf@circ@res@step=1.2\pgf@circ@res@up
4913 % \fi
4914 % \fi
4915
4916 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4917 \pgfpointorigin \pgf@circ@res@other = \pgf@x \advance \pgf@circ@res@other by -\pgf@circ@res@up
4918 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
4919 \pgfusepath{draw}
4920
4921 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4922
4923 \pgfscope
4924 \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
4925 \pgfusepath{draw}
4926 \endpgfscope
4927
4928 \pgfsetlinewidth{\pgfstartlinewidth}
4929
4930
4931 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@zero}}
4932 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
4933 \pgfusepath{draw}
4934
4935 \pgfnode{circle}{center}{}{}{}
4936
4937 \pgfscope
4938 \pgfsetarrowsend{latex}
4939
4940 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
4941 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf@circ@res@right}{\pgf@circ@res@zero}}
4942 \pgfusepath{draw}
4943
4944 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4945 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf@circ@res@left}{\pgf@circ@res@zero}}
4946 \pgfusepath{draw}
4947 \endpgfscope{}
4948
4949 %\pgftransformshift{\pgfpoint{.25\pgf@circ@res@left}{.45\pgf@circ@res@down}}
4950 %\pgfnode{circ}{center}{}{}{}
4951 %\pgftransformshift{}
4952 \pgfcircle{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/dot x}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/dot y}\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/size}\pgf@circ@res@down}
4953 \pgfusepath{fill}
4954 }
4955
4956 % % MECHANICAL SYMBOLS
4957
4958 %% mechanical capacitance - stiffness/spring
4959
4960 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/spring/height}}{spring}{\ctikzvalof{bipoles/spring/height}}{\ctikzvalof{bipoles/spring/width}}{
4961 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4962 \pgftransformationadjustments
4963
4964 \pgfmathsetlength{\pgf@circ@res@step}
4965 {(\ctikzvalof{bipoles/spring/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth)/16}
4966
4967 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
4968 \pgfsetcornersarced{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
4969 \pgf@circ@res@other = \pgf@circ@res@left
4970 \advance\pgf@circ@res@other by \pgf@circ@res@step
4971 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
4972 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
4973 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
4974 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
4975 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
4976 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
4977 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
4978 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
4979 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
4980 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
4981 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
4982 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
4983 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
4984 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
4985 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
4986 \advance\pgf@circ@res@other by \pgf@circ@res@step
4987 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
4988 \pgfsetbuttcap
4989 \pgfsetbeveljoin
4990 \pgfusepath{stroke}
4991 }
4992
4993 %% mechanical inductance - mass
4994 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/mass/box height}}{mass}{\ctikzvalof{bipoles/mass/height}}{\ctikzvalof{bipoles/mass/width}}{
4995 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4996 \pgftransformationadjustments
4997 \pgfpathrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
4998 {\pgfpoint{-2\pgf@circ@res@down}{-2\pgf@circ@res@down}}
4999
5000 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5001 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5002 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
5003 \pgfsetrectcap
5004 \pgfsetmiterjoin
5005 \pgfusepath{stroke}
5006 }
5007
5008 %% mechanical resistor - damper
5009 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/damper/height}}{damper}{\ctikzvalof{bipoles/damper/height}}{\ctikzvalof{bipoles/damper/width}}{
5010 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5011 \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
5012 {\pgf@circ@res@zero}}
5013 \pgfusepath{stroke}
5014
5015 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5016 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
5017 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5018 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5019 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
5020
5021 \pgfsetrectcap
5022 \pgfsetmiterjoin
5023 \pgfusepath{stroke}
5024
5025 \pgfpathmoveto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
5026 {.8\pgf@circ@res@down}}
5027 \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
5028 {.8\pgf@circ@res@up}}
5029 \pgfsetbuttcap
5030 \pgfusepath{stroke}
5031
5032 }
5033
5034
5035 %%%---------- close: tex/pgfcircbipoles
5036 %%%%%%%%%%% Springe nach tex/pgfcirctripoles
5037 %%%---------- open: tex/pgfcirctripoles.tex
5038 % Copyright 2007-2009 by Massimo Redaelli
5039 %
5040 % This file may be distributed and/or modified
5041 %
5042 % 1. under the LaTeX Project Public License and/or
5043 % 2. under the GNU Public License.
5044 %
5045 % See the file doc/LICENSE for more details.
5046
5047 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5048 %% Tripoles
5049
5050
5051
5052 \pgfdeclareshape{spdt}
5053 {
5054 \savedanchor\northwest{%
5055 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/height}\pgf@circ@Rlen
5056 \pgf@y=.5\pgf@y
5057 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/width}\pgf@circ@Rlen
5058 \pgf@x=.5\pgf@x
5059 }
5060 \anchor{left}{%
5061 \northwest
5062 \pgf@y=0pt
5063 }
5064 \anchor{in}{
5065 \northwest
5066 \pgf@y=0pt
5067 }
5068 \anchor{out 1}{
5069 \northwest
5070 \pgf@x=-\pgf@x
5071 }
5072 \anchor{out 2}{
5073 \northwest
5074 \pgf@x=-\pgf@x
5075 \pgf@y=-\pgf@y
5076 }
5077 \anchor{center}{
5078 \pgf@y=0pt
5079 \pgf@x=0pt
5080 }
5081 \anchor{east}{
5082 \northwest
5083 \pgf@y=0pt
5084 \pgf@x=-\pgf@x
5085 }
5086 \anchor{west}{
5087 \northwest
5088 \pgf@y=0pt
5089 }
5090 \anchor{south}{
5091 \northwest
5092 \pgf@x=0pt
5093 \pgf@y=-\pgf@y
5094 }
5095 \anchor{north}{
5096 \northwest
5097 \pgf@x=0pt
5098 }
5099 \anchor{south west}{
5100 \northwest
5101 \pgf@y=-\pgf@y
5102 }
5103 \anchor{north east}{
5104 \northwest
5105 \pgf@x=-\pgf@x
5106 }
5107 \anchor{north west}{
5108 \northwest
5109 }
5110 \anchor{south east}{
5111 \northwest
5112 \pgf@x=-\pgf@x
5113 \pgf@y=-\pgf@y
5114 }
5115 \backgroundpath{
5116 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5117
5118
5119 \northwest
5120 \pgf@circ@res@up = \pgf@y
5121 \pgf@circ@res@down = -\pgf@y
5122 \pgf@circ@res@right = -\pgf@x
5123 \pgf@circ@res@left = \pgf@x
5124 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/margin}\pgf@circ@res@left
5125
5126
5127 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5128 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5129 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5130 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5131
5132 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5133 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}}
5134
5135 \pgfusepath{draw}
5136
5137 \pgfscope
5138 \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5139 \pgfnode{ocirc}{center}{}{spdt1}{\pgfusepath{stroke}}
5140 \endpgfscope
5141 \pgfscope
5142 \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5143 \pgfnode{ocirc}{center}{}{}{\pgfusepath{stroke}}
5144 \endpgfscope
5145 \pgfscope
5146 \pgftransformshift{\pgfpoint{\pgf@circ@res@other}{0pt}}
5147 \pgfnode{ocirc}{center}{}{spdt2}{\pgfusepath{stroke}}
5148 \endpgfscope
5149
5150
5151 \pgfscope
5152 \pgfpathmoveto{\pgfpointshapeborder{spdt2}{\pgfpointorigin}}
5153 \pgfpathlineto{
5154 \pgfpointadd{\pgfpointshapeborder{spdt1}{\pgfpoint{-\pgf@circ@res@other}{-100pt}}}
5155 {\pgfpoint{-.05\pgf@circ@res@up}{-.05\pgf@circ@res@up}}
5156 }
5157 \pgfsetlinewidth{2\pgflinewidth}
5158 \pgfusepath{draw}
5159 \endpgfscope
5160 }
5161 }
5162
5163
5164
5165 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5166 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5167 %%
5168 %% Logic ports
5169 %%
5170
5171
5172
5173
5174
5175
5176 \long\def\pgfcircdeclarelogicport#1#2{
5177 \pgfdeclareshape{american #1 port}
5178 {
5179 \savedanchor\northwest{%
5180 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@circ@Rlen
5181 \pgf@y=.5\pgf@y
5182 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@circ@Rlen
5183 \pgf@x=.5\pgf@x
5184 }
5185 \savedanchor\left{%
5186 \pgf@y=0pt
5187 }
5188 \savedanchor\inOne{%
5189 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@circ@Rlen
5190 \pgf@y=.5\pgf@y
5191 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/input height}\pgf@y
5192 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@circ@Rlen
5193 \pgf@x=.5\pgf@x
5194 }
5195 \anchor{in 1}{
5196 \inOne
5197 }
5198 \anchor{in}{
5199 \inOne
5200 }
5201 \anchor{in 2}{
5202 \inOne
5203 \pgf@y=-\pgf@y
5204 }
5205 \anchor{out}{
5206 \northwest
5207 \pgf@y=0pt
5208 \pgf@x=-\pgf@x
5209 }
5210 \anchor{center}{
5211 \northwest
5212 \pgf@y=0pt
5213 \pgf@x=-.8\pgf@x
5214 }
5215 \anchor{east}{
5216 \left
5217 \pgf@x=-.8\pgf@x
5218 }
5219 \anchor{west}{
5220 \left
5221 }
5222 \anchor{south}{
5223 \northwest
5224 \pgf@x=0pt
5225 \pgf@y=-\pgf@y
5226 }
5227 \anchor{north}{
5228 \northwest
5229 \pgf@x=0pt
5230 }
5231 \anchor{south west}{
5232 \northwest
5233 \pgf@y=-\pgf@y
5234 }
5235 \anchor{north east}{
5236 \northwest
5237 \pgf@x=-\pgf@x
5238 }
5239 \anchor{north west}{
5240 \northwest
5241 }
5242 \anchor{south east}{
5243 \northwest
5244 \pgf@x=-\pgf@x
5245 \pgf@y=-\pgf@y
5246 }
5247 \backgroundpath{
5248 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5249
5250
5251 \northwest
5252 \pgf@circ@res@up = \pgf@y
5253 \pgf@circ@res@down = -\pgf@y
5254 \pgf@circ@res@right = -\pgf@x
5255 \pgf@circ@res@left = \pgf@x
5256
5257 #2
5258
5259 }
5260 }
5261 }
5262
5263
5264 \pgfcircdeclarelogicport{and}{
5265 \pgfpathmoveto{\pgfpoint
5266 {\pgf@circ@res@left}
5267 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@up}}
5268 \pgfpathlineto{\pgfpoint
5269 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5270 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@up}}
5271
5272 \pgfpathmoveto{\pgfpoint
5273 {\pgf@circ@res@left}
5274 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@down}}
5275 \pgfpathlineto{\pgfpoint
5276 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5277 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@down}}
5278
5279 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5280 \pgfpathlineto{\pgfpoint
5281 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5282 {0pt}}
5283
5284 \pgfusepath{draw}
5285
5286 \pgfsetlinewidth{2\pgflinewidth}
5287 \pgfpathmoveto{\pgfpoint
5288 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5289 {\pgf@circ@res@up}}
5290 \pgfpathlineto{\pgfpoint
5291 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5292 {\pgf@circ@res@down}}
5293 \pgfpathcurveto
5294 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@down}}
5295 {\pgfpoint
5296 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5297 {.5\pgf@circ@res@down}}
5298 {\pgfpoint
5299 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5300 {0pt}}
5301 \pgfpathcurveto
5302 {\pgfpoint
5303 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5304 {.5\pgf@circ@res@up}}
5305 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@up}}
5306 {\pgfpoint
5307 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5308 {\pgf@circ@res@up}}
5309 \pgfusepath{draw}
5310 }
5311
5312
5313
5314 \pgfcircdeclarelogicport{nand}{
5315 \pgfpathmoveto{\pgfpoint
5316 {\pgf@circ@res@left}
5317 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@up}}
5318 \pgfpathlineto{\pgfpoint
5319 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
5320 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@up}}
5321
5322 \pgfpathmoveto{\pgfpoint
5323 {\pgf@circ@res@left}
5324 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@down}}
5325 \pgfpathlineto{\pgfpoint
5326 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
5327 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@down}}
5328
5329 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5330 \pgfpathlineto{\pgfpoint
5331 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right}
5332 {0pt}}
5333
5334 \pgfusepath{draw}
5335
5336 \pgfsetlinewidth{2\pgflinewidth}
5337
5338 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf@circ@res@right
5339 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right
5340
5341 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5342 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5343 \pgfpathcurveto
5344 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@down}}
5345 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{.5\pgf@circ@res@down}}
5346 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5347 \pgfpathcurveto
5348 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{.5\pgf@circ@res@up}}
5349 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@up}}
5350 {\pgfpoint
5351 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
5352 {\pgf@circ@res@up}}
5353 \pgfpathellipse
5354 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5355 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5356 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5357
5358 \pgfusepath{draw}
5359 }
5360
5361
5362 \pgfcircdeclarelogicport{nor}{
5363 \pgfpathmoveto{\pgfpoint
5364 {\pgf@circ@res@left}
5365 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@up}}
5366 \pgfpathlineto{\pgfpoint
5367 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf@circ@res@left}
5368 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@up}}
5369
5370 \pgfpathmoveto{\pgfpoint
5371 {\pgf@circ@res@left}
5372 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@down}}
5373 \pgfpathlineto{\pgfpoint
5374 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf@circ@res@left}
5375 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@down}}
5376
5377 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5378 \pgfpathlineto{\pgfpoint
5379 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf@circ@res@right}
5380 {0pt}}
5381
5382 \pgfusepath{draw}
5383
5384 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf@circ@res@right
5385 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf@circ@res@right
5386
5387 \pgfsetlinewidth{2\pgflinewidth}
5388 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5389 \pgfpathcurveto
5390 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5391 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf@circ@res@up}}
5392 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf@circ@res@left}{0pt}}
5393 \pgfpathcurveto
5394 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf@circ@res@down}}
5395 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5396 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5397
5398 \pgfpathcurveto
5399 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5400 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf@circ@res@down}}
5401 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5402 \pgfpathcurveto
5403 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf@circ@res@up}}
5404 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5405 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5406
5407 \pgfpathellipse
5408 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5409 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5410 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5411
5412 \pgfusepath{draw}
5413 }
5414
5415
5416
5417
5418 \pgfcircdeclarelogicport{or}{
5419
5420
5421 \pgfpathmoveto{\pgfpoint
5422 {\pgf@circ@res@left}
5423 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@up}}
5424 \pgfpathlineto{\pgfpoint
5425 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf@circ@res@left}
5426 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@up}}
5427
5428 \pgfpathmoveto{\pgfpoint
5429 {\pgf@circ@res@left}
5430 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@down}}
5431 \pgfpathlineto{\pgfpoint
5432 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf@circ@res@left}
5433 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@down}}
5434
5435 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5436 \pgfpathlineto{\pgfpoint
5437 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right}
5438 {0pt}}
5439
5440 \pgfusepath{draw}
5441 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right
5442 \pgfsetlinewidth{2\pgflinewidth}
5443 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5444 \pgfpathcurveto
5445 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5446 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@up}}
5447 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf@circ@res@left}{0pt}}
5448 \pgfpathcurveto
5449 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@down}}
5450 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5451 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5452
5453 \pgfpathcurveto
5454 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5455 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@down}}
5456 {\pgfpoint{\pgf@circ@res@other}{0pt}}
5457 \pgfpathcurveto
5458 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@up}}
5459 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5460 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5461 \pgfusepath{draw}
5462 }
5463
5464
5465 \pgfcircdeclarelogicport{xor}{
5466
5467 \pgfpathmoveto{\pgfpoint
5468 {\pgf@circ@res@left}
5469 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@up}}
5470 \pgfpathlineto{\pgfpoint
5471 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf@circ@res@left}
5472 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@up}}
5473
5474 \pgfpathmoveto{\pgfpoint
5475 {\pgf@circ@res@left}
5476 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@down}}
5477 \pgfpathlineto{\pgfpoint
5478 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf@circ@res@left}
5479 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@down}}
5480
5481 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5482 \pgfpathlineto{\pgfpoint
5483 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf@circ@res@right}
5484 {0pt}}
5485
5486 \pgfusepath{draw}
5487 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf@circ@res@right
5488 \pgfsetlinewidth{2\pgflinewidth}
5489 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5490 \pgfpathcurveto
5491 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5492 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@up}}
5493 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{0pt}}
5494 \pgfpathcurveto
5495 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@down}}
5496 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5497 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5498
5499 \pgfpathcurveto
5500 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5501 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@down}}
5502 {\pgfpoint{\pgf@circ@res@other}{0pt}}
5503 \pgfpathcurveto
5504 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@up}}
5505 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5506 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5507
5508 \def\pgf@circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/distance}\pgf@circ@res@right+}
5509 \pgfpathmoveto{\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{\pgf@circ@res@up}}
5510
5511 \pgfpathcurveto
5512 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@up}}
5513 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@up}}
5514 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{0pt}}
5515 \pgfpathcurveto
5516 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@down}}
5517 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@down}}
5518 {\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{.95*\pgf@circ@res@down}}
5519
5520 \pgfusepath{draw}
5521 }
5522
5523
5524
5525 \pgfcircdeclarelogicport{xnor}{
5526
5527 \pgfpathmoveto{\pgfpoint
5528 {\pgf@circ@res@left}
5529 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@up}}
5530 \pgfpathlineto{\pgfpoint
5531 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf@circ@res@left}
5532 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@up}}
5533
5534 \pgfpathmoveto{\pgfpoint
5535 {\pgf@circ@res@left}
5536 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@down}}
5537 \pgfpathlineto{\pgfpoint
5538 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf@circ@res@left}
5539 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@down}}
5540
5541 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5542 \pgfpathlineto{\pgfpoint
5543 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf@circ@res@right}
5544 {0pt}}
5545
5546 \pgfusepath{draw}
5547 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf@circ@res@right
5548 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/circle width}\pgf@circ@res@right
5549
5550 \pgfsetlinewidth{2\pgflinewidth}
5551 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5552 \pgfpathcurveto
5553 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5554 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@up}}
5555 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{0pt}}
5556 \pgfpathcurveto
5557 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@down}}
5558 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5559 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5560
5561 \pgfpathcurveto
5562 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5563 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@down}}
5564 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5565 \pgfpathcurveto
5566 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@up}}
5567 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5568 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5569
5570 \def\pgf@circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/distance}\pgf@circ@res@right+}
5571 \pgfpathmoveto{\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{\pgf@circ@res@up}}
5572
5573 \pgfpathcurveto
5574 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@up}}
5575 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@up}}
5576 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{0pt}}
5577 \pgfpathcurveto
5578 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@down}}
5579 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@down}}
5580 {\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{.95*\pgf@circ@res@down}}
5581
5582
5583 \pgfpathellipse
5584 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5585 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5586 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5587
5588 \pgfusepath{draw}
5589 }
5590
5591
5592 \pgfdeclareshape{american not port}
5593 {
5594 \anchor{center}{\pgfpointorigin}
5595 \savedanchor\northwest{%
5596 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@circ@Rlen
5597 \pgf@y=.5\pgf@y
5598 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@circ@Rlen
5599 \pgf@x=.5\pgf@x
5600 }
5601 \savedanchor\left{%
5602 \pgf@y=0pt
5603 }
5604 \anchor{in}{
5605 \northwest
5606 \pgf@y=0pt
5607 }
5608 \anchor{out}{
5609 \northwest
5610 \pgf@y=0pt
5611 \pgf@x=-\pgf@x
5612 }
5613 \anchor{center}{
5614 \pgfpointorigin
5615 }
5616 \anchor{east}{
5617 \left
5618 \pgf@x=-.8\pgf@x
5619 }
5620 \anchor{west}{
5621 \left
5622 }
5623 \anchor{south}{
5624 \northwest
5625 \pgf@x=0pt
5626 \pgf@y=-\pgf@y
5627 }
5628 \anchor{north}{
5629 \northwest
5630 \pgf@x=0pt
5631 }
5632 \anchor{south west}{
5633 \northwest
5634 \pgf@y=-\pgf@y
5635 }
5636 \anchor{north east}{
5637 \northwest
5638 \pgf@x=-\pgf@x
5639 }
5640 \anchor{north west}{
5641 \northwest
5642 }
5643 \anchor{south east}{
5644 \northwest
5645 \pgf@x=-\pgf@x
5646 \pgf@y=-\pgf@y
5647 }
5648 \backgroundpath{
5649 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5650
5651
5652 \northwest
5653 \pgf@circ@res@up = \pgf@y
5654 \pgf@circ@res@down = -\pgf@y
5655 \pgf@circ@res@right = -\pgf@x
5656 \pgf@circ@res@left = \pgf@x
5657
5658 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right
5659
5660 \pgfscope
5661 \pgfsetlinewidth{2\pgflinewidth}
5662 \pgftransformxshift{.7\pgf@circ@res@left}
5663 \pgf@circ@res@step=\pgf@circ@res@right
5664 \advance\pgf@circ@res@step by -\pgf@circ@res@left
5665 \pgf@circ@res@step=.7\pgf@circ@res@step
5666
5667 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5668 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
5669 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
5670 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5671 \pgfusepath{draw}
5672 \pgfpathellipse
5673 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@other}{0pt}}
5674 {\pgfpoint{.5\pgf@circ@res@other}{0pt}}
5675 {\pgfpoint{0pt}{.5\pgf@circ@res@other}}
5676 \pgfusepath{draw}
5677 \endpgfscope
5678
5679 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5680 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
5681
5682 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5683 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
5684
5685 \pgfusepath{draw}
5686
5687 }
5688 }
5689
5690 \pgfdeclareshape{invschmitt}
5691 {
5692 \anchor{center}{\pgfpointorigin}
5693 \savedanchor\northwest{%
5694 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@circ@Rlen
5695 \pgf@y=.5\pgf@y
5696 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@circ@Rlen
5697 \pgf@x=.5\pgf@x
5698 }
5699 \savedanchor\left{%
5700 \pgf@y=0pt
5701 }
5702 \anchor{in}{
5703 \northwest
5704 \pgf@y=0pt
5705 }
5706 \anchor{out}{
5707 \northwest
5708 \pgf@y=0pt
5709 \pgf@x=-\pgf@x
5710 }
5711 \anchor{center}{
5712 \pgfpointorigin
5713 }
5714 \anchor{east}{
5715 \left
5716 \pgf@x=-.8\pgf@x
5717 }
5718 \anchor{west}{
5719 \left
5720 }
5721 \anchor{south}{
5722 \northwest
5723 \pgf@x=0pt
5724 \pgf@y=-\pgf@y
5725 }
5726 \anchor{north}{
5727 \northwest
5728 \pgf@x=0pt
5729 }
5730 \anchor{south west}{
5731 \northwest
5732 \pgf@y=-\pgf@y
5733 }
5734 \anchor{north east}{
5735 \northwest
5736 \pgf@x=-\pgf@x
5737 }
5738 \anchor{north west}{
5739 \northwest
5740 }
5741 \anchor{south east}{
5742 \northwest
5743 \pgf@x=-\pgf@x
5744 \pgf@y=-\pgf@y
5745 }
5746 \backgroundpath{
5747 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5748
5749
5750 \northwest
5751 \pgf@circ@res@up = \pgf@y
5752 \pgf@circ@res@down = -\pgf@y
5753 \pgf@circ@res@right = -\pgf@x
5754 \pgf@circ@res@left = \pgf@x
5755
5756 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right
5757
5758 \pgfscope
5759 \pgfsetlinewidth{2\pgflinewidth}
5760 \pgftransformxshift{.7\pgf@circ@res@left}
5761 \pgf@circ@res@step=\pgf@circ@res@right
5762 \advance\pgf@circ@res@step by -\pgf@circ@res@left
5763 \pgf@circ@res@step=.7\pgf@circ@res@step
5764
5765 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5766 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
5767 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
5768 \pgfpathclose
5769 \pgfusepath{draw}
5770 \pgfpathellipse
5771 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@other}{0pt}}
5772 {\pgfpoint{.5\pgf@circ@res@other}{0pt}}
5773 {\pgfpoint{0pt}{.5\pgf@circ@res@other}}
5774 \pgfsetfillcolor{white}
5775 \pgfusepath{draw,fill}
5776 \endpgfscope
5777
5778 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5779 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
5780
5781 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5782 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
5783 \pgfusepath{draw}
5784 %draw inner shape
5785
5786 \pgfsetlinewidth{2\pgflinewidth}
5787
5788 \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{.3\pgf@circ@res@down}}
5789 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
5790 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@up}}
5791 \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@left}{.3\pgf@circ@res@up}}
5792 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
5793 \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@down}}
5794 \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@up}}
5795 \pgfusepath{draw}
5796
5797 }
5798 }
5799
5800 \pgfdeclareshape{schmitt}
5801 {
5802 \anchor{center}{\pgfpointorigin}
5803 \savedanchor\northwest{%
5804 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@circ@Rlen
5805 \pgf@y=.5\pgf@y
5806 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@circ@Rlen
5807 \pgf@x=.5\pgf@x
5808 }
5809 \savedanchor\left{%
5810 \pgf@y=0pt
5811 }
5812 \anchor{in}{
5813 \northwest
5814 \pgf@y=0pt
5815 }
5816 \anchor{out}{
5817 \northwest
5818 \pgf@y=0pt
5819 \pgf@x=-\pgf@x
5820 }
5821 \anchor{center}{
5822 \pgfpointorigin
5823 }
5824 \anchor{east}{
5825 \left
5826 \pgf@x=-.8\pgf@x
5827 }
5828 \anchor{west}{
5829 \left
5830 }
5831 \anchor{south}{
5832 \northwest
5833 \pgf@x=0pt
5834 \pgf@y=-\pgf@y
5835 }
5836 \anchor{north}{
5837 \northwest
5838 \pgf@x=0pt
5839 }
5840 \anchor{south west}{
5841 \northwest
5842 \pgf@y=-\pgf@y
5843 }
5844 \anchor{north east}{
5845 \northwest
5846 \pgf@x=-\pgf@x
5847 }
5848 \anchor{north west}{
5849 \northwest
5850 }
5851 \anchor{south east}{
5852 \northwest
5853 \pgf@x=-\pgf@x
5854 \pgf@y=-\pgf@y
5855 }
5856 \backgroundpath{
5857 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5858
5859
5860 \northwest
5861 \pgf@circ@res@up = \pgf@y
5862 \pgf@circ@res@down = -\pgf@y
5863 \pgf@circ@res@right = -\pgf@x
5864 \pgf@circ@res@left = \pgf@x
5865
5866 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right
5867
5868 \pgfscope
5869 \pgfsetlinewidth{2\pgflinewidth}
5870 \pgftransformxshift{.7\pgf@circ@res@left}
5871 \pgf@circ@res@step=\pgf@circ@res@right
5872 \advance\pgf@circ@res@step by -\pgf@circ@res@left
5873 \pgf@circ@res@step=.7\pgf@circ@res@step
5874
5875 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5876 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
5877 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
5878 \pgfpathclose
5879 \pgfusepath{draw}
5880 \endpgfscope
5881
5882 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5883 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
5884
5885 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5886 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right-\pgf@circ@res@other}{0pt}}
5887 \pgfusepath{draw}
5888 %draw inner shape
5889
5890 \pgfsetlinewidth{2\pgflinewidth}
5891
5892 \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{.3\pgf@circ@res@down}}
5893 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
5894 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@up}}
5895 \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@left}{.3\pgf@circ@res@up}}
5896 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
5897 \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@down}}
5898 \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@up}}
5899 \pgfusepath{draw}
5900
5901 }
5902 }
5903
5904
5905
5906 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5907
5908 % #1 - name
5909 % #2 - text inside
5910 % #3 - number of inputs
5911 % #4 - is it a not
5912
5913 \long\def\pgfcircdeclareeurologicport#1#2#3#4{
5914 \pgfdeclareshape{european #1 port}
5915 {
5916 \savedanchor\northwest{%
5917 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@circ@Rlen
5918 \pgf@y=.5\pgf@y
5919 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@circ@Rlen
5920 \pgf@x=.5\pgf@x
5921 }
5922 \savedanchor\left{%
5923 \pgf@y=0pt
5924 }
5925 \savedanchor\inOne{%
5926 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@circ@Rlen
5927 \pgf@y=.5\pgf@y
5928 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@y
5929 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@circ@Rlen
5930 \pgf@x=.5\pgf@x
5931 }
5932 \anchor{in}{
5933 \inOne
5934 }
5935 \anchor{in 1}{
5936 \inOne
5937 }
5938 \anchor{in 2}{
5939 \inOne
5940 \pgf@y=-\pgf@y
5941 }
5942 \anchor{out}{
5943 \northwest
5944 \pgf@y=0pt
5945 \pgf@x=-\pgf@x
5946 }
5947 \anchor{center}{
5948 \northwest
5949 \pgf@y=0pt
5950 \pgf@x=-.8\pgf@x
5951 }
5952 \anchor{east}{
5953 \left
5954 \pgf@x=-.8\pgf@x
5955 }
5956 \anchor{west}{
5957 \left
5958 }
5959 \anchor{south}{
5960 \northwest
5961 \pgf@x=0pt
5962 \pgf@y=-\pgf@y
5963 }
5964 \anchor{north}{
5965 \northwest
5966 \pgf@x=0pt
5967 }
5968 \anchor{south west}{
5969 \northwest
5970 \pgf@y=-\pgf@y
5971 }
5972 \anchor{north east}{
5973 \northwest
5974 \pgf@x=-\pgf@x
5975 }
5976 \anchor{north west}{
5977 \northwest
5978 }
5979 \anchor{south east}{
5980 \northwest
5981 \pgf@x=-\pgf@x
5982 \pgf@y=-\pgf@y
5983 }
5984 \backgroundpath{
5985 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5986 \northwest
5987 \pgf@circ@res@up = \pgf@y
5988 \pgf@circ@res@down = -\pgf@y
5989 \pgf@circ@res@right = -\pgf@x
5990 \pgf@circ@res@left = \pgf@x
5991 \def\pgf@temp{1}
5992 \def\pgf@circ@temp{#3}
5993 \ifx\pgftemp\pgf@circ@temp % one input
5994 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5995 \pgfpathlineto{
5996 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}{0pt}}
5997 \else % two inputs
5998 \pgfpathmoveto{
5999 \pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@up}}
6000 \pgfpathlineto{
6001 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}
6002 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@up}}
6003 %
6004 \pgfpathmoveto{
6005 \pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@down}}
6006 \pgfpathlineto{
6007 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}
6008 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@down}}
6009 \fi%
6010 %
6011 %
6012 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6013 \pgfpathlineto{
6014 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{0pt}}
6015 %
6016 \edef\pgf@temp{not}
6017 \edef\pgf@circ@temp{#4}
6018 \ifx\pgf@temp\pgf@circ@temp % is a not
6019 \pgfpathmoveto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not width}\pgf@circ@res@right}{0pt}}
6020 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not height}\pgf@circ@res@up}}
6021 \fi
6022 %
6023 \pgfusepath{draw}
6024 %
6025 \pgfpathmoveto{\pgfpointorigin}
6026 \pgftext{#2}
6027 %
6028 %
6029 %
6030 \pgfsetlinewidth{2\pgflinewidth}
6031 \pgfpathrectanglecorners
6032 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}{\pgf@circ@res@up}}
6033 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{\pgf@circ@res@down}}
6034 \pgfusepath{draw}
6035 %
6036 %
6037 }
6038 }
6039 }
6040
6041
6042
6043 \pgfcircdeclareeurologicport{and}{$\&$}{2}{}
6044 \pgfcircdeclareeurologicport{or}{$\ge 1$}{2}{}
6045 \pgfcircdeclareeurologicport{xor}{$=1$}{2}{}
6046 \pgfcircdeclareeurologicport{not}{$1$}{1}{not}
6047 \pgfcircdeclareeurologicport{nand}{$\&$}{2}{not}
6048 \pgfcircdeclareeurologicport{nor}{$\ge 1$}{2}{not}
6049 \pgfcircdeclareeurologicport{xnor}{$=1$}{2}{not}
6050
6051 \long\def\pgfcircdeclaretransistor#1#2#3{
6052 \pgfdeclareshape{#1}
6053 {
6054 \anchor{center}{
6055 \pgfpointorigin
6056 }
6057 \savedanchor\northeast{% upper right
6058 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@circ@Rlen
6059 \pgf@y=.5\pgf@y
6060 \pgf@x=0pt
6061 }
6062 \savedanchor\left{%center left
6063 \pgf@y=0pt
6064 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@circ@Rlen
6065 }
6066 \anchor{text}{
6067 \northeast
6068 \pgf@y=.7\pgf@y
6069 \pgf@x= \pgf@circ@Rlen
6070 \pgf@x=0.1\pgf@x
6071 }
6072 \anchor{pathstart}{ % south
6073 \northeast
6074 \pgf@y=-\pgf@y
6075 }
6076 \anchor{pathend}{
6077 \northeast
6078 }
6079 \anchor{north}{
6080 \northeast
6081 \pgf@circ@res@step=\pgf@y
6082 \left
6083 \pgf@y=\pgf@circ@res@step
6084 \pgf@x=.5\pgf@x
6085 }
6086 \anchor{west}{
6087 \left
6088 }
6089 \anchor{east}{
6090 \northeast
6091 \pgf@y=0pt
6092 }
6093 \anchor{south}{
6094 \northeast
6095 \pgf@circ@res@step=\pgf@y
6096 \left
6097 \pgf@y=-\pgf@circ@res@step
6098 \pgf@x=.5\pgf@x
6099 }
6100 \anchor{south west}{
6101 \northeast
6102 \pgf@circ@res@step=\pgf@y
6103 \left
6104 \pgf@y=-\pgf@circ@res@step
6105 }
6106 \anchor{north east}{
6107 \northeast
6108 }
6109 \anchor{north west}{
6110 \northeast
6111 \pgf@circ@res@step=\pgf@y
6112 \left
6113 \pgf@y=\pgf@circ@res@step
6114 }
6115 \anchor{south east}{
6116 \northeast
6117 \pgf@y=-\pgf@y
6118 }
6119 \anchor{B}{
6120 \northeast
6121 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6122 \left
6123 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6124 }
6125 \anchor{base}{
6126 \northeast
6127 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6128 \left
6129 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6130 }
6131 \anchor{G}{
6132 \northeast
6133 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6134 \left
6135 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6136 }
6137 \anchor{gate}{
6138 \northeast
6139 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6140 \left
6141 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6142 }
6143 \anchor{nobase}{
6144 \left
6145 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@x
6146 }
6147 \anchor{nogate}{
6148 \left
6149 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@x
6150 }
6151 \anchor{E}{
6152 \northeast
6153 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6154 }
6155 \anchor{emitter}{
6156 \northeast
6157 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6158 }
6159 \anchor{C}{
6160 \northeast
6161 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6162 }
6163 \anchor{collector}{
6164 \northeast
6165 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6166 }
6167 \anchor{S}{
6168 \northeast
6169 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6170 }
6171 \anchor{source}{
6172 \northeast
6173 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6174 }
6175 \anchor{D}{
6176 \northeast
6177 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6178 }
6179 \anchor{drain}{
6180 \northeast
6181 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6182 }
6183 #2
6184 \backgroundpath{
6185 \pgftransformationadjustments
6186 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
6187 %
6188 \ifnum \pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction} > 0
6189 \pgf@circuit@trans@ntypetrue
6190 \else
6191 \pgf@circuit@trans@ntypefalse
6192 \fi
6193 \northeast
6194 \pgf@circ@res@up = \pgf@y
6195 \pgf@circ@res@down = -\pgf@y
6196 \pgf@circ@res@right = \pgf@x
6197 \left
6198 \pgf@circ@res@left = \pgf@x
6199 %
6200 #3
6201 % BODY DIODE
6202 \ifpgf@circuit@fet@bodydiode
6203 \drawbodydiode{#1}
6204 \fi
6205 %
6206 }
6207 }
6208 }
6209
6210 \long\def\drawbodydiode#1{
6211 \pgfscope
6212 \pgftransformshift{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
6213 \pgftransformrotate{90}
6214 \pgftransformscale{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode scale}}
6215 \ifpgf@circuit@fulldiode
6216 \pgfnode{fulldiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
6217 \else
6218 \pgfnode{emptydiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
6219 \fi
6220 \endpgfscope
6221 %Draw upper connection to body diode
6222 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}
6223 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
6224 \pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}
6225 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
6226 \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{east}}
6227 \pgfusepath{draw}
6228 \pgfscope
6229 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}
6230 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
6231 \pgftransformscale{0.5}
6232 \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
6233 \endpgfscope{}
6234 %Draw lower connection to body diode
6235 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}
6236 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
6237 \pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
6238 \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{west}}
6239 \pgfusepath{draw}
6240 \pgfscope
6241 \pgftransformshift{\pgfpoint{\pgf@circ@res@right} {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
6242 \pgftransformscale{0.5}
6243 \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
6244 \endpgfscope
6245 }
6246
6247 \long\def\declarebpt#1{
6248 \pgfcircdeclaretransistor{#1}{}{
6249 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6250 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6251 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
6252 \pgfpathlineto{\pgfpoint
6253 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6254 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@up}}
6255 \pgfusepath{draw}
6256
6257 \pgfscope
6258 \pgfpathmoveto{\pgfpoint
6259 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6260 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
6261 \pgfpathlineto{\pgfpoint
6262 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6263 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6264 \pgfsetlinewidth{2\pgflinewidth}
6265 \pgfusepath{draw}
6266 \endpgfscope
6267
6268 \pgfpathmoveto{\pgfpoint
6269 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6270 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@down}}
6271 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6272 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6273 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6274 \pgfusepath{draw}
6275 %draw arrow depending on type of transiytor
6276 \pgfscope
6277 \pgfslopedattimetrue
6278 \pgfallowupsidedownattimetrue
6279 \pgfresetnontranslationattimefalse
6280 \ifpgf@circuit@trans@ntype
6281 \pgftransformlineattime{.5}{%
6282 \pgfpoint%
6283 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6284 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@down}%
6285 }{%
6286 \pgfpoint{\pgf@circ@res@right}%
6287 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}%
6288 }
6289 \else
6290 \pgftransformlineattime{.5}{%
6291 \pgfpoint{\pgf@circ@res@right}%
6292 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}%
6293 }{%
6294 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6295 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@up}%
6296 }
6297 \fi
6298 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6299 \endpgfscope
6300
6301 \ifpgf@circuit@bpt@drawphoto
6302 \pgfscope
6303 \pgfsetarrowsstart{latex'}
6304 \pgfpathmoveto{\pgfpointadd{\pgfpoint
6305 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6306 {\pgf@circ@res@up+\pgf@circ@res@down}}
6307 {\pgfpoint{0.05\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
6308 \pgfpathlineto{\pgfpointadd{\pgfpoint
6309 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6310 {\pgf@circ@res@up+\pgf@circ@res@down}}
6311 {\pgfpoint{0.5\pgf@circ@res@left}{0.3\pgf@circ@res@up}}}
6312 \pgfusepath{draw}
6313 \pgfpathmoveto{\pgfpointadd{\pgfpoint
6314 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6315 {\pgf@circ@res@up+\pgf@circ@res@down}}
6316 {\pgfpoint{0.05\pgf@circ@res@left}{-0.1\pgf@circ@res@up}}}
6317 \pgfpathlineto{\pgfpointadd{\pgfpoint
6318 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6319 {\pgf@circ@res@up+\pgf@circ@res@down}}
6320 {\pgfpoint{0.5\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
6321 \pgfusepath{draw}
6322 \endpgfscope
6323 \else
6324 \ifpgf@circuit@bpt@drawbase
6325 \pgfpathmoveto{\pgfpoint
6326 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6327 {\pgf@circ@res@up+\pgf@circ@res@down}}
6328 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
6329 \pgfusepath{draw}
6330 \fi
6331 \fi
6332 }
6333 }
6334
6335 \declarebpt{npn}
6336 \declarebpt{pnp}
6337
6338 \long\def\declareigbt#1{
6339 \pgfcircdeclaretransistor{#1}{}
6340 {
6341 %draw upper connection
6342 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6343 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6344 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
6345 \pgfpathlineto{\pgfpoint
6346 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6347 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@up}}
6348 \pgfusepath{draw}
6349
6350 %draw thicker gate lines
6351 \pgfscope
6352 \pgfpathmoveto{\pgfpoint
6353 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6354 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6355 \pgfpathlineto{\pgfpoint
6356 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6357 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6358 \pgfpathmoveto{\pgfpoint
6359 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6360 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6361 \pgfpathlineto{\pgfpoint
6362 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6363 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6364 \pgfsetlinewidth{2\pgflinewidth}
6365 \pgfusepath{draw}
6366 \endpgfscope
6367 %draw lower connection
6368 \pgfpathmoveto{\pgfpoint
6369 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6370 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@down}}
6371 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6372 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
6373 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6374 \pgfusepath{draw}
6375 %draw arrow depending on type of transiytor
6376 \pgfscope
6377 \pgfslopedattimetrue
6378 \pgfallowupsidedownattimetrue
6379 \pgfresetnontranslationattimefalse
6380 \ifpgf@circuit@trans@ntype
6381 \pgftransformlineattime{.5}{%
6382 \pgfpoint%
6383 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6384 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@down}%
6385 }{%
6386 \pgfpoint{\pgf@circ@res@right}%
6387 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}%
6388 }
6389 \else
6390 \pgftransformlineattime{.5}{%
6391 \pgfpoint{\pgf@circ@res@right}%
6392 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}%
6393 }{%
6394 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6395 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@up}%
6396 }
6397 \fi
6398 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6399 \endpgfscope
6400 %draw gate
6401 \ifpgf@circuit@trans@ntype
6402 \pgfpathmoveto{\pgfpoint
6403 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6404 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6405 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
6406 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6407 \else
6408 \pgfpathmoveto{\pgfpoint
6409 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6410 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@up}}
6411 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
6412 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@up}}
6413 \fi
6414 \pgfusepath{draw}
6415 }
6416 }
6417
6418 \declareigbt{pigbt}
6419 \declareigbt{nigbt}
6420 \declareigbt{Lnigbt}
6421 \declareigbt{Lpigbt}
6422
6423
6424 \pgfcircdeclaretransistor{nmos}{}{%
6425 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6426 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6427 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
6428 \pgfpathlineto{\pgfpoint
6429 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6430 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
6431
6432 \pgfpathmoveto{\pgfpoint
6433 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6434 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
6435 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6436 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
6437 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6438 \pgfusepath{draw}
6439
6440 \pgfscope
6441 \pgfpathmoveto{\pgfpoint
6442 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6443 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@up}}
6444 \pgfpathlineto{\pgfpoint
6445 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6446 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@down}}
6447 \pgfpathmoveto{\pgfpoint
6448 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
6449 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
6450 \pgfpathlineto{\pgfpoint
6451 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
6452 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
6453 \pgfsetlinewidth{2\pgflinewidth}
6454 \pgfusepath{draw}
6455 \endpgfscope
6456 \ifpgf@circuit@mos@arrows
6457 \pgfscope
6458 \pgfslopedattimetrue
6459 \pgfallowupsidedownattimetrue
6460 \pgfresetnontranslationattimefalse
6461 \pgftransformlineattime{.6}{%
6462 \pgfpoint%
6463 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}%
6464 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
6465 }{%
6466 \pgfpoint
6467 {\pgf@circ@res@right}%
6468 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
6469 }
6470 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6471 \endpgfscope
6472 \fi
6473
6474 \ifpgf@circuit@bpt@drawgate
6475 \pgfpathmoveto{\pgfpoint
6476 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
6477 {\pgf@circ@res@up+\pgf@circ@res@down}}
6478 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
6479 \pgfusepath{draw}
6480 \fi
6481 }
6482
6483
6484 \pgfcircdeclaretransistor{pmos}{}{%
6485 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6486 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6487 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
6488 \pgfpathlineto{\pgfpoint
6489 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6490 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
6491 \pgfusepath{draw}
6492
6493 \ifpgf@circuit@mos@arrows
6494 \pgfscope
6495 \pgfslopedattimetrue
6496 \pgfallowupsidedownattimetrue
6497 \pgfresetnontranslationattimefalse
6498 \pgftransformlineattime{.4}{%
6499 \pgfpoint%
6500 {\pgf@circ@res@right}%
6501 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
6502 }{%
6503 \pgfpoint
6504 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}%
6505 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
6506 }
6507 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6508 \endpgfscope
6509 \fi
6510
6511 \pgfscope
6512 \pgfpathmoveto{\pgfpoint
6513 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6514 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@up}}
6515 \pgfpathlineto{\pgfpoint
6516 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6517 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@down}}
6518 \pgfpathmoveto{\pgfpoint
6519 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
6520 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
6521 \pgfpathlineto{\pgfpoint
6522 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
6523 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
6524 \pgfsetlinewidth{2\pgflinewidth}
6525 \pgfusepath{draw}
6526 \endpgfscope
6527
6528 \pgfpathmoveto{\pgfpoint
6529 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6530 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
6531 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6532 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
6533 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6534
6535
6536 \pgfusepath{draw}
6537 \ifpgf@circuit@bpt@drawgate
6538 \pgfpathmoveto{\pgfpoint
6539 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
6540 {\pgf@circ@res@up+\pgf@circ@res@down}}
6541 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
6542 \pgfusepath{draw}
6543 \fi
6544 \pgfpathcircle{\pgfpoint
6545 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
6546 {\pgf@circ@res@up+\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
6547 \ifpgf@circuit@pmos@emptycircle
6548 \pgfsetfillcolor{white}
6549 \fi
6550 \pgfusepath{draw,fill}
6551 }
6552
6553 \long\def\drawfetcore#1{
6554 \pgftransformationadjustments
6555 %top connection
6556 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6557 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6558 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
6559 \pgfpathlineto{\pgfpoint
6560 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6561 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
6562 \pgfusepath{draw}
6563 \pgfscope
6564 \pgfpathmoveto{\pgfpoint
6565 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6566 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
6567 \ifpgf@circuit@trans@depletiontype
6568 \pgfpathlineto{\pgfpoint
6569 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6570 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6571 \else
6572
6573 \pgfpathlineto{\pgfpoint
6574 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6575 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up*0.45}}
6576 \pgfpathmoveto{\pgfpoint
6577 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6578 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up*0.25}}
6579 \pgfpathlineto{\pgfpoint
6580 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6581 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down*0.25}}
6582 \pgfpathmoveto{\pgfpoint
6583 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6584 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@down*0.45}}
6585 \pgfpathlineto{\pgfpoint
6586 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6587 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6588 \fi
6589 \pgfsetlinewidth{2\pgflinewidth}
6590 \pgfusepath{draw}
6591 \endpgfscope
6592 %Bulk connection line
6593 \pgfpathmoveto{\pgfpoint
6594 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6595 {\pgf@circ@res@up+\pgf@circ@res@down}}
6596 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
6597 {\pgf@circ@res@up+\pgf@circ@res@down}}
6598
6599 %bottom connection
6600 \pgfpathmoveto{\pgfpoint
6601 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6602 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
6603 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6604 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
6605 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6606 \pgfusepath{draw}
6607
6608 %draw thick gate line
6609 \pgfscope
6610 \pgfpathmoveto{\pgfpoint
6611 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6612 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6613 \pgfpathlineto{\pgfpoint
6614 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6615 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6616 \pgfsetlinewidth{2\pgflinewidth}
6617 \pgfusepath{draw}
6618 \endpgfscope
6619
6620 \pgfscope
6621 \pgfslopedattimetrue
6622 \pgfallowupsidedownattimetrue
6623 \pgfresetnontranslationattimefalse
6624
6625 \pgftransformlineattime{.6}{%
6626 \pgfpoint
6627 {\pgf@circ@res@right}%
6628 {\pgf@circ@res@up+\pgf@circ@res@down}%
6629 }{%
6630 \pgfpoint%
6631 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6632 {\pgf@circ@res@up+\pgf@circ@res@down}%
6633 }
6634 \ifpgf@circuit@trans@ntype
6635 \else
6636 \pgftransformrotate{180}
6637 \fi
6638 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6639 \endpgfscope
6640
6641 % GATE CONNECTION
6642 \ifpgf@circuit@bpt@drawgate
6643 \ifpgf@circuit@trans@ntype
6644 \pgfpathmoveto{\pgfpoint
6645 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6646 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6647 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6648 \else
6649 \pgfpathmoveto{\pgfpoint
6650 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6651 {-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6652 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6653 \fi
6654 \pgfusepath{draw}
6655 \fi
6656
6657 }
6658
6659 \long\def\pgfdeclaretransistorwrapperaddbulk#1#2#3
6660 {\pgfcircdeclaretransistor{#1}{
6661 \anchor{bulk}{\left\pgf@x=0pt}
6662 \anchor{B}{\left\pgf@x=0pt}%override Base anchor from npn&igbt
6663 #2
6664 }
6665 {#3}
6666 }
6667
6668
6669 \pgfdeclaretransistorwrapperaddbulk{nfet}{}{%
6670 \pgf@circuit@trans@depletiontypefalse
6671 \drawfetcore{nfet}
6672 }
6673
6674
6675 \pgfdeclaretransistorwrapperaddbulk{pfet}{}{%
6676 \pgf@circuit@trans@depletiontypefalse
6677 \drawfetcore{pfet}
6678 }
6679
6680 % N-CHANNEL IGFET ENHANCEMENT TYPE
6681 \pgfdeclaretransistorwrapperaddbulk{nigfete}{}{%
6682 \pgf@circuit@trans@depletiontypefalse
6683 \drawfetcore{nigfete}
6684
6685 % SOURCE CONNECTION
6686 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6687 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6688 \pgfusepath{draw}
6689
6690 % SOLDER DOT at source-bulk connection
6691 \ifpgf@circuit@fet@solderdot
6692 \pgfscope
6693 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6694 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6695 \pgfnode{circ}{center}{}{}{}
6696 \endpgfscope{}
6697 \fi
6698 }
6699
6700
6701
6702
6703 % N-CHANNEL IGFET ENHANCEMENT TYPE with Bulk connector
6704 \pgfdeclaretransistorwrapperaddbulk{nigfetebulk}{}{%
6705 \pgf@circuit@trans@depletiontypefalse
6706 \drawfetcore{nigfetebulk}
6707 % SOLDER DOT at source-bulk connection
6708 \ifpgf@circuit@fet@solderdot
6709 \pgfscope
6710 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6711 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}}
6712 \pgfnode{circ}{center}{}{}{}
6713 \endpgfscope{}
6714 \fi
6715 }
6716
6717
6718
6719 % N-CHANNEL IGFET DEPLETION TYPE
6720 \pgfdeclaretransistorwrapperaddbulk{nigfetd}{}{%
6721 \pgf@circuit@trans@depletiontypetrue
6722 \drawfetcore{nigfetd}
6723
6724 % SOURCE CONNECTION
6725 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6726 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6727 \pgfusepath{draw}
6728
6729 % SOLDER DOT at source-bulk connection
6730 \ifpgf@circuit@fet@solderdot
6731 \pgfscope
6732 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6733 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6734 \pgfnode{circ}{center}{}{}{}
6735 \endpgfscope{}
6736 \fi
6737 }
6738
6739 % P-CHANNEL IGFET ENHANCEMENT TYPE
6740 \pgfdeclaretransistorwrapperaddbulk{pigfete}{}{%
6741 \pgf@circuit@trans@depletiontypefalse
6742 \drawfetcore{pigfete}
6743 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6744
6745 % SOURCE CONNECTION
6746 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6747 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6748 \pgfusepath{draw}
6749
6750
6751 % SOLDER DOT at source-bulk connection
6752 \ifpgf@circuit@fet@solderdot
6753 \pgfscope
6754 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6755 \pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@up}}
6756 \pgfnode{circ}{center}{}{}{}
6757 \endpgfscope
6758 \fi
6759 }
6760
6761 % P-CHANNEL IGFET ENHANCEMENT TYPE with bulk connector
6762 \pgfdeclaretransistorwrapperaddbulk{pigfetebulk}{}{%
6763 \pgf@circuit@trans@depletiontypefalse
6764 \drawfetcore{pigfetebulk}
6765 }
6766
6767
6768 % P-CHANNEL IGFET DEPLETION TYPE
6769 \pgfdeclaretransistorwrapperaddbulk{pigfetd}{}{%
6770 \pgf@circuit@trans@depletiontypetrue
6771 \drawfetcore{pigfetd}
6772
6773 % SOURCE CONNECTION
6774 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6775 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6776 \pgfusepath{draw}
6777
6778
6779 % SOLDER DOT at source-bulk connection
6780 \ifpgf@circuit@fet@solderdot
6781 \pgfscope
6782 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6783 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@up}}
6784 \pgfnode{circ}{center}{}{}{}
6785 \endpgfscope{}
6786 \fi
6787 }
6788
6789 \pgfcircdeclaretransistor{njfet}{}{%
6790 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6791 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6792 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}}
6793 \pgfpathlineto{\pgfpoint
6794 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6795 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}}
6796
6797 \pgfpathmoveto{\pgfpoint
6798 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6799 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6800 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6801 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6802 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6803 \pgfusepath{draw}
6804
6805 \pgfscope
6806 \pgfpathmoveto{\pgfpoint
6807 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6808 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf@circ@res@up}}
6809 \pgfpathlineto{\pgfpoint
6810 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6811 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf@circ@res@down}}
6812 \pgfsetlinewidth{2\pgflinewidth}
6813 \pgfusepath{draw}
6814 \endpgfscope
6815
6816 \pgfscope
6817 \pgfslopedattimetrue
6818 \pgfallowupsidedownattimetrue
6819 \pgfresetnontranslationattimefalse
6820 \pgftransformlineattime{.6}{%
6821 \pgfpoint{\pgf@circ@res@left}%
6822 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}%
6823 }{%
6824 \pgfpoint
6825 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}%
6826 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}%
6827 }
6828 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6829 \endpgfscope
6830
6831 \pgfpathmoveto{\pgfpoint
6832 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6833 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6834 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
6835 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6836 \pgfusepath{draw}
6837 }
6838
6839
6840 \pgfcircdeclaretransistor{pjfet}{}{%
6841 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6842 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6843 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6844 \pgfpathlineto{\pgfpoint
6845 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6846 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6847
6848 \pgfpathmoveto{\pgfpoint
6849 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6850 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}}
6851 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6852 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}}
6853 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6854 \pgfusepath{draw}
6855
6856 \pgfscope
6857 \pgfpathmoveto{\pgfpoint
6858 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6859 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf@circ@res@up}}
6860 \pgfpathlineto{\pgfpoint
6861 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6862 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf@circ@res@down}}
6863 \pgfsetlinewidth{2\pgflinewidth}
6864 \pgfusepath{draw}
6865 \endpgfscope
6866
6867 \pgfscope
6868 \pgfslopedattimetrue
6869 \pgfallowupsidedownattimetrue
6870 \pgfresetnontranslationattimefalse
6871 \pgftransformlineattime{.4}{%
6872 \pgfpoint%
6873 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}%
6874 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}%
6875 }{%
6876 \pgfpoint{\pgf@circ@res@left}%
6877 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}%
6878 }
6879 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6880 \endpgfscope
6881
6882
6883 \pgfpathmoveto{\pgfpoint
6884 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6885 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6886 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
6887 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6888 \pgfusepath{draw}
6889 }
6890
6891
6892 \pgfdeclaretransistorwrapperaddbulk{isfet}{}{%
6893 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6894 % DRAIN CONNECTION
6895 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6896 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
6897 % DRAIN
6898 \pgfpathlineto{\pgfpoint
6899 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
6900 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
6901 \pgfusepath{draw}
6902
6903 % GATE, DEPLETION TYPE
6904 \pgfscope %% added
6905 \pgfpathmoveto{\pgfpoint
6906 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
6907 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@up}}
6908 \pgfpathlineto{\pgfpoint
6909 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
6910 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@down}}
6911 \pgfsetlinewidth{2\pgflinewidth} %% added
6912 \pgfusepath{draw} %% added
6913 \endpgfscope %% added
6914
6915 % BULK
6916 \pgfpathmoveto{\pgfpoint
6917 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
6918 {\pgf@circ@res@up+\pgf@circ@res@down}}
6919 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+.5\pgflinewidth}
6920 {\pgf@circ@res@up+\pgf@circ@res@down}}
6921
6922 % SOURCE
6923 \pgfpathmoveto{\pgfpoint
6924 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
6925 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
6926 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6927 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
6928 % SOURCE CONNECTION
6929 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6930 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6931 \pgfusepath{draw}
6932
6933 % GATE
6934 %\pgfscope
6935 %\pgfpathmoveto{\pgfpoint
6936 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf@circ@res@left}
6937 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
6938 %\pgfpathlineto{\pgfpoint
6939 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf@circ@res@left}
6940 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
6941 %\pgfsetlinewidth{2\pgflinewidth}
6942 %\pgfusepath{draw}
6943 %\endpgfscope
6944
6945
6946 % SOLDER DOT at source-bulk connection
6947 \ifpgf@circuit@fet@solderdot
6948 \pgfscope
6949 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6950 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6951 \pgfnode{circ}{center}{}{}{}
6952 \endpgfscope{}
6953 \fi
6954 % ARROW
6955 \pgfscope
6956 \pgfslopedattimetrue
6957 \pgfallowupsidedownattimetrue
6958 \pgfresetnontranslationattimefalse
6959 \pgftransformlineattime{.6}{%
6960 \pgfpoint
6961 {\pgf@circ@res@right}%
6962 {\pgf@circ@res@up+\pgf@circ@res@down}%
6963 }{%
6964 \pgfpoint%
6965 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}%
6966 {\pgf@circ@res@up+\pgf@circ@res@down}%
6967 }
6968 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6969 \endpgfscope
6970 \pgfusepath{draw}
6971
6972 % Wavy lines
6973 \pgfscope
6974 \pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves y sep}\pgf@circ@res@up}}
6975 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6976 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6977 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6978 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6979 \pgfusepath{draw}
6980
6981 \pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf@circ@res@up}{0cm}}
6982 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6983 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6984 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6985 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6986 \pgfusepath{draw}
6987
6988 \pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves y sep}\pgf@circ@res@up}}
6989 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6990 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6991 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6992 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6993 \pgfusepath{draw}
6994 \endpgfscope
6995
6996 }
6997
6998
6999 %% Black thyristor
7000
7001 \pgfcircdeclarebipole{
7002 \anchor{gate}{
7003 \northeast
7004 }
7005 \anchor{anode}{
7006 \southwest
7007 \pgf@y=0cm
7008 }
7009 \anchor{G}{
7010 \northeast
7011 }
7012 \anchor{cathode}{
7013 \northeast
7014 \pgf@y=0cm
7015 }
7016 }{\ctikzvalof{tripoles/thyristor/height 2}}{fullthyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
7017
7018 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7019
7020 \pgf@circ@res@other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf@circ@res@left
7021 \pgf@circ@res@step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf@circ@res@right
7022
7023 \pgfscope
7024 \pgftransformxshift{\pgf@circ@res@other}
7025 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7026
7027 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7028 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7029 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7030 \pgfusepath{draw,fill}
7031
7032 \pgfsetlinewidth{\pgfstartlinewidth}
7033
7034 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7035 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf@circ@res@up}}
7036 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\pgf@circ@res@up}}
7037 \pgfusepath{draw}
7038 \endpgfscope
7039
7040 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
7041 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@down}}
7042
7043 \pgfusepath{draw}
7044
7045 \pgfsetlinewidth{\pgfstartlinewidth}
7046
7047 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7048 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7049
7050 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7051 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7052
7053 \pgfusepath{draw}
7054
7055 }
7056
7057 %% Empty thyristor
7058
7059 \pgfcircdeclarebipole{
7060 \anchor{gate}{
7061 \northeast
7062 }
7063 \anchor{anode}{
7064 \southwest
7065 \pgf@y=0cm
7066 }
7067 \anchor{G}{
7068 \northeast
7069 }
7070 \anchor{cathode}{
7071 \northeast
7072 \pgf@y=0cm
7073 }
7074 }{\ctikzvalof{tripoles/thyristor/height 2}}{emptythyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
7075
7076 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7077
7078 \pgf@circ@res@other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf@circ@res@left
7079 \pgf@circ@res@step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf@circ@res@right
7080
7081 \pgfscope
7082 \pgftransformxshift{\pgf@circ@res@other}
7083 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7084
7085 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7086 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7087 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7088 \pgfusepath{draw}
7089
7090 \pgfsetlinewidth{\pgfstartlinewidth}
7091
7092 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7093 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf@circ@res@up}}
7094 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\pgf@circ@res@up}}
7095 \pgfusepath{draw}
7096 \endpgfscope
7097
7098 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
7099 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@down}}
7100
7101 \pgfusepath{draw}
7102
7103 \pgfsetlinewidth{\pgfstartlinewidth}
7104
7105 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7106 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7107
7108 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7109 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7110
7111 \pgfusepath{draw}
7112
7113 }
7114
7115 %% Empty triac
7116
7117 \pgfcircdeclarebipole{
7118 \anchor{gate}{
7119 \northeast
7120 }
7121 \anchor{G}{
7122 \northeast
7123 }
7124 \anchor{anode}{
7125 \southwest
7126 \pgf@y=0cm
7127 }
7128 \anchor{cathode}{
7129 \northeast
7130 \pgf@y=0cm
7131 }
7132 }{\ctikzvalof{tripoles/triac/height}}{emptytriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
7133
7134 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7135
7136 \pgf@circ@res@other = \ctikzvalof{tripoles/triac/diode width left}\pgf@circ@res@left
7137 \pgf@circ@res@step = \ctikzvalof{tripoles/triac/diode width right}\pgf@circ@res@right
7138
7139 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7140 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7141 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7142 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7143
7144 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7145 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7146 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7147 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7148
7149 \pgfusepath{draw}
7150
7151 \pgfsetlinewidth{\pgfstartlinewidth}
7152
7153 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7154 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7155 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % sqrt(1/2)
7156
7157 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7158 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7159
7160 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7161 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7162
7163 \pgfusepath{draw}
7164
7165 }
7166
7167 %% Empty triac
7168
7169 \pgfcircdeclarebipole{
7170 \anchor{gate}{
7171 \northeast
7172 }
7173 \anchor{G}{
7174 \northeast
7175 }
7176 \anchor{anode}{
7177 \southwest
7178 \pgf@y=0cm
7179 }
7180 \anchor{cathode}{
7181 \northeast
7182 \pgf@y=0cm
7183 }
7184 }{\ctikzvalof{tripoles/triac/height}}{fulltriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
7185
7186 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7187
7188 \pgf@circ@res@other = \ctikzvalof{tripoles/triac/diode width left}\pgf@circ@res@left
7189 \pgf@circ@res@step = \ctikzvalof{tripoles/triac/diode width right}\pgf@circ@res@right
7190
7191 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7192 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7193 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7194 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7195
7196 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7197 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7198 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7199 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7200
7201 \pgfusepath{draw,fill}
7202
7203 \pgfsetlinewidth{\pgfstartlinewidth}
7204
7205 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7206 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7207 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % sqrt(1/2)
7208
7209 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7210 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7211
7212 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7213 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7214
7215 \pgfusepath{draw}
7216
7217 }
7218
7219
7220
7221
7222
7223
7224
7225 \pgfcircdeclarebipole{
7226 \anchor{out 1}{
7227 \northeast
7228 \pgf@y=0cm
7229 }
7230 \anchor{out 2}{
7231 \northeast
7232 \pgf@y=.8\pgf@y
7233 }
7234 }{\ctikzvalof{tripoles/toggleswitch/height 2}}{toggleswitch}{\ctikzvalof{tripoles/toggleswitch/height}}{\ctikzvalof{tripoles/toggleswitch/width}}{
7235
7236 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7237 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@left}{0pt}}
7238 \pgfusepath{draw}
7239 \pgfscope
7240 \pgfpathmoveto{\pgfpoint{.3\pgf@circ@res@left}{0pt}}
7241 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7242 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{.5\pgf@circ@res@up}}
7243 \pgfusepath{draw}
7244 \endpgfscope
7245
7246 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7247 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{0}}
7248
7249 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{.8\pgf@circ@res@up}}
7250 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.8\pgf@circ@res@up}}
7251 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.15\pgf@circ@res@up}}
7252 \pgfusepath{draw}
7253
7254
7255 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@left}{\pgf@circ@res@up}}
7256 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{\pgf@circ@res@up}}
7257 \pgfusepath{draw}
7258
7259 \pgfsetdash{{.08\pgf@circ@res@up}{.04\pgf@circ@res@up}{.7\pgf@circ@res@up}{.04\pgf@circ@res@up}{.8\pgf@circ@res@up}}{0cm}
7260 \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@up}}
7261 \pgfpathlineto{\pgfpoint{0}{.8\pgf@circ@res@up}}
7262 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@left}{.6\pgf@circ@res@up}}
7263 \pgfpathlineto{\pgfpoint{0}{.4\pgf@circ@res@up}}
7264 \pgfpathlineto{\pgfpoint{0}{.2\pgf@circ@res@up}}
7265 \pgfusepath{draw}
7266 \pgfsetdash{}{0cm}
7267 }
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278 \pgfdeclareshape{op amp}
7279 {
7280 \anchor{center}{\pgfpointorigin}
7281 \savedanchor\northwest{%
7282 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
7283 \pgf@y=.5\pgf@y
7284 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
7285 \pgf@x=.5\pgf@x
7286 }
7287 \anchor{south}{
7288 \northwest
7289 \pgf@y=-\pgf@y
7290 \pgf@x=0pt
7291 }
7292 \anchor{north}{
7293 \northwest
7294 \pgf@x=0pt
7295 }
7296 \savedanchor\left{%
7297 \pgf@y=0pt
7298 }
7299 \anchor{leftedge}
7300 {\left
7301 \pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x
7302 }
7303 \savedanchor\inOne{%
7304 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
7305 \pgf@y=.5\pgf@y
7306 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
7307 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
7308 \pgf@x=.5\pgf@x
7309 }
7310 \anchor{-}{
7311 \inOne
7312 }
7313 \anchor{+}{
7314 \inOne
7315 \pgf@y=-\pgf@y
7316 }
7317 \savedanchor\up{%
7318 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
7319 \pgf@y=.5\pgf@y
7320 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
7321 \pgf@x=.5\pgf@x
7322 \pgf@circ@res@up = \pgf@y
7323 \pgf@circ@res@right = -\pgf@x
7324 \pgf@circ@res@left = \pgf@x
7325 \pgfpointlineattime{
7326 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
7327 \pgfpoint{
7328 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7329 {\pgf@circ@res@up}}
7330 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7331 }
7332 \anchor{up}{
7333 \up
7334 }
7335 \anchor{down}{
7336 \up
7337 \pgf@y=-\pgf@y
7338 }
7339 \anchor{out}{
7340 \northwest
7341 \pgf@y=0pt
7342 \pgf@x=-\pgf@x
7343 }
7344 \anchor{west}{
7345 \left
7346 }
7347 \anchor{east}{
7348 \left
7349 \pgf@x=-\pgf@x
7350 }
7351
7352 \backgroundpath{
7353 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7354
7355
7356 \northwest
7357 \pgf@circ@res@up = \pgf@y
7358 \pgf@circ@res@down = -\pgf@y
7359 \pgf@circ@res@right = -\pgf@x
7360 \pgf@circ@res@left = \pgf@x
7361
7362 \pgfpathmoveto{\pgfpoint
7363 {\pgf@circ@res@left}
7364 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
7365 \pgfpathlineto{\pgfpoint
7366 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7367 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
7368 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
7369
7370
7371 \pgfpathmoveto{\pgfpoint
7372 {\pgf@circ@res@left}
7373 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
7374 \pgfpathlineto{\pgfpoint
7375 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7376 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
7377 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
7378
7379 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7380 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7381 \pgfsetrectcap
7382 \pgfusepath{draw}
7383
7384
7385 \pgfscope
7386 \pgfsetlinewidth{2\pgflinewidth}
7387 \pgftransformxshift{.7\pgf@circ@res@left}
7388 \pgf@circ@res@step=\pgf@circ@res@right
7389 \advance\pgf@circ@res@step by -\pgf@circ@res@left
7390 \pgf@circ@res@step=.7\pgf@circ@res@step
7391
7392 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7393 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7394 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7395 \pgfpathclose
7396 \pgfusepath{draw}
7397 \endpgfscope
7398
7399
7400
7401 }
7402 }
7403
7404 %op amp shape as in european standard en 60617
7405 \pgfdeclareshape{en amp}
7406 {
7407 \anchor{center}{\pgfpointorigin}
7408 \savedanchor\northwest{%
7409 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/height}\pgf@circ@Rlen
7410 \pgf@y=.5\pgf@y
7411 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/width}\pgf@circ@Rlen
7412 \pgf@x=.5\pgf@x
7413 }
7414 \anchor{south}{
7415 \northwest
7416 \pgf@y=-\pgf@y
7417 \pgf@x=0pt
7418 }
7419 \anchor{north}{
7420 \northwest
7421 \pgf@x=0pt
7422 }
7423 \savedanchor\left{%
7424 \pgf@y=0pt
7425 }
7426 \anchor{leftedge}
7427 {
7428 \left
7429 \pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/port width}\pgf@x
7430 }
7431 \savedanchor\inOne{%
7432 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/height}\pgf@circ@Rlen
7433 \pgf@y=.5\pgf@y
7434 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@y
7435 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/width}\pgf@circ@Rlen
7436 \pgf@x=.5\pgf@x
7437 }
7438 \anchor{-}{
7439 \inOne
7440 }
7441 \anchor{+}{
7442 \inOne
7443 \pgf@y=-\pgf@y
7444 }
7445 \anchor{up}{
7446 \northwest
7447 \pgf@x=0pt
7448 }
7449 \anchor{down}{
7450 \northwest
7451 \pgf@x=0pt
7452 \pgf@y=-\pgf@y
7453 }
7454 \anchor{out}{
7455 \northwest
7456 \pgf@y=0pt
7457 \pgf@x=-\pgf@x
7458 }
7459 \anchor{west}{
7460 \left
7461 }
7462 \anchor{east}{
7463 \left
7464 \pgf@x=-\pgf@x
7465 }
7466 \backgroundpath{
7467 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7468 \northwest
7469 \pgf@circ@res@up = \pgf@y
7470 \pgf@circ@res@down = -\pgf@y
7471 \pgf@circ@res@right = -\pgf@x
7472 \pgf@circ@res@left = \pgf@x
7473
7474 \pgfpathmoveto{\pgfpoint
7475 {\pgf@circ@res@left}
7476 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@circ@res@up}}
7477 \pgfpathlineto{\pgfpoint
7478 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/port width}\pgf@circ@res@left}
7479 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@circ@res@up}}
7480 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/font} $-$}
7481
7482 \pgfpathmoveto{\pgfpoint
7483 {\pgf@circ@res@left}
7484 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@circ@res@down}}
7485 \pgfpathlineto{\pgfpoint
7486 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/port width}\pgf@circ@res@left}
7487 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@circ@res@down}}
7488 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/font} $+$}
7489
7490 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7491 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7492 \pgfsetrectcap
7493 \pgfusepath{draw}
7494
7495 \pgfscope
7496 \pgfsetlinewidth{2\pgflinewidth}
7497 \pgfpathmoveto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}{\pgf@circ@res@down}}
7498 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}{\pgf@circ@res@up}}
7499 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right}{\pgf@circ@res@up}}
7500 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right}{\pgf@circ@res@down}}
7501 \pgfpathclose
7502 \pgfusepath{draw}
7503 \endpgfscope
7504
7505 \pgftext[base,y=-3ex,at=\pgfpoint{.3\pgf@circ@res@left}{\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/font2} $\triangleright$}
7506 \pgftext[base,y=-3ex,at=\pgfpoint{.3\pgf@circ@res@right}{\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/font2} $\infty$}
7507 }
7508 }
7509
7510 %%Transkonduktanzverstärker
7511 \pgfdeclareshape{gm amp}
7512 {
7513 \anchor{center}{\pgfpointorigin}
7514 \savedanchor\northwest{%
7515 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@circ@Rlen
7516 \pgf@y=.5\pgf@y
7517 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@circ@Rlen
7518 \pgf@x=.5\pgf@x
7519 }
7520 \anchor{south}{
7521 \northwest
7522 \pgf@y=-\pgf@y
7523 }
7524 \anchor{north}{
7525 \northwest
7526 }
7527 \savedanchor\left{%
7528 \pgf@y=0pt
7529 }
7530 \anchor{leftedge}
7531 {\left
7532 \pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x
7533 }
7534 \savedanchor\inOne{%
7535 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@circ@Rlen
7536 \pgf@y=.5\pgf@y
7537 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@y
7538 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@circ@Rlen
7539 \pgf@x=.5\pgf@x
7540 }
7541 \anchor{-}{
7542 \inOne
7543 }
7544 \anchor{+}{
7545 \inOne
7546 \pgf@y=-\pgf@y
7547 }
7548 \savedanchor\up{%
7549 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@circ@Rlen
7550 \pgf@y=.5\pgf@y
7551 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@circ@Rlen
7552 \pgf@x=.5\pgf@x
7553 \pgf@circ@res@up = \pgf@y
7554 \pgf@circ@res@right = -\pgf@x
7555 \pgf@circ@res@left = \pgf@x
7556 \pgfpointlineattime{
7557 \pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/up pos}}{
7558 \pgfpoint{
7559 \pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}
7560 {\pgf@circ@res@up}}
7561 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7562 }
7563 \anchor{up}{
7564 \up
7565 }
7566 \anchor{down}{
7567 \up
7568 \pgf@y=-\pgf@y
7569 }
7570 \anchor{out}{
7571 \northwest
7572 \pgf@y=0pt
7573 \pgf@x=-\pgf@x
7574 }
7575 \anchor{west}{
7576 \left
7577 }
7578 \anchor{east}{
7579 \left
7580 \pgf@x=-\pgf@x
7581 }
7582
7583 \backgroundpath{
7584 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7585
7586 \northwest
7587 \pgf@circ@res@up = \pgf@y
7588 \pgf@circ@res@down = -\pgf@y
7589 \pgf@circ@res@right = -\pgf@x
7590 \pgf@circ@res@left = \pgf@x
7591
7592 \pgfpathmoveto{\pgfpoint
7593 {\pgf@circ@res@left}
7594 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}}
7595 \pgfpathlineto{\pgfpoint
7596 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}
7597 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}}
7598 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
7599
7600
7601 \pgfpathmoveto{\pgfpoint
7602 {\pgf@circ@res@left}
7603 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}}
7604 \pgfpathlineto{\pgfpoint
7605 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}
7606 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}}
7607 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
7608
7609 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7610 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{0pt}} %
7611 \pgfsetrectcap
7612 \pgfusepath{draw}
7613
7614 \pgfscope
7615 \pgfsetlinewidth{2\pgflinewidth}
7616 \pgftransformxshift{.7\pgf@circ@res@left}
7617 \pgf@circ@res@step=\pgf@circ@res@right
7618 \advance\pgf@circ@res@step by -\pgf@circ@res@left
7619 \pgf@circ@res@step=.7\pgf@circ@res@step
7620 %Umrandung:
7621 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}} %geändert startpunkt neu am ausgangsstrich
7622 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}%vom Ausgang nach oben
7623 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} %neu ecke links oben nach rechts oben
7624 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} %bei deneigängen runter
7625 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}%ecke links unten nach rechts unten
7626 \pgfpathclose
7627 \pgfusepath{draw}
7628 \endpgfscope
7629
7630 }
7631 }
7632
7633
7634
7635 %% Potentiometer
7636 \pgfcircdeclarebipole{
7637 \anchor{wiper}{
7638 \northeast
7639 \pgfpoint{0pt}{\pgf@y}
7640 }
7641 \anchor{W}{
7642 \northeast
7643 \pgfpoint{0pt}{\pgf@y}
7644 }
7645 }{\ctikzvalof{bipoles/potentiometer/height 2}}{potentiometer}{\ctikzvalof{bipoles/potentiometer/height}}{\ctikzvalof{bipoles/potentiometer/width}}{
7646 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7647 \pgftransformationadjustments
7648 \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
7649 \divide \pgf@circ@res@step by 12
7650
7651 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
7652
7653 \pgf@circ@res@other = \pgf@circ@res@left
7654 \advance\pgf@circ@res@other by \pgf@circ@res@step
7655 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7656 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7657 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7658 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7659 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7660 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7661 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7662 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7663 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7664 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7665 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7666 \advance\pgf@circ@res@other by \pgf@circ@res@step
7667 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
7668 \pgfsetbeveljoin
7669 \pgfusepath{draw}
7670
7671 \pgfscope
7672 %\pgfsetlinewidth{\pgfstartlinewidth}
7673 \pgfsetarrowsend{latex'}
7674 \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7675 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7676 \pgfusepath{draw}
7677 \endpgfscope
7678 }
7679
7680
7681
7682
7683
7684 %% Generic tunable
7685
7686 \pgfcircdeclarebipole{
7687 \anchor{wiper}{
7688 \northeast
7689 \pgfpoint{0pt}{\pgf@y}
7690 }
7691 }{\ctikzvalof{bipoles/generic potentiometer/height 2}}{genericpotentiometer}{\ctikzvalof{bipoles/generic potentiometer/height}}{\ctikzvalof{bipoles/generic potentiometer/width}}{
7692
7693 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
7694 \divide \pgf@circ@res@step by 14
7695
7696 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
7697 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7698
7699 \pgfusepath{draw}
7700
7701 \pgfscope
7702 %\pgfsetlinewidth{\pgfstartlinewidth}
7703 \pgfsetarrowsend{latex'}
7704 \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7705 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7706 \pgfusepath{draw}
7707 \endpgfscope
7708 }
7709
7710
7711 \pgfdeclareshape{mixer}
7712 {
7713 \savedanchor\northwest{
7714 \ifpgf@circuit@boxed
7715 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
7716 \pgf@y=.5\pgf@y
7717 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
7718 \pgf@x=.5\pgf@x
7719 \else
7720 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@circ@Rlen
7721 \pgf@y=.5\pgf@y
7722 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@circ@Rlen
7723 \pgf@x=.5\pgf@x
7724 \fi
7725 }
7726 \anchor{center}{
7727 \pgfpointorigin
7728 }
7729 \anchor{left}{%
7730 \northwest
7731 \pgf@y=0pt
7732 }
7733 \anchor{1}{
7734 \northwest
7735 \pgf@y=0pt
7736 }
7737 \anchor{2}{
7738 \northwest
7739 \pgf@y=-\pgf@y
7740 \pgf@x=0pt
7741 }
7742 \anchor{3}{
7743 \northwest
7744 \pgf@y=0pt
7745 \pgf@x=-\pgf@x
7746 }
7747 \anchor{4}{
7748 \northwest
7749 \pgf@y=\pgf@y
7750 \pgf@x=0pt
7751 }
7752 \anchor{in 1}{
7753 \northwest
7754 \pgf@y=0pt
7755 }
7756 \anchor{in1}{
7757 \northwest
7758 \pgf@y=0pt
7759 }
7760 \anchor{in}{
7761 \northwest
7762 \pgf@y=0pt
7763 }
7764 \anchor{in 2}{
7765 \northwest
7766 \pgf@y=-\pgf@y
7767 \pgf@x=0pt
7768 }
7769 \anchor{in2}{
7770 \northwest
7771 \pgf@y=-\pgf@y
7772 \pgf@x=0pt
7773 }
7774 \anchor{out}{
7775 \northwest
7776 \pgf@y=0pt
7777 \pgf@x=-\pgf@x
7778 }
7779 \anchor{center}{
7780 \pgf@y=0pt
7781 \pgf@x=0pt
7782 }
7783 \anchor{east}{
7784 \northwest
7785 \pgf@y=0pt
7786 \pgf@x=-\pgf@x
7787 }
7788 \anchor{west}{
7789 \northwest
7790 \pgf@y=0pt
7791 }
7792 \anchor{south}{
7793 \northwest
7794 \pgf@x=0pt
7795 \pgf@y=-\pgf@y
7796 }
7797 \anchor{north}{
7798 \northwest
7799 \pgf@x=0pt
7800 }
7801 \anchor{south west}{
7802 \northwest
7803 \pgf@y=-\pgf@y
7804 }
7805 \anchor{north east}{
7806 \northwest
7807 \pgf@x=-\pgf@x
7808 }
7809 \anchor{north west}{
7810 \northwest
7811 }
7812 \anchor{south east}{
7813 \northwest
7814 \pgf@x=-\pgf@x
7815 \pgf@y=-\pgf@y
7816 }
7817 \backgroundpath{
7818 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7819
7820 \pgf@circ@res@step=\ctikzvalof{tripoles/mixer/width}\pgf@circ@Rlen
7821
7822 \pgfscope
7823 \pgfstartlinewidth=\pgflinewidth
7824
7825 % draw outer box
7826 \ifpgf@circuit@boxed
7827 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
7828 \fi
7829
7830 % draw outer circle
7831 \ifpgf@circuit@boxed
7832 \pgf@circ@res@step=.7\pgf@circ@res@step
7833 \pgfsetdash{}{0pt} % draw solid circle if boxed
7834 \else
7835 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7836 \fi
7837 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
7838 \pgfusepath{draw}
7839
7840 % draw inner stuff
7841 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
7842 \pgfsetlinewidth{\pgfstartlinewidth}
7843 \pgfpathmoveto{\pgfpointorigin}
7844 \pgfpathmoveto{\pgfpointpolar{135}{0.5\pgf@circ@res@step}}
7845 \pgfpathlineto{\pgfpointpolar{-45}{0.5\pgf@circ@res@step}}
7846 \pgfpathmoveto{\pgfpointorigin}
7847 \pgfpathmoveto{\pgfpointpolar{45}{0.5\pgf@circ@res@step}}
7848 \pgfpathlineto{\pgfpointpolar{-135}{0.5\pgf@circ@res@step}}
7849 \pgfusepath{draw}
7850
7851 \endpgfscope
7852 }
7853 }
7854
7855 \pgfdeclareshape{adder}
7856 {
7857 \savedanchor\northwest{
7858 \ifpgf@circuit@boxed
7859 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
7860 \pgf@y=.5\pgf@y
7861 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
7862 \pgf@x=.5\pgf@x
7863 \else
7864 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@circ@Rlen
7865 \pgf@y=.5\pgf@y
7866 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@circ@Rlen
7867 \pgf@x=.5\pgf@x
7868 \fi
7869 }
7870 \anchor{center}{
7871 \pgfpointorigin
7872 }
7873 \anchor{left}{%
7874 \northwest
7875 \pgf@y=0pt
7876 }
7877 \anchor{1}{
7878 \northwest
7879 \pgf@y=0pt
7880 }
7881 \anchor{2}{
7882 \northwest
7883 \pgf@y=-\pgf@y
7884 \pgf@x=0pt
7885 }
7886 \anchor{3}{
7887 \northwest
7888 \pgf@y=0pt
7889 \pgf@x=-\pgf@x
7890 }
7891 \anchor{4}{
7892 \northwest
7893 \pgf@y=\pgf@y
7894 \pgf@x=0pt
7895 }
7896 \anchor{in 1}{
7897 \northwest
7898 \pgf@y=0pt
7899 }
7900 \anchor{in1}{
7901 \northwest
7902 \pgf@y=0pt
7903 }
7904 \anchor{in}{
7905 \northwest
7906 \pgf@y=0pt
7907 }
7908 \anchor{in 2}{
7909 \northwest
7910 \pgf@y=-\pgf@y
7911 \pgf@x=0pt
7912 }
7913 \anchor{in2}{
7914 \northwest
7915 \pgf@y=-\pgf@y
7916 \pgf@x=0pt
7917 }
7918 \anchor{out}{
7919 \northwest
7920 \pgf@y=0pt
7921 \pgf@x=-\pgf@x
7922 }
7923 \anchor{center}{
7924 \pgf@y=0pt
7925 \pgf@x=0pt
7926 }
7927 \anchor{east}{
7928 \northwest
7929 \pgf@y=0pt
7930 \pgf@x=-\pgf@x
7931 }
7932 \anchor{west}{
7933 \northwest
7934 \pgf@y=0pt
7935 }
7936 \anchor{south}{
7937 \northwest
7938 \pgf@x=0pt
7939 \pgf@y=-\pgf@y
7940 }
7941 \anchor{north}{
7942 \northwest
7943 \pgf@x=0pt
7944 }
7945 \anchor{south west}{
7946 \northwest
7947 \pgf@y=-\pgf@y
7948 }
7949 \anchor{north east}{
7950 \northwest
7951 \pgf@x=-\pgf@x
7952 }
7953 \anchor{north west}{
7954 \northwest
7955 }
7956 \anchor{south east}{
7957 \northwest
7958 \pgf@x=-\pgf@x
7959 \pgf@y=-\pgf@y
7960 }
7961 \backgroundpath{
7962 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7963
7964 \pgf@circ@res@step=\ctikzvalof{tripoles/adder/width}\pgf@circ@Rlen
7965
7966 \pgfscope
7967 \pgfstartlinewidth=\pgflinewidth
7968
7969 % draw outer box
7970 \ifpgf@circuit@boxed
7971 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
7972 \fi
7973
7974 % draw outer circle
7975 \ifpgf@circuit@boxed
7976 \pgf@circ@res@step=.7\pgf@circ@res@step{}
7977 \pgfsetdash{}{0pt} % draw solid circle if boxed
7978 \else
7979 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7980 \fi
7981 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
7982 \pgfusepath{draw}
7983
7984 % draw inner stuff
7985 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
7986 \pgfsetlinewidth{\pgfstartlinewidth}
7987
7988 \pgfpathmoveto{\pgfpointorigin}
7989 \pgfpathmoveto{\pgfpointpolar{0}{0.3\pgf@circ@res@step}}
7990 \pgfpathlineto{\pgfpointpolar{180}{0.3\pgf@circ@res@step}}
7991 \pgfpathmoveto{\pgfpointorigin}
7992 \pgfpathmoveto{\pgfpointpolar{90}{0.3\pgf@circ@res@step}}
7993 \pgfpathlineto{\pgfpointpolar{270}{0.3\pgf@circ@res@step}}
7994 \pgfsetlinewidth{2\pgflinewidth}
7995 \pgfusepath{draw}
7996
7997 \endpgfscope
7998 }
7999 }
8000
8001 \pgfdeclareshape{oscillator}
8002 {
8003 \savedanchor\northwest{
8004 \ifpgf@circuit@boxed
8005 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
8006 \pgf@y=.5\pgf@y
8007 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
8008 \else
8009 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@circ@Rlen
8010 \pgf@y=.5\pgf@y
8011 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@circ@Rlen
8012 \fi
8013 }
8014 \anchor{center}{
8015 \pgfpointorigin
8016 }
8017 \anchor{north}{
8018 \northwest
8019 \pgf@x=.5\pgf@x
8020 }
8021 \anchor{south}{
8022 \northwest
8023 \pgf@x=.5\pgf@x
8024 \pgf@y=-\pgf@y
8025 }
8026 \anchor{east}{
8027 \northwest
8028 \pgf@y=0pt
8029 \pgf@x=0pt
8030 }
8031 \anchor{west}{
8032 \northwest
8033 \pgf@y=0pt
8034 }
8035 \anchor{text}{
8036 \pgf@x=-2\pgf@x
8037 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
8038 \advance \pgf@y by -1.5\ht\pgfnodeparttextbox
8039 }
8040 \backgroundpath{
8041 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8042
8043 \pgf@circ@res@step=\ctikzvalof{tripoles/oscillator/width}\pgf@circ@Rlen{}
8044
8045 \pgfscope
8046 \pgfstartlinewidth=\pgflinewidth
8047
8048 \pgftransformxshift{-0.5\pgf@circ@res@step} % The oscillator is shifted to the left, so a connection comes out of the anchor "east"
8049
8050 % draw outer box
8051 \ifpgf@circuit@boxed{}
8052 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8053 \fi
8054
8055 % draw outer circle
8056 \ifpgf@circuit@boxed
8057 \pgf@circ@res@step=.7\pgf@circ@res@step{}
8058 \pgfsetdash{}{0pt} % draw solid circle if boxed
8059 \else
8060 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8061 \fi
8062 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
8063 \pgfusepath{draw}
8064
8065 % draw inner sine waves
8066 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8067 \pgfsetlinewidth{\pgfstartlinewidth}
8068 \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
8069 \pgfpathmoveto{\pgfpoint{-0.3\pgf@circ@res@step}{0\pgf@circ@res@step}}
8070 \pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}}
8071 \pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}}
8072 \pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}}
8073 \pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}}
8074
8075 \pgfusepath{draw}
8076
8077 \endpgfscope
8078 }
8079 }
8080
8081 \pgfdeclareshape{circulator}
8082 {
8083 \savedanchor\northwest{
8084 \ifpgf@circuit@boxed
8085 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
8086 \pgf@y=.5\pgf@y
8087 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
8088 \pgf@x=.5\pgf@x
8089 \else
8090 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@circ@Rlen
8091 \pgf@y=.5\pgf@y
8092 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@circ@Rlen
8093 \pgf@x=.5\pgf@x
8094 \fi
8095 }
8096 \anchor{center}{
8097 \pgfpointorigin
8098 }
8099 \anchor{left}{%
8100 \northwest
8101 \pgf@y=0pt
8102 }
8103 \anchor{1}{
8104 \northwest
8105 \pgf@y=0pt
8106 }
8107 \anchor{2}{
8108 \northwest
8109 \pgf@y=0pt
8110 \pgf@x=-\pgf@x
8111 }
8112 \anchor{3}{
8113 \northwest
8114 \pgf@y=-\pgf@y
8115 \pgf@x=0pt
8116 }
8117 \anchor{east}{
8118 \northwest
8119 \pgf@y=0pt
8120 \pgf@x=-\pgf@x
8121 }
8122 \anchor{west}{
8123 \northwest
8124 \pgf@y=0pt
8125 }
8126 \anchor{south}{
8127 \northwest
8128 \pgf@x=0pt
8129 \pgf@y=-\pgf@y
8130 }
8131 \anchor{north}{
8132 \northwest
8133 \pgf@x=0pt
8134 }
8135 \anchor{south west}{
8136 \northwest
8137 \pgf@y=-\pgf@y
8138 }
8139 \anchor{north east}{
8140 \northwest
8141 \pgf@x=-\pgf@x
8142 }
8143 \anchor{north west}{
8144 \northwest
8145 }
8146 \anchor{south east}{
8147 \northwest
8148 \pgf@x=-\pgf@x
8149 \pgf@y=-\pgf@y
8150 }
8151 \backgroundpath{
8152 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8153
8154 \pgf@circ@res@step=\ctikzvalof{tripoles/circulator/width}\pgf@circ@Rlen
8155
8156 \pgfscope
8157 \pgfstartlinewidth=\pgflinewidth
8158
8159 % draw outer box
8160 \ifpgf@circuit@boxed
8161 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8162 \fi
8163
8164 % draw outer circle
8165 \ifpgf@circuit@boxed{}
8166 \pgf@circ@res@step=.7\pgf@circ@res@step{}
8167 \pgfsetdash{}{0pt} % draw solid circle if boxed
8168 \else
8169 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8170 \fi
8171 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
8172 \pgfusepath{draw}
8173
8174 % inner arrow
8175 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8176 \pgfsetlinewidth{\pgfstartlinewidth}
8177
8178 \pgfsetarrowsend{latex}
8179 \pgfpathmoveto{\pgfpoint{-0.25\pgf@circ@res@step}{0}}
8180 \pgfpatharc{180}{-90} {0.25\pgf@circ@res@step}
8181 \pgfpathlineto{\pgfpoint{-5pt}{-0.2\pgf@circ@res@step}}
8182 \pgfusepath{draw}
8183
8184 \endpgfscope
8185 }
8186 }
8187
8188
8189 % Wilkinson divider
8190 \pgfdeclareshape{wilkinson}{
8191 \anchor{center}{
8192 \northwest
8193 \pgf@x=0pt
8194 \pgf@y=0pt
8195 }
8196 \savedanchor\northwest{%
8197 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/height}\pgf@circ@Rlen
8198 \pgf@y=.5\pgf@y
8199 \pgf@x= \pgf@circ@Rlen
8200 \pgf@x=.5\pgf@x
8201 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/width}\pgf@x
8202 }
8203 \anchor{north}{
8204 \northwest
8205 \pgf@x=0pt
8206 }
8207 \anchor{south}{
8208 \northwest
8209 \pgf@x=0pt
8210 \pgf@y=-\pgf@y
8211 }
8212 \anchor{west}{
8213 \northwest
8214 \pgf@y=0pt
8215 }
8216 \anchor{east}{
8217 \northwest
8218 \pgf@y=0pt
8219 \pgf@x=-\pgf@x
8220 }
8221 \anchor{south west}{
8222 \northwest
8223 \pgf@y=-\pgf@y
8224 }
8225 \anchor{north east}{
8226 \northwest
8227 \pgf@x=-\pgf@x
8228 }
8229 \anchor{north west}{
8230 \northwest
8231 }
8232 \anchor{south east}{
8233 \northwest
8234 \pgf@x=-\pgf@x
8235 \pgf@y=-\pgf@y
8236 }
8237 \anchor{in}{
8238 \northwest
8239 \pgf@y=0pt
8240 }
8241 \anchor{out1}{
8242 \northwest
8243 \pgf@x=-\pgf@x
8244 \pgf@y=-0.5\pgf@y
8245 }
8246 \anchor{out2}{
8247 \northwest
8248 \pgf@x=-\pgf@x
8249 \pgf@y=0.5\pgf@y
8250 }
8251 \anchor{text}{
8252 \northwest
8253 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
8254 \pgf@x=-.5\wd\pgfnodeparttextbox
8255 }
8256 \backgroundpath{
8257 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8258
8259 \northwest
8260 \pgf@circ@res@up = \pgf@y
8261 \pgf@circ@res@down = -\pgf@y
8262 \pgf@circ@res@right = -\pgf@x
8263 \pgf@circ@res@left = \pgf@x
8264
8265 \pgfstartlinewidth=\pgflinewidth
8266
8267 % draw outer box
8268 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8269 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8270 \pgfusepath{draw}
8271
8272 % draw inner stuff
8273 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8274 \pgfsetarrows{-} %never draw arrows
8275 \pgfsetlinewidth{\pgfstartlinewidth}
8276 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
8277 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
8278 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8279 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8280 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
8281 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8282 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8283
8284 \pgfusepath{draw}
8285
8286 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8287 % draw inner resisitor - european or american style is recognised
8288 {
8289 \pgftransformshift{\pgfpoint{0.5\pgf@circ@res@right}{0pt}}
8290 \pgftransformrotate{90}
8291
8292 % calculate size of resistor
8293 \ifpgf@circuit@europeanresistor
8294 \pgfmathparse{\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/generic/width} / 2}
8295 \pgftransformscale{\pgfmathresult}
8296 \pgfnode{genericshape}{center}{}{pgf@generic}{\pgfusepath{fill}}
8297 \else
8298 \pgfmathparse{\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/resistor/width} / 2}
8299 \pgftransformscale{\pgfmathresult}
8300 \pgfnode{resistorshape}{center}{}{pgf@resistor}{\pgfusepath{fill}}
8301 \fi
8302 }
8303
8304 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8305 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}}
8306
8307 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}}
8308 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8309 \pgfusepath{draw}
8310
8311 }
8312 }
8313
8314 % electromechanical device (motor/generator)
8315 \pgfdeclareshape{elmech}
8316 {
8317 \savedanchor\northwest{
8318 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/height}\pgf@circ@Rlen
8319 \pgf@y=.5\pgf@y
8320 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/width}\pgf@circ@Rlen
8321 \pgf@x=.5\pgf@x
8322 }
8323 \anchor{center}{
8324 \pgfpointorigin
8325 }
8326 \anchor{text}{
8327 \pgfpointorigin
8328 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
8329 \advance \pgf@y by -.5\ht\pgfnodeparttextbox
8330 }
8331 \anchor{left}{%
8332 \northwest
8333 \pgf@y=0pt
8334 }
8335 \anchor{right}{%
8336 \northwest
8337 \pgf@y=0pt
8338 \pgf@x=-\pgf@x
8339 }
8340 \anchor{top}{
8341 \northwest
8342 \pgf@x=0pt
8343 }
8344 \anchor{pathstart}{
8345 \northwest
8346 \pgf@x=0pt
8347 }
8348 \anchor{pathend}{
8349 \northwest
8350 \pgf@x=0pt
8351 \pgf@y=-\pgf@y
8352 }
8353 \anchor{bottom}{
8354 \northwest
8355 \pgf@x=0pt
8356 \pgf@y=-\pgf@y
8357 }
8358 \anchor{center}{
8359 \pgf@y=0pt
8360 \pgf@x=0pt
8361 }
8362 \anchor{east}{
8363 \northwest
8364 \pgf@y=0pt
8365 \pgf@x=-\pgf@x
8366 }
8367 \anchor{west}{
8368 \northwest
8369 \pgf@y=0pt
8370 }
8371 \anchor{south}{
8372 \northwest
8373 \pgf@x=0pt
8374 \pgf@y=-\pgf@y
8375 }
8376 \anchor{north}{
8377 \northwest
8378 \pgf@x=0pt
8379 }
8380 \backgroundpath{
8381 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8382 \pgf@circ@res@step=\ctikzvalof{tripoles/elmech/width}\pgf@circ@Rlen
8383 \pgf@circ@res@up=\ctikzvalof{tripoles/elmech/height}\pgf@circ@Rlen
8384 \pgfscope
8385 \pgfstartlinewidth=\pgflinewidth
8386 % draw outer box
8387 % \ifpgf@circuit@boxed
8388 % \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8389 % \fi
8390 % draw outer circle
8391 %\ifpgf@circuit@boxed
8392 % \pgf@circ@res@step=.7\pgf@circ@res@step
8393 % \pgfsetdash{}{0pt} % draw solid circle if boxed
8394 %\else
8395 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8396 %\fi
8397 \pgfpathrectangle{\pgfpoint{-.25\pgf@circ@res@step}{-.5\pgf@circ@res@up}}{\pgfpoint{.5\pgf@circ@res@step}{\pgf@circ@res@up}}
8398 \pgfsetfillcolor{black}
8399 \pgfusepath{draw,fill}
8400 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
8401 \pgfsetfillcolor{white}
8402 \pgfusepath{draw,fill}
8403 \endpgfscope
8404 }
8405 }
8406
8407 \pgfdeclareshape{magnetron}
8408 {
8409 \savedanchor\northwest{
8410 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf@circ@Rlen
8411 \pgf@y=.5\pgf@y
8412 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf@circ@Rlen
8413 \pgf@x=.5\pgf@x
8414 }
8415 \anchor{center}{
8416 \pgfpointorigin
8417 }
8418 \anchor{anode}{
8419 \northwest
8420 \pgf@x=0pt
8421 \pgf@y=-\pgf@y
8422 }
8423 \anchor{cathode1}{
8424 \northwest
8425 \pgf@circ@res@step=\pgf@y
8426 \pgfmathparse{cos(105)}
8427 \pgf@x=\pgfmathresult\pgf@circ@res@step
8428 \pgfmathparse{sin(105)}
8429 \pgf@y=\pgfmathresult\pgf@circ@res@step
8430 %\pgfpointorigin
8431 %\pgfpathmoveto{\pgfpointpolar{105}{\pgf@circ@res@step}}%not working in a scaled tikzpicture
8432 }
8433 \anchor{cathode2}{
8434 \northwest
8435 \pgf@circ@res@step=\pgf@y
8436 \pgfmathparse{cos(75)}
8437 \pgf@x=\pgfmathresult\pgf@circ@res@step
8438 \pgfmathparse{sin(75)}
8439 \pgf@y=\pgfmathresult\pgf@circ@res@step
8440 %\pgfpointorigin
8441 %\pgfpathmoveto{\pgfpointpolar{75}{\pgf@circ@res@step}}%not working in a scaled tikzpicture
8442 }
8443 \anchor{text}{
8444 \pgfpointorigin
8445 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
8446 \advance \pgf@y by -.5\ht\pgfnodeparttextbox
8447 }
8448 \anchor{left}{%
8449 \northwest
8450 \pgf@y=0pt
8451 }
8452 \anchor{right}{%
8453 \northwest
8454 \pgf@y=0pt
8455 \pgf@x=-\pgf@x
8456 }
8457 \anchor{top}{
8458 \northwest
8459 \pgf@x=0pt
8460 }
8461 \anchor{pathstart}{
8462 \northwest
8463 \pgf@x=0pt
8464 }
8465 \anchor{pathend}{
8466 \northwest
8467 \pgf@x=0pt
8468 \pgf@y=-\pgf@y
8469 }
8470 \anchor{bottom}{
8471 \northwest
8472 \pgf@x=0pt
8473 \pgf@y=-\pgf@y
8474 }
8475 \anchor{center}{
8476 \pgf@y=0pt
8477 \pgf@x=0pt
8478 }
8479 \anchor{east}{
8480 \northwest
8481 \pgf@y=0pt
8482 \pgf@x=-\pgf@x
8483 }
8484 \anchor{west}{
8485 \northwest
8486 \pgf@y=0pt
8487 }
8488 \anchor{south}{
8489 \northwest
8490 \pgf@x=0pt
8491 \pgf@y=-\pgf@y
8492 }
8493 \anchor{north}{
8494 \northwest
8495 \pgf@x=0pt
8496 }
8497 \backgroundpath{
8498 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8499 \pgf@circ@res@step=\ctikzvalof{tripoles/magnetron/width}\pgf@circ@Rlen
8500 \northwest
8501 \pgf@circ@res@up = \pgf@y
8502 \pgf@circ@res@down = -\pgf@y
8503 \pgf@circ@res@right = -\pgf@x
8504 \pgf@circ@res@left = \pgf@x
8505 \pgfmathsetlength{\pgf@circ@res@other}{sin(15)*\pgf@circ@res@up}
8506
8507 \pgfscope
8508 \pgfstartlinewidth=\pgflinewidth
8509 % draw outer box
8510 % \ifpgf@circuit@boxed
8511 % \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8512 % \fi
8513 % draw outer circle
8514 %\ifpgf@circuit@boxed
8515 % \pgf@circ@res@step=.7\pgf@circ@res@step
8516 % \pgfsetdash{}{0pt} % draw solid circle if boxed
8517 %\else
8518 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8519 %\fi
8520 %create outer circle
8521 \pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@right}
8522 \pgfsetfillcolor{white}
8523 \pgfusepath{draw}
8524 %create chambers
8525 \foreach \angle in {45,135,225,315}{
8526 \pgfpathmoveto{ \pgfpointpolar{\angle}{0.6\pgf@circ@res@right}}
8527 \pgfpathlineto{ \pgfpointpolar{\angle}{\pgf@circ@res@right}}
8528 }
8529 \pgfsetroundcap
8530 \pgfusepath{draw}
8531 \pgfscope
8532 %draw connection from outside
8533 %anode
8534 \pgfsetlinewidth{\pgfstartlinewidth}
8535 \pgfpathmoveto{\pgfpoint{0\pgf@circ@res@left}{\pgf@circ@res@down}}
8536 \pgfpathlineto{\pgfpoint{0\pgf@circ@res@right}{.5\pgf@circ@res@down}}
8537 %cathodes
8538 \pgfpathmoveto{\pgfpointpolar{105}{\pgf@circ@res@up}}
8539 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{.5\pgf@circ@res@up}}
8540 \pgfpathmoveto{\pgfpointpolar{75}{\pgf@circ@res@up}}
8541 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
8542 \pgfsetbuttcap
8543 \pgfusepath{draw}
8544 \endpgfscope
8545 %create cathode
8546 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
8547 \pgfpathlineto{\pgfpoint{0}{.15\pgf@circ@res@up}}
8548 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{.5\pgf@circ@res@up}}
8549 \pgfusepath{draw}
8550 %create anode
8551 \pgfpathmoveto{\pgfpoint{0.3\pgf@circ@res@left}{.5\pgf@circ@res@down}}
8552 \pgfpathlineto{\pgfpoint{0.3\pgf@circ@res@right}{.5\pgf@circ@res@down}}
8553
8554 \pgfsetbuttcap
8555 \pgfusepath{draw}
8556 \endpgfscope
8557 }
8558 }
8559
8560 %%%---------- close: tex/pgfcirctripoles
8561 %%%%%%%%%%% Springe nach tex/pgfcircquadpoles
8562 %%%---------- open: tex/pgfcircquadpoles.tex
8563 % Copyright 2007-2009 by Massimo Redaelli
8564 %
8565 % This file may be distributed and/or modified
8566 %
8567 % 1. under the LaTeX Project Public License and/or
8568 % 2. under the GNU Public License.
8569 %
8570 % See the file doc/LICENSE for more details.
8571
8572 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8573 %% Quadripoles
8574
8575 \long\def\pgfcircdeclarequadpole#1#2#3{
8576 \pgfdeclareshape{#1}
8577 {
8578 \anchor{center}{
8579 \northwest
8580 \pgf@x=0pt
8581 }
8582 \savedanchor\northwest{%
8583 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@circ@Rlen
8584 \pgf@y=.5\pgf@y
8585 \pgf@x=.5\pgf@circ@Rlen
8586 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x
8587 }
8588 \anchor{A2}{
8589 \northwest
8590 \pgf@y=-\pgf@y
8591 }
8592 \anchor{B1}{
8593 \northwest
8594 \pgf@x=-\pgf@x
8595 }
8596 \anchor{A1}{
8597 \northwest
8598 }
8599 \anchor{B2}{
8600 \northwest
8601 \pgf@x=-\pgf@x
8602 \pgf@y=-\pgf@y
8603 }
8604 \anchor{north}{
8605 \northwest
8606 \pgf@x=0pt
8607 }
8608 \anchor{south}{
8609 \northwest
8610 \pgf@x=0pt
8611 \pgf@y=-\pgf@y
8612 }
8613 \anchor{west}{
8614 \northwest
8615 \pgf@y=0pt
8616 }
8617 \anchor{east}{
8618 \northwest
8619 \pgf@y=0pt
8620 \pgf@x=-\pgf@x
8621 }
8622 \anchor{south west}{
8623 \northwest
8624 \pgf@y=-\pgf@y
8625 }
8626 \anchor{north east}{
8627 \northwest
8628 \pgf@x=-\pgf@x
8629 }
8630 \anchor{north west}{
8631 \northwest
8632 }
8633 \anchor{south east}{
8634 \northwest
8635 \pgf@x=-\pgf@x
8636 \pgf@y=-\pgf@y
8637 }
8638 \anchor{base}{
8639 \northwest
8640 \pgf@x=0pt
8641 }
8642 #3
8643 \backgroundpath{
8644 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8645
8646 \northwest
8647 \pgf@circ@res@up = \pgf@y
8648 \pgf@circ@res@down = -\pgf@y
8649 \pgf@circ@res@right = -\pgf@x
8650 \pgf@circ@res@left = \pgf@x
8651
8652 #2
8653
8654 }
8655 }
8656 }
8657
8658
8659
8660 \def\pgf@circ@drawtransformerbasicanchor{
8661 \pgfkeysvalueof{/tikz/circuitikz/quadpoles/trans/height}
8662 \anchor{AA2}{
8663 \northwest
8664 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8665 \pgf@x=.7\pgf@x
8666 \pgf@y=-\pgf@y
8667 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8668 }
8669 \anchor{BB1}{
8670 \northwest
8671 \pgf@x=-\pgf@x
8672 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8673 \pgf@x=.7\pgf@x
8674 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8675 }
8676 \anchor{AA1}{
8677 \northwest
8678 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8679 \pgf@x=.7\pgf@x
8680 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8681 }
8682 \anchor{BB2}{
8683 \northwest
8684 \pgf@x=-\pgf@x
8685 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8686 \pgf@x=.7\pgf@x
8687 \pgf@y=-\pgf@y
8688 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8689 }
8690 }
8691
8692 \def\pgf@circ@drawtransformerbasicbody{
8693 \def\stretto{.4}
8694 \pgfscope
8695 \pgfslopedattimetrue
8696 \pgfallowupsidedownattimetrue
8697 \pgftransformlineattime{.5}{%
8698 \pgfpoint%
8699 {\stretto\pgf@circ@res@left}%
8700 {\pgf@circ@res@up}%
8701 }{%
8702 \pgfpoint
8703 {\stretto\pgf@circ@res@left}%
8704 {\pgf@circ@res@down}%
8705 }
8706
8707 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
8708 \def\pgf@temp{european}%
8709 \ifx\pgf@temp\pgf@circ@temp%
8710 \pgfnode{fullgenericshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8711 \else%
8712 \def\pgf@temp{cute}
8713 \ifx\pgf@temp\pgf@circ@temp%
8714 \pgfnode{cuteinductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8715 \else%
8716 \pgfnode{americaninductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8717 \fi%
8718 \fi%
8719
8720
8721 \endpgfscope
8722 \pgfscope
8723 \pgfslopedattimetrue
8724 \pgfallowupsidedownattimetrue
8725 \pgftransformlineattime{.5}{%
8726 \pgfpoint%
8727 {\stretto\pgf@circ@res@right}%
8728 {\pgf@circ@res@down}%
8729 }{%
8730 \pgfpoint
8731 {\stretto\pgf@circ@res@right}%
8732 {\pgf@circ@res@up}%
8733 }
8734
8735 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
8736 \def\pgf@temp{european}%
8737 \ifx\pgf@temp\pgf@circ@temp%
8738 \pgfnode{fullgenericshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
8739 \else%
8740 \def\pgf@temp{cute}
8741 \ifx\pgf@temp\pgf@circ@temp%
8742 \pgfnode{cuteinductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
8743 \else%
8744 \pgfnode{americaninductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
8745 \fi%
8746 \fi%
8747
8748 \endpgfscope
8749
8750 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
8751 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
8752 \pgfpathlineto{\pgfpointanchor{pgf@inductor1}{b}}
8753
8754 \pgfpathmoveto{\pgfpointanchor{pgf@inductor1}{a}}
8755 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
8756 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
8757
8758 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
8759 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
8760 \pgfpathlineto{\pgfpointanchor{pgf@inductor2}{a}}
8761
8762 \pgfpathmoveto{\pgfpointanchor{pgf@inductor2}{b}}
8763 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
8764 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8765
8766 \pgfusepath{draw}
8767
8768 }
8769
8770
8771
8772 % contrib Kristofer M. Monisit
8773
8774 \pgfdeclareshape{fd op amp}
8775 {
8776 \anchor{center}{\pgfpointorigin}
8777 \savedanchor\northwest{%
8778 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
8779 \pgf@y=.5\pgf@y
8780 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
8781 \pgf@x=.5\pgf@x
8782 }
8783 \anchor{south}{
8784 \northwest
8785 \pgf@y=-\pgf@y
8786 }
8787 \anchor{north}{
8788 \northwest
8789 }
8790 \savedanchor\left{%
8791 \pgf@y=0pt
8792 }
8793 \savedanchor\inOne{%
8794 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
8795 \pgf@y=.5\pgf@y
8796 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
8797 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
8798 \pgf@x=.5\pgf@x
8799 }
8800 \anchor{-}{
8801 \inOne
8802 }
8803 \anchor{+}{
8804 \inOne
8805 \pgf@y=-\pgf@y
8806 }
8807 \savedanchor\up{%
8808 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
8809 \pgf@y=.5\pgf@y
8810 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
8811 \pgf@x=.5\pgf@x
8812 \pgf@circ@res@up = \pgf@y
8813 \pgf@circ@res@right = -\pgf@x
8814 \pgf@circ@res@left = \pgf@x
8815 \pgfpointlineattime{
8816 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
8817 \pgfpoint{
8818 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8819 {\pgf@circ@res@up}}
8820 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
8821 }
8822 \anchor{up}{
8823 \up
8824 }
8825 \anchor{down}{
8826 \up
8827 \pgf@y=-\pgf@y
8828 }
8829 \anchor{out +}{
8830 \northwest
8831 \pgf@y=.5\pgf@y
8832 \pgf@x=-.7\pgf@x
8833 }
8834 \anchor{out -}{
8835 \northwest
8836 \pgf@y=-.5\pgf@y
8837 \pgf@x=-.7\pgf@x
8838 }
8839 \anchor{west}{
8840 \left
8841 }
8842 \anchor{east}{
8843 \left
8844 \pgf@x=-\pgf@x
8845 }
8846
8847 \backgroundpath{
8848 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8849
8850 \northwest
8851 \pgf@circ@res@up = \pgf@y
8852 \pgf@circ@res@down = -\pgf@y
8853 \pgf@circ@res@right = -\pgf@x
8854 \pgf@circ@res@left = \pgf@x
8855
8856 % Negative input terminal
8857 \pgfpathmoveto{\pgfpoint
8858 {\pgf@circ@res@left}
8859 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8860 \pgfpathlineto{\pgfpoint
8861 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8862 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8863 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
8864
8865
8866 % Positive input terminal
8867 \pgfpathmoveto{\pgfpoint
8868 {\pgf@circ@res@left}
8869 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8870 \pgfpathlineto{\pgfpoint
8871 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8872 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8873 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
8874
8875
8876 % Negative output terminal
8877 \pgfpathmoveto{\pgfpoint
8878 {0.7\pgf@circ@res@right}
8879 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8880 \pgfpathlineto{\pgfpoint
8881 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
8882 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8883 \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
8884
8885
8886 % Positive output terminal
8887 \pgfpathmoveto{\pgfpoint
8888 {0.7\pgf@circ@res@right}
8889 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8890 \pgfpathlineto{\pgfpoint
8891 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
8892 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8893 \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
8894
8895 \pgfsetrectcap
8896 % Draw them all!
8897 \pgfusepath{draw}
8898
8899 % Triangle
8900 \pgfscope
8901 \pgfsetlinewidth{2\pgflinewidth}
8902 \pgftransformxshift{.7\pgf@circ@res@left}
8903 \pgf@circ@res@step=\pgf@circ@res@right
8904 \advance\pgf@circ@res@step by -\pgf@circ@res@left
8905 \pgf@circ@res@step=.7\pgf@circ@res@step
8906 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
8907 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
8908 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
8909 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
8910 \pgfpathclose
8911 \pgfusepath{draw}
8912 \endpgfscope
8913 }
8914 }
8915
8916
8917
8918
8919 \pgfcircdeclarequadpole{transformer}{
8920
8921 \pgf@circ@drawtransformerbasicbody
8922
8923 }{\pgf@circ@drawtransformerbasicanchor}
8924
8925 \pgfcircdeclarequadpole{transformer core}{
8926
8927 \pgf@circ@drawtransformerbasicbody
8928
8929 \pgfmoveto{\pgfpoint%
8930 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
8931 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
8932 }
8933 \pgflineto{
8934 \pgfpoint
8935 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
8936 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
8937 }
8938
8939 \pgfmoveto{\pgfpoint%
8940 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
8941 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
8942 }
8943 \pgflineto{
8944 \pgfpoint
8945 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
8946 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
8947 }
8948
8949 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth}
8950 \pgfusepath{draw}
8951 }{\pgf@circ@drawtransformerbasicanchor}
8952
8953
8954 \pgfcircdeclarequadpole{gyrator}{
8955
8956 \def\stretto{.4}
8957
8958 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
8959 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
8960 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
8961 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
8962
8963 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
8964 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
8965 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
8966 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8967
8968 \pgfusepath{draw}
8969
8970 \pgfsetlinewidth{2\pgflinewidth}
8971 \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@left}{.7*\stretto\pgf@circ@res@down}}
8972 \pgfpatharc{90}{270}{.7*\stretto\pgf@circ@res@down}
8973
8974 \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@right}{.7*\stretto\pgf@circ@res@up}}
8975 \pgfpatharc{-90}{90}{.7*\stretto\pgf@circ@res@down}
8976 \pgfusepath{draw}
8977
8978 }{}
8979
8980 %% four-port
8981 % defines a general outer box for four-ports
8982 % TikZ usage:
8983 % \draw (0,0) node[coupler](coup){\SI{-3}{dB}}
8984 % (coup.port1) to[short,-o] ++(-1,0)
8985 %
8986
8987 \long\def\pgfcircdeclarefourport#1#2{
8988 \pgfdeclareshape{#1}{
8989 \anchor{center}{
8990 \northwest
8991 \pgf@x=0pt
8992 \pgf@y=0pt
8993 }
8994 \savedanchor\northwest{%
8995 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@circ@Rlen
8996 \pgf@y=.5\pgf@y
8997 \pgf@x=.5\pgf@circ@Rlen
8998 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x
8999 }
9000 \anchor{north}{
9001 \northwest
9002 \pgf@x=0pt
9003 }
9004 \anchor{south}{
9005 \northwest
9006 \pgf@x=0pt
9007 \pgf@y=-\pgf@y
9008 }
9009 \anchor{west}{
9010 \northwest
9011 \pgf@y=0pt
9012 }
9013 \anchor{east}{
9014 \northwest
9015 \pgf@y=0pt
9016 \pgf@x=-\pgf@x
9017 }
9018 \anchor{south west}{
9019 \northwest
9020 \pgf@y=-\pgf@y
9021 }
9022 \anchor{north east}{
9023 \northwest
9024 \pgf@x=-\pgf@x
9025 }
9026 \anchor{north west}{
9027 \northwest
9028 }
9029 \anchor{south east}{
9030 \northwest
9031 \pgf@x=-\pgf@x
9032 \pgf@y=-\pgf@y
9033 }
9034 \anchor{port1}{
9035 \northwest
9036 \pgf@y=-0.5\pgf@y
9037 }
9038 \anchor{port2}{
9039 \northwest
9040 \pgf@x=-\pgf@x
9041 \pgf@y=-0.5\pgf@y
9042 }
9043 \anchor{port3}{
9044 \northwest
9045 \pgf@x=-\pgf@x
9046 \pgf@y=0.5\pgf@y
9047 }
9048 \anchor{port4}{
9049 \northwest
9050 \pgf@y=0.5\pgf@y
9051 }
9052 \anchor{1}{
9053 \northwest
9054 \pgf@y=-0.5\pgf@y
9055 }
9056 \anchor{2}{
9057 \northwest
9058 \pgf@x=-\pgf@x
9059 \pgf@y=-0.5\pgf@y
9060 }
9061 \anchor{3}{
9062 \northwest
9063 \pgf@x=-\pgf@x
9064 \pgf@y=0.5\pgf@y
9065 }
9066 \anchor{4}{
9067 \northwest
9068 \pgf@y=0.5\pgf@y
9069 }
9070
9071 \anchor{text}{
9072 \northwest
9073 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
9074 \pgf@x=-.5\wd\pgfnodeparttextbox
9075 }
9076 \backgroundpath{
9077 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
9078
9079 \northwest
9080 \pgf@circ@res@up = \pgf@y
9081 \pgf@circ@res@down = -\pgf@y
9082 \pgf@circ@res@right = -\pgf@x
9083 \pgf@circ@res@left = \pgf@x
9084
9085 \pgfstartlinewidth=\pgflinewidth
9086
9087 % draw outer box
9088 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
9089 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
9090 \pgfusepath{draw}
9091
9092 % draw inner stuff
9093 #2
9094
9095 % draw inner text
9096 \pgftext[center,x=-0.15\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
9097 }
9098 }
9099 }
9100
9101 % four-port
9102 \pgfcircdeclarefourport{fourport}{}
9103
9104
9105 % straight coupler
9106 \pgfcircdeclarefourport{coupler}{
9107 \pgfsetlinewidth{\pgfstartlinewidth}
9108 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}}
9109 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
9110 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
9111 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
9112 \pgfusepath{draw}
9113
9114 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
9115 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
9116 \pgfsetarrows{latex-latex}
9117 \pgfusepath{draw}
9118 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
9119 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
9120 \pgfsetarrows{latex-latex}
9121 \pgfusepath{draw}
9122 }
9123
9124 % "bended" coupler
9125 \pgfcircdeclarefourport{coupler2}{
9126 \pgfsetlinewidth{\pgfstartlinewidth}
9127 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}}
9128 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
9129 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
9130 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
9131 \pgfusepath{draw}
9132
9133 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
9134 \pgfpatharc{0}{90} {0.4\pgf@circ@res@up}
9135 \pgfsetarrowsend{latex}
9136 \pgfusepath{draw}
9137 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
9138 \pgfpatharc{0}{-90} {0.4\pgf@circ@res@up}
9139 \pgfsetarrowsend{latex}
9140 \pgfusepath{draw}
9141
9142 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
9143 \pgfpatharc{180}{90} {0.4\pgf@circ@res@up}
9144 \pgfsetarrowsend{latex}
9145 \pgfusepath{draw}
9146 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
9147 \pgfpatharc{-180}{-90} {0.4\pgf@circ@res@up}
9148 \pgfsetarrowsend{latex}
9149 \pgfusepath{draw}
9150
9151
9152 }
9153 %%%---------- close: tex/pgfcircquadpoles
9154
9155 %%%%%%%%%%% Springe nach tex/pgfcirclabel
9156 %%%---------- open: tex/pgfcirclabel.tex
9157 % Copyright 2007-2009 by Massimo Redaelli
9158 %
9159 % This file may be distributed and/or modified
9160 %
9161 % 1. under the LaTeX Project Public License and/or
9162 % 2. under the GNU Public License.
9163 %
9164 % See the file doc/LICENSE for more details.
9165
9166 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9167 %% Bipole label positioning
9168
9169 %% Options
9170 \ctikzset{label/.style = { l=#1 } }
9171 \ctikzset{l/.code = {
9172 \pgfkeys{/tikz/circuitikz/bipole/label/name=#1}
9173 \ctikzsetvalof{bipole/label/unit}{}
9174 \ifpgf@circ@siunitx
9175 \pgf@circ@handleSI{#1}
9176 \ifpgf@circ@siunitx@res
9177 \edef\pgf@temp{\pgf@circ@handleSI@val}
9178 \pgfkeyslet{/tikz/circuitikz/bipole/label/name}{\pgf@temp}
9179 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9180 \pgfkeyslet{/tikz/circuitikz/bipole/label/unit}{\pgf@temp}
9181 \else
9182 \fi
9183 \else
9184 \fi
9185 }}
9186
9187 \ctikzset{label above/.code = {
9188 l=#1,
9189 \circuitikzbasekey/bipole/label/position=90 }
9190 }
9191
9192 \ctikzset{l^/.style = {
9193 l=#1,
9194 \circuitikzbasekey/bipole/label/position=90 }
9195 }
9196
9197 \ctikzset{label below/.code = {
9198 l=#1,
9199 \circuitikzbasekey/bipole/label/position=-90 }
9200 }
9201
9202 \ctikzset{l_/.style = {
9203 l=#1,
9204 \circuitikzbasekey/bipole/label/position=-90 }
9205 }
9206
9207 \ctikzset{annotation/.style = { a=#1 } }
9208 \ctikzset{a/.code = {
9209 \pgfkeys{/tikz/circuitikz/bipole/annotation/name=#1}
9210 \ctikzsetvalof{bipole/annotation/unit}{}
9211 \ifpgf@circ@siunitx
9212 \pgf@circ@handleSI{#1}
9213 \ifpgf@circ@siunitx@res
9214 \edef\pgf@temp{\pgf@circ@handleSI@val}
9215 \pgfkeyslet{/tikz/circuitikz/bipole/annotation/name}{\pgf@temp}
9216 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9217 \pgfkeyslet{/tikz/circuitikz/bipole/annotation/unit}{\pgf@temp}
9218 \else
9219 \fi
9220 \else
9221 \fi
9222 }}
9223
9224 \ctikzset{annotation above/.code = {
9225 a=#1,
9226 \circuitikzbasekey/bipole/annotation/position=90 }
9227 }
9228
9229 \ctikzset{a^/.style = {
9230 a=#1,
9231 \circuitikzbasekey/bipole/annotation/position=90 }
9232 }
9233
9234 \ctikzset{annotation below/.code = {
9235 a=#1,
9236 \circuitikzbasekey/bipole/annotation/position=-90 }
9237 }
9238 \ctikzset{a_/.style = {
9239 a=#1,
9240 \circuitikzbasekey/bipole/annotation/position=-90 }
9241 }
9242
9243
9244
9245 \def\pgf@circ@drawlabels#1{
9246 \pgfextra{
9247 \pgfmathsubtract{\pgf@circ@direction}{90}
9248 \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9249
9250 \edef\pgf@circ@temp{\ctikzvalof{bipole/#1/position}}
9251 \ifnum \pgf@circ@temp < 0
9252 \pgfmathadd{\pgf@circ@labanc}{180}
9253 \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9254 \fi
9255 \ifpgf@circuit@bipole@inverted
9256 \pgfmathadd{\pgf@circ@temp}{180} %If shape is inverted, use opposite anchor
9257 \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9258 \fi
9259
9260 \ifnum \ctikzvalof{mirror value} = -1
9261 \pgfmathadd{\pgf@circ@temp}{180} %If shape is mirrored, use opposite anchor
9262 \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9263 \fi
9264 }
9265 %Firstly, place a coodinate directly at the edge of the shape
9266 (\ctikzvalof{bipole/name}.\pgf@circ@temp) coordinate (labelcoor)
9267 %now decide, which labels should be drawn
9268 \pgfextra{
9269 \edef\pgf@temp{\ctikzvalof{label/align}}
9270 \def\pgf@circ@temp{straight}
9271 }
9272 \ifx\pgf@temp\pgf@circ@temp %straight
9273 \pgf@circ@drawreglabels{#1}
9274 \else
9275 \pgfextra{\def\pgf@circ@temp{rotate}}
9276 \ifx\pgf@temp\pgf@circ@temp %rotate
9277 \pgf@circ@drawrotlabels{#1}
9278 \else% smart
9279 \pgf@circ@drawsmartlabels{#1}
9280 \fi
9281 \fi
9282 }
9283
9284
9285 \def\pgf@circ@drawsmartlabels#1{
9286 \pgfextra{
9287 \pgfmathmod{\pgf@circ@direction}{90}
9288 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9289 }
9290 \ifnum \pgfcircmathresult > 20
9291 \ifnum \pgfcircmathresult < 70
9292 \pgf@circ@drawrotlabels{#1}
9293 \else
9294 \pgf@circ@drawreglabels{#1}
9295 \fi
9296 \else
9297 \pgf@circ@drawreglabels{#1}
9298 \fi
9299 }
9300
9301
9302 \def\pgf@circ@drawrotlabels#1{
9303 \pgfextra{
9304 \ifnum \ctikzvalof{bipole/#1/position}>0
9305 %we need some more space for placement below, due to mid-anchor
9306 \def\pgf@circ@labposdistance{1.5ex}
9307 \else
9308 \def\pgf@circ@labposdistance{2ex}
9309 \fi
9310 %Calculate rotation of the label from direction and strip decimals
9311 \edef\pgfcirclabrot{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
9312 % rotate the label at second or third quadrant:
9313 \ifnum \pgfcirclabrot > 90 \ifnum \pgfcirclabrot < 270
9314 \pgfmathsubtract{\pgf@circ@direction}{180}
9315 \edef\pgfcirclabrot{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9316 %invert the space relationships due to rotatet strings
9317 \ifnum \ctikzvalof{bipole/#1/position}>0
9318 \def\pgf@circ@labposdistance{2ex}
9319 \else
9320 \def\pgf@circ@labposdistance{1.5ex}
9321 \fi
9322 \fi\fi
9323 \pgfmathparse{\ctikzvalof{bipole/#1/position}>0?\pgf@circ@direction+90:\pgf@circ@direction-90}
9324 \edef\pgf@circ@labposangle{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9325 }
9326 (labelcoor)++(\pgf@circ@labposangle:\pgf@circ@labposdistance) coordinate(labelcoor)
9327 node[anchor=mid,rotate=\pgfcirclabrot](\ctikzvalof{bipole/name}#1){\pgf@circ@finallabels{#1}}
9328 }
9329
9330 \def\pgf@circ@drawreglabels#1{
9331
9332 %Now calculate all shape positions
9333 %Use mid-anchor at x-axis and base-anchor at y-axis, respectively.
9334 %All points between will be addressed by angled-anchors:
9335 \pgfextra{
9336 \pgfmathadd{\pgf@circ@labanc}{90}
9337 \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9338 \pgfmathparse{mod(\pgf@circ@temp,180)>135?mod(\pgf@circ@temp,180)-180:mod(\pgf@circ@temp,180)}
9339 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9340 }
9341 %Values between -5 and 5 are at pos /neg x-axis, values around 90 are at both y-axis
9342 \ifnum \pgfcircmathresult > 84 \ifnum \pgfcircmathresult< 96
9343 \pgfextra{\edef\pgf@circ@labpos{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}}
9344 \ifnum \pgf@circ@labpos > 180
9345 \ifnum \ctikzvalof{bipole/#1/position} > 0
9346 \pgfextra{\def\pgf@circ@labanc{mid west}}
9347 \else
9348 \pgfextra{\def\pgf@circ@labanc{mid east}}
9349 \fi
9350 \else
9351 \ifnum \ctikzvalof{bipole/#1/position} > 0
9352 \pgfextra{\def\pgf@circ@labanc{mid east}}
9353 \else
9354 \pgfextra{\def\pgf@circ@labanc{mid west}}
9355 \fi
9356 \fi
9357 \fi\fi
9358 \ifnum \pgfcircmathresult <6
9359 \ifnum \ctikzvalof{bipole/#1/position} < 0
9360 %we need some more space for placement below, due to mid-anchor
9361 (labelcoor)++(-\pgf@circ@labanc:2ex) coordinate(labelcoor)
9362 \else
9363 (labelcoor)++(-\pgf@circ@labanc:1.5ex) coordinate(labelcoor)
9364 \fi
9365 \pgfextra{\def\pgf@circ@labanc{mid}}
9366 \fi
9367 (labelcoor) node[anchor=\pgf@circ@labanc](\ctikzvalof{bipole/name}#1){\pgf@circ@finallabels{#1}}
9368 }
9369
9370 \def\pgf@circ@finallabels#1{%
9371 \edef\pgf@temp{}%
9372 \edef\pgf@circ@temp{\ctikzvalof{bipole/#1/unit}}%
9373 \ifx\pgf@temp\pgf@circ@temp%
9374 \ctikzvalof{bipole/#1/name}%
9375 \else%
9376 $\SI{\ctikzvalof{bipole/#1/name}}{\ctikzvalof{bipole/#1/unit}}$%
9377 \fi%
9378 }
9379
9380 \ctikzset{text/.style = { t=#1 } }
9381 \ctikzset{t/.code = {
9382 \ctikzsetvalof{bipoles/twoport/text}{#1}
9383 }}
9384 %%%---------- close: tex/pgfcirclabel
9385 %%%%%%%%%%% Springe nach tex/pgfcircvoltage
9386 %%%---------- open: tex/pgfcircvoltage.tex
9387 % Copyright 2007-2009 by Massimo Redaelli
9388 %
9389 % This file may be distributed and/or modified
9390 %
9391 % 1. under the LaTeX Project Public License and/or
9392 % 2. under the GNU Public License.
9393 %
9394 % See the file doc/LICENSE for more details.
9395
9396 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9397 %% Voltage management
9398
9399
9400 \ctikzset{v^>/.style = {
9401 v = #1,
9402 \circuitikzbasekey/bipole/voltage/direction = forward,
9403 \circuitikzbasekey/bipole/voltage/position = above
9404 }
9405 }
9406
9407 \ctikzset{v^</.style = {
9408 v = #1,
9409 \circuitikzbasekey/bipole/voltage/direction = backward,
9410 \circuitikzbasekey/bipole/voltage/position = above
9411 }
9412 }
9413
9414 \ctikzset{v_>/.style = {
9415 v = #1,
9416 \circuitikzbasekey/bipole/voltage/direction = forward,
9417 \circuitikzbasekey/bipole/voltage/position = below
9418 }
9419 }
9420
9421 \ctikzset{v_</.style = {
9422 v = #1,
9423 \circuitikzbasekey/bipole/voltage/direction = backward,
9424 \circuitikzbasekey/bipole/voltage/position = below
9425 }
9426 }
9427
9428 \ctikzset{v_/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = below} }
9429 \ctikzset{v^/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = above} }
9430 \ctikzset{v>/.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = forward} }
9431 \ctikzset{v</.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = backward} }
9432
9433 % Default position varies whether the component is a voltage source
9434 % or not
9435 \ctikzset{v/.code = {
9436 \ifpgf@circuit@bipole@isvoltage
9437 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=above,
9438 \circuitikzbasekey/bipole/voltage/direction=forward}
9439 \else
9440 \ifpgf@circ@oldvoltagedirection
9441 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9442 \circuitikzbasekey/bipole/voltage/direction=backward}
9443 \else
9444 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9445 \circuitikzbasekey/bipole/voltage/direction=forward}
9446 \fi
9447 \fi
9448 \ifpgf@circ@oldvoltagedirection\else
9449 \ifpgf@circuit@bipole@iscurrent
9450 \ifpgf@circuit@bipole@current@backward
9451 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9452 \circuitikzbasekey/bipole/voltage/direction=forward}
9453 \else
9454 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9455 \circuitikzbasekey/bipole/voltage/direction=backward}
9456 \fi\fi\fi
9457 \pgfkeys{/tikz/circuitikz/bipole/voltage/label/name=#1}
9458 \ctikzsetvalof{bipole/voltage/label/unit}{}
9459 \ifpgf@circ@siunitx
9460 \pgf@circ@handleSI{#1}
9461 \ifpgf@circ@siunitx@res
9462 \edef\pgf@temp{\pgf@circ@handleSI@val}
9463 \pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/name}{\pgf@temp}
9464 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9465 \pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/unit}{\pgf@temp}
9466 \else
9467 \fi
9468 \else
9469 \fi
9470 }
9471 }
9472
9473
9474
9475
9476 %% Output routine for generic bipoles
9477
9478 \def\pgf@circ@drawvoltagegeneric{
9479 \pgfextra{
9480 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/straight label distance}
9481 \pgfkeysifdefined{\pgf@temp}
9482 {
9483 \edef\partheight{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/straight label distance}}
9484 \edef\tmpdistfromline{(\partheight\pgf@circ@Rlen)}
9485 }
9486 {
9487 \pgfkeysifdefined{/tikz/circuitikz/bipoles/voltage/straight label distance}
9488 {
9489 \edef\partheight{\ctikzvalof{bipoles/voltage/straight label distance}}
9490 \edef\tmpdistfromline{(\partheight\pgf@circ@Rlen)}
9491 }
9492 {%calculate default value from part height
9493 \edef\partheight{0.5*\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/height}}
9494 \edef\tmpdistfromline{(\partheight\pgf@circ@Rlen+0.2\pgf@circ@Rlen)}
9495 }
9496 }
9497 \ifnum \ctikzvalof{mirror value}=-1
9498 \ifpgf@circuit@bipole@inverted
9499 \ifpgf@circuit@bipole@voltage@straight
9500 \def\distfromline{\tmpdistfromline}
9501 \else
9502 \def\distfromline{\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
9503 \fi
9504 \else
9505 \ifpgf@circuit@bipole@voltage@straight
9506 \def\distfromline{-\tmpdistfromline}
9507 \else
9508 \def\distfromline{-\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
9509 \fi
9510 \fi
9511 \else
9512 \ifpgf@circuit@bipole@inverted
9513 \ifpgf@circuit@bipole@voltage@straight
9514 \def\distfromline{-\tmpdistfromline}
9515 \else
9516 \def\distfromline{-\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
9517 \fi
9518 \else
9519 \ifpgf@circuit@bipole@voltage@straight
9520 \def\distfromline{\tmpdistfromline}
9521 \else
9522 \def\distfromline{\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
9523 \fi
9524 \fi
9525 \fi
9526 \ifpgf@circuit@bipole@voltage@below
9527 \def\pgf@circ@voltage@angle{90}
9528 \else
9529 \def\pgf@circ@voltage@angle{-90}
9530 \fi
9531 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}
9532 \pgfkeysifdefined{\pgf@temp}
9533 { \edef\distacefromnode{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}} }
9534 { \edef\distacefromnode{\ctikzvalof{voltage/distance from node}} }
9535 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}
9536 \pgfkeysifdefined{\pgf@temp}
9537 { \edef\bumpb{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}} }
9538 { \edef\bumpb{\ctikzvalof{voltage/bump b}} }
9539 }
9540 % %\pgf@circ@Rlen/16 is equal to the length of the currarrow
9541 coordinate (pgfcirc@midtmp) at ($(\tikztostart) ! \pgf@circ@Rlen/16 ! (anchorstartnode)$) %absolute move, minimum space is length of arrowhead
9542 coordinate (pgfcirc@midtmp) at ($(pgfcirc@midtmp) ! \distacefromnode ! (anchorstartnode)$)
9543
9544 coordinate (pgfcirc@Vfrom) at ($(pgfcirc@midtmp) ! -\distfromline ! \pgf@circ@voltage@angle:(anchorstartnode)$)
9545 coordinate (pgfcirc@midtmp) at ($(\tikztotarget) ! \pgf@circ@Rlen/16 ! (anchorendnode)$)%absolute move, minimum space is length of arrowhead
9546 coordinate (pgfcirc@midtmp) at ($(pgfcirc@midtmp) ! \distacefromnode ! (anchorendnode)$)
9547
9548 coordinate (pgfcirc@Vto) at ($(pgfcirc@midtmp) ! \distfromline ! \pgf@circ@voltage@angle : (anchorendnode)$)
9549
9550 \ifpgf@circuit@bipole@voltage@below
9551 coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-110)$)
9552 coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-70)$)
9553 \else
9554 coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.110)$)
9555 coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.70)$)
9556 \fi
9557
9558 \ifpgf@circuit@europeanvoltage
9559 \ifpgf@circuit@bipole@voltage@straight
9560 \ifpgf@circuit@bipole@voltage@backward
9561 (pgfcirc@Vto) --(pgfcirc@Vfrom) node[currarrow, sloped, allow upside down, pos=1,anchor=tip] {}
9562 \else
9563 (pgfcirc@Vfrom) --(pgfcirc@Vto) node[currarrow, sloped, allow upside down, pos=1,anchor=tip] {}
9564 \fi
9565 \else
9566 \ifpgf@circuit@bipole@voltage@backward
9567 (pgfcirc@Vto) .. controls (pgfcirc@Vcont2) and (pgfcirc@Vcont1) ..
9568 node[currarrow, sloped, allow upside down, pos=1] {}
9569 (pgfcirc@Vfrom)
9570 \else
9571 (pgfcirc@Vfrom) .. controls (pgfcirc@Vcont1) and (pgfcirc@Vcont2) ..
9572 node[currarrow, sloped, allow upside down, pos=1] {}
9573 (pgfcirc@Vto)
9574 \fi
9575 \fi
9576 \else
9577 \ifpgf@circuit@bipole@voltage@backward
9578 \ifpgf@circ@oldvoltagedirection
9579 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$}
9580 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$-$}
9581 \else
9582 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$}
9583 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$+$}
9584 \fi
9585 \else
9586 \ifpgf@circ@oldvoltagedirection
9587 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$}
9588 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$+$}
9589 \else
9590 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$}
9591 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$-$}
9592 \fi
9593 \fi
9594 \fi
9595 }
9596
9597 %% Output routine for voltage sources
9598 \def\pgf@circ@drawvoltagegenerator{
9599 \ifpgf@circuit@bipole@voltage@below
9600 coordinate (pgfcirc@Vfrom) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-120)$)
9601 coordinate (pgfcirc@Vto) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-60)$)
9602 \else
9603 coordinate (pgfcirc@Vfrom) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.120)$)
9604 coordinate (pgfcirc@Vto) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.60)$)
9605 \fi
9606 \ifpgf@circuit@europeanvoltage
9607 \ifpgf@circuit@bipole@voltage@backward
9608 (pgfcirc@Vto) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vfrom)
9609 \else
9610 (pgfcirc@Vfrom) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vto)
9611 \fi
9612 \else% american voltage
9613 \ifpgf@circuit@bipole@voltageoutsideofsymbol
9614 % if it is a battery, must put + and -
9615 \ifpgf@circuit@bipole@voltage@backward
9616 (pgfcirc@Vfrom) node {$-$} (pgfcirc@Vto) node {$+$}
9617 \else
9618 (pgfcirc@Vfrom) node {$+$} (pgfcirc@Vto) node {$-$}
9619 \fi
9620 \fi
9621 \fi
9622 }
9623
9624 %% Output routine
9625 \def\pgf@circ@drawvoltage{% node name
9626 %\pgf@circ@direction
9627 \pgfextra{
9628 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
9629 \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
9630 \ifpgf@circuit@bipole@voltage@below
9631 \def\pgf@circ@bipole@voltage@label@anchor{north west}
9632 \else \def\pgf@circ@bipole@voltage@label@anchor{south east}
9633 \fi
9634 \fi\fi
9635 \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
9636 \ifpgf@circuit@bipole@voltage@below
9637 \def\pgf@circ@bipole@voltage@label@anchor{west}
9638 \else \def\pgf@circ@bipole@voltage@label@anchor{east}
9639 \fi
9640 \fi\fi
9641 \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
9642 \ifpgf@circuit@bipole@voltage@below
9643 \def\pgf@circ@bipole@voltage@label@anchor{south west}
9644 \else \def\pgf@circ@bipole@voltage@label@anchor{north east}
9645 \fi
9646 \fi\fi
9647 \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
9648 \ifpgf@circuit@bipole@voltage@below
9649 \def\pgf@circ@bipole@voltage@label@anchor{south}
9650 \else\def\pgf@circ@bipole@voltage@label@anchor{north}
9651 \fi
9652 \fi\fi
9653 \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
9654 \ifpgf@circuit@bipole@voltage@below
9655 \def\pgf@circ@bipole@voltage@label@anchor{south east}
9656 \else\def\pgf@circ@bipole@voltage@label@anchor{north west}
9657 \fi
9658 \fi\fi
9659 \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
9660 \ifpgf@circuit@bipole@voltage@below
9661 \def\pgf@circ@bipole@voltage@label@anchor{east}
9662 \else \def\pgf@circ@bipole@voltage@label@anchor{west}
9663 \fi
9664 \fi\fi
9665 \ifnum\pgfcircmathresult >274 \ifnum\pgfcircmathresult <356
9666 \ifpgf@circuit@bipole@voltage@below
9667 \def\pgf@circ@bipole@voltage@label@anchor{north east}
9668 \else\def\pgf@circ@bipole@voltage@label@anchor{south west}
9669 \fi
9670 \fi\fi
9671 \ifnum\pgfcircmathresult >-1 \ifnum\pgfcircmathresult <5
9672 \ifpgf@circuit@bipole@voltage@below
9673 \def\pgf@circ@bipole@voltage@label@anchor{north}
9674 \else\def\pgf@circ@bipole@voltage@label@anchor{south}
9675 \fi
9676 \fi\fi
9677 \ifnum\pgfcircmathresult >355 \ifnum\pgfcircmathresult <361
9678 \ifpgf@circuit@bipole@voltage@below
9679 \def\pgf@circ@bipole@voltage@label@anchor{north}
9680 \else\def\pgf@circ@bipole@voltage@label@anchor{south}
9681 \fi
9682 \fi\fi
9683
9684 \ifnum \ctikzvalof{mirror value}=-1
9685 \ifpgf@circuit@bipole@voltage@below
9686 \pgf@circuit@bipole@voltage@belowfalse
9687 \else
9688 \pgf@circuit@bipole@voltage@belowtrue
9689 \fi
9690 \fi
9691
9692 \ifpgf@circuit@bipole@inverted
9693 \ifpgf@circuit@bipole@voltage@below
9694 \pgf@circuit@bipole@voltage@belowfalse
9695 \else
9696 \pgf@circuit@bipole@voltage@belowtrue
9697 \fi
9698 \fi
9699
9700 \ifpgf@circuit@bipole@voltage@below
9701 \def\pgf@circ@bipole@voltage@label@where{-90}
9702 \else
9703 \def\pgf@circ@bipole@voltage@label@where{90}
9704 \fi
9705
9706
9707 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}
9708 \pgfkeysifdefined{\pgf@temp}
9709 { \edef\eudist{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}} }
9710 { \edef\eudist{\ctikzvalof{voltage/european label distance}} }
9711
9712 \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
9713 }%end pgfextra
9714
9715 \ifpgf@circuit@bipole@isvoltage
9716 \pgf@circ@drawvoltagegenerator
9717 \else
9718 \pgf@circ@drawvoltagegeneric
9719 \fi
9720
9721 % (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where) %Zeile sinnlos!?
9722 \ifpgf@circuit@bipole@voltage@straight
9723 coordinate (Vlab) at ($(pgfcirc@Vto)!0.5!(pgfcirc@Vfrom) $)
9724 node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=2pt]
9725 at (Vlab) { \pgf@circ@finallabels{voltage/label} }
9726 \else
9727 coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) !
9728 \ifpgf@circuit@europeanvoltage
9729 \eudist
9730 \else
9731 \ctikzvalof{voltage/american label distance}
9732 \fi !
9733 (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where)$)
9734 node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=2pt] at (Vlab) { \pgf@circ@finallabels{voltage/label} }
9735 \fi
9736 }%end drawvoltages
9737 %%%---------- close: tex/pgfcircvoltage
9738 %%%%%%%%%%% Springe nach tex/pgfcirccurrent
9739 %%%---------- open: tex/pgfcirccurrent.tex
9740 % Copyright 2007-2009 by Massimo Redaelli
9741 %
9742 % This file may be distributed and/or modified
9743 %
9744 % 1. under the LaTeX Project Public License and/or
9745 % 2. under the GNU Public License.
9746 %
9747 % See the file doc/LICENSE for more details.
9748
9749 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9750 %% Current handling
9751
9752 %% Options
9753 \ctikzset{i^>/.style = {
9754 i = #1,
9755 \circuitikzbasekey/bipole/current/direction = forward,
9756 \circuitikzbasekey/bipole/current/x position = after,
9757 \circuitikzbasekey/bipole/current/y position = above
9758 }
9759 }
9760
9761 \ctikzset{i_>/.style = {
9762 i = #1,
9763 \circuitikzbasekey/bipole/current/direction = forward,
9764 \circuitikzbasekey/bipole/current/x position = after,
9765 \circuitikzbasekey/bipole/current/y position = below
9766 }
9767 }
9768
9769 \ctikzset{i>^/.style = {
9770 i = #1,
9771 \circuitikzbasekey/bipole/current/direction = forward,
9772 \circuitikzbasekey/bipole/current/x position = before,
9773 \circuitikzbasekey/bipole/current/y position = above
9774 }
9775 }
9776
9777 \ctikzset{i>_/.style = {
9778 i = #1,
9779 \circuitikzbasekey/bipole/current/direction = forward,
9780 \circuitikzbasekey/bipole/current/x position = before,
9781 \circuitikzbasekey/bipole/current/y position = below
9782 }
9783 }
9784
9785 \ctikzset{i^</.style = {
9786 i = #1,
9787 \circuitikzbasekey/bipole/current/direction = backward,
9788 \circuitikzbasekey/bipole/current/x position = after,
9789 \circuitikzbasekey/bipole/current/y position = above
9790 }
9791 }
9792
9793 \ctikzset{i_</.style = {
9794 i = #1,
9795 \circuitikzbasekey/bipole/current/direction = backward,
9796 \circuitikzbasekey/bipole/current/x position = after,
9797 \circuitikzbasekey/bipole/current/y position = below
9798 }
9799 }
9800
9801 \ctikzset{i<^/.style = {
9802 i = #1,
9803 \circuitikzbasekey/bipole/current/direction = backward,
9804 \circuitikzbasekey/bipole/current/x position = before,
9805 \circuitikzbasekey/bipole/current/y position = above
9806 }
9807 }
9808
9809 \ctikzset{i<_/.style = {
9810 i = #1,
9811 \circuitikzbasekey/bipole/current/direction = backward,
9812 \circuitikzbasekey/bipole/current/x position = before,
9813 \circuitikzbasekey/bipole/current/y position = below
9814 }
9815 }
9816
9817 \ctikzset{i/.code = {
9818 \pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
9819 \circuitikzbasekey/bipole/current/x position = after,
9820 \circuitikzbasekey/bipole/current/y position = above }
9821 \pgfkeys{/tikz/circuitikz/bipole/current/label/name=#1}
9822 \ctikzsetvalof{bipole/current/label/unit}{}
9823 \ifpgf@circ@siunitx
9824 \pgf@circ@handleSI{#1}
9825 \ifpgf@circ@siunitx@res
9826 \edef\pgf@temp{\pgf@circ@handleSI@val}
9827 \pgfkeyslet{/tikz/circuitikz/bipole/current/label/name}{\pgf@temp}
9828 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9829 \pgfkeyslet{/tikz/circuitikz/bipole/current/label/unit}{\pgf@temp}
9830 \else
9831 \fi
9832 \else
9833 \fi
9834 %reverse current direction for voltage sources
9835 \ifpgf@circ@oldvoltagedirection\else
9836 \ifpgf@circuit@bipole@isvoltage
9837 \ifpgf@circuit@bipole@voltage@backward
9838 \pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
9839 \circuitikzbasekey/bipole/current/x position = after,
9840 \circuitikzbasekey/bipole/current/y position = below }
9841 \else
9842 \pgfkeys{\circuitikzbasekey/bipole/current/direction = backward,
9843 \circuitikzbasekey/bipole/current/x position = before,
9844 \circuitikzbasekey/bipole/current/y position = above }
9845 \fi\fi\fi
9846 }
9847 }
9848
9849
9850 \ifpgf@circ@oldvoltagedirection
9851 \ctikzset{i</.style = { i = #1, \circuitikzbasekey/bipole/current/direction = backward } }
9852 \else
9853 \ctikzset{i</.style = { i = #1, \circuitikzbasekey/bipole/current/direction = backward, \circuitikzbasekey/bipole/current/x position = before } }
9854 \fi
9855 \ctikzset{i_/.style = { i = #1, \circuitikzbasekey/bipole/current/y position = below } }
9856 \ctikzset{i>/.style = {i = #1, \circuitikzbasekey/bipole/current/direction = forward } }
9857 \ctikzset{i^/.style = { i= #1, \circuitikzbasekey/bipole/current/y position = above } }
9858
9859 %% Output routine
9860 \def\pgf@circ@drawcurrent{
9861 \pgfextra{
9862 \edef\pgf@circ@ffffff{\pgf@circ@direction}
9863 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@ffffff\pgf@nil}
9864
9865 \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
9866 \ifpgf@circuit@bipole@current@below
9867 \def\pgf@circ@dir{north west} \else \def\pgf@circ@dir{south east}
9868 \fi
9869 \fi\fi
9870 \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
9871 \ifpgf@circuit@bipole@current@below
9872 \def\pgf@circ@dir{west} \else \def\pgf@circ@dir{east}
9873 \fi
9874 \fi\fi
9875 \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
9876 \ifpgf@circuit@bipole@current@below
9877 \def\pgf@circ@dir{south west}\else \def\pgf@circ@dir{north east}
9878 \fi
9879 \fi\fi
9880 \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
9881 \ifpgf@circuit@bipole@current@below
9882 \def\pgf@circ@dir{south}\else\def\pgf@circ@dir{north}
9883 \fi
9884 \fi\fi
9885 \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
9886 \ifpgf@circuit@bipole@current@below
9887 \def\pgf@circ@dir{south east}\else\def\pgf@circ@dir{north west}
9888 \fi
9889 \fi\fi
9890 \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
9891 \ifpgf@circuit@bipole@current@below
9892 \def\pgf@circ@dir{east}\else \def\pgf@circ@dir{west}
9893 \fi
9894 \fi\fi
9895 \ifnum\pgfcircmathresult >274 \ifnum\pgfcircmathresult <356
9896 \ifpgf@circuit@bipole@current@below
9897 \def\pgf@circ@dir{north east}\else\def\pgf@circ@dir{south west}
9898 \fi
9899 \fi\fi
9900 \ifnum\pgfcircmathresult <5
9901 \ifpgf@circuit@bipole@current@below
9902 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
9903 \fi
9904 \fi
9905 \ifnum\pgfcircmathresult >355
9906 \ifpgf@circuit@bipole@current@below
9907 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
9908 \fi
9909 \fi
9910
9911 \ifpgf@circuit@bipole@current@below
9912 \def\pgf@circ@bipole@current@label@where{-90}
9913 \else
9914 \def\pgf@circ@bipole@current@label@where{+90}
9915 \fi
9916 }
9917
9918 \pgfextra{\def\pgf@temp{short}\edef\pgf@circ@temp{\ctikzvalof{bipole/kind}}}
9919 \ifx\pgf@circ@temp\pgf@temp%draw current at a short at middle of the line
9920 (\tikztostart)--(\tikztotarget)
9921 \else% normal bipole or source
9922 \ifpgf@circuit@bipole@current@before
9923 (\tikztostart)--(anchorstartnode)
9924 \else
9925 (anchorendnode)--(\tikztotarget)
9926 \fi
9927 \fi
9928 \ifpgf@circuit@bipole@current@backward
9929 \pgfextra{
9930 \pgfmathsubtract{\pgf@circ@ffffff}{180}
9931 \edef\pgf@circ@ffffff{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9932 }
9933 \fi
9934 coordinate[currarrow,pos=\ctikzvalof{current/distance},rotate=\pgf@circ@ffffff](Iarrow)
9935 (Iarrow.\pgf@circ@bipole@current@label@where) node[anchor=\pgf@circ@dir]{\pgf@circ@finallabels{current/label}}
9936 }
9937
9938 %%%---------- close: tex/pgfcirccurrent
9939 %%%%%%%%%%% Springe nach tex/pgfcircflow
9940 %%%---------- open: tex/pgfcircflow.tex
9941 % Copyright 2007-2009 by Massimo Redaelli
9942 %
9943 % This file may be distributed and/or modified
9944 %
9945 % 1. under the LaTeX Project Public License and/or
9946 % 2. under the GNU Public License.
9947 %
9948 % See the file doc/LICENSE for more details.
9949
9950 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9951 %% flow handling
9952
9953 %% Options
9954 \ctikzset{f^>/.style = {
9955 f = #1,
9956 \circuitikzbasekey/bipole/flow/direction = forward,
9957 \circuitikzbasekey/bipole/flow/x position = after,
9958 \circuitikzbasekey/bipole/curflowrent/y position = above
9959 }
9960 }
9961
9962 \ctikzset{f_>/.style = {
9963 f = #1,
9964 \circuitikzbasekey/bipole/flow/direction = forward,
9965 \circuitikzbasekey/bipole/flow/x position = after,
9966 \circuitikzbasekey/bipole/flow/y position = below
9967 }
9968 }
9969
9970 \ctikzset{f>^/.style = {
9971 f = #1,
9972 \circuitikzbasekey/bipole/flow/direction = forward,
9973 \circuitikzbasekey/bipole/flow/x position = before,
9974 \circuitikzbasekey/bipole/flow/y position = above
9975 }
9976 }
9977
9978 \ctikzset{f>_/.style = {
9979 f = #1,
9980 \circuitikzbasekey/bipole/flow/direction = forward,
9981 \circuitikzbasekey/bipole/flow/x position = before,
9982 \circuitikzbasekey/bipole/flow/y position = below
9983 }
9984 }
9985
9986 \ctikzset{f^</.style = {
9987 f = #1,
9988 \circuitikzbasekey/bipole/flow/direction = backward,
9989 \circuitikzbasekey/bipole/flow/x position = after,
9990 \circuitikzbasekey/bipole/flow/y position = above
9991 }
9992 }
9993
9994 \ctikzset{f_</.style = {
9995 f = #1,
9996 \circuitikzbasekey/bipole/flow/direction = backward,
9997 \circuitikzbasekey/bipole/flow/x position = after,
9998 \circuitikzbasekey/bipole/flow/y position = below
9999 }
10000 }
10001
10002 \ctikzset{f<^/.style = {
10003 f = #1,
10004 \circuitikzbasekey/bipole/flow/direction = backward,
10005 \circuitikzbasekey/bipole/flow/x position = before,
10006 \circuitikzbasekey/bipole/flow/y position = above
10007 }
10008 }
10009
10010 \ctikzset{f<_/.style = {
10011 f = #1,
10012 \circuitikzbasekey/bipole/flow/direction = backward,
10013 \circuitikzbasekey/bipole/flow/x position = before,
10014 \circuitikzbasekey/bipole/flow/y position = below
10015 }
10016 }
10017
10018 \ctikzset{f</.style = { f = #1, \circuitikzbasekey/bipole/flow/direction = backward} }
10019 \ctikzset{f_/.style = { f = #1, \circuitikzbasekey/bipole/flow/y position = below } }
10020 \ctikzset{f>/.style = { f = #1, \circuitikzbasekey/bipole/flow/direction = forward } }
10021 \ctikzset{f^/.style = { f = #1, \circuitikzbasekey/bipole/flow/y position = above } }
10022
10023 \ctikzset{f/.code = {
10024 \pgfkeys{\circuitikzbasekey/bipole/flow/direction = forward,
10025 \circuitikzbasekey/bipole/flow/x position = after,
10026 \circuitikzbasekey/bipole/flow/y position = above }
10027 \pgfkeys{/tikz/circuitikz/bipole/flow/label/name=#1}
10028 \ctikzsetvalof{bipole/flow/label/unit}{}
10029 \ifpgf@circ@siunitx
10030 \pgf@circ@handleSI{#1}
10031 \ifpgf@circ@siunitx@res
10032 \edef\pgf@temp{\pgf@circ@handleSI@val}
10033 \pgfkeyslet{/tikz/circuitikz/bipole/flow/label/name}{\pgf@temp}
10034 \edef\pgf@temp{\pgf@circ@handleSI@unit}
10035 \pgfkeyslet{/tikz/circuitikz/bipole/flow/label/unit}{\pgf@temp}
10036 \else
10037 \fi
10038 \else
10039 \fi
10040 }
10041 }
10042
10043 %% Output routine
10044 \def\pgf@circ@drawflow{
10045 \pgfextra{
10046 \edef\pgf@circ@ffffff{\pgf@circ@direction}
10047 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@ffffff\pgf@nil}
10048
10049 \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
10050 \ifpgf@circuit@bipole@flow@below
10051 \def\pgf@circ@dir{north west} \else \def\pgf@circ@dir{south east}
10052 \fi
10053 \fi\fi
10054 \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
10055 \ifpgf@circuit@bipole@flow@below
10056 \def\pgf@circ@dir{west} \else \def\pgf@circ@dir{east}
10057 \fi
10058 \fi\fi
10059 \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
10060 \ifpgf@circuit@bipole@flow@below
10061 \def\pgf@circ@dir{south west}\else \def\pgf@circ@dir{north east}
10062 \fi
10063 \fi\fi
10064 \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
10065 \ifpgf@circuit@bipole@flow@below
10066 \def\pgf@circ@dir{south}\else\def\pgf@circ@dir{north}
10067 \fi
10068 \fi\fi
10069 \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
10070 \ifpgf@circuit@bipole@flow@below
10071 \def\pgf@circ@dir{south east}\else\def\pgf@circ@dir{north west}
10072 \fi
10073 \fi\fi
10074 \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
10075 \ifpgf@circuit@bipole@flow@below
10076 \def\pgf@circ@dir{east}\else \def\pgf@circ@dir{west}
10077 \fi
10078 \fi\fi
10079 \ifnum\pgfcircmathresult >274 \ifnum\pgfcircmathresult <356
10080 \ifpgf@circuit@bipole@flow@below
10081 \def\pgf@circ@dir{north east}\else\def\pgf@circ@dir{south west}
10082 \fi
10083 \fi\fi
10084 \ifnum\pgfcircmathresult <5
10085 \ifpgf@circuit@bipole@flow@below
10086 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
10087 \fi
10088 \fi
10089 \ifnum\pgfcircmathresult >355
10090 \ifpgf@circuit@bipole@flow@below
10091 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
10092 \fi
10093 \fi
10094
10095 \ifpgf@circuit@bipole@flow@below
10096 \def\pgf@circ@bipole@flow@label@where{-90}
10097 \else
10098 \def\pgf@circ@bipole@flow@label@where{+90}
10099 \fi
10100 }
10101
10102 \pgfextra{\def\pgf@temp{short}\edef\pgf@circ@temp{\ctikzvalof{bipole/kind}}}
10103 \ifx\pgf@circ@temp\pgf@temp%draw flow at a short at middle of the line
10104 (\tikztostart)--(\tikztotarget)
10105 \else% normal bipole or source
10106 \ifpgf@circuit@bipole@flow@before
10107 (\tikztostart)--(anchorstartnode)
10108 \else
10109 (anchorendnode)--(\tikztotarget)
10110 \fi
10111 \fi
10112 \pgfextra{
10113 \ifpgf@circuit@bipole@flow@backward
10114 \ifpgf@circuit@bipole@flow@below
10115 \def\flow@offset{\ctikzvalof{flow/offset}\pgf@circ@Rlen}
10116 \else
10117 \def\flow@offset{-\ctikzvalof{flow/offset}\pgf@circ@Rlen}
10118 \fi
10119 \pgfmathsubtract{\pgf@circ@ffffff}{180}
10120 \edef\pgf@circ@ffffff{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
10121 \else
10122 \ifpgf@circuit@bipole@flow@below
10123 \def\flow@offset{-\ctikzvalof{flow/offset}\pgf@circ@Rlen}
10124 \else
10125 \def\flow@offset{\ctikzvalof{flow/offset}\pgf@circ@Rlen}
10126 \fi
10127 \fi
10128 }
10129 coordinate[flowarrow,pos=\ctikzvalof{flow/distance},rotate=\pgf@circ@ffffff,yshift=\flow@offset](Farrowpos)
10130 (Farrowpos.\pgf@circ@bipole@flow@label@where) node[anchor=\pgf@circ@dir]{ \pgf@circ@finallabels{flow/label}}
10131 }
10132
10133 %%%---------- close: tex/pgfcircflow
10134
10135 % defaults
10136
10137 \setupmodule
10138 [current=european,
10139 voltage=european,
10140 resistor=american,
10141 inductor=cute,
10142 logic=american,
10143 siunitx=true,
10144 arrowmos=false]
10145
10146 \processaction
10147 [\currentmoduleparameter{voltage}]
10148 [european=>\ctikzset{voltage=european},
10149 american=>\ctikzset{voltage=american}]
10150
10151 \processaction
10152 [\currentmoduleparameter{current}]
10153 [european=>\ctikzset{ current=european},
10154 american=>\ctikzset{ current=american}]
10155
10156 \processaction
10157 [\currentmoduleparameter{label}]
10158 [straight=>\ctikzset{label/align = straight},
10159 align=>\ctikzset{label/align = rotate},
10160 smart=>\ctikzset{label/align = smart}]
10161
10162 \processaction
10163 [\currentmoduleparameter{resistor}]
10164 [european=>\ctikzset{ resistor=european},
10165 american=>\ctikzset{ resistor=american}]
10166
10167 \processaction
10168 [\currentmoduleparameter{inductor}]
10169 [european=>\ctikzset{ inductor=european},
10170 american=>\ctikzset{ inductor=american},
10171 cute=>\ctikzset{ inductor=cute}]
10172
10173 \processaction
10174 [\currentmoduleparameter{diode}]
10175 [full=>\ctikzset{ diode=full},
10176 empty=>\ctikzset{ diode=empty}]
10177
10178 \processaction
10179 [\currentmoduleparameter{logic}]
10180 [european=>\ctikzset{ logic ports=european},
10181 american=>\ctikzset{ logic ports=american}]
10182
10183 \processaction
10184 [\currentmoduleparameter{siunitx}]
10185 [true=>\def\SI#1#2{#1\,#2}
10186 \def\ampere{\rm{A}}
10187 \def\volt{\rm{V}}
10188 \def\ohm{\Omega}
10189 \def\siemens{\rm{S}}
10190 \def\farad{\rm{F}}
10191 \def\henry{\rm{H}}
10192 \def\second{\rm{s}}
10193 \def\coulomb{\rm{C}}
10194 \def\siemens{\rm{S}}
10195 \def\radians{\rm{rad}}
10196 \def\milli{\rm{m}}
10197 \def\micro{\mu}
10198 \def\nano{\rm{n}}
10199 \def\pico{\rm{p}}
10200 \def\kilo{\rm{k}}
10201 \def\mega{\rm{M}}
10202 \def\giga{\rm{G}}
10203 \def\tera{\rm{T}},
10204 false=>]
10205 % \s!default=>\pgf@circ@siunitxtrue,
10206
10207 \processaction
10208 [\currentmoduleparameter{arrowmos}]
10209 [true=>\pgf@circuit@mos@arrowstrue,
10210 false=>\pgf@circuit@mos@arrowsfalse]
10211 % \s!default=>\pgf@circuit@mos@arrowstrue,
10212
10213
10214 \ifpgf@circ@siunitx
10215 % nothing! siunitx and xstrings don't work in context
10216 \fi
10217
10218
10219 % Context specific
10220
10221 \ctikzset{tripoles/op amp/font/.initial=\switchtobodyfont[small]}
10222
10223 %%%%%%%%%%% Springe nach tex/pgfcircpath
10224 %%%---------- open: tex/pgfcircpath.tex
10225
10226 \def\pgf@circ@direction{0.0}
10227
10228 % Names
10229 \ctikzset{name/.style = { n=#1 } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@
10230 \ctikzset{n/.code = {
10231 \pgfkeys{/tikz/circuitikz/bipole/name=#1}
10232 }}
10233
10234 % Reflect the node along
10235 \ctikzset{mirrored/.is choice}
10236 \ctikzset{mirror value/.initial=1}
10237 \ctikzset{mirrored/true/.code = {\ctikzsetvalof{mirror value}{-1}} }
10238 \ctikzset{mirrored/false/.code = {\ctikzsetvalof{mirror value}{1}} }
10239 \ctikzset{mirror/.style = {/tikz/circuitikz/mirrored=true}}
10240
10241 % Invert node along path
10242 \ctikzset{inverted/.is choice}
10243 \ctikzset{invert value/.initial=1}
10244 \ctikzset{inverted/true/.code = {\ctikzsetvalof{invert value}{-1}\pgf@circuit@bipole@invertedtrue}}
10245 \ctikzset{inverted/false/.code = {\ctikzsetvalof{invert value}{1}\pgf@circuit@bipole@invertedfalse}}
10246 \ctikzset{invert/.style = {/tikz/circuitikz/inverted=true}}
10247 \newif\ifpgf@circuit@bipole@inverted
10248 \ctikzset{bipole/inverted/.is if=pgf@circuit@bipole@inverted}
10249
10250
10251 \newif\ifpgf@circuit@bipole@voltage@backward
10252 \ctikzset{bipole/voltage/direction/.is choice}
10253 \ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}}
10254 \ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}}
10255
10256
10257
10258 % Initialize paths
10259 \def\pgfcircresetpath{
10260 \ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90, ,bipole/annotation/name=, bipole/annotation/position=-90,
10261 bipole/inverted=false, bipole/kind=,
10262 bipole/voltage/direction=backward, bipole/voltage/label/name=, bipole/voltage/position=below,
10263 bipole/nodes/left=none, bipole/nodes/right=none, bipole/is voltage=false,bipole/is voltageoutsideofsymbol=false,bipole/is strokedsymbol=false,
10264 bipole/is current=false, bipole/current/label/name=, bipole/current/x position=after,
10265 bipole/current/y position=above, bipole/current/direction=forward,
10266 mirrored=false
10267 }
10268 }
10269
10270 %% Helper function for path-function to ensure using anchors between nodes
10271 \def\set@explicit@center@anchor#1{
10272 \pgfutil@ifundefined{pgf@sh@ns@#1}
10273 {
10274 %This coordinate is no node(but a relative position or a coordinate), no further handling needed
10275 }{
10276 \pgfutil@in@.{#1}
10277 \ifpgfutil@in@
10278 % Anchor is used, do nothing!
10279 \else%
10280 \let\tikz@moveto@waiting=\relax
10281 \pgfpathmoveto{\tikz@last@position}%force movement, because tikz@moveto@waiting
10282 \edef#1{#1.center}%ensure using center anchor
10283 \fi
10284 }
10285 }
10286
10287
10288 %% Generic bipole path
10289 \def\pgf@circ@bipole@path#1#2{
10290
10291 \pgfextra{
10292 \set@explicit@center@anchor{\tikztostart}
10293 \set@explicit@center@anchor{\tikztotarget}
10294 \pgfsyssoftpath@getcurrentpath{\myp@th}%% save current path to extend after calculation of correct start/end coordinates
10295 \ctikzset{bipole/kind = #1}
10296 \edef\pgf@temp{\ctikzvalof{bipole/name}}
10297 \def\pgf@circ@temp{}
10298 \ifx\pgf@temp\pgf@circ@temp % if it has not a name
10299 \pgfmathrandominteger{\pgf@circ@rand}{1000}{9999}
10300 \ctikzset{bipole/name = #2\pgf@circ@rand} % create it
10301 \fi
10302 }
10303
10304 (\tikztostart) coordinate (\ctikzvalof{bipole/name}start)%necessary to get correct coordinates in the case of relativ start/end or constructions like ((node1)-|(node2))
10305 (\tikztotarget) coordinate (\ctikzvalof{bipole/name}end)
10306 \pgfextra{
10307 \pgfmathanglebetweenpoints{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
10308 {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
10309 \edef\pgf@circ@direction{\pgfmathresult}%Calculate direction(angle) of path
10310 \pgfsyssoftpath@setcurrentpath{\myp@th}
10311 }
10312 \pgfextra{\def\pgf@temp{open}\def\pgf@circ@temp{#1}}
10313 \ifx\pgf@temp\pgf@circ@temp % if it is an open
10314 \else
10315 --($(\ctikzvalof{bipole/name}start) ! .5\pgflinewidth ! (\ctikzvalof{bipole/name}end)$) %ugly workaround to get correct linejoins(node breaks path?)
10316 \fi
10317 ($(\tikztostart) ! .5 ! (\tikztotarget)$)%%positio of middle node
10318 node[#1shape, rotate=\pgf@circ@direction, yscale=\ctikzvalof{mirror value}, xscale=\ctikzvalof{invert value}]
10319 (\ctikzvalof{bipole/name}) {}
10320 \ifpgf@circuit@bipole@inverted
10321 \ifcsname pgf@anchor@#1shape@pathstart\endcsname%if special path-anchors are defined, use them!
10322 coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.pathend)
10323 coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.pathstart)
10324 \else
10325 coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.right)
10326 coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.left)
10327 \fi
10328 \else
10329 \ifcsname pgf@anchor@#1shape@pathstart\endcsname%if special path-anchors are defined, use them!
10330 coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.pathstart)
10331 coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.pathend)
10332 \else
10333 coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.left)
10334 coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.right)
10335 \fi
10336 \fi
10337 \pgfextra{\def\pgf@temp{open}\def\pgf@circ@temp{#1}}
10338 \ifx\pgf@temp\pgf@circ@temp % if it is an open
10339 \else
10340 \ifpgf@circuit@bipole@strokedsymbol%draw line thrue symbol(e.g. diodes)
10341 \ifcsname pgf@anchor@#1shape@strokepathstart\endcsname%if special path-anchors are defined, use them!
10342 (\ctikzvalof{bipole/name}start.center) -- (\ctikzvalof{bipole/name}.strokepathstart)
10343 (\ctikzvalof{bipole/name}.strokepathend) -- (\ctikzvalof{bipole/name}end.center)
10344 \else
10345 (\ctikzvalof{bipole/name}start.center) -- (\ctikzvalof{bipole/name}end.center)
10346 \fi
10347 \else
10348 (\ctikzvalof{bipole/name}start.center) -- (anchorstartnode)
10349 (anchorendnode) -- (\ctikzvalof{bipole/name}end.center)
10350 \fi
10351 \fi
10352
10353 \drawpoles
10354 \pgf@circ@ifkeyempty{bipole/label/name}\else\pgf@circ@drawlabels{label}\fi
10355 \pgf@circ@ifkeyempty{bipole/annotation/name}\else\pgf@circ@drawlabels{annotation}\fi
10356 \pgf@circ@ifkeyempty{bipole/voltage/label/name}\else\pgf@circ@drawvoltage\fi
10357 \pgf@circ@ifkeyempty{bipole/current/label/name}\else\pgf@circ@drawcurrent\fi
10358 \pgf@circ@ifkeyempty{bipole/flow/label/name}\else\pgf@circ@drawflow\fi
10359 \pgfextra{\def\pgf@temp{open}\def\pgf@circ@temp{#1}}
10360 \ifx\pgf@temp\pgf@circ@temp % if it is an open
10361 (\ctikzvalof{bipole/name}end)%Move to end of path
10362 \else
10363 ($(\ctikzvalof{bipole/name}end) ! .5\pgflinewidth ! (\ctikzvalof{bipole/name}start)$) -- (\ctikzvalof{bipole/name}end)%ugly workaround to get correct linejoins(node breaks path?)
10364 %tikztostart and tikztotarget could not be used, because it would break if target coordinate is something like (node1-|node2)
10365
10366 \fi
10367 % reset
10368 \pgfextra{
10369 \pgfcircresetpath
10370 }
10371 \tikztonodes%draw pending nodes an path
10372 }
10373
10374
10375 %% Path definitions
10376 \def\pgf@circ@resistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{generic}{#1}\else\pgf@circ@bipole@path{resistor}{#1}\fi}
10377 \def\pgf@circ@vresistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{tgeneric}{#1}\else\pgf@circ@bipole@path{vresistor}{#1}\fi}
10378 \def\pgf@circ@potentiometer@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{genericpotentiometer}{#1}\else\pgf@circ@bipole@path{potentiometer}{#1}\fi}
10379 \def\pgf@circ@thermistor@path#1{\pgf@circ@bipole@path{thermistor}{#1}}
10380 \def\pgf@circ@thermistorptc@path#1{\pgf@circ@bipole@path{thermistorptc}{#1}}
10381 \def\pgf@circ@thermistorntc@path#1{\pgf@circ@bipole@path{thermistorntc}{#1}}
10382 \def\pgf@circ@varistor@path#1{\pgf@circ@bipole@path{varistor}{#1}}
10383 \def\pgf@circ@capacitor@path#1{\pgf@circ@bipole@path{capacitor}{#1}}
10384 \def\pgf@circ@ecapacitor@path#1{\pgf@circ@bipole@path{ecapacitor}{#1}}
10385 \def\pgf@circ@polarcapacitor@path#1{\pgf@circ@bipole@path{polarcapacitor}{#1}}
10386 \def\pgf@circ@vcapacitor@path#1{\pgf@circ@bipole@path{vcapacitor}{#1}}
10387 \def\pgf@circ@piezoelectric@path#1{\pgf@circ@bipole@path{piezoelectric}{#1}}
10388 \def\pgf@circ@battery@path#1{\pgf@circ@bipole@path{battery}{#1}}
10389 \def\pgf@circ@batteryone@path#1{\pgf@circ@bipole@path{battery1}{#1}}
10390 \def\pgf@circ@batterytwo@path#1{\pgf@circ@bipole@path{battery2}{#1}}
10391 \def\pgf@circ@europeaninductor@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}}
10392 \def\pgf@circ@americaninductor@path#1{\pgf@circ@bipole@path{americaninductor}{#1}}
10393 \def\pgf@circ@cuteinductor@path#1{\pgf@circ@bipole@path{cuteinductor}{#1}}
10394 \def\pgf@circ@inductor@path#1{%
10395 \pgfextra{
10396 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
10397 \def\pgf@temp{european}%
10398 }
10399 \ifx\pgf@temp\pgf@circ@temp%
10400 \pgf@circ@europeaninductor@path{#1}%
10401 \else%
10402 \pgfextra{ \def\pgf@temp{cute} }%
10403 \ifx\pgf@temp\pgf@circ@temp%
10404 \pgf@circ@cuteinductor@path{#1}%
10405 \else%
10406 \pgf@circ@americaninductor@path{#1}%
10407 \fi%
10408 \fi%
10409 }
10410 \def\pgf@circ@vinductor@path#1{
10411 \pgfextra{
10412 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
10413 \def\pgf@temp{european}%
10414 }
10415 \ifx\pgf@temp\pgf@circ@temp%
10416 \pgf@circ@veuropeaninductor@path{#1}%
10417 \else%
10418 \pgfextra{ \def\pgf@temp{cute} }%
10419 \ifx\pgf@temp\pgf@circ@temp%
10420 \pgf@circ@vcuteinductor@path{#1}%
10421 \else%
10422 \pgf@circ@vamericaninductor@path{#1}%
10423 \fi%
10424 \fi%
10425 }
10426 \def\pgf@circ@veuropeaninductor@path#1{\pgf@circ@bipole@path{tfullgeneric}{#1}}
10427 \def\pgf@circ@vamericaninductor@path#1{\pgf@circ@bipole@path{vamericaninductor}{#1}}
10428 \def\pgf@circ@vcuteinductor@path#1{\pgf@circ@bipole@path{vcuteinductor}{#1}}
10429 \def\pgf@circ@lamp@path#1{\pgf@circ@bipole@path{lamp}{#1}}
10430 \def\pgf@circ@esource@path#1{\pgf@circ@bipole@path{esource}{#1}}
10431 \def\pgf@circ@pvsource@path#1{\pgf@circ@bipole@path{pvsource}{#1}}
10432 \def\pgf@circ@vsource@path#1{\pgf@circ@bipole@path{vsource}{#1}}
10433 \def\pgf@circ@dcvsource@path#1{\pgf@circ@bipole@path{dcvsource}{#1}}
10434 \def\pgf@circ@vsourceam@path#1{\pgf@circ@bipole@path{vsourceAM}{#1}}
10435 \def\pgf@circ@vsourcesin@path#1{\pgf@circ@bipole@path{vsourcesin}{#1}}
10436 \def\pgf@circ@isource@path#1{\pgf@circ@bipole@path{isource}{#1}}
10437 \def\pgf@circ@oosource@path#1{\pgf@circ@bipole@path{oosource}{#1}}
10438 \def\pgf@circ@dcisource@path#1{\pgf@circ@bipole@path{dcisource}{#1}}
10439 \def\pgf@circ@isourcesin@path#1{\pgf@circ@bipole@path{isourcesin}{#1}}
10440 \def\pgf@circ@vsourcesquare@path#1{\pgf@circ@bipole@path{vsourcesquare}{#1}}
10441 \def\pgf@circ@vsourcetri@path#1{\pgf@circ@bipole@path{vsourcetri}{#1}}
10442 \def\pgf@circ@isourceam@path#1{\pgf@circ@bipole@path{isourceAM}{#1}}
10443 \def\pgf@circ@cvsource@path#1{\pgf@circ@bipole@path{cvsource}{#1}}
10444 \def\pgf@circ@cvsourceam@path#1{\pgf@circ@bipole@path{cvsourceAM}{#1}}
10445 \def\pgf@circ@cvsourcesin@path#1{\pgf@circ@bipole@path{cvsourcesin}{#1}}
10446 \def\pgf@circ@cisource@path#1{\pgf@circ@bipole@path{cisource}{#1}}
10447 \def\pgf@circ@cisourceam@path#1{\pgf@circ@bipole@path{cisourceAM}{#1}}
10448 \def\pgf@circ@cisourcesin@path#1{\pgf@circ@bipole@path{cisourcesin}{#1}}
10449 \def\pgf@circ@short@path#1{\pgf@circ@bipole@path{short}{#1}}
10450 \def\pgf@circ@cspst@path#1{\pgf@circ@bipole@path{cspst}{#1}}
10451 \def\pgf@circ@ospst@path#1{\pgf@circ@bipole@path{ospst}{#1}}
10452 \def\pgf@circ@nos@path#1{\pgf@circ@bipole@path{nos}{#1}}
10453 \def\pgf@circ@ncs@path#1{\pgf@circ@bipole@path{ncs}{#1}}
10454 \def\pgf@circ@pushbutton@path#1{\pgf@circ@bipole@path{pushbutton}{#1}}
10455 \def\pgf@circ@open@path#1{\pgf@circ@bipole@path{open}{#1}}
10456 \def\pgf@circ@generic@path#1{\pgf@circ@bipole@path{generic}{#1}}
10457 \def\pgf@circ@ageneric@path#1{\pgf@circ@bipole@path{ageneric}{#1}}
10458 \def\pgf@circ@tgeneric@path#1{\pgf@circ@bipole@path{tgeneric}{#1}}
10459 \def\pgf@circ@fullgeneric@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}}
10460 \def\pgf@circ@tfullgeneric@path#1{\pgf@circ@bipole@path{tfullgeneric}{#1}}
10461 \def\pgf@circ@ammeter@path#1{\pgf@circ@bipole@path{ammeter}{#1}}
10462 \def\pgf@circ@ohmmeter@path#1{\pgf@circ@bipole@path{ohmmeter}{#1}}
10463 \def\pgf@circ@voltmeter@path#1{\pgf@circ@bipole@path{voltmeter}{#1}}
10464 \def\pgf@circ@empty@path#1{}
10465 \def\pgf@circ@photoresistor@path#1{\pgf@circ@bipole@path{photoresistor}{#1}}
10466 \def\pgf@circ@emptythyristor@path#1{\pgf@circ@bipole@path{emptythyristor}{#1}}
10467 \def\pgf@circ@fullthyristor@path#1{\pgf@circ@bipole@path{fullthyristor}{#1}}
10468 \def\pgf@circ@toggleswitch@path#1{\pgf@circ@bipole@path{toggleswitch}{#1}}
10469 \def\pgf@circ@memristor@path#1{\pgf@circ@bipole@path{memristor}{#1}}
10470 \def\pgf@circ@emptytriac@path#1{\pgf@circ@bipole@path{emptytriac}{#1}}
10471 \def\pgf@circ@fulltriac@path#1{\pgf@circ@bipole@path{fulltriac}{#1}}
10472 \def\pgf@circ@tline@path#1{\pgf@circ@bipole@path{tline}{#1}}
10473 \def\pgf@circ@squid@path#1{\pgf@circ@bipole@path{squid}{#1}}
10474 \def\pgf@circ@barrier@path#1{\pgf@circ@bipole@path{barrier}{#1}}
10475 \def\pgf@circ@thermocouple@path#1{\pgf@circ@bipole@path{thermocouple}{#1}}
10476 \def\pgf@circ@fuse@path#1{\pgf@circ@bipole@path{fuse}{#1}}
10477 \def\pgf@circ@afuse@path#1{\pgf@circ@bipole@path{afuse}{#1}}
10478
10479 \def\pgf@circ@gfsurgearrester@path#1{\ifpgf@circuit@europeangfsurgearrester\pgf@circ@europeangfsurgearrester@path{#1}\else\pgf@circ@americangfsurgearrester@path{#1}\fi}
10480 \def\pgf@circ@europeangfsurgearrester@path#1{\pgf@circ@bipole@path{european gas filled surge arrester}{#1}}
10481 \def\pgf@circ@americangfsurgearrester@path#1{\pgf@circ@bipole@path{american gas filled surge arrester}{#1}}
10482
10483 \def\pgf@circ@twoport@path#1{\pgf@circ@bipole@path{twoport}{#1}}
10484 \def\pgf@circ@vco@path#1{\pgf@circ@bipole@path{vco}{#1}}
10485 \def\pgf@circ@bandpass@path#1{\pgf@circ@bipole@path{bandpass}{#1}}
10486 \def\pgf@circ@bandstop@path#1{\pgf@circ@bipole@path{bandstop}{#1}}
10487 \def\pgf@circ@highpass@path#1{\pgf@circ@bipole@path{highpass}{#1}}
10488 \def\pgf@circ@lowpass@path#1{\pgf@circ@bipole@path{lowpass}{#1}}
10489 \def\pgf@circ@adc@path#1{\pgf@circ@bipole@path{adc}{#1}}
10490 \def\pgf@circ@dac@path#1{\pgf@circ@bipole@path{dac}{#1}}
10491 \def\pgf@circ@dsp@path#1{\pgf@circ@bipole@path{dsp}{#1}}
10492 \def\pgf@circ@fft@path#1{\pgf@circ@bipole@path{fft}{#1}}
10493 \def\pgf@circ@amp@path#1{\pgf@circ@bipole@path{amp}{#1}}
10494 \def\pgf@circ@vamp@path#1{\pgf@circ@bipole@path{vamp}{#1}}
10495 \def\pgf@circ@piattenuator@path#1{\pgf@circ@bipole@path{piattenuator}{#1}}
10496 \def\pgf@circ@vpiattenuator@path#1{\pgf@circ@bipole@path{vpiattenuator}{#1}}
10497 \def\pgf@circ@tattenuator@path#1{\pgf@circ@bipole@path{tattenuator}{#1}}
10498 \def\pgf@circ@vtattenuator@path#1{\pgf@circ@bipole@path{vtattenuator}{#1}}
10499 \def\pgf@circ@phaseshifter@path#1{\pgf@circ@bipole@path{phaseshifter}{#1}}
10500 \def\pgf@circ@vphaseshifter@path#1{\pgf@circ@bipole@path{vphaseshifter}{#1}}
10501 \def\pgf@circ@detector@path#1{\pgf@circ@bipole@path{detector}{#1}}
10502
10503 %%Mechanical
10504 \def\pgf@circ@spring@path#1{\pgf@circ@bipole@path{spring}{#1}}
10505 \def\pgf@circ@mass@path#1{\pgf@circ@bipole@path{mass}{#1}}
10506 \def\pgf@circ@damper@path#1{\pgf@circ@bipole@path{damper}{#1}}
10507
10508
10509
10510
10511 %% Styles
10512
10513 \def\comnpatname{\ifpgf@circuit@compat *\else\fi}
10514 \def\compattikzset#1{\tikzset{\comnpatname#1}}
10515
10516 %\def\ctikzsetbipole#1#2{%
10517 % \tikzset{#1/.style= {to path=#2, \circuitikzbasekey, l=##1}}%
10518 %}
10519
10520 \compattikzset{spring/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@spring@path, l=#1}}
10521 \compattikzset{mass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@mass@path, l=#1}}
10522 \compattikzset{damper/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@damper@path, l=#1}}
10523 \compattikzset{resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@resistor@path, l=#1}}
10524 \compattikzset{american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{resistor}{#1}, l=#1}}
10525 \compattikzset{european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{generic}{#1}, l=#1}}
10526 \compattikzset{potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@potentiometer@path, l=#1}}
10527 \compattikzset{varistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@varistor@path, l=#1}}
10528 \compattikzset{photoresistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@photoresistor@path, l=#1}}
10529 \compattikzset{thermistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistor@path, l=#1}}
10530 \compattikzset{thermistor ptc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorptc@path, l=#1}}
10531 \compattikzset{thermistor ntc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorntc@path, l=#1}}
10532 \compattikzset{american potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{potentiometer}{#1}, l=#1}}
10533 \compattikzset{european potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{genericpotentiometer}{#1}, l=#1}}
10534 \compattikzset{variable resistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vresistor@path, l=#1}}
10535 \compattikzset{variable american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{vresistor}{#1}, l=#1}}
10536 \compattikzset{variable european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{tgeneric}{#1}, l=#1}}
10537 \compattikzset{capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@capacitor@path, l=#1}}
10538 \compattikzset{elko/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ecapacitor@path, l=#1}}
10539 \compattikzset{ecapacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ecapacitor@path, l=#1}}
10540 \compattikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@polarcapacitor@path, l=#1}}
10541 \compattikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcapacitor@path, l=#1}}
10542 \compattikzset{piezoelectric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@piezoelectric@path, l=#1}}
10543 \compattikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10544 \compattikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@batteryone@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10545 \compattikzset{battery2/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@batterytwo@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10546 \compattikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@inductor@path, l=#1}}
10547 \compattikzset{gf surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@gfsurgearrester@path, l=#1}}
10548 \compattikzset{american gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americangfsurgearrester@path, l=#1}}
10549 \compattikzset{european gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@europeangfsurgearrester@path, l=#1}}
10550 \compattikzset{gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@gfsurgearrester@path, l=#1}}
10551 \compattikzset{american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americaninductor@path, l=#1}}
10552 \compattikzset{cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cuteinductor@path, l=#1}}
10553 \compattikzset{european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@europeaninductor@path, l=#1}}
10554 \compattikzset{variable inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vinductor@path, l=#1}}
10555 \compattikzset{variable european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@veuropeaninductor@path, l=#1}}
10556 \compattikzset{variable american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vamericaninductor@path, l=#1}}
10557 \compattikzset{variable cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcuteinductor@path, l=#1}}
10558 \compattikzset{tline/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tline@path, l=#1}}
10559 \compattikzset{transmission line/.style = {tline = #1}}
10560 \compattikzset{TL/.style = {tline = #1}}
10561 \compattikzset{european voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsource@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10562 \compattikzset{american voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
10563 \compattikzset{european current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10564 \compattikzset{american current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10565 \compattikzset{european controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsource@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10566 \compattikzset{american controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
10567 \compattikzset{european controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10568 \compattikzset{american controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10569 \compattikzset{sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcesin@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
10570 \compattikzset{square voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcesquare@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
10571 \compattikzset{triangle voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcetri@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
10572 \compattikzset{sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10573 \compattikzset{controlled sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourcesin@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10574 \compattikzset{controlled sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10575
10576 \compattikzset{voltage source/.style = {\comnpatname \ifpgf@circuit@europeanvoltage european \else american \fi voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
10577 \compattikzset{current source/.style = {\comnpatname \ifpgf@circuit@europeancurrent european \else american \fi current source = #1, \circuitikzbasekey/bipole/is current=true}}
10578 \compattikzset{controlled voltage source/.style = {\comnpatname \ifpgf@circuit@europeanvoltage european \else american \fi controlled voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
10579 \compattikzset{controlled current source/.style = {\comnpatname \ifpgf@circuit@europeancurrent european \else american \fi controlled current source = #1, \circuitikzbasekey/bipole/is current=true}}
10580
10581
10582 \compattikzset{generic/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@generic@path, l=#1}}
10583 \compattikzset{ageneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ageneric@path, l=#1}}
10584 \compattikzset{tgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tgeneric@path, l=#1}}
10585 \compattikzset{fullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullgeneric@path, l=#1}}
10586 \compattikzset{tfullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tfullgeneric@path, l=#1}}
10587 \compattikzset{short/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@short@path}}
10588 \compattikzset{open/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@open@path}}
10589
10590 \compattikzset{lamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lamp@path}}
10591
10592 \compattikzset{squid/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@squid@path}}
10593 \compattikzset{barrier/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@barrier@path}}
10594 \compattikzset{thermocouple/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermocouple@path}}
10595 \compattikzset{fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fuse@path}}
10596 \compattikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@afuse@path}}
10597
10598 \compattikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@twoport@path}}
10599 \compattikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vco@path}}
10600 \compattikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandpass@path}}
10601 \compattikzset{bandstop/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandstop@path}}
10602 \compattikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@highpass@path}}
10603 \compattikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lowpass@path}}
10604 \compattikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@adc@path}}
10605 \compattikzset{dac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dac@path}}
10606 \compattikzset{dsp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dsp@path}}
10607 \compattikzset{fft/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fft@path}}
10608 \compattikzset{amp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@amp@path}}
10609 \compattikzset{vamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vamp@path}}
10610 \compattikzset{piattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@piattenuator@path}}
10611 \compattikzset{vpiattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vpiattenuator@path}}
10612 \compattikzset{tattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tattenuator@path}}
10613 \compattikzset{vtattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vtattenuator@path}}
10614 \compattikzset{phaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@phaseshifter@path}}
10615 \compattikzset{vphaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vphaseshifter@path}}
10616 \compattikzset{detector/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@detector@path}}
10617
10618 % % % % % %
10619 % % Beginn of Diodes
10620 % % % % % %
10621
10622 \def\pgf@circ@fulldiode@path#1{\pgf@circ@bipole@path{fulldiode}{#1}}
10623 \def\pgf@circ@fullzdiode@path#1{\pgf@circ@bipole@path{fullzdiode}{#1}}
10624 \def\pgf@circ@fullzzdiode@path#1{\pgf@circ@bipole@path{fullzzdiode}{#1}}
10625 \def\pgf@circ@fullsdiode@path#1{\pgf@circ@bipole@path{fullsdiode}{#1}}
10626 \def\pgf@circ@fulltdiode@path#1{\pgf@circ@bipole@path{fulltdiode}{#1}}
10627 \def\pgf@circ@fulllediode@path#1{\pgf@circ@bipole@path{fulllediode}{#1}}
10628 \def\pgf@circ@fullpdiode@path#1{\pgf@circ@bipole@path{fullpdiode}{#1}}
10629 \def\pgf@circ@fullvarcap@path#1{\pgf@circ@bipole@path{fullvarcap}{#1}}
10630 \def\pgf@circ@emptydiode@path#1{\pgf@circ@bipole@path{emptydiode}{#1}}
10631 \def\pgf@circ@emptyzdiode@path#1{\pgf@circ@bipole@path{emptyzdiode}{#1}}
10632 \def\pgf@circ@emptyzzdiode@path#1{\pgf@circ@bipole@path{emptyzzdiode}{#1}}
10633 \def\pgf@circ@emptysdiode@path#1{\pgf@circ@bipole@path{emptysdiode}{#1}}
10634 \def\pgf@circ@emptytdiode@path#1{\pgf@circ@bipole@path{emptytdiode}{#1}}
10635 \def\pgf@circ@emptylediode@path#1{\pgf@circ@bipole@path{emptylediode}{#1}}
10636 \def\pgf@circ@emptypdiode@path#1{\pgf@circ@bipole@path{emptypdiode}{#1}}
10637 \def\pgf@circ@emptyvarcap@path#1{\pgf@circ@bipole@path{emptyvarcap}{#1}}
10638
10639 \compattikzset{full diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulldiode@path}}
10640 \compattikzset{full Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullsdiode@path}}
10641 \compattikzset{full Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullzdiode@path}}
10642 \compattikzset{full ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullzzdiode@path}}
10643 \compattikzset{full tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulltdiode@path}}
10644 \compattikzset{full photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullpdiode@path}}
10645 \compattikzset{full led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulllediode@path}}
10646 \compattikzset{full varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullvarcap@path}}
10647 \compattikzset{full thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullthyristor@path}}
10648 \compattikzset{full triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulltriac@path}}
10649
10650 \compattikzset{empty diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptydiode@path}}
10651 \compattikzset{empty Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptysdiode@path}}
10652 \compattikzset{empty Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyzdiode@path}}
10653 \compattikzset{empty ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyzzdiode@path}}
10654 \compattikzset{empty tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptytdiode@path}}
10655 \compattikzset{empty photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptypdiode@path}}
10656 \compattikzset{empty led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptylediode@path}}
10657 \compattikzset{empty varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyvarcap@path}}
10658 \compattikzset{empty thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptythyristor@path}}
10659 \compattikzset{empty triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptytriac@path}}
10660
10661 \compattikzset{stroke diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptydiode@path}}
10662 \compattikzset{stroke Schottky diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptysdiode@path}}
10663 \compattikzset{stroke Zener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyzdiode@path}}
10664 \compattikzset{stroke ZZener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyzzdiode@path}}
10665 \compattikzset{stroke tunnel diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptytdiode@path}}
10666 \compattikzset{stroke photodiode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptypdiode@path}}
10667 \compattikzset{stroke led/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptylediode@path}}
10668 \compattikzset{stroke varcap/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyvarcap@path}}
10669 \compattikzset{stroke thyristor/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptythyristor@path}}
10670 %\compattikzset{stroke triac/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptytriac@path}}
10671
10672 \def\pgfcircdiodestylemacro{\ifpgf@circuit@strokediode stroke \else\ifpgf@circuit@fulldiode full \else empty \fi\fi}
10673
10674 \compattikzset{Schottky diode/.style = {\comnpatname \pgfcircdiodestylemacro Schottky diode}}
10675 \compattikzset{Zener diode/.style = {\comnpatname \pgfcircdiodestylemacro Zener diode}}
10676 \compattikzset{ZZener diode/.style = {\comnpatname \pgfcircdiodestylemacro ZZener diode}}
10677 \compattikzset{tunnel diode/.style = {\comnpatname \pgfcircdiodestylemacro tunnel diode}}
10678 \compattikzset{photodiode/.style = {\comnpatname \pgfcircdiodestylemacro photodiode}}
10679 \compattikzset{led/.style = {\comnpatname \pgfcircdiodestylemacro led}}
10680 \compattikzset{varcap/.style = {\comnpatname \pgfcircdiodestylemacro varcap}}
10681 \compattikzset{diode/.style = {\comnpatname \pgfcircdiodestylemacro diode}}
10682 \compattikzset{thyristor/.style = {\comnpatname \pgfcircdiodestylemacro thyristor}}
10683 \compattikzset{triac/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi triac}}%no stroke triac!
10684
10685 %% Define Shortcuts
10686 \compattikzset{Do/.style = {\comnpatname empty diode}}
10687 \compattikzset{tDo/.style = {\comnpatname empty tunnel diode}}
10688 \compattikzset{zDo/.style = {\comnpatname empty Zener diode}}
10689 \compattikzset{zzDo/.style = {\comnpatname empty ZZener diode}}
10690 \compattikzset{sDo/.style = {\comnpatname empty Schottky diode}}
10691 \compattikzset{pDo/.style = {\comnpatname empty photodiode}}
10692 \compattikzset{leDo/.style = {\comnpatname empty led}}
10693 \compattikzset{VCo/.style = {\comnpatname empty varcap}}
10694 \compattikzset{Tyo/.style = {\comnpatname empty thyristor}}
10695 \compattikzset{Tro/.style = {\comnpatname empty triac}}
10696
10697 \compattikzset{D*/.style = {\comnpatname full diode}}
10698 \compattikzset{tD*/.style = {\comnpatname full tunnel diode}}
10699 \compattikzset{zD*/.style = {\comnpatname full Zener diode}}
10700 \compattikzset{zzD*/.style = {\comnpatname full ZZener diode}}
10701 \compattikzset{sD*/.style = {\comnpatname full Schottky diode}}
10702 \compattikzset{pD*/.style = {\comnpatname full photodiode}}
10703 \compattikzset{leD*/.style = {\comnpatname full led}}
10704 \compattikzset{VC*/.style = {\comnpatname full varcap}}
10705 \compattikzset{Ty*/.style = {\comnpatname full thyristor}}
10706 \compattikzset{Tr*/.style = {\comnpatname full triac}}
10707
10708 \compattikzset{D/.style = {\comnpatname diode}}
10709 \compattikzset{tD/.style = {\comnpatname tunnel diode}}
10710 \compattikzset{zD/.style = {\comnpatname Zener diode}}
10711 \compattikzset{zzD/.style = {\comnpatname ZZener diode}}
10712 \compattikzset{sD/.style = {\comnpatname Schottky diode}}
10713 \compattikzset{pD/.style = {\comnpatname photodiode}}
10714 \compattikzset{leD/.style = {\comnpatname led}}
10715 \compattikzset{VC/.style = {\comnpatname varcap}}
10716 \compattikzset{Ty/.style = {\comnpatname thyristor}}
10717 \compattikzset{Tr/.style = {\comnpatname triac}}
10718
10719 \compattikzset{D-/.style = {\comnpatname stroke diode}}
10720 \compattikzset{tD-/.style = {\comnpatname stroke tunnel diode}}
10721 \compattikzset{zD-/.style = {\comnpatname stroke Zener diode}}
10722 \compattikzset{zzD-/.style = {\comnpatname stroke ZZener diode}}
10723 \compattikzset{sD-/.style = {\comnpatname stroke Schottky diode}}
10724 \compattikzset{pD-/.style = {\comnpatname stroke photodiode}}
10725 \compattikzset{leD-/.style = {\comnpatname stroke led}}
10726 \compattikzset{VC-/.style = {\comnpatname stroke varcap}}
10727 \compattikzset{Ty-/.style = {\comnpatname stroke thyristor}}
10728 \compattikzset{Tr-/.style = {\comnpatname empty triac}}%no stroke triac!
10729
10730 % % % % % %
10731 % % End of Diodes
10732 % % % % % %
10733
10734
10735 \compattikzset{memristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@memristor@path}}
10736 \compattikzset{closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cspst@path, l=#1}}
10737 \compattikzset{opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ospst@path, l=#1}}
10738 \compattikzset{ncs/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ncs@path, l=#1}}
10739 \compattikzset{nos/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@nos@path, l=#1}}
10740 \compattikzset{normal closed switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ncs@path, l=#1}}
10741 \compattikzset{normal open switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@nos@path, l=#1}}
10742 \compattikzset{switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cspst@path, l=#1}}
10743 \compattikzset{push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pushbutton@path, l=#1}}
10744 \compattikzset{toggle switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@toggleswitch@path}}
10745
10746 \compattikzset{ammeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ammeter@path}}
10747 \compattikzset{voltmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@voltmeter@path}}
10748 \compattikzset{ohmmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ohmmeter@path}}
10749
10750 % short forms
10751 \compattikzset{esource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@esource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10752 \compattikzset{pvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pvsource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10753 \compattikzset{dcvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dcvsource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10754 \compattikzset{dcisource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dcisource@path, \circuitikzbasekey/bipole/is current=true, l=#1}}
10755
10756 \compattikzset{ioosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is current=true,/tikz/to path=\pgf@circ@oosource@path, i=#1}}
10757 \compattikzset{voosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is voltage=true,/tikz/to path=\pgf@circ@oosource@path, v=#1}}
10758
10759 \compattikzset{vsource/.style = {\comnpatname voltage source = #1}}
10760 \compattikzset{isource/.style = {\comnpatname current source = #1}}
10761 \compattikzset{cisource/.style = {\comnpatname controlled current source = #1}}
10762 \compattikzset{cvsource/.style = {\comnpatname controlled voltage source = #1}}
10763 \compattikzset{vsourcesin/.style = {\comnpatname sinusoidal voltage source = #1}}
10764 \compattikzset{vsourcesquare/.style = {\comnpatname square voltage source = #1}}
10765 \compattikzset{vsourcetri/.style = {triangle voltage source = #1}}
10766 \compattikzset{isourcesin/.style = {\comnpatname sinusoidal current source = #1}}
10767 \compattikzset{cisourcesin/.style = {\comnpatname controlled sinusoidal current source = #1}}
10768 \compattikzset{cvsourcesin/.style = {\comnpatname controlled sinusoidal voltage source = #1}}
10769
10770 \compattikzset{controlled vsource/.style = {\comnpatname controlled voltage source = #1}}
10771 \compattikzset{controlled isource/.style = {\comnpatname controlled current source = #1}}
10772 \compattikzset{controlled vsourcesin/.style = {\comnpatname controlled sinusoidal voltage source = #1}}
10773 \compattikzset{controlled isourcesin/.style = {\comnpatname controlled sinusoidal current source = #1}}
10774
10775 \compattikzset{R/.style= {\comnpatname resistor = #1}}
10776 %\ifpgf@circuit@compat\else\compattikzset{R/.style= {resistor = #1}}\fi
10777 \compattikzset{vR/.style= {\comnpatname variable resistor = #1}}
10778 \compattikzset{phR/.style= {\comnpatname photoresistor = #1}}
10779 \compattikzset{thR/.style= {\comnpatname thermistor = #1}}
10780 \compattikzset{thRp/.style= {\comnpatname thermistor ptc= #1}}
10781 \compattikzset{thRn/.style= {\comnpatname thermistor ntc= #1}}
10782 \compattikzset{pR/.style= {\comnpatname potentiometer = #1}}
10783 \compattikzset{C/.style = {\comnpatname capacitor = #1}}
10784 \compattikzset{eC/.style = {\comnpatname ecapacitor = #1}}
10785 \compattikzset{pC/.style = {\comnpatname polar capacitor = #1}}
10786 \compattikzset{vC/.style = {\comnpatname variable capacitor = #1}}
10787 \compattikzset{PZ/.style = {\comnpatname piezoelectric = #1}}
10788 \compattikzset{L/.style = {\comnpatname inductor = #1}}
10789 \compattikzset{vL/.style = {\comnpatname variable inductor = #1}}
10790 \compattikzset{V/.style = {\comnpatname voltage source = #1}}
10791 \compattikzset{cV/.style = {\comnpatname controlled voltage source = #1}}
10792 \compattikzset{sV/.style = {\comnpatname sinusoidal voltage source = #1}}
10793 \compattikzset{sqV/.style = {\comnpatname square voltage source = #1}}
10794 \compattikzset{tV/.style = {\comnpatname triangle voltage source = #1}}
10795 \compattikzset{csV/.style = {\comnpatname controlled sinusoidal voltage source = #1}}
10796 \def\pgf@temp#1{
10797 \compattikzset{V#1/.style = {\comnpatname voltage source, v#1=##1} }
10798 \compattikzset{cV#1/.style = {\comnpatname controlled voltage source, v#1=##1} }
10799 \compattikzset{sV#1/.style = {\comnpatname sinusoidal voltage source, v#1=##1} }
10800 \compattikzset{csV#1/.style = {\comnpatname controlled sinusoidal voltage source, v#1=##1} }
10801 }
10802 \pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<}
10803 \pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_}
10804
10805 %current sources
10806 \compattikzset{I/.style = {\comnpatname current source = #1}}
10807 \compattikzset{cI/.style = {\comnpatname controlled current source = #1}}
10808 \compattikzset{sI/.style = {\comnpatname sinusoidal current source = #1}}
10809 \compattikzset{csI/.style = {\comnpatname controlled sinusoidal current source = #1}}
10810 \def\pgf@temp#1{
10811 \compattikzset{I#1/.style = {\comnpatname current source, i#1=##1} }
10812 \compattikzset{cI#1/.style = {\comnpatname controlled current source, i#1=##1} }
10813 \compattikzset{sI#1/.style = {\comnpatname sinusoidal current source, i#1=##1} }
10814 \compattikzset{csI#1/.style = {\comnpatname controlled sinusoidal current source, i#1=##1} }
10815 }
10816 \pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<}
10817 \pgf@temp{>_} \pgf@temp{<_} \pgf@temp{>^} \pgf@temp{<^}
10818 \pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_}
10819
10820
10821
10822 \compattikzset{Mr/.style = {\comnpatname memristor}}
10823
10824 \compattikzset{cspst/.style = {\comnpatname closing switch = #1}}
10825 \compattikzset{ospst/.style = {\comnpatname opening switch = #1}}
10826 \compattikzset{spst/.style = {\comnpatname switch = #1}}
10827
10828 \compattikzset{afuse/.style = {\comnpatname asymmetric fuse=#1}}
10829
10830 \compattikzset{vdd/.style = {\comnpatname vcc = #1}}
10831 \compattikzset{vss/.style = {\comnpatname vee = #1}}
10832
10833 \def\inheritlogicport#1#2{
10834 \pgfdeclareshape{#2 port}{
10835 \inheritsavedanchors[from=#1 #2 port]
10836 \inheritbackgroundpath[from=#1 #2 port]
10837 \inheritanchor[from=#1 #2 port]{in}
10838 \inheritanchor[from=#1 #2 port]{in 1}
10839 \inheritanchor[from=#1 #2 port]{in 2}
10840 \inheritanchor[from=#1 #2 port]{out}
10841 \inheritanchor[from=#1 #2 port]{center}
10842 \inheritanchor[from=#1 #2 port]{left}
10843 }
10844 }
10845
10846 \ifpgf@circuit@europeanlogicport
10847 \inheritlogicport{european}{and}
10848 \inheritlogicport{european}{or}
10849 \inheritlogicport{european}{xor}
10850 \inheritlogicport{european}{not}
10851 \inheritlogicport{european}{nand}
10852 \inheritlogicport{european}{nor}
10853 \inheritlogicport{european}{xnor}
10854 \else
10855 \inheritlogicport{american}{and}
10856 \inheritlogicport{american}{or}
10857 \inheritlogicport{american}{xor}
10858 \inheritlogicport{american}{not}
10859 \inheritlogicport{american}{nand}
10860 \inheritlogicport{american}{nor}
10861 \inheritlogicport{american}{xnor}
10862 \fi
10863
10864 % Transistor like bipoles
10865
10866 \def\pgf@circ@trans@path#1#2{
10867 \pgfextra{
10868 \edef\pgf@temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
10869 \def\pgf@circ@temp{#2}
10870 \ifx\pgf@temp\pgf@circ@temp % if it has not a name
10871 \pgfmathrandominteger{\pgf@circ@rand}{1000}{9999}
10872 \ctikzset{bipole/name = trans\pgf@circ@rand} % create it
10873 \fi
10874 }
10875 \ifpgf@circuit@bipole@inverted
10876 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
10877 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {}
10878 \else
10879 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
10880 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {}
10881 \fi
10882 \pgfextra{
10883 \pgfmathanglebetweenpoints{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
10884 {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
10885 \pgfmathadd{\pgfmathresult}{-90}
10886 \edef\pgf@circ@direction{\pgfmathresult}
10887 }
10888 ($(\tikztostart) ! .5 ! (\tikztotarget)$)
10889 node[#1, /tikz/rotate=\pgf@circ@direction, xscale=\ctikzvalof{mirror value}]
10890 (\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}}
10891 \ifcsname pgf@anchor@#1@pathstart\endcsname%if special path-anchors are defined, use them!
10892 (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.pathstart)
10893 (\ctikzvalof{bipole/name}.pathend) -- (\ctikzvalof{bipole/name}end.center)
10894 \else
10895 (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.left)
10896 (\ctikzvalof{bipole/name}.right) -- (\ctikzvalof{bipole/name}end.center)
10897 \fi
10898 \pgfextra{
10899 \pgfcircresetpath
10900 }
10901 (\tikztotarget) \tikztonodes % e si continua
10902 }
10903
10904
10905 \def\pgf@circ@definetranspath#1{
10906 \compattikzset{T#1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@trans@path{#1}{}, l=##1}}
10907 }
10908
10909 \pgf@circ@definetranspath{elmech}
10910 \pgf@circ@definetranspath{nmos}
10911 \pgf@circ@definetranspath{pmos}
10912 \pgf@circ@definetranspath{npn}
10913 \pgf@circ@definetranspath{pnp}
10914 \pgf@circ@definetranspath{nfet}
10915 \pgf@circ@definetranspath{nigfete}
10916 \pgf@circ@definetranspath{nigfetd}
10917 \pgf@circ@definetranspath{nigfetebulk}
10918 \pgf@circ@definetranspath{pfet}
10919 \pgf@circ@definetranspath{pigfete}
10920 \pgf@circ@definetranspath{pigfetd}
10921 \pgf@circ@definetranspath{pigfetebulk}
10922 \pgf@circ@definetranspath{njfet}
10923 \pgf@circ@definetranspath{pjfet}
10924 \pgf@circ@definetranspath{pigbt}
10925 \pgf@circ@definetranspath{nigbt}
10926 \pgf@circ@definetranspath{Lpigbt}
10927 \pgf@circ@definetranspath{Lnigbt}
10928 %%%---------- close: tex/pgfcircpath
10929
10930 \catcode`\@=\tikzatcode
10931 \catcode`\|=\tikzbarcode
10932 \catcode`\!=\tikzexclaimcode
10933
10934 % define the environment
10935 \long\def\startcircuitikz#1\stopcircuitikz{\starttikzpicture#1\stoptikzpicture}
10936
10937 \protect
10938
10939 \stopmodule
10940
10941 \endinput