Debian Codegraph @

texmf-dist/tex/latex/circuitikz/circuitikz-0.7-body.tex

raw
1 % Copyright 2018-2026 by Romano Giannetti
2 % Copyright 2015-2026 by Stefan Lindner
3 % Copyright 2013-2026 by Stefan Erhardt
4 % Copyright 2007-2026 by Massimo Redaelli
5 %
6 % This file may be distributed and/or modified
7 %
8 % 1. under the LaTeX Project Public License and/or
9 % 2. under the GNU Public License.
10 %
11 % See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
12
13
14 %%%%%
15 %%%%%
16 %%%%%
17 %%%%% Se c'è l'opzione symbol, fallback to siunitx with warning
18 %%%%%
19 %%%%%
20
21 \NeedsTeXFormat{LaTeX2e}
22
23 \def\pgfcircversion{0.7}
24 \def\pgfcircversiondate{2016/09/08}
25
26 %% Version 2.0 of pgf/TikZ is required
27 \RequirePackage{tikz}
28 \usetikzlibrary{calc}
29 \usepgflibrary{arrows}
30
31
32 % The options are listed in the manual in this order
33
34 \DeclareOption{europeanvoltage}{
35 \ctikzset{voltage=european}
36 }
37
38 \DeclareOption{straightvoltages}{
39 \pgf@circuit@bipole@voltage@straighttrue
40 }
41
42 \DeclareOption{americanvoltage}{
43 \ctikzset{voltage=american}
44 }
45
46 \DeclareOption{europeancurrent}{
47 \ctikzset{current = european}
48 }
49
50 \DeclareOption{americancurrent}{
51 \ctikzset{current = american}
52 }
53
54
55
56 \DeclareOption{americanresistor}{
57 \ctikzset{resistor = american}
58 }
59
60 \DeclareOption{europeanresistor}{
61 \ctikzset{resistor = european}
62 }
63
64 \DeclareOption{americaninductor}{
65 \ctikzset{inductor = american}
66 }
67
68 \DeclareOption{europeaninductor}{
69 \ctikzset{inductor = european}
70 }
71
72 \DeclareOption{cuteinductor}{
73 \ctikzset{inductor = cute}
74 }
75
76 \DeclareOption{americanport}{
77 \ctikzset{logic ports = american}
78 }
79
80 \DeclareOption{europeanport}{
81 \ctikzset{logic ports = european}
82 }
83
84 \DeclareOption{europeanport}{
85 \ctikzset{logic ports = european}
86 }
87
88 \DeclareOption{european}{
89 \ctikzset{voltage=european} \ctikzset{current=european} \ctikzset{inductor=european}
90 \ctikzset{resistor=european} \ctikzset{logic ports=european} \ctikzset{gas filled surge arrester = european}
91 }
92
93 \DeclareOption{american}{
94 \ctikzset{voltage=american} \ctikzset{current=american} \ctikzset{resistor=american} \ctikzset{inductor=american} \ctikzset{gas filled surge arrester = american}
95 \ctikzset{logic ports = american}
96 }
97
98 \DeclareOption{fulldiodes}{
99 \ctikzset{diode = full}
100 }
101
102 \DeclareOption{emptydiodes}{
103 \ctikzset{diode = empty}
104 }
105
106 \DeclareOption{europeanvoltages}{
107 \ctikzset{voltage=european}
108 }
109
110 \DeclareOption{americanvoltages}{
111 \ctikzset{voltage=american}
112 }
113
114 \DeclareOption{europeancurrents}{
115 \ctikzset{current = european}
116 }
117
118 \DeclareOption{americancurrents}{
119 \ctikzset{current = american}
120 }
121
122 \DeclareOption{americanresistors}{
123 \ctikzset{resistor = american}
124 }
125
126 \DeclareOption{europeanresistors}{
127 \ctikzset{resistor = european}
128 }
129
130 \DeclareOption{americaninductors}{
131 \ctikzset{inductor = american}
132 }
133
134 \DeclareOption{europeaninductors}{
135 \ctikzset{inductor = european}
136 }
137
138 \DeclareOption{cuteinductors}{
139 \ctikzset{inductor = cute}
140 }
141
142 \DeclareOption{americanports}{
143 \ctikzset{logic ports = american}
144 }
145
146 \DeclareOption{europeanports}{
147 \ctikzset{logic ports = european}
148 }
149
150 \DeclareOption{americangfsurgearrester}{
151 \ctikzset{gas filled surge arrester = american}
152 }
153
154 \DeclareOption{europeangfsurgearrester}{
155 \ctikzset{gas filled surge arrester = european}
156 }
157
158 \DeclareOption{siunitx}{
159 \pgf@circ@siunitxtrue
160 }
161
162 \DeclareOption{nosiunitx}{
163 \pgf@circ@siunitxfalse
164 }
165
166 \DeclareOption{fulldiode}{
167 \ctikzset{diode = full}
168 }
169
170 \DeclareOption{emptydiode}{
171 \ctikzset{diode = empty}
172 }
173
174 \DeclareOption{strokediode}{
175 \ctikzset{diode = stroke}
176 }
177
178 \DeclareOption{arrowmos}{
179 \pgf@circuit@mos@arrowstrue
180 }
181
182 \DeclareOption{noarrowmos}{
183 \pgf@circuit@mos@arrowsfalse
184 }
185
186 \DeclareOption{fetbodydiode}{
187 \pgf@circuit@fet@bodydiodetrue
188 }
189
190 \DeclareOption{nofetbodydiode}{
191 \pgf@circuit@fet@bodydiodefalse
192 }
193
194 \DeclareOption{fetsolderdot}{
195 \pgf@circuit@fet@solderdottrue
196 }
197
198 \DeclareOption{nofetsolderdot}{
199 \pgf@circuit@fet@solderdotfalse
200 }
201
202 \DeclareOption{emptypmoscircle}{
203 \pgf@circuit@pmos@emptycircletrue
204 }
205
206
207 \DeclareOption{lazymos}{
208 \ctikzset{tripoles/nmos/width=.5}
209 \ctikzset{tripoles/nmos/gate height=.35}
210 \ctikzset{tripoles/nmos/base height=.35}
211 \ctikzset{tripoles/nmos/height/.initial=1.2}
212 \ctikzset{tripoles/nmos/base width=.5}
213 \ctikzset{tripoles/nmos/gate width=.65}
214
215 \ctikzset{tripoles/pmos/width=.5}
216 \ctikzset{tripoles/pmos/gate height=.35}
217 \ctikzset{tripoles/pmos/base height=.35}
218 \ctikzset{tripoles/pmos/height/.initial=1.2}
219 \ctikzset{tripoles/pmos/base width=.5}
220 \ctikzset{tripoles/pmos/gate width=.65}
221
222 \pgf@circuit@pmos@emptycircletrue
223 }
224
225 \DeclareOption{straightlabels}{
226 \ctikzset{label/align = straight}
227 }
228
229 \DeclareOption{rotatelabels}{
230 \ctikzset{label/align = rotate}
231 }
232
233 \DeclareOption{smartlabels}{
234 \ctikzset{label/align = smart}
235 }
236
237 \DeclareOption{compatibility}{
238 \pgf@circuit@compattrue
239 }
240
241 \DeclareOption{oldvoltagedirection}{
242 \pgf@circ@oldvoltagedirectiontrue
243 }
244 \DeclareOption{nooldvoltagedirection}{
245 \pgf@circ@oldvoltagedirectionfalse
246 }
247
248 \DeclareOption{betterproportions}{
249 \ctikzset{monopoles/ground/width/.initial=.15}
250
251 \ctikzset{bipoles/resistor/height/.initial=.23}
252 \ctikzset{bipoles/resistor/width/.initial=.6}
253 \ctikzset{bipoles/capacitor/height/.initial=.4}
254 \ctikzset{bipoles/capacitor/width/.initial=.1}
255 \ctikzset{bipoles/potentiometer/height/.initial=.6}
256 \ctikzset{bipoles/potentiometer/height 2/.initial=.23}
257 \ctikzset{bipoles/potentiometer/width/.initial=.6}
258 \ctikzset{bipoles/photoresistor/height/.initial=.6}
259 \ctikzset{bipoles/photoresistor/height 2/.initial=.23}
260 \ctikzset{bipoles/photoresistor/width/.initial=.6}
261 \ctikzset{bipoles/thermistor/main/.initial=.7}
262 \ctikzset{bipoles/thermistor/height/.initial=.328}%.23/.7
263 \ctikzset{bipoles/thermistor/width/.initial=.6}
264 \ctikzset{bipoles/thermistorntc/width/.initial=.6}
265 \ctikzset{bipoles/thermistorntc/main/.initial=.7}
266 \ctikzset{bipoles/thermistorntc/height/.initial=.328}%.23/.7
267 \ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.23/.7
268 \ctikzset{bipoles/thermistorptc/width/.initial=.6}
269 \ctikzset{bipoles/thermistorptc/main/.initial=.7}
270 \ctikzset{bipoles/thermistorptc/height/.initial=.328}%.23/.7
271 \ctikzset{bipoles/varistor/main/.initial=.7}
272 \ctikzset{bipoles/varistor/height/.initial=.328}%.23/.7
273 \ctikzset{bipoles/varistor/width/.initial=.6}
274 \ctikzset{bipoles/vresistor/height/.initial=.45}
275 \ctikzset{bipoles/vresistor/width/.initial=.6}
276 \ctikzset{bipoles/generic/height/.initial=.23}
277 \ctikzset{bipoles/generic/width/.initial=.6}
278 \ctikzset{bipoles/generic potentiometer/height/.initial=.6}
279 \ctikzset{bipoles/generic potentiometer/height 2/.initial=.23}
280 \ctikzset{bipoles/generic potentiometer/width/.initial=.6}
281 \ctikzset{bipoles/ageneric/height/.initial=.23}
282 \ctikzset{bipoles/ageneric/width/.initial=.6}
283 \ctikzset{bipoles/memristor/height/.initial=.23}
284 \ctikzset{bipoles/memristor/wave height/.initial=.375}
285 \ctikzset{bipoles/memristor/width/.initial=.60}
286 \ctikzset{bipoles/tgeneric/height/.initial=.525}
287 \ctikzset{bipoles/tgeneric/width/.initial=.6}
288 \ctikzset{bipoles/tfullgeneric/height/.initial=.525}
289 \ctikzset{bipoles/tfullgeneric/width/.initial=.60}
290 \ctikzset{bipoles/fullgeneric/height/.initial=.23}
291 \ctikzset{bipoles/fullgeneric/width/.initial=.6}
292 \ctikzset{bipoles/diode/height/.initial=.3}
293 \ctikzset{bipoles/diode/width/.initial=.25}
294
295 \ctikzset{tripoles/thyristor/height/.initial=.66}
296 \ctikzset{tripoles/thyristor/height 2/.initial=.3}
297 \ctikzset{tripoles/thyristor/width/.initial=.6}
298 \ctikzset{tripoles/thyristor/diode height/.initial=.3}
299 \ctikzset{tripoles/thyristor/diode width left/.initial=.4}
300 \ctikzset{tripoles/thyristor/diode width right/.initial=.3}
301
302 \ctikzset{tripoles/triac/height/.initial=.66}
303 \ctikzset{tripoles/triac/width/.initial=.6}
304 \ctikzset{tripoles/triac/diode width left/.initial=.3}
305 \ctikzset{tripoles/triac/diode width right/.initial=.3}
306 }
307
308 %%%%%%%%%
309 %%%%%%%%%%% Springe nach tex/pgfcirc.defines
310 %%%---------- open: tex/pgfcirc.defines.tex
311
312 %% Options
313
314 %%%%%%%%%%%%
315 %% Dimensions
316
317 % coordinates
318 \newdimen\pgf@circ@res@up
319 \newdimen\pgf@circ@res@down
320 \newdimen\pgf@circ@res@zero
321 \newdimen\pgf@circ@res@left
322 \newdimen\pgf@circ@res@right
323 \newdimen\pgf@circ@res@other
324 \newdimen\pgf@circ@res@step
325 \newdimen\pgf@circ@res@temp
326 % inital thickness
327 \newdimen \pgfstartlinewidth
328 %% Keys
329
330 \long\def\pgf@circ@comment#1{}
331
332 \def\circuitikzbasekey{/tikz/circuitikz}
333
334 \pgfkeys{\circuitikzbasekey/.is family}
335
336 \def\circuitikzset#1{\pgfkeys{\circuitikzbasekey,#1}}
337 \let\ctikzset\circuitikzset
338 \def\ctikzvalof#1{\pgfkeysvalueof{\circuitikzbasekey/#1}}
339 \def\ctikzsetvalof#1#2{\pgfkeyssetvalue{\circuitikzbasekey/#1}{#2}}
340
341 \newif\ifpgf@circ@siunitx
342 \newif\ifpgf@circuit@compat
343 \newif\ifpgf@circ@oldvoltagedirection
344
345 % Option ">" for twoports
346 \newif\ifpgf@circuit@inputarrow
347 \ctikzset{>/.add code={}{\pgf@circuit@inputarrowtrue}}
348 \ctikzset{inputarrow/.is choice}
349 \ctikzset{inputarrow/true/.code={\pgf@circuit@inputarrowtrue}}
350 \ctikzset{inputarrow/false/.code={\pgf@circuit@inputarrowfalse}}
351
352 % Option "boxed" for nodes and twoports
353 \newif\ifpgf@circuit@boxed
354 \pgfkeys{/tikz/boxed/.add code={}{\pgf@circuit@boxedtrue}}
355 \ctikzset{boxed/.add code={}{\pgf@circuit@boxedtrue}}
356 \pgfkeys{/tikz/box/.add code={}{\pgf@circuit@boxedtrue}}
357 \ctikzset{box/.add code={}{\pgf@circuit@boxedtrue}}
358
359 % Option "dashed" for nodes and twoports
360 \newif\ifpgf@circuit@dashed
361 \pgfkeys{/tikz/dashed/.add code={}{\pgf@circuit@dashedtrue}}
362 \ctikzset{dashed/.add code={}{\pgf@circuit@dashedtrue}}
363
364 % Option "t=*" for nodes
365 \pgfkeys{/tikz/t/.add code={}{\ctikzset{text=#1}}}
366
367
368
369 \ctikzset{bipoles/.is family}
370 \ctikzset{bipoles/border margin/.initial=1.1}
371 \ctikzset{bipoles/thickness/.initial=2}
372 \ctikzset{bipoles/length/.initial=1.4cm}
373 \ctikzset{nodes width/.initial=.04}
374 \newdimen\pgf@circ@Rlen
375 \ctikzset{bipoles/length/.code={\pgf@circ@Rlen = #1}}
376
377 \ctikzset{monopoles/.is family}
378 \ctikzset{monopoles/ground/width/.initial=.25}
379 \ctikzset{monopoles/tground/thickness/.initial=3}
380 \ctikzset{monopoles/vcc/width/.initial=.2}
381 \ctikzset{monopoles/match/width/.initial=.4}
382 \ctikzset{monopoles/chassis/width/.initial=.25}
383 \ctikzset{monopoles/alternative chassis/width/.initial=.25}
384 \ctikzset{monopoles/equipotentiality/width/.initial=.25}
385 \ctikzset{monopoles/tlinestub/width/.initial=.25}
386 \ctikzset{monopoles/antenna/width/.initial=.25}
387 \ctikzset{monopoles/antenna/label/xanchor/.initial=.4}
388 \ctikzset{monopoles/antenna/label/yanchor/.initial=.75}
389 \ctikzset{monopoles/txantenna/label/xanchor/.initial=.4}
390 \ctikzset{monopoles/txantenna/label/yanchor/.initial=.75}
391 \ctikzset{monopoles/txantenna/width/.initial=.25}
392 \ctikzset{monopoles/rxantenna/label/xanchor/.initial=.4}
393 \ctikzset{monopoles/rxantenna/label/yanchor/.initial=.75}
394 \ctikzset{monopoles/rxantenna/width/.initial=.25}
395
396 \ctikzset{bipoles/resistor/height/.initial=.3}
397 \ctikzset{bipoles/resistor/width/.initial=.8}
398 \ctikzset{bipoles/potentiometer/height/.initial=.8}
399 \ctikzset{bipoles/potentiometer/height 2/.initial=.3}
400 \ctikzset{bipoles/potentiometer/width/.initial=.8}
401 \ctikzset{bipoles/photoresistor/height/.initial=.6}
402 \ctikzset{bipoles/photoresistor/height 2/.initial=.3}
403 \ctikzset{bipoles/photoresistor/width/.initial=.8}
404 \ctikzset{bipoles/thermistor/main/.initial=.7}
405 \ctikzset{bipoles/thermistor/height/.initial=.428}%.3/.7
406 \ctikzset{bipoles/thermistorntc/width/.initial=.8}
407 \ctikzset{bipoles/thermistorntc/main/.initial=.7}
408 \ctikzset{bipoles/thermistorntc/height/.initial=.428}%.3/.7
409 \ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.3/.7
410 \ctikzset{bipoles/thermistorptc/width/.initial=.8}
411 \ctikzset{bipoles/thermistorptc/main/.initial=.7}
412 \ctikzset{bipoles/thermistorptc/height/.initial=.428}%.3/.7
413 \ctikzset{bipoles/thermistorptc/height 2/.initial=.75}%.3/.7
414 \ctikzset{bipoles/thermistor/width/.initial=.8}
415 \ctikzset{bipoles/varistor/main/.initial=.7}
416 \ctikzset{bipoles/varistor/height/.initial=.428}%.3/.7
417 \ctikzset{bipoles/varistor/width/.initial=.8}
418 \ctikzset{bipoles/vresistor/height/.initial=.6}
419 \ctikzset{bipoles/vresistor/width/.initial=.8}
420 \ctikzset{bipoles/cuteinductor/height/.initial=.3}
421 \ctikzset{bipoles/cuteinductor/lower coil height/.initial=.15}
422 \ctikzset{bipoles/cuteinductor/width/.initial=.6}
423 \ctikzset{bipoles/cuteinductor/coils/.initial=5}
424 \ctikzset{bipoles/cuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
425 \ctikzset{bipoles/americaninductor/height/.initial=.3}
426 \ctikzset{bipoles/americaninductor/height 2/.initial=.1}
427 \ctikzset{bipoles/americaninductor/width/.initial=.8}
428 \ctikzset{bipoles/americaninductor/coils/.initial=4}
429 \ctikzset{bipoles/americaninductor/coil height/.initial=.15}
430 \ctikzset{bipoles/vcuteinductor/height/.initial=.6}
431 \ctikzset{bipoles/vcuteinductor/lower coil height/.initial=.3}
432 \ctikzset{bipoles/vcuteinductor/width/.initial=.6}
433 \ctikzset{bipoles/vcuteinductor/coils/.initial=5}
434 \ctikzset{bipoles/vcuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
435 \ctikzset{bipoles/vamericaninductor/height/.initial=.6}
436 \ctikzset{bipoles/vamericaninductor/height 2/.initial=.2}
437 \ctikzset{bipoles/vamericaninductor/width/.initial=.8}
438 \ctikzset{bipoles/vamericaninductor/coils/.initial=4}
439 \ctikzset{bipoles/vamericaninductor/coil height/.initial=.15}
440 \ctikzset{bipoles/esource/height/.initial=.60}
441 \ctikzset{bipoles/esource/width/.initial=.60}
442 \ctikzset{bipoles/pvsource/height/.initial=.60}
443 \ctikzset{bipoles/pvsource/width/.initial=.60}
444 \ctikzset{bipoles/isource/height/.initial=.60}
445 \ctikzset{bipoles/isource/width/.initial=.60}
446 \ctikzset{bipoles/oosource/height/.initial=.60}
447 \ctikzset{bipoles/oosource/width/.initial=.60}
448 \ctikzset{bipoles/oosource/circlesize/.initial=.65}%circlesize+circleoffset should be =1
449 \ctikzset{bipoles/oosource/circleoffset/.initial=.35}%circlesize+circleoffset should be =1
450 \ctikzset{bipoles/dcisource/height/.initial=.60}
451 \ctikzset{bipoles/dcisource/width/.initial=.60}
452 \ctikzset{bipoles/dcvsource/height/.initial=.60}
453 \ctikzset{bipoles/dcvsource/width/.initial=.60}
454 \ctikzset{bipoles/vsourcetri/height/.initial=.60}
455 \ctikzset{bipoles/vsourcetri/width/.initial=.60}
456 \ctikzset{bipoles/isourceam/height/.initial=.60}
457 \ctikzset{bipoles/isourceam/width/.initial=.60}
458 \ctikzset{bipoles/vsource/height/.initial=.60}
459 \ctikzset{bipoles/vsource/width/.initial=.60}
460 \ctikzset{bipoles/vsourceam/height/.initial=.60}
461 \ctikzset{bipoles/vsourceam/width/.initial=.60}
462 \ctikzset{bipoles/vsourceam/margin/.initial=.7}
463 \ctikzset{bipoles/isourcesin/height/.initial=.60}
464 \ctikzset{bipoles/isourcesin/width/.initial=.60}
465 \ctikzset{bipoles/vsourcesin/height/.initial=.60}
466 \ctikzset{bipoles/vsourcesin/width/.initial=.60}
467 \ctikzset{bipoles/vsourcesquare/height/.initial=.60}
468 \ctikzset{bipoles/vsourcesquare/width/.initial=.60}
469 \ctikzset{bipoles/cisource/height/.initial=.7}
470 \ctikzset{bipoles/cisource/width/.initial=.7}
471 \ctikzset{bipoles/cisourceam/height/.initial=.7}
472 \ctikzset{bipoles/cisourceam/width/.initial=.7}
473 \ctikzset{bipoles/cvsource/height/.initial=.7}
474 \ctikzset{bipoles/cvsource/width/.initial=.7}
475 \ctikzset{bipoles/cvsourceam/height/.initial=.7}
476 \ctikzset{bipoles/cvsourceam/width/.initial=.7}
477 \ctikzset{bipoles/cvsourceam/margin/.initial=.7}
478 \ctikzset{bipoles/cvsourceam/text scale/.initial=1}
479 \ctikzset{bipoles/cisourcesin/width/.initial=.7}
480 \ctikzset{bipoles/cvsourcesin/height/.initial=.7}
481 \ctikzset{bipoles/cvsourcesin/width/.initial=.7}
482 \ctikzset{bipoles/capacitor/height/.initial=.6}
483 \ctikzset{bipoles/capacitor/width/.initial=.2}
484 \ctikzset{bipoles/ecapacitor/height/.initial=.5}
485 \ctikzset{bipoles/ecapacitor/width/.initial=.2}
486 \ctikzset{bipoles/ecapacitor/font/.initial= \fontsize{6}{0}\selectfont\boldmath}
487 \ctikzset{bipoles/pcapacitor/height/.initial=.6}
488 \ctikzset{bipoles/pcapacitor/width/.initial=.2}
489 \ctikzset{bipoles/pcapacitor/bend width/.initial=1.1}
490 \ctikzset{bipoles/vcapacitor/height/.initial=.6}
491 \ctikzset{bipoles/vcapacitor/width/.initial=.5}
492 \ctikzset{bipoles/vcapacitor/capacitor width/.initial=.4}
493 \ctikzset{bipoles/piezoelectric/height/.initial=.7}
494 \ctikzset{bipoles/piezoelectric/width/.initial=.5}
495 \ctikzset{bipoles/battery/height/.initial=.6}
496 \ctikzset{bipoles/battery/width/.initial=.3}
497 \ctikzset{bipoles/battery1/height/.initial=.6}
498 \ctikzset{bipoles/battery1/width/.initial=.3}
499 \ctikzset{bipoles/diode/height/.initial=.50}
500 \ctikzset{bipoles/diode/width/.initial=.40}
501 \ctikzset{bipoles/varcap/height/.initial=.50}
502 \ctikzset{bipoles/varcap/width/.initial=.45}
503 \ctikzset{bipoles/interr/height/.initial=.35}
504 \ctikzset{bipoles/interr/width/.initial=.35}
505 \ctikzset{bipoles/interr/height 2/.initial=.1}
506 \ctikzset{bipoles/generic/height/.initial=.30}
507 \ctikzset{bipoles/generic/width/.initial=.80}
508 \ctikzset{bipoles/european gas filled surge arrester/height/.initial=.30}
509 \ctikzset{bipoles/european gas filled surge arrester/width/.initial=.80}
510 \ctikzset{bipoles/european gas filled surge arrester/inside/.initial=.30}
511 \ctikzset{bipoles/american gas filled surge arrester/height/.initial=.60}
512 \ctikzset{bipoles/american gas filled surge arrester/width/.initial=.60}
513 \ctikzset{bipoles/american gas filled surge arrester/inside/.initial=.15}
514 \ctikzset{bipoles/american gas filled surge arrester/dot x/.initial=.25}
515 \ctikzset{bipoles/american gas filled surge arrester/dot y/.initial=.45}
516 \ctikzset{bipoles/american gas filled surge arrester/size/.initial=.1}
517 \ctikzset{bipoles/fuse/height/.initial=.20}
518 \ctikzset{bipoles/fuse/width/.initial=.50}
519 \ctikzset{bipoles/afuse/height/.initial=.20}
520 \ctikzset{bipoles/afuse/width/.initial=.50}
521 \ctikzset{bipoles/generic potentiometer/height/.initial=.80}
522 \ctikzset{bipoles/generic potentiometer/height 2/.initial=.30}
523 \ctikzset{bipoles/generic potentiometer/width/.initial=.80}
524 \ctikzset{bipoles/ageneric/height/.initial=.30}
525 \ctikzset{bipoles/ageneric/width/.initial=.80}
526 \ctikzset{bipoles/memristor/height/.initial=.30}
527 \ctikzset{bipoles/memristor/wave height/.initial=.5}
528 \ctikzset{bipoles/memristor/width/.initial=.80}
529 \ctikzset{bipoles/tgeneric/height/.initial=.70}
530 \ctikzset{bipoles/tgeneric/width/.initial=.80}
531 \ctikzset{bipoles/tfullgeneric/height/.initial=.70}
532 \ctikzset{bipoles/tfullgeneric/width/.initial=.80}
533 \ctikzset{bipoles/fullgeneric/height/.initial=.30}
534 \ctikzset{bipoles/fullgeneric/width/.initial=.80}
535 \ctikzset{bipoles/open/height/.initial=.25}
536 \ctikzset{bipoles/open/width/.initial=.8}
537 \ctikzset{bipoles/ammeter/height/.initial=.60}
538 \ctikzset{bipoles/ammeter/width/.initial=.60}
539 \ctikzset{bipoles/ohmmeter/height/.initial=.60}
540 \ctikzset{bipoles/ohmmeter/width/.initial=.60}
541 \ctikzset{bipoles/voltmeter/height/.initial=.60}
542 \ctikzset{bipoles/voltmeter/width/.initial=.60}
543 \ctikzset{bipoles/buffer/height/.initial=1}
544 \ctikzset{bipoles/buffer/width/.initial=1}
545 \ctikzset{bipoles/not port/width/.initial=1}
546 \ctikzset{bipoles/not port/height/.initial=.8}
547 \ctikzset{bipoles/not port/circle width/.initial=.15}
548 \ctikzset{bipoles/lamp/height/.initial=.60}
549 \ctikzset{bipoles/lamp/width/.initial=.60}
550 \ctikzset{bipoles/tline/height/.initial=.3}
551 \ctikzset{bipoles/tline/width/.initial=.8}
552 \ctikzset{bipoles/squid/height/.initial=.60}
553 \ctikzset{bipoles/squid/width/.initial=.60}
554 \ctikzset{bipoles/barrier/height/.initial=.60}
555 \ctikzset{bipoles/barrier/width/.initial=.60}
556 \ctikzset{bipoles/thermocouple/height/.initial=.250}
557 \ctikzset{bipoles/thermocouple/height 2/.initial=.60}
558 \ctikzset{bipoles/thermocouple/width/.initial=.140}
559 \ctikzset{bipoles/pushbutton/height/.initial=.5}
560 \ctikzset{bipoles/pushbutton/height 2/.initial=.0}
561 \ctikzset{bipoles/pushbutton/width/.initial=.50}
562
563 \ctikzset{bipoles/twoport/width/.initial=.7}
564 \ctikzset{bipoles/twoport/height/.initial=.7}
565 \ctikzset{bipoles/twoport/text/.initial=}
566 \ctikzset{bipoles/vco/width/.initial=.7}
567 \ctikzset{bipoles/bandpass/width/.initial=.7}
568 \ctikzset{bipoles/highpass/width/.initial=.7}
569 \ctikzset{bipoles/lowpass/width/.initial=.7}
570 \ctikzset{bipoles/adc/width/.initial=.7}
571 \ctikzset{bipoles/dac/width/.initial=.7}
572 \ctikzset{bipoles/dsp/width/.initial=.7}
573 \ctikzset{bipoles/fft/width/.initial=.7}
574 \ctikzset{bipoles/amp/width/.initial=.7}
575 \ctikzset{bipoles/vamp/width/.initial=.7}
576 \ctikzset{bipoles/piattenuator/width/.initial=.7}
577 \ctikzset{bipoles/vpiattenuator/width/.initial=.7}
578 \ctikzset{bipoles/tattenuator/width/.initial=.7}
579 \ctikzset{bipoles/vtattenuator/width/.initial=.7}
580 \ctikzset{bipoles/phaseshifter/width/.initial=.7}
581 \ctikzset{bipoles/vphaseshifter/width/.initial=.7}
582 \ctikzset{bipoles/detector/width/.initial=.7}
583
584
585 \newif\ifpgf@circuit@trans@depletiontype
586 \pgf@circuit@trans@depletiontypefalse
587
588 \newif\ifpgf@circuit@mos@arrows
589 \ctikzset{tripoles/mos style/.is choice}
590 \ctikzset{tripoles/mos style/no arrows/.code={\pgf@circuit@mos@arrowsfalse}}
591 \ctikzset{tripoles/mos style/arrows/.code={\pgf@circuit@mos@arrowstrue}}
592
593 % Option solderdot for fet
594 \newif\ifpgf@circuit@fet@solderdot
595 \pgfkeys{/tikz/solderdot/.add code={}{\pgf@circuit@fet@solderdottrue}}
596 \ctikzset{solderdot/.add code={}{\pgf@circuit@fet@solderdottrue}}
597 \pgfkeys{/tikz/nosolderdot/.add code={}{\pgf@circuit@fet@solderdotfalse}}
598 \ctikzset{nosolderdot/.add code={}{\pgf@circuit@fet@solderdotfalse}}
599
600 % Option bodydiode for fet
601 \newif\ifpgf@circuit@fet@bodydiode
602 \pgfkeys{/tikz/bodydiode/.add code={}{\pgf@circuit@fet@bodydiodetrue}}
603 \ctikzset{bodydiode/.add code={}{\pgf@circuit@fet@bodydiodetrue}}
604 \pgfkeys{/tikz/nobodydiode/.add code={}{\pgf@circuit@fet@bodydiodefalse}}
605 \ctikzset{nobodydiode/.add code={}{\pgf@circuit@fet@bodydiodefalse}}
606
607 % Option draw fet without gate connection
608 \newif\ifpgf@circuit@bpt@drawgate
609 \pgf@circuit@bpt@drawgatetrue
610 \pgfkeys{/tikz/nogate/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
611 \ctikzset{nogate/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
612 \pgfkeys{/tikz/nobase/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
613 \ctikzset{nobase/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
614
615 % Option draw bpt without base connection
616 \newif\ifpgf@circuit@bpt@drawbase
617 \pgf@circuit@bpt@drawbasetrue
618 \pgfkeys{/tikz/nobase/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
619 \ctikzset{nobase/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
620 \pgfkeys{/tikz/nogate/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
621 \ctikzset{nogate/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
622
623 % Option draw bpt with optical input
624 \newif\ifpgf@circuit@bpt@drawphoto
625 \pgf@circuit@bpt@drawphotofalse
626 \pgfkeys{/tikz/photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
627 \ctikzset{photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
628 \pgfkeys{/tikz/photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
629 \ctikzset{photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
630
631 % Option draw pmos with empty circle
632 \newif\ifpgf@circuit@pmos@emptycircle
633 \newif\ifpgf@circuit@pmos@emptycircle
634 \pgf@circuit@pmos@emptycirclefalse
635 \pgfkeys{/tikz/emptycircle/.add code={}{\pgf@circuit@pmos@emptycircletrue}}
636 \ctikzset{tripoles/pmos style/emptycircle/.add code={}{\pgf@circuit@pmos@emptycircletrue}}
637
638
639 \newif\ifpgf@circuit@trans@ntype
640 \pgf@circuit@trans@ntypetrue %default true
641 %\newif\ifpgf@circuit@trans@ptype
642 %\ctikzset{tripoles/nmos/.add code={\pgf@circuit@trans@ntypetrue}}
643 \ctikzset{tripoles/nmos/width/.initial=.7}
644 \ctikzset{tripoles/nmos/gate height/.initial=.35}
645 \ctikzset{tripoles/nmos/base height/.initial=.5}
646 \ctikzset{tripoles/nmos/conn height/.initial=0}
647 \ctikzset{tripoles/nmos/height/.initial=1.1}
648 \ctikzset{tripoles/nmos/base width/.initial=.5}
649 \ctikzset{tripoles/nmos/gate width/.initial=.62}
650 \ctikzset{tripoles/nmos/bodydiode scale/.initial=.3}
651 \ctikzset{tripoles/nmos/bodydiode distance/.initial=.3}
652 \ctikzset{tripoles/nmos/bodydiode conn/.initial=.6}
653 \ctikzset{tripoles/nmos/curr direction/.initial=1}
654
655 \ctikzset{tripoles/pmos/width/.initial=.7}
656 \ctikzset{tripoles/pmos/gate height/.initial=.35}
657 \ctikzset{tripoles/pmos/base height/.initial=.5}
658 \ctikzset{tripoles/pmos/conn height/.initial=0}
659 \ctikzset{tripoles/pmos/height/.initial=1.1}
660 \ctikzset{tripoles/pmos/base width/.initial=.5}
661 \ctikzset{tripoles/pmos/gate width/.initial=.62}
662 \ctikzset{tripoles/pmos/bodydiode scale/.initial=.3}
663 \ctikzset{tripoles/pmos/bodydiode distance/.initial=.3}
664 \ctikzset{tripoles/pmos/bodydiode conn/.initial=.6}
665 \ctikzset{tripoles/pmos/curr direction/.initial=-1}
666
667 \ctikzset{tripoles/nfet/width/.initial=.7}
668 \ctikzset{tripoles/nfet/gate height/.initial=.35}
669 \ctikzset{tripoles/nfet/base height/.initial=.5}
670 \ctikzset{tripoles/nfet/conn height/.initial=0}
671 \ctikzset{tripoles/nfet/height/.initial=1.1}
672 \ctikzset{tripoles/nfet/base width/.initial=.5}
673 \ctikzset{tripoles/nfet/gate width/.initial=.62}
674 \ctikzset{tripoles/nfet/bodydiode scale/.initial=.3}
675 \ctikzset{tripoles/nfet/bodydiode distance/.initial=.3}
676 \ctikzset{tripoles/nfet/bodydiode conn/.initial=.6}
677 \ctikzset{tripoles/nfet/curr direction/.initial=1}
678
679 \ctikzset{tripoles/pfet/width/.initial=.7}
680 \ctikzset{tripoles/pfet/gate height/.initial=.35}
681 \ctikzset{tripoles/pfet/base height/.initial=.5}
682 \ctikzset{tripoles/pfet/conn height/.initial=0}
683 \ctikzset{tripoles/pfet/height/.initial=1.1}
684 \ctikzset{tripoles/pfet/base width/.initial=.5}
685 \ctikzset{tripoles/pfet/gate width/.initial=.62}
686 \ctikzset{tripoles/pfet/bodydiode scale/.initial=.3}
687 \ctikzset{tripoles/pfet/bodydiode distance/.initial=.3}
688 \ctikzset{tripoles/pfet/bodydiode conn/.initial=.6}
689 \ctikzset{tripoles/pfet/curr direction/.initial=-1}
690
691 \ctikzset{tripoles/nigfete/width/.initial=.7}
692 \ctikzset{tripoles/nigfete/gate height/.initial=.35}
693 \ctikzset{tripoles/nigfete/base height/.initial=.5}
694 \ctikzset{tripoles/nigfete/conn height/.initial=.35}
695 \ctikzset{tripoles/nigfete/height/.initial=1.1}
696 \ctikzset{tripoles/nigfete/base width/.initial=.5}
697 \ctikzset{tripoles/nigfete/gate width/.initial=.62}
698 \ctikzset{tripoles/nigfete/bodydiode scale/.initial=.3}
699 \ctikzset{tripoles/nigfete/bodydiode distance/.initial=.3}
700 \ctikzset{tripoles/nigfete/bodydiode conn/.initial=.6}
701 \ctikzset{tripoles/nigfete/curr direction/.initial=1}
702
703 \ctikzset{tripoles/nigfetd/width/.initial=.7}
704 \ctikzset{tripoles/nigfetd/gate height/.initial=.35}
705 \ctikzset{tripoles/nigfetd/base height/.initial=.5}
706 \ctikzset{tripoles/nigfetd/conn height/.initial=.35}
707 \ctikzset{tripoles/nigfetd/height/.initial=1.1}
708 \ctikzset{tripoles/nigfetd/base width/.initial=.5}
709 \ctikzset{tripoles/nigfetd/gate width/.initial=.62}
710 \ctikzset{tripoles/nigfetd/bodydiode scale/.initial=.3}
711 \ctikzset{tripoles/nigfetd/bodydiode distance/.initial=.3}
712 \ctikzset{tripoles/nigfetd/bodydiode conn/.initial=.6}
713 \ctikzset{tripoles/nigfetd/curr direction/.initial=1}
714
715 \ctikzset{tripoles/nigfetebulk/width/.initial=.7}
716 \ctikzset{tripoles/nigfetebulk/gate height/.initial=.35}
717 \ctikzset{tripoles/nigfetebulk/base height/.initial=.5}
718 \ctikzset{tripoles/nigfetebulk/conn height/.initial=.35}
719 \ctikzset{tripoles/nigfetebulk/height/.initial=1.1}
720 \ctikzset{tripoles/nigfetebulk/base width/.initial=.5}
721 \ctikzset{tripoles/nigfetebulk/gate width/.initial=.62}
722 \ctikzset{tripoles/nigfetebulk/bodydiode scale/.initial=.3}
723 \ctikzset{tripoles/nigfetebulk/bodydiode distance/.initial=.3}
724 \ctikzset{tripoles/nigfetebulk/bodydiode conn/.initial=.6}
725 \ctikzset{tripoles/nigfetebulk/curr direction/.initial=1}
726
727 \ctikzset{tripoles/pigfete/width/.initial=.7}
728 \ctikzset{tripoles/pigfete/gate height/.initial=.35}
729 \ctikzset{tripoles/pigfete/base height/.initial=.5}
730 \ctikzset{tripoles/pigfete/conn height/.initial=.35}
731 \ctikzset{tripoles/pigfete/height/.initial=1.1}
732 \ctikzset{tripoles/pigfete/base width/.initial=.5}
733 \ctikzset{tripoles/pigfete/gate width/.initial=.62}
734 \ctikzset{tripoles/pigfete/bodydiode scale/.initial=.3}
735 \ctikzset{tripoles/pigfete/bodydiode distance/.initial=.3}
736 \ctikzset{tripoles/pigfete/bodydiode conn/.initial=.6}
737 \ctikzset{tripoles/pigfete/curr direction/.initial=-1}
738
739 \ctikzset{tripoles/pigfetd/width/.initial=.7}
740 \ctikzset{tripoles/pigfetd/gate height/.initial=.35}
741 \ctikzset{tripoles/pigfetd/base height/.initial=.5}
742 \ctikzset{tripoles/pigfetd/conn height/.initial=.35}
743 \ctikzset{tripoles/pigfetd/height/.initial=1.1}
744 \ctikzset{tripoles/pigfetd/base width/.initial=.5}
745 \ctikzset{tripoles/pigfetd/gate width/.initial=.62}
746 \ctikzset{tripoles/pigfetd/bodydiode scale/.initial=.3}
747 \ctikzset{tripoles/pigfetd/bodydiode distance/.initial=.3}
748 \ctikzset{tripoles/pigfetd/bodydiode conn/.initial=.6}
749 \ctikzset{tripoles/pigfetd/curr direction/.initial=-1}
750
751 \ctikzset{tripoles/pigfetebulk/width/.initial=.7}
752 \ctikzset{tripoles/pigfetebulk/gate height/.initial=.35}
753 \ctikzset{tripoles/pigfetebulk/conn height/.initial=.35}
754 \ctikzset{tripoles/pigfetebulk/base height/.initial=.5}
755 \ctikzset{tripoles/pigfetebulk/height/.initial=1.1}
756 \ctikzset{tripoles/pigfetebulk/base width/.initial=.5}
757 \ctikzset{tripoles/pigfetebulk/gate width/.initial=.62}
758 \ctikzset{tripoles/pigfetebulk/bodydiode scale/.initial=.3}
759 \ctikzset{tripoles/pigfetebulk/bodydiode distance/.initial=.3}
760 \ctikzset{tripoles/pigfetebulk/bodydiode conn/.initial=.6}
761 \ctikzset{tripoles/pigfetebulk/curr direction/.initial=-1}
762
763 \ctikzset{tripoles/npn/width/.initial=.6}
764 \ctikzset{tripoles/npn/base height/.initial=.45}
765 \ctikzset{tripoles/npn/base height 2/.initial=.15}
766 \ctikzset{tripoles/npn/base height/.initial=.4}
767 \ctikzset{tripoles/npn/conn height/.initial=0}
768 \ctikzset{tripoles/npn/height/.initial=1.1}
769 \ctikzset{tripoles/npn/base width/.initial=.5}
770 \ctikzset{tripoles/npn/bodydiode scale/.initial=.3}
771 \ctikzset{tripoles/npn/bodydiode distance/.initial=.3}
772 \ctikzset{tripoles/npn/bodydiode conn/.initial=.6}
773 \ctikzset{tripoles/npn/curr direction/.initial=1}
774
775 \ctikzset{tripoles/pnp/width/.initial=.6}
776 \ctikzset{tripoles/pnp/base height/.initial=.45}
777 \ctikzset{tripoles/pnp/base height 2/.initial=.15}
778 \ctikzset{tripoles/pnp/base height/.initial=.4}
779 \ctikzset{tripoles/pnp/conn height/.initial=0}
780 \ctikzset{tripoles/pnp/height/.initial=1.1}
781 \ctikzset{tripoles/pnp/base width/.initial=.5}
782 \ctikzset{tripoles/pnp/bodydiode scale/.initial=.3}
783 \ctikzset{tripoles/pnp/bodydiode distance/.initial=.3}
784 \ctikzset{tripoles/pnp/bodydiode conn/.initial=.6}
785 \ctikzset{tripoles/pnp/curr direction/.initial=-1}
786
787 \ctikzset{tripoles/pigbt/width/.initial=.6}
788 \ctikzset{tripoles/pigbt/gate height/.initial=.45}
789 \ctikzset{tripoles/pigbt/gate height 2/.initial=.15}
790 \ctikzset{tripoles/pigbt/base height/.initial=.4}
791 \ctikzset{tripoles/pigbt/conn height/.initial=0}
792 \ctikzset{tripoles/pigbt/height/.initial=1.1}
793 \ctikzset{tripoles/pigbt/gate width/.initial=.62}
794 \ctikzset{tripoles/pigbt/base width/.initial=.5}
795 \ctikzset{tripoles/pigbt/bodydiode scale/.initial=.3}
796 \ctikzset{tripoles/pigbt/bodydiode distance/.initial=.3}
797 \ctikzset{tripoles/pigbt/bodydiode conn/.initial=.6}
798 \ctikzset{tripoles/pigbt/curr direction/.initial=-1}
799
800 \ctikzset{tripoles/nigbt/width/.initial=.6}
801 \ctikzset{tripoles/nigbt/gate height/.initial=.45}
802 \ctikzset{tripoles/nigbt/gate height 2/.initial=.15}
803 \ctikzset{tripoles/nigbt/base height/.initial=.4}
804 \ctikzset{tripoles/nigbt/conn height/.initial=0}
805 \ctikzset{tripoles/nigbt/height/.initial=1.1}
806 \ctikzset{tripoles/nigbt/gate width/.initial=.62}
807 \ctikzset{tripoles/nigbt/base width/.initial=.5}
808 \ctikzset{tripoles/nigbt/bodydiode scale/.initial=.3}
809 \ctikzset{tripoles/nigbt/bodydiode distance/.initial=.3}
810 \ctikzset{tripoles/nigbt/bodydiode conn/.initial=.6}
811 \ctikzset{tripoles/nigbt/curr direction/.initial=1}
812
813 \ctikzset{tripoles/Lpigbt/width/.initial=.6}
814 \ctikzset{tripoles/Lpigbt/gate height/.initial=.45}
815 \ctikzset{tripoles/Lpigbt/gate height 2/.initial=.15}
816 \ctikzset{tripoles/Lpigbt/base height/.initial=.4}
817 \ctikzset{tripoles/Lpigbt/conn height/.initial=.4}
818 \ctikzset{tripoles/Lpigbt/height/.initial=1.1}
819 \ctikzset{tripoles/Lpigbt/gate width/.initial=.62}
820 \ctikzset{tripoles/Lpigbt/base width/.initial=.5}
821 \ctikzset{tripoles/Lpigbt/bodydiode scale/.initial=.3}
822 \ctikzset{tripoles/Lpigbt/bodydiode distance/.initial=.3}
823 \ctikzset{tripoles/Lpigbt/bodydiode conn/.initial=.6}
824 \ctikzset{tripoles/Lpigbt/curr direction/.initial=-1}
825
826 \ctikzset{tripoles/Lnigbt/width/.initial=.6}
827 \ctikzset{tripoles/Lnigbt/gate height/.initial=.45}
828 \ctikzset{tripoles/Lnigbt/gate height 2/.initial=.15}
829 \ctikzset{tripoles/Lnigbt/base height/.initial=.4}
830 \ctikzset{tripoles/Lnigbt/conn height/.initial=.4}
831 \ctikzset{tripoles/Lnigbt/height/.initial=1.1}
832 \ctikzset{tripoles/Lnigbt/gate width/.initial=.62}
833 \ctikzset{tripoles/Lnigbt/base width/.initial=.5}
834 \ctikzset{tripoles/Lnigbt/bodydiode scale/.initial=.3}
835 \ctikzset{tripoles/Lnigbt/bodydiode distance/.initial=.3}
836 \ctikzset{tripoles/Lnigbt/bodydiode conn/.initial=.6}
837 \ctikzset{tripoles/Lnigbt/curr direction/.initial=1}
838
839 \ctikzset{tripoles/njfet/width/.initial=.7}
840 \ctikzset{tripoles/njfet/gate height/.initial=.5}
841 \ctikzset{tripoles/njfet/gate height 2/.initial=.35}
842 \ctikzset{tripoles/njfet/gate width/.initial=.5}
843 \ctikzset{tripoles/njfet/conn height/.initial=.35}
844 \ctikzset{tripoles/njfet/height/.initial=1.1}
845 \ctikzset{tripoles/njfet/bodydiode scale/.initial=.3}
846 \ctikzset{tripoles/njfet/bodydiode distance/.initial=.3}
847 \ctikzset{tripoles/njfet/bodydiode conn/.initial=.6}
848 \ctikzset{tripoles/njfet/curr direction/.initial=1}
849
850 \ctikzset{tripoles/pjfet/width/.initial=.7}
851 \ctikzset{tripoles/pjfet/gate height/.initial=.5}
852 \ctikzset{tripoles/pjfet/gate height 2/.initial=.35}
853 \ctikzset{tripoles/pjfet/gate width/.initial=.5}
854 \ctikzset{tripoles/pjfet/conn height/.initial=.35}
855 \ctikzset{tripoles/pjfet/height/.initial=1.1}
856 \ctikzset{tripoles/pjfet/bodydiode scale/.initial=.3}
857 \ctikzset{tripoles/pjfet/bodydiode distance/.initial=.3}
858 \ctikzset{tripoles/pjfet/bodydiode conn/.initial=.6}
859 \ctikzset{tripoles/pjfet/curr direction/.initial=-1}
860
861 \ctikzset{tripoles/isfet/width/.initial=1}
862 \ctikzset{tripoles/isfet/gate height/.initial=.35}
863 \ctikzset{tripoles/isfet/base height/.initial=.5}
864 \ctikzset{tripoles/isfet/height/.initial=1.1}
865 \ctikzset{tripoles/isfet/base width/.initial=.3}
866 \ctikzset{tripoles/isfet/gate width/.initial=.5}
867 \ctikzset{tripoles/isfet/conn height/.initial=0}
868 \ctikzset{tripoles/isfet/wave width/.initial=.16}
869 \ctikzset{tripoles/isfet/wave amp/.initial=.06}
870 \ctikzset{tripoles/isfet/waves y sep/.initial=.22}
871 \ctikzset{tripoles/isfet/waves x sep/.initial=.8}
872 \ctikzset{tripoles/isfet/bodydiode scale/.initial=.3}
873 \ctikzset{tripoles/isfet/bodydiode distance/.initial=.3}
874 \ctikzset{tripoles/isfet/bodydiode conn/.initial=.6}
875 \ctikzset{tripoles/isfet/curr direction/.initial=1}
876
877 \newif\ifpgf@circuit@europeanlogicport
878 \ctikzset{logic ports/.is choice}
879 \ctikzset{logic ports/european/.code= {\pgf@circuit@europeanlogicporttrue } }
880 \ctikzset{logic ports/american/.code= {\pgf@circuit@europeanlogicportfalse } }
881
882
883 \ctikzset{tripoles/american and port/width/.initial=1.1}
884 \ctikzset{tripoles/american and port/height/.initial=.8}
885 \ctikzset{tripoles/american and port/port width/.initial=.7}
886 \ctikzset{tripoles/american and port/input height/.initial=.5}
887 \ctikzset{tripoles/american nand port/width/.initial=1.1}
888 \ctikzset{tripoles/american nand port/height/.initial=.8}
889 \ctikzset{tripoles/american nand port/port width/.initial=.7}
890 \ctikzset{tripoles/american nand port/circle width/.initial=.15}
891 \ctikzset{tripoles/american nand port/input height/.initial=.5}
892 \ctikzset{tripoles/american or port/width/.initial=1.1}
893 \ctikzset{tripoles/american or port/height/.initial=.8}
894 \ctikzset{tripoles/american or port/port width/.initial=.7}
895 \ctikzset{tripoles/american or port/input height/.initial=.5}
896 \ctikzset{tripoles/american or port/input skip/.initial=.25}
897 \ctikzset{tripoles/american or port/aaa/.initial=.6}
898 \ctikzset{tripoles/american or port/bbb/.initial=.4}
899 \ctikzset{tripoles/american or port/ccc/.initial=.5}
900 \ctikzset{tripoles/american or port/ddd/.initial=.0}
901 \ctikzset{tripoles/american nor port/width/.initial=1.1}
902 \ctikzset{tripoles/american nor port/height/.initial=.8}
903 \ctikzset{tripoles/american nor port/port width/.initial=.7}
904 \ctikzset{tripoles/american nor port/input height/.initial=.5}
905 \ctikzset{tripoles/american nor port/input skip/.initial=.25}
906 \ctikzset{tripoles/american nor port/circle width/.initial=.15}
907 \ctikzset{tripoles/american nor port/aaa/.initial=.6}
908 \ctikzset{tripoles/american nor port/bbb/.initial=.4}
909 \ctikzset{tripoles/american nor port/ccc/.initial=.5}
910 \ctikzset{tripoles/american nor port/ddd/.initial=.0}
911 \ctikzset{tripoles/american xor port/width/.initial=1.1}
912 \ctikzset{tripoles/american xor port/height/.initial=.8}
913 \ctikzset{tripoles/american xor port/port width/.initial=.7}
914 \ctikzset{tripoles/american xor port/input height/.initial=.5}
915 \ctikzset{tripoles/american xor port/input skip/.initial=.15}
916 \ctikzset{tripoles/american xor port/distance/.initial=.1}
917 \ctikzset{tripoles/american xor port/aaa/.initial=.6}
918 \ctikzset{tripoles/american xor port/bbb/.initial=.4}
919 \ctikzset{tripoles/american xor port/ccc/.initial=.5}
920 \ctikzset{tripoles/american xor port/ddd/.initial=.0}
921 \ctikzset{tripoles/american xnor port/width/.initial=1.1}
922 \ctikzset{tripoles/american xnor port/height/.initial=.8}
923 \ctikzset{tripoles/american xnor port/port width/.initial=.7}
924 \ctikzset{tripoles/american xnor port/input height/.initial=.5}
925 \ctikzset{tripoles/american xnor port/input skip/.initial=.15}
926 \ctikzset{tripoles/american xnor port/distance/.initial=.1}
927 \ctikzset{tripoles/american xnor port/aaa/.initial=.6}
928 \ctikzset{tripoles/american xnor port/bbb/.initial=.4}
929 \ctikzset{tripoles/american xnor port/ccc/.initial=.5}
930 \ctikzset{tripoles/american xnor port/ddd/.initial=.0}
931 \ctikzset{tripoles/american xnor port/circle width/.initial=.15}
932 \ctikzset{tripoles/european and port/width/.initial=1.4}
933 \ctikzset{tripoles/european and port/height/.initial=.65}
934 \ctikzset{tripoles/european and port/reserved/.initial=.6}
935 \ctikzset{tripoles/european and port/input height/.initial=.6}
936 \ctikzset{tripoles/european or port/width/.initial=1.4}
937 \ctikzset{tripoles/european or port/height/.initial=.65}
938 \ctikzset{tripoles/european or port/reserved/.initial=.6}
939 \ctikzset{tripoles/european or port/input height/.initial=.6}
940 \ctikzset{tripoles/european xor port/width/.initial=1.4}
941 \ctikzset{tripoles/european xor port/height/.initial=.65}
942 \ctikzset{tripoles/european xor port/reserved/.initial=.6}
943 \ctikzset{tripoles/european xor port/input height/.initial=.6}
944 \ctikzset{tripoles/european nand port/width/.initial=1.4}
945 \ctikzset{tripoles/european nand port/not height/.initial=.3}
946 \ctikzset{tripoles/european nand port/not width/.initial=.8}
947 \ctikzset{tripoles/european nand port/height/.initial=.65}
948 \ctikzset{tripoles/european nand port/reserved/.initial=.6}
949 \ctikzset{tripoles/european nand port/input height/.initial=.6}
950 \ctikzset{tripoles/european not port/width/.initial=1.4}
951 \ctikzset{tripoles/european not port/not height/.initial=.3}
952 \ctikzset{tripoles/european not port/not width/.initial=.8}
953 \ctikzset{tripoles/european not port/height/.initial=.65}
954 \ctikzset{tripoles/european not port/reserved/.initial=.6}
955 \ctikzset{tripoles/european not port/input height/.initial=0}
956 \ctikzset{tripoles/european xnor port/width/.initial=1.4}
957 \ctikzset{tripoles/european xnor port/not height/.initial=.3}
958 \ctikzset{tripoles/european xnor port/not width/.initial=.8}
959 \ctikzset{tripoles/european xnor port/height/.initial=.65}
960 \ctikzset{tripoles/european xnor port/reserved/.initial=.6}
961 \ctikzset{tripoles/european xnor port/input height/.initial=.6}
962 \ctikzset{tripoles/european nor port/width/.initial=1.4}
963 \ctikzset{tripoles/european nor port/not height/.initial=.3}
964 \ctikzset{tripoles/european nor port/not width/.initial=.8}
965 \ctikzset{tripoles/european nor port/height/.initial=.65}
966 \ctikzset{tripoles/european nor port/reserved/.initial=.6}
967 \ctikzset{tripoles/european nor port/input height/.initial=.6}
968 \ctikzset{tripoles/op amp/width/.initial=1.7}
969 \ctikzset{tripoles/op amp/port width/.initial=.7}
970 \ctikzset{tripoles/op amp/height/.initial=1.4}
971 \ctikzset{tripoles/op amp/input height/.initial=.5}
972 \ctikzset{tripoles/op amp/up pos/.initial=.45}
973 \ctikzset{tripoles/op amp/font/.initial= \fontsize{10}{0}\selectfont\boldmath}%absolut font size needed!
974 \ctikzset{tripoles/gm amp/width/.initial=1.7}
975 \ctikzset{tripoles/gm amp/port width/.initial=.7}
976 \ctikzset{tripoles/gm amp/height/.initial=1.4}
977 \ctikzset{tripoles/gm amp/input height/.initial=.5}
978 \ctikzset{tripoles/gm amp/up pos/.initial=.45}
979 \ctikzset{tripoles/plain amp/width/.initial=1.7}
980 \ctikzset{tripoles/plain amp/port width/.initial=.7}
981 \ctikzset{tripoles/plain amp/height/.initial=1.4}
982 \ctikzset{tripoles/plain amp/input height/.initial=.5}
983 \ctikzset{tripoles/plain amp/up pos/.initial=.45}
984
985 \ctikzset{tripoles/thyristor/height/.initial=1.10}
986 \ctikzset{tripoles/thyristor/height 2/.initial=.5}
987 \ctikzset{tripoles/thyristor/width/.initial=1.0}
988 \ctikzset{tripoles/thyristor/diode height/.initial=.5}
989 \ctikzset{tripoles/thyristor/diode width left/.initial=.4}
990 \ctikzset{tripoles/thyristor/diode width right/.initial=.3}
991
992 \ctikzset{tripoles/triac/height/.initial=1.1}
993 \ctikzset{tripoles/triac/width/.initial=1}
994 \ctikzset{tripoles/triac/diode width left/.initial=.3}
995 \ctikzset{tripoles/triac/diode width right/.initial=.3}
996
997 \ctikzset{tripoles/spdt/width/.initial=.85}
998 \ctikzset{tripoles/spdt/height/.initial=.45}
999 \ctikzset{tripoles/spdt/margin/.initial=.45}
1000
1001 \ctikzset{tripoles/toggleswitch/height/.initial=.8}
1002 \ctikzset{tripoles/toggleswitch/height 2/.initial=.0}
1003 \ctikzset{tripoles/toggleswitch/width/.initial=.80}
1004
1005 \ctikzset{tripoles/mixer/width/.initial=0.7}
1006 \ctikzset{tripoles/adder/width/.initial=0.7}
1007 \ctikzset{tripoles/circulator/width/.initial=.7}
1008 \ctikzset{tripoles/oscillator/width/.initial=.7}
1009
1010
1011 \ctikzset{tripoles/wilkinson/height/.initial=1.3}
1012 \ctikzset{tripoles/wilkinson/width/.initial=1.3}
1013
1014 \ctikzset{quadpoles/transformer/width/.initial=1.5}
1015 \ctikzset{quadpoles/transformer/width1/.initial=.4}
1016 \ctikzset{quadpoles/transformer/height/.initial=1.5}
1017 \ctikzset{quadpoles/transformer/height1/.initial=.8}
1018 \ctikzset{quadpoles/transformer core/width/.initial=1.5}
1019 \ctikzset{quadpoles/transformer core/height/.initial=1.5}
1020 \ctikzset{quadpoles/transformer core/core height/.initial=.5}
1021 \ctikzset{quadpoles/transformer core/core width/.initial=.05}
1022 \ctikzset{quadpoles/gyrator/width/.initial=1.5}
1023 \ctikzset{quadpoles/gyrator/height/.initial=1.5}
1024 \ctikzset{quadpoles/fourport/width/.initial=1.3}
1025 \ctikzset{quadpoles/fourport/height/.initial=1.3}
1026 \ctikzset{quadpoles/coupler/width/.initial=1.3}
1027 \ctikzset{quadpoles/coupler/height/.initial=1.3}
1028 \ctikzset{quadpoles/coupler2/width/.initial=1.3}
1029 \ctikzset{quadpoles/coupler2/height/.initial=1.3}
1030
1031 \ctikzset{/tikz/circuitikz/tripoles/magnetron/width/.initial=1}
1032
1033
1034 % %Mechanical section
1035 \ctikzset{/tikz/circuitikz/tripoles/elmech/height/.initial=.8}
1036 \ctikzset{/tikz/circuitikz/tripoles/elmech/width/.initial=.6}
1037 \ctikzset{bipoles/spring/height/.initial=.5}
1038 \ctikzset{bipoles/spring/width/.initial=.5}
1039 \ctikzset{bipoles/mass/height/.initial=.55}
1040 \ctikzset{bipoles/mass/box height/.initial=.4}
1041 \ctikzset{bipoles/mass/width/.initial=.5}
1042
1043 \ctikzset{bipoles/damper/height/.initial=.35}
1044 \ctikzset{bipoles/damper/length/.initial=.3}
1045 \ctikzset{bipoles/damper/width/.initial=.4}
1046
1047
1048 \ctikzset{bipole/.is family}
1049 \ctikzset{bipole/kind/.initial = }
1050 \ctikzset{bipole/name/.initial = }
1051 \newif\ifpgf@circuit@bipole@isvoltage
1052 \ctikzset{bipole/is voltage/.is if=pgf@circuit@bipole@isvoltage}
1053 \newif\ifpgf@circuit@bipole@voltageoutsideofsymbol
1054 \ctikzset{bipole/is voltageoutsideofsymbol/.is if=pgf@circuit@bipole@voltageoutsideofsymbol}
1055 \newif\ifpgf@circuit@bipole@strokedsymbol
1056 \ctikzset{bipole/is strokedsymbol/.is if=pgf@circuit@bipole@strokedsymbol}
1057 \newif\ifpgf@circuit@bipole@iscurrent
1058 \ctikzset{bipole/is current/.is if=pgf@circuit@bipole@iscurrent}
1059
1060 \ctikzset{bipole/voltage/.is family}
1061 \newif\ifpgf@circuit@bipole@voltage@backward
1062 \ctikzset{bipole/voltage/direction/.is choice}
1063 \ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}}
1064 \ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}}
1065 \newif\ifpgf@circuit@bipole@voltage@below
1066 \ctikzset{bipole/voltage/position/.is choice}
1067 \ctikzset{bipole/voltage/position/above/.code={\pgf@circuit@bipole@voltage@belowfalse}}
1068 \ctikzset{bipole/voltage/position/below/.code={\pgf@circuit@bipole@voltage@belowtrue}}
1069
1070 \ctikzset{bipole/voltage/label/unit/.initial=}
1071 \ctikzset{bipole/voltage/label/name/.initial=}
1072
1073 \ctikzset{bipole/current/.is family}
1074 \newif\ifpgf@circuit@bipole@current@backward
1075 \ctikzset{bipole/current/direction/.is choice}
1076 \ctikzset{bipole/current/direction/forward/.code={\pgf@circuit@bipole@current@backwardfalse}}
1077 \ctikzset{bipole/current/direction/backward/.code={\pgf@circuit@bipole@current@backwardtrue}}
1078 \newif\ifpgf@circuit@bipole@current@before
1079 \ctikzset{bipole/current/x position/.is choice}
1080 \ctikzset{bipole/current/x position/after/.code={\pgf@circuit@bipole@current@beforefalse}}
1081 \ctikzset{bipole/current/x position/before/.code={\pgf@circuit@bipole@current@beforetrue}}
1082 \newif\ifpgf@circuit@bipole@current@below
1083 \ctikzset{bipole/current/y position/.is choice}
1084 \ctikzset{bipole/current/y position/above/.code={\pgf@circuit@bipole@current@belowfalse}}
1085 \ctikzset{bipole/current/y position/below/.code={\pgf@circuit@bipole@current@belowtrue}}
1086
1087 \ctikzset{bipole/current/label/unit/.initial=}
1088 \ctikzset{bipole/current/label/name/.initial=}
1089
1090 \ctikzset{bipole/label/.is family}
1091 \ctikzset{bipole/label/position/.initial=90}
1092 \ctikzset{bipole/label/unit/.initial=}
1093 \ctikzset{bipole/label/name/.initial=}
1094 \ctikzset{bipole/annotation/.is family}
1095 \ctikzset{bipole/annotation/position/.initial=-90}
1096 \ctikzset{bipole/annotation/unit/.initial=}
1097 \ctikzset{bipole/annotation/name/.initial=}
1098 \ctikzset{bipole/nodes/.is family}
1099 \ctikzset{bipole/nodes/left/.is choice}
1100 \ctikzset{bipole/nodes/left/none/.code={\ctikzsetvalof{bipole/nodes/left}{none}}}
1101 \ctikzset{bipole/nodes/left/empty/.code={\ctikzsetvalof{bipole/nodes/left}{empty}}}
1102 \ctikzset{bipole/nodes/left/full/.code={\ctikzsetvalof{bipole/nodes/left}{full}}}
1103 \ctikzset{bipole/nodes/left/diamond/.code={\ctikzsetvalof{bipole/nodes/left}{diamond}}}
1104 \ctikzset{bipole/nodes/right/.is choice}
1105 \ctikzset{bipole/nodes/right/none/.code={\ctikzsetvalof{bipole/nodes/right}{none}}}
1106 \ctikzset{bipole/nodes/right/empty/.code={\ctikzsetvalof{bipole/nodes/right}{empty}}}
1107 \ctikzset{bipole/nodes/right/full/.code={\ctikzsetvalof{bipole/nodes/right}{full}}}
1108 \ctikzset{bipole/nodes/right/diamond/.code={\ctikzsetvalof{bipole/nodes/right}{diamond}}}
1109
1110
1111
1112
1113 \newif\ifpgf@circuit@europeanresistor
1114 \ctikzset{resistor/.is choice}
1115 \ctikzset{resistor/american/.code = \pgf@circuit@europeanresistorfalse }
1116 \ctikzset{resistor/european/.code = \pgf@circuit@europeanresistortrue }
1117
1118 \ctikzset{inductor/.is choice}
1119 \ctikzset{inductor/cute/.code={\ctikzsetvalof{inductor}{cute}}}
1120 \ctikzset{inductor/european/.code={\ctikzsetvalof{inductor}{european}}}
1121 \ctikzset{inductor/american/.code={\ctikzsetvalof{inductor}{american}}}
1122
1123 \newif\ifpgf@circuit@strokediode
1124 \newif\ifpgf@circuit@fulldiode
1125 \pgf@circuit@strokediodefalse
1126 \pgf@circuit@fulldiodefalse
1127
1128 \ctikzset{diode/.is choice}
1129 \ctikzset{diode/empty/.code = \pgf@circuit@fulldiodefalse\pgf@circuit@strokediodefalse}%default
1130 \ctikzset{diode/full/.code = \pgf@circuit@fulldiodetrue }
1131 \ctikzset{diode/stroke/.code = \pgf@circuit@strokediodetrue}
1132
1133 \tikzset{full diodes/.style = { \circuitikzbasekey/diode = full }}
1134 \tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty }}
1135 \tikzset{stroke diodes/.style = { \circuitikzbasekey/diode = stroke }}
1136
1137 \ctikzset{thickness/.initial=2}
1138 \ctikzset{color/.initial=black}
1139 \pgfkeys{/tikz/color/.add code={}{\ctikzset{color=#1}}}
1140
1141
1142 \newif\ifpgf@circ@siunitx
1143 \newif\ifpgf@circ@siunitx@res
1144
1145 \ctikzset{straight/.is choice}
1146 \ctikzset{straightvoltage value/.initial=true}
1147 \ctikzset{straight/true/.code = {\pgf@circuit@bipole@voltage@straighttrue}}
1148 \ctikzset{straight/false/.code = {\pgf@circuit@bipole@voltage@straightfalse}}
1149 \ctikzset{straightvoltage/.style = {/tikz/circuitikz/straight=true}}
1150 \newif\ifpgf@circuit@bipole@voltage@straight
1151 \ctikzset{bipole/straight/.is if=pgf@circuit@bipole@voltage@straight}
1152
1153
1154 \ctikzset{voltage/.is family}
1155 \ctikzset{voltage/distance from node/.initial=.5} %\pgf@circ@Rlen units
1156 \ctikzset{voltage/distance from line/.initial=.08} % pos, tra 0 e 1
1157 \ctikzset{voltage/bump a/.initial=1.2}
1158 \ctikzset{voltage/bump b/.initial=1.5}
1159 \ctikzset{voltage/european label distance/.initial=1.4}
1160 \ctikzset{voltage/american label distance/.initial=1.1}
1161 % special cases
1162 \ctikzset{bipoles/generic/voltage/distance from node/.initial=.4}
1163 \ctikzset{bipoles/generic/voltage/bump b/.initial=2}
1164 \ctikzset{bipoles/generic/voltage/european label distance/.initial=1.8}
1165 %\ctikzset{bipoles/thermocouple/voltage/distance from node/.initial=.3}
1166 \ctikzset{bipoles/thermocouple/voltage/bump b/.initial=2.2}
1167 \ctikzset{bipoles/thermocouple/voltage/european label distance/.initial=1.5}
1168 \ctikzset{bipoles/ageneric/voltage/distance from node/.initial=.4}
1169 \ctikzset{bipoles/ageneric/voltage/bump b/.initial=2}
1170 \ctikzset{bipoles/ageneric/voltage/european label distance/.initial=1.8}
1171 \ctikzset{bipoles/fullgeneric/voltage/distance from node/.initial=.4}
1172 \ctikzset{bipoles/fullgeneric/voltage/bump b/.initial=2}
1173 \ctikzset{bipoles/fullgeneric/voltage/european label distance/.initial=1.8}
1174 \ctikzset{bipoles/memristor/voltage/distance from node/.initial=.4}
1175 \ctikzset{bipoles/memristor/voltage/bump b/.initial=2}
1176 \ctikzset{bipoles/memristor/voltage/european label distance/.initial=1.8}
1177 %\ctikzset{bipoles/tline/voltage/distance from node/.initial=.2}
1178 \ctikzset{bipoles/tline/voltage/bump b/.initial=2.4}
1179 \ctikzset{bipoles/tline/voltage/european label distance/.initial=2.1}
1180 %\ctikzset{bipoles/varistor/voltage/distance from node/.initial=.2}
1181 \ctikzset{bipoles/varistor/voltage/bump b/.initial=2.4}
1182 \ctikzset{bipoles/varistor/voltage/european label distance/.initial=2}
1183 %\ctikzset{bipoles/photoresistor/voltage/distance from node/.initial=.2}
1184 \ctikzset{bipoles/photoresistor/voltage/bump b/.initial=2}
1185 \ctikzset{bipoles/photoresistor/voltage/european label distance/.initial=1.8}
1186 %\ctikzset{bipoles/thermistor/voltage/distance from node/.initial=.2}
1187 \ctikzset{bipoles/thermistor/voltage/bump b/.initial=2.4}
1188 \ctikzset{bipoles/thermistor/voltage/european label distance/.initial=2}
1189 %\ctikzset{bipoles/thermistorntc/voltage/distance from node/.initial=.2}
1190 \ctikzset{bipoles/thermistorntc/voltage/bump b/.initial=1.6}
1191 %\ctikzset{bipoles/thermistorptc/voltage/distance from node/.initial=.2}
1192 \ctikzset{bipoles/thermistorptc/voltage/bump b/.initial=1.6}
1193
1194 \ctikzset{current/.is family}
1195 \ctikzset{current/distance/.initial = .5}
1196
1197 \tikzset{american currents/.style = { \circuitikzbasekey/current = american } }
1198 \tikzset{european currents/.style = { \circuitikzbasekey/current = european } }
1199 \tikzset{american voltages/.style = { \circuitikzbasekey/voltage = american } }
1200 \tikzset{european voltages/.style = { \circuitikzbasekey/voltage = european } }
1201 \tikzset{american resistors/.style = { \circuitikzbasekey/resistor = american } }
1202 \tikzset{european resistors/.style = { \circuitikzbasekey/resistor = european } }
1203
1204 \newif\ifpgf@circuit@europeangfsurgearrester
1205 \ctikzset{gas filled surge arrester/.is choice}
1206 \ctikzset{gas filled surge arrester/european/.code= {\pgf@circuit@europeangfsurgearrestertrue } }
1207 \ctikzset{gas filled surge arrester/american/.code= {\pgf@circuit@europeangfsurgearresterfalse } }
1208
1209 \tikzset{american gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = american } }
1210 \tikzset{european gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = european } }
1211 \tikzset{american inductors/.style = { \circuitikzbasekey/inductor = american } }
1212 \tikzset{european inductors/.style = { \circuitikzbasekey/inductor = european } }
1213 \tikzset{cute inductors/.style = { \circuitikzbasekey/inductor = cute } }
1214 \tikzset{american ports/.style = { \circuitikzbasekey/logic ports = american } }
1215 \tikzset{european ports/.style = { \circuitikzbasekey/logic ports = european } }
1216 \tikzset{european/.style = { european currents, european voltages, european resistors, european inductors, european ports, european gas filled surge arrester } }
1217 \tikzset{american/.style = { american currents, american voltages, american resistors, american inductors, american ports, american gas filled surge arrester } }
1218 \tikzset{cute/.style = { european currents, european voltages, american resistors, cute inductors, american ports } }
1219
1220 % I should try to make the tree clearer (this voltaege conflicts with the options above)
1221
1222 \newif\ifpgf@circuit@europeanvoltage
1223 \ctikzset{voltage/.is choice}
1224 \ctikzset{voltage/american/.code = {\pgf@circuit@europeanvoltagefalse } }
1225 \ctikzset{voltage/european/.code = {\pgf@circuit@europeanvoltagetrue } }
1226
1227 \newif\ifpgf@circuit@europeancurrent
1228 \ctikzset{current/.is choice}
1229 \ctikzset{current/american/.code = \pgf@circuit@europeancurrentfalse }
1230 \ctikzset{current/european/.code = \pgf@circuit@europeancurrenttrue }
1231
1232 \ctikzset{label/align/.is choice}
1233 \ctikzset{label/align/straight/.code={\ctikzsetvalof{label/align}{straight}}}
1234 \ctikzset{label/align/rotate/.code={\ctikzsetvalof{label/align}{rotate}}}
1235 \ctikzset{label/align/smart/.code={\ctikzsetvalof{label/align}{smart}}}
1236
1237 %%%%%%%%%% new
1238 \pgfkeys{\circuitikzbasekey/.search also={/tikz}}
1239 %%%---------- close: tex/pgfcirc.defines
1240 %%%%%%%%%%% Springe nach tex/pgfcircutils
1241 %%%---------- open: tex/pgfcircutils.tex
1242 % Copyright 2007-2009 by Massimo Redaelli
1243 %
1244 % This file may be distributed and/or modified
1245 %
1246 % 1. under the LaTeX Project Public License and/or
1247 % 2. under the GNU Public License.
1248 %
1249 % See the file doc/LICENSE for more details.
1250
1251 %\def\pgf@circ@handleSI#1{%
1252 % \pgf@circ@siunitx@resfalse
1253 %
1254 % \edef\len{\stringlength[e]{#1}}
1255 %\testmatchingchar[e]{#1}{\len}{>}%
1256 %\ifmatchingchar%
1257 % \ifnum\findchars{#1}{<}=0
1258 % \def\pgf@circ@handleSI@val{\substring{#1}{1}{\findchars{#1}{<}-1}}
1259 %\def\pgf@circ@handleSI@unit{\substring{#1}{\findchars{#1}{<}-1}+1}{\stringlength{#1}}
1260 %\pgf@circ@siunitx@restrue
1261 % \else
1262 % \fi
1263 %\else
1264 %\fi
1265 %}
1266
1267 \def\pgf@circ@handleSI#1{
1268 \noexpandarg
1269 \def\pgf@temp{}
1270 \StrBetween{#1}{<}{>}[\pgf@circ@handleSI@unit]
1271 \StrLen{\pgf@circ@handleSI@unit}[\pgf@circ@handleSI@unit@len]
1272
1273 \ifnum\pgf@circ@handleSI@unit@len=0
1274 \pgf@circ@siunitx@resfalse
1275 \else
1276 \IfEndWith{#1}{>}{
1277 \pgf@circ@siunitx@restrue
1278 \noexpandarg
1279 \StrBefore{#1}{<}[\pgf@circ@handleSI@val]
1280 %\typeout{si |#1|}
1281 }{
1282 \pgf@circ@siunitx@resfalse
1283 %\typeout{no si |#1|}
1284 }
1285 \fi
1286 }
1287
1288 \def\pgf@circ@ifkeyempty#1{
1289 \pgfextra{
1290 \ctikzset{#1/.get=\pgf@circ@temp}
1291 \edef\pgf@temp{}
1292 }
1293 \ifx\pgf@circ@temp\pgf@temp
1294 }
1295
1296 %%%---------- close: tex/pgfcircutils
1297 %%%%%%%%%%% Springe nach tex/pgfcircmath
1298 %%%---------- open: tex/pgfcircmath.tex
1299 % Copyright 2007-2009 by Massimo Redaelli
1300 %
1301 % This file may be distributed and/or modified
1302 %
1303 % 1. under the LaTeX Project Public License and/or
1304 % 2. under the GNU Public License.
1305 %
1306 % See the file doc/LICENSE for more details.
1307
1308 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1309 %% Math routines
1310
1311 \def\pgf@circ@stripdecimals#1.#2\pgf@nil{#1}
1312
1313 % angle between 0 and 360
1314 \def\pgf@circ@slope#1#2{%
1315 \pgf@process{#1}%
1316 \pgf@xa=\pgf@x%
1317 \pgf@ya=\pgf@y%
1318 \pgf@process{#2}%
1319 \advance\pgf@x by-\pgf@xa%
1320 \advance\pgf@y by-\pgf@ya%
1321 \ifdim\pgf@x<0.1pt
1322 \ifdim\pgf@x>-0.1pt % vertical
1323 \ifdim\pgf@y<0pt
1324 \def\pgfmathresult{-90.0}
1325 \else
1326 \def\pgfmathresult{+90.0}
1327 \fi
1328 \else % oblique with dx < 0
1329 \pgfmathdivide{\pgf@y}{\pgf@x}
1330 \pgfmathatan{\pgfmathresult}
1331 \ifdim\pgf@x<0pt
1332 \pgfmathsubtract{\pgfmathresult}{+180}
1333 \fi
1334 \fi
1335 \else % oblique with dx > 0
1336 \pgfmathdivide{\pgf@y}{\pgf@x}
1337 \pgfmathatan{\pgfmathresult}
1338 \ifdim\pgf@x<0pt
1339 \pgfmathsubtract{\pgfmathresult}{+180}
1340 \fi
1341 \fi
1342 \pgf@x=\pgfmathresult pt
1343 \ifdim\pgf@x<0pt
1344 \pgfmathadd{\pgfmathresult}{+360}
1345 \fi
1346 }
1347
1348
1349 %%%---------- close: tex/pgfcircmath
1350
1351 %%%%%%%%%%% Springe nach tex/pgfcircshapes
1352 %%%---------- open: tex/pgfcircshapes.tex
1353 % Copyright 2007-2009 by Massimo Redaelli
1354 %
1355 % This file may be distributed and/or modified
1356 %
1357 % 1. under the LaTeX Project Public License and/or
1358 % 2. under the GNU Public License.
1359 %
1360 % See the file doc/LICENSE for more details.
1361
1362 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1363 %% Other shapes
1364
1365
1366 %% Nothing
1367
1368 \pgfdeclareshape{emptyshape}{
1369 \savedanchor{\northeast}{%
1370 \pgf@x=.5\wd\pgfnodeparttextbox%
1371 \pgf@y=.5\ht\pgfnodeparttextbox%
1372 }
1373 \anchor{north}{
1374 \northeast
1375 \pgf@x=0cm
1376 }
1377 \anchor{east}{%
1378 \northeast
1379 \pgf@y=0cm
1380 }
1381 \anchor{south}{%
1382 \northeast
1383 \pgf@y=-\pgf@y
1384 \pgf@x=0cm
1385 }
1386 \anchor{west}{
1387 \northeast
1388 \pgf@y=0cm
1389 \pgf@x=-\pgf@x
1390 }
1391 \anchor{text}{%
1392 \pgfpointorigin
1393 }
1394 \anchor{center}{
1395 \pgfpointorigin
1396 }
1397 }
1398
1399 %% Full terminal
1400
1401 \pgfdeclareshape{circ}{
1402 \anchor{center}{
1403 \pgfpointorigin
1404 }
1405 \anchorborder{
1406 \pgf@circ@res@left=\pgf@x
1407 \pgf@circ@res@up=\pgf@y
1408 \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
1409 }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}
1410 }
1411 \behindforegroundpath{
1412
1413 \pgfscope
1414 \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
1415 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1416 \pgfusepath{draw,fill}
1417 \endpgfscope
1418
1419 }
1420 }
1421
1422 %% Empty terminal
1423
1424 \pgfdeclareshape{ocirc}{
1425 \anchor{center}{
1426 \pgfpointorigin
1427 }
1428 \anchorborder{
1429 \pgf@circ@res@left=\pgf@x
1430 \pgf@circ@res@up=\pgf@y
1431 \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
1432 }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}
1433 }
1434
1435 \behindforegroundpath{
1436
1437 \pgfscope
1438 \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
1439 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1440 \pgfsetfillcolor{white}
1441 \pgfusepath{draw,fill}
1442 \endpgfscope
1443
1444 }
1445 }
1446
1447 %% Diamond terminal
1448
1449 \pgfdeclareshape{diamondpole}{
1450 \anchor{center}{
1451 \pgfpointorigin
1452 }
1453 \anchorborder{
1454 \pgf@circ@res@left=\pgf@x
1455 \pgf@circ@res@up=\pgf@y
1456 }
1457 \behindforegroundpath{
1458 \pgfscope
1459 \pgfmathsetlength{\pgf@circ@res@temp}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
1460 \pgftransformrotate{45}
1461 \pgfpathrectanglecorners
1462 {\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@temp}{\pgf@circ@res@up+\pgf@circ@res@temp}}
1463 {\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@temp}{\pgf@circ@res@up-\pgf@circ@res@temp}}
1464 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1465 \pgfusepath{draw,fill}
1466 \endpgfscope
1467 }
1468 }
1469
1470 %% Current arrow
1471
1472 \pgfdeclareshape{currarrow}{
1473 \anchor{center}{
1474 \pgfpointorigin
1475 }
1476 \behindforegroundpath{
1477
1478 \pgfscope
1479 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
1480 \divide \pgf@circ@res@step by 16
1481
1482 \pgfpathmoveto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
1483 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
1484 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@step}{0pt}}
1485 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1486 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
1487 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1488 \pgfusepath{draw,fill}
1489
1490 \endpgfscope
1491 }
1492
1493 }
1494
1495 %% Current arrow
1496
1497 \pgfdeclareshape{inputarrow}{
1498 \savedanchor{\tip}{
1499 \pgfpointorigin
1500 }
1501 \anchor{center}{
1502 \tip
1503 }
1504 \anchor{tip}{
1505 \tip
1506 }
1507 \behindforegroundpath{
1508
1509 \pgfscope
1510 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
1511 \divide \pgf@circ@res@step by 16
1512
1513 \pgfpathmoveto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}}
1514 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
1515 \pgfpathlineto{\pgfpoint{0pt}{0pt}}
1516 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1517 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}}
1518 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1519 \pgfusepath{fill}
1520
1521 \endpgfscope
1522 }
1523
1524 }
1525
1526
1527 %% box
1528
1529 \pgfdeclareshape{box}{
1530 \anchor{center}{
1531 \pgfpointorigin
1532 }
1533 \behindforegroundpath{
1534
1535 \pgfscope
1536 \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@Rlen
1537 \pgf@circ@res@step = 0.5\pgf@circ@res@step
1538 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1539 \pgfpathrectanglecorners{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@step}}{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1540 \pgfusepath{draw}
1541 \endpgfscope
1542 }
1543
1544 }
1545
1546 %%%---------- close: tex/pgfcircshapes
1547 %%%%%%%%%%% Springe nach tex/pgfcircmonopoles
1548 %%%---------- open: tex/pgfcircmonopoles.tex
1549 % Copyright 2007-2009 by Massimo Redaelli
1550 %
1551 % This file may be distributed and/or modified
1552 %
1553 % 1. under the LaTeX Project Public License and/or
1554 % 2. under the GNU Public License.
1555 %
1556 % See the file doc/LICENSE for more details.
1557
1558 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1559 %% Monopoles
1560
1561 %% Ground symbol
1562
1563 \pgfdeclareshape{ground}{
1564 \anchor{center}{
1565 \pgfpointorigin
1566 }
1567 \behindforegroundpath{
1568 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1569
1570 \pgfscope
1571 \pgfpathmoveto{\pgfpointorigin}
1572 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1573 \pgfusepath{draw}
1574
1575 \pgfstartlinewidth=\pgflinewidth
1576 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1577
1578 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1579 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1580 \pgfusepath{draw}
1581
1582 \pgfsetlinewidth{\pgfstartlinewidth}
1583 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1584 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1585 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1586 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1587 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1588 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1589 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1590 \pgfusepath{draw}
1591
1592
1593 \pgfsetlinewidth{\pgfstartlinewidth}
1594
1595 \endpgfscope
1596 }
1597
1598 }
1599
1600
1601
1602 \pgfdeclareshape{rground}{
1603 \anchor{center}{
1604 \pgfpointorigin
1605 }
1606 \behindforegroundpath{
1607 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1608
1609 \pgfscope
1610 \pgfpathmoveto{\pgfpointorigin}
1611 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1612 \pgfusepath{draw}
1613
1614 \pgfstartlinewidth=\pgflinewidth
1615 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1616
1617 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1618 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1619 \pgfusepath{draw}
1620
1621
1622 \pgfsetlinewidth{\pgfstartlinewidth}
1623
1624 \endpgfscope
1625 }
1626 }
1627
1628 \pgfdeclareshape{tground}{
1629 \anchor{center}{
1630 \pgfpointorigin
1631 }
1632 \behindforegroundpath{
1633 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1634
1635 \pgfscope
1636 \pgfpathmoveto{\pgfpointorigin}
1637 %\pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1638 \pgfusepath{draw}
1639
1640 \pgfstartlinewidth=\pgflinewidth
1641 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth}
1642
1643 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
1644 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
1645 \pgfusepath{draw}
1646
1647
1648 \pgfsetlinewidth{\pgfstartlinewidth}
1649
1650 \endpgfscope
1651 }
1652 }
1653
1654 \pgfdeclareshape{sground}{
1655 \anchor{center}{
1656 \pgfpointorigin
1657 }
1658 \behindforegroundpath{
1659 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1660
1661 \pgfscope
1662 \pgfpathmoveto{\pgfpointorigin}
1663 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1664 \pgfusepath{draw}
1665
1666 \pgfstartlinewidth=\pgflinewidth
1667 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1668
1669 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1670 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1671 \pgfpathlineto{\pgfpoint{0}{-1.8\pgf@circ@res@step}}
1672 \pgfpathclose
1673 \pgfusepath{draw}
1674
1675
1676 \pgfsetlinewidth{\pgfstartlinewidth}
1677
1678 \endpgfscope
1679 }
1680
1681 }
1682
1683 % noiseless ground
1684 \pgfdeclareshape{nground}{
1685 \anchor{center}{
1686 \pgfpointorigin
1687 }
1688 \behindforegroundpath{
1689 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1690
1691 \pgfscope
1692 \pgfpathmoveto{\pgfpointorigin}
1693 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1694 \pgfusepath{draw}
1695
1696 \pgfstartlinewidth=\pgflinewidth
1697 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1698
1699 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1700 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1701 \pgfusepath{draw}
1702
1703 \pgfsetlinewidth{\pgfstartlinewidth}
1704 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1705 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1706 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1707 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1708 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1709 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1710 \pgfusepath{draw}
1711
1712 \pgfpathmoveto{\pgfpoint{1.3\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1713 \pgfpatharc{0}{180}{1.3\pgf@circ@res@step}
1714 \pgfusepath{draw}
1715
1716 \pgfsetlinewidth{\pgfstartlinewidth}
1717 \endpgfscope
1718 }
1719 }
1720
1721 % protective ground
1722 \pgfdeclareshape{pground}{
1723 \anchor{center}{
1724 \pgfpointorigin
1725 }
1726 \behindforegroundpath{
1727 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1728
1729 \pgfscope
1730 \pgfpathmoveto{\pgfpointorigin}
1731 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1732 \pgfusepath{draw}
1733
1734 \pgfstartlinewidth=\pgflinewidth
1735 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1736
1737 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1738 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1739 \pgfpathcircle{\pgfpoint{0pt}{-\pgf@circ@res@step}} {1.2\pgf@circ@res@step}
1740 \pgfusepath{draw}
1741
1742 \pgfsetlinewidth{\pgfstartlinewidth}
1743 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1744 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1745 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1746 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1747 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1748 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1749 \pgfusepath{draw}
1750
1751 \pgfsetlinewidth{\pgfstartlinewidth}
1752 \endpgfscope
1753 }
1754 }
1755
1756 % chassis ground
1757 \pgfdeclareshape{cground}{
1758 \anchor{center}{
1759 \pgfpointorigin
1760 }
1761 \behindforegroundpath{
1762 \pgf@circ@res@step=\ctikzvalof{monopoles/chassis/width}\pgf@circ@Rlen
1763
1764 \pgfscope
1765 \pgfpathmoveto{\pgfpointorigin}
1766 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1767 \pgfusepath{draw}
1768
1769 \pgfpathmoveto{\pgfpoint{-1.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1770 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1771 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1772 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1773 \pgfpathmoveto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1774 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1775 \pgfusepath{draw}
1776 \endpgfscope
1777 }
1778 }
1779
1780 % Contributed by Leonardo Azzinnari
1781 \pgfdeclareshape{tlinestub}{
1782 \anchor{center}{\pgfpointorigin}
1783 \behindforegroundpath{
1784 \pgfstartlinewidth=\pgflinewidth
1785
1786 \pgf@circ@res@step=\ctikzvalof{bipoles/tline/width} \pgf@circ@Rlen
1787 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1788
1789 \pgfpathmoveto{\pgfpointorigin}
1790 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0pt}}
1791 \pgfusepath{draw}
1792 \pgfscope
1793 \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}}
1794 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1795 \pgfpathlineto{\pgfpoint{1.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1796 \pgfpatharc{90}{-90}{0.125\pgf@circ@res@step and 0.25\pgf@circ@res@step}
1797 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-0.25\pgf@circ@res@step}}
1798 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1799 \pgfusepath{draw}
1800 \endpgfscope
1801 }
1802 }
1803
1804
1805
1806
1807 \pgfdeclareshape{antenna}{
1808 \anchor{center}{\pgfpointorigin}
1809 \savedanchor{\northeast}{
1810 \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen
1811 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1812 \pgf@y=6\pgf@circ@res@step
1813 }
1814 \anchor{text}{
1815 \northeast
1816 \pgf@x=\ctikzvalof{monopoles/antenna/label/xanchor}\pgf@x
1817 \pgf@y=\ctikzvalof{monopoles/antenna/label/yanchor}\pgf@y
1818 }
1819 \behindforegroundpath{
1820 \pgfstartlinewidth=\pgflinewidth
1821 \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen
1822
1823 % \pgfpathmoveto{\pgfpointorigin}
1824 % \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1825 % \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1826 % \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1827
1828 \pgftransformxshift{ -4\pgf@circ@res@step }
1829
1830 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1831 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1832
1833 \pgfusepath{draw}
1834
1835 \pgfscope
1836 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1837 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1838 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1839 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1840 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1841 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1842 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1843 \pgfusepath{draw}
1844 \endpgfscope
1845 \pgfsetlinewidth{\pgfstartlinewidth}
1846
1847 }
1848 }
1849
1850
1851 \pgfdeclareshape{txantenna}{
1852 \anchor{center}{\pgfpointorigin}
1853 \savedanchor{\northeast}{
1854 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1855 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1856 \pgf@y=6\pgf@circ@res@step
1857 }
1858 \anchor{text}{
1859 \northeast
1860 \pgf@x=\ctikzvalof{monopoles/txantenna/label/xanchor}\pgf@x
1861 \pgf@y=\ctikzvalof{monopoles/txantenna/label/yanchor}\pgf@y
1862 }
1863 \behindforegroundpath{
1864 \pgfstartlinewidth=\pgflinewidth
1865 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1866
1867 \pgfpathmoveto{\pgfpointorigin}
1868 \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1869 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1870 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1871
1872 \pgfusepath{draw}
1873
1874 \pgfscope
1875 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1876 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1877 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1878 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1879 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1880 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1881 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1882 \pgfusepath{draw}
1883 \endpgfscope
1884 \pgfpathmoveto{\pgfpoint{5.5\pgf@circ@res@step}{6\pgf@circ@res@step}}
1885 % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step}
1886 \pgfpatharc{30}{-30}{2\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{6.25\pgf@circ@res@step}}
1887 \pgfpatharc{30}{-30}{2.5\pgf@circ@res@step}
1888 \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.5\pgf@circ@res@step}}
1889 \pgfpatharc{30}{-30}{3\pgf@circ@res@step}
1890 \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.75\pgf@circ@res@step}}
1891 \pgfpatharc{30}{-30}{3.5\pgf@circ@res@step}
1892 \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{7\pgf@circ@res@step}}
1893 \pgfpatharc{30}{-30}{4\pgf@circ@res@step}
1894 \pgfusepath{draw}
1895 \pgfsetlinewidth{\pgfstartlinewidth}
1896
1897 }
1898 }
1899
1900
1901 \pgfdeclareshape{rxantenna}{
1902 \anchor{center}{\pgfpointorigin}
1903 \savedanchor{\northeast}{
1904 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1905 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1906 \pgf@y=6\pgf@circ@res@step
1907 }
1908 \anchor{text}{
1909 \northeast
1910 \pgf@x=\ctikzvalof{monopoles/rxantenna/label/xanchor}\pgf@x
1911 \pgf@y=\ctikzvalof{monopoles/rxantenna/label/yanchor}\pgf@y
1912 }
1913 \behindforegroundpath{
1914 \pgfstartlinewidth=\pgflinewidth
1915 \pgf@circ@res@step=\ctikzvalof{monopoles/rxantenna/width}\pgf@circ@Rlen
1916
1917 \pgfpathmoveto{\pgfpointorigin}
1918 \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1919 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1920 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1921
1922 \pgfusepath{draw}
1923
1924 \pgfscope
1925 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1926 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1927 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1928 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1929 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1930 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1931 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1932 \pgfusepath{draw}
1933 \endpgfscope
1934
1935 \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{7\pgf@circ@res@step}}
1936 % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step}
1937 \pgfpatharc{150}{210}{4\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.75\pgf@circ@res@step}}
1938 \pgfpatharc{150}{210}{3.5\pgf@circ@res@step}
1939 \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.5\pgf@circ@res@step}}
1940 \pgfpatharc{150}{210}{3\pgf@circ@res@step}
1941 \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{6.25\pgf@circ@res@step}}
1942 \pgfpatharc{150}{210}{2.5\pgf@circ@res@step}
1943 \pgfpathmoveto{\pgfpoint{8\pgf@circ@res@step}{6\pgf@circ@res@step}}
1944 \pgfpatharc{150}{210}{2\pgf@circ@res@step}
1945 \pgfusepath{draw}
1946 \pgfsetlinewidth{\pgfstartlinewidth}
1947
1948 }
1949 }
1950
1951 % Vcc
1952 \pgfdeclareshape{vcc}{
1953 \anchor{center}{\pgfpointorigin}
1954 \anchor{text}{
1955 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
1956 \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}}
1957 \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}}
1958 \pgf@x=0pt
1959 \pgf@y=2\pgf@circ@res@step
1960 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
1961 \pgf@x=-.5\wd\pgfnodeparttextbox
1962 }
1963 \behindforegroundpath{
1964 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
1965 \pgfscope
1966 \pgfpathmoveto{\pgfpointorigin}
1967 \pgfpathlineto{\pgfpoint{0pt}{1.5\pgf@circ@res@step}}
1968 \pgfusepath{draw}
1969
1970 \pgfstartlinewidth=\pgflinewidth
1971 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1972
1973 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1974 \pgfpathlineto{\pgfpoint{0}{1.5\pgf@circ@res@step}}
1975 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1976 \pgfusepath{draw}
1977
1978 \pgfsetlinewidth{\pgfstartlinewidth}
1979
1980 \endpgfscope
1981 }
1982
1983 }
1984
1985 % Vee
1986 \pgfdeclareshape{vee}{
1987 \anchor{center}{\pgfpointorigin}
1988 \anchor{text}{
1989 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
1990 \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}}
1991 \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}}
1992 \pgf@x=0pt
1993 \pgf@y=-2\pgf@circ@res@step
1994 \advance \pgf@y by -1.5\ht\pgfnodeparttextbox
1995 \pgf@x=-.5\wd\pgfnodeparttextbox
1996 }
1997
1998 \behindforegroundpath{
1999 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
2000
2001 \pgfscope
2002 \pgfpathmoveto{\pgfpointorigin}
2003 \pgfpathlineto{\pgfpoint{0pt}{-1.5\pgf@circ@res@step}}
2004 \pgfusepath{draw}
2005
2006 \pgfstartlinewidth=\pgflinewidth
2007 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2008
2009 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
2010 \pgfpathlineto{\pgfpoint{0}{-1.5\pgf@circ@res@step}}
2011 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
2012 \pgfusepath{draw}
2013 \pgfsetlinewidth{\pgfstartlinewidth}
2014
2015 \endpgfscope
2016 }
2017
2018 }
2019
2020
2021 % match
2022 \pgfdeclareshape{match}{
2023 \anchor{center}{
2024 \pgfpointorigin
2025 }
2026 \anchor{text}{
2027 \pgf@x=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen
2028 \pgf@x=1.5\pgf@x
2029 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
2030 \pgf@y=-1.5\ht\pgfnodeparttextbox
2031 }
2032 \behindforegroundpath{
2033 \pgf@circ@res@step=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen
2034
2035 \pgfscope
2036 \pgfpathmoveto{\pgfpointorigin}
2037 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0pt}}
2038 \pgfusepath{draw}
2039
2040 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
2041 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
2042 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0}}
2043 \pgfusepath{fill}
2044
2045 \pgfsetlinewidth{\pgfstartlinewidth}
2046
2047 \endpgfscope
2048 }
2049
2050 }
2051
2052
2053 %%%---------- close: tex/pgfcircmonopoles
2054 %%%%%%%%%%% Springe nach tex/pgfcircbipoles
2055 %%%---------- open: tex/pgfcircbipoles.tex
2056 % Copyright 2007-2009 by Massimo Redaelli
2057 %
2058 % This file may be distributed and/or modified
2059 %
2060 % 1. under the LaTeX Project Public License and/or
2061 % 2. under the GNU Public License.
2062 %
2063 % See the file doc/LICENSE for more details.
2064
2065 %% Generic macro for defining a bipole shape
2066 % #1 - additional anchors
2067 % #2 - lower y-size of the bipole (from the center).
2068 % #3 - #shape is the name of the shape
2069 % #4 - upper y-size of the bipole (from the center)
2070 % #5 - width of the bipole
2071 % #6 - macros drawing the bipole
2072
2073
2074 \long\def\pgfcircdeclarebipole#1#2#3#4#5#6{
2075 \pgfdeclareshape{#3shape}{
2076
2077 \savedanchor{\northeast}{
2078 \pgf@y=#4\pgf@circ@Rlen
2079 \pgf@y=.5\pgf@y
2080 \pgf@x=#5\pgf@circ@Rlen
2081 \pgf@x=.5\pgf@x
2082 }
2083 \savedanchor{\northeastborder}{
2084 \pgf@y=#4\pgf@circ@Rlen
2085 \pgf@y=.5\pgf@y
2086 \pgf@y=\ctikzvalof{bipoles/border margin}\pgf@y
2087 \pgf@x=#5\pgf@circ@Rlen
2088 \pgf@x=.5\pgf@x
2089 \pgf@x=\ctikzvalof{bipoles/border margin}\pgf@x
2090 }
2091 \savedanchor{\southwestborder}{
2092 \pgf@y=-#2\pgf@circ@Rlen
2093 \pgf@y=.5\pgf@y
2094 \pgf@y=\ctikzvalof{bipoles/border margin}\pgf@y
2095 \pgf@x=-#5\pgf@circ@Rlen
2096 \pgf@x=.5\pgf@x
2097 \pgf@x=\ctikzvalof{bipoles/border margin}\pgf@x
2098 }
2099 \savedanchor{\southwest}{
2100 \pgf@y=-#2\pgf@circ@Rlen
2101 \pgf@y=.5\pgf@y
2102 \pgf@x=-#5\pgf@circ@Rlen
2103 \pgf@x=.5\pgf@x
2104 }
2105 \savedanchor{\centerpoint}{
2106 \pgf@circ@res@down=-#2\pgf@circ@Rlen
2107 \pgf@circ@res@up=#4\pgf@circ@Rlen
2108 \pgfpointorigin
2109 \pgf@y=\pgf@circ@res@up
2110 \advance\pgf@y by\pgf@circ@res@down
2111 \pgf@y=.5\pgf@y
2112 }
2113 \anchor{center}{\pgfpointorigin}
2114 \anchor{n}{
2115 \northeast
2116 \pgf@x=0cm
2117 }
2118 \anchor{ne}{
2119 \northeast
2120 }
2121 \anchor{nw}{
2122 \northeast
2123 \pgf@x=-\pgf@x
2124 }
2125 \anchor{e}{%
2126 \northeast
2127 \pgf@y=0cm
2128 }
2129 \anchor{s}{%
2130 \southwest
2131 \pgf@x=0cm
2132 }
2133 \anchor{se}{%
2134 \southwest
2135 \pgf@x=-\pgf@x
2136 }
2137 \anchor{sw}{%
2138 \southwest
2139 }
2140 \anchor{w}{
2141 \southwest
2142 \pgf@y=0cm
2143 }
2144 \anchor{north}{
2145 \northeast
2146 \pgf@x=0cm
2147 }
2148 \anchor{east}{%
2149 \northeast
2150 \pgf@y=0cm
2151 }
2152 \anchor{south}{%
2153 \southwest
2154 \pgf@x=0cm
2155 }
2156 \anchor{west}{
2157 \southwest
2158 \pgf@y=0cm
2159 }
2160 \anchor{right}{
2161 \northeast
2162 \pgf@y=0cm
2163 }
2164 \anchor{above}{
2165 \northeast
2166 \pgf@x=0cm
2167 }
2168 \anchor{left}{%
2169 \southwest
2170 \pgf@y=0cm
2171 }
2172 \anchor{below}{%
2173 \southwest
2174 \pgf@x=0cm
2175 }
2176 \anchor{a}{%
2177 \northeast
2178 \pgf@y=0cm
2179 }
2180 \anchor{b} {
2181 \southwest
2182 \pgf@y=0cm
2183 }
2184 \savedanchor{\textanchor}{%
2185 \pgf@y=\ht\pgfnodeparttextbox
2186 \pgf@x=-.5\wd\pgfnodeparttextbox
2187 }
2188 \anchor{text}{%
2189 \textanchor
2190 }
2191 \anchorborder{%
2192 \ifpgf@circuit@bipole@inverted
2193 \pgf@circ@res@left=-\pgf@x
2194 \pgf@circ@res@right=-\pgf@y
2195 \else
2196 \pgf@circ@res@left=\pgf@x
2197 \pgf@circ@res@right=\pgf@y
2198 \fi
2199 \ifdim\pgf@circ@res@right>0cm
2200 \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\northeastborder}
2201 \else
2202 \southwestborder
2203 \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\pgfpoint{-\pgf@x}{-\pgf@y}}
2204 \fi
2205 }
2206
2207 #1
2208
2209 \backgroundpath{
2210 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
2211
2212 \northeast
2213 \pgf@circ@res@up = \pgf@y
2214 \pgf@circ@res@zero = 0cm
2215 \pgf@circ@res@left = -\pgf@x
2216 \pgf@circ@res@right = \pgf@x
2217 \southwest
2218 \pgf@circ@res@down = \pgf@y
2219
2220 \pgfstartlinewidth=\pgflinewidth
2221 \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
2222 #6
2223
2224 \pgfsetlinewidth{\pgfstartlinewidth}
2225 }
2226 }
2227 }
2228
2229 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2230 %% Standard bipole shapes declarations
2231
2232 %% Resistor
2233 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/resistor/height}}{resistor}{\ctikzvalof{bipoles/resistor/height}}{\ctikzvalof{bipoles/resistor/width}}{
2234 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2235 \pgftransformationadjustments
2236 \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
2237 \divide \pgf@circ@res@step by 12
2238
2239 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
2240 \pgf@circ@res@other = \pgf@circ@res@left
2241 \advance\pgf@circ@res@other by \pgf@circ@res@step
2242 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
2243 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2244 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2245 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2246 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
2247 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2248 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2249 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2250 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
2251 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2252 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2253 \advance\pgf@circ@res@other by \pgf@circ@res@step
2254 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
2255 \pgfsetbeveljoin
2256 \pgfusepath{draw}
2257 }
2258
2259
2260
2261 %% Variable resistor
2262 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistor/height}}{vresistor}{\ctikzvalof{bipoles/vresistor/height}}{\ctikzvalof{bipoles/vresistor/width}}{ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2263 \pgftransformationadjustments
2264 \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
2265 \divide \pgf@circ@res@step by 12
2266
2267 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
2268
2269 \pgf@circ@res@other = \pgf@circ@res@left
2270 \advance\pgf@circ@res@other by \pgf@circ@res@step
2271 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
2272 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2273 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
2274 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2275 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
2276 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2277 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
2278 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2279 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
2280 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2281 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
2282 \advance\pgf@circ@res@other by \pgf@circ@res@step
2283 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
2284 \pgfsetbeveljoin
2285 \pgfusepath{draw}
2286
2287 \pgfscope
2288 \pgfsetarrowsend{latex'}
2289 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@other}{\pgf@circ@res@up}}
2290 \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@other}{\pgf@circ@res@down}}
2291 \pgfusepath{draw}
2292 \endpgfscope
2293 }
2294
2295
2296
2297 %% Capacitor
2298
2299 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/capacitor/height}}{capacitor}{\ctikzvalof{bipoles/capacitor/height}}{\ctikzvalof{bipoles/capacitor/width}}{
2300 \pgf@circ@res@step = \ctikzvalof{bipoles/capacitor/width}\pgf@circ@Rlen
2301 \divide \pgf@circ@res@step by 5
2302
2303 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2304 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2305 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
2306
2307 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2308 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2309 \pgfusepath{draw}
2310 }
2311
2312
2313 %% Polar Capacitor
2314
2315 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pcapacitor/height}}{polarcapacitor}{\ctikzvalof{bipoles/pcapacitor/height}}{\ctikzvalof{bipoles/pcapacitor/width}}{
2316 \pgf@circ@res@step = \ctikzvalof{bipoles/pcapacitor/width}\pgf@circ@Rlen
2317 \divide \pgf@circ@res@step by 5
2318
2319 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2320
2321 \pgfscope
2322 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left+ \ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}{\pgf@circ@res@up}}
2323 \pgftransformrotate{-90}
2324 \pgfpathsine{\pgfpoint{\pgf@circ@res@up}{-\ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}}
2325 \pgfpathcosine{\pgfpoint{\pgf@circ@res@up}{\ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}}
2326 \pgfusepath{draw}
2327 \endpgfscope
2328
2329 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2330 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2331 \pgfusepath{draw}
2332
2333 }
2334
2335 %% Electrolytic Capacitor
2336
2337 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ecapacitor/height}}{ecapacitor}{\ctikzvalof{bipoles/ecapacitor/height}}{\ctikzvalof{bipoles/ecapacitor/width}}{
2338 \pgf@circ@res@step = \ctikzvalof{bipoles/ecapacitor/width}\pgf@circ@Rlen
2339 \divide \pgf@circ@res@step by 5
2340 \pgfsetrectcap
2341 % % % Draw plus pole
2342 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2343 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2344 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@up}}
2345 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
2346 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
2347 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2348 \pgfsetfillcolor{white}
2349 \pgfusepath{draw,fill}
2350 % % Draw minus pole
2351 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2352 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2353 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@down}}
2354 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2355 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2356 \pgfsetfillcolor{black}
2357 \pgfusepath{draw,fill}
2358 \pgfsetfillcolor{black}
2359 % % plus pole annotation
2360 \pgftext[right,at=\pgfpoint{1.2\pgf@circ@res@left}{.6\pgf@circ@res@up}]
2361 {\pgfkeysvalueof{/tikz/circuitikz/bipoles/ecapacitor/font} $+$}
2362 }
2363
2364 %% Battery
2365
2366 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery/height}}{battery}{\ctikzvalof{bipoles/battery/height}}{\ctikzvalof{bipoles/battery/width}}{
2367 \pgf@circ@res@step = \ctikzvalof{bipoles/battery/width}\pgf@circ@Rlen
2368 \divide \pgf@circ@res@step by 6
2369
2370 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2371 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2372 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
2373
2374 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{.5\pgf@circ@res@up}}
2375 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{.5\pgf@circ@res@down}}
2376
2377 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2378 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
2379
2380 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}
2381 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}
2382
2383 \pgfusepath{draw}
2384 }
2385
2386
2387 %% Battery 1
2388
2389 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery1/height}}{battery1}{\ctikzvalof{bipoles/battery1/height}}{\ctikzvalof{bipoles/battery1/width}}{
2390 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{0}}
2391 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
2392 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{0}}
2393 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}}
2394 \pgfusepath{draw}
2395
2396 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2397 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@up}}
2398 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@down}}
2399
2400 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@up}}
2401 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@down}}
2402
2403
2404
2405
2406 \pgfusepath{draw}
2407 }
2408
2409
2410
2411 %% cute inductor
2412
2413 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/lower coil height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
2414 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2415 \pgftransformationadjustments
2416
2417 \pgfmathsetlength{\pgf@circ@res@other}%width of small coil
2418 {0.5*\ctikzvalof{bipoles/cuteinductor/coil aspect}*\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/cuteinductor/coils}-1)}
2419
2420
2421 \pgfmathsetlength{\pgf@circ@res@step}
2422 {(\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/cuteinductor/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/cuteinductor/coils}/2}
2423
2424 \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
2425 \foreach \x in {2,...,\ctikzvalof{bipoles/cuteinductor/coils}}
2426 {
2427 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up}
2428 \pgfpatharc{0}{-180}{\pgf@circ@res@other and -\pgf@circ@res@down}
2429 }
2430 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up}
2431 \pgfsetbuttcap
2432 \pgfsetbeveljoin
2433 \pgfusepath{stroke}
2434 }
2435
2436 %% variable cute inductor
2437
2438 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcuteinductor/lower coil height}}{vcuteinductor}{\ctikzvalof{bipoles/vcuteinductor/height}}{\ctikzvalof{bipoles/vcuteinductor/width}}{
2439 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2440 \pgftransformationadjustments
2441
2442 \pgfmathsetlength{\pgf@circ@res@other}%width of small coil
2443 {0.5*\ctikzvalof{bipoles/vcuteinductor/coil aspect}*\ctikzvalof{bipoles/vcuteinductor/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/vcuteinductor/coils}-1)}
2444
2445
2446 \pgfmathsetlength{\pgf@circ@res@step}
2447 {(\ctikzvalof{bipoles/vcuteinductor/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/vcuteinductor/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/vcuteinductor/coils}/2}
2448
2449 \pgfscope
2450 \pgfsetarrowsend{latex'}
2451 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
2452 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2453 \pgfusepath{draw}
2454 \endpgfscope
2455
2456 \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
2457 \foreach \x in {2,...,\ctikzvalof{bipoles/vcuteinductor/coils}}
2458 {
2459 \pgfpatharc{180}{0}{\pgf@circ@res@step and .5\pgf@circ@res@up}
2460 \pgfpatharc{0}{-180}{\pgf@circ@res@other and -.5\pgf@circ@res@down}
2461 }
2462 \pgfpatharc{180}{0}{\pgf@circ@res@step and .5\pgf@circ@res@up}
2463 \pgfsetbuttcap
2464 \pgfsetbeveljoin
2465 \pgfusepath{stroke}
2466 }
2467
2468 %% american inductor
2469
2470 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/americaninductor/height 2}}{americaninductor}{\ctikzvalof{bipoles/americaninductor/height}}{\ctikzvalof{bipoles/americaninductor/width}}{
2471 \pgf@circ@res@step=\ctikzvalof{bipoles/americaninductor/width}\pgf@circ@Rlen
2472 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2473 \pgftransformationadjustments
2474 \advance \pgf@circ@res@step by \pgfhorizontaltransformationadjustment\pgflinewidth
2475 \divide \pgf@circ@res@step by \ctikzvalof{bipoles/americaninductor/coils}
2476 \divide \pgf@circ@res@step by 2
2477 \pgf@circ@res@other = \ctikzvalof{bipoles/americaninductor/coil height}\pgf@circ@Rlen
2478
2479 \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
2480 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2481 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2482 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2483 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2484 \pgfsetbuttcap
2485 \pgfsetbeveljoin
2486 \pgfusepath{stroke}
2487 }
2488
2489 %% variable american inductor
2490
2491 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{
2492 \pgf@circ@res@step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf@circ@Rlen
2493 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2494 \pgftransformationadjustments
2495 \advance \pgf@circ@res@step by \pgfhorizontaltransformationadjustment\pgflinewidth
2496 \divide \pgf@circ@res@step by \ctikzvalof{bipoles/vamericaninductor/coils}
2497 \divide \pgf@circ@res@step by 2
2498 \pgf@circ@res@other = \ctikzvalof{bipoles/vamericaninductor/coil height}\pgf@circ@Rlen
2499
2500 \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
2501 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2502 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2503 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2504 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2505 \pgfsetbuttcap
2506 \pgfsetbeveljoin
2507 \pgfusepath{stroke}
2508
2509 \pgfscope
2510 \pgfsetarrowsend{latex'}
2511 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
2512 \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@up}}
2513 \pgfusepath{draw}
2514 \endpgfscope
2515 }
2516
2517
2518 %% Independent voltage source
2519
2520 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsource/height}}{vsource}{\ctikzvalof{bipoles/vsource/height}}{\ctikzvalof{bipoles/vsource/width}}{
2521
2522 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2523
2524 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2525 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2526 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2527 \pgfusepath{draw}
2528 }
2529
2530
2531 %% Independent voltage source - American style
2532
2533 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourceam/height}}{vsourceAM}{\ctikzvalof{bipoles/vsourceam/height}}{\ctikzvalof{bipoles/vsourceam/width}}{
2534
2535 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2536
2537 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2538
2539 \ifpgf@circ@oldvoltagedirection
2540 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$+$}
2541 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$-$}
2542 \else
2543 \ifpgf@circuit@bipole@voltage@backward
2544 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$+$}
2545 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$-$}
2546 \else
2547 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$-$}
2548 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$+$}
2549 \fi
2550 \fi
2551 \pgfusepath{draw}
2552 }
2553
2554
2555
2556 %% Independent sinusoidal voltage source
2557
2558 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesin/height}}{vsourcesin}{\ctikzvalof{bipoles/vsourcesin/height}}{\ctikzvalof{bipoles/vsourcesin/width}}{
2559
2560 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2561 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2562 \pgfusepath{draw}
2563
2564 \pgf@circ@res@up = .5\pgf@circ@res@up
2565 \pgfscope
2566 \pgftransformrotate{90}
2567 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2568 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2569 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2570 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2571 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2572 \pgfusepath{draw}
2573 \endpgfscope
2574 }
2575
2576 % Triangle Voltage source - contributed by Ralf Farkas
2577 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcetri/height}}{vsourcetri}{\ctikzvalof{bipoles/vsourcetri/height}}{\ctikzvalof{bipoles/vsourcetri/width}}{
2578
2579 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2580 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2581 \pgfusepath{draw}
2582
2583 \pgf@circ@res@up = .5\pgf@circ@res@up
2584 \pgfscope
2585 \pgftransformrotate{90}
2586 \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}}
2587 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@up}{0.75\pgf@circ@res@up}}
2588 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@up}{-0.75\pgf@circ@res@up}}
2589 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}}
2590 \pgfusepath{draw}
2591 \endpgfscope
2592 }
2593
2594
2595 % contributed by Alistair Kwan
2596 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesquare/height}}{vsourcesquare}{\ctikzvalof{bipoles/vsourcesquare/height}}{\ctikzvalof{bipoles/vsourcesquare/width}}{
2597
2598 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2599 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2600 \pgfusepath{draw}
2601
2602 \pgf@circ@res@up = .5\pgf@circ@res@up
2603 \pgfscope
2604 \pgftransformrotate{90}
2605 \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}}
2606 \pgfpathlineto{\pgfpoint{-1\pgf@circ@res@up}{1\pgf@circ@res@up}}
2607 \pgfpathlineto{\pgfpoint{0\pgf@circ@res@up}{1\pgf@circ@res@up}}
2608 \pgfpathlineto{\pgfpoint{0\pgf@circ@res@up}{-1\pgf@circ@res@up}}
2609 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{-1\pgf@circ@res@up}}
2610 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}}
2611 \pgfusepath{draw}
2612 \endpgfscope
2613 }
2614
2615 % Triangle Voltage source - contributed by Ralf Farkas
2616 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcetri/height}}{vsourcetri}{\ctikzvalof{bipoles/vsourcetri/height}}{\ctikzvalof{bipoles/vsourcetri/width}}{
2617
2618 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2619 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2620 \pgfusepath{draw}
2621
2622 \pgf@circ@res@up = .5\pgf@circ@res@up
2623 \pgfscope
2624 \pgftransformrotate{90}
2625 \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}}
2626 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@up}{0.75\pgf@circ@res@up}}
2627 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@up}{-0.75\pgf@circ@res@up}}
2628 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}}
2629 \pgfusepath{draw}
2630 \endpgfscope
2631 }
2632
2633
2634 %% Empty Source
2635 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/esource/height}}{esource}{\ctikzvalof{bipoles/esource/height}}{\ctikzvalof{bipoles/esource/width}}{
2636 \pgfpointorigin
2637 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2638 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2639 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2640 \pgfusepath{draw}
2641 }
2642
2643 %% PV Source
2644 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pvsource/height}}{pvsource}{\ctikzvalof{bipoles/pvsource/height}}{\ctikzvalof{bipoles/pvsource/width}}{
2645 \pgfpointorigin
2646 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2647 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2648 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2649 \pgfusepath{draw}
2650
2651 %Adapted from battery1
2652 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@right}{0}}
2653 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
2654 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@left}{0}}
2655 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}}
2656 \pgfusepath{draw}
2657
2658 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2659 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@left}{.4\pgf@circ@res@up}}
2660 \pgfpathlineto{\pgfpoint{.15\pgf@circ@res@left}{.4\pgf@circ@res@down}}
2661
2662 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@right}{.6\pgf@circ@res@up}}
2663 \pgfpathlineto{\pgfpoint{.15\pgf@circ@res@right}{.6\pgf@circ@res@down}}
2664 \pgfusepath{draw}
2665
2666 %Arrow Part
2667 \pgfscope
2668 \pgfsetarrowsend{latex}
2669 \pgfpathmoveto{\pgfpointadd{\pgfpoint{.3\pgf@circ@res@left}{0}}{\pgfpointpolar{-45}{2.2\pgf@circ@res@up}}}
2670 \pgfpathlineto{\pgfpointadd{\pgfpoint{.3\pgf@circ@res@left}{0}}{\pgfpointpolar{-45}{1.3\pgf@circ@res@up}}}
2671 \pgfusepath{draw}
2672 \pgfpathmoveto{\pgfpointadd{\pgfpoint{0}{0.3\pgf@circ@res@up}}{\pgfpointpolar{-45}{2.2\pgf@circ@res@up}}}
2673 \pgfpathlineto{\pgfpointadd{\pgfpoint{0}{0.3\pgf@circ@res@up}}{\pgfpointpolar{-45}{1.3\pgf@circ@res@up}}}
2674 \pgfusepath{draw}
2675 \endpgfscope
2676
2677 }
2678
2679 %% Empty Source
2680 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/esource/height}}{esource}{\ctikzvalof{bipoles/esource/height}}{\ctikzvalof{bipoles/esource/width}}{
2681 \pgfpointorigin
2682 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2683 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2684 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2685 \pgfusepath{draw}
2686 }
2687
2688 %% DC Current Source with open shape
2689 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dcisource/height}}{dcisource}{\ctikzvalof{bipoles/dcisource/height}}{\ctikzvalof{bipoles/dcisource/width}}{
2690 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2691 \pgfpathmoveto{\pgfpointorigin}
2692 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}}\pgfpatharc{0}{90}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2693 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}}\pgfpatharc{0}{-90}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2694 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}\pgfpatharc{180}{270}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2695 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}\pgfpatharc{180}{90}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2696 \pgfusepath{draw}
2697 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2698 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@zero}}
2699 \pgfusepath{draw}
2700 \pgfscope
2701 \ifpgf@circ@oldvoltagedirection
2702 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2703 \else
2704 \ifpgf@circuit@bipole@current@backward
2705 \pgftransformshift{\pgfpoint{-.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2706 \pgftransformrotate{180}
2707 \else
2708 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2709 \fi\fi
2710 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
2711 \endpgfscope
2712 }
2713
2714 %% DC-Voltage source
2715 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dcvsource/height}}{dcvsource}{\ctikzvalof{bipoles/dcvsource/height}}{\ctikzvalof{bipoles/dcvsource/width}}{
2716 \pgfpointorigin
2717 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2718 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2719 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2720 \pgfusepath{draw}
2721 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@up}{.5\pgf@circ@res@left}}
2722 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@up}{.5\pgf@circ@res@right}}
2723 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@down}{.5\pgf@circ@res@left}}
2724 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@down}{.5\pgf@circ@res@right}}
2725 \pgfusepath{draw}
2726 }
2727
2728
2729 %% Independent current source
2730
2731 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isource}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
2732 \pgfpointorigin
2733 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2734 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2735 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2736 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
2737 \pgfusepath{draw}
2738 }
2739
2740 %% Independent double oo source
2741
2742 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/oosource/height}}{oosource}{\ctikzvalof{bipoles/oosource/height}}{\ctikzvalof{bipoles/oosource/width}}{
2743 \pgfpointorigin
2744 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2745 \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf@circ@res@left}{0}}
2746 {\ctikzvalof{bipoles/oosource/circlesize}\pgf@circ@res@left}
2747 \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf@circ@res@right}{0}}
2748 {\ctikzvalof{bipoles/oosource/circlesize}\pgf@circ@res@right}
2749 \pgfusepath{draw}
2750 }
2751
2752
2753 %% Independent current source - American
2754
2755 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isourceam/height}}{isourceAM}{\ctikzvalof{bipoles/isourceam/height}}{\ctikzvalof{bipoles/isourceam/width}}{
2756 \pgfpointorigin
2757 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2758 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2759 \pgfusepath{draw}
2760
2761 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2762 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@zero}}
2763 \pgfusepath{draw}
2764 \pgfscope
2765 \ifpgf@circ@oldvoltagedirection
2766 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2767 \else
2768 \ifpgf@circuit@bipole@current@backward
2769 \pgftransformshift{\pgfpoint{-.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2770 \pgftransformrotate{180}
2771 \else
2772 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2773 \fi\fi
2774 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
2775 \endpgfscope
2776 }
2777
2778
2779
2780
2781 %% Independent sinusoidal current source
2782
2783 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isourcesin}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
2784 \pgfpointorigin
2785 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2786 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2787 \pgfusepath{draw}
2788
2789 \pgf@circ@res@up = .5\pgf@circ@res@up
2790 \pgfscope
2791 \pgftransformrotate{90}
2792 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2793 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2794 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2795 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2796 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2797 \pgfusepath{draw}
2798 \endpgfscope
2799
2800 }
2801
2802
2803 %% Controlled voltage source
2804
2805 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsource/height}}{cvsource}{\ctikzvalof{bipoles/cvsource/height}}{\ctikzvalof{bipoles/cvsource/width}}{
2806
2807 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2808
2809 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2810 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2811 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2812 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2813 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2814 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2815 \pgfusepath{draw}
2816 }
2817
2818
2819
2820
2821 %% Controlled voltage source - American
2822
2823 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourceam/height}}{cvsourceAM}{\ctikzvalof{bipoles/cvsourceam/height}}{\ctikzvalof{bipoles/cvsourceam/width}}{
2824
2825 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2826
2827 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2828 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2829 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2830 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2831 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2832 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@left]{$+$}
2833 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@right]{$-$}
2834 \pgfusepath{draw}
2835 }
2836
2837
2838 %% Controlled sinusoidal voltage source
2839
2840 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cvsourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
2841
2842 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2843
2844 \pgfscope
2845 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2846 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2847 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2848 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2849 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2850 \pgfusepath{draw}
2851 \endpgfscope
2852
2853 \pgf@circ@res@up = .5\pgf@circ@res@up
2854 \pgfscope
2855 \pgftransformrotate{90}
2856 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2857 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2858 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2859 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2860 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2861 \pgfusepath{draw}
2862 \endpgfscope
2863 }
2864
2865
2866
2867 %% Controlled sinusoidal current source
2868
2869 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cisourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
2870
2871 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2872
2873 \pgfscope
2874 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2875 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2876 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2877 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2878 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2879 \pgfusepath{draw}
2880 \endpgfscope
2881
2882 \pgf@circ@res@up = .5\pgf@circ@res@up
2883 \pgfscope
2884 \pgftransformrotate{90}
2885 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2886 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2887 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2888 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2889 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2890 \pgfusepath{draw}
2891 \endpgfscope
2892 }
2893
2894
2895
2896
2897 %% Controlled current source
2898
2899 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisource/height}}{cisource}{\ctikzvalof{bipoles/cisource/height}}{\ctikzvalof{bipoles/cisource/width}}{
2900
2901 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2902
2903 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2904 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2905 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2906 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2907 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2908 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2909 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2910 \pgfusepath{draw}
2911 }
2912
2913
2914
2915
2916 %% Controlled current source - American
2917
2918 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisourceam/height}}{cisourceAM}{\ctikzvalof{bipoles/cisourceam/height}}{\ctikzvalof{bipoles/cisourceam/width}}{
2919
2920 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2921
2922 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2923 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2924 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2925 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2926 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2927 \pgfusepath{draw}
2928
2929 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2930 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@zero}}
2931 \pgfusepath{draw}
2932 \pgfscope
2933 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2934 \pgfnode{currarrow}{center}{}{}{\pgfusepath{draw}}
2935 \endpgfscope
2936 }
2937
2938 %% Black generic diode
2939
2940 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulldiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2941
2942 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2943
2944 \pgfscope
2945 \pgftransformxshift{\pgf@circ@res@left}
2946 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2947 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2948 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2949 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2950 \pgfusepath{draw,fill}
2951 \endpgfscope
2952 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2953 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2954 \pgfusepath{draw}
2955 }
2956
2957 %% Black Zener diode
2958
2959 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2960
2961 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2962
2963 \pgfscope
2964 \pgftransformxshift{\pgf@circ@res@left}
2965 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2966 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2967 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2968 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2969 \pgfusepath{draw,fill}
2970 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2971 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2972 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2973 \pgfusepath{draw}
2974 \endpgfscope
2975 }
2976
2977 %% Black alternative zigzag Zener diode
2978 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2979
2980 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2981
2982 \pgfscope
2983 \pgftransformxshift{\pgf@circ@res@left}
2984 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2985 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2986 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2987 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2988 \pgfusepath{draw,fill}
2989 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@up}}
2990 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2991 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2992 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@down}}
2993 \pgfusepath{draw}
2994 \endpgfscope
2995 }
2996
2997 %% Black Schottky diode
2998
2999 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullsdiode}{\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,fill}
3009
3010 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@down}}
3011 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3012 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3013 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3014 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3015 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3016 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@up}}
3017 \pgfusepath{draw}
3018 \endpgfscope
3019
3020 }
3021
3022 %% Black tunnel diode
3023
3024 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulltdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3025
3026 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3027 \pgfscope
3028 \pgftransformxshift{\pgf@circ@res@left}
3029 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3030 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3031 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3032 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3033 \pgfusepath{draw,fill}
3034
3035 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3036 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3037 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3038 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3039 \pgfusepath{draw}
3040 \endpgfscope
3041 }
3042
3043 %% Black light emitting diode
3044
3045 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulllediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3046
3047 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3048 \pgfscope
3049 \pgftransformxshift{\pgf@circ@res@left}
3050 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3051 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3052 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3053 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3054 \pgfusepath{draw,fill}
3055 \endpgfscope
3056 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3057 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3058 \pgfusepath{draw}
3059
3060 \pgfsetlinewidth{\pgfstartlinewidth}
3061 \pgfsetarrowsend{latex'}
3062 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
3063 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
3064 \pgfusepath{draw}
3065 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
3066 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
3067 \pgfusepath{draw}
3068
3069 }
3070
3071 %% Black photodiode
3072
3073 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullpdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3074
3075 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3076 \pgfscope
3077 \pgftransformxshift{\pgf@circ@res@left}
3078 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3079 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3080 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3081 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3082 \pgfusepath{draw,fill}
3083 \endpgfscope
3084 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3085 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3086 \pgfusepath{draw}
3087
3088 \pgfsetlinewidth{\pgfstartlinewidth}
3089 \pgfsetarrowsstart{latex'}
3090 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
3091 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
3092 \pgfusepath{draw}
3093 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
3094 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
3095 \pgfusepath{draw}
3096 }
3097
3098 %% Black varcap
3099
3100 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{fullvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
3101 \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3102 \pgfsetlinewidth{\pgf@circ@res@temp}
3103 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
3104 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3105 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3106 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
3107 \pgfusepath{draw,fill}
3108 %
3109 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@down}}
3110 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@up}}
3111 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3112 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3113 \pgfusepath{draw}
3114 }
3115
3116 %% Empty generic diode
3117
3118 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptydiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3119
3120
3121 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3122
3123 \pgfscope
3124 \pgftransformxshift{\pgf@circ@res@left}
3125 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3126 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3127 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3128 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3129 \pgfusepath{draw}
3130 \endpgfscope
3131 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3132 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3133 \pgfusepath{draw}
3134 }
3135
3136 %% Empty Zener diode
3137
3138 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3139
3140 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3141
3142 \pgfscope
3143 \pgftransformxshift{\pgf@circ@res@left}
3144 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3145 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3146 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3147 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3148 \pgfusepath{draw}
3149 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3150 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3151 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3152 \pgfusepath{draw}
3153 \endpgfscope
3154 }
3155
3156 %% Empty alternative zigzag Zener diode
3157 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3158
3159 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3160
3161 \pgfscope
3162 \pgftransformxshift{\pgf@circ@res@left}
3163 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3164 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3165 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3166 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3167 \pgfusepath{draw}
3168 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@up}}
3169 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3170 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3171 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@down}}
3172 \pgfusepath{draw}
3173 \endpgfscope
3174 }
3175 %% Empty Schottky diode
3176
3177 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptysdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3178
3179 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3180 \pgfscope
3181 \pgftransformxshift{\pgf@circ@res@left}
3182 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3183 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3184 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3185 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3186 \pgfusepath{draw}
3187
3188 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@down}}
3189 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3190 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3191 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3192 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3193 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3194 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@up}}
3195 \pgfusepath{draw}
3196 \endpgfscope
3197
3198 }
3199
3200 %% Empty tunnel diode
3201
3202 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptytdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3203
3204 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3205 \pgfscope
3206 \pgftransformxshift{\pgf@circ@res@left}
3207 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3208 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3209 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3210 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3211 \pgfusepath{draw}
3212
3213 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3214 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3215 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3216 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3217 \pgfusepath{draw}
3218 \endpgfscope
3219 }
3220
3221 %% Empty light emitting diode
3222
3223 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptylediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3224
3225 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3226 \pgfscope
3227 \pgftransformxshift{\pgf@circ@res@left}
3228 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3229 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3230 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3231 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3232 \pgfusepath{draw}
3233 \endpgfscope
3234 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3235 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3236 \pgfusepath{draw}
3237
3238 \pgfsetlinewidth{\pgfstartlinewidth}
3239 \pgfsetarrowsend{latex'}
3240 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
3241 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
3242 \pgfusepath{draw}
3243 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
3244 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
3245 \pgfusepath{draw}
3246 }
3247
3248 %% Empty photodiode
3249
3250 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptypdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3251
3252 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3253 \pgfscope
3254 \pgftransformxshift{\pgf@circ@res@left}
3255 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3256 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3257 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3258 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3259 \pgfusepath{draw}
3260 \endpgfscope
3261 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3262 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3263 \pgfusepath{draw}
3264
3265 \pgfsetlinewidth{\pgfstartlinewidth}
3266 \pgfsetarrowsstart{latex'}
3267 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
3268 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
3269 \pgfusepath{draw}
3270 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
3271 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
3272 \pgfusepath{draw}
3273 }
3274
3275 %% Empty varcap
3276
3277 \pgfcircdeclarebipole{
3278 \anchor{strokepathstart}{
3279 \northeast
3280 \pgf@y=0cm
3281 \advance\pgf@x by -\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth
3282 \advance\pgf@x by -\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth
3283 }
3284 \anchor{strokepathend}{
3285 \northeast
3286 \pgf@y=0cm
3287 }
3288 }{\ctikzvalof{bipoles/varcap/height}}{emptyvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
3289 \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3290 \pgfsetlinewidth{\pgf@circ@res@temp}
3291 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
3292 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3293 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3294 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
3295 \pgfusepath{draw}
3296 %
3297 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@down}}
3298 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@up}}
3299 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3300 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3301 \pgfusepath{draw}
3302 }
3303
3304 %% SPST
3305
3306 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{spst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
3307
3308 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3309
3310 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3311 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
3312 \pgfpathmoveto{\pgfpoint{.9\pgf@circ@res@left}{.9\pgf@circ@res@up}}
3313 \pgfpatharc{65}{25}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf@circ@Rlen}
3314 %\pgfsetarrowsend{latex'}
3315 \pgfusepath{draw}
3316
3317 \pgfpathmoveto{\pgfpoint{.1\pgf@circ@res@right}{-.25\pgf@circ@res@up}}
3318 \pgfpathlineto{\pgfpoint{.14\pgf@circ@res@right}{-.35\pgf@circ@res@up}}
3319 \pgfsetarrowsend{latex'}
3320 \pgfusepath{draw}
3321
3322 }
3323
3324 %% Closing SPST
3325
3326 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{cspst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
3327
3328 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3329
3330 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3331 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
3332 \pgfpathmoveto{\pgfpoint{.9\pgf@circ@res@left}{.9\pgf@circ@res@up}}
3333 \pgfpatharc{65}{25}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf@circ@Rlen}
3334 %\pgfsetarrowsend{latex'}
3335 \pgfusepath{draw}
3336
3337 }
3338
3339 %% Opening SPST
3340
3341 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{ospst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
3342
3343 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3344
3345 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3346 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
3347 \pgfpathmoveto{\pgfpoint{.3\pgf@circ@res@right}{.1\pgf@circ@res@down}}
3348 \pgfpatharc{15}{50}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf@circ@Rlen}
3349 %\pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
3350 \pgfusepath{draw}
3351
3352 \pgfpathmoveto{\pgfpoint{.85\pgf@circ@res@left}{1.25\pgf@circ@res@up}}
3353 \pgfpathlineto{\pgfpoint{.87\pgf@circ@res@left}{1.26\pgf@circ@res@up}}
3354 \pgfsetarrowsend{latex'}
3355 \pgfusepath{draw}
3356
3357
3358 }
3359
3360
3361 %% Push Button
3362
3363 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pushbutton/height 2}}{pushbutton}{\ctikzvalof{bipoles/pushbutton/height}}{\ctikzvalof{bipoles/pushbutton/width}}{
3364
3365 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3366 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@up}}
3367 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}
3368 \pgfpathmoveto{\pgfpoint{0}{.5\pgf@circ@res@up}}
3369 \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@up}}
3370 \pgfusepath{draw}
3371
3372 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3373 \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
3374 \pgftransformshift{\pgfpoint{2\pgf@circ@res@right}{0pt}}
3375 \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
3376 }
3377
3378 %METERINGSHAPE
3379 \long\def\drawmeteringcircle{
3380 \def\pgf@circ@temp{right}
3381 \ifx\tikz@res@label@pos\pgf@circ@temp
3382 \pgf@circ@res@step=-1.2\pgf@circ@res@up
3383 \else
3384 \def\pgf@circ@temp{below}
3385 \ifx\tikz@res@label@pos\pgf@circ@temp
3386 \pgf@circ@res@step=-1.2\pgf@circ@res@up
3387 \else
3388 \pgf@circ@res@step=1.2\pgf@circ@res@up
3389 \fi
3390 \fi
3391 %draw connections to circle
3392 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3393 \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@left}{\pgf@circ@res@zero}}
3394 \pgfpathmoveto{\pgfpoint{.9\pgf@circ@res@right}{\pgf@circ@res@zero}}
3395 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
3396 \pgfusepath{draw}
3397 %draw circle
3398 \pgfscope
3399 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3400 \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
3401 \pgfusepath{draw}
3402 \endpgfscope
3403 %draw arrow
3404 \pgfscope
3405 \pgfsetarrowsend{latex}
3406 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3407 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3408 \pgfusepath{draw}
3409 \endpgfscope
3410 }
3411 %AMPEREMETER
3412 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ammeter/height}}{ammeter}{\ctikzvalof{bipoles/ammeter/height}}{\ctikzvalof{bipoles/ammeter/width}}{
3413 \drawmeteringcircle
3414 \pgfnode{circle}{center}{\textbf{A}}{}{}
3415 }
3416 %OHMMETER
3417 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ohmmeter/height}}{ohmmeter}{\ctikzvalof{bipoles/ohmmeter/height}}{\ctikzvalof{bipoles/ohmmeter/width}}{
3418 \drawmeteringcircle
3419 \pgfnode{circle}{center}{\boldmath$\Omega$}{}{}
3420 }
3421 %VOLTMETER
3422 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/voltmeter/height}}{voltmeter}{\ctikzvalof{bipoles/voltmeter/height}}{\ctikzvalof{bipoles/voltmeter/width}}{
3423 \drawmeteringcircle
3424 \pgfnode{circle}{center}{\textbf{V}}{}{}
3425
3426 }
3427
3428 %% Short circuit
3429
3430 \pgfcircdeclarebipole{}{0}{short}{0}{0}{ }
3431
3432 %% Open circuit
3433
3434 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/open/height}}{open}{\ctikzvalof{bipoles/open/height}}{\ctikzvalof{bipoles/open/width}}{
3435
3436 }
3437
3438 %% Generic bipole - used as resistor by some (bleah)
3439
3440 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/generic/height}}{generic}{\ctikzvalof{bipoles/generic/height}}{\ctikzvalof{bipoles/generic/width}}{
3441
3442 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3443 %\divide \pgf@circ@res@step by 14
3444
3445 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3446 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3447
3448 \pgfusepath{draw}
3449 }
3450
3451
3452 %% fuse
3453
3454 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fuse/height}}{fuse}{\ctikzvalof{bipoles/fuse/height}}{\ctikzvalof{bipoles/fuse/width}}{
3455
3456 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
3457 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
3458 \pgfusepath{draw}
3459
3460 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3461 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3462
3463 \pgfusepath{draw}
3464 }
3465
3466
3467
3468 %% Generic bipole, filled - used as inductor by some (bleah)
3469
3470 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fullgeneric/height}}{fullgeneric}{\ctikzvalof{bipoles/fullgeneric/height}}{\ctikzvalof{bipoles/fullgeneric/width}}{
3471
3472 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3473 %\divide \pgf@circ@res@step by 14
3474
3475 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3476 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3477
3478 \pgfusepath{draw,fill}
3479 }
3480
3481
3482 %% Generic asymmetric bipole
3483
3484 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ageneric/height}}{ageneric}{\ctikzvalof{bipoles/ageneric/height}}{\ctikzvalof{bipoles/ageneric/width}}{
3485 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3486 %\divide \pgf@circ@res@step by 14
3487
3488 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3489 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3490
3491 \pgfusepath{draw}
3492
3493 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3494 \pgfusepath{stroke,fill}
3495 }
3496
3497
3498 %% asymmetric fuse
3499
3500 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/afuse/height}}{afuse}{\ctikzvalof{bipoles/afuse/height}}{\ctikzvalof{bipoles/afuse/width}}{
3501
3502 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
3503 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
3504 \pgfusepath{draw}
3505
3506 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3507 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3508
3509 \pgfusepath{draw}
3510
3511 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3512 \pgfusepath{stroke,fill}
3513 }
3514
3515
3516
3517
3518 %% Memristor
3519
3520 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/memristor/height}}{memristor}{\ctikzvalof{bipoles/memristor/height}}{\ctikzvalof{bipoles/memristor/width}}{
3521 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3522 \divide \pgf@circ@res@step by 14
3523
3524 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3525 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3526
3527 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3528 \pgfpathlineto{\pgfpoint{.72*\pgf@circ@res@left}{0pt}}
3529 \pgfpathlineto{\pgfpoint{.72*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3530 \pgfpathlineto{\pgfpoint{.35*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3531 \pgfpathlineto{\pgfpoint{.35*\pgf@circ@res@left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3532 \pgfpathlineto{\pgfpoint{-.05*\pgf@circ@res@left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3533 \pgfpathlineto{\pgfpoint{-.05*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3534 \pgfpathlineto{\pgfpoint{.42*\pgf@circ@res@right}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3535 \pgfpathlineto{\pgfpoint{.42*\pgf@circ@res@right}{0pt}}
3536 \pgfpathlineto{\pgfpoint{.8*\pgf@circ@res@right}{0pt}}
3537
3538 \pgfusepath{draw}
3539
3540 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3541 \pgfusepath{stroke,fill}
3542 }
3543
3544
3545
3546
3547 %% Generic empty tunable
3548
3549 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tgeneric/height}}{tgeneric}{\ctikzvalof{bipoles/tgeneric/height}}{\ctikzvalof{bipoles/tgeneric/width}}{
3550 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}}
3551 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3552 \pgfusepath{draw}
3553
3554 \pgfscope
3555 \pgfsetarrowsend{latex'}
3556 \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}}
3557 \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}}
3558 \pgfusepath{draw}
3559 \endpgfscope
3560 }
3561
3562 %% Photoresistor
3563
3564 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/photoresistor/height 2}}{photoresistor}{\ctikzvalof{bipoles/photoresistor/height}}{\ctikzvalof{bipoles/photoresistor/width}}{
3565 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@down}}
3566 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3567 \pgfusepath{draw}
3568
3569 \pgfscope
3570 \pgfsetarrowsend{latex'}
3571 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}
3572 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{-1.2\pgf@circ@res@down}}
3573 \pgfusepath{draw}
3574 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@right}{\pgf@circ@res@up}}
3575 \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@right}{-1.2\pgf@circ@res@down}}
3576 \pgfusepath{draw}
3577 \endpgfscope
3578 }
3579
3580
3581
3582
3583 %% Thermistor
3584 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistor/height}}{thermistor}{\ctikzvalof{bipoles/thermistor/height}}{\ctikzvalof{bipoles/thermistor/width}}{
3585 \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}}
3586 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3587 \pgfusepath{draw}
3588
3589 %\pgfscope
3590 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}}
3591 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
3592 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3593 \pgfusepath{draw}
3594 %\endpgfscope
3595 }
3596
3597
3598 %% Thermistor PTC
3599 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorptc/height 2}}{thermistorptc}{\ctikzvalof{bipoles/thermistorptc/height}}{\ctikzvalof{bipoles/thermistorptc/width}}{
3600 \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}}
3601 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3602 \pgfusepath{draw}
3603
3604 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3605 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}}
3606 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
3607 \pgfusepath{draw}
3608
3609 \pgfsetlinewidth{\pgfstartlinewidth}
3610 \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$}
3611 \pgfsetarrowsend{latex'}
3612 \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}}
3613 \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3614 \pgfusepath{draw}
3615 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}}
3616 \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3617 \pgfusepath{draw}
3618 }
3619
3620 %% Thermistor NTC
3621 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorntc/height 2}}{thermistorntc}{\ctikzvalof{bipoles/thermistorntc/height}}{\ctikzvalof{bipoles/thermistorntc/width}}{
3622 \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}}
3623 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3624 \pgfusepath{draw}
3625
3626 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3627 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}}
3628 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
3629 \pgfusepath{draw}
3630
3631 \pgfsetlinewidth{\pgfstartlinewidth}
3632 \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$}
3633 \pgfsetarrowsend{latex'}
3634 \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}}
3635 \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3636 \pgfusepath{draw}
3637 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3638 \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}}
3639 \pgfusepath{draw}
3640 }
3641
3642 %% thermocouple
3643 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermocouple/height 2}}{thermocouple}{\ctikzvalof{bipoles/thermocouple/height}}{\ctikzvalof{bipoles/thermocouple/width}}{
3644
3645 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
3646 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
3647 \pgfusepath{draw}
3648 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
3649 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3650 \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@down}}
3651 \pgfusepath{draw}
3652 \pgfsetlinewidth{\pgfstartlinewidth}
3653 \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@down}}
3654 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}
3655 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
3656 \pgfusepath{draw}
3657 }
3658
3659 %% Varistor
3660 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varistor/height}}{varistor}{\ctikzvalof{bipoles/varistor/height}}{\ctikzvalof{bipoles/varistor/width}}{
3661 \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}}
3662 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3663 \pgfusepath{draw}
3664
3665 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}}
3666 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
3667 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3668 \pgfusepath{draw}
3669
3670 \pgftext[top,x=.65\pgf@circ@res@left,y=1.2\pgf@circ@res@down]{{\tiny\textsf{U}}}
3671 }
3672
3673
3674
3675 %% Generic full tunable
3676
3677 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tfullgeneric/height}}{tfullgeneric}{\ctikzvalof{bipoles/tfullgeneric/height}}{\ctikzvalof{bipoles/tfullgeneric/width}}{
3678 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3679 \divide \pgf@circ@res@step by 14
3680
3681 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}}
3682 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3683 \pgfusepath{draw,fill}
3684
3685 \pgfscope
3686 \pgfsetarrowsend{latex'}
3687 \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}}
3688 \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}}
3689 \pgfusepath{draw}
3690 \endpgfscope
3691 }
3692
3693
3694
3695
3696
3697
3698
3699 %% Variable Capacitor
3700
3701 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcapacitor/height}}{vcapacitor}{\ctikzvalof{bipoles/vcapacitor/height}}{\ctikzvalof{bipoles/vcapacitor/width}}{
3702 %\pgf@circ@res@step = \ctikzvalof{bipoles/vcapacitor/width}\pgf@circ@Rlen
3703 \pgf@circ@res@step = \ctikzvalof{bipoles/vcapacitor/capacitor width} \pgf@circ@res@right
3704
3705 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3706 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@up}}
3707 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@down}}
3708
3709 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
3710 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
3711 \pgfusepath{draw}
3712
3713 \pgfscope
3714 \pgfsetarrowsend{latex'}
3715 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3716 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3717 \pgfusepath{draw}
3718 \endpgfscope
3719
3720 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3721 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
3722 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3723 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3724 \pgfsetlinewidth{\pgfstartlinewidth}
3725 \pgfusepath{draw}
3726 }
3727
3728
3729 %% Piezoelectric Element
3730
3731 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piezoelectric/height}}{piezoelectric}{\ctikzvalof{bipoles/piezoelectric/height}}{\ctikzvalof{bipoles/piezoelectric/width}}{
3732 \pgf@circ@res@step = \ctikzvalof{bipoles/piezoelectric/width}\pgf@circ@Rlen
3733 \divide \pgf@circ@res@step by 5
3734
3735 %% Outer markings
3736 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3737 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3738 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3739
3740 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3741 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3742 \pgfusepath{draw}
3743
3744 %% Inner Box
3745 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3746 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left+4}{\pgf@circ@res@up-1}}{\pgfpoint{\pgf@circ@res@right-4}{\pgf@circ@res@down+1}}
3747 \pgfusepath{draw}
3748
3749 }
3750
3751
3752
3753
3754
3755 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3756 %% Handling of terminals
3757
3758
3759 %% Easily usable styles
3760
3761 \ctikzset{o-o/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=empty}}
3762 \ctikzset{-o/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=empty}}
3763 \ctikzset{o-/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=none}}
3764 \ctikzset{*-o/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=empty}}
3765 \ctikzset{o-*/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=full}}
3766 \ctikzset{d-o/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=empty}}
3767 \ctikzset{o-d/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=diamond}}
3768 \ctikzset{*-/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=none}}
3769 \ctikzset{-*/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=full}}
3770 \ctikzset{d-/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=none}}
3771 \ctikzset{-d/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=diamond}}
3772 \ctikzset{*-*/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=full}}
3773 \ctikzset{d-*/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=full}}
3774 \ctikzset{*-d/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=diamond}}
3775 \ctikzset{d-d/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=diamond}}
3776
3777 \tikzset{reversed/.style = {\circuitikzbasekey/bipole/inverted=true}}
3778
3779
3780 %% The output routine
3781
3782 \def\drawpoles{
3783 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{diamond} }
3784 \ifx\pgf@temp\pgf@circ@temp
3785 { (\tikztostart) node[diamondpole] {} }
3786 \else
3787 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{empty} }
3788 \ifx\pgf@temp\pgf@circ@temp
3789 { (\tikztostart) node[ocirc] {} }
3790 \else
3791 \pgfextra{ \def\pgf@temp{full} }
3792 \ifx\pgf@temp\pgf@circ@temp
3793 { (\tikztostart) node[circ] {} }
3794 \fi
3795 \fi
3796 \fi
3797 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{diamond} }
3798 \ifx\pgf@temp\pgf@circ@temp
3799 { (\tikztotarget) node[diamondpole] {} }
3800 \else
3801 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{empty} }
3802 \ifx\pgf@temp\pgf@circ@temp
3803 { (\tikztotarget) node[ocirc] {} }
3804 \else
3805 \pgfextra{ \def\pgf@temp{full} }
3806 \ifx\pgf@temp\pgf@circ@temp
3807 { (\tikztotarget) node[circ] {} }
3808 \fi
3809 \fi
3810 \fi
3811 }
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832 %% Lamp
3833
3834 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lamp/height}}{lamp}{\ctikzvalof{bipoles/lamp/height}}{\ctikzvalof{bipoles/lamp/width}}{
3835
3836 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3837
3838 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
3839 \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@up}}
3840 \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@down}}
3841 \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@down}}
3842 \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@up}}
3843 \pgfusepath{draw}
3844 }
3845
3846
3847 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tline/height}
3848 }{tline}{\ctikzvalof{bipoles/tline/height}
3849 }{\ctikzvalof{bipoles/tline/width}
3850 }
3851 {
3852 \pgf@circ@res@step=.2\pgf@circ@res@right % half x axis
3853 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3854 \pgfpathellipse{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{0}}
3855 {\pgfpoint{\pgf@circ@res@step}{0}}
3856 {\pgfpoint{0}{-\pgf@circ@res@up}}
3857 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@up}}
3858 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@step}{\pgf@circ@res@up}}
3859 \pgfpatharc{-90}{90}{-\pgf@circ@res@step and -\pgf@circ@res@up}
3860 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@down}}
3861 \pgfusepath{draw}
3862 }
3863
3864
3865
3866
3867 %% SQUID added by Cor Molenaar 5 March 2010
3868
3869 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/squid/height}}{squid}{\ctikzvalof{bipoles/squid/height}}{\ctikzvalof{bipoles/squid/width}}{
3870
3871 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3872
3873 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
3874 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{1.35*\pgf@circ@res@up}}
3875 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.65*\pgf@circ@res@up}}
3876 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.65*\pgf@circ@res@up}}
3877 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{1.35*\pgf@circ@res@up}}
3878 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{1.35*\pgf@circ@res@down}}
3879 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.65*\pgf@circ@res@down}}
3880 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.65*\pgf@circ@res@down}}
3881 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{1.35*\pgf@circ@res@down}}
3882
3883 \pgfusepath{draw}
3884 }
3885
3886
3887
3888 % Generic barrier added by Cor Molenaar 5 March 2010
3889
3890 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/barrier/height}}{barrier}{\ctikzvalof{bipoles/barrier/height}}{\ctikzvalof{bipoles/barrier/width}}{
3891
3892 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3893
3894 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@step}}
3895 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@step}}
3896 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@up}}
3897 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@down}}
3898 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@down}}
3899 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@up}}
3900
3901 \pgfusepath{draw}
3902 }
3903
3904
3905 % Contributed by Danilo Piazzalunga
3906
3907 \pgfdeclareshape{buffer}
3908 {
3909 \anchor{center}{\pgfpointorigin}
3910 \savedanchor\northwest{%
3911 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3912 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/height}\pgf@y
3913 \pgf@y=.5\pgf@y
3914 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3915 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/width}\pgf@x
3916 \pgf@x=.5\pgf@x
3917 }
3918 \anchor{south}{
3919 \northwest
3920 \pgf@y=-\pgf@y
3921 }
3922 \savedanchor\left{%
3923 \pgf@y=0pt
3924 }
3925 \anchor{in}{
3926 \northwest
3927 \pgf@y=0pt
3928 }
3929 \anchor{out}{
3930 \northwest
3931 \pgf@y=0pt
3932 \pgf@x=-\pgf@x
3933 }
3934
3935 \backgroundpath{
3936 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
3937
3938
3939 \northwest
3940 \pgf@circ@res@up = \pgf@y
3941 \pgf@circ@res@down = -\pgf@y
3942 \pgf@circ@res@right = -\pgf@x
3943 \pgf@circ@res@left = \pgf@x
3944
3945 \pgfscope
3946 \pgfsetlinewidth{2\pgflinewidth}
3947 \pgftransformxshift{.7\pgf@circ@res@left}
3948 \pgf@circ@res@step=\pgf@circ@res@right
3949 \advance\pgf@circ@res@step by -\pgf@circ@res@left
3950 \pgf@circ@res@step=.7\pgf@circ@res@step
3951
3952 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3953 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3954 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3955 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3956 \pgfusepath{draw}
3957 \endpgfscope
3958
3959 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3960 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
3961
3962 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3963 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
3964
3965 \pgfusepath{draw}
3966
3967 }
3968 }
3969
3970
3971
3972
3973
3974 \pgfdeclareshape{plain amp}
3975 {
3976 \anchor{center}{\pgfpointorigin}
3977 \savedanchor\northwest{%
3978 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3979 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@y
3980 \pgf@y=.5\pgf@y
3981 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3982 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@x
3983 \pgf@x=.5\pgf@x
3984 }
3985 \anchor{south}{
3986 \northwest
3987 \pgf@y=-\pgf@y
3988 }
3989 \savedanchor\left{%
3990 \pgf@y=0pt
3991 }
3992 \savedanchor\inOne{%
3993 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3994 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@y
3995 \pgf@y=.5\pgf@y
3996 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@y
3997 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3998 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@x
3999 \pgf@x=.5\pgf@x
4000 }
4001 \anchor{-}{
4002 \inOne
4003 }
4004 \anchor{+}{
4005 \inOne
4006 \pgf@y=-\pgf@y
4007 }
4008 \savedanchor\up{%
4009 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4010 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@y
4011 \pgf@y=.5\pgf@y
4012 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4013 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@x
4014 \pgf@x=.5\pgf@x
4015 \pgf@circ@res@up = \pgf@y
4016 \pgf@circ@res@right = -\pgf@x
4017 \pgf@circ@res@left = \pgf@x
4018 \pgfpointlineattime{
4019 \pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/up pos}}{
4020 \pgfpoint{
4021 \pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
4022 {\pgf@circ@res@up}}
4023 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
4024 }
4025 \anchor{up}{
4026 \up
4027 }
4028 \anchor{down}{
4029 \up
4030 \pgf@y=-\pgf@y
4031 }
4032 \anchor{out}{
4033 \northwest
4034 \pgf@y=0pt
4035 \pgf@x=-\pgf@x
4036 }
4037
4038 \backgroundpath{
4039 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
4040
4041
4042 \northwest
4043 \pgf@circ@res@up = \pgf@y
4044 \pgf@circ@res@down = -\pgf@y
4045 \pgf@circ@res@right = -\pgf@x
4046 \pgf@circ@res@left = \pgf@x
4047
4048 \pgfpathmoveto{\pgfpoint
4049 {\pgf@circ@res@left}
4050 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@up}}
4051 \pgfpathlineto{\pgfpoint
4052 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
4053 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@up}}
4054
4055
4056 \pgfpathmoveto{\pgfpoint
4057 {\pgf@circ@res@left}
4058 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@down}}
4059 \pgfpathlineto{\pgfpoint
4060 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
4061 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@down}}
4062
4063 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
4064 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
4065
4066 \pgfusepath{draw}
4067
4068
4069 \pgfscope
4070 \pgfsetlinewidth{2\pgflinewidth}
4071 \pgftransformxshift{.7\pgf@circ@res@left}
4072 \pgf@circ@res@step=\pgf@circ@res@right
4073 \advance\pgf@circ@res@step by -\pgf@circ@res@left
4074 \pgf@circ@res@step=.7\pgf@circ@res@step
4075
4076 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
4077 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
4078 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
4079 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
4080 \pgfusepath{draw}
4081 \endpgfscope
4082
4083
4084
4085 }
4086 }
4087
4088 %% Generic two port box
4089 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/twoport/height}}{twoport}{\ctikzvalof{bipoles/twoport/height}}{\ctikzvalof{bipoles/twoport/width}}{
4090 \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@Rlen
4091 \divide \pgf@circ@res@step by 2
4092
4093 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4094 \pgf@circ@res@other = \pgf@circ@res@left
4095 \advance\pgf@circ@res@other by \pgf@circ@res@step
4096 \ifpgf@circuit@dashed
4097 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4098 \fi
4099 % draw outer box
4100 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4101 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4102 \pgfusepath{draw}
4103
4104 \ifpgf@circuit@inputarrow
4105 {
4106 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4107 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4108 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4109 }
4110 \fi
4111
4112 % rotate inner symbol
4113 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4114 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4115 \pgftransformrotate{270}
4116 \fi\fi
4117 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4118 \pgftransformrotate{180}
4119 \fi\fi
4120 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4121 \pgftransformrotate{90}
4122 \fi\fi
4123
4124 % draw inner symbol
4125 \pgftext[center,x=0,y=0]{\ctikzvalof{bipoles/twoport/text}}
4126
4127 }
4128
4129 %% voltage controled oscillator
4130 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vco/width}}{vco}{\ctikzvalof{bipoles/twoport/width}}{\ctikzvalof{bipoles/vco/width}}{
4131 \pgf@circ@res@step = \ctikzvalof{bipoles/vco/width}\pgf@circ@Rlen
4132 \divide \pgf@circ@res@step by 2
4133
4134 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4135 \pgf@circ@res@other = \pgf@circ@res@left
4136 \advance\pgf@circ@res@other by \pgf@circ@res@step
4137
4138 \ifpgf@circuit@dashed
4139 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4140 \fi
4141 % draw circle
4142 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4143 \pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@step}
4144 \pgfusepath{draw}
4145
4146 \ifpgf@circuit@inputarrow
4147 {
4148 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4149 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4150 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4151 }
4152 \fi
4153
4154 % rotate inner symbol
4155 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4156 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4157 \pgftransformrotate{270}
4158 \fi\fi
4159 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4160 \pgftransformrotate{180}
4161 \fi\fi
4162 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4163 \pgftransformrotate{90}
4164 \fi\fi
4165
4166 % draw inner sine waves
4167 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4168 \pgfsetlinewidth{\pgfstartlinewidth}
4169 \pgfpathmoveto{\pgfpoint{-.5\pgf@circ@res@step}{0\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
4176 }
4177
4178 %% bandpass filter
4179 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/bandpass/width}}{bandpass}{\ctikzvalof{bipoles/bandpass/width}}{\ctikzvalof{bipoles/bandpass/width}}{
4180
4181 \pgf@circ@res@step = \ctikzvalof{bipoles/bandpass/width}\pgf@circ@Rlen
4182 \divide \pgf@circ@res@step by 2
4183
4184 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4185 \pgf@circ@res@other = \pgf@circ@res@left
4186 \advance\pgf@circ@res@other by \pgf@circ@res@step
4187
4188 \ifpgf@circuit@dashed
4189 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4190 \fi
4191
4192 % draw outer box
4193 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4194 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4195 \pgfusepath{draw}
4196
4197 \ifpgf@circuit@inputarrow
4198 {
4199 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4200 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4201 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4202 }
4203 \fi
4204
4205 % rotate inner symbol
4206 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4207 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4208 \pgftransformrotate{270}
4209 \fi\fi
4210 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4211 \pgftransformrotate{180}
4212 \fi\fi
4213 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4214 \pgftransformrotate{90}
4215 \fi\fi
4216
4217 % draw inner symbol
4218 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4219 \pgfsetarrows{-} %never draw arrows
4220 \pgfsetlinewidth{\pgfstartlinewidth}
4221 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
4222 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4223 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4224 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4225 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4226 \pgfusepath{draw}
4227 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{0.35\pgf@circ@res@step}}
4228 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}}
4229 \pgfusepath{draw}
4230
4231 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
4232 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4233 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4234 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4235 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4236 \pgfusepath{draw}
4237
4238 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4239 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4240 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4241 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4242 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4243 \pgfusepath{draw}
4244 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}}
4245 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
4246 \pgfusepath{draw}
4247 }
4248
4249 %% highpass filter
4250 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/highpass/width}}{highpass}{\ctikzvalof{bipoles/highpass/width}}{\ctikzvalof{bipoles/highpass/width}}{
4251 \pgf@circ@res@step = \ctikzvalof{bipoles/highpass/width}\pgf@circ@Rlen
4252 \divide \pgf@circ@res@step by 2
4253
4254 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4255 \pgf@circ@res@other = \pgf@circ@res@left
4256 \advance\pgf@circ@res@other by \pgf@circ@res@step
4257
4258 \ifpgf@circuit@dashed
4259 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4260 \fi
4261
4262 % draw outer box
4263 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4264 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4265 \pgfusepath{draw}
4266
4267 \ifpgf@circuit@inputarrow
4268 {
4269 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4270 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4271 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4272 }
4273 \fi
4274
4275 % rotate inner symbol
4276 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4277 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4278 \pgftransformrotate{270}
4279 \fi\fi
4280 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4281 \pgftransformrotate{180}
4282 \fi\fi
4283 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4284 \pgftransformrotate{90}
4285 \fi\fi
4286
4287 % draw inner symbol
4288 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4289 \pgfsetarrows{-} %never draw arrows
4290 \pgfsetlinewidth{\pgfstartlinewidth}
4291 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
4292 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4293 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4294 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4295 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4296 \pgfusepath{draw}
4297
4298 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
4299 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4300 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4301 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4302 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4303 \pgfusepath{draw}
4304 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
4305 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
4306 \pgfusepath{draw}
4307
4308 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4309 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4310 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4311 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4312 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4313 \pgfusepath{draw}
4314 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}}
4315 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
4316 \pgfusepath{draw}
4317 }
4318
4319 %% lowpass filter
4320 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lowpass/width}}{lowpass}{\ctikzvalof{bipoles/lowpass/width}}{\ctikzvalof{bipoles/lowpass/width}}{
4321 \pgf@circ@res@step = \ctikzvalof{bipoles/lowpass/width}\pgf@circ@Rlen
4322 \divide \pgf@circ@res@step by 2
4323
4324 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4325 \pgf@circ@res@other = \pgf@circ@res@left
4326 \advance\pgf@circ@res@other by \pgf@circ@res@step
4327
4328 \ifpgf@circuit@dashed
4329 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4330 \fi
4331
4332 % draw outer box
4333 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4334 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4335 \pgfusepath{draw}
4336
4337 \ifpgf@circuit@inputarrow
4338 {
4339 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4340 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4341 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4342 }
4343 \fi
4344
4345 % rotate inner symbol
4346 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4347 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4348 \pgftransformrotate{270}
4349 \fi\fi
4350 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4351 \pgftransformrotate{180}
4352 \fi\fi
4353 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4354 \pgftransformrotate{90}
4355 \fi\fi
4356
4357 % draw inner symbol
4358 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4359 \pgfsetarrows{-} %never draw arrows
4360 \pgfsetlinewidth{\pgfstartlinewidth}
4361 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
4362 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4363 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4364 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4365 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4366 \pgfusepath{draw}
4367 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{0.35\pgf@circ@res@step}}
4368 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}}
4369 \pgfusepath{draw}
4370
4371 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
4372 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4373 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4374 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4375 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4376 \pgfusepath{draw}
4377 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
4378 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
4379 \pgfusepath{draw}
4380
4381 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4382 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4383 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4384 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4385 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4386 \pgfusepath{draw}
4387 }
4388
4389 %% ADC
4390 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/adc/width}}{adc}{\ctikzvalof{bipoles/adc/width}}{\ctikzvalof{bipoles/adc/width}}{
4391 \pgf@circ@res@step = \ctikzvalof{bipoles/adc/width}\pgf@circ@Rlen
4392 \divide \pgf@circ@res@step by 2
4393
4394 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4395 \pgf@circ@res@other = \pgf@circ@res@left
4396 \advance\pgf@circ@res@other by \pgf@circ@res@step
4397
4398 \ifpgf@circuit@dashed
4399 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4400 \fi
4401
4402 % draw outer box
4403 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4404 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4405 \pgfusepath{draw}
4406
4407 \ifpgf@circuit@inputarrow
4408 {
4409 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4410 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4411 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4412 }
4413 \fi
4414
4415 % rotate inner symbol
4416 \def\texti{A}
4417 \def\textii{D}
4418 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4419 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4420 \def\texti{D}
4421 \def\textii{A}
4422 \pgftransformrotate{270}
4423 \fi\fi
4424 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4425 \def\texti{D}
4426 \def\textii{A}
4427 \pgftransformrotate{180}
4428 \fi\fi
4429 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4430 \pgftransformrotate{90}
4431 \def\texti{A}
4432 \def\textii{D}
4433 \fi\fi
4434
4435 % draw inner symbol
4436 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4437 \pgfsetarrows{-} %never draw arrows
4438 \pgfsetlinewidth{\pgfstartlinewidth}
4439 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
4440 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
4441 \pgfusepath{draw}
4442
4443 \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}}
4444 \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}}
4445 }
4446
4447 %% DAC
4448 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dac/width}}{dac}{\ctikzvalof{bipoles/dac/width}}{\ctikzvalof{bipoles/dac/width}}{
4449 \pgf@circ@res@step = \ctikzvalof{bipoles/dac/width}\pgf@circ@Rlen
4450 \divide \pgf@circ@res@step by 2
4451
4452 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4453 \pgf@circ@res@other = \pgf@circ@res@left
4454 \advance\pgf@circ@res@other by \pgf@circ@res@step
4455
4456 \ifpgf@circuit@dashed
4457 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4458 \fi
4459
4460 % draw outer box
4461 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4462 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4463 \pgfusepath{draw}
4464
4465 \ifpgf@circuit@inputarrow
4466 {
4467 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4468 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4469 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4470 }
4471 \fi
4472
4473 % rotate inner symbol
4474 \def\texti{D}
4475 \def\textii{A}
4476 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4477 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4478 \def\texti{A}
4479 \def\textii{D}
4480 \pgftransformrotate{270}
4481 \fi\fi
4482 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4483 \def\texti{A}
4484 \def\textii{D}
4485 \pgftransformrotate{180}
4486 \fi\fi
4487 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4488 \pgftransformrotate{90}
4489 \def\texti{D}
4490 \def\textii{A}
4491 \fi\fi
4492
4493 % draw inner symbol
4494 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4495 \pgfsetarrows{-} %never draw arrows
4496 \pgfsetlinewidth{\pgfstartlinewidth}
4497 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
4498 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
4499 \pgfusepath{draw}
4500
4501 \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}}
4502 \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}}
4503 }
4504
4505 %% DSP
4506 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dsp/width}}{dsp}{\ctikzvalof{bipoles/dsp/width}}{\ctikzvalof{bipoles/dsp/width}}{
4507 \pgf@circ@res@step = \ctikzvalof{bipoles/dsp/width}\pgf@circ@Rlen
4508 \divide \pgf@circ@res@step by 2
4509
4510 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4511 \pgf@circ@res@other = \pgf@circ@res@left
4512 \advance\pgf@circ@res@other by \pgf@circ@res@step
4513
4514 \ifpgf@circuit@dashed
4515 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4516 \fi
4517
4518 % draw outer box
4519 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4520 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4521 \pgfusepath{draw}
4522
4523 \ifpgf@circuit@inputarrow
4524 {
4525 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4526 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4527 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4528 }
4529 \fi
4530
4531 % rotate inner symbol
4532 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4533 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4534 \pgftransformrotate{270}
4535 \fi\fi
4536 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4537 \pgftransformrotate{180}
4538 \fi\fi
4539 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4540 \pgftransformrotate{90}
4541 \fi\fi
4542
4543 % draw inner symbol
4544 \pgftext[center,x=0,y=0]{\textsf{DSP}}
4545 }
4546
4547 %% FFT
4548 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fft/width}}{fft}{\ctikzvalof{bipoles/fft/width}}{\ctikzvalof{bipoles/fft/width}}{
4549 \pgf@circ@res@step = \ctikzvalof{bipoles/fft/width}\pgf@circ@Rlen
4550 \divide \pgf@circ@res@step by 2
4551
4552 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4553 \pgf@circ@res@other = \pgf@circ@res@left
4554 \advance\pgf@circ@res@other by \pgf@circ@res@step
4555
4556 \ifpgf@circuit@dashed
4557 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4558 \fi
4559
4560 % draw outer box
4561 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4562 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4563 \pgfusepath{draw}
4564
4565 \ifpgf@circuit@inputarrow
4566 {
4567 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4568 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4569 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4570 }
4571 \fi
4572
4573 % rotate inner symbol
4574 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4575 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4576 \pgftransformrotate{270}
4577 \fi\fi
4578 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4579 \pgftransformrotate{180}
4580 \fi\fi
4581 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4582 \pgftransformrotate{90}
4583 \fi\fi
4584
4585 % draw inner symbol
4586 \pgftext[center,x=0,y=0]{\textsf{FFT}}
4587 }
4588
4589 %% Amplifier
4590 \pgfcircdeclarebipole{}{
4591 \ifpgf@circuit@boxed
4592 \ctikzvalof{bipoles/twoport/width}
4593 \else
4594 \ctikzvalof{bipoles/amp/width}
4595 \fi
4596 }{amp}{
4597 \ifpgf@circuit@boxed
4598 \ctikzvalof{bipoles/twoport/width}
4599 \else
4600 \ctikzvalof{bipoles/amp/width}
4601 \fi
4602 }{
4603 \ifpgf@circuit@boxed
4604 \ctikzvalof{bipoles/twoport/width}
4605 \else
4606 \ctikzvalof{bipoles/amp/width}
4607 \fi
4608 }{
4609 \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@Rlen
4610
4611 \ifpgf@circuit@dashed
4612 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4613 \fi
4614
4615 % draw outer box
4616 \ifpgf@circuit@boxed
4617 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4618 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
4619 \fi
4620
4621 % draw input arrow
4622 \ifpgf@circuit@inputarrow
4623 {
4624 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4625 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4626 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4627 }
4628 \fi
4629
4630 \ifpgf@circuit@boxed
4631 \pgfsetlinewidth{\pgfstartlinewidth}
4632 \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn
4633 \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box
4634 \else
4635 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4636 \fi
4637
4638 \pgfsetarrows{-} %never draw arrows
4639 \pgfsetlinewidth{\pgfstartlinewidth}
4640
4641 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
4642 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
4643 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
4644
4645 \pgfpathclose
4646 \pgfusepath{draw}
4647
4648 % draw inner text
4649 \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
4650 }
4651
4652
4653 %% variable amplifier
4654 \pgfcircdeclarebipole{}{
4655 \ifpgf@circuit@boxed
4656 \ctikzvalof{bipoles/twoport/width}
4657 \else
4658 \ctikzvalof{bipoles/amp/width}
4659 \fi
4660 }{vamp}{
4661 \ifpgf@circuit@boxed
4662 \ctikzvalof{bipoles/twoport/width}
4663 \else
4664 \ctikzvalof{bipoles/amp/width}
4665 \fi
4666 }{
4667 \ifpgf@circuit@boxed
4668 \ctikzvalof{bipoles/twoport/width}
4669 \else
4670 \ctikzvalof{bipoles/amp/width}
4671 \fi
4672 }{
4673 \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@Rlen
4674
4675 \ifpgf@circuit@dashed
4676 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4677 \fi
4678
4679 % draw outer box
4680 \ifpgf@circuit@boxed
4681 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
4682 \fi
4683
4684 % draw input arrow
4685 \ifpgf@circuit@inputarrow
4686 {
4687 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4688 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4689 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4690 }
4691 \fi
4692
4693 \ifpgf@circuit@boxed
4694 \pgfsetlinewidth{\pgfstartlinewidth}
4695 \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn
4696 \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box
4697 \else
4698 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4699 \fi
4700
4701
4702 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4703 \pgfsetarrows{-} %never draw arrows
4704 \pgfsetlinewidth{\pgfstartlinewidth}
4705
4706 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
4707 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
4708 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
4709
4710 \pgfpathclose
4711 \pgfusepath{draw}
4712
4713 % draw inner text
4714 \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
4715
4716 % draw arrow
4717 \pgfsetlinewidth{\pgfstartlinewidth}
4718 \pgfsetarrowsend{latex}
4719 \pgfpathmoveto{\pgfpoint{-0.8\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4720 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@step}{0.6\pgf@circ@res@step}}
4721 \pgfusepath{draw}
4722 }
4723
4724 %% pi attenuator
4725 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piattenuator/width}}{piattenuator}{\ctikzvalof{bipoles/piattenuator/width}}{\ctikzvalof{bipoles/piattenuator/width}}{
4726 \pgf@circ@res@step = \ctikzvalof{bipoles/piattenuator/width}\pgf@circ@Rlen
4727 \divide \pgf@circ@res@step by 2
4728
4729 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4730 \pgf@circ@res@other = \pgf@circ@res@left
4731 \advance\pgf@circ@res@other by \pgf@circ@res@step
4732
4733 \ifpgf@circuit@dashed
4734 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4735 \fi
4736
4737 % draw outer box
4738 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4739 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4740 \pgfusepath{draw}
4741
4742 \ifpgf@circuit@inputarrow
4743 {
4744 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4745 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4746 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4747 }
4748 \fi
4749
4750 % rotate inner symbol
4751 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4752 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4753 \pgftransformrotate{270}
4754 \fi\fi
4755 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4756 \pgftransformrotate{90}
4757 \fi\fi
4758
4759 % draw inner symbol
4760 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4761 \pgfsetarrows{-} %never draw arrows
4762 \pgfsetlinewidth{\pgfstartlinewidth}
4763 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
4764 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4765 \pgfusepath{draw}
4766 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
4767 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4768 \pgfusepath{draw}
4769 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4770 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4771 \pgfusepath{draw}
4772 }
4773
4774 %% variable pi attenuator
4775 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vpiattenuator/width}}{vpiattenuator}{\ctikzvalof{bipoles/vpiattenuator/width}}{\ctikzvalof{bipoles/vpiattenuator/width}}{
4776 \pgf@circ@res@step = \ctikzvalof{bipoles/vpiattenuator/width}\pgf@circ@Rlen
4777 \divide \pgf@circ@res@step by 2
4778
4779 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4780 \pgf@circ@res@other = \pgf@circ@res@left
4781 \advance\pgf@circ@res@other by \pgf@circ@res@step
4782
4783 \ifpgf@circuit@dashed
4784 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4785 \fi
4786
4787 % draw outer box
4788 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4789 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4790 \pgfusepath{draw}
4791
4792 \ifpgf@circuit@inputarrow
4793 {
4794 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4795 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4796 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4797 }
4798 \fi
4799
4800 % rotate inner symbol
4801 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4802 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4803 \pgftransformrotate{270}
4804 \fi\fi
4805 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4806 \pgftransformrotate{90}
4807 \fi\fi
4808
4809 % draw inner symbol
4810 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4811 \pgfsetarrows{-} %never draw arrows
4812 \pgfsetlinewidth{\pgfstartlinewidth}
4813 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
4814 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4815 \pgfusepath{draw}
4816 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
4817 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4818 \pgfusepath{draw}
4819 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4820 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4821 \pgfusepath{draw}
4822
4823 \pgfsetarrowsend{latex}
4824 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
4825 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
4826 \pgfusepath{draw}
4827 }
4828
4829 %% T attenuator
4830 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tattenuator/width}}{tattenuator}{\ctikzvalof{bipoles/tattenuator/width}}{\ctikzvalof{bipoles/tattenuator/width}}{
4831 \pgf@circ@res@step = \ctikzvalof{bipoles/tattenuator/width}\pgf@circ@Rlen
4832 \divide \pgf@circ@res@step by 2
4833
4834 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4835 \pgf@circ@res@other = \pgf@circ@res@left
4836 \advance\pgf@circ@res@other by \pgf@circ@res@step
4837
4838 \ifpgf@circuit@dashed
4839 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4840 \fi
4841
4842 % draw outer box
4843 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4844 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4845 \pgfusepath{draw}
4846
4847 \ifpgf@circuit@inputarrow
4848 {
4849 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4850 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4851 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4852 }
4853 \fi
4854
4855 % rotate inner symbol
4856 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4857 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4858 \pgftransformrotate{270}
4859 \fi\fi
4860 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4861 \pgftransformrotate{90}
4862 \fi\fi
4863
4864 % draw inner symbol
4865 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4866 \pgfsetarrows{-} %never draw arrows
4867 \pgfsetlinewidth{\pgfstartlinewidth}
4868 \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
4869 \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
4870 \pgfusepath{draw}
4871 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4872 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4873 \pgfusepath{draw}
4874 }
4875
4876 %% variable T attenuator
4877 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vtattenuator/width}}{vtattenuator}{\ctikzvalof{bipoles/vtattenuator/width}}{\ctikzvalof{bipoles/vtattenuator/width}}{
4878 \pgf@circ@res@step = \ctikzvalof{bipoles/vtattenuator/width}\pgf@circ@Rlen
4879 \divide \pgf@circ@res@step by 2
4880
4881 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4882 \pgf@circ@res@other = \pgf@circ@res@left
4883 \advance\pgf@circ@res@other by \pgf@circ@res@step
4884
4885 \ifpgf@circuit@dashed
4886 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4887 \fi
4888
4889 % draw outer box
4890 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4891 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4892 \pgfusepath{draw}
4893
4894 \ifpgf@circuit@inputarrow
4895 {
4896 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4897 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4898 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4899 }
4900 \fi
4901
4902 % rotate inner symbol
4903 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4904 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4905 \pgftransformrotate{270}
4906 \fi\fi
4907 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4908 \pgftransformrotate{90}
4909 \fi\fi
4910
4911 % draw inner symbol
4912 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4913 \pgfsetarrows{-} %never draw arrows
4914 \pgfsetlinewidth{\pgfstartlinewidth}
4915 \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
4916 \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
4917 \pgfusepath{draw}
4918 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4919 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4920 \pgfusepath{draw}
4921
4922 \pgfsetarrowsend{latex}
4923 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
4924 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
4925 \pgfusepath{draw}
4926 }
4927
4928 %% phase shifter
4929 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{phaseshifter}{\ctikzvalof{bipoles/phaseshifter/width}}{\ctikzvalof{bipoles/phaseshifter/width}}{
4930 \pgf@circ@res@step = \ctikzvalof{bipoles/phaseshifter/width}\pgf@circ@Rlen
4931 \divide \pgf@circ@res@step by 2
4932
4933 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4934 \pgf@circ@res@other = \pgf@circ@res@left
4935 \advance\pgf@circ@res@other by \pgf@circ@res@step
4936
4937 \ifpgf@circuit@dashed
4938 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4939 \fi
4940
4941 % draw outer box
4942 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4943 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4944 \pgfusepath{draw}
4945
4946 \ifpgf@circuit@inputarrow
4947 {
4948 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4949 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4950 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4951 }
4952 \fi
4953
4954 % rotate inner symbol
4955 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4956 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4957 \pgftransformrotate{270}
4958 \fi\fi
4959 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4960 \pgftransformrotate{180}
4961 \fi\fi
4962 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4963 \pgftransformrotate{90}
4964 \fi\fi
4965
4966 % inner symbol
4967 \pgftext[center,x=0,y=0]{\Large$\varphi$}
4968 }
4969
4970 %% variable phase shifter
4971 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{vphaseshifter}{\ctikzvalof{bipoles/vphaseshifter/width}}{\ctikzvalof{bipoles/vphaseshifter/width}}{
4972 \pgf@circ@res@step = \ctikzvalof{bipoles/vphaseshifter/width}\pgf@circ@Rlen
4973 \divide \pgf@circ@res@step by 2
4974
4975 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4976 \pgf@circ@res@other = \pgf@circ@res@left
4977 \advance\pgf@circ@res@other by \pgf@circ@res@step
4978
4979 \ifpgf@circuit@dashed
4980 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4981 \fi
4982
4983 % draw outer box
4984 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4985 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4986 \pgfusepath{draw}
4987
4988 \ifpgf@circuit@inputarrow
4989 {
4990 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4991 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4992 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4993 }
4994 \fi
4995
4996 % rotate inner symbol
4997 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4998 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4999 \pgftransformrotate{270}
5000 \fi\fi
5001 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
5002 \pgftransformrotate{180}
5003 \fi\fi
5004 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
5005 \pgftransformrotate{90}
5006 \fi\fi
5007
5008 % inner symbol
5009 \pgftext[center,x=0,y=0]{\Large$\varphi$}
5010
5011 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
5012 \pgfsetlinewidth{\pgfstartlinewidth}
5013 \pgfsetarrowsend{latex}
5014 \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0.65\pgf@circ@res@down}}
5015 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.65\pgf@circ@res@up}}
5016 \pgfusepath{draw}
5017 }
5018
5019 %% detector
5020 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/detector/width}}{detector}{\ctikzvalof{bipoles/detector/width}}{\ctikzvalof{bipoles/detector/width}}{
5021 \pgf@circ@res@step = \ctikzvalof{bipoles/detector/width}\pgf@circ@Rlen
5022 \divide \pgf@circ@res@step by 2
5023
5024 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5025 \pgf@circ@res@other = \pgf@circ@res@left
5026 \advance\pgf@circ@res@other by \pgf@circ@res@step
5027
5028 \ifpgf@circuit@dashed
5029 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
5030 \fi
5031
5032 % draw outer box
5033 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5034 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5035 \pgfusepath{draw}
5036
5037 \ifpgf@circuit@inputarrow
5038 {
5039 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
5040 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
5041 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
5042 }
5043 \fi
5044
5045 % draw inner stuff
5046 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
5047 \pgfsetarrows{-} %never draw arrows
5048 \pgfsetlinewidth{0.8\pgfstartlinewidth}
5049 \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0}}
5050 \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@right}{0}}
5051 \pgfusepath{draw}
5052
5053 \ifpgf@circuit@fulldiode
5054 \pgfmathparse{2\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/generic/width}}
5055 \pgftransformscale{\pgfmathresult}
5056 \pgfnode{fulldiodeshape}{center}{}{pgf@fulldiode}{\pgfusepath{fill}}
5057 \else
5058 \pgfmathparse{2\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/resistor/width}}
5059 \pgftransformscale{\pgfmathresult}
5060 \pgfnode{emptydiodeshape}{center}{}{pgf@emptydiode}{\pgfusepath{fill}}
5061 \fi
5062
5063 }
5064
5065
5066
5067
5068 %% european gas filled surge arrester
5069
5070 \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}}{
5071
5072 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
5073 %\divide \pgf@circ@res@step by 14
5074
5075 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5076 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5077
5078 \pgfusepath{draw}
5079
5080 \pgfscope
5081 \pgfsetarrowsend{latex'}
5082 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5083 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/european gas filled surge arrester/inside}\pgf@circ@res@left}{0pt}}
5084 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5085 \pgfusepath{draw}
5086
5087 \endpgfscope
5088 }
5089
5090
5091
5092
5093 %% american gas filled surge arrester
5094
5095 \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}}{
5096 %\def\pgf@circ@temp{right}
5097 %\ifx\tikz@res@label@pos\pgf@circ@temp
5098 % \pgf@circ@res@step=-1.2\pgf@circ@res@up
5099 %\else
5100 % \def\pgf@circ@temp{below}
5101 % \ifx\tikz@res@label@pos\pgf@circ@temp
5102 % \pgf@circ@res@step=-1.2\pgf@circ@res@up
5103 % \else
5104 % \pgf@circ@res@step=1.2\pgf@circ@res@up
5105 % \fi
5106 % \fi
5107
5108 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5109 \pgfpointorigin \pgf@circ@res@other = \pgf@x \advance \pgf@circ@res@other by -\pgf@circ@res@up
5110 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
5111 \pgfusepath{draw}
5112
5113 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5114
5115 \pgfscope
5116 \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
5117 \pgfusepath{draw}
5118 \endpgfscope
5119
5120 \pgfsetlinewidth{\pgfstartlinewidth}
5121
5122
5123 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@zero}}
5124 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
5125 \pgfusepath{draw}
5126
5127 \pgfnode{circle}{center}{}{}{}
5128
5129 \pgfscope
5130 \pgfsetarrowsend{latex}
5131
5132 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
5133 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf@circ@res@right}{\pgf@circ@res@zero}}
5134 \pgfusepath{draw}
5135
5136 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5137 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf@circ@res@left}{\pgf@circ@res@zero}}
5138 \pgfusepath{draw}
5139 \endpgfscope{}
5140
5141 %\pgftransformshift{\pgfpoint{.25\pgf@circ@res@left}{.45\pgf@circ@res@down}}
5142 %\pgfnode{circ}{center}{}{}{}
5143 %\pgftransformshift{}
5144 \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}
5145 \pgfusepath{fill}
5146 }
5147
5148 % % MECHANICAL SYMBOLS
5149
5150 %% mechanical capacitance - stiffness/spring
5151
5152 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/spring/height}}{spring}{\ctikzvalof{bipoles/spring/height}}{\ctikzvalof{bipoles/spring/width}}{
5153 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5154 \pgftransformationadjustments
5155
5156 \pgfmathsetlength{\pgf@circ@res@step}
5157 {(\ctikzvalof{bipoles/spring/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth)/16}
5158
5159 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
5160 \pgfsetcornersarced{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
5161 \pgf@circ@res@other = \pgf@circ@res@left
5162 \advance\pgf@circ@res@other by \pgf@circ@res@step
5163 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
5164 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5165 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
5166 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5167 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
5168 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5169 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
5170 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5171 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
5172 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5173 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
5174 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5175 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
5176 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5177 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
5178 \advance\pgf@circ@res@other by \pgf@circ@res@step
5179 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
5180 \pgfsetbuttcap
5181 \pgfsetbeveljoin
5182 \pgfusepath{stroke}
5183 }
5184
5185 %% mechanical inductance - mass
5186 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/mass/box height}}{mass}{\ctikzvalof{bipoles/mass/height}}{\ctikzvalof{bipoles/mass/width}}{
5187 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5188 \pgftransformationadjustments
5189 \pgfpathrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
5190 {\pgfpoint{-2\pgf@circ@res@down}{-2\pgf@circ@res@down}}
5191
5192 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5193 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5194 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
5195 \pgfsetrectcap
5196 \pgfsetmiterjoin
5197 \pgfusepath{stroke}
5198 }
5199
5200 %% mechanical resistor - damper
5201 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/damper/height}}{damper}{\ctikzvalof{bipoles/damper/height}}{\ctikzvalof{bipoles/damper/width}}{
5202 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5203 \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
5204 {\pgf@circ@res@zero}}
5205 \pgfusepath{stroke}
5206
5207 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5208 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
5209 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5210 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5211 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
5212
5213 \pgfsetrectcap
5214 \pgfsetmiterjoin
5215 \pgfusepath{stroke}
5216
5217 \pgfpathmoveto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
5218 {.8\pgf@circ@res@down}}
5219 \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
5220 {.8\pgf@circ@res@up}}
5221 \pgfsetbuttcap
5222 \pgfusepath{stroke}
5223
5224 }
5225
5226
5227 %%%---------- close: tex/pgfcircbipoles
5228 %%%%%%%%%%% Springe nach tex/pgfcirctripoles
5229 %%%---------- open: tex/pgfcirctripoles.tex
5230 % Copyright 2007-2009 by Massimo Redaelli
5231 %
5232 % This file may be distributed and/or modified
5233 %
5234 % 1. under the LaTeX Project Public License and/or
5235 % 2. under the GNU Public License.
5236 %
5237 % See the file doc/LICENSE for more details.
5238
5239 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5240 %% Tripoles
5241
5242
5243
5244 \pgfdeclareshape{spdt}
5245 {
5246 \savedanchor\northwest{%
5247 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5248 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/height}\pgf@y
5249 \pgf@y=.5\pgf@y
5250 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5251 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/width}\pgf@x
5252 \pgf@x=.5\pgf@x
5253 }
5254 \anchor{left}{%
5255 \northwest
5256 \pgf@y=0pt
5257 }
5258 \anchor{in}{
5259 \northwest
5260 \pgf@y=0pt
5261 }
5262 \anchor{out 1}{
5263 \northwest
5264 \pgf@x=-\pgf@x
5265 }
5266 \anchor{out 2}{
5267 \northwest
5268 \pgf@x=-\pgf@x
5269 \pgf@y=-\pgf@y
5270 }
5271 \anchor{center}{
5272 \pgf@y=0pt
5273 \pgf@x=0pt
5274 }
5275 \anchor{east}{
5276 \northwest
5277 \pgf@y=0pt
5278 \pgf@x=-\pgf@x
5279 }
5280 \anchor{west}{
5281 \northwest
5282 \pgf@y=0pt
5283 }
5284 \anchor{south}{
5285 \northwest
5286 \pgf@x=0pt
5287 \pgf@y=-\pgf@y
5288 }
5289 \anchor{north}{
5290 \northwest
5291 \pgf@x=0pt
5292 }
5293 \anchor{south west}{
5294 \northwest
5295 \pgf@y=-\pgf@y
5296 }
5297 \anchor{north east}{
5298 \northwest
5299 \pgf@x=-\pgf@x
5300 }
5301 \anchor{north west}{
5302 \northwest
5303 }
5304 \anchor{south east}{
5305 \northwest
5306 \pgf@x=-\pgf@x
5307 \pgf@y=-\pgf@y
5308 }
5309 \backgroundpath{
5310 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5311
5312
5313 \northwest
5314 \pgf@circ@res@up = \pgf@y
5315 \pgf@circ@res@down = -\pgf@y
5316 \pgf@circ@res@right = -\pgf@x
5317 \pgf@circ@res@left = \pgf@x
5318 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/margin}\pgf@circ@res@left
5319
5320
5321 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5322 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5323 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5324 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5325
5326 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5327 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}}
5328
5329 \pgfusepath{draw}
5330
5331 \pgfscope
5332 \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5333 \pgfnode{ocirc}{center}{}{spdt1}{\pgfusepath{stroke}}
5334 \endpgfscope
5335 \pgfscope
5336 \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5337 \pgfnode{ocirc}{center}{}{}{\pgfusepath{stroke}}
5338 \endpgfscope
5339 \pgfscope
5340 \pgftransformshift{\pgfpoint{\pgf@circ@res@other}{0pt}}
5341 \pgfnode{ocirc}{center}{}{spdt2}{\pgfusepath{stroke}}
5342 \endpgfscope
5343
5344
5345 \pgfscope
5346 \pgfpathmoveto{\pgfpointshapeborder{spdt2}{\pgfpointorigin}}
5347 \pgfpathlineto{
5348 \pgfpointadd{\pgfpointshapeborder{spdt1}{\pgfpoint{-\pgf@circ@res@other}{-100pt}}}
5349 {\pgfpoint{-.05\pgf@circ@res@up}{-.05\pgf@circ@res@up}}
5350 }
5351 \pgfsetlinewidth{2\pgflinewidth}
5352 \pgfusepath{draw}
5353 \endpgfscope
5354 }
5355 }
5356
5357
5358
5359 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5360 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5361 %%
5362 %% Logic ports
5363 %%
5364
5365
5366
5367
5368
5369
5370 \long\def\pgfcircdeclarelogicport#1#2{
5371 \pgfdeclareshape{american #1 port}
5372 {
5373 \savedanchor\northwest{%
5374 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5375 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@y
5376 \pgf@y=.5\pgf@y
5377 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5378 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@x
5379 \pgf@x=.5\pgf@x
5380 }
5381 \savedanchor\left{%
5382 \pgf@y=0pt
5383 }
5384 \savedanchor\inOne{%
5385 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5386 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@y
5387 \pgf@y=.5\pgf@y
5388 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/input height}\pgf@y
5389 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5390 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@x
5391 \pgf@x=.5\pgf@x
5392 }
5393 \anchor{in 1}{
5394 \inOne
5395 }
5396 \anchor{in}{
5397 \inOne
5398 }
5399 \anchor{in 2}{
5400 \inOne
5401 \pgf@y=-\pgf@y
5402 }
5403 \anchor{out}{
5404 \northwest
5405 \pgf@y=0pt
5406 \pgf@x=-\pgf@x
5407 }
5408 \anchor{center}{
5409 \northwest
5410 \pgf@y=0pt
5411 \pgf@x=-.8\pgf@x
5412 }
5413 \anchor{east}{
5414 \left
5415 \pgf@x=-.8\pgf@x
5416 }
5417 \anchor{west}{
5418 \left
5419 }
5420 \anchor{south}{
5421 \northwest
5422 \pgf@x=0pt
5423 \pgf@y=-\pgf@y
5424 }
5425 \anchor{north}{
5426 \northwest
5427 \pgf@x=0pt
5428 }
5429 \anchor{south west}{
5430 \northwest
5431 \pgf@y=-\pgf@y
5432 }
5433 \anchor{north east}{
5434 \northwest
5435 \pgf@x=-\pgf@x
5436 }
5437 \anchor{north west}{
5438 \northwest
5439 }
5440 \anchor{south east}{
5441 \northwest
5442 \pgf@x=-\pgf@x
5443 \pgf@y=-\pgf@y
5444 }
5445 \backgroundpath{
5446 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5447
5448
5449 \northwest
5450 \pgf@circ@res@up = \pgf@y
5451 \pgf@circ@res@down = -\pgf@y
5452 \pgf@circ@res@right = -\pgf@x
5453 \pgf@circ@res@left = \pgf@x
5454
5455 #2
5456
5457 }
5458 }
5459 }
5460
5461
5462 \pgfcircdeclarelogicport{and}{
5463 \pgfpathmoveto{\pgfpoint
5464 {\pgf@circ@res@left}
5465 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@up}}
5466 \pgfpathlineto{\pgfpoint
5467 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5468 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@up}}
5469
5470 \pgfpathmoveto{\pgfpoint
5471 {\pgf@circ@res@left}
5472 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@down}}
5473 \pgfpathlineto{\pgfpoint
5474 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5475 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@down}}
5476
5477 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5478 \pgfpathlineto{\pgfpoint
5479 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5480 {0pt}}
5481
5482 \pgfusepath{draw}
5483
5484 \pgfsetlinewidth{2\pgflinewidth}
5485 \pgfpathmoveto{\pgfpoint
5486 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5487 {\pgf@circ@res@up}}
5488 \pgfpathlineto{\pgfpoint
5489 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5490 {\pgf@circ@res@down}}
5491 \pgfpathcurveto
5492 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@down}}
5493 {\pgfpoint
5494 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5495 {.5\pgf@circ@res@down}}
5496 {\pgfpoint
5497 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5498 {0pt}}
5499 \pgfpathcurveto
5500 {\pgfpoint
5501 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5502 {.5\pgf@circ@res@up}}
5503 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@up}}
5504 {\pgfpoint
5505 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5506 {\pgf@circ@res@up}}
5507 \pgfusepath{draw}
5508 }
5509
5510
5511
5512 \pgfcircdeclarelogicport{nand}{
5513 \pgfpathmoveto{\pgfpoint
5514 {\pgf@circ@res@left}
5515 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@up}}
5516 \pgfpathlineto{\pgfpoint
5517 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
5518 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@up}}
5519
5520 \pgfpathmoveto{\pgfpoint
5521 {\pgf@circ@res@left}
5522 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@down}}
5523 \pgfpathlineto{\pgfpoint
5524 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
5525 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@down}}
5526
5527 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5528 \pgfpathlineto{\pgfpoint
5529 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right}
5530 {0pt}}
5531
5532 \pgfusepath{draw}
5533
5534 \pgfsetlinewidth{2\pgflinewidth}
5535
5536 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf@circ@res@right
5537 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right
5538
5539 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5540 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5541 \pgfpathcurveto
5542 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@down}}
5543 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{.5\pgf@circ@res@down}}
5544 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5545 \pgfpathcurveto
5546 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{.5\pgf@circ@res@up}}
5547 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@up}}
5548 {\pgfpoint
5549 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
5550 {\pgf@circ@res@up}}
5551 \pgfpathellipse
5552 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5553 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5554 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5555
5556 \pgfusepath{draw}
5557 }
5558
5559
5560 \pgfcircdeclarelogicport{nor}{
5561 \pgfpathmoveto{\pgfpoint
5562 {\pgf@circ@res@left}
5563 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@up}}
5564 \pgfpathlineto{\pgfpoint
5565 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf@circ@res@left}
5566 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@up}}
5567
5568 \pgfpathmoveto{\pgfpoint
5569 {\pgf@circ@res@left}
5570 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@down}}
5571 \pgfpathlineto{\pgfpoint
5572 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf@circ@res@left}
5573 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@down}}
5574
5575 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5576 \pgfpathlineto{\pgfpoint
5577 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf@circ@res@right}
5578 {0pt}}
5579
5580 \pgfusepath{draw}
5581
5582 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf@circ@res@right
5583 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf@circ@res@right
5584
5585 \pgfsetlinewidth{2\pgflinewidth}
5586 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5587 \pgfpathcurveto
5588 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5589 {\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}}
5590 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf@circ@res@left}{0pt}}
5591 \pgfpathcurveto
5592 {\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}}
5593 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5594 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5595
5596 \pgfpathcurveto
5597 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5598 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf@circ@res@down}}
5599 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5600 \pgfpathcurveto
5601 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf@circ@res@up}}
5602 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5603 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5604
5605 \pgfpathellipse
5606 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5607 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5608 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5609
5610 \pgfusepath{draw}
5611 }
5612
5613
5614
5615
5616 \pgfcircdeclarelogicport{or}{
5617
5618
5619 \pgfpathmoveto{\pgfpoint
5620 {\pgf@circ@res@left}
5621 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@up}}
5622 \pgfpathlineto{\pgfpoint
5623 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf@circ@res@left}
5624 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@up}}
5625
5626 \pgfpathmoveto{\pgfpoint
5627 {\pgf@circ@res@left}
5628 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@down}}
5629 \pgfpathlineto{\pgfpoint
5630 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf@circ@res@left}
5631 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@down}}
5632
5633 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5634 \pgfpathlineto{\pgfpoint
5635 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right}
5636 {0pt}}
5637
5638 \pgfusepath{draw}
5639 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right
5640 \pgfsetlinewidth{2\pgflinewidth}
5641 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5642 \pgfpathcurveto
5643 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5644 {\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}}
5645 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf@circ@res@left}{0pt}}
5646 \pgfpathcurveto
5647 {\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}}
5648 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5649 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5650
5651 \pgfpathcurveto
5652 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5653 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@down}}
5654 {\pgfpoint{\pgf@circ@res@other}{0pt}}
5655 \pgfpathcurveto
5656 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@up}}
5657 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5658 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5659 \pgfusepath{draw}
5660 }
5661
5662
5663 \pgfcircdeclarelogicport{xor}{
5664
5665 \pgfpathmoveto{\pgfpoint
5666 {\pgf@circ@res@left}
5667 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@up}}
5668 \pgfpathlineto{\pgfpoint
5669 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf@circ@res@left}
5670 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@up}}
5671
5672 \pgfpathmoveto{\pgfpoint
5673 {\pgf@circ@res@left}
5674 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@down}}
5675 \pgfpathlineto{\pgfpoint
5676 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf@circ@res@left}
5677 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@down}}
5678
5679 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5680 \pgfpathlineto{\pgfpoint
5681 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf@circ@res@right}
5682 {0pt}}
5683
5684 \pgfusepath{draw}
5685 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf@circ@res@right
5686 \pgfsetlinewidth{2\pgflinewidth}
5687 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5688 \pgfpathcurveto
5689 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5690 {\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}}
5691 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{0pt}}
5692 \pgfpathcurveto
5693 {\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}}
5694 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5695 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5696
5697 \pgfpathcurveto
5698 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5699 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@down}}
5700 {\pgfpoint{\pgf@circ@res@other}{0pt}}
5701 \pgfpathcurveto
5702 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@up}}
5703 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5704 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5705
5706 \def\pgf@circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/distance}\pgf@circ@res@right+}
5707 \pgfpathmoveto{\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{\pgf@circ@res@up}}
5708
5709 \pgfpathcurveto
5710 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@up}}
5711 {\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}}
5712 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{0pt}}
5713 \pgfpathcurveto
5714 {\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}}
5715 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@down}}
5716 {\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{.95*\pgf@circ@res@down}}
5717
5718 \pgfusepath{draw}
5719 }
5720
5721
5722
5723 \pgfcircdeclarelogicport{xnor}{
5724
5725 \pgfpathmoveto{\pgfpoint
5726 {\pgf@circ@res@left}
5727 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@up}}
5728 \pgfpathlineto{\pgfpoint
5729 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf@circ@res@left}
5730 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@up}}
5731
5732 \pgfpathmoveto{\pgfpoint
5733 {\pgf@circ@res@left}
5734 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@down}}
5735 \pgfpathlineto{\pgfpoint
5736 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf@circ@res@left}
5737 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@down}}
5738
5739 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5740 \pgfpathlineto{\pgfpoint
5741 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf@circ@res@right}
5742 {0pt}}
5743
5744 \pgfusepath{draw}
5745 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf@circ@res@right
5746 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/circle width}\pgf@circ@res@right
5747
5748 \pgfsetlinewidth{2\pgflinewidth}
5749 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5750 \pgfpathcurveto
5751 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5752 {\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}}
5753 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{0pt}}
5754 \pgfpathcurveto
5755 {\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}}
5756 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5757 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5758
5759 \pgfpathcurveto
5760 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5761 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@down}}
5762 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5763 \pgfpathcurveto
5764 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@up}}
5765 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5766 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5767
5768 \def\pgf@circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/distance}\pgf@circ@res@right+}
5769 \pgfpathmoveto{\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{\pgf@circ@res@up}}
5770
5771 \pgfpathcurveto
5772 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@up}}
5773 {\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}}
5774 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{0pt}}
5775 \pgfpathcurveto
5776 {\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}}
5777 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@down}}
5778 {\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{.95*\pgf@circ@res@down}}
5779
5780
5781 \pgfpathellipse
5782 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5783 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5784 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5785
5786 \pgfusepath{draw}
5787 }
5788
5789
5790 \pgfdeclareshape{american not port}
5791 {
5792 \anchor{center}{\pgfpointorigin}
5793 \savedanchor\northwest{%
5794 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5795 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@y
5796 \pgf@y=.5\pgf@y
5797 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5798 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@x
5799 \pgf@x=.5\pgf@x
5800 }
5801 \savedanchor\left{%
5802 \pgf@y=0pt
5803 }
5804 \anchor{in}{
5805 \northwest
5806 \pgf@y=0pt
5807 }
5808 \anchor{out}{
5809 \northwest
5810 \pgf@y=0pt
5811 \pgf@x=-\pgf@x
5812 }
5813 \anchor{center}{
5814 \pgfpointorigin
5815 }
5816 \anchor{east}{
5817 \left
5818 \pgf@x=-.8\pgf@x
5819 }
5820 \anchor{west}{
5821 \left
5822 }
5823 \anchor{south}{
5824 \northwest
5825 \pgf@x=0pt
5826 \pgf@y=-\pgf@y
5827 }
5828 \anchor{north}{
5829 \northwest
5830 \pgf@x=0pt
5831 }
5832 \anchor{south west}{
5833 \northwest
5834 \pgf@y=-\pgf@y
5835 }
5836 \anchor{north east}{
5837 \northwest
5838 \pgf@x=-\pgf@x
5839 }
5840 \anchor{north west}{
5841 \northwest
5842 }
5843 \anchor{south east}{
5844 \northwest
5845 \pgf@x=-\pgf@x
5846 \pgf@y=-\pgf@y
5847 }
5848 \backgroundpath{
5849 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5850
5851
5852 \northwest
5853 \pgf@circ@res@up = \pgf@y
5854 \pgf@circ@res@down = -\pgf@y
5855 \pgf@circ@res@right = -\pgf@x
5856 \pgf@circ@res@left = \pgf@x
5857
5858 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right
5859
5860 \pgfscope
5861 \pgfsetlinewidth{2\pgflinewidth}
5862 \pgftransformxshift{.7\pgf@circ@res@left}
5863 \pgf@circ@res@step=\pgf@circ@res@right
5864 \advance\pgf@circ@res@step by -\pgf@circ@res@left
5865 \pgf@circ@res@step=.7\pgf@circ@res@step
5866
5867 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5868 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
5869 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
5870 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5871 \pgfusepath{draw}
5872 \pgfpathellipse
5873 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@other}{0pt}}
5874 {\pgfpoint{.5\pgf@circ@res@other}{0pt}}
5875 {\pgfpoint{0pt}{.5\pgf@circ@res@other}}
5876 \pgfusepath{draw}
5877 \endpgfscope
5878
5879 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5880 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
5881
5882 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5883 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
5884
5885 \pgfusepath{draw}
5886
5887 }
5888 }
5889
5890 \pgfdeclareshape{invschmitt}
5891 {
5892 \anchor{center}{\pgfpointorigin}
5893 \savedanchor\northwest{%
5894 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5895 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@y
5896 \pgf@y=.5\pgf@y
5897 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5898 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@x
5899 \pgf@x=.5\pgf@x
5900 }
5901 \savedanchor\left{%
5902 \pgf@y=0pt
5903 }
5904 \anchor{in}{
5905 \northwest
5906 \pgf@y=0pt
5907 }
5908 \anchor{out}{
5909 \northwest
5910 \pgf@y=0pt
5911 \pgf@x=-\pgf@x
5912 }
5913 \anchor{center}{
5914 \pgfpointorigin
5915 }
5916 \anchor{east}{
5917 \left
5918 \pgf@x=-.8\pgf@x
5919 }
5920 \anchor{west}{
5921 \left
5922 }
5923 \anchor{south}{
5924 \northwest
5925 \pgf@x=0pt
5926 \pgf@y=-\pgf@y
5927 }
5928 \anchor{north}{
5929 \northwest
5930 \pgf@x=0pt
5931 }
5932 \anchor{south west}{
5933 \northwest
5934 \pgf@y=-\pgf@y
5935 }
5936 \anchor{north east}{
5937 \northwest
5938 \pgf@x=-\pgf@x
5939 }
5940 \anchor{north west}{
5941 \northwest
5942 }
5943 \anchor{south east}{
5944 \northwest
5945 \pgf@x=-\pgf@x
5946 \pgf@y=-\pgf@y
5947 }
5948 \backgroundpath{
5949 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5950
5951
5952 \northwest
5953 \pgf@circ@res@up = \pgf@y
5954 \pgf@circ@res@down = -\pgf@y
5955 \pgf@circ@res@right = -\pgf@x
5956 \pgf@circ@res@left = \pgf@x
5957
5958 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right
5959
5960 \pgfscope
5961 \pgfsetlinewidth{2\pgflinewidth}
5962 \pgftransformxshift{.7\pgf@circ@res@left}
5963 \pgf@circ@res@step=\pgf@circ@res@right
5964 \advance\pgf@circ@res@step by -\pgf@circ@res@left
5965 \pgf@circ@res@step=.7\pgf@circ@res@step
5966
5967 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5968 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
5969 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
5970 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5971 \pgfusepath{draw}
5972 \pgfpathellipse
5973 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@other}{0pt}}
5974 {\pgfpoint{.5\pgf@circ@res@other}{0pt}}
5975 {\pgfpoint{0pt}{.5\pgf@circ@res@other}}
5976 \pgfusepath{draw}
5977 \endpgfscope
5978
5979 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5980 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
5981
5982 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5983 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
5984 \pgfusepath{draw}
5985 %draw inner shape
5986
5987 \pgfsetlinewidth{2\pgflinewidth}
5988
5989 \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{.3\pgf@circ@res@down}}
5990 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
5991 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@up}}
5992 \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@left}{.3\pgf@circ@res@up}}
5993 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
5994 \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@down}}
5995 \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@up}}
5996 \pgfusepath{draw}
5997
5998 }
5999 }
6000
6001
6002
6003
6004
6005 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6006
6007 % #1 - name
6008 % #2 - text inside
6009 % #3 - number of inputs
6010 % #4 - is it a not
6011
6012 \long\def\pgfcircdeclareeurologicport#1#2#3#4{
6013 \pgfdeclareshape{european #1 port}
6014 {
6015 \savedanchor\northwest{%
6016 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6017 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@y
6018 \pgf@y=.5\pgf@y
6019 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6020 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@x
6021 \pgf@x=.5\pgf@x
6022 }
6023 \savedanchor\left{%
6024 \pgf@y=0pt
6025 }
6026 \savedanchor\inOne{%
6027 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6028 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@y
6029 \pgf@y=.5\pgf@y
6030 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@y
6031 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6032 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@x
6033 \pgf@x=.5\pgf@x
6034 }
6035 \anchor{in}{
6036 \inOne
6037 }
6038 \anchor{in 1}{
6039 \inOne
6040 }
6041 \anchor{in 2}{
6042 \inOne
6043 \pgf@y=-\pgf@y
6044 }
6045 \anchor{out}{
6046 \northwest
6047 \pgf@y=0pt
6048 \pgf@x=-\pgf@x
6049 }
6050 \anchor{center}{
6051 \northwest
6052 \pgf@y=0pt
6053 \pgf@x=-.8\pgf@x
6054 }
6055 \anchor{east}{
6056 \left
6057 \pgf@x=-.8\pgf@x
6058 }
6059 \anchor{west}{
6060 \left
6061 }
6062 \anchor{south}{
6063 \northwest
6064 \pgf@x=0pt
6065 \pgf@y=-\pgf@y
6066 }
6067 \anchor{north}{
6068 \northwest
6069 \pgf@x=0pt
6070 }
6071 \anchor{south west}{
6072 \northwest
6073 \pgf@y=-\pgf@y
6074 }
6075 \anchor{north east}{
6076 \northwest
6077 \pgf@x=-\pgf@x
6078 }
6079 \anchor{north west}{
6080 \northwest
6081 }
6082 \anchor{south east}{
6083 \northwest
6084 \pgf@x=-\pgf@x
6085 \pgf@y=-\pgf@y
6086 }
6087 \backgroundpath{
6088 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
6089 \northwest
6090 \pgf@circ@res@up = \pgf@y
6091 \pgf@circ@res@down = -\pgf@y
6092 \pgf@circ@res@right = -\pgf@x
6093 \pgf@circ@res@left = \pgf@x
6094 \def\pgf@temp{1}
6095 \def\pgf@circ@temp{#3}
6096 \ifx\pgftemp\pgf@circ@temp % one input
6097 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
6098 \pgfpathlineto{
6099 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}{0pt}}
6100 \else % two inputs
6101 \pgfpathmoveto{
6102 \pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@up}}
6103 \pgfpathlineto{
6104 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}
6105 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@up}}
6106 %
6107 \pgfpathmoveto{
6108 \pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@down}}
6109 \pgfpathlineto{
6110 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}
6111 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@down}}
6112 \fi%
6113 %
6114 %
6115 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6116 \pgfpathlineto{
6117 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{0pt}}
6118 %
6119 \edef\pgf@temp{not}
6120 \edef\pgf@circ@temp{#4}
6121 \ifx\pgf@temp\pgf@circ@temp % is a not
6122 \pgfpathmoveto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not width}\pgf@circ@res@right}{0pt}}
6123 \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}}
6124 \fi
6125 %
6126 \pgfusepath{draw}
6127 %
6128 \pgfpathmoveto{\pgfpointorigin}
6129 \pgftext{#2}
6130 %
6131 %
6132 %
6133 \pgfsetlinewidth{2\pgflinewidth}
6134 \pgfpathrectanglecorners
6135 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}{\pgf@circ@res@up}}
6136 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{\pgf@circ@res@down}}
6137 \pgfusepath{draw}
6138 %
6139 %
6140 }
6141 }
6142 }
6143
6144
6145
6146 \pgfcircdeclareeurologicport{and}{$\&$}{2}{}
6147 \pgfcircdeclareeurologicport{or}{$\ge 1$}{2}{}
6148 \pgfcircdeclareeurologicport{xor}{$=1$}{2}{}
6149 \pgfcircdeclareeurologicport{not}{$1$}{1}{not}
6150 \pgfcircdeclareeurologicport{nand}{$\&$}{2}{not}
6151 \pgfcircdeclareeurologicport{nor}{$\ge 1$}{2}{not}
6152 \pgfcircdeclareeurologicport{xnor}{$=1$}{2}{not}
6153
6154 \long\def\pgfcircdeclaretransistor#1#2#3{
6155 \pgfdeclareshape{#1}
6156 {
6157 \anchor{center}{
6158 \pgfpointorigin
6159 }
6160 \savedanchor\northeast{% upper right
6161 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6162 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@y
6163 \pgf@y=.5\pgf@y
6164 \pgf@x=0pt
6165 }
6166 \savedanchor\left{%center left
6167 \pgf@y=0pt
6168 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6169 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@x
6170 }
6171 \anchor{text}{
6172 \northeast
6173 \pgf@y=.7\pgf@y
6174 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6175 \pgf@x=0.1\pgf@x
6176 }
6177 \anchor{pathstart}{ % south
6178 \northeast
6179 \pgf@y=-\pgf@y
6180 }
6181 \anchor{pathend}{
6182 \northeast
6183 }
6184 \anchor{north}{
6185 \northeast
6186 \pgf@circ@res@step=\pgf@y
6187 \left
6188 \pgf@y=\pgf@circ@res@step
6189 \pgf@x=.5\pgf@x
6190 }
6191 \anchor{west}{
6192 \left
6193 }
6194 \anchor{east}{
6195 \northeast
6196 \pgf@y=0pt
6197 }
6198 \anchor{south}{
6199 \northeast
6200 \pgf@circ@res@step=\pgf@y
6201 \left
6202 \pgf@y=-\pgf@circ@res@step
6203 \pgf@x=.5\pgf@x
6204 }
6205 \anchor{south west}{
6206 \northeast
6207 \pgf@circ@res@step=\pgf@y
6208 \left
6209 \pgf@y=-\pgf@circ@res@step
6210 }
6211 \anchor{north east}{
6212 \northeast
6213 }
6214 \anchor{north west}{
6215 \northeast
6216 \pgf@circ@res@step=\pgf@y
6217 \left
6218 \pgf@y=\pgf@circ@res@step
6219 }
6220 \anchor{south east}{
6221 \northeast
6222 \pgf@y=-\pgf@y
6223 }
6224 \anchor{B}{
6225 \northeast
6226 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6227 \left
6228 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6229 }
6230 \anchor{base}{
6231 \northeast
6232 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6233 \left
6234 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6235 }
6236 \anchor{G}{
6237 \northeast
6238 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6239 \left
6240 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6241 }
6242 \anchor{gate}{
6243 \northeast
6244 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6245 \left
6246 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6247 }
6248 \anchor{nobase}{
6249 \left
6250 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@x
6251 }
6252 \anchor{nogate}{
6253 \left
6254 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@x
6255 }
6256 \anchor{E}{
6257 \northeast
6258 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6259 }
6260 \anchor{emitter}{
6261 \northeast
6262 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6263 }
6264 \anchor{C}{
6265 \northeast
6266 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6267 }
6268 \anchor{collector}{
6269 \northeast
6270 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6271 }
6272 \anchor{S}{
6273 \northeast
6274 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6275 }
6276 \anchor{source}{
6277 \northeast
6278 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6279 }
6280 \anchor{D}{
6281 \northeast
6282 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6283 }
6284 \anchor{drain}{
6285 \northeast
6286 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6287 }
6288 #2
6289 \backgroundpath{
6290 \pgftransformationadjustments
6291 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
6292 %
6293 \ifnum \pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction} > 0
6294 \pgf@circuit@trans@ntypetrue
6295 \else
6296 \pgf@circuit@trans@ntypefalse
6297 \fi
6298 \northeast
6299 \pgf@circ@res@up = \pgf@y
6300 \pgf@circ@res@down = -\pgf@y
6301 \pgf@circ@res@right = \pgf@x
6302 \left
6303 \pgf@circ@res@left = \pgf@x
6304 %
6305 #3
6306 % BODY DIODE
6307 \ifpgf@circuit@fet@bodydiode
6308 \drawbodydiode{#1}
6309 \fi
6310 %
6311 }
6312 }
6313 }
6314
6315 \long\def\drawbodydiode#1{
6316 \pgfscope
6317 \pgftransformshift{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
6318 \pgftransformrotate{90}
6319 \pgftransformscale{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode scale}}
6320 \ifpgf@circuit@fulldiode
6321 \pgfnode{fulldiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
6322 \else
6323 \pgfnode{emptydiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
6324 \fi
6325 \endpgfscope
6326 %Draw upper connection to body diode
6327 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}
6328 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
6329 \pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}
6330 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
6331 \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{east}}
6332 \pgfusepath{draw}
6333 \pgfscope
6334 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}
6335 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
6336 \pgftransformscale{0.5}
6337 \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
6338 \endpgfscope{}
6339 %Draw lower connection to body diode
6340 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}
6341 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
6342 \pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
6343 \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{west}}
6344 \pgfusepath{draw}
6345 \pgfscope
6346 \pgftransformshift{\pgfpoint{\pgf@circ@res@right} {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
6347 \pgftransformscale{0.5}
6348 \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
6349 \endpgfscope
6350 }
6351
6352 \long\def\declarebpt#1{
6353 \pgfcircdeclaretransistor{#1}{}{
6354 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6355 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6356 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
6357 \pgfpathlineto{\pgfpoint
6358 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6359 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@up}}
6360 \pgfusepath{draw}
6361
6362 \pgfscope
6363 \pgfpathmoveto{\pgfpoint
6364 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6365 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
6366 \pgfpathlineto{\pgfpoint
6367 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6368 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6369 \pgfsetlinewidth{2\pgflinewidth}
6370 \pgfusepath{draw}
6371 \endpgfscope
6372
6373 \pgfpathmoveto{\pgfpoint
6374 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6375 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@down}}
6376 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6377 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6378 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6379 \pgfusepath{draw}
6380 %draw arrow depending on type of transiytor
6381 \pgfscope
6382 \pgfslopedattimetrue
6383 \pgfallowupsidedownattimetrue
6384 \pgfresetnontranslationattimefalse
6385 \ifpgf@circuit@trans@ntype
6386 \pgftransformlineattime{.5}{%
6387 \pgfpoint%
6388 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6389 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@down}%
6390 }{%
6391 \pgfpoint{\pgf@circ@res@right}%
6392 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}%
6393 }
6394 \else
6395 \pgftransformlineattime{.5}{%
6396 \pgfpoint{\pgf@circ@res@right}%
6397 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}%
6398 }{%
6399 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6400 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@up}%
6401 }
6402 \fi
6403 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6404 \endpgfscope
6405
6406 \ifpgf@circuit@bpt@drawphoto
6407 \pgfscope
6408 \pgfsetarrowsstart{latex'}
6409 \pgfpathmoveto{\pgfpointadd{\pgfpoint
6410 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6411 {\pgf@circ@res@up+\pgf@circ@res@down}}
6412 {\pgfpoint{0.05\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
6413 \pgfpathlineto{\pgfpointadd{\pgfpoint
6414 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6415 {\pgf@circ@res@up+\pgf@circ@res@down}}
6416 {\pgfpoint{0.5\pgf@circ@res@left}{0.3\pgf@circ@res@up}}}
6417 \pgfusepath{draw}
6418 \pgfpathmoveto{\pgfpointadd{\pgfpoint
6419 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6420 {\pgf@circ@res@up+\pgf@circ@res@down}}
6421 {\pgfpoint{0.05\pgf@circ@res@left}{-0.1\pgf@circ@res@up}}}
6422 \pgfpathlineto{\pgfpointadd{\pgfpoint
6423 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6424 {\pgf@circ@res@up+\pgf@circ@res@down}}
6425 {\pgfpoint{0.5\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
6426 \pgfusepath{draw}
6427 \endpgfscope
6428 \else
6429 \ifpgf@circuit@bpt@drawbase
6430 \pgfpathmoveto{\pgfpoint
6431 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6432 {\pgf@circ@res@up+\pgf@circ@res@down}}
6433 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
6434 \pgfusepath{draw}
6435 \fi
6436 \fi
6437 }
6438 }
6439
6440 \declarebpt{npn}
6441 \declarebpt{pnp}
6442
6443 \long\def\declareigbt#1{
6444 \pgfcircdeclaretransistor{#1}{}
6445 {
6446 %draw upper connection
6447 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6448 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6449 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
6450 \pgfpathlineto{\pgfpoint
6451 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6452 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@up}}
6453 \pgfusepath{draw}
6454
6455 %draw thicker gate lines
6456 \pgfscope
6457 \pgfpathmoveto{\pgfpoint
6458 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6459 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6460 \pgfpathlineto{\pgfpoint
6461 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6462 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6463 \pgfpathmoveto{\pgfpoint
6464 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6465 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6466 \pgfpathlineto{\pgfpoint
6467 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6468 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6469 \pgfsetlinewidth{2\pgflinewidth}
6470 \pgfusepath{draw}
6471 \endpgfscope
6472 %draw lower connection
6473 \pgfpathmoveto{\pgfpoint
6474 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6475 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@down}}
6476 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6477 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
6478 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6479 \pgfusepath{draw}
6480 %draw arrow depending on type of transiytor
6481 \pgfscope
6482 \pgfslopedattimetrue
6483 \pgfallowupsidedownattimetrue
6484 \pgfresetnontranslationattimefalse
6485 \ifpgf@circuit@trans@ntype
6486 \pgftransformlineattime{.5}{%
6487 \pgfpoint%
6488 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6489 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@down}%
6490 }{%
6491 \pgfpoint{\pgf@circ@res@right}%
6492 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}%
6493 }
6494 \else
6495 \pgftransformlineattime{.5}{%
6496 \pgfpoint{\pgf@circ@res@right}%
6497 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}%
6498 }{%
6499 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6500 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@up}%
6501 }
6502 \fi
6503 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6504 \endpgfscope
6505 %draw gate
6506 \ifpgf@circuit@trans@ntype
6507 \pgfpathmoveto{\pgfpoint
6508 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6509 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6510 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
6511 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6512 \else
6513 \pgfpathmoveto{\pgfpoint
6514 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6515 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@up}}
6516 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
6517 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@up}}
6518 \fi
6519 \pgfusepath{draw}
6520 }
6521 }
6522
6523 \declareigbt{pigbt}
6524 \declareigbt{nigbt}
6525 \declareigbt{Lnigbt}
6526 \declareigbt{Lpigbt}
6527
6528
6529 \pgfcircdeclaretransistor{nmos}{}{%
6530 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6531 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6532 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
6533 \pgfpathlineto{\pgfpoint
6534 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6535 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
6536
6537 \pgfpathmoveto{\pgfpoint
6538 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6539 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
6540 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6541 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
6542 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6543 \pgfusepath{draw}
6544
6545 \pgfscope
6546 \pgfpathmoveto{\pgfpoint
6547 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6548 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@up}}
6549 \pgfpathlineto{\pgfpoint
6550 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6551 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@down}}
6552 \pgfpathmoveto{\pgfpoint
6553 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
6554 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
6555 \pgfpathlineto{\pgfpoint
6556 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
6557 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
6558 \pgfsetlinewidth{2\pgflinewidth}
6559 \pgfusepath{draw}
6560 \endpgfscope
6561 \ifpgf@circuit@mos@arrows
6562 \pgfscope
6563 \pgfslopedattimetrue
6564 \pgfallowupsidedownattimetrue
6565 \pgfresetnontranslationattimefalse
6566 \pgftransformlineattime{.6}{%
6567 \pgfpoint%
6568 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}%
6569 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
6570 }{%
6571 \pgfpoint
6572 {\pgf@circ@res@right}%
6573 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
6574 }
6575 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6576 \endpgfscope
6577 \fi
6578
6579 \ifpgf@circuit@bpt@drawgate
6580 \pgfpathmoveto{\pgfpoint
6581 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
6582 {\pgf@circ@res@up+\pgf@circ@res@down}}
6583 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
6584 \pgfusepath{draw}
6585 \fi
6586 }
6587
6588
6589 \pgfcircdeclaretransistor{pmos}{}{%
6590 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6591 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6592 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
6593 \pgfpathlineto{\pgfpoint
6594 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6595 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
6596 \pgfusepath{draw}
6597
6598 \ifpgf@circuit@mos@arrows
6599 \pgfscope
6600 \pgfslopedattimetrue
6601 \pgfallowupsidedownattimetrue
6602 \pgfresetnontranslationattimefalse
6603 \pgftransformlineattime{.4}{%
6604 \pgfpoint%
6605 {\pgf@circ@res@right}%
6606 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
6607 }{%
6608 \pgfpoint
6609 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}%
6610 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
6611 }
6612 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6613 \endpgfscope
6614 \fi
6615
6616 \pgfscope
6617 \pgfpathmoveto{\pgfpoint
6618 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6619 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@up}}
6620 \pgfpathlineto{\pgfpoint
6621 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6622 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@down}}
6623 \pgfpathmoveto{\pgfpoint
6624 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
6625 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
6626 \pgfpathlineto{\pgfpoint
6627 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
6628 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
6629 \pgfsetlinewidth{2\pgflinewidth}
6630 \pgfusepath{draw}
6631 \endpgfscope
6632
6633 \pgfpathmoveto{\pgfpoint
6634 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6635 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
6636 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6637 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
6638 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6639
6640
6641 \pgfusepath{draw}
6642 \ifpgf@circuit@bpt@drawgate
6643 \pgfpathmoveto{\pgfpoint
6644 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
6645 {\pgf@circ@res@up+\pgf@circ@res@down}}
6646 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
6647 \pgfusepath{draw}
6648 \fi
6649 \pgfpathcircle{\pgfpoint
6650 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
6651 {\pgf@circ@res@up+\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
6652 \ifpgf@circuit@pmos@emptycircle
6653 \pgfsetfillcolor{white}
6654 \fi
6655 \pgfusepath{draw,fill}
6656 }
6657
6658 \long\def\drawfetcore#1{
6659 \pgftransformationadjustments
6660 %top connection
6661 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6662 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6663 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
6664 \pgfpathlineto{\pgfpoint
6665 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6666 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
6667 \pgfusepath{draw}
6668 \pgfscope
6669 \pgfpathmoveto{\pgfpoint
6670 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6671 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
6672 \ifpgf@circuit@trans@depletiontype
6673 \pgfpathlineto{\pgfpoint
6674 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6675 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6676 \else
6677
6678 \pgfpathlineto{\pgfpoint
6679 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6680 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up*0.45}}
6681 \pgfpathmoveto{\pgfpoint
6682 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6683 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up*0.25}}
6684 \pgfpathlineto{\pgfpoint
6685 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6686 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down*0.25}}
6687 \pgfpathmoveto{\pgfpoint
6688 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6689 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@down*0.45}}
6690 \pgfpathlineto{\pgfpoint
6691 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6692 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6693 \fi
6694 \pgfsetlinewidth{2\pgflinewidth}
6695 \pgfusepath{draw}
6696 \endpgfscope
6697 %Bulk connection line
6698 \pgfpathmoveto{\pgfpoint
6699 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6700 {\pgf@circ@res@up+\pgf@circ@res@down}}
6701 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
6702 {\pgf@circ@res@up+\pgf@circ@res@down}}
6703
6704 %bottom connection
6705 \pgfpathmoveto{\pgfpoint
6706 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6707 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
6708 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6709 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
6710 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6711 \pgfusepath{draw}
6712
6713 %draw thick gate line
6714 \pgfscope
6715 \pgfpathmoveto{\pgfpoint
6716 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6717 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6718 \pgfpathlineto{\pgfpoint
6719 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6720 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6721 \pgfsetlinewidth{2\pgflinewidth}
6722 \pgfusepath{draw}
6723 \endpgfscope
6724
6725 \pgfscope
6726 \pgfslopedattimetrue
6727 \pgfallowupsidedownattimetrue
6728 \pgfresetnontranslationattimefalse
6729
6730 \pgftransformlineattime{.6}{%
6731 \pgfpoint
6732 {\pgf@circ@res@right}%
6733 {\pgf@circ@res@up+\pgf@circ@res@down}%
6734 }{%
6735 \pgfpoint%
6736 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6737 {\pgf@circ@res@up+\pgf@circ@res@down}%
6738 }
6739 \ifpgf@circuit@trans@ntype
6740 \else
6741 \pgftransformrotate{180}
6742 \fi
6743 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6744 \endpgfscope
6745
6746 % GATE CONNECTION
6747 \ifpgf@circuit@bpt@drawgate
6748 \ifpgf@circuit@trans@ntype
6749 \pgfpathmoveto{\pgfpoint
6750 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6751 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6752 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6753 \else
6754 \pgfpathmoveto{\pgfpoint
6755 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6756 {-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6757 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6758 \fi
6759 \pgfusepath{draw}
6760 \fi
6761
6762 }
6763
6764 \long\def\pgfdeclaretransistorwrapperaddbulk#1#2#3
6765 {\pgfcircdeclaretransistor{#1}{
6766 \anchor{bulk}{\left\pgf@x=0pt}
6767 \anchor{B}{\left\pgf@x=0pt}%override Base anchor from npn&igbt
6768 #2
6769 }
6770 {#3}
6771 }
6772
6773
6774 \pgfdeclaretransistorwrapperaddbulk{nfet}{}{%
6775 \pgf@circuit@trans@depletiontypefalse
6776 \drawfetcore{nfet}
6777 }
6778
6779
6780 \pgfdeclaretransistorwrapperaddbulk{pfet}{}{%
6781 \pgf@circuit@trans@depletiontypefalse
6782 \drawfetcore{pfet}
6783 }
6784
6785 % N-CHANNEL IGFET ENHANCEMENT TYPE
6786 \pgfdeclaretransistorwrapperaddbulk{nigfete}{}{%
6787 \pgf@circuit@trans@depletiontypefalse
6788 \drawfetcore{nigfete}
6789
6790 % SOURCE CONNECTION
6791 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6792 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6793 \pgfusepath{draw}
6794
6795 % SOLDER DOT at source-bulk connection
6796 \ifpgf@circuit@fet@solderdot
6797 \pgfscope
6798 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6799 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6800 \pgfnode{circ}{center}{}{}{}
6801 \endpgfscope{}
6802 \fi
6803 }
6804
6805
6806
6807
6808 % N-CHANNEL IGFET ENHANCEMENT TYPE with Bulk connector
6809 \pgfdeclaretransistorwrapperaddbulk{nigfetebulk}{}{%
6810 \pgf@circuit@trans@depletiontypefalse
6811 \drawfetcore{nigfetebulk}
6812 % SOLDER DOT at source-bulk connection
6813 \ifpgf@circuit@fet@solderdot
6814 \pgfscope
6815 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6816 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}}
6817 \pgfnode{circ}{center}{}{}{}
6818 \endpgfscope{}
6819 \fi
6820 }
6821
6822
6823
6824 % N-CHANNEL IGFET DEPLETION TYPE
6825 \pgfdeclaretransistorwrapperaddbulk{nigfetd}{}{%
6826 \pgf@circuit@trans@depletiontypetrue
6827 \drawfetcore{nigfetd}
6828
6829 % SOURCE CONNECTION
6830 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6831 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6832 \pgfusepath{draw}
6833
6834 % SOLDER DOT at source-bulk connection
6835 \ifpgf@circuit@fet@solderdot
6836 \pgfscope
6837 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6838 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6839 \pgfnode{circ}{center}{}{}{}
6840 \endpgfscope{}
6841 \fi
6842 }
6843
6844 % P-CHANNEL IGFET ENHANCEMENT TYPE
6845 \pgfdeclaretransistorwrapperaddbulk{pigfete}{}{%
6846 \pgf@circuit@trans@depletiontypefalse
6847 \drawfetcore{pigfete}
6848 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6849
6850 % SOURCE CONNECTION
6851 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6852 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6853 \pgfusepath{draw}
6854
6855
6856 % SOLDER DOT at source-bulk connection
6857 \ifpgf@circuit@fet@solderdot
6858 \pgfscope
6859 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6860 \pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@up}}
6861 \pgfnode{circ}{center}{}{}{}
6862 \endpgfscope
6863 \fi
6864 }
6865
6866 % P-CHANNEL IGFET ENHANCEMENT TYPE with bulk connector
6867 \pgfdeclaretransistorwrapperaddbulk{pigfetebulk}{}{%
6868 \pgf@circuit@trans@depletiontypefalse
6869 \drawfetcore{pigfetebulk}
6870 }
6871
6872
6873 % P-CHANNEL IGFET DEPLETION TYPE
6874 \pgfdeclaretransistorwrapperaddbulk{pigfetd}{}{%
6875 \pgf@circuit@trans@depletiontypetrue
6876 \drawfetcore{pigfetd}
6877
6878 % SOURCE CONNECTION
6879 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6880 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6881 \pgfusepath{draw}
6882
6883
6884 % SOLDER DOT at source-bulk connection
6885 \ifpgf@circuit@fet@solderdot
6886 \pgfscope
6887 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6888 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@up}}
6889 \pgfnode{circ}{center}{}{}{}
6890 \endpgfscope{}
6891 \fi
6892 }
6893
6894 \pgfcircdeclaretransistor{njfet}{}{%
6895 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6896 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6897 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}}
6898 \pgfpathlineto{\pgfpoint
6899 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6900 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}}
6901
6902 \pgfpathmoveto{\pgfpoint
6903 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6904 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6905 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6906 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6907 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6908 \pgfusepath{draw}
6909
6910 \pgfscope
6911 \pgfpathmoveto{\pgfpoint
6912 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6913 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf@circ@res@up}}
6914 \pgfpathlineto{\pgfpoint
6915 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6916 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf@circ@res@down}}
6917 \pgfsetlinewidth{2\pgflinewidth}
6918 \pgfusepath{draw}
6919 \endpgfscope
6920
6921 \pgfscope
6922 \pgfslopedattimetrue
6923 \pgfallowupsidedownattimetrue
6924 \pgfresetnontranslationattimefalse
6925 \pgftransformlineattime{.6}{%
6926 \pgfpoint{\pgf@circ@res@left}%
6927 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}%
6928 }{%
6929 \pgfpoint
6930 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}%
6931 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}%
6932 }
6933 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6934 \endpgfscope
6935
6936 \pgfpathmoveto{\pgfpoint
6937 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6938 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6939 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
6940 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6941 \pgfusepath{draw}
6942 }
6943
6944
6945 \pgfcircdeclaretransistor{pjfet}{}{%
6946 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6947 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6948 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6949 \pgfpathlineto{\pgfpoint
6950 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6951 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6952
6953 \pgfpathmoveto{\pgfpoint
6954 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6955 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}}
6956 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6957 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}}
6958 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6959 \pgfusepath{draw}
6960
6961 \pgfscope
6962 \pgfpathmoveto{\pgfpoint
6963 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6964 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf@circ@res@up}}
6965 \pgfpathlineto{\pgfpoint
6966 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6967 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf@circ@res@down}}
6968 \pgfsetlinewidth{2\pgflinewidth}
6969 \pgfusepath{draw}
6970 \endpgfscope
6971
6972 \pgfscope
6973 \pgfslopedattimetrue
6974 \pgfallowupsidedownattimetrue
6975 \pgfresetnontranslationattimefalse
6976 \pgftransformlineattime{.4}{%
6977 \pgfpoint%
6978 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}%
6979 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}%
6980 }{%
6981 \pgfpoint{\pgf@circ@res@left}%
6982 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}%
6983 }
6984 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6985 \endpgfscope
6986
6987
6988 \pgfpathmoveto{\pgfpoint
6989 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6990 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6991 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
6992 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6993 \pgfusepath{draw}
6994 }
6995
6996
6997 \pgfdeclaretransistorwrapperaddbulk{isfet}{}{%
6998 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6999 % DRAIN CONNECTION
7000 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
7001 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
7002 % DRAIN
7003 \pgfpathlineto{\pgfpoint
7004 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7005 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
7006 \pgfusepath{draw}
7007
7008 % GATE, DEPLETION TYPE
7009 \pgfscope %% added
7010 \pgfpathmoveto{\pgfpoint
7011 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7012 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@up}}
7013 \pgfpathlineto{\pgfpoint
7014 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7015 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@down}}
7016 \pgfsetlinewidth{2\pgflinewidth} %% added
7017 \pgfusepath{draw} %% added
7018 \endpgfscope %% added
7019
7020 % BULK
7021 \pgfpathmoveto{\pgfpoint
7022 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7023 {\pgf@circ@res@up+\pgf@circ@res@down}}
7024 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+.5\pgflinewidth}
7025 {\pgf@circ@res@up+\pgf@circ@res@down}}
7026
7027 % SOURCE
7028 \pgfpathmoveto{\pgfpoint
7029 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7030 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
7031 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
7032 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
7033 % SOURCE CONNECTION
7034 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7035 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
7036 \pgfusepath{draw}
7037
7038 % GATE
7039 %\pgfscope
7040 %\pgfpathmoveto{\pgfpoint
7041 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf@circ@res@left}
7042 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
7043 %\pgfpathlineto{\pgfpoint
7044 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf@circ@res@left}
7045 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
7046 %\pgfsetlinewidth{2\pgflinewidth}
7047 %\pgfusepath{draw}
7048 %\endpgfscope
7049
7050
7051 % SOLDER DOT at source-bulk connection
7052 \ifpgf@circuit@fet@solderdot
7053 \pgfscope
7054 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
7055 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
7056 \pgfnode{circ}{center}{}{}{}
7057 \endpgfscope{}
7058 \fi
7059 % ARROW
7060 \pgfscope
7061 \pgfslopedattimetrue
7062 \pgfallowupsidedownattimetrue
7063 \pgfresetnontranslationattimefalse
7064 \pgftransformlineattime{.6}{%
7065 \pgfpoint
7066 {\pgf@circ@res@right}%
7067 {\pgf@circ@res@up+\pgf@circ@res@down}%
7068 }{%
7069 \pgfpoint%
7070 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}%
7071 {\pgf@circ@res@up+\pgf@circ@res@down}%
7072 }
7073 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
7074 \endpgfscope
7075 \pgfusepath{draw}
7076
7077 % Wavy lines
7078 \pgfscope
7079 \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}}
7080 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7081 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7082 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7083 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7084 \pgfusepath{draw}
7085
7086 \pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf@circ@res@up}{0cm}}
7087 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7088 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7089 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7090 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7091 \pgfusepath{draw}
7092
7093 \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}}
7094 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7095 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7096 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7097 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7098 \pgfusepath{draw}
7099 \endpgfscope
7100
7101 }
7102
7103
7104 %% Black thyristor
7105
7106 \pgfcircdeclarebipole{
7107 \anchor{gate}{
7108 \northeast
7109 }
7110 \anchor{anode}{
7111 \southwest
7112 \pgf@y=0cm
7113 }
7114 \anchor{G}{
7115 \northeast
7116 }
7117 \anchor{cathode}{
7118 \northeast
7119 \pgf@y=0cm
7120 }
7121 }{\ctikzvalof{tripoles/thyristor/height 2}}{fullthyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
7122
7123 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7124
7125 \pgf@circ@res@other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf@circ@res@left
7126 \pgf@circ@res@step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf@circ@res@right
7127
7128 \pgfscope
7129 \pgftransformxshift{\pgf@circ@res@other}
7130 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7131
7132 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7133 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7134 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7135 \pgfusepath{draw,fill}
7136
7137 \pgfsetlinewidth{\pgfstartlinewidth}
7138
7139 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7140 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf@circ@res@up}}
7141 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\pgf@circ@res@up}}
7142 \pgfusepath{draw}
7143 \endpgfscope
7144
7145 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
7146 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@down}}
7147
7148 \pgfusepath{draw}
7149
7150 \pgfsetlinewidth{\pgfstartlinewidth}
7151
7152 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7153 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7154
7155 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7156 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7157
7158 \pgfusepath{draw}
7159
7160 }
7161
7162 %% Empty thyristor
7163
7164 \pgfcircdeclarebipole{
7165 \anchor{gate}{
7166 \northeast
7167 }
7168 \anchor{anode}{
7169 \southwest
7170 \pgf@y=0cm
7171 }
7172 \anchor{G}{
7173 \northeast
7174 }
7175 \anchor{cathode}{
7176 \northeast
7177 \pgf@y=0cm
7178 }
7179 }{\ctikzvalof{tripoles/thyristor/height 2}}{emptythyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
7180
7181 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7182
7183 \pgf@circ@res@other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf@circ@res@left
7184 \pgf@circ@res@step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf@circ@res@right
7185
7186 \pgfscope
7187 \pgftransformxshift{\pgf@circ@res@other}
7188 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7189
7190 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7191 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7192 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7193 \pgfusepath{draw}
7194
7195 \pgfsetlinewidth{\pgfstartlinewidth}
7196
7197 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7198 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf@circ@res@up}}
7199 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\pgf@circ@res@up}}
7200 \pgfusepath{draw}
7201 \endpgfscope
7202
7203 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
7204 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@down}}
7205
7206 \pgfusepath{draw}
7207
7208 \pgfsetlinewidth{\pgfstartlinewidth}
7209
7210 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7211 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7212
7213 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7214 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7215
7216 \pgfusepath{draw}
7217
7218 }
7219
7220 %% Empty triac
7221
7222 \pgfcircdeclarebipole{
7223 \anchor{gate}{
7224 \northeast
7225 }
7226 \anchor{G}{
7227 \northeast
7228 }
7229 \anchor{anode}{
7230 \southwest
7231 \pgf@y=0cm
7232 }
7233 \anchor{cathode}{
7234 \northeast
7235 \pgf@y=0cm
7236 }
7237 }{\ctikzvalof{tripoles/triac/height}}{emptytriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
7238
7239 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7240
7241 \pgf@circ@res@other = \ctikzvalof{tripoles/triac/diode width left}\pgf@circ@res@left
7242 \pgf@circ@res@step = \ctikzvalof{tripoles/triac/diode width right}\pgf@circ@res@right
7243
7244 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7245 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7246 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7247 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7248
7249 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7250 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7251 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7252 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7253
7254 \pgfusepath{draw}
7255
7256 \pgfsetlinewidth{\pgfstartlinewidth}
7257
7258 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7259 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7260 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % sqrt(1/2)
7261
7262 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7263 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7264
7265 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7266 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7267
7268 \pgfusepath{draw}
7269
7270 }
7271
7272 %% Empty triac
7273
7274 \pgfcircdeclarebipole{
7275 \anchor{gate}{
7276 \northeast
7277 }
7278 \anchor{G}{
7279 \northeast
7280 }
7281 \anchor{anode}{
7282 \southwest
7283 \pgf@y=0cm
7284 }
7285 \anchor{cathode}{
7286 \northeast
7287 \pgf@y=0cm
7288 }
7289 }{\ctikzvalof{tripoles/triac/height}}{fulltriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
7290
7291 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7292
7293 \pgf@circ@res@other = \ctikzvalof{tripoles/triac/diode width left}\pgf@circ@res@left
7294 \pgf@circ@res@step = \ctikzvalof{tripoles/triac/diode width right}\pgf@circ@res@right
7295
7296 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7297 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7298 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7299 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7300
7301 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7302 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7303 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7304 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7305
7306 \pgfusepath{draw,fill}
7307
7308 \pgfsetlinewidth{\pgfstartlinewidth}
7309
7310 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7311 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7312 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % sqrt(1/2)
7313
7314 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7315 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7316
7317 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7318 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7319
7320 \pgfusepath{draw}
7321
7322 }
7323
7324
7325
7326
7327
7328
7329
7330 \pgfcircdeclarebipole{
7331 \anchor{out 1}{
7332 \northeast
7333 \pgf@y=0cm
7334 }
7335 \anchor{out 2}{
7336 \northeast
7337 \pgf@y=.8\pgf@y
7338 }
7339 }{\ctikzvalof{tripoles/toggleswitch/height 2}}{toggleswitch}{\ctikzvalof{tripoles/toggleswitch/height}}{\ctikzvalof{tripoles/toggleswitch/width}}{
7340
7341 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7342 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@left}{0pt}}
7343 \pgfusepath{draw}
7344 \pgfscope
7345 \pgfpathmoveto{\pgfpoint{.3\pgf@circ@res@left}{0pt}}
7346 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7347 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{.5\pgf@circ@res@up}}
7348 \pgfusepath{draw}
7349 \endpgfscope
7350
7351 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7352 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{0}}
7353
7354 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{.8\pgf@circ@res@up}}
7355 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.8\pgf@circ@res@up}}
7356 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.15\pgf@circ@res@up}}
7357 \pgfusepath{draw}
7358
7359
7360 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@left}{\pgf@circ@res@up}}
7361 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{\pgf@circ@res@up}}
7362 \pgfusepath{draw}
7363
7364 \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}
7365 \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@up}}
7366 \pgfpathlineto{\pgfpoint{0}{.8\pgf@circ@res@up}}
7367 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@left}{.6\pgf@circ@res@up}}
7368 \pgfpathlineto{\pgfpoint{0}{.4\pgf@circ@res@up}}
7369 \pgfpathlineto{\pgfpoint{0}{.2\pgf@circ@res@up}}
7370 \pgfusepath{draw}
7371 \pgfsetdash{}{0cm}
7372 }
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383 \pgfdeclareshape{op amp}
7384 {
7385 \anchor{center}{\pgfpointorigin}
7386 \savedanchor\northwest{%
7387 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7388 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
7389 \pgf@y=.5\pgf@y
7390 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7391 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
7392 \pgf@x=.5\pgf@x
7393 }
7394 \anchor{south}{
7395 \northwest
7396 \pgf@y=-\pgf@y
7397 }
7398 \anchor{north}{
7399 \northwest
7400 }
7401 \savedanchor\left{%
7402 \pgf@y=0pt
7403 }
7404 \anchor{leftedge}
7405 {\left
7406 \pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x
7407 }
7408 \savedanchor\inOne{%
7409 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7410 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
7411 \pgf@y=.5\pgf@y
7412 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
7413 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7414 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
7415 \pgf@x=.5\pgf@x
7416 }
7417 \anchor{-}{
7418 \inOne
7419 }
7420 \anchor{+}{
7421 \inOne
7422 \pgf@y=-\pgf@y
7423 }
7424 \savedanchor\up{%
7425 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7426 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
7427 \pgf@y=.5\pgf@y
7428 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7429 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
7430 \pgf@x=.5\pgf@x
7431 \pgf@circ@res@up = \pgf@y
7432 \pgf@circ@res@right = -\pgf@x
7433 \pgf@circ@res@left = \pgf@x
7434 \pgfpointlineattime{
7435 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
7436 \pgfpoint{
7437 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7438 {\pgf@circ@res@up}}
7439 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7440 }
7441 \anchor{up}{
7442 \up
7443 }
7444 \anchor{down}{
7445 \up
7446 \pgf@y=-\pgf@y
7447 }
7448 \anchor{out}{
7449 \northwest
7450 \pgf@y=0pt
7451 \pgf@x=-\pgf@x
7452 }
7453 \anchor{west}{
7454 \left
7455 }
7456 \anchor{east}{
7457 \left
7458 \pgf@x=-\pgf@x
7459 }
7460
7461 \backgroundpath{
7462 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7463
7464
7465 \northwest
7466 \pgf@circ@res@up = \pgf@y
7467 \pgf@circ@res@down = -\pgf@y
7468 \pgf@circ@res@right = -\pgf@x
7469 \pgf@circ@res@left = \pgf@x
7470
7471 \pgfpathmoveto{\pgfpoint
7472 {\pgf@circ@res@left}
7473 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
7474 \pgfpathlineto{\pgfpoint
7475 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7476 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
7477 \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} $-$}
7478
7479
7480 \pgfpathmoveto{\pgfpoint
7481 {\pgf@circ@res@left}
7482 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
7483 \pgfpathlineto{\pgfpoint
7484 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7485 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
7486 \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} $+$}
7487
7488 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7489 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7490 \pgfsetrectcap
7491 \pgfusepath{draw}
7492
7493
7494 \pgfscope
7495 \pgfsetlinewidth{2\pgflinewidth}
7496 \pgftransformxshift{.7\pgf@circ@res@left}
7497 \pgf@circ@res@step=\pgf@circ@res@right
7498 \advance\pgf@circ@res@step by -\pgf@circ@res@left
7499 \pgf@circ@res@step=.7\pgf@circ@res@step
7500
7501 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7502 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7503 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7504 \pgfpathclose
7505 \pgfusepath{draw}
7506 \endpgfscope
7507
7508
7509
7510 }
7511 }
7512
7513 %%Transkonduktanzverstärker
7514 \pgfdeclareshape{gm amp}
7515 {
7516 \anchor{center}{\pgfpointorigin}
7517 \savedanchor\northwest{%
7518 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7519 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@y
7520 \pgf@y=.5\pgf@y
7521 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7522 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@x
7523 \pgf@x=.5\pgf@x
7524 }
7525 \anchor{south}{
7526 \northwest
7527 \pgf@y=-\pgf@y
7528 }
7529 \anchor{north}{
7530 \northwest
7531 }
7532 \savedanchor\left{%
7533 \pgf@y=0pt
7534 }
7535 \anchor{leftedge}
7536 {\left
7537 \pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x
7538 }
7539 \savedanchor\inOne{%
7540 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7541 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@y
7542 \pgf@y=.5\pgf@y
7543 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@y
7544 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7545 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@x
7546 \pgf@x=.5\pgf@x
7547 }
7548 \anchor{-}{
7549 \inOne
7550 }
7551 \anchor{+}{
7552 \inOne
7553 \pgf@y=-\pgf@y
7554 }
7555 \savedanchor\up{%
7556 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7557 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@y
7558 \pgf@y=.5\pgf@y
7559 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7560 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@x
7561 \pgf@x=.5\pgf@x
7562 \pgf@circ@res@up = \pgf@y
7563 \pgf@circ@res@right = -\pgf@x
7564 \pgf@circ@res@left = \pgf@x
7565 \pgfpointlineattime{
7566 \pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/up pos}}{
7567 \pgfpoint{
7568 \pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}
7569 {\pgf@circ@res@up}}
7570 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7571 }
7572 \anchor{up}{
7573 \up
7574 }
7575 \anchor{down}{
7576 \up
7577 \pgf@y=-\pgf@y
7578 }
7579 \anchor{out}{
7580 \northwest
7581 \pgf@y=0pt
7582 \pgf@x=-\pgf@x
7583 }
7584 \anchor{west}{
7585 \left
7586 }
7587 \anchor{east}{
7588 \left
7589 \pgf@x=-\pgf@x
7590 }
7591
7592 \backgroundpath{
7593 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7594
7595 \northwest
7596 \pgf@circ@res@up = \pgf@y
7597 \pgf@circ@res@down = -\pgf@y
7598 \pgf@circ@res@right = -\pgf@x
7599 \pgf@circ@res@left = \pgf@x
7600
7601 \pgfpathmoveto{\pgfpoint
7602 {\pgf@circ@res@left}
7603 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}}
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@up}}
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@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
7608
7609
7610 \pgfpathmoveto{\pgfpoint
7611 {\pgf@circ@res@left}
7612 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}}
7613 \pgfpathlineto{\pgfpoint
7614 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}
7615 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}}
7616 \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} $+$}
7617
7618 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7619 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{0pt}} %
7620 \pgfsetrectcap
7621 \pgfusepath{draw}
7622
7623 \pgfscope
7624 \pgfsetlinewidth{2\pgflinewidth}
7625 \pgftransformxshift{.7\pgf@circ@res@left}
7626 \pgf@circ@res@step=\pgf@circ@res@right
7627 \advance\pgf@circ@res@step by -\pgf@circ@res@left
7628 \pgf@circ@res@step=.7\pgf@circ@res@step
7629 %Umrandung:
7630 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}} %geändert startpunkt neu am ausgangsstrich
7631 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}%vom Ausgang nach oben
7632 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} %neu ecke links oben nach rechts oben
7633 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} %bei deneigängen runter
7634 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}%ecke links unten nach rechts unten
7635 \pgfpathclose
7636 \pgfusepath{draw}
7637 \endpgfscope
7638
7639 }
7640 }
7641
7642
7643
7644 %% Potentiometer
7645 \pgfcircdeclarebipole{
7646 \anchor{wiper}{
7647 \northeast
7648 \pgfpoint{0pt}{\pgf@y}
7649 }
7650 \anchor{W}{
7651 \northeast
7652 \pgfpoint{0pt}{\pgf@y}
7653 }
7654 }{\ctikzvalof{bipoles/potentiometer/height 2}}{potentiometer}{\ctikzvalof{bipoles/potentiometer/height}}{\ctikzvalof{bipoles/potentiometer/width}}{
7655 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7656 \pgftransformationadjustments
7657 \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
7658 \divide \pgf@circ@res@step by 12
7659
7660 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
7661
7662 \pgf@circ@res@other = \pgf@circ@res@left
7663 \advance\pgf@circ@res@other by \pgf@circ@res@step
7664 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7665 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7666 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7667 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7668 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7669 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7670 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7671 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7672 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7673 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7674 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7675 \advance\pgf@circ@res@other by \pgf@circ@res@step
7676 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
7677 \pgfsetbeveljoin
7678 \pgfusepath{draw}
7679
7680 \pgfscope
7681 %\pgfsetlinewidth{\pgfstartlinewidth}
7682 \pgfsetarrowsend{latex'}
7683 \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7684 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7685 \pgfusepath{draw}
7686 \endpgfscope
7687 }
7688
7689
7690
7691
7692
7693 %% Generic tunable
7694
7695 \pgfcircdeclarebipole{
7696 \anchor{wiper}{
7697 \northeast
7698 \pgfpoint{0pt}{\pgf@y}
7699 }
7700 }{\ctikzvalof{bipoles/generic potentiometer/height 2}}{genericpotentiometer}{\ctikzvalof{bipoles/generic potentiometer/height}}{\ctikzvalof{bipoles/generic potentiometer/width}}{
7701
7702 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
7703 \divide \pgf@circ@res@step by 14
7704
7705 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
7706 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7707
7708 \pgfusepath{draw}
7709
7710 \pgfscope
7711 %\pgfsetlinewidth{\pgfstartlinewidth}
7712 \pgfsetarrowsend{latex'}
7713 \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7714 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7715 \pgfusepath{draw}
7716 \endpgfscope
7717 }
7718
7719
7720 \pgfdeclareshape{mixer}
7721 {
7722 \savedanchor\northwest{
7723 \ifpgf@circuit@boxed
7724 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7725 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
7726 \pgf@y=.5\pgf@y
7727 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7728 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
7729 \pgf@x=.5\pgf@x
7730 \else
7731 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7732 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@y
7733 \pgf@y=.5\pgf@y
7734 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7735 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@x
7736 \pgf@x=.5\pgf@x
7737 \fi
7738 }
7739 \anchor{center}{
7740 \pgfpointorigin
7741 }
7742 \anchor{left}{%
7743 \northwest
7744 \pgf@y=0pt
7745 }
7746 \anchor{1}{
7747 \northwest
7748 \pgf@y=0pt
7749 }
7750 \anchor{2}{
7751 \northwest
7752 \pgf@y=-\pgf@y
7753 \pgf@x=0pt
7754 }
7755 \anchor{3}{
7756 \northwest
7757 \pgf@y=0pt
7758 \pgf@x=-\pgf@x
7759 }
7760 \anchor{4}{
7761 \northwest
7762 \pgf@y=\pgf@y
7763 \pgf@x=0pt
7764 }
7765 \anchor{in 1}{
7766 \northwest
7767 \pgf@y=0pt
7768 }
7769 \anchor{in1}{
7770 \northwest
7771 \pgf@y=0pt
7772 }
7773 \anchor{in}{
7774 \northwest
7775 \pgf@y=0pt
7776 }
7777 \anchor{in 2}{
7778 \northwest
7779 \pgf@y=-\pgf@y
7780 \pgf@x=0pt
7781 }
7782 \anchor{in2}{
7783 \northwest
7784 \pgf@y=-\pgf@y
7785 \pgf@x=0pt
7786 }
7787 \anchor{out}{
7788 \northwest
7789 \pgf@y=0pt
7790 \pgf@x=-\pgf@x
7791 }
7792 \anchor{center}{
7793 \pgf@y=0pt
7794 \pgf@x=0pt
7795 }
7796 \anchor{east}{
7797 \northwest
7798 \pgf@y=0pt
7799 \pgf@x=-\pgf@x
7800 }
7801 \anchor{west}{
7802 \northwest
7803 \pgf@y=0pt
7804 }
7805 \anchor{south}{
7806 \northwest
7807 \pgf@x=0pt
7808 \pgf@y=-\pgf@y
7809 }
7810 \anchor{north}{
7811 \northwest
7812 \pgf@x=0pt
7813 }
7814 \anchor{south west}{
7815 \northwest
7816 \pgf@y=-\pgf@y
7817 }
7818 \anchor{north east}{
7819 \northwest
7820 \pgf@x=-\pgf@x
7821 }
7822 \anchor{north west}{
7823 \northwest
7824 }
7825 \anchor{south east}{
7826 \northwest
7827 \pgf@x=-\pgf@x
7828 \pgf@y=-\pgf@y
7829 }
7830 \backgroundpath{
7831 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7832
7833 \pgf@circ@res@step=\ctikzvalof{tripoles/mixer/width}\pgf@circ@Rlen
7834
7835 \pgfscope
7836 \pgfstartlinewidth=\pgflinewidth
7837
7838 % draw outer box
7839 \ifpgf@circuit@boxed
7840 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
7841 \fi
7842
7843 % draw outer circle
7844 \ifpgf@circuit@boxed
7845 \pgf@circ@res@step=.7\pgf@circ@res@step
7846 \pgfsetdash{}{0pt} % draw solid circle if boxed
7847 \else
7848 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7849 \fi
7850 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
7851 \pgfusepath{draw}
7852
7853 % draw inner stuff
7854 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
7855 \pgfsetlinewidth{\pgfstartlinewidth}
7856 \pgfpathmoveto{\pgfpointorigin}
7857 \pgfpathmoveto{\pgfpointpolar{135}{0.5\pgf@circ@res@step}}
7858 \pgfpathlineto{\pgfpointpolar{-45}{0.5\pgf@circ@res@step}}
7859 \pgfpathmoveto{\pgfpointorigin}
7860 \pgfpathmoveto{\pgfpointpolar{45}{0.5\pgf@circ@res@step}}
7861 \pgfpathlineto{\pgfpointpolar{-135}{0.5\pgf@circ@res@step}}
7862 \pgfusepath{draw}
7863
7864 \endpgfscope
7865 }
7866 }
7867
7868 \pgfdeclareshape{adder}
7869 {
7870 \savedanchor\northwest{
7871 \ifpgf@circuit@boxed
7872 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7873 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
7874 \pgf@y=.5\pgf@y
7875 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7876 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
7877 \pgf@x=.5\pgf@x
7878 \else
7879 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7880 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@y
7881 \pgf@y=.5\pgf@y
7882 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7883 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@x
7884 \pgf@x=.5\pgf@x
7885 \fi
7886 }
7887 \anchor{center}{
7888 \pgfpointorigin
7889 }
7890 \anchor{left}{%
7891 \northwest
7892 \pgf@y=0pt
7893 }
7894 \anchor{1}{
7895 \northwest
7896 \pgf@y=0pt
7897 }
7898 \anchor{2}{
7899 \northwest
7900 \pgf@y=-\pgf@y
7901 \pgf@x=0pt
7902 }
7903 \anchor{3}{
7904 \northwest
7905 \pgf@y=0pt
7906 \pgf@x=-\pgf@x
7907 }
7908 \anchor{4}{
7909 \northwest
7910 \pgf@y=\pgf@y
7911 \pgf@x=0pt
7912 }
7913 \anchor{in 1}{
7914 \northwest
7915 \pgf@y=0pt
7916 }
7917 \anchor{in1}{
7918 \northwest
7919 \pgf@y=0pt
7920 }
7921 \anchor{in}{
7922 \northwest
7923 \pgf@y=0pt
7924 }
7925 \anchor{in 2}{
7926 \northwest
7927 \pgf@y=-\pgf@y
7928 \pgf@x=0pt
7929 }
7930 \anchor{in2}{
7931 \northwest
7932 \pgf@y=-\pgf@y
7933 \pgf@x=0pt
7934 }
7935 \anchor{out}{
7936 \northwest
7937 \pgf@y=0pt
7938 \pgf@x=-\pgf@x
7939 }
7940 \anchor{center}{
7941 \pgf@y=0pt
7942 \pgf@x=0pt
7943 }
7944 \anchor{east}{
7945 \northwest
7946 \pgf@y=0pt
7947 \pgf@x=-\pgf@x
7948 }
7949 \anchor{west}{
7950 \northwest
7951 \pgf@y=0pt
7952 }
7953 \anchor{south}{
7954 \northwest
7955 \pgf@x=0pt
7956 \pgf@y=-\pgf@y
7957 }
7958 \anchor{north}{
7959 \northwest
7960 \pgf@x=0pt
7961 }
7962 \anchor{south west}{
7963 \northwest
7964 \pgf@y=-\pgf@y
7965 }
7966 \anchor{north east}{
7967 \northwest
7968 \pgf@x=-\pgf@x
7969 }
7970 \anchor{north west}{
7971 \northwest
7972 }
7973 \anchor{south east}{
7974 \northwest
7975 \pgf@x=-\pgf@x
7976 \pgf@y=-\pgf@y
7977 }
7978 \backgroundpath{
7979 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7980
7981 \pgf@circ@res@step=\ctikzvalof{tripoles/adder/width}\pgf@circ@Rlen
7982
7983 \pgfscope
7984 \pgfstartlinewidth=\pgflinewidth
7985
7986 % draw outer box
7987 \ifpgf@circuit@boxed
7988 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
7989 \fi
7990
7991 % draw outer circle
7992 \ifpgf@circuit@boxed
7993 \pgf@circ@res@step=.7\pgf@circ@res@step{}
7994 \pgfsetdash{}{0pt} % draw solid circle if boxed
7995 \else
7996 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7997 \fi
7998 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
7999 \pgfusepath{draw}
8000
8001 % draw inner stuff
8002 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8003 \pgfsetlinewidth{\pgfstartlinewidth}
8004
8005 \pgfpathmoveto{\pgfpointorigin}
8006 \pgfpathmoveto{\pgfpointpolar{0}{0.3\pgf@circ@res@step}}
8007 \pgfpathlineto{\pgfpointpolar{180}{0.3\pgf@circ@res@step}}
8008 \pgfpathmoveto{\pgfpointorigin}
8009 \pgfpathmoveto{\pgfpointpolar{90}{0.3\pgf@circ@res@step}}
8010 \pgfpathlineto{\pgfpointpolar{270}{0.3\pgf@circ@res@step}}
8011 \pgfsetlinewidth{2\pgflinewidth}
8012 \pgfusepath{draw}
8013
8014 \endpgfscope
8015 }
8016 }
8017
8018 \pgfdeclareshape{oscillator}
8019 {
8020 \savedanchor\northwest{
8021 \ifpgf@circuit@boxed
8022 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8023 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
8024 \pgf@y=.5\pgf@y
8025 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8026 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
8027 \else
8028 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8029 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@y
8030 \pgf@y=.5\pgf@y
8031 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8032 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@x
8033 \fi
8034 }
8035 \anchor{center}{
8036 \pgfpointorigin
8037 }
8038 \anchor{north}{
8039 \northwest
8040 \pgf@x=.5\pgf@x
8041 }
8042 \anchor{south}{
8043 \northwest
8044 \pgf@x=.5\pgf@x
8045 \pgf@y=-\pgf@y
8046 }
8047 \anchor{east}{
8048 \northwest
8049 \pgf@y=0pt
8050 \pgf@x=0pt
8051 }
8052 \anchor{west}{
8053 \northwest
8054 \pgf@y=0pt
8055 }
8056 \anchor{text}{
8057 \pgf@x=-2\pgf@x
8058 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
8059 \advance \pgf@y by -1.5\ht\pgfnodeparttextbox
8060 }
8061 \backgroundpath{
8062 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8063
8064 \pgf@circ@res@step=\ctikzvalof{tripoles/oscillator/width}\pgf@circ@Rlen{}
8065
8066 \pgfscope
8067 \pgfstartlinewidth=\pgflinewidth
8068
8069 \pgftransformxshift{-0.5\pgf@circ@res@step} % The oscillator is shifted to the left, so a connection comes out of the anchor "east"
8070
8071 % draw outer box
8072 \ifpgf@circuit@boxed{}
8073 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8074 \fi
8075
8076 % draw outer circle
8077 \ifpgf@circuit@boxed
8078 \pgf@circ@res@step=.7\pgf@circ@res@step{}
8079 \pgfsetdash{}{0pt} % draw solid circle if boxed
8080 \else
8081 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8082 \fi
8083 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
8084 \pgfusepath{draw}
8085
8086 % draw inner sine waves
8087 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8088 \pgfsetlinewidth{\pgfstartlinewidth}
8089 \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
8090 \pgfpathmoveto{\pgfpoint{-0.3\pgf@circ@res@step}{0\pgf@circ@res@step}}
8091 \pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}}
8092 \pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}}
8093 \pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}}
8094 \pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}}
8095
8096 \pgfusepath{draw}
8097
8098 \endpgfscope
8099 }
8100 }
8101
8102 \pgfdeclareshape{circulator}
8103 {
8104 \savedanchor\northwest{
8105 \ifpgf@circuit@boxed
8106 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8107 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
8108 \pgf@y=.5\pgf@y
8109 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8110 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
8111 \pgf@x=.5\pgf@x
8112 \else
8113 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8114 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@y
8115 \pgf@y=.5\pgf@y
8116 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8117 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@x
8118 \pgf@x=.5\pgf@x
8119 \fi
8120 }
8121 \anchor{center}{
8122 \pgfpointorigin
8123 }
8124 \anchor{left}{%
8125 \northwest
8126 \pgf@y=0pt
8127 }
8128 \anchor{1}{
8129 \northwest
8130 \pgf@y=0pt
8131 }
8132 \anchor{2}{
8133 \northwest
8134 \pgf@y=0pt
8135 \pgf@x=-\pgf@x
8136 }
8137 \anchor{3}{
8138 \northwest
8139 \pgf@y=-\pgf@y
8140 \pgf@x=0pt
8141 }
8142 \anchor{east}{
8143 \northwest
8144 \pgf@y=0pt
8145 \pgf@x=-\pgf@x
8146 }
8147 \anchor{west}{
8148 \northwest
8149 \pgf@y=0pt
8150 }
8151 \anchor{south}{
8152 \northwest
8153 \pgf@x=0pt
8154 \pgf@y=-\pgf@y
8155 }
8156 \anchor{north}{
8157 \northwest
8158 \pgf@x=0pt
8159 }
8160 \anchor{south west}{
8161 \northwest
8162 \pgf@y=-\pgf@y
8163 }
8164 \anchor{north east}{
8165 \northwest
8166 \pgf@x=-\pgf@x
8167 }
8168 \anchor{north west}{
8169 \northwest
8170 }
8171 \anchor{south east}{
8172 \northwest
8173 \pgf@x=-\pgf@x
8174 \pgf@y=-\pgf@y
8175 }
8176 \backgroundpath{
8177 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8178
8179 \pgf@circ@res@step=\ctikzvalof{tripoles/circulator/width}\pgf@circ@Rlen
8180
8181 \pgfscope
8182 \pgfstartlinewidth=\pgflinewidth
8183
8184 % draw outer box
8185 \ifpgf@circuit@boxed
8186 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8187 \fi
8188
8189 % draw outer circle
8190 \ifpgf@circuit@boxed{}
8191 \pgf@circ@res@step=.7\pgf@circ@res@step{}
8192 \pgfsetdash{}{0pt} % draw solid circle if boxed
8193 \else
8194 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8195 \fi
8196 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
8197 \pgfusepath{draw}
8198
8199 % inner arrow
8200 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8201 \pgfsetlinewidth{\pgfstartlinewidth}
8202
8203 \pgfsetarrowsend{latex}
8204 \pgfpathmoveto{\pgfpoint{-0.25\pgf@circ@res@step}{0}}
8205 \pgfpatharc{180}{-90} {0.25\pgf@circ@res@step}
8206 \pgfpathlineto{\pgfpoint{-5pt}{-0.2\pgf@circ@res@step}}
8207 \pgfusepath{draw}
8208
8209 \endpgfscope
8210 }
8211 }
8212
8213
8214 % Wilkinson divider
8215 \pgfdeclareshape{wilkinson}{
8216 \anchor{center}{
8217 \northwest
8218 \pgf@x=0pt
8219 \pgf@y=0pt
8220 }
8221 \savedanchor\northwest{%
8222 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8223 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/height}\pgf@y
8224 \pgf@y=.5\pgf@y
8225 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8226 \pgf@x=.5\pgf@x
8227 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/width}\pgf@x
8228 }
8229 \anchor{north}{
8230 \northwest
8231 \pgf@x=0pt
8232 }
8233 \anchor{south}{
8234 \northwest
8235 \pgf@x=0pt
8236 \pgf@y=-\pgf@y
8237 }
8238 \anchor{west}{
8239 \northwest
8240 \pgf@y=0pt
8241 }
8242 \anchor{east}{
8243 \northwest
8244 \pgf@y=0pt
8245 \pgf@x=-\pgf@x
8246 }
8247 \anchor{south west}{
8248 \northwest
8249 \pgf@y=-\pgf@y
8250 }
8251 \anchor{north east}{
8252 \northwest
8253 \pgf@x=-\pgf@x
8254 }
8255 \anchor{north west}{
8256 \northwest
8257 }
8258 \anchor{south east}{
8259 \northwest
8260 \pgf@x=-\pgf@x
8261 \pgf@y=-\pgf@y
8262 }
8263 \anchor{in}{
8264 \northwest
8265 \pgf@y=0pt
8266 }
8267 \anchor{out1}{
8268 \northwest
8269 \pgf@x=-\pgf@x
8270 \pgf@y=-0.5\pgf@y
8271 }
8272 \anchor{out2}{
8273 \northwest
8274 \pgf@x=-\pgf@x
8275 \pgf@y=0.5\pgf@y
8276 }
8277 \anchor{text}{
8278 \northwest
8279 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
8280 \pgf@x=-.5\wd\pgfnodeparttextbox
8281 }
8282 \backgroundpath{
8283 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8284
8285 \northwest
8286 \pgf@circ@res@up = \pgf@y
8287 \pgf@circ@res@down = -\pgf@y
8288 \pgf@circ@res@right = -\pgf@x
8289 \pgf@circ@res@left = \pgf@x
8290
8291 \pgfstartlinewidth=\pgflinewidth
8292
8293 % draw outer box
8294 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8295 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8296 \pgfusepath{draw}
8297
8298 % draw inner stuff
8299 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8300 \pgfsetarrows{-} %never draw arrows
8301 \pgfsetlinewidth{\pgfstartlinewidth}
8302 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
8303 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
8304 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8305 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8306 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
8307 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8308 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8309
8310 \pgfusepath{draw}
8311
8312 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8313 % draw inner resisitor - european or american style is recognised
8314 {
8315 \pgftransformshift{\pgfpoint{0.5\pgf@circ@res@right}{0pt}}
8316 \pgftransformrotate{90}
8317
8318 % calculate size of resistor
8319 \ifpgf@circuit@europeanresistor
8320 \pgfmathparse{\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/generic/width} / 2}
8321 \pgftransformscale{\pgfmathresult}
8322 \pgfnode{genericshape}{center}{}{pgf@generic}{\pgfusepath{fill}}
8323 \else
8324 \pgfmathparse{\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/resistor/width} / 2}
8325 \pgftransformscale{\pgfmathresult}
8326 \pgfnode{resistorshape}{center}{}{pgf@resistor}{\pgfusepath{fill}}
8327 \fi
8328 }
8329
8330 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8331 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}}
8332
8333 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}}
8334 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8335 \pgfusepath{draw}
8336
8337 }
8338 }
8339
8340 % electromechanical device (motor/generator)
8341 \pgfdeclareshape{elmech}
8342 {
8343 \savedanchor\northwest{
8344 %\ifpgf@circuit@boxed
8345 % \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8346 % \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
8347 % \pgf@y=.5\pgf@y
8348 % \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8349 % \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
8350 % \pgf@x=.5\pgf@x
8351 %\else
8352 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8353 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/height}\pgf@y
8354 \pgf@y=.5\pgf@y
8355 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8356 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/width}\pgf@x
8357 \pgf@x=.5\pgf@x
8358 %\fi
8359 }
8360 \anchor{center}{
8361 \pgfpointorigin
8362 }
8363 \anchor{text}{
8364 \pgfpointorigin
8365 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
8366 \advance \pgf@y by -.5\ht\pgfnodeparttextbox
8367 }
8368 \anchor{left}{%
8369 \northwest
8370 \pgf@y=0pt
8371 }
8372 \anchor{right}{%
8373 \northwest
8374 \pgf@y=0pt
8375 \pgf@x=-\pgf@x
8376 }
8377 \anchor{top}{
8378 \northwest
8379 \pgf@x=0pt
8380 }
8381 \anchor{pathstart}{
8382 \northwest
8383 \pgf@x=0pt
8384 }
8385 \anchor{pathend}{
8386 \northwest
8387 \pgf@x=0pt
8388 \pgf@y=-\pgf@y
8389 }
8390 \anchor{bottom}{
8391 \northwest
8392 \pgf@x=0pt
8393 \pgf@y=-\pgf@y
8394 }
8395 \anchor{center}{
8396 \pgf@y=0pt
8397 \pgf@x=0pt
8398 }
8399 \anchor{east}{
8400 \northwest
8401 \pgf@y=0pt
8402 \pgf@x=-\pgf@x
8403 }
8404 \anchor{west}{
8405 \northwest
8406 \pgf@y=0pt
8407 }
8408 \anchor{south}{
8409 \northwest
8410 \pgf@x=0pt
8411 \pgf@y=-\pgf@y
8412 }
8413 \anchor{north}{
8414 \northwest
8415 \pgf@x=0pt
8416 }
8417 \backgroundpath{
8418 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8419 \pgf@circ@res@step=\ctikzvalof{tripoles/elmech/width}\pgf@circ@Rlen
8420 \pgf@circ@res@up=\ctikzvalof{tripoles/elmech/height}\pgf@circ@Rlen
8421 \pgfscope
8422 \pgfstartlinewidth=\pgflinewidth
8423 % draw outer box
8424 % \ifpgf@circuit@boxed
8425 % \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8426 % \fi
8427 % draw outer circle
8428 %\ifpgf@circuit@boxed
8429 % \pgf@circ@res@step=.7\pgf@circ@res@step
8430 % \pgfsetdash{}{0pt} % draw solid circle if boxed
8431 %\else
8432 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8433 %\fi
8434 \pgfpathrectangle{\pgfpoint{-.25\pgf@circ@res@step}{-.5\pgf@circ@res@up}}{\pgfpoint{.5\pgf@circ@res@step}{\pgf@circ@res@up}}
8435 \pgfsetfillcolor{black}
8436 \pgfusepath{draw,fill}
8437 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
8438 \pgfsetfillcolor{white}
8439 \pgfusepath{draw,fill}
8440 \endpgfscope
8441 }
8442 }
8443
8444 \pgfdeclareshape{magnetron}
8445 {
8446 \savedanchor\northwest{
8447 %\ifpgf@circuit@boxed
8448 % \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8449 % \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
8450 % \pgf@y=.5\pgf@y
8451 % \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8452 % \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
8453 % \pgf@x=.5\pgf@x
8454 %\else
8455 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8456 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf@y
8457 \pgf@y=.5\pgf@y
8458 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8459 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf@x
8460 \pgf@x=.5\pgf@x
8461 %\fi
8462 }
8463 \anchor{center}{
8464 \pgfpointorigin
8465 }
8466 \anchor{anode}{
8467 \northwest
8468 \pgf@circ@res@step= \pgf@y
8469 \pgfpointorigin
8470 \pgfpathmoveto{ \pgfpointpolar{-90}{\pgf@circ@res@step}}
8471 }
8472 \anchor{cathode1}{
8473 \northwest
8474 \pgf@circ@res@step= \pgf@y
8475 \pgfpointorigin
8476 \pgfpathmoveto{ \pgfpointpolar{105}{\pgf@circ@res@step}}
8477 }
8478 \anchor{cathode2}{
8479 \northwest
8480 \pgf@circ@res@step= \pgf@y
8481 \pgfpointorigin
8482 \pgfpathmoveto{ \pgfpointpolar{75}{\pgf@circ@res@step}}
8483 }
8484 \anchor{text}{
8485 \pgfpointorigin
8486 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
8487 \advance \pgf@y by -.5\ht\pgfnodeparttextbox
8488 }
8489 \anchor{left}{%
8490 \northwest
8491 \pgf@y=0pt
8492 }
8493 \anchor{right}{%
8494 \northwest
8495 \pgf@y=0pt
8496 \pgf@x=-\pgf@x
8497 }
8498 \anchor{top}{
8499 \northwest
8500 \pgf@x=0pt
8501 }
8502 \anchor{pathstart}{
8503 \northwest
8504 \pgf@x=0pt
8505 }
8506 \anchor{pathend}{
8507 \northwest
8508 \pgf@x=0pt
8509 \pgf@y=-\pgf@y
8510 }
8511 \anchor{bottom}{
8512 \northwest
8513 \pgf@x=0pt
8514 \pgf@y=-\pgf@y
8515 }
8516 \anchor{center}{
8517 \pgf@y=0pt
8518 \pgf@x=0pt
8519 }
8520 \anchor{east}{
8521 \northwest
8522 \pgf@y=0pt
8523 \pgf@x=-\pgf@x
8524 }
8525 \anchor{west}{
8526 \northwest
8527 \pgf@y=0pt
8528 }
8529 \anchor{south}{
8530 \northwest
8531 \pgf@x=0pt
8532 \pgf@y=-\pgf@y
8533 }
8534 \anchor{north}{
8535 \northwest
8536 \pgf@x=0pt
8537 }
8538 \backgroundpath{
8539 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8540 \pgf@circ@res@step=\ctikzvalof{tripoles/magnetron/width}\pgf@circ@Rlen
8541 \northwest
8542 \pgf@circ@res@up = \pgf@y
8543 \pgf@circ@res@down = -\pgf@y
8544 \pgf@circ@res@right = -\pgf@x
8545 \pgf@circ@res@left = \pgf@x
8546 \pgfmathsetlength{\pgf@circ@res@other}{sin(15)*\pgf@circ@res@up}
8547
8548 \pgfscope
8549 \pgfstartlinewidth=\pgflinewidth
8550 % draw outer box
8551 % \ifpgf@circuit@boxed
8552 % \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8553 % \fi
8554 % draw outer circle
8555 %\ifpgf@circuit@boxed
8556 % \pgf@circ@res@step=.7\pgf@circ@res@step
8557 % \pgfsetdash{}{0pt} % draw solid circle if boxed
8558 %\else
8559 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8560 %\fi
8561 %create outer circle
8562 \pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@right}
8563 \pgfsetfillcolor{white}
8564 \pgfusepath{draw}
8565 %create chambers
8566 \foreach \angle in {45,135,225,315}{
8567 \pgfpathmoveto{ \pgfpointpolar{\angle}{0.6\pgf@circ@res@right}}
8568 \pgfpathlineto{ \pgfpointpolar{\angle}{\pgf@circ@res@right}}
8569 }
8570 \pgfsetroundcap
8571 \pgfusepath{draw}
8572 \pgfscope
8573 %draw connection from outside
8574 %anode
8575 \pgfsetlinewidth{\pgfstartlinewidth}
8576 \pgfpathmoveto{\pgfpoint{0\pgf@circ@res@left}{\pgf@circ@res@down}}
8577 \pgfpathlineto{\pgfpoint{0\pgf@circ@res@right}{.5\pgf@circ@res@down}}
8578 %cathodes
8579 \pgfpathmoveto{\pgfpointpolar{105}{\pgf@circ@res@up}}
8580 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{.5\pgf@circ@res@up}}
8581 \pgfpathmoveto{\pgfpointpolar{75}{\pgf@circ@res@up}}
8582 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
8583 \pgfsetbuttcap
8584 \pgfusepath{draw}
8585 \endpgfscope
8586 %create cathode
8587 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
8588 \pgfpathlineto{\pgfpoint{0}{.15\pgf@circ@res@up}}
8589 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{.5\pgf@circ@res@up}}
8590 \pgfusepath{draw}
8591 %create anode
8592 \pgfpathmoveto{\pgfpoint{0.3\pgf@circ@res@left}{.5\pgf@circ@res@down}}
8593 \pgfpathlineto{\pgfpoint{0.3\pgf@circ@res@right}{.5\pgf@circ@res@down}}
8594
8595 \pgfsetbuttcap
8596 \pgfusepath{draw}
8597 \endpgfscope
8598 }
8599 }
8600
8601 %%%---------- close: tex/pgfcirctripoles
8602 %%%%%%%%%%% Springe nach tex/pgfcircquadpoles
8603 %%%---------- open: tex/pgfcircquadpoles.tex
8604 % Copyright 2007-2009 by Massimo Redaelli
8605 %
8606 % This file may be distributed and/or modified
8607 %
8608 % 1. under the LaTeX Project Public License and/or
8609 % 2. under the GNU Public License.
8610 %
8611 % See the file doc/LICENSE for more details.
8612
8613 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8614 %% Quadripoles
8615
8616 \long\def\pgfcircdeclarequadpole#1#2#3{
8617 \pgfdeclareshape{#1}
8618 {
8619 \anchor{center}{
8620 \northwest
8621 \pgf@x=0pt
8622 }
8623 \savedanchor\northwest{%
8624 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8625 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@y
8626 \pgf@y=.5\pgf@y
8627 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8628 \pgf@x=.5\pgf@x
8629 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x
8630 }
8631 \anchor{A2}{
8632 \northwest
8633 \pgf@y=-\pgf@y
8634 }
8635 \anchor{B1}{
8636 \northwest
8637 \pgf@x=-\pgf@x
8638 }
8639 \anchor{A1}{
8640 \northwest
8641 }
8642 \anchor{B2}{
8643 \northwest
8644 \pgf@x=-\pgf@x
8645 \pgf@y=-\pgf@y
8646 }
8647 \anchor{north}{
8648 \northwest
8649 \pgf@x=0pt
8650 }
8651 \anchor{south}{
8652 \northwest
8653 \pgf@x=0pt
8654 \pgf@y=-\pgf@y
8655 }
8656 \anchor{west}{
8657 \northwest
8658 \pgf@y=0pt
8659 }
8660 \anchor{east}{
8661 \northwest
8662 \pgf@y=0pt
8663 \pgf@x=-\pgf@x
8664 }
8665 \anchor{south west}{
8666 \northwest
8667 \pgf@y=-\pgf@y
8668 }
8669 \anchor{north east}{
8670 \northwest
8671 \pgf@x=-\pgf@x
8672 }
8673 \anchor{north west}{
8674 \northwest
8675 }
8676 \anchor{south east}{
8677 \northwest
8678 \pgf@x=-\pgf@x
8679 \pgf@y=-\pgf@y
8680 }
8681 \anchor{base}{
8682 \northwest
8683 \pgf@x=0pt
8684 }
8685 #3
8686 \backgroundpath{
8687 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8688
8689 \northwest
8690 \pgf@circ@res@up = \pgf@y
8691 \pgf@circ@res@down = -\pgf@y
8692 \pgf@circ@res@right = -\pgf@x
8693 \pgf@circ@res@left = \pgf@x
8694
8695 %\pgf@circ@Rlen=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8696
8697 #2
8698
8699 }
8700 }
8701 }
8702
8703
8704
8705 \def\pgf@circ@drawtransformerbasicanchor{
8706 \pgfkeysvalueof{/tikz/circuitikz/quadpoles/trans/height}
8707 \anchor{AA2}{
8708 \northwest
8709 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8710 \pgf@x=.7\pgf@x
8711 \pgf@y=-\pgf@y
8712 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8713 }
8714 \anchor{BB1}{
8715 \northwest
8716 \pgf@x=-\pgf@x
8717 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8718 \pgf@x=.7\pgf@x
8719 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8720 }
8721 \anchor{AA1}{
8722 \northwest
8723 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8724 \pgf@x=.7\pgf@x
8725 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8726 }
8727 \anchor{BB2}{
8728 \northwest
8729 \pgf@x=-\pgf@x
8730 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8731 \pgf@x=.7\pgf@x
8732 \pgf@y=-\pgf@y
8733 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8734 }
8735 }
8736
8737 \def\pgf@circ@drawtransformerbasicbody{
8738 \def\stretto{.4}
8739 \pgfscope
8740 \pgfslopedattimetrue
8741 \pgfallowupsidedownattimetrue
8742 \pgftransformlineattime{.5}{%
8743 \pgfpoint%
8744 {\stretto\pgf@circ@res@left}%
8745 {\pgf@circ@res@up}%
8746 }{%
8747 \pgfpoint
8748 {\stretto\pgf@circ@res@left}%
8749 {\pgf@circ@res@down}%
8750 }
8751
8752 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
8753 \def\pgf@temp{european}%
8754 \ifx\pgf@temp\pgf@circ@temp%
8755 \pgfnode{fullgenericshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8756 \else%
8757 \def\pgf@temp{cute}
8758 \ifx\pgf@temp\pgf@circ@temp%
8759 \pgfnode{cuteinductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8760 \else%
8761 \pgfnode{americaninductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8762 \fi%
8763 \fi%
8764
8765
8766 \endpgfscope
8767 \pgfscope
8768 \pgfslopedattimetrue
8769 \pgfallowupsidedownattimetrue
8770 \pgftransformlineattime{.5}{%
8771 \pgfpoint%
8772 {\stretto\pgf@circ@res@right}%
8773 {\pgf@circ@res@down}%
8774 }{%
8775 \pgfpoint
8776 {\stretto\pgf@circ@res@right}%
8777 {\pgf@circ@res@up}%
8778 }
8779
8780 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
8781 \def\pgf@temp{european}%
8782 \ifx\pgf@temp\pgf@circ@temp%
8783 \pgfnode{fullgenericshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
8784 \else%
8785 \def\pgf@temp{cute}
8786 \ifx\pgf@temp\pgf@circ@temp%
8787 \pgfnode{cuteinductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
8788 \else%
8789 \pgfnode{americaninductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
8790 \fi%
8791 \fi%
8792
8793 \endpgfscope
8794
8795 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
8796 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
8797 \pgfpathlineto{\pgfpointanchor{pgf@inductor1}{b}}
8798
8799 \pgfpathmoveto{\pgfpointanchor{pgf@inductor1}{a}}
8800 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
8801 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
8802
8803 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
8804 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
8805 \pgfpathlineto{\pgfpointanchor{pgf@inductor2}{a}}
8806
8807 \pgfpathmoveto{\pgfpointanchor{pgf@inductor2}{b}}
8808 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
8809 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8810
8811 \pgfusepath{draw}
8812
8813 }
8814
8815
8816
8817 % contrib Kristofer M. Monisit
8818
8819 \pgfdeclareshape{fd op amp}
8820 {
8821 \anchor{center}{\pgfpointorigin}
8822 \savedanchor\northwest{%
8823 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8824 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
8825 \pgf@y=.5\pgf@y
8826 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8827 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
8828 \pgf@x=.5\pgf@x
8829 }
8830 \anchor{south}{
8831 \northwest
8832 \pgf@y=-\pgf@y
8833 }
8834 \anchor{north}{
8835 \northwest
8836 }
8837 \savedanchor\left{%
8838 \pgf@y=0pt
8839 }
8840 \savedanchor\inOne{%
8841 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8842 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
8843 \pgf@y=.5\pgf@y
8844 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
8845 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8846 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
8847 \pgf@x=.5\pgf@x
8848 }
8849 \anchor{-}{
8850 \inOne
8851 }
8852 \anchor{+}{
8853 \inOne
8854 \pgf@y=-\pgf@y
8855 }
8856 \savedanchor\up{%
8857 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8858 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
8859 \pgf@y=.5\pgf@y
8860 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8861 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
8862 \pgf@x=.5\pgf@x
8863 \pgf@circ@res@up = \pgf@y
8864 \pgf@circ@res@right = -\pgf@x
8865 \pgf@circ@res@left = \pgf@x
8866 \pgfpointlineattime{
8867 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
8868 \pgfpoint{
8869 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8870 {\pgf@circ@res@up}}
8871 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
8872 }
8873 \anchor{up}{
8874 \up
8875 }
8876 \anchor{down}{
8877 \up
8878 \pgf@y=-\pgf@y
8879 }
8880 \anchor{out +}{
8881 \northwest
8882 \pgf@y=.5\pgf@y
8883 \pgf@x=-.7\pgf@x
8884 }
8885 \anchor{out -}{
8886 \northwest
8887 \pgf@y=-.5\pgf@y
8888 \pgf@x=-.7\pgf@x
8889 }
8890 \anchor{west}{
8891 \left
8892 }
8893 \anchor{east}{
8894 \left
8895 \pgf@x=-\pgf@x
8896 }
8897
8898 \backgroundpath{
8899 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8900
8901 \northwest
8902 \pgf@circ@res@up = \pgf@y
8903 \pgf@circ@res@down = -\pgf@y
8904 \pgf@circ@res@right = -\pgf@x
8905 \pgf@circ@res@left = \pgf@x
8906
8907 % Negative input terminal
8908 \pgfpathmoveto{\pgfpoint
8909 {\pgf@circ@res@left}
8910 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8911 \pgfpathlineto{\pgfpoint
8912 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8913 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8914 \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} $-$}
8915
8916
8917 % Positive input terminal
8918 \pgfpathmoveto{\pgfpoint
8919 {\pgf@circ@res@left}
8920 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8921 \pgfpathlineto{\pgfpoint
8922 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8923 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8924 \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} $+$}
8925
8926
8927 % Negative output terminal
8928 \pgfpathmoveto{\pgfpoint
8929 {0.7\pgf@circ@res@right}
8930 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8931 \pgfpathlineto{\pgfpoint
8932 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
8933 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8934 \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
8935
8936
8937 % Positive output terminal
8938 \pgfpathmoveto{\pgfpoint
8939 {0.7\pgf@circ@res@right}
8940 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8941 \pgfpathlineto{\pgfpoint
8942 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
8943 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8944 \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
8945
8946 \pgfsetrectcap
8947 % Draw them all!
8948 \pgfusepath{draw}
8949
8950 % Triangle
8951 \pgfscope
8952 \pgfsetlinewidth{2\pgflinewidth}
8953 \pgftransformxshift{.7\pgf@circ@res@left}
8954 \pgf@circ@res@step=\pgf@circ@res@right
8955 \advance\pgf@circ@res@step by -\pgf@circ@res@left
8956 \pgf@circ@res@step=.7\pgf@circ@res@step
8957 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
8958 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
8959 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
8960 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
8961 \pgfpathclose
8962 \pgfusepath{draw}
8963 \endpgfscope
8964 }
8965 }
8966
8967
8968
8969
8970 \pgfcircdeclarequadpole{transformer}{
8971
8972 \pgf@circ@drawtransformerbasicbody
8973
8974 }{\pgf@circ@drawtransformerbasicanchor}
8975
8976 \pgfcircdeclarequadpole{transformer core}{
8977
8978 \pgf@circ@drawtransformerbasicbody
8979
8980 \pgfmoveto{\pgfpoint%
8981 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
8982 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
8983 }
8984 \pgflineto{
8985 \pgfpoint
8986 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
8987 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
8988 }
8989
8990 \pgfmoveto{\pgfpoint%
8991 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
8992 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
8993 }
8994 \pgflineto{
8995 \pgfpoint
8996 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
8997 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
8998 }
8999
9000 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth}
9001 \pgfusepath{draw}
9002 }{\pgf@circ@drawtransformerbasicanchor}
9003
9004
9005 \pgfcircdeclarequadpole{gyrator}{
9006
9007 \def\stretto{.4}
9008
9009 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
9010 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
9011 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
9012 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
9013
9014 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
9015 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
9016 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
9017 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
9018
9019 \pgfusepath{draw}
9020
9021 \pgfsetlinewidth{2\pgflinewidth}
9022 \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@left}{.7*\stretto\pgf@circ@res@down}}
9023 \pgfpatharc{90}{270}{.7*\stretto\pgf@circ@res@down}
9024
9025 \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@right}{.7*\stretto\pgf@circ@res@up}}
9026 \pgfpatharc{-90}{90}{.7*\stretto\pgf@circ@res@down}
9027 \pgfusepath{draw}
9028
9029 }{}
9030
9031 %% four-port
9032 % defines a general outer box for four-ports
9033 % TikZ usage:
9034 % \draw (0,0) node[coupler](coup){\SI{-3}{dB}}
9035 % (coup.port1) to[short,-o] ++(-1,0)
9036 %
9037
9038 \long\def\pgfcircdeclarefourport#1#2{
9039 \pgfdeclareshape{#1}{
9040 \anchor{center}{
9041 \northwest
9042 \pgf@x=0pt
9043 \pgf@y=0pt
9044 }
9045 \savedanchor\northwest{%
9046 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
9047 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@y
9048 \pgf@y=.5\pgf@y
9049 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
9050 \pgf@x=.5\pgf@x
9051 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x
9052 }
9053 \anchor{north}{
9054 \northwest
9055 \pgf@x=0pt
9056 }
9057 \anchor{south}{
9058 \northwest
9059 \pgf@x=0pt
9060 \pgf@y=-\pgf@y
9061 }
9062 \anchor{west}{
9063 \northwest
9064 \pgf@y=0pt
9065 }
9066 \anchor{east}{
9067 \northwest
9068 \pgf@y=0pt
9069 \pgf@x=-\pgf@x
9070 }
9071 \anchor{south west}{
9072 \northwest
9073 \pgf@y=-\pgf@y
9074 }
9075 \anchor{north east}{
9076 \northwest
9077 \pgf@x=-\pgf@x
9078 }
9079 \anchor{north west}{
9080 \northwest
9081 }
9082 \anchor{south east}{
9083 \northwest
9084 \pgf@x=-\pgf@x
9085 \pgf@y=-\pgf@y
9086 }
9087 \anchor{port1}{
9088 \northwest
9089 \pgf@y=-0.5\pgf@y
9090 }
9091 \anchor{port2}{
9092 \northwest
9093 \pgf@x=-\pgf@x
9094 \pgf@y=-0.5\pgf@y
9095 }
9096 \anchor{port3}{
9097 \northwest
9098 \pgf@x=-\pgf@x
9099 \pgf@y=0.5\pgf@y
9100 }
9101 \anchor{port4}{
9102 \northwest
9103 \pgf@y=0.5\pgf@y
9104 }
9105 \anchor{1}{
9106 \northwest
9107 \pgf@y=-0.5\pgf@y
9108 }
9109 \anchor{2}{
9110 \northwest
9111 \pgf@x=-\pgf@x
9112 \pgf@y=-0.5\pgf@y
9113 }
9114 \anchor{3}{
9115 \northwest
9116 \pgf@x=-\pgf@x
9117 \pgf@y=0.5\pgf@y
9118 }
9119 \anchor{4}{
9120 \northwest
9121 \pgf@y=0.5\pgf@y
9122 }
9123
9124 \anchor{text}{
9125 \northwest
9126 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
9127 \pgf@x=-.5\wd\pgfnodeparttextbox
9128 }
9129 \backgroundpath{
9130 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
9131
9132 \northwest
9133 \pgf@circ@res@up = \pgf@y
9134 \pgf@circ@res@down = -\pgf@y
9135 \pgf@circ@res@right = -\pgf@x
9136 \pgf@circ@res@left = \pgf@x
9137
9138 \pgfstartlinewidth=\pgflinewidth
9139
9140 % draw outer box
9141 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
9142 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
9143 \pgfusepath{draw}
9144
9145 % draw inner stuff
9146 #2
9147
9148 % draw inner text
9149 \pgftext[center,x=-0.15\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
9150 }
9151 }
9152 }
9153
9154 % four-port
9155 \pgfcircdeclarefourport{fourport}{}
9156
9157
9158 % straight coupler
9159 \pgfcircdeclarefourport{coupler}{
9160 \pgfsetlinewidth{\pgfstartlinewidth}
9161 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}}
9162 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
9163 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
9164 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
9165 \pgfusepath{draw}
9166
9167 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
9168 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
9169 \pgfsetarrows{latex-latex}
9170 \pgfusepath{draw}
9171 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
9172 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
9173 \pgfsetarrows{latex-latex}
9174 \pgfusepath{draw}
9175 }
9176
9177 % "bended" coupler
9178 \pgfcircdeclarefourport{coupler2}{
9179 \pgfsetlinewidth{\pgfstartlinewidth}
9180 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}}
9181 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
9182 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
9183 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
9184 \pgfusepath{draw}
9185
9186 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
9187 \pgfpatharc{0}{90} {0.4\pgf@circ@res@up}
9188 \pgfsetarrowsend{latex}
9189 \pgfusepath{draw}
9190 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
9191 \pgfpatharc{0}{-90} {0.4\pgf@circ@res@up}
9192 \pgfsetarrowsend{latex}
9193 \pgfusepath{draw}
9194
9195 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
9196 \pgfpatharc{180}{90} {0.4\pgf@circ@res@up}
9197 \pgfsetarrowsend{latex}
9198 \pgfusepath{draw}
9199 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
9200 \pgfpatharc{-180}{-90} {0.4\pgf@circ@res@up}
9201 \pgfsetarrowsend{latex}
9202 \pgfusepath{draw}
9203
9204
9205 }
9206 %%%---------- close: tex/pgfcircquadpoles
9207
9208 %%%%%%%%%%% Springe nach tex/pgfcirclabel
9209 %%%---------- open: tex/pgfcirclabel.tex
9210 % Copyright 2007-2009 by Massimo Redaelli
9211 %
9212 % This file may be distributed and/or modified
9213 %
9214 % 1. under the LaTeX Project Public License and/or
9215 % 2. under the GNU Public License.
9216 %
9217 % See the file doc/LICENSE for more details.
9218
9219 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9220 %% Bipole label positioning
9221
9222 %% Options
9223 \ctikzset{label/.style = { l=#1 } }
9224 \ctikzset{l/.code = {
9225 \pgfkeys{/tikz/circuitikz/bipole/label/name=#1}
9226 \ctikzsetvalof{bipole/label/unit}{}
9227 \ifpgf@circ@siunitx
9228 \pgf@circ@handleSI{#1}
9229 \ifpgf@circ@siunitx@res
9230 \edef\pgf@temp{\pgf@circ@handleSI@val}
9231 \pgfkeyslet{/tikz/circuitikz/bipole/label/name}{\pgf@temp}
9232 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9233 \pgfkeyslet{/tikz/circuitikz/bipole/label/unit}{\pgf@temp}
9234 \else
9235 \fi
9236 \else
9237 \fi
9238 }}
9239
9240 \ctikzset{label above/.code = {
9241 l=#1,
9242 \circuitikzbasekey/bipole/label/position=90 }
9243 }
9244 \ctikzset{l^/.style = {
9245 l=#1,
9246 \circuitikzbasekey/bipole/label/position=90 }
9247 }
9248
9249 \ctikzset{label below/.code = {
9250 l=#1,
9251 \circuitikzbasekey/bipole/label/position=-90 }
9252 }
9253 \ctikzset{l_/.style = {
9254 l=#1,
9255 \circuitikzbasekey/bipole/label/position=-90 }
9256 }
9257 %value options
9258 \ctikzset{annotation/.style = { a=#1 } }
9259 \ctikzset{a/.code = {
9260 \pgfkeys{/tikz/circuitikz/bipole/annotation/name=#1}
9261 \ctikzsetvalof{bipole/annotation/unit}{}
9262 \ifpgf@circ@siunitx
9263 \pgf@circ@handleSI{#1}
9264 \ifpgf@circ@siunitx@res
9265 \edef\pgf@temp{\pgf@circ@handleSI@val}
9266 \pgfkeyslet{/tikz/circuitikz/bipole/annotation/name}{\pgf@temp}
9267 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9268 \pgfkeyslet{/tikz/circuitikz/bipole/annotation/unit}{\pgf@temp}
9269 \else
9270 \fi
9271 \else
9272 \fi
9273 }}
9274
9275
9276
9277 \ctikzset{annotation above/.code = {
9278 a=#1,
9279 \circuitikzbasekey/bipole/annotation/position=90 }
9280 }
9281 \ctikzset{a^/.style = {
9282 a=#1,
9283 \circuitikzbasekey/bipole/annotation/position=90 }
9284 }
9285
9286 \ctikzset{annotation below/.code = {
9287 a=#1,
9288 \circuitikzbasekey/bipole/annotation/position=-90 }
9289 }
9290 \ctikzset{a_/.style = {
9291 a=#1,
9292 \circuitikzbasekey/bipole/annotation/position=-90 }
9293 }
9294
9295
9296
9297 \def\pgf@circ@drawlabels#1{
9298 \pgfextra{
9299 \edef\pgf@temp{\ctikzvalof{label/align}}
9300 \def\pgf@circ@temp{straight}
9301 }
9302 \ifx\pgf@temp\pgf@circ@temp %straight
9303 \pgf@circ@drawreglabels{#1}
9304 \else
9305 \pgfextra{\def\pgf@circ@temp{rotate}}
9306 \ifx\pgf@temp\pgf@circ@temp %rotate
9307 \pgf@circ@drawrotlabels{#1}
9308 \else % smart
9309 \pgf@circ@drawsmartlabels{#1}
9310 \fi
9311 \fi
9312 }
9313
9314
9315 \def\pgf@circ@drawsmartlabels#1{
9316 \pgfextra{
9317 %\pgfmathadd{\pgf@circ@direction}{360}
9318 \pgfmathmod{\pgf@circ@direction}{90}
9319 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9320 }
9321 \ifnum \pgfcircmathresult > 20
9322 \ifnum \pgfcircmathresult < 70 % NON quasi retto
9323 \pgf@circ@drawrotlabels{#1}
9324 \else
9325 \pgf@circ@drawreglabels{#1}
9326 \fi
9327 \else
9328 \pgf@circ@drawreglabels{#1}
9329 \fi
9330 }
9331
9332 %% Output routing
9333 %% #1 - node name
9334
9335 \def\pgf@circ@drawrotlabels#1{
9336 \pgfextra{
9337 % calcolo rotazione label
9338 \def\pgf@circ@temp{\ctikzvalof{bipole/#1/position}} %%% àncora label
9339 \edef\pgfcirclabrot{\pgf@circ@direction} % primo e quarto quadrante
9340 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
9341 \ifnum \pgfcircmathresult > 90 \ifnum \pgfcircmathresult < 270 % terzo e secondo
9342 \pgfmathsubtract{\pgf@circ@direction}{180}
9343 \edef\pgfcirclabrot{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9344 \pgfmathadd{\pgf@circ@temp}{180} %%%
9345 \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} %%%
9346 \fi\fi
9347
9348 }
9349 \ifnum \ctikzvalof{mirror value} = -1
9350 % \pgfmathadd{\pgf@circ@temp}{180}
9351 % \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9352 coordinate (labelcoor) at ($(\ctikzvalof{bipole/name})!2!(\ctikzvalof{bipole/name}.south)$)
9353 (labelcoor) node [rotate=\pgfcirclabrot] {\pgf@circ@finallabels{#1}} % c'era un transform shape
9354 \else
9355 coordinate (labelcoor) at ($(\ctikzvalof{bipole/name})!2!(\ctikzvalof{bipole/name}.north)$)
9356 (labelcoor) node [rotate=\pgfcirclabrot] {\pgf@circ@finallabels{#1}} % c'era un transform shape
9357 \fi
9358
9359 }
9360
9361 \def\pgf@circ@drawreglabels#1{
9362 \pgfextra{
9363 \pgfmathsubtract{\pgf@circ@direction}{90}
9364 \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9365
9366 \edef\pgf@circ@temp{\ctikzvalof{bipole/#1/position}} %%% àncora label
9367 \ifnum \pgf@circ@temp < 0
9368 \pgfmathadd{\pgf@circ@labanc}{180}
9369 \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9370 \fi
9371 \ifpgf@circuit@bipole@inverted
9372 \pgfmathadd{\pgf@circ@temp}{180}
9373 \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9374 \fi
9375
9376 \ifnum \ctikzvalof{mirror value} = -1
9377 \pgfmathadd{\pgf@circ@temp}{180}
9378 \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9379 \fi
9380 }
9381 node [ anchor = \pgf@circ@labanc]
9382 at (\ctikzvalof{bipole/name}.\pgf@circ@temp) {\pgf@circ@finallabels{#1}}
9383 }
9384
9385 \def\pgf@circ@finallabels#1{%
9386 \edef\pgf@temp{}%
9387 \edef\pgf@circ@temp{\ctikzvalof{bipole/#1/unit}}%
9388 \ifx\pgf@temp\pgf@circ@temp%
9389 \ctikzvalof{bipole/#1/name}%
9390 \else%
9391 $\SI{\ctikzvalof{bipole/#1/name}}{\ctikzvalof{bipole/#1/unit}}$%
9392 \fi%
9393 }
9394
9395
9396 \ctikzset{text/.style = { t=#1 } }
9397 \ctikzset{t/.code = {
9398 \ctikzsetvalof{bipoles/twoport/text}{#1}
9399 }}
9400
9401 %%%---------- close: tex/pgfcirclabel
9402 %%%%%%%%%%% Springe nach tex/pgfcircvoltage
9403 %%%---------- open: tex/pgfcircvoltage.tex
9404 % Copyright 2007-2009 by Massimo Redaelli
9405 %
9406 % This file may be distributed and/or modified
9407 %
9408 % 1. under the LaTeX Project Public License and/or
9409 % 2. under the GNU Public License.
9410 %
9411 % See the file doc/LICENSE for more details.
9412
9413 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9414 %% Voltage management
9415
9416
9417 \ctikzset{v^>/.style = {
9418 v = #1,
9419 \circuitikzbasekey/bipole/voltage/direction = forward,
9420 \circuitikzbasekey/bipole/voltage/position = above
9421 }
9422 }
9423
9424 \ctikzset{v^</.style = {
9425 v = #1,
9426 \circuitikzbasekey/bipole/voltage/direction = backward,
9427 \circuitikzbasekey/bipole/voltage/position = above
9428 }
9429 }
9430
9431 \ctikzset{v_>/.style = {
9432 v = #1,
9433 \circuitikzbasekey/bipole/voltage/direction = forward,
9434 \circuitikzbasekey/bipole/voltage/position = below
9435 }
9436 }
9437
9438 \ctikzset{v_</.style = {
9439 v = #1,
9440 \circuitikzbasekey/bipole/voltage/direction = backward,
9441 \circuitikzbasekey/bipole/voltage/position = below
9442 }
9443 }
9444
9445
9446 % Default position varies whether the component is a voltage source
9447 % or not
9448 \ctikzset{v/.code = {
9449 \ifpgf@circuit@bipole@isvoltage
9450 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=above,
9451 \circuitikzbasekey/bipole/voltage/direction=forward}
9452 \else
9453 \ifpgf@circ@oldvoltagedirection
9454 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9455 \circuitikzbasekey/bipole/voltage/direction=backward}
9456 \else
9457 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9458 \circuitikzbasekey/bipole/voltage/direction=forward}
9459 \fi
9460 \fi
9461 \ifpgf@circ@oldvoltagedirection\else
9462 \ifpgf@circuit@bipole@iscurrent
9463 \ifpgf@circuit@bipole@current@backward
9464 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9465 \circuitikzbasekey/bipole/voltage/direction=forward}
9466 \else
9467 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9468 \circuitikzbasekey/bipole/voltage/direction=backward}
9469 \fi\fi\fi
9470 \pgfkeys{/tikz/circuitikz/bipole/voltage/label/name=#1}
9471 \ctikzsetvalof{bipole/voltage/label/unit}{}
9472 \ifpgf@circ@siunitx
9473 \pgf@circ@handleSI{#1}
9474 \ifpgf@circ@siunitx@res
9475 \edef\pgf@temp{\pgf@circ@handleSI@val}
9476 \pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/name}{\pgf@temp}
9477 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9478 \pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/unit}{\pgf@temp}
9479 \else
9480 \fi
9481 \else
9482 \fi
9483 }
9484 }
9485
9486 \ctikzset{v_/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = below} }
9487 \ctikzset{v^/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = above} }
9488 \ctikzset{v>/.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = forward} }
9489 \ctikzset{v</.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = backward} }
9490
9491
9492 %% Output routine for generic bipoles
9493
9494 \def\pgf@circ@drawvoltagegeneric{
9495 \pgfextra{
9496 \ifnum \ctikzvalof{mirror value}=-1
9497 \ifpgf@circuit@bipole@inverted
9498 \ifpgf@circuit@bipole@voltage@straight
9499 \def\distfromline{\eudist}
9500 \else
9501 \def\distfromline{\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
9502 \fi
9503 \else
9504 \ifpgf@circuit@bipole@voltage@straight
9505 \def\distfromline{-\eudist}
9506 \else
9507 \def\distfromline{-\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
9508 \fi
9509 \fi
9510 \else
9511 \ifpgf@circuit@bipole@inverted
9512 \ifpgf@circuit@bipole@voltage@straight
9513 \def\distfromline{-\eudist}
9514 \else
9515 \def\distfromline{-\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
9516 \fi
9517 \else
9518 \ifpgf@circuit@bipole@voltage@straight
9519 \def\distfromline{\eudist}
9520 \else
9521 \def\distfromline{\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
9522 \fi
9523 \fi
9524 \fi
9525
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
9532 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}
9533 \pgfkeysifdefined{\pgf@temp}
9534 { \edef\distacefromnode{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}} }
9535 { \edef\distacefromnode{\ctikzvalof{voltage/distance from node}} }
9536 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}
9537 \pgfkeysifdefined{\pgf@temp}
9538 { \edef\bumpb{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}} }
9539 { \edef\bumpb{\ctikzvalof{voltage/bump b}} }
9540 }
9541
9542
9543 coordinate (pgfcirc@midtmp) at ($(\tikztostart) ! \distacefromnode ! (anchorstartnode)$)
9544 coordinate (pgfcirc@Vfrom) at ($(pgfcirc@midtmp) ! -\distfromline ! \pgf@circ@voltage@angle:(anchorstartnode)$)
9545 coordinate (pgfcirc@mid) at ($(\tikztotarget) ! \distacefromnode ! (anchorendnode)$)
9546 coordinate (pgfcirc@Vto) at ($(pgfcirc@mid) ! \distfromline ! \pgf@circ@voltage@angle : (anchorendnode)$)
9547
9548 \ifpgf@circuit@bipole@voltage@below
9549 coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-110)$)
9550 coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-70)$)
9551 \else
9552 coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.110)$)
9553 coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.70)$)
9554 \fi
9555
9556 \ifpgf@circuit@europeanvoltage
9557 \ifpgf@circuit@bipole@voltage@straight
9558 \ifpgf@circuit@bipole@voltage@backward
9559 (pgfcirc@Vto) --(pgfcirc@Vfrom) node[currarrow, sloped, allow upside down, pos=1] {}
9560 \else
9561 (pgfcirc@Vfrom) --(pgfcirc@Vto) node[currarrow, sloped, allow upside down, pos=1] {}
9562
9563 \fi
9564 \else
9565 \ifpgf@circuit@bipole@voltage@backward
9566 (pgfcirc@Vto) .. controls (pgfcirc@Vcont2) and (pgfcirc@Vcont1) ..
9567 node[currarrow, sloped, allow upside down, pos=1] {}
9568 (pgfcirc@Vfrom)
9569 \else
9570 (pgfcirc@Vfrom) .. controls (pgfcirc@Vcont1) and (pgfcirc@Vcont2) ..
9571 node[currarrow, sloped, allow upside down, pos=1] {}
9572 (pgfcirc@Vto)
9573 \fi
9574 \fi
9575 \else
9576 \ifpgf@circuit@bipole@voltage@backward
9577 \ifpgf@circ@oldvoltagedirection
9578 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$}
9579 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$-$}
9580 \else
9581 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$}
9582 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$+$}
9583 \fi
9584 \else
9585 \ifpgf@circ@oldvoltagedirection
9586 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$}
9587 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$+$}
9588 \else
9589 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$}
9590 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$-$}
9591 \fi
9592 \fi
9593 \fi
9594 }
9595
9596 %% Output routine for voltage sources
9597
9598 \def\pgf@circ@drawvoltagegenerator{
9599 \ifpgf@circuit@bipole@voltage@below
9600 coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-120)$)
9601 coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-60)$)
9602 \else
9603 coordinate (pgfcirc@Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.120)$)
9604 coordinate (pgfcirc@Vcont2) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.60)$)
9605 \fi
9606
9607 \ifpgf@circuit@europeanvoltage
9608 \ifpgf@circuit@bipole@voltage@backward
9609 (pgfcirc@Vcont2) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vcont1)
9610 \else
9611 (pgfcirc@Vcont1) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vcont2)
9612 \fi
9613
9614 \else % american voltage
9615
9616 \ifpgf@circuit@bipole@voltageoutsideofsymbol
9617 % if it is a battery, must put + and -
9618 \ifpgf@circuit@bipole@voltage@backward
9619 (pgfcirc@Vcont1) node {$-$} (pgfcirc@Vcont2) node {$+$}
9620 \else
9621 (pgfcirc@Vcont1) node {$+$} (pgfcirc@Vcont2) node {$-$}
9622 \fi
9623 \fi
9624
9625 \fi
9626 }
9627
9628 %% Output routine
9629
9630 \def\pgf@circ@drawvoltage{ % node name
9631 \pgfextra{
9632 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
9633
9634 \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
9635 \ifpgf@circuit@bipole@voltage@below
9636 \def\pgf@circ@bipole@voltage@label@anchor{north west}
9637 \else \def\pgf@circ@bipole@voltage@label@anchor{south east}
9638 \fi
9639 \fi\fi
9640 \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
9641 \ifpgf@circuit@bipole@voltage@below
9642 \def\pgf@circ@bipole@voltage@label@anchor{west}
9643 \else \def\pgf@circ@bipole@voltage@label@anchor{east}
9644 \fi
9645 \fi\fi
9646 \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
9647 \ifpgf@circuit@bipole@voltage@below
9648 \def\pgf@circ@bipole@voltage@label@anchor{south west}
9649 \else \def\pgf@circ@bipole@voltage@label@anchor{north east}
9650 \fi
9651 \fi\fi
9652 \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
9653 \ifpgf@circuit@bipole@voltage@below
9654 \def\pgf@circ@bipole@voltage@label@anchor{south}
9655 \else\def\pgf@circ@bipole@voltage@label@anchor{north}
9656 \fi
9657 \fi\fi
9658 \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
9659 \ifpgf@circuit@bipole@voltage@below
9660 \def\pgf@circ@bipole@voltage@label@anchor{south east}
9661 \else\def\pgf@circ@bipole@voltage@label@anchor{north west}
9662 \fi
9663 \fi\fi
9664 \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
9665 \ifpgf@circuit@bipole@voltage@below
9666 \def\pgf@circ@bipole@voltage@label@anchor{east}
9667 \else \def\pgf@circ@bipole@voltage@label@anchor{west}
9668 \fi
9669 \fi\fi
9670 \ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
9671 \ifpgf@circuit@bipole@voltage@below
9672 \def\pgf@circ@bipole@voltage@label@anchor{north east}
9673 \else\def\pgf@circ@bipole@voltage@label@anchor{south west}
9674 \fi
9675 \fi\fi
9676 \ifnum\pgfcircmathresult >-1 \ifnum\pgfcircmathresult <5
9677 \ifpgf@circuit@bipole@voltage@below
9678 \def\pgf@circ@bipole@voltage@label@anchor{north}
9679 \else\def\pgf@circ@bipole@voltage@label@anchor{south}
9680 \fi
9681 \fi\fi
9682 \ifnum\pgfcircmathresult >355 \ifnum\pgfcircmathresult <361
9683 \ifpgf@circuit@bipole@voltage@below
9684 \def\pgf@circ@bipole@voltage@label@anchor{north}
9685 \else\def\pgf@circ@bipole@voltage@label@anchor{south}
9686 \fi
9687 \fi\fi
9688
9689 \ifnum \ctikzvalof{mirror value}=-1
9690 \ifpgf@circuit@bipole@voltage@below
9691 \pgf@circuit@bipole@voltage@belowfalse
9692 \else
9693 \pgf@circuit@bipole@voltage@belowtrue
9694 \fi
9695 \fi
9696
9697 \ifpgf@circuit@bipole@inverted
9698 \ifpgf@circuit@bipole@voltage@below
9699 \pgf@circuit@bipole@voltage@belowfalse
9700 \else
9701 \pgf@circuit@bipole@voltage@belowtrue
9702 \fi
9703 \fi
9704
9705 \ifpgf@circuit@bipole@voltage@below
9706 \def\pgf@circ@bipole@voltage@label@where{-90}
9707 \else
9708 \def\pgf@circ@bipole@voltage@label@where{90}
9709 \fi
9710
9711
9712 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label
9713 distance}
9714 \pgfkeysifdefined{\pgf@temp}
9715 { \edef\eudist{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}} }
9716 { \edef\eudist{\ctikzvalof{voltage/european label distance}} }
9717
9718 \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
9719 } %end pgfextra
9720
9721 \ifpgf@circuit@bipole@isvoltage
9722 \pgf@circ@drawvoltagegenerator
9723 \else
9724 \pgf@circ@drawvoltagegeneric
9725 \fi
9726
9727
9728
9729 (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where)
9730 coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) !
9731 \ifpgf@circuit@europeanvoltage\eudist\else\ctikzvalof{voltage/american label distance}\fi !
9732 (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where)$)
9733 node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=0]
9734 at (Vlab) { \pgf@circ@finallabels{voltage/label} }
9735 }
9736
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
9754
9755 \ctikzset{i^>/.style = {
9756 i = #1,
9757 \circuitikzbasekey/bipole/current/direction = forward,
9758 \circuitikzbasekey/bipole/current/x position = after,
9759 \circuitikzbasekey/bipole/current/y position = above
9760 }
9761 }
9762
9763 \ctikzset{i_>/.style = {
9764 i = #1,
9765 \circuitikzbasekey/bipole/current/direction = forward,
9766 \circuitikzbasekey/bipole/current/x position = after,
9767 \circuitikzbasekey/bipole/current/y position = below
9768 }
9769 }
9770
9771 \ctikzset{i>^/.style = {
9772 i = #1,
9773 \circuitikzbasekey/bipole/current/direction = forward,
9774 \circuitikzbasekey/bipole/current/x position = before,
9775 \circuitikzbasekey/bipole/current/y position = above
9776 }
9777 }
9778
9779 \ctikzset{i>_/.style = {
9780 i = #1,
9781 \circuitikzbasekey/bipole/current/direction = forward,
9782 \circuitikzbasekey/bipole/current/x position = before,
9783 \circuitikzbasekey/bipole/current/y position = below
9784 }
9785 }
9786
9787 \ctikzset{i^</.style = {
9788 i = #1,
9789 \circuitikzbasekey/bipole/current/direction = backward,
9790 \circuitikzbasekey/bipole/current/x position = after,
9791 \circuitikzbasekey/bipole/current/y position = above
9792 }
9793 }
9794
9795 \ctikzset{i_</.style = {
9796 i = #1,
9797 \circuitikzbasekey/bipole/current/direction = backward,
9798 \circuitikzbasekey/bipole/current/x position = after,
9799 \circuitikzbasekey/bipole/current/y position = below
9800 }
9801 }
9802
9803 \ctikzset{i<^/.style = {
9804 i = #1,
9805 \circuitikzbasekey/bipole/current/direction = backward,
9806 \circuitikzbasekey/bipole/current/x position = before,
9807 \circuitikzbasekey/bipole/current/y position = above
9808 }
9809 }
9810
9811 \ctikzset{i<_/.style = {
9812 i = #1,
9813 \circuitikzbasekey/bipole/current/direction = backward,
9814 \circuitikzbasekey/bipole/current/x position = before,
9815 \circuitikzbasekey/bipole/current/y position = below
9816 }
9817 }
9818
9819 \ctikzset{i/.code = {
9820 % \ifpgf@circuit@bipole@iscurrent
9821 % \pgfkeys{\circuitikzbasekey/bipole/current/position=above}
9822 % \else
9823 % \pgfkeys{\circuitikzbasekey/bipole/current/position=below}
9824 % \fi
9825 \pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
9826 \circuitikzbasekey/bipole/current/x position = after,
9827 \circuitikzbasekey/bipole/current/y position = above }
9828 \pgfkeys{/tikz/circuitikz/bipole/current/label/name=#1}
9829 \ctikzsetvalof{bipole/current/label/unit}{}
9830 \ifpgf@circ@siunitx
9831 \pgf@circ@handleSI{#1}
9832 \ifpgf@circ@siunitx@res
9833 \edef\pgf@temp{\pgf@circ@handleSI@val}
9834 \pgfkeyslet{/tikz/circuitikz/bipole/current/label/name}{\pgf@temp}
9835 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9836 \pgfkeyslet{/tikz/circuitikz/bipole/current/label/unit}{\pgf@temp}
9837 \else
9838 \fi
9839 \else
9840 \fi
9841 %reverse current direction for voltage sources
9842 \ifpgf@circ@oldvoltagedirection\else
9843 \ifpgf@circuit@bipole@isvoltage
9844 \ifpgf@circuit@bipole@voltage@backward
9845 \pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
9846 \circuitikzbasekey/bipole/current/x position = after,
9847 \circuitikzbasekey/bipole/current/y position = below }
9848 \else
9849 \pgfkeys{\circuitikzbasekey/bipole/current/direction = backward,
9850 \circuitikzbasekey/bipole/current/x position = before,
9851 \circuitikzbasekey/bipole/current/y position = above }
9852 \fi\fi\fi
9853 }
9854 }
9855
9856
9857 \ifpgf@circ@oldvoltagedirection
9858 \ctikzset{i</.style = { i = #1, \circuitikzbasekey/bipole/current/direction = backward } }
9859 \else
9860 \ctikzset{i</.style = { i = #1, \circuitikzbasekey/bipole/current/direction = backward, \circuitikzbasekey/bipole/current/x position = before } }
9861 \fi
9862 \ctikzset{i_/.style = { i = #1, \circuitikzbasekey/bipole/current/y position = below } }
9863 \ctikzset{i>/.style = {i = #1, \circuitikzbasekey/bipole/current/direction = forward } }
9864 \ctikzset{i^/.style = { i= #1, \circuitikzbasekey/bipole/current/y position = above } }
9865
9866
9867 \def\pgf@circ@drawnormalcurrent{
9868 \ifpgf@circuit@bipole@current@before
9869 \ifpgf@circuit@bipole@current@backward
9870 { (anchorstartnode) --
9871 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9872 (\tikztostart)
9873 }
9874 \else
9875 { (\tikztostart) --
9876 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9877 (anchorstartnode)
9878 }
9879 \fi
9880 \else
9881 \ifpgf@circuit@bipole@current@backward
9882 { (\tikztotarget) --
9883 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9884 (anchorendnode)
9885 }
9886 \else
9887 { (anchorendnode) --
9888 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9889 (\tikztotarget)
9890 }
9891 \fi
9892 \fi
9893 }
9894
9895 %% Output routine
9896 %% #1 - node name
9897
9898 \def\pgf@circ@drawcurrent{
9899 \pgfextra{
9900 \edef\pgf@circ@ffffff{\pgf@circ@direction}
9901 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@ffffff\pgf@nil}
9902
9903 \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
9904 \ifpgf@circuit@bipole@current@below
9905 \def\pgf@circ@dir{north west} \else \def\pgf@circ@dir{south east}
9906 \fi
9907 \fi\fi
9908 \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
9909 \ifpgf@circuit@bipole@current@below
9910 \def\pgf@circ@dir{west} \else \def\pgf@circ@dir{east}
9911 \fi
9912 \fi\fi
9913 \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
9914 \ifpgf@circuit@bipole@current@below
9915 \def\pgf@circ@dir{south west}\else \def\pgf@circ@dir{north east}
9916 \fi
9917 \fi\fi
9918 \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
9919 \ifpgf@circuit@bipole@current@below
9920 \def\pgf@circ@dir{south}\else\def\pgf@circ@dir{north}
9921 \fi
9922 \fi\fi
9923 \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
9924 \ifpgf@circuit@bipole@current@below
9925 \def\pgf@circ@dir{south east}\else\def\pgf@circ@dir{north west}
9926 \fi
9927 \fi\fi
9928 \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
9929 \ifpgf@circuit@bipole@current@below
9930 \def\pgf@circ@dir{east}\else \def\pgf@circ@dir{west}
9931 \fi
9932 \fi\fi
9933 \ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
9934 \ifpgf@circuit@bipole@current@below
9935 \def\pgf@circ@dir{north east}\else\def\pgf@circ@dir{south west}
9936 \fi
9937 \fi\fi
9938 \ifnum\pgfcircmathresult <5
9939 \ifpgf@circuit@bipole@current@below
9940 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
9941 \fi
9942 \fi
9943 \ifnum\pgfcircmathresult >355
9944 \ifpgf@circuit@bipole@current@below
9945 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
9946 \fi
9947 \fi
9948
9949 \ifpgf@circuit@bipole@current@below
9950 \def\pgf@circ@bipole@current@label@where{-90}
9951 \else
9952 \def\pgf@circ@bipole@current@label@where{+90}
9953 \fi
9954 }
9955
9956
9957 \pgfextra{ \def\pgf@temp{short} \edef\pgf@circ@temp{\ctikzvalof{bipole/kind}} }
9958
9959 \ifx\pgf@circ@temp\pgf@temp % caso di corrente (centrata) su un corto
9960 \ifpgf@circuit@bipole@current@backward
9961 { (\tikztotarget) --
9962 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9963 (\tikztostart) }
9964 \else
9965 { (\tikztostart) --
9966 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9967 (\tikztotarget) }
9968 \fi
9969
9970 \else % altri bipoli - e quindi tra nodo e target
9971
9972 \ifpgf@circuit@bipole@iscurrent
9973 \ifpgf@circuit@europeancurrent
9974 \pgf@circ@drawnormalcurrent
9975 \else
9976 \fi
9977 \else
9978 \pgf@circ@drawnormalcurrent
9979 \fi
9980 \fi
9981
9982 \ifpgf@circuit@bipole@iscurrent
9983 node [anchor=\pgf@circ@dir] at (\ctikzvalof{bipole/name}.\pgf@circ@bipole@current@label@where)
9984 { \pgf@circ@finallabels{current/label} }
9985 \else
9986 (Iarrow.\pgf@circ@bipole@current@label@where) node [anchor=\pgf@circ@dir]
9987 { \pgf@circ@finallabels{current/label} }
9988 \fi
9989
9990 }
9991
9992
9993
9994
9995 %%%---------- close: tex/pgfcirccurrent
9996
9997 \ExecuteOptions{nofetbodydiode,nofetsolderdot,nooldvoltagedirection,europeancurrents,europeanvoltages,americanports,americanresistors,cuteinductors,europeangfsurgearrester,nosiunitx,noarrowmos,smartlabels,nocompatibility}
9998
9999 \ProcessOptions\relax
10000
10001 %%%%%%%%%%% Springe nach tex/pgfcircpath
10002 %%%---------- open: tex/pgfcircpath.tex
10003
10004 \pgf@circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
10005 \def\pgf@circ@direction{0.0}
10006
10007 % Names
10008 \ctikzset{name/.style = { n=#1 } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@
10009 \ctikzset{n/.code = {
10010 \pgfkeys{/tikz/circuitikz/bipole/name=#1}
10011 }}
10012
10013 % Reflect the node along
10014 \ctikzset{mirrored/.is choice}
10015 \ctikzset{mirror value/.initial=1}
10016 \ctikzset{mirrored/true/.code = {\ctikzsetvalof{mirror value}{-1}} }
10017 \ctikzset{mirrored/false/.code = {\ctikzsetvalof{mirror value}{1}} }
10018 \ctikzset{mirror/.style = {/tikz/circuitikz/mirrored=true}}
10019
10020 % Invert node along path
10021 \ctikzset{inverted/.is choice}
10022 \ctikzset{invert value/.initial=1}
10023 \ctikzset{inverted/true/.code = {\ctikzsetvalof{invert value}{-1}\pgf@circuit@bipole@invertedtrue}}
10024 \ctikzset{inverted/false/.code = {\ctikzsetvalof{invert value}{1}\pgf@circuit@bipole@invertedfalse}}
10025 \ctikzset{invert/.style = {/tikz/circuitikz/inverted=true}}
10026 \newif\ifpgf@circuit@bipole@inverted
10027 \ctikzset{bipole/inverted/.is if=pgf@circuit@bipole@inverted}
10028
10029
10030 \newif\ifpgf@circuit@bipole@voltage@backward
10031 \ctikzset{bipole/voltage/direction/.is choice}
10032 \ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}}
10033 \ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}}
10034
10035
10036
10037 % Initialize paths
10038 \def\pgfcircresetpath{
10039 \ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90, ,bipole/annotation/name=, bipole/annotation/position=-90,
10040 bipole/inverted=false, bipole/kind=,
10041 bipole/voltage/direction=backward, bipole/voltage/label/name=, bipole/voltage/position=below,
10042 bipole/nodes/left=none, bipole/nodes/right=none, bipole/is voltage=false,bipole/is voltageoutsideofsymbol=false,bipole/is strokedsymbol=false,
10043 bipole/is current=false, bipole/current/label/name=, bipole/current/x position=after,
10044 bipole/current/y position=above, bipole/current/direction=forward,
10045 mirrored=false
10046 }
10047 }
10048
10049
10050 %% Generic bipole path
10051 \def\pgf@circ@bipole@path#1#2{
10052 \pgfextra{
10053 \ctikzset{bipole/kind = #1}
10054
10055 \edef\pgf@temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
10056 \def\pgf@circ@temp{}
10057 \ifx\pgf@temp\pgf@circ@temp % if it has not a name
10058 \pgfmathrandominteger{\pgf@circ@rand}{1000}{9999}
10059 \ctikzset{bipole/name = #2\pgf@circ@rand} % create it
10060 \fi
10061
10062 \def\pgf@temp{open}
10063 \def\pgf@circ@temp{#1}
10064 }
10065
10066 (\tikztostart) coordinate (\ctikzvalof{bipole/name}start)
10067 (\tikztotarget) coordinate (\ctikzvalof{bipole/name}end)
10068 \pgfextra{
10069 \pgf@circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
10070 {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
10071 \edef\pgf@circ@direction{\pgfmathresult}
10072 }
10073
10074 ($(\tikztostart) ! .5 ! (\tikztotarget)$)
10075 node[#1shape, rotate=\pgf@circ@direction, yscale=\ctikzvalof{mirror value}, xscale=\ctikzvalof{invert value}]
10076 (\ctikzvalof{bipole/name}) {}
10077 \ifpgf@circuit@bipole@inverted
10078 \ifcsname pgf@anchor@#1shape@pathstart\endcsname%if special path-anchors are defined, use them!
10079 coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.pathend)
10080 coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.pathstart)
10081 \else
10082 coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.right)
10083 coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.left)
10084 \fi
10085 \else
10086 \ifcsname pgf@anchor@#1shape@pathstart\endcsname%if special path-anchors are defined, use them!
10087 coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.pathstart)
10088 coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.pathend)
10089 \else
10090 coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.left)
10091 coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.right)
10092 \fi
10093 \fi
10094 \ifx\pgf@temp\pgf@circ@temp % if it is an open
10095 \else
10096 \ifpgf@circuit@bipole@strokedsymbol%draw line thrue symbol(e.g. diodes)
10097 \ifcsname pgf@anchor@#1shape@strokepathstart\endcsname%if special path-anchors are defined, use them!
10098 (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.strokepathstart)
10099 (\ctikzvalof{bipole/name}.strokepathend) -- (\ctikzvalof{bipole/name}end.center)
10100 \else
10101 (\ctikzvalof{bipole/name}start.center)--(\ctikzvalof{bipole/name}end.center)
10102 \fi
10103 \else
10104 (\ctikzvalof{bipole/name}start.center) --(anchorstartnode)
10105 (anchorendnode) -- (\ctikzvalof{bipole/name}end.center)
10106
10107 \fi
10108 \fi
10109
10110
10111 \pgf@circ@ifkeyempty{bipole/label/name}\else\pgf@circ@drawlabels{label}\fi
10112 \pgf@circ@ifkeyempty{bipole/annotation/name}\else\pgf@circ@drawlabels{annotation}\fi
10113 \drawpoles
10114 \pgf@circ@ifkeyempty{bipole/voltage/label/name}\else\pgf@circ@drawvoltage\fi
10115 \pgf@circ@ifkeyempty{bipole/current/label/name}\else\pgf@circ@drawcurrent\fi
10116 % reset
10117 \pgfextra{
10118 \pgfcircresetpath
10119 }
10120 (\tikztotarget) \tikztonodes % e si continua
10121 }
10122
10123
10124 %% Path definitions
10125 \def\pgf@circ@resistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{generic}{#1}\else\pgf@circ@bipole@path{resistor}{#1}\fi}
10126 \def\pgf@circ@vresistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{tgeneric}{#1}\else\pgf@circ@bipole@path{vresistor}{#1}\fi}
10127 \def\pgf@circ@potentiometer@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{genericpotentiometer}{#1}\else\pgf@circ@bipole@path{potentiometer}{#1}\fi}
10128 \def\pgf@circ@thermistor@path#1{\pgf@circ@bipole@path{thermistor}{#1}}
10129 \def\pgf@circ@thermistorptc@path#1{\pgf@circ@bipole@path{thermistorptc}{#1}}
10130 \def\pgf@circ@thermistorntc@path#1{\pgf@circ@bipole@path{thermistorntc}{#1}}
10131 \def\pgf@circ@varistor@path#1{\pgf@circ@bipole@path{varistor}{#1}}
10132 \def\pgf@circ@capacitor@path#1{\pgf@circ@bipole@path{capacitor}{#1}}
10133 \def\pgf@circ@ecapacitor@path#1{\pgf@circ@bipole@path{ecapacitor}{#1}}
10134 \def\pgf@circ@polarcapacitor@path#1{\pgf@circ@bipole@path{polarcapacitor}{#1}}
10135 \def\pgf@circ@vcapacitor@path#1{\pgf@circ@bipole@path{vcapacitor}{#1}}
10136 \def\pgf@circ@piezoelectric@path#1{\pgf@circ@bipole@path{piezoelectric}{#1}}
10137 \def\pgf@circ@battery@path#1{\pgf@circ@bipole@path{battery}{#1}}
10138 \def\pgf@circ@battery1@path#1{\pgf@circ@bipole@path{battery1}{#1}}
10139 \def\pgf@circ@europeaninductor@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}}
10140 \def\pgf@circ@americaninductor@path#1{\pgf@circ@bipole@path{americaninductor}{#1}}
10141 \def\pgf@circ@cuteinductor@path#1{\pgf@circ@bipole@path{cuteinductor}{#1}}
10142 \def\pgf@circ@inductor@path#1{%
10143 \pgfextra{
10144 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
10145 \def\pgf@temp{european}%
10146 }
10147 \ifx\pgf@temp\pgf@circ@temp%
10148 \pgf@circ@europeaninductor@path{#1}%
10149 \else%
10150 \pgfextra{ \def\pgf@temp{cute} }%
10151 \ifx\pgf@temp\pgf@circ@temp%
10152 \pgf@circ@cuteinductor@path{#1}%
10153 \else%
10154 \pgf@circ@americaninductor@path{#1}%
10155 \fi%
10156 \fi%
10157 }
10158 \def\pgf@circ@vinductor@path#1{
10159 \pgfextra{
10160 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
10161 \def\pgf@temp{european}%
10162 }
10163 \ifx\pgf@temp\pgf@circ@temp%
10164 \pgf@circ@veuropeaninductor@path{#1}%
10165 \else%
10166 \pgfextra{ \def\pgf@temp{cute} }%
10167 \ifx\pgf@temp\pgf@circ@temp%
10168 \pgf@circ@vcuteinductor@path{#1}%
10169 \else%
10170 \pgf@circ@vamericaninductor@path{#1}%
10171 \fi%
10172 \fi%
10173 }
10174 \def\pgf@circ@veuropeaninductor@path#1{\pgf@circ@bipole@path{tfullgeneric}{#1}}
10175 \def\pgf@circ@vamericaninductor@path#1{\pgf@circ@bipole@path{vamericaninductor}{#1}}
10176 \def\pgf@circ@vcuteinductor@path#1{\pgf@circ@bipole@path{vcuteinductor}{#1}}
10177 \def\pgf@circ@lamp@path#1{\pgf@circ@bipole@path{lamp}{#1}}
10178 \def\pgf@circ@esource@path#1{\pgf@circ@bipole@path{esource}{#1}}
10179 \def\pgf@circ@pvsource@path#1{\pgf@circ@bipole@path{pvsource}{#1}}
10180 \def\pgf@circ@vsource@path#1{\pgf@circ@bipole@path{vsource}{#1}}
10181 \def\pgf@circ@dcvsource@path#1{\pgf@circ@bipole@path{dcvsource}{#1}}
10182 \def\pgf@circ@vsourceam@path#1{\pgf@circ@bipole@path{vsourceAM}{#1}}
10183 \def\pgf@circ@vsourcesin@path#1{\pgf@circ@bipole@path{vsourcesin}{#1}}
10184 \def\pgf@circ@isource@path#1{\pgf@circ@bipole@path{isource}{#1}}
10185 \def\pgf@circ@oosource@path#1{\pgf@circ@bipole@path{oosource}{#1}}
10186 \def\pgf@circ@dcisource@path#1{\pgf@circ@bipole@path{dcisource}{#1}}
10187 \def\pgf@circ@isourcesin@path#1{\pgf@circ@bipole@path{isourcesin}{#1}}
10188 \def\pgf@circ@vsourcesquare@path#1{\pgf@circ@bipole@path{vsourcesquare}{#1}}
10189 \def\pgf@circ@vsourcetri@path#1{\pgf@circ@bipole@path{vsourcetri}{#1}}
10190 \def\pgf@circ@isourceam@path#1{\pgf@circ@bipole@path{isourceAM}{#1}}
10191 \def\pgf@circ@cvsource@path#1{\pgf@circ@bipole@path{cvsource}{#1}}
10192 \def\pgf@circ@cvsourceam@path#1{\pgf@circ@bipole@path{cvsourceAM}{#1}}
10193 \def\pgf@circ@cvsourcesin@path#1{\pgf@circ@bipole@path{cvsourcesin}{#1}}
10194 \def\pgf@circ@cisource@path#1{\pgf@circ@bipole@path{cisource}{#1}}
10195 \def\pgf@circ@cisourceam@path#1{\pgf@circ@bipole@path{cisourceAM}{#1}}
10196 \def\pgf@circ@cisourcesin@path#1{\pgf@circ@bipole@path{cisourcesin}{#1}}
10197 \def\pgf@circ@short@path#1{\pgf@circ@bipole@path{short}{#1}}
10198 \def\pgf@circ@cspst@path#1{\pgf@circ@bipole@path{cspst}{#1}}
10199 \def\pgf@circ@spst@path#1{\pgf@circ@bipole@path{spst}{#1}}
10200 \def\pgf@circ@ospst@path#1{\pgf@circ@bipole@path{ospst}{#1}}
10201 \def\pgf@circ@pushbutton@path#1{\pgf@circ@bipole@path{pushbutton}{#1}}
10202 \def\pgf@circ@open@path#1{\pgf@circ@bipole@path{open}{#1}}
10203 \def\pgf@circ@generic@path#1{\pgf@circ@bipole@path{generic}{#1}}
10204 \def\pgf@circ@ageneric@path#1{\pgf@circ@bipole@path{ageneric}{#1}}
10205 \def\pgf@circ@tgeneric@path#1{\pgf@circ@bipole@path{tgeneric}{#1}}
10206 \def\pgf@circ@fullgeneric@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}}
10207 \def\pgf@circ@tfullgeneric@path#1{\pgf@circ@bipole@path{tfullgeneric}{#1}}
10208 \def\pgf@circ@ammeter@path#1{\pgf@circ@bipole@path{ammeter}{#1}}
10209 \def\pgf@circ@ohmmeter@path#1{\pgf@circ@bipole@path{ohmmeter}{#1}}
10210 \def\pgf@circ@voltmeter@path#1{\pgf@circ@bipole@path{voltmeter}{#1}}
10211 \def\pgf@circ@empty@path#1{}
10212 \def\pgf@circ@photoresistor@path#1{\pgf@circ@bipole@path{photoresistor}{#1}}
10213 \def\pgf@circ@emptythyristor@path#1{\pgf@circ@bipole@path{emptythyristor}{#1}}
10214 \def\pgf@circ@fullthyristor@path#1{\pgf@circ@bipole@path{fullthyristor}{#1}}
10215 \def\pgf@circ@toggleswitch@path#1{\pgf@circ@bipole@path{toggleswitch}{#1}}
10216 \def\pgf@circ@memristor@path#1{\pgf@circ@bipole@path{memristor}{#1}}
10217 \def\pgf@circ@emptytriac@path#1{\pgf@circ@bipole@path{emptytriac}{#1}}
10218 \def\pgf@circ@fulltriac@path#1{\pgf@circ@bipole@path{fulltriac}{#1}}
10219 \def\pgf@circ@tline@path#1{\pgf@circ@bipole@path{tline}{#1}}
10220 \def\pgf@circ@squid@path#1{\pgf@circ@bipole@path{squid}{#1}}
10221 \def\pgf@circ@barrier@path#1{\pgf@circ@bipole@path{barrier}{#1}}
10222 \def\pgf@circ@thermocouple@path#1{\pgf@circ@bipole@path{thermocouple}{#1}}
10223 \def\pgf@circ@fuse@path#1{\pgf@circ@bipole@path{fuse}{#1}}
10224 \def\pgf@circ@afuse@path#1{\pgf@circ@bipole@path{afuse}{#1}}
10225
10226 \def\pgf@circ@gfsurgearrester@path#1{\ifpgf@circuit@europeangfsurgearrester\pgf@circ@europeangfsurgearrester@path{#1}\else\pgf@circ@americangfsurgearrester@path{#1}\fi}
10227 \def\pgf@circ@europeangfsurgearrester@path#1{\pgf@circ@bipole@path{european gas filled surge arrester}{#1}}
10228 \def\pgf@circ@americangfsurgearrester@path#1{\pgf@circ@bipole@path{american gas filled surge arrester}{#1}}
10229
10230 \def\pgf@circ@twoport@path#1{\pgf@circ@bipole@path{twoport}{#1}}
10231 \def\pgf@circ@vco@path#1{\pgf@circ@bipole@path{vco}{#1}}
10232 \def\pgf@circ@bandpass@path#1{\pgf@circ@bipole@path{bandpass}{#1}}
10233 \def\pgf@circ@highpass@path#1{\pgf@circ@bipole@path{highpass}{#1}}
10234 \def\pgf@circ@lowpass@path#1{\pgf@circ@bipole@path{lowpass}{#1}}
10235 \def\pgf@circ@adc@path#1{\pgf@circ@bipole@path{adc}{#1}}
10236 \def\pgf@circ@dac@path#1{\pgf@circ@bipole@path{dac}{#1}}
10237 \def\pgf@circ@dsp@path#1{\pgf@circ@bipole@path{dsp}{#1}}
10238 \def\pgf@circ@fft@path#1{\pgf@circ@bipole@path{fft}{#1}}
10239 \def\pgf@circ@amp@path#1{\pgf@circ@bipole@path{amp}{#1}}
10240 \def\pgf@circ@vamp@path#1{\pgf@circ@bipole@path{vamp}{#1}}
10241 \def\pgf@circ@piattenuator@path#1{\pgf@circ@bipole@path{piattenuator}{#1}}
10242 \def\pgf@circ@vpiattenuator@path#1{\pgf@circ@bipole@path{vpiattenuator}{#1}}
10243 \def\pgf@circ@tattenuator@path#1{\pgf@circ@bipole@path{tattenuator}{#1}}
10244 \def\pgf@circ@vtattenuator@path#1{\pgf@circ@bipole@path{vtattenuator}{#1}}
10245 \def\pgf@circ@phaseshifter@path#1{\pgf@circ@bipole@path{phaseshifter}{#1}}
10246 \def\pgf@circ@vphaseshifter@path#1{\pgf@circ@bipole@path{vphaseshifter}{#1}}
10247 \def\pgf@circ@detector@path#1{\pgf@circ@bipole@path{detector}{#1}}
10248
10249 %%Mechanical
10250 \def\pgf@circ@spring@path#1{\pgf@circ@bipole@path{spring}{#1}}
10251 \def\pgf@circ@mass@path#1{\pgf@circ@bipole@path{mass}{#1}}
10252 \def\pgf@circ@damper@path#1{\pgf@circ@bipole@path{damper}{#1}}
10253
10254
10255
10256
10257 %% Styles
10258
10259 \def\comnpatname{\ifpgf@circuit@compat *\else\fi}
10260 \def\compattikzset#1{\tikzset{\comnpatname#1}}
10261
10262 %\def\ctikzsetbipole#1#2{%
10263 % \tikzset{#1/.style= {to path=#2, \circuitikzbasekey, l=##1}}%
10264 %}
10265
10266 \compattikzset{spring/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@spring@path, l=#1}}
10267 \compattikzset{mass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@mass@path, l=#1}}
10268 \compattikzset{damper/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@damper@path, l=#1}}
10269 \compattikzset{resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@resistor@path, l=#1}}
10270 \compattikzset{american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{resistor}{#1}, l=#1}}
10271 \compattikzset{european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{generic}{#1}, l=#1}}
10272 \compattikzset{potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@potentiometer@path, l=#1}}
10273 \compattikzset{varistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@varistor@path, l=#1}}
10274 \compattikzset{photoresistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@photoresistor@path, l=#1}}
10275 \compattikzset{thermistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistor@path, l=#1}}
10276 \compattikzset{thermistor ptc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorptc@path, l=#1}}
10277 \compattikzset{thermistor ntc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorntc@path, l=#1}}
10278 \compattikzset{american potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{potentiometer}{#1}, l=#1}}
10279 \compattikzset{european potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{genericpotentiometer}{#1}, l=#1}}
10280 \compattikzset{variable resistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vresistor@path, l=#1}}
10281 \compattikzset{variable american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{vresistor}{#1}, l=#1}}
10282 \compattikzset{variable european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{tgeneric}{#1}, l=#1}}
10283 \compattikzset{capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@capacitor@path, l=#1}}
10284 \compattikzset{elko/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ecapacitor@path, l=#1}}
10285 \compattikzset{ecapacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ecapacitor@path, l=#1}}
10286 \compattikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@polarcapacitor@path, l=#1}}
10287 \compattikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcapacitor@path, l=#1}}
10288 \compattikzset{piezoelectric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@piezoelectric@path, l=#1}}
10289 \compattikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10290 \compattikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery1@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10291 \compattikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@inductor@path, l=#1}}
10292 \compattikzset{gf surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@gfsurgearrester@path, l=#1}}
10293 \compattikzset{american gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americangfsurgearrester@path, l=#1}}
10294 \compattikzset{european gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@europeangfsurgearrester@path, l=#1}}
10295 \compattikzset{gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@gfsurgearrester@path, l=#1}}
10296 \compattikzset{american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americaninductor@path, l=#1}}
10297 \compattikzset{cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cuteinductor@path, l=#1}}
10298 \compattikzset{european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@europeaninductor@path, l=#1}}
10299 \compattikzset{variable inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vinductor@path, l=#1}}
10300 \compattikzset{variable european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@veuropeaninductor@path, l=#1}}
10301 \compattikzset{variable american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vamericaninductor@path, l=#1}}
10302 \compattikzset{variable cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcuteinductor@path, l=#1}}
10303 \compattikzset{tline/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tline@path, l=#1}}
10304 \compattikzset{transmission line/.style = {tline = #1}}
10305 \compattikzset{TL/.style = {tline = #1}}
10306 \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}}
10307 \compattikzset{american voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
10308 \compattikzset{european current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10309 \compattikzset{american current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10310 \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}}
10311 \compattikzset{american controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
10312 \compattikzset{european controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10313 \compattikzset{american controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10314 \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 }}
10315 \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 }}
10316 \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 }}
10317 \compattikzset{sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10318 \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}}
10319 \compattikzset{controlled sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10320
10321 \compattikzset{voltage source/.style = {\comnpatname \ifpgf@circuit@europeanvoltage european \else american \fi voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
10322 \compattikzset{current source/.style = {\comnpatname \ifpgf@circuit@europeancurrent european \else american \fi current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
10323 \compattikzset{controlled voltage source/.style = {\comnpatname \ifpgf@circuit@europeanvoltage european \else american \fi controlled voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
10324 \compattikzset{controlled current source/.style = {\comnpatname \ifpgf@circuit@europeancurrent european \else american \fi controlled current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
10325
10326
10327 \compattikzset{generic/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@generic@path, l=#1}}
10328 \compattikzset{ageneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ageneric@path, l=#1}}
10329 \compattikzset{tgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tgeneric@path, l=#1}}
10330 \compattikzset{fullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullgeneric@path, l=#1}}
10331 \compattikzset{tfullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tfullgeneric@path, l=#1}}
10332 \compattikzset{short/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@short@path}}
10333 \compattikzset{open/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@open@path}}
10334
10335 \compattikzset{lamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lamp@path}}
10336
10337 \compattikzset{squid/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@squid@path}}
10338 \compattikzset{barrier/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@barrier@path}}
10339 \compattikzset{thermocouple/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermocouple@path}}
10340 \compattikzset{fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fuse@path}}
10341 \compattikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@afuse@path}}
10342
10343 \compattikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@twoport@path}}
10344 \compattikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vco@path}}
10345 \compattikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandpass@path}}
10346 \compattikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@highpass@path}}
10347 \compattikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lowpass@path}}
10348 \compattikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@adc@path}}
10349 \compattikzset{dac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dac@path}}
10350 \compattikzset{dsp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dsp@path}}
10351 \compattikzset{fft/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fft@path}}
10352 \compattikzset{amp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@amp@path}}
10353 \compattikzset{vamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vamp@path}}
10354 \compattikzset{piattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@piattenuator@path}}
10355 \compattikzset{vpiattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vpiattenuator@path}}
10356 \compattikzset{tattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tattenuator@path}}
10357 \compattikzset{vtattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vtattenuator@path}}
10358 \compattikzset{phaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@phaseshifter@path}}
10359 \compattikzset{vphaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vphaseshifter@path}}
10360 \compattikzset{detector/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@detector@path}}
10361
10362 % % % % % %
10363 % % Beginn of Diodes
10364 % % % % % %
10365
10366 \def\pgf@circ@fulldiode@path#1{\pgf@circ@bipole@path{fulldiode}{#1}}
10367 \def\pgf@circ@fullzdiode@path#1{\pgf@circ@bipole@path{fullzdiode}{#1}}
10368 \def\pgf@circ@fullzzdiode@path#1{\pgf@circ@bipole@path{fullzzdiode}{#1}}
10369 \def\pgf@circ@fullsdiode@path#1{\pgf@circ@bipole@path{fullsdiode}{#1}}
10370 \def\pgf@circ@fulltdiode@path#1{\pgf@circ@bipole@path{fulltdiode}{#1}}
10371 \def\pgf@circ@fulllediode@path#1{\pgf@circ@bipole@path{fulllediode}{#1}}
10372 \def\pgf@circ@fullpdiode@path#1{\pgf@circ@bipole@path{fullpdiode}{#1}}
10373 \def\pgf@circ@fullvarcap@path#1{\pgf@circ@bipole@path{fullvarcap}{#1}}
10374 \def\pgf@circ@emptydiode@path#1{\pgf@circ@bipole@path{emptydiode}{#1}}
10375 \def\pgf@circ@emptyzdiode@path#1{\pgf@circ@bipole@path{emptyzdiode}{#1}}
10376 \def\pgf@circ@emptyzzdiode@path#1{\pgf@circ@bipole@path{emptyzzdiode}{#1}}
10377 \def\pgf@circ@emptysdiode@path#1{\pgf@circ@bipole@path{emptysdiode}{#1}}
10378 \def\pgf@circ@emptytdiode@path#1{\pgf@circ@bipole@path{emptytdiode}{#1}}
10379 \def\pgf@circ@emptylediode@path#1{\pgf@circ@bipole@path{emptylediode}{#1}}
10380 \def\pgf@circ@emptypdiode@path#1{\pgf@circ@bipole@path{emptypdiode}{#1}}
10381 \def\pgf@circ@emptyvarcap@path#1{\pgf@circ@bipole@path{emptyvarcap}{#1}}
10382
10383 \compattikzset{full diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulldiode@path}}
10384 \compattikzset{full Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullsdiode@path}}
10385 \compattikzset{full Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullzdiode@path}}
10386 \compattikzset{full ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullzzdiode@path}}
10387 \compattikzset{full tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulltdiode@path}}
10388 \compattikzset{full photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullpdiode@path}}
10389 \compattikzset{full led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulllediode@path}}
10390 \compattikzset{full varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullvarcap@path}}
10391 \compattikzset{full thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullthyristor@path}}
10392 \compattikzset{full triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulltriac@path}}
10393
10394 \compattikzset{empty diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptydiode@path}}
10395 \compattikzset{empty Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptysdiode@path}}
10396 \compattikzset{empty Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyzdiode@path}}
10397 \compattikzset{empty ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyzzdiode@path}}
10398 \compattikzset{empty tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptytdiode@path}}
10399 \compattikzset{empty photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptypdiode@path}}
10400 \compattikzset{empty led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptylediode@path}}
10401 \compattikzset{empty varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyvarcap@path}}
10402 \compattikzset{empty thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptythyristor@path}}
10403 \compattikzset{empty triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptytriac@path}}
10404
10405 \compattikzset{stroke diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptydiode@path}}
10406 \compattikzset{stroke Schottky diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptysdiode@path}}
10407 \compattikzset{stroke Zener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyzdiode@path}}
10408 \compattikzset{stroke ZZener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyzzdiode@path}}
10409 \compattikzset{stroke tunnel diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptytdiode@path}}
10410 \compattikzset{stroke photodiode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptypdiode@path}}
10411 \compattikzset{stroke led/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptylediode@path}}
10412 \compattikzset{stroke varcap/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyvarcap@path}}
10413 \compattikzset{stroke thyristor/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptythyristor@path}}
10414 %\compattikzset{stroke triac/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptytriac@path}}
10415
10416 \def\pgfcircdiodestylemacro{\ifpgf@circuit@strokediode stroke \else\ifpgf@circuit@fulldiode full \else empty \fi\fi}
10417
10418 \compattikzset{Schottky diode/.style = {\comnpatname \pgfcircdiodestylemacro Schottky diode}}
10419 \compattikzset{Zener diode/.style = {\comnpatname \pgfcircdiodestylemacro Zener diode}}
10420 \compattikzset{ZZener diode/.style = {\comnpatname \pgfcircdiodestylemacro ZZener diode}}
10421 \compattikzset{tunnel diode/.style = {\comnpatname \pgfcircdiodestylemacro tunnel diode}}
10422 \compattikzset{photodiode/.style = {\comnpatname \pgfcircdiodestylemacro photodiode}}
10423 \compattikzset{led/.style = {\comnpatname \pgfcircdiodestylemacro led}}
10424 \compattikzset{varcap/.style = {\comnpatname \pgfcircdiodestylemacro varcap}}
10425 \compattikzset{diode/.style = {\comnpatname \pgfcircdiodestylemacro diode}}
10426 \compattikzset{thyristor/.style = {\comnpatname \pgfcircdiodestylemacro thyristor}}
10427 \compattikzset{triac/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi triac}}%no stroke triac!
10428
10429 %% Define Shortcuts
10430 \compattikzset{Do/.style = {\comnpatname empty diode}}
10431 \compattikzset{tDo/.style = {\comnpatname empty tunnel diode}}
10432 \compattikzset{zDo/.style = {\comnpatname empty Zener diode}}
10433 \compattikzset{zzDo/.style = {\comnpatname empty ZZener diode}}
10434 \compattikzset{sDo/.style = {\comnpatname empty Schottky diode}}
10435 \compattikzset{pDo/.style = {\comnpatname empty photodiode}}
10436 \compattikzset{leDo/.style = {\comnpatname empty led}}
10437 \compattikzset{VCo/.style = {\comnpatname empty varcap}}
10438 \compattikzset{Tyo/.style = {\comnpatname empty thyristor}}
10439 \compattikzset{Tro/.style = {\comnpatname empty triac}}
10440
10441 \compattikzset{D*/.style = {\comnpatname full diode}}
10442 \compattikzset{tD*/.style = {\comnpatname full tunnel diode}}
10443 \compattikzset{zD*/.style = {\comnpatname full Zener diode}}
10444 \compattikzset{zzD*/.style = {\comnpatname full ZZener diode}}
10445 \compattikzset{sD*/.style = {\comnpatname full Schottky diode}}
10446 \compattikzset{pD*/.style = {\comnpatname full photodiode}}
10447 \compattikzset{leD*/.style = {\comnpatname full led}}
10448 \compattikzset{VC*/.style = {\comnpatname full varcap}}
10449 \compattikzset{Ty*/.style = {\comnpatname full thyristor}}
10450 \compattikzset{Tr*/.style = {\comnpatname full triac}}
10451
10452 \compattikzset{D/.style = {\comnpatname diode}}
10453 \compattikzset{tD/.style = {\comnpatname tunnel diode}}
10454 \compattikzset{zD/.style = {\comnpatname Zener diode}}
10455 \compattikzset{zzD/.style = {\comnpatname ZZener diode}}
10456 \compattikzset{sD/.style = {\comnpatname Schottky diode}}
10457 \compattikzset{pD/.style = {\comnpatname photodiode}}
10458 \compattikzset{leD/.style = {\comnpatname led}}
10459 \compattikzset{VC/.style = {\comnpatname varcap}}
10460 \compattikzset{Ty/.style = {\comnpatname thyristor}}
10461 \compattikzset{Tr/.style = {\comnpatname triac}}
10462
10463 \compattikzset{D-/.style = {\comnpatname stroke diode}}
10464 \compattikzset{tD-/.style = {\comnpatname stroke tunnel diode}}
10465 \compattikzset{zD-/.style = {\comnpatname stroke Zener diode}}
10466 \compattikzset{zzD-/.style = {\comnpatname stroke ZZener diode}}
10467 \compattikzset{sD-/.style = {\comnpatname stroke Schottky diode}}
10468 \compattikzset{pD-/.style = {\comnpatname stroke photodiode}}
10469 \compattikzset{leD-/.style = {\comnpatname stroke led}}
10470 \compattikzset{VC-/.style = {\comnpatname stroke varcap}}
10471 \compattikzset{Ty-/.style = {\comnpatname stroke thyristor}}
10472 \compattikzset{Tr-/.style = {\comnpatname empty triac}}%no stroke triac!
10473
10474 % % % % % %
10475 % % End of Diodes
10476 % % % % % %
10477
10478
10479 \compattikzset{memristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@memristor@path}}
10480 \compattikzset{closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cspst@path, l=#1}}
10481 \compattikzset{opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ospst@path, l=#1}}
10482 \compattikzset{switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@spst@path, l=#1}}
10483 \compattikzset{push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pushbutton@path, l=#1}}
10484 \compattikzset{toggle switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@toggleswitch@path}}
10485
10486 \compattikzset{ammeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ammeter@path}}
10487 \compattikzset{voltmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@voltmeter@path}}
10488 \compattikzset{ohmmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ohmmeter@path}}
10489
10490 % short forms
10491 \compattikzset{esource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@esource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10492 \compattikzset{pvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pvsource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10493 \compattikzset{dcvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dcvsource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10494 \compattikzset{dcisource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dcisource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10495
10496 \compattikzset{ioosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is current=true,/tikz/to path=\pgf@circ@oosource@path}}
10497 \compattikzset{voosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is voltage=true,/tikz/to path=\pgf@circ@oosource@path}}
10498
10499 \compattikzset{vsource/.style = {\comnpatname voltage source = #1}}
10500 \compattikzset{isource/.style = {\comnpatname current source = #1}}
10501 \compattikzset{cisource/.style = {\comnpatname controlled current source = #1}}
10502 \compattikzset{cvsource/.style = {\comnpatname controlled voltage source = #1}}
10503 \compattikzset{vsourcesin/.style = {\comnpatname sinusoidal voltage source = #1}}
10504 \compattikzset{vsourcesquare/.style = {\comnpatname square voltage source = #1}}
10505 \compattikzset{vsourcetri/.style = {triangle voltage source = #1}}
10506 \compattikzset{isourcesin/.style = {\comnpatname sinusoidal current source = #1}}
10507 \compattikzset{cisourcesin/.style = {\comnpatname controlled sinusoidal current source = #1}}
10508 \compattikzset{cvsourcesin/.style = {\comnpatname controlled sinusoidal voltage source = #1}}
10509
10510 \compattikzset{controlled vsource/.style = {\comnpatname controlled voltage source = #1}}
10511 \compattikzset{controlled isource/.style = {\comnpatname controlled current source = #1}}
10512 \compattikzset{controlled vsourcesin/.style = {\comnpatname controlled sinusoidal voltage source = #1}}
10513 \compattikzset{controlled isourcesin/.style = {\comnpatname controlled sinusoidal current source = #1}}
10514
10515 \compattikzset{R/.style= {\comnpatname resistor = #1}}
10516 %\ifpgf@circuit@compat\else\compattikzset{R/.style= {resistor = #1}}\fi
10517 \compattikzset{vR/.style= {\comnpatname variable resistor = #1}}
10518 \compattikzset{phR/.style= {\comnpatname photoresistor = #1}}
10519 \compattikzset{thR/.style= {\comnpatname thermistor = #1}}
10520 \compattikzset{thRp/.style= {\comnpatname thermistor ptc= #1}}
10521 \compattikzset{thRn/.style= {\comnpatname thermistor ntc= #1}}
10522 \compattikzset{pR/.style= {\comnpatname potentiometer = #1}}
10523 \compattikzset{C/.style = {\comnpatname capacitor = #1}}
10524 \compattikzset{eC/.style = {\comnpatname ecapacitor = #1}}
10525 \compattikzset{pC/.style = {\comnpatname polar capacitor = #1}}
10526 \compattikzset{vC/.style = {\comnpatname variable capacitor = #1}}
10527 \compattikzset{PZ/.style = {\comnpatname piezoelectric = #1}}
10528 \compattikzset{L/.style = {\comnpatname inductor = #1}}
10529 \compattikzset{vL/.style = {\comnpatname variable inductor = #1}}
10530 \compattikzset{V/.style = {\comnpatname voltage source = #1}}
10531 \compattikzset{cV/.style = {\comnpatname controlled voltage source = #1}}
10532 \compattikzset{sV/.style = {\comnpatname sinusoidal voltage source = #1}}
10533 \compattikzset{sqV/.style = {\comnpatname square voltage source = #1}}
10534 \compattikzset{tV/.style = {\comnpatname triangle voltage source = #1}}
10535 \compattikzset{csV/.style = {\comnpatname controlled sinusoidal voltage source = #1}}
10536 \def\pgf@temp#1{
10537 \compattikzset{V#1/.style = {\comnpatname voltage source, v#1=##1} }
10538 \compattikzset{cV#1/.style = {\comnpatname controlled voltage source, v#1=##1} }
10539 \compattikzset{sV#1/.style = {\comnpatname sinusoidal voltage source, v#1=##1} }
10540 \compattikzset{csV#1/.style = {\comnpatname controlled sinusoidal voltage source, v#1=##1} }
10541 }
10542 \pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<}
10543 \pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_}
10544 \compattikzset{I/.style = {\comnpatname current source = #1}}
10545 \compattikzset{cI/.style = {\comnpatname controlled current source = #1}}
10546 \compattikzset{sI/.style = {\comnpatname sinusoidal current source = #1}}
10547 \compattikzset{csI/.style = {\comnpatname controlled sinusoidal current source = #1}}
10548 \def\pgf@temp#1{
10549 \compattikzset{I#1/.style = {\comnpatname current source, i#1=##1} }
10550 \compattikzset{cI#1/.style = {\comnpatname controlled current source, i#1=##1} }
10551 \compattikzset{sI#1/.style = {\comnpatname sinusoidal current source, i#1=##1} }
10552 \compattikzset{csI#1/.style = {\comnpatname controlled sinusoidal current source, i#1=##1} }
10553 }
10554 \pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<}
10555 \pgf@temp{>_} \pgf@temp{<_} \pgf@temp{>^} \pgf@temp{<^}
10556 \pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_}
10557
10558
10559
10560 \compattikzset{Mr/.style = {\comnpatname memristor}}
10561
10562 \compattikzset{cspst/.style = {\comnpatname closing switch = #1}}
10563 \compattikzset{ospst/.style = {\comnpatname opening switch = #1}}
10564 \compattikzset{spst/.style = {\comnpatname switch = #1}}
10565
10566 \compattikzset{afuse/.style = {\comnpatname asymmetric fuse=#1}}
10567
10568 \compattikzset{vdd/.style = {\comnpatname vcc = #1}}
10569 \compattikzset{vss/.style = {\comnpatname vee = #1}}
10570
10571 \def\inheritlogicport#1#2{
10572 \pgfdeclareshape{#2 port}{
10573 \inheritsavedanchors[from=#1 #2 port]
10574 \inheritbackgroundpath[from=#1 #2 port]
10575 \inheritanchor[from=#1 #2 port]{in}
10576 \inheritanchor[from=#1 #2 port]{in 1}
10577 \inheritanchor[from=#1 #2 port]{in 2}
10578 \inheritanchor[from=#1 #2 port]{out}
10579 \inheritanchor[from=#1 #2 port]{center}
10580 \inheritanchor[from=#1 #2 port]{left}
10581 }
10582 }
10583
10584 \ifpgf@circuit@europeanlogicport
10585 \inheritlogicport{european}{and}
10586 \inheritlogicport{european}{or}
10587 \inheritlogicport{european}{xor}
10588 \inheritlogicport{european}{not}
10589 \inheritlogicport{european}{nand}
10590 \inheritlogicport{european}{nor}
10591 \inheritlogicport{european}{xnor}
10592 \else
10593 \inheritlogicport{american}{and}
10594 \inheritlogicport{american}{or}
10595 \inheritlogicport{american}{xor}
10596 \inheritlogicport{american}{not}
10597 \inheritlogicport{american}{nand}
10598 \inheritlogicport{american}{nor}
10599 \inheritlogicport{american}{xnor}
10600 \fi
10601
10602 % Transistor like bipoles
10603
10604 \def\pgf@circ@trans@path#1#2{
10605 \pgfextra{
10606 \edef\pgf@temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
10607 \def\pgf@circ@temp{#2}
10608 \ifx\pgf@temp\pgf@circ@temp % if it has not a name
10609 \pgfmathrandominteger{\pgf@circ@rand}{1000}{9999}
10610 \ctikzset{bipole/name = trans\pgf@circ@rand} % create it
10611 \fi
10612 }
10613 \ifpgf@circuit@bipole@inverted
10614 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
10615 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {}
10616 \else
10617 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
10618 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {}
10619 \fi
10620 \pgfextra{
10621 \pgf@circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
10622 {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
10623 \pgfmathadd{\pgfmathresult}{-90}
10624 \edef\pgf@circ@direction{\pgfmathresult}
10625 }
10626 ($(\tikztostart) ! .5 ! (\tikztotarget)$)
10627 node[#1, /tikz/rotate=\pgf@circ@direction, xscale=\ctikzvalof{mirror value}]
10628 (\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}}
10629 node[#1, /tikz/rotate=\pgf@circ@direction, xscale=\ctikzvalof{mirror value}]
10630 (\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/value/name}}
10631 \ifcsname pgf@anchor@#1@pathstart\endcsname%if special path-anchors are defined, use them!
10632 (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.pathstart)
10633 (\ctikzvalof{bipole/name}.pathend) -- (\ctikzvalof{bipole/name}end.center)
10634 \else
10635 (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.left)
10636 (\ctikzvalof{bipole/name}.right) -- (\ctikzvalof{bipole/name}end.center)
10637 \fi
10638 \pgfextra{
10639 \pgfcircresetpath
10640 }
10641 (\tikztotarget) \tikztonodes % e si continua
10642 }
10643
10644
10645 \def\pgf@circ@definetranspath#1{
10646 \compattikzset{T#1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@trans@path{#1}{}, l=##1}}
10647 }
10648
10649 \pgf@circ@definetranspath{elmech}
10650 \pgf@circ@definetranspath{nmos}
10651 \pgf@circ@definetranspath{pmos}
10652 \pgf@circ@definetranspath{npn}
10653 \pgf@circ@definetranspath{pnp}
10654 \pgf@circ@definetranspath{nfet}
10655 \pgf@circ@definetranspath{nigfete}
10656 \pgf@circ@definetranspath{nigfetd}
10657 \pgf@circ@definetranspath{nigfetebulk}
10658 \pgf@circ@definetranspath{pfet}
10659 \pgf@circ@definetranspath{pigfete}
10660 \pgf@circ@definetranspath{pigfetd}
10661 \pgf@circ@definetranspath{pigfetebulk}
10662 \pgf@circ@definetranspath{njfet}
10663 \pgf@circ@definetranspath{pjfet}
10664 \pgf@circ@definetranspath{pigbt}
10665 \pgf@circ@definetranspath{nigbt}
10666 \pgf@circ@definetranspath{Lpigbt}
10667 \pgf@circ@definetranspath{Lnigbt}%%%---------- close: tex/pgfcircpath
10668
10669 \ifpgf@circ@siunitx
10670 \RequirePackage{xstring}[2009/03/13]
10671 %\expandafter\let\csname angstrom\endcsname\relax
10672 \RequirePackage{siunitx}
10673 \fi
10674
10675
10676
10677 \newenvironment{circuitikz}{\begin{tikzpicture}}{\end{tikzpicture}}
10678 %override (unused) circuitikz environment for compability to externalization)
10679 \let\circuitikz\tikzpicture
10680 \let\endcircuitikz\endtikzpicture
10681
10682 \endinput