Debian Codegraph @

texmf-dist/tex/latex/circuitikz/circuitikz-0.6-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.6}
24 \def\pgfcircversiondate{2016/06/06}
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{americanvoltage}{
39 \ctikzset{voltage=american}
40 }
41
42 \DeclareOption{europeancurrent}{
43 \ctikzset{current = european}
44 }
45
46 \DeclareOption{americancurrent}{
47 \ctikzset{current = american}
48 }
49
50 \DeclareOption{europeanvoltage}{
51 \ctikzset{voltage = european}
52 }
53
54 \DeclareOption{americanresistor}{
55 \ctikzset{resistor = american}
56 }
57
58 \DeclareOption{europeanresistor}{
59 \ctikzset{resistor = european}
60 }
61
62 \DeclareOption{americaninductor}{
63 \ctikzset{inductor = american}
64 }
65
66 \DeclareOption{europeaninductor}{
67 \ctikzset{inductor = european}
68 }
69
70 \DeclareOption{cuteinductor}{
71 \ctikzset{inductor = cute}
72 }
73
74 \DeclareOption{americanport}{
75 \ctikzset{logic ports = american}
76 }
77
78 \DeclareOption{europeanport}{
79 \ctikzset{logic ports = european}
80 }
81
82 \DeclareOption{europeanport}{
83 \ctikzset{logic ports = european}
84 }
85
86 \DeclareOption{european}{
87 \ctikzset{voltage=european} \ctikzset{current=european} \ctikzset{inductor=european}
88 \ctikzset{resistor=european} \ctikzset{logic ports=european} \ctikzset{gas filled surge arrester = european}
89 }
90
91 \DeclareOption{american}{
92 \ctikzset{voltage=american} \ctikzset{current=american} \ctikzset{resistor=american} \ctikzset{inductor=american} \ctikzset{gas filled surge arrester = american}
93 \ctikzset{logic ports = american}
94 }
95
96 \DeclareOption{fulldiodes}{
97 \ctikzset{diode = full}
98 }
99
100 \DeclareOption{emptydiodes}{
101 \ctikzset{diode = empty}
102 }
103
104 \DeclareOption{europeanvoltages}{
105 \ctikzset{voltage=european}
106 }
107
108 \DeclareOption{americanvoltages}{
109 \ctikzset{voltage=american}
110 }
111
112 \DeclareOption{europeancurrents}{
113 \ctikzset{current = european}
114 }
115
116 \DeclareOption{americancurrents}{
117 \ctikzset{current = american}
118 }
119
120 \DeclareOption{europeanvoltages}{
121 \ctikzset{voltage = european}
122 }
123
124 \DeclareOption{americanresistors}{
125 \ctikzset{resistor = american}
126 }
127
128 \DeclareOption{europeanresistors}{
129 \ctikzset{resistor = european}
130 }
131
132 \DeclareOption{americaninductors}{
133 \ctikzset{inductor = american}
134 }
135
136 \DeclareOption{europeaninductors}{
137 \ctikzset{inductor = european}
138 }
139
140 \DeclareOption{cuteinductors}{
141 \ctikzset{inductor = cute}
142 }
143
144 \DeclareOption{americanports}{
145 \ctikzset{logic ports = american}
146 }
147
148 \DeclareOption{europeanports}{
149 \ctikzset{logic ports = european}
150 }
151
152 \DeclareOption{americangfsurgearrester}{
153 \ctikzset{gas filled surge arrester = american}
154 }
155
156 \DeclareOption{europeangfsurgearrester}{
157 \ctikzset{gas filled surge arrester = european}
158 }
159
160 \DeclareOption{siunitx}{
161 \pgf@circ@siunitxtrue
162 }
163
164 \DeclareOption{nosiunitx}{
165 \pgf@circ@siunitxfalse
166 }
167
168 \DeclareOption{fulldiode}{
169 \ctikzset{diode = full}
170 }
171
172 \DeclareOption{emptydiode}{
173 \ctikzset{diode = empty}
174 }
175
176 \DeclareOption{strokediode}{
177 \ctikzset{diode = stroke}
178 }
179
180 \DeclareOption{arrowmos}{
181 \pgf@circuit@mos@arrowstrue
182 }
183
184 \DeclareOption{noarrowmos}{
185 \pgf@circuit@mos@arrowsfalse
186 }
187
188 \DeclareOption{fetbodydiode}{
189 \pgf@circuit@fet@bodydiodetrue
190 }
191
192 \DeclareOption{nofetbodydiode}{
193 \pgf@circuit@fet@bodydiodefalse
194 }
195
196 \DeclareOption{fetsolderdot}{
197 \pgf@circuit@fet@solderdottrue
198 }
199
200 \DeclareOption{nofetsolderdot}{
201 \pgf@circuit@fet@solderdotfalse
202 }
203
204 \DeclareOption{emptypmoscircle}{
205 \pgf@circuit@pmos@emptycircletrue
206 }
207
208
209 \DeclareOption{lazymos}{
210 \ctikzset{tripoles/nmos/width=.5}
211 \ctikzset{tripoles/nmos/gate height=.35}
212 \ctikzset{tripoles/nmos/base height=.35}
213 \ctikzset{tripoles/nmos/height/.initial=1.2}
214 \ctikzset{tripoles/nmos/base width=.5}
215 \ctikzset{tripoles/nmos/gate width=.65}
216
217 \ctikzset{tripoles/pmos/width=.5}
218 \ctikzset{tripoles/pmos/gate height=.35}
219 \ctikzset{tripoles/pmos/base height=.35}
220 \ctikzset{tripoles/pmos/height/.initial=1.2}
221 \ctikzset{tripoles/pmos/base width=.5}
222 \ctikzset{tripoles/pmos/gate width=.65}
223
224 \pgf@circuit@pmos@emptycircletrue
225 }
226
227 \DeclareOption{straightlabels}{
228 \ctikzset{label/align = straight}
229 }
230
231 \DeclareOption{rotatelabels}{
232 \ctikzset{label/align = rotate}
233 }
234
235 \DeclareOption{smartlabels}{
236 \ctikzset{label/align = smart}
237 }
238
239 \DeclareOption{compatibility}{
240 \pgf@circuit@compattrue
241 }
242
243 \DeclareOption{oldvoltagedirection}{
244 \pgf@circ@oldvoltagedirectiontrue
245 }
246 \DeclareOption{nooldvoltagedirection}{
247 \pgf@circ@oldvoltagedirectionfalse
248 }
249
250 \DeclareOption{betterproportions}{
251 \ctikzset{monopoles/ground/width/.initial=.15}
252
253 \ctikzset{bipoles/resistor/height/.initial=.23}
254 \ctikzset{bipoles/resistor/width/.initial=.6}
255 \ctikzset{bipoles/capacitor/height/.initial=.4}
256 \ctikzset{bipoles/capacitor/width/.initial=.1}
257 \ctikzset{bipoles/potentiometer/height/.initial=.6}
258 \ctikzset{bipoles/potentiometer/height 2/.initial=.23}
259 \ctikzset{bipoles/potentiometer/width/.initial=.6}
260 \ctikzset{bipoles/photoresistor/height/.initial=.6}
261 \ctikzset{bipoles/photoresistor/height 2/.initial=.23}
262 \ctikzset{bipoles/photoresistor/width/.initial=.6}
263 \ctikzset{bipoles/thermistor/main/.initial=.7}
264 \ctikzset{bipoles/thermistor/height/.initial=.328}%.23/.7
265 \ctikzset{bipoles/thermistor/width/.initial=.6}
266 \ctikzset{bipoles/thermistorntc/width/.initial=.6}
267 \ctikzset{bipoles/thermistorntc/main/.initial=.7}
268 \ctikzset{bipoles/thermistorntc/height/.initial=.328}%.23/.7
269 \ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.23/.7
270 \ctikzset{bipoles/thermistorptc/width/.initial=.6}
271 \ctikzset{bipoles/thermistorptc/main/.initial=.7}
272 \ctikzset{bipoles/thermistorptc/height/.initial=.328}%.23/.7
273 \ctikzset{bipoles/varistor/main/.initial=.7}
274 \ctikzset{bipoles/varistor/height/.initial=.328}%.23/.7
275 \ctikzset{bipoles/varistor/width/.initial=.6}
276 \ctikzset{bipoles/vresistor/height/.initial=.45}
277 \ctikzset{bipoles/vresistor/width/.initial=.6}
278 \ctikzset{bipoles/generic/height/.initial=.23}
279 \ctikzset{bipoles/generic/width/.initial=.6}
280 \ctikzset{bipoles/generic potentiometer/height/.initial=.6}
281 \ctikzset{bipoles/generic potentiometer/height 2/.initial=.23}
282 \ctikzset{bipoles/generic potentiometer/width/.initial=.6}
283 \ctikzset{bipoles/ageneric/height/.initial=.23}
284 \ctikzset{bipoles/ageneric/width/.initial=.6}
285 \ctikzset{bipoles/memristor/height/.initial=.23}
286 \ctikzset{bipoles/memristor/wave height/.initial=.375}
287 \ctikzset{bipoles/memristor/width/.initial=.60}
288 \ctikzset{bipoles/tgeneric/height/.initial=.525}
289 \ctikzset{bipoles/tgeneric/width/.initial=.6}
290 \ctikzset{bipoles/tfullgeneric/height/.initial=.525}
291 \ctikzset{bipoles/tfullgeneric/width/.initial=.60}
292 \ctikzset{bipoles/fullgeneric/height/.initial=.23}
293 \ctikzset{bipoles/fullgeneric/width/.initial=.6}
294 \ctikzset{bipoles/diode/height/.initial=.3}
295 \ctikzset{bipoles/diode/width/.initial=.25}
296
297 \ctikzset{tripoles/thyristor/height/.initial=.66}
298 \ctikzset{tripoles/thyristor/height 2/.initial=.3}
299 \ctikzset{tripoles/thyristor/width/.initial=.6}
300 \ctikzset{tripoles/thyristor/diode height/.initial=.3}
301 \ctikzset{tripoles/thyristor/diode width left/.initial=.4}
302 \ctikzset{tripoles/thyristor/diode width right/.initial=.3}
303
304 \ctikzset{tripoles/triac/height/.initial=.66}
305 \ctikzset{tripoles/triac/width/.initial=.6}
306 \ctikzset{tripoles/triac/diode width left/.initial=.3}
307 \ctikzset{tripoles/triac/diode width right/.initial=.3}
308 }
309
310 %%%%%%%%%
311 %%%%%%%%%%% Springe nach tex/pgfcirc.defines
312 %%%---------- open: tex/pgfcirc.defines.tex
313
314 %% Options
315
316 %%%%%%%%%%%%
317 %% Dimensions
318
319 % coordinates
320 \newdimen\pgf@circ@res@up
321 \newdimen\pgf@circ@res@down
322 \newdimen\pgf@circ@res@zero
323 \newdimen\pgf@circ@res@left
324 \newdimen\pgf@circ@res@right
325 \newdimen\pgf@circ@res@other
326 \newdimen\pgf@circ@res@step
327 \newdimen\pgf@circ@res@temp
328 % inital thickness
329 \newdimen \pgfstartlinewidth
330 %% Keys
331
332 \long\def\pgf@circ@comment#1{}
333
334 \def\circuitikzbasekey{/tikz/circuitikz}
335
336 \pgfkeys{\circuitikzbasekey/.is family}
337
338 \def\circuitikzset#1{\pgfkeys{\circuitikzbasekey,#1}}
339 \let\ctikzset\circuitikzset
340 \def\ctikzvalof#1{\pgfkeysvalueof{\circuitikzbasekey/#1}}
341 \def\ctikzsetvalof#1#2{\pgfkeyssetvalue{\circuitikzbasekey/#1}{#2}}
342
343 \newif\ifpgf@circ@siunitx
344 \newif\ifpgf@circuit@compat
345 \newif\ifpgf@circ@oldvoltagedirection
346
347 % Option ">" for twoports
348 \newif\ifpgf@circuit@inputarrow
349 \ctikzset{>/.add code={}{\pgf@circuit@inputarrowtrue}}
350 \ctikzset{inputarrow/.is choice}
351 \ctikzset{inputarrow/true/.code={\pgf@circuit@inputarrowtrue}}
352 \ctikzset{inputarrow/false/.code={\pgf@circuit@inputarrowfalse}}
353
354 % Option "boxed" for nodes and twoports
355 \newif\ifpgf@circuit@boxed
356 \pgfkeys{/tikz/boxed/.add code={}{\pgf@circuit@boxedtrue}}
357 \ctikzset{boxed/.add code={}{\pgf@circuit@boxedtrue}}
358 \pgfkeys{/tikz/box/.add code={}{\pgf@circuit@boxedtrue}}
359 \ctikzset{box/.add code={}{\pgf@circuit@boxedtrue}}
360
361 % Option "dashed" for nodes and twoports
362 \newif\ifpgf@circuit@dashed
363 \pgfkeys{/tikz/dashed/.add code={}{\pgf@circuit@dashedtrue}}
364 \ctikzset{dashed/.add code={}{\pgf@circuit@dashedtrue}}
365
366 % Option "t=*" for nodes
367 \pgfkeys{/tikz/t/.add code={}{\ctikzset{text=#1}}}
368
369
370
371 \ctikzset{bipoles/.is family}
372 \ctikzset{bipoles/border margin/.initial=1.1}
373 \ctikzset{bipoles/thickness/.initial=2}
374 \ctikzset{bipoles/length/.initial=1.4cm}
375 \ctikzset{nodes width/.initial=.04}
376 \newdimen\pgf@circ@Rlen
377 \ctikzset{bipoles/length/.code={\pgf@circ@Rlen = #1}}
378
379 \ctikzset{monopoles/.is family}
380 \ctikzset{monopoles/ground/width/.initial=.25}
381 \ctikzset{monopoles/tground/thickness/.initial=3}
382 \ctikzset{monopoles/vcc/width/.initial=.2}
383 \ctikzset{monopoles/match/width/.initial=.4}
384 \ctikzset{monopoles/chassis/width/.initial=.25}
385 \ctikzset{monopoles/alternative chassis/width/.initial=.25}
386 \ctikzset{monopoles/equipotentiality/width/.initial=.25}
387 \ctikzset{monopoles/tlinestub/width/.initial=.25}
388 \ctikzset{monopoles/antenna/width/.initial=.25}
389 \ctikzset{monopoles/antenna/label/xanchor/.initial=.4}
390 \ctikzset{monopoles/antenna/label/yanchor/.initial=.75}
391 \ctikzset{monopoles/txantenna/label/xanchor/.initial=.4}
392 \ctikzset{monopoles/txantenna/label/yanchor/.initial=.75}
393 \ctikzset{monopoles/txantenna/width/.initial=.25}
394 \ctikzset{monopoles/rxantenna/label/xanchor/.initial=.4}
395 \ctikzset{monopoles/rxantenna/label/yanchor/.initial=.75}
396 \ctikzset{monopoles/rxantenna/width/.initial=.25}
397
398 \ctikzset{bipoles/resistor/height/.initial=.3}
399 \ctikzset{bipoles/resistor/width/.initial=.8}
400 \ctikzset{bipoles/potentiometer/height/.initial=.8}
401 \ctikzset{bipoles/potentiometer/height 2/.initial=.3}
402 \ctikzset{bipoles/potentiometer/width/.initial=.8}
403 \ctikzset{bipoles/photoresistor/height/.initial=.6}
404 \ctikzset{bipoles/photoresistor/height 2/.initial=.3}
405 \ctikzset{bipoles/photoresistor/width/.initial=.8}
406 \ctikzset{bipoles/thermistor/main/.initial=.7}
407 \ctikzset{bipoles/thermistor/height/.initial=.428}%.3/.7
408 \ctikzset{bipoles/thermistorntc/width/.initial=.8}
409 \ctikzset{bipoles/thermistorntc/main/.initial=.7}
410 \ctikzset{bipoles/thermistorntc/height/.initial=.428}%.3/.7
411 \ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.3/.7
412 \ctikzset{bipoles/thermistorptc/width/.initial=.8}
413 \ctikzset{bipoles/thermistorptc/main/.initial=.7}
414 \ctikzset{bipoles/thermistorptc/height/.initial=.428}%.3/.7
415 \ctikzset{bipoles/thermistorptc/height 2/.initial=.75}%.3/.7
416 \ctikzset{bipoles/thermistor/width/.initial=.8}
417 \ctikzset{bipoles/varistor/main/.initial=.7}
418 \ctikzset{bipoles/varistor/height/.initial=.428}%.3/.7
419 \ctikzset{bipoles/varistor/width/.initial=.8}
420 \ctikzset{bipoles/vresistor/height/.initial=.6}
421 \ctikzset{bipoles/vresistor/width/.initial=.8}
422 \ctikzset{bipoles/cuteinductor/height/.initial=.3}
423 \ctikzset{bipoles/cuteinductor/lower coil height/.initial=.15}
424 \ctikzset{bipoles/cuteinductor/width/.initial=.6}
425 \ctikzset{bipoles/cuteinductor/coils/.initial=5}
426 \ctikzset{bipoles/cuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
427 \ctikzset{bipoles/americaninductor/height/.initial=.3}
428 \ctikzset{bipoles/americaninductor/height 2/.initial=.1}
429 \ctikzset{bipoles/americaninductor/width/.initial=.8}
430 \ctikzset{bipoles/americaninductor/coils/.initial=4}
431 \ctikzset{bipoles/americaninductor/coil height/.initial=.15}
432 \ctikzset{bipoles/vcuteinductor/height/.initial=.6}
433 \ctikzset{bipoles/vcuteinductor/lower coil height/.initial=.3}
434 \ctikzset{bipoles/vcuteinductor/width/.initial=.6}
435 \ctikzset{bipoles/vcuteinductor/coils/.initial=5}
436 \ctikzset{bipoles/vcuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
437 \ctikzset{bipoles/vamericaninductor/height/.initial=.6}
438 \ctikzset{bipoles/vamericaninductor/height 2/.initial=.2}
439 \ctikzset{bipoles/vamericaninductor/width/.initial=.8}
440 \ctikzset{bipoles/vamericaninductor/coils/.initial=4}
441 \ctikzset{bipoles/vamericaninductor/coil height/.initial=.15}
442 \ctikzset{bipoles/esource/height/.initial=.60}
443 \ctikzset{bipoles/esource/width/.initial=.60}
444 \ctikzset{bipoles/pvsource/height/.initial=.60}
445 \ctikzset{bipoles/pvsource/width/.initial=.60}
446 \ctikzset{bipoles/isource/height/.initial=.60}
447 \ctikzset{bipoles/isource/width/.initial=.60}
448 \ctikzset{bipoles/oosource/height/.initial=.60}
449 \ctikzset{bipoles/oosource/width/.initial=.60}
450 \ctikzset{bipoles/oosource/circlesize/.initial=.65}%circlesize+circleoffset should be =1
451 \ctikzset{bipoles/oosource/circleoffset/.initial=.35}%circlesize+circleoffset should be =1
452 \ctikzset{bipoles/dcisource/height/.initial=.60}
453 \ctikzset{bipoles/dcisource/width/.initial=.60}
454 \ctikzset{bipoles/dcvsource/height/.initial=.60}
455 \ctikzset{bipoles/dcvsource/width/.initial=.60}
456 \ctikzset{bipoles/vsourcetri/height/.initial=.60}
457 \ctikzset{bipoles/vsourcetri/width/.initial=.60}
458 \ctikzset{bipoles/isourceam/height/.initial=.60}
459 \ctikzset{bipoles/isourceam/width/.initial=.60}
460 \ctikzset{bipoles/vsource/height/.initial=.60}
461 \ctikzset{bipoles/vsource/width/.initial=.60}
462 \ctikzset{bipoles/vsourceam/height/.initial=.60}
463 \ctikzset{bipoles/vsourceam/width/.initial=.60}
464 \ctikzset{bipoles/vsourceam/margin/.initial=.7}
465 \ctikzset{bipoles/isourcesin/height/.initial=.60}
466 \ctikzset{bipoles/isourcesin/width/.initial=.60}
467 \ctikzset{bipoles/vsourcesin/height/.initial=.60}
468 \ctikzset{bipoles/vsourcesin/width/.initial=.60}
469 \ctikzset{bipoles/vsourcesquare/height/.initial=.60}
470 \ctikzset{bipoles/vsourcesquare/width/.initial=.60}
471 \ctikzset{bipoles/cisource/height/.initial=.7}
472 \ctikzset{bipoles/cisource/width/.initial=.7}
473 \ctikzset{bipoles/cisourceam/height/.initial=.7}
474 \ctikzset{bipoles/cisourceam/width/.initial=.7}
475 \ctikzset{bipoles/cvsource/height/.initial=.7}
476 \ctikzset{bipoles/cvsource/width/.initial=.7}
477 \ctikzset{bipoles/cvsourceam/height/.initial=.7}
478 \ctikzset{bipoles/cvsourceam/width/.initial=.7}
479 \ctikzset{bipoles/cvsourceam/margin/.initial=.7}
480 \ctikzset{bipoles/cvsourceam/text scale/.initial=1}
481 \ctikzset{bipoles/cisourcesin/width/.initial=.7}
482 \ctikzset{bipoles/cvsourcesin/height/.initial=.7}
483 \ctikzset{bipoles/cvsourcesin/width/.initial=.7}
484 \ctikzset{bipoles/capacitor/height/.initial=.6}
485 \ctikzset{bipoles/capacitor/width/.initial=.2}
486 \ctikzset{bipoles/ecapacitor/height/.initial=.5}
487 \ctikzset{bipoles/ecapacitor/width/.initial=.2}
488 \ctikzset{bipoles/ecapacitor/font/.initial= \fontsize{6}{0}\selectfont\boldmath}
489 \ctikzset{bipoles/pcapacitor/height/.initial=.6}
490 \ctikzset{bipoles/pcapacitor/width/.initial=.2}
491 \ctikzset{bipoles/pcapacitor/bend width/.initial=1.1}
492 \ctikzset{bipoles/vcapacitor/height/.initial=.6}
493 \ctikzset{bipoles/vcapacitor/width/.initial=.5}
494 \ctikzset{bipoles/vcapacitor/capacitor width/.initial=.4}
495 \ctikzset{bipoles/piezoelectric/height/.initial=.7}
496 \ctikzset{bipoles/piezoelectric/width/.initial=.5}
497 \ctikzset{bipoles/battery/height/.initial=.6}
498 \ctikzset{bipoles/battery/width/.initial=.3}
499 \ctikzset{bipoles/battery1/height/.initial=.6}
500 \ctikzset{bipoles/battery1/width/.initial=.3}
501 \ctikzset{bipoles/diode/height/.initial=.50}
502 \ctikzset{bipoles/diode/width/.initial=.40}
503 \ctikzset{bipoles/varcap/height/.initial=.50}
504 \ctikzset{bipoles/varcap/width/.initial=.45}
505 \ctikzset{bipoles/interr/height/.initial=.35}
506 \ctikzset{bipoles/interr/width/.initial=.35}
507 \ctikzset{bipoles/interr/height 2/.initial=.1}
508 \ctikzset{bipoles/generic/height/.initial=.30}
509 \ctikzset{bipoles/generic/width/.initial=.80}
510 \ctikzset{bipoles/european gas filled surge arrester/height/.initial=.30}
511 \ctikzset{bipoles/european gas filled surge arrester/width/.initial=.80}
512 \ctikzset{bipoles/european gas filled surge arrester/inside/.initial=.30}
513 \ctikzset{bipoles/american gas filled surge arrester/height/.initial=.60}
514 \ctikzset{bipoles/american gas filled surge arrester/width/.initial=.60}
515 \ctikzset{bipoles/american gas filled surge arrester/inside/.initial=.15}
516 \ctikzset{bipoles/american gas filled surge arrester/dot x/.initial=.25}
517 \ctikzset{bipoles/american gas filled surge arrester/dot y/.initial=.45}
518 \ctikzset{bipoles/american gas filled surge arrester/size/.initial=.1}
519 \ctikzset{bipoles/fuse/height/.initial=.20}
520 \ctikzset{bipoles/fuse/width/.initial=.50}
521 \ctikzset{bipoles/afuse/height/.initial=.20}
522 \ctikzset{bipoles/afuse/width/.initial=.50}
523 \ctikzset{bipoles/generic potentiometer/height/.initial=.80}
524 \ctikzset{bipoles/generic potentiometer/height 2/.initial=.30}
525 \ctikzset{bipoles/generic potentiometer/width/.initial=.80}
526 \ctikzset{bipoles/ageneric/height/.initial=.30}
527 \ctikzset{bipoles/ageneric/width/.initial=.80}
528 \ctikzset{bipoles/memristor/height/.initial=.30}
529 \ctikzset{bipoles/memristor/wave height/.initial=.5}
530 \ctikzset{bipoles/memristor/width/.initial=.80}
531 \ctikzset{bipoles/tgeneric/height/.initial=.70}
532 \ctikzset{bipoles/tgeneric/width/.initial=.80}
533 \ctikzset{bipoles/tfullgeneric/height/.initial=.70}
534 \ctikzset{bipoles/tfullgeneric/width/.initial=.80}
535 \ctikzset{bipoles/fullgeneric/height/.initial=.30}
536 \ctikzset{bipoles/fullgeneric/width/.initial=.80}
537 \ctikzset{bipoles/open/height/.initial=.25}
538 \ctikzset{bipoles/open/width/.initial=.8}
539 \ctikzset{bipoles/ammeter/height/.initial=.60}
540 \ctikzset{bipoles/ammeter/width/.initial=.60}
541 \ctikzset{bipoles/ohmmeter/height/.initial=.60}
542 \ctikzset{bipoles/ohmmeter/width/.initial=.60}
543 \ctikzset{bipoles/voltmeter/height/.initial=.60}
544 \ctikzset{bipoles/voltmeter/width/.initial=.60}
545 \ctikzset{bipoles/buffer/height/.initial=1}
546 \ctikzset{bipoles/buffer/width/.initial=1}
547 \ctikzset{bipoles/not port/width/.initial=1}
548 \ctikzset{bipoles/not port/height/.initial=.8}
549 \ctikzset{bipoles/not port/circle width/.initial=.15}
550 \ctikzset{bipoles/lamp/height/.initial=.60}
551 \ctikzset{bipoles/lamp/width/.initial=.60}
552 \ctikzset{bipoles/tline/height/.initial=.3}
553 \ctikzset{bipoles/tline/width/.initial=.8}
554 \ctikzset{bipoles/squid/height/.initial=.60}
555 \ctikzset{bipoles/squid/width/.initial=.60}
556 \ctikzset{bipoles/barrier/height/.initial=.60}
557 \ctikzset{bipoles/barrier/width/.initial=.60}
558 \ctikzset{bipoles/thermocouple/height/.initial=.250}
559 \ctikzset{bipoles/thermocouple/height 2/.initial=.60}
560 \ctikzset{bipoles/thermocouple/width/.initial=.140}
561 \ctikzset{bipoles/pushbutton/height/.initial=.5}
562 \ctikzset{bipoles/pushbutton/height 2/.initial=.0}
563 \ctikzset{bipoles/pushbutton/width/.initial=.50}
564
565 \ctikzset{bipoles/twoport/width/.initial=.7}
566 \ctikzset{bipoles/twoport/height/.initial=.7}
567 \ctikzset{bipoles/twoport/text/.initial=}
568 \ctikzset{bipoles/vco/width/.initial=.7}
569 \ctikzset{bipoles/bandpass/width/.initial=.7}
570 \ctikzset{bipoles/highpass/width/.initial=.7}
571 \ctikzset{bipoles/lowpass/width/.initial=.7}
572 \ctikzset{bipoles/adc/width/.initial=.7}
573 \ctikzset{bipoles/dac/width/.initial=.7}
574 \ctikzset{bipoles/dsp/width/.initial=.7}
575 \ctikzset{bipoles/fft/width/.initial=.7}
576 \ctikzset{bipoles/amp/width/.initial=.7}
577 \ctikzset{bipoles/vamp/width/.initial=.7}
578 \ctikzset{bipoles/piattenuator/width/.initial=.7}
579 \ctikzset{bipoles/vpiattenuator/width/.initial=.7}
580 \ctikzset{bipoles/tattenuator/width/.initial=.7}
581 \ctikzset{bipoles/vtattenuator/width/.initial=.7}
582 \ctikzset{bipoles/phaseshifter/width/.initial=.7}
583 \ctikzset{bipoles/vphaseshifter/width/.initial=.7}
584 \ctikzset{bipoles/detector/width/.initial=.7}
585
586
587 \newif\ifpgf@circuit@trans@depletiontype
588 \pgf@circuit@trans@depletiontypefalse
589
590 \newif\ifpgf@circuit@mos@arrows
591 \ctikzset{tripoles/mos style/.is choice}
592 \ctikzset{tripoles/mos style/no arrows/.code={\pgf@circuit@mos@arrowsfalse}}
593 \ctikzset{tripoles/mos style/arrows/.code={\pgf@circuit@mos@arrowstrue}}
594
595 % Option solderdot for fet
596 \newif\ifpgf@circuit@fet@solderdot
597 \pgfkeys{/tikz/solderdot/.add code={}{\pgf@circuit@fet@solderdottrue}}
598 \ctikzset{solderdot/.add code={}{\pgf@circuit@fet@solderdottrue}}
599 \pgfkeys{/tikz/nosolderdot/.add code={}{\pgf@circuit@fet@solderdotfalse}}
600 \ctikzset{nosolderdot/.add code={}{\pgf@circuit@fet@solderdotfalse}}
601
602 % Option bodydiode for fet
603 \newif\ifpgf@circuit@fet@bodydiode
604 \pgfkeys{/tikz/bodydiode/.add code={}{\pgf@circuit@fet@bodydiodetrue}}
605 \ctikzset{bodydiode/.add code={}{\pgf@circuit@fet@bodydiodetrue}}
606 \pgfkeys{/tikz/nobodydiode/.add code={}{\pgf@circuit@fet@bodydiodefalse}}
607 \ctikzset{nobodydiode/.add code={}{\pgf@circuit@fet@bodydiodefalse}}
608
609 % Option draw fet without gate connection
610 \newif\ifpgf@circuit@bpt@drawgate
611 \pgf@circuit@bpt@drawgatetrue
612 \pgfkeys{/tikz/nogate/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
613 \ctikzset{nogate/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
614 \pgfkeys{/tikz/nobase/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
615 \ctikzset{nobase/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
616
617 % Option draw bpt without base connection
618 \newif\ifpgf@circuit@bpt@drawbase
619 \pgf@circuit@bpt@drawbasetrue
620 \pgfkeys{/tikz/nobase/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
621 \ctikzset{nobase/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
622 \pgfkeys{/tikz/nogate/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
623 \ctikzset{nogate/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
624
625 % Option draw bpt with optical input
626 \newif\ifpgf@circuit@bpt@drawphoto
627 \pgf@circuit@bpt@drawphotofalse
628 \pgfkeys{/tikz/photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
629 \ctikzset{photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
630 \pgfkeys{/tikz/photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
631 \ctikzset{photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
632
633 % Option draw pmos with empty circle
634 \newif\ifpgf@circuit@pmos@emptycircle
635 \newif\ifpgf@circuit@pmos@emptycircle
636 \pgf@circuit@pmos@emptycirclefalse
637 \pgfkeys{/tikz/emptycircle/.add code={}{\pgf@circuit@pmos@emptycircletrue}}
638 \ctikzset{tripoles/pmos style/emptycircle/.add code={}{\pgf@circuit@pmos@emptycircletrue}}
639
640
641 \newif\ifpgf@circuit@trans@ntype
642 \pgf@circuit@trans@ntypetrue %default true
643 %\newif\ifpgf@circuit@trans@ptype
644 %\ctikzset{tripoles/nmos/.add code={\pgf@circuit@trans@ntypetrue}}
645 \ctikzset{tripoles/nmos/width/.initial=.7}
646 \ctikzset{tripoles/nmos/gate height/.initial=.35}
647 \ctikzset{tripoles/nmos/base height/.initial=.5}
648 \ctikzset{tripoles/nmos/conn height/.initial=0}
649 \ctikzset{tripoles/nmos/height/.initial=1.1}
650 \ctikzset{tripoles/nmos/base width/.initial=.5}
651 \ctikzset{tripoles/nmos/gate width/.initial=.62}
652 \ctikzset{tripoles/nmos/bodydiode scale/.initial=.3}
653 \ctikzset{tripoles/nmos/bodydiode distance/.initial=.3}
654 \ctikzset{tripoles/nmos/bodydiode conn/.initial=.6}
655 \ctikzset{tripoles/nmos/curr direction/.initial=1}
656
657 \ctikzset{tripoles/pmos/width/.initial=.7}
658 \ctikzset{tripoles/pmos/gate height/.initial=.35}
659 \ctikzset{tripoles/pmos/base height/.initial=.5}
660 \ctikzset{tripoles/pmos/conn height/.initial=0}
661 \ctikzset{tripoles/pmos/height/.initial=1.1}
662 \ctikzset{tripoles/pmos/base width/.initial=.5}
663 \ctikzset{tripoles/pmos/gate width/.initial=.62}
664 \ctikzset{tripoles/pmos/bodydiode scale/.initial=.3}
665 \ctikzset{tripoles/pmos/bodydiode distance/.initial=.3}
666 \ctikzset{tripoles/pmos/bodydiode conn/.initial=.6}
667 \ctikzset{tripoles/pmos/curr direction/.initial=-1}
668
669 \ctikzset{tripoles/nfet/width/.initial=.7}
670 \ctikzset{tripoles/nfet/gate height/.initial=.35}
671 \ctikzset{tripoles/nfet/base height/.initial=.5}
672 \ctikzset{tripoles/nfet/conn height/.initial=0}
673 \ctikzset{tripoles/nfet/height/.initial=1.1}
674 \ctikzset{tripoles/nfet/base width/.initial=.5}
675 \ctikzset{tripoles/nfet/gate width/.initial=.62}
676 \ctikzset{tripoles/nfet/bodydiode scale/.initial=.3}
677 \ctikzset{tripoles/nfet/bodydiode distance/.initial=.3}
678 \ctikzset{tripoles/nfet/bodydiode conn/.initial=.6}
679 \ctikzset{tripoles/nfet/curr direction/.initial=1}
680
681 \ctikzset{tripoles/pfet/width/.initial=.7}
682 \ctikzset{tripoles/pfet/gate height/.initial=.35}
683 \ctikzset{tripoles/pfet/base height/.initial=.5}
684 \ctikzset{tripoles/pfet/conn height/.initial=0}
685 \ctikzset{tripoles/pfet/height/.initial=1.1}
686 \ctikzset{tripoles/pfet/base width/.initial=.5}
687 \ctikzset{tripoles/pfet/gate width/.initial=.62}
688 \ctikzset{tripoles/pfet/bodydiode scale/.initial=.3}
689 \ctikzset{tripoles/pfet/bodydiode distance/.initial=.3}
690 \ctikzset{tripoles/pfet/bodydiode conn/.initial=.6}
691 \ctikzset{tripoles/pfet/curr direction/.initial=-1}
692
693 \ctikzset{tripoles/nigfete/width/.initial=.7}
694 \ctikzset{tripoles/nigfete/gate height/.initial=.35}
695 \ctikzset{tripoles/nigfete/base height/.initial=.5}
696 \ctikzset{tripoles/nigfete/conn height/.initial=.35}
697 \ctikzset{tripoles/nigfete/height/.initial=1.1}
698 \ctikzset{tripoles/nigfete/base width/.initial=.5}
699 \ctikzset{tripoles/nigfete/gate width/.initial=.62}
700 \ctikzset{tripoles/nigfete/bodydiode scale/.initial=.3}
701 \ctikzset{tripoles/nigfete/bodydiode distance/.initial=.3}
702 \ctikzset{tripoles/nigfete/bodydiode conn/.initial=.6}
703 \ctikzset{tripoles/nigfete/curr direction/.initial=1}
704
705 \ctikzset{tripoles/nigfetd/width/.initial=.7}
706 \ctikzset{tripoles/nigfetd/gate height/.initial=.35}
707 \ctikzset{tripoles/nigfetd/base height/.initial=.5}
708 \ctikzset{tripoles/nigfetd/conn height/.initial=.35}
709 \ctikzset{tripoles/nigfetd/height/.initial=1.1}
710 \ctikzset{tripoles/nigfetd/base width/.initial=.5}
711 \ctikzset{tripoles/nigfetd/gate width/.initial=.62}
712 \ctikzset{tripoles/nigfetd/bodydiode scale/.initial=.3}
713 \ctikzset{tripoles/nigfetd/bodydiode distance/.initial=.3}
714 \ctikzset{tripoles/nigfetd/bodydiode conn/.initial=.6}
715 \ctikzset{tripoles/nigfetd/curr direction/.initial=1}
716
717 \ctikzset{tripoles/nigfetebulk/width/.initial=.7}
718 \ctikzset{tripoles/nigfetebulk/gate height/.initial=.35}
719 \ctikzset{tripoles/nigfetebulk/base height/.initial=.5}
720 \ctikzset{tripoles/nigfetebulk/conn height/.initial=.35}
721 \ctikzset{tripoles/nigfetebulk/height/.initial=1.1}
722 \ctikzset{tripoles/nigfetebulk/base width/.initial=.5}
723 \ctikzset{tripoles/nigfetebulk/gate width/.initial=.62}
724 \ctikzset{tripoles/nigfetebulk/bodydiode scale/.initial=.3}
725 \ctikzset{tripoles/nigfetebulk/bodydiode distance/.initial=.3}
726 \ctikzset{tripoles/nigfetebulk/bodydiode conn/.initial=.6}
727 \ctikzset{tripoles/nigfetebulk/curr direction/.initial=1}
728
729 \ctikzset{tripoles/pigfete/width/.initial=.7}
730 \ctikzset{tripoles/pigfete/gate height/.initial=.35}
731 \ctikzset{tripoles/pigfete/base height/.initial=.5}
732 \ctikzset{tripoles/pigfete/conn height/.initial=.35}
733 \ctikzset{tripoles/pigfete/height/.initial=1.1}
734 \ctikzset{tripoles/pigfete/base width/.initial=.5}
735 \ctikzset{tripoles/pigfete/gate width/.initial=.62}
736 \ctikzset{tripoles/pigfete/bodydiode scale/.initial=.3}
737 \ctikzset{tripoles/pigfete/bodydiode distance/.initial=.3}
738 \ctikzset{tripoles/pigfete/bodydiode conn/.initial=.6}
739 \ctikzset{tripoles/pigfete/curr direction/.initial=-1}
740
741 \ctikzset{tripoles/pigfetd/width/.initial=.7}
742 \ctikzset{tripoles/pigfetd/gate height/.initial=.35}
743 \ctikzset{tripoles/pigfetd/base height/.initial=.5}
744 \ctikzset{tripoles/pigfetd/conn height/.initial=.35}
745 \ctikzset{tripoles/pigfetd/height/.initial=1.1}
746 \ctikzset{tripoles/pigfetd/base width/.initial=.5}
747 \ctikzset{tripoles/pigfetd/gate width/.initial=.62}
748 \ctikzset{tripoles/pigfetd/bodydiode scale/.initial=.3}
749 \ctikzset{tripoles/pigfetd/bodydiode distance/.initial=.3}
750 \ctikzset{tripoles/pigfetd/bodydiode conn/.initial=.6}
751 \ctikzset{tripoles/pigfetd/curr direction/.initial=-1}
752
753 \ctikzset{tripoles/pigfetebulk/width/.initial=.7}
754 \ctikzset{tripoles/pigfetebulk/gate height/.initial=.35}
755 \ctikzset{tripoles/pigfetebulk/conn height/.initial=.35}
756 \ctikzset{tripoles/pigfetebulk/base height/.initial=.5}
757 \ctikzset{tripoles/pigfetebulk/height/.initial=1.1}
758 \ctikzset{tripoles/pigfetebulk/base width/.initial=.5}
759 \ctikzset{tripoles/pigfetebulk/gate width/.initial=.62}
760 \ctikzset{tripoles/pigfetebulk/bodydiode scale/.initial=.3}
761 \ctikzset{tripoles/pigfetebulk/bodydiode distance/.initial=.3}
762 \ctikzset{tripoles/pigfetebulk/bodydiode conn/.initial=.6}
763 \ctikzset{tripoles/pigfetebulk/curr direction/.initial=-1}
764
765 \ctikzset{tripoles/npn/width/.initial=.6}
766 \ctikzset{tripoles/npn/base height/.initial=.45}
767 \ctikzset{tripoles/npn/base height 2/.initial=.15}
768 \ctikzset{tripoles/npn/base height/.initial=.4}
769 \ctikzset{tripoles/npn/conn height/.initial=0}
770 \ctikzset{tripoles/npn/height/.initial=1.1}
771 \ctikzset{tripoles/npn/base width/.initial=.5}
772 \ctikzset{tripoles/npn/bodydiode scale/.initial=.3}
773 \ctikzset{tripoles/npn/bodydiode distance/.initial=.3}
774 \ctikzset{tripoles/npn/bodydiode conn/.initial=.6}
775 \ctikzset{tripoles/npn/curr direction/.initial=1}
776
777 \ctikzset{tripoles/pnp/width/.initial=.6}
778 \ctikzset{tripoles/pnp/base height/.initial=.45}
779 \ctikzset{tripoles/pnp/base height 2/.initial=.15}
780 \ctikzset{tripoles/pnp/base height/.initial=.4}
781 \ctikzset{tripoles/pnp/conn height/.initial=0}
782 \ctikzset{tripoles/pnp/height/.initial=1.1}
783 \ctikzset{tripoles/pnp/base width/.initial=.5}
784 \ctikzset{tripoles/pnp/bodydiode scale/.initial=.3}
785 \ctikzset{tripoles/pnp/bodydiode distance/.initial=.3}
786 \ctikzset{tripoles/pnp/bodydiode conn/.initial=.6}
787 \ctikzset{tripoles/pnp/curr direction/.initial=-1}
788
789 \ctikzset{tripoles/pigbt/width/.initial=.6}
790 \ctikzset{tripoles/pigbt/gate height/.initial=.45}
791 \ctikzset{tripoles/pigbt/gate height 2/.initial=.15}
792 \ctikzset{tripoles/pigbt/base height/.initial=.4}
793 \ctikzset{tripoles/pigbt/conn height/.initial=0}
794 \ctikzset{tripoles/pigbt/height/.initial=1.1}
795 \ctikzset{tripoles/pigbt/gate width/.initial=.62}
796 \ctikzset{tripoles/pigbt/base width/.initial=.5}
797 \ctikzset{tripoles/pigbt/bodydiode scale/.initial=.3}
798 \ctikzset{tripoles/pigbt/bodydiode distance/.initial=.3}
799 \ctikzset{tripoles/pigbt/bodydiode conn/.initial=.6}
800 \ctikzset{tripoles/pigbt/curr direction/.initial=-1}
801
802 \ctikzset{tripoles/nigbt/width/.initial=.6}
803 \ctikzset{tripoles/nigbt/gate height/.initial=.45}
804 \ctikzset{tripoles/nigbt/gate height 2/.initial=.15}
805 \ctikzset{tripoles/nigbt/base height/.initial=.4}
806 \ctikzset{tripoles/nigbt/conn height/.initial=0}
807 \ctikzset{tripoles/nigbt/height/.initial=1.1}
808 \ctikzset{tripoles/nigbt/gate width/.initial=.62}
809 \ctikzset{tripoles/nigbt/base width/.initial=.5}
810 \ctikzset{tripoles/nigbt/bodydiode scale/.initial=.3}
811 \ctikzset{tripoles/nigbt/bodydiode distance/.initial=.3}
812 \ctikzset{tripoles/nigbt/bodydiode conn/.initial=.6}
813 \ctikzset{tripoles/nigbt/curr direction/.initial=1}
814
815 \ctikzset{tripoles/Lpigbt/width/.initial=.6}
816 \ctikzset{tripoles/Lpigbt/gate height/.initial=.45}
817 \ctikzset{tripoles/Lpigbt/gate height 2/.initial=.15}
818 \ctikzset{tripoles/Lpigbt/base height/.initial=.4}
819 \ctikzset{tripoles/Lpigbt/conn height/.initial=.4}
820 \ctikzset{tripoles/Lpigbt/height/.initial=1.1}
821 \ctikzset{tripoles/Lpigbt/gate width/.initial=.62}
822 \ctikzset{tripoles/Lpigbt/base width/.initial=.5}
823 \ctikzset{tripoles/Lpigbt/bodydiode scale/.initial=.3}
824 \ctikzset{tripoles/Lpigbt/bodydiode distance/.initial=.3}
825 \ctikzset{tripoles/Lpigbt/bodydiode conn/.initial=.6}
826 \ctikzset{tripoles/Lpigbt/curr direction/.initial=-1}
827
828 \ctikzset{tripoles/Lnigbt/width/.initial=.6}
829 \ctikzset{tripoles/Lnigbt/gate height/.initial=.45}
830 \ctikzset{tripoles/Lnigbt/gate height 2/.initial=.15}
831 \ctikzset{tripoles/Lnigbt/base height/.initial=.4}
832 \ctikzset{tripoles/Lnigbt/conn height/.initial=.4}
833 \ctikzset{tripoles/Lnigbt/height/.initial=1.1}
834 \ctikzset{tripoles/Lnigbt/gate width/.initial=.62}
835 \ctikzset{tripoles/Lnigbt/base width/.initial=.5}
836 \ctikzset{tripoles/Lnigbt/bodydiode scale/.initial=.3}
837 \ctikzset{tripoles/Lnigbt/bodydiode distance/.initial=.3}
838 \ctikzset{tripoles/Lnigbt/bodydiode conn/.initial=.6}
839 \ctikzset{tripoles/Lnigbt/curr direction/.initial=1}
840
841 \ctikzset{tripoles/njfet/width/.initial=.7}
842 \ctikzset{tripoles/njfet/gate height/.initial=.5}
843 \ctikzset{tripoles/njfet/gate height 2/.initial=.35}
844 \ctikzset{tripoles/njfet/gate width/.initial=.5}
845 \ctikzset{tripoles/njfet/conn height/.initial=.35}
846 \ctikzset{tripoles/njfet/height/.initial=1.1}
847 \ctikzset{tripoles/njfet/bodydiode scale/.initial=.3}
848 \ctikzset{tripoles/njfet/bodydiode distance/.initial=.3}
849 \ctikzset{tripoles/njfet/bodydiode conn/.initial=.6}
850 \ctikzset{tripoles/njfet/curr direction/.initial=1}
851
852 \ctikzset{tripoles/pjfet/width/.initial=.7}
853 \ctikzset{tripoles/pjfet/gate height/.initial=.5}
854 \ctikzset{tripoles/pjfet/gate height 2/.initial=.35}
855 \ctikzset{tripoles/pjfet/gate width/.initial=.5}
856 \ctikzset{tripoles/pjfet/conn height/.initial=.35}
857 \ctikzset{tripoles/pjfet/height/.initial=1.1}
858 \ctikzset{tripoles/pjfet/bodydiode scale/.initial=.3}
859 \ctikzset{tripoles/pjfet/bodydiode distance/.initial=.3}
860 \ctikzset{tripoles/pjfet/bodydiode conn/.initial=.6}
861 \ctikzset{tripoles/pjfet/curr direction/.initial=-1}
862
863 \ctikzset{tripoles/isfet/width/.initial=1}
864 \ctikzset{tripoles/isfet/gate height/.initial=.35}
865 \ctikzset{tripoles/isfet/base height/.initial=.5}
866 \ctikzset{tripoles/isfet/height/.initial=1.1}
867 \ctikzset{tripoles/isfet/base width/.initial=.3}
868 \ctikzset{tripoles/isfet/gate width/.initial=.5}
869 \ctikzset{tripoles/isfet/conn height/.initial=0}
870 \ctikzset{tripoles/isfet/wave width/.initial=.16}
871 \ctikzset{tripoles/isfet/wave amp/.initial=.06}
872 \ctikzset{tripoles/isfet/waves y sep/.initial=.22}
873 \ctikzset{tripoles/isfet/waves x sep/.initial=.8}
874 \ctikzset{tripoles/isfet/bodydiode scale/.initial=.3}
875 \ctikzset{tripoles/isfet/bodydiode distance/.initial=.3}
876 \ctikzset{tripoles/isfet/bodydiode conn/.initial=.6}
877 \ctikzset{tripoles/isfet/curr direction/.initial=1}
878
879 \newif\ifpgf@circuit@europeanlogicport
880 \ctikzset{logic ports/.is choice}
881 \ctikzset{logic ports/european/.code= {\pgf@circuit@europeanlogicporttrue } }
882 \ctikzset{logic ports/american/.code= {\pgf@circuit@europeanlogicportfalse } }
883
884 \newif\ifpgf@circuit@bipole@voltage@backward
885 \ctikzset{bipole/voltage/direction/.is choice}
886 \ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}}
887 \ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}}
888
889 \ctikzset{tripoles/american and port/width/.initial=1.1}
890 \ctikzset{tripoles/american and port/height/.initial=.8}
891 \ctikzset{tripoles/american and port/port width/.initial=.7}
892 \ctikzset{tripoles/american and port/input height/.initial=.5}
893 \ctikzset{tripoles/american nand port/width/.initial=1.1}
894 \ctikzset{tripoles/american nand port/height/.initial=.8}
895 \ctikzset{tripoles/american nand port/port width/.initial=.7}
896 \ctikzset{tripoles/american nand port/circle width/.initial=.15}
897 \ctikzset{tripoles/american nand port/input height/.initial=.5}
898 \ctikzset{tripoles/american or port/width/.initial=1.1}
899 \ctikzset{tripoles/american or port/height/.initial=.8}
900 \ctikzset{tripoles/american or port/port width/.initial=.7}
901 \ctikzset{tripoles/american or port/input height/.initial=.5}
902 \ctikzset{tripoles/american or port/input skip/.initial=.25}
903 \ctikzset{tripoles/american or port/aaa/.initial=.6}
904 \ctikzset{tripoles/american or port/bbb/.initial=.4}
905 \ctikzset{tripoles/american or port/ccc/.initial=.5}
906 \ctikzset{tripoles/american or port/ddd/.initial=.0}
907 \ctikzset{tripoles/american nor port/width/.initial=1.1}
908 \ctikzset{tripoles/american nor port/height/.initial=.8}
909 \ctikzset{tripoles/american nor port/port width/.initial=.7}
910 \ctikzset{tripoles/american nor port/input height/.initial=.5}
911 \ctikzset{tripoles/american nor port/input skip/.initial=.25}
912 \ctikzset{tripoles/american nor port/circle width/.initial=.15}
913 \ctikzset{tripoles/american nor port/aaa/.initial=.6}
914 \ctikzset{tripoles/american nor port/bbb/.initial=.4}
915 \ctikzset{tripoles/american nor port/ccc/.initial=.5}
916 \ctikzset{tripoles/american nor port/ddd/.initial=.0}
917 \ctikzset{tripoles/american xor port/width/.initial=1.1}
918 \ctikzset{tripoles/american xor port/height/.initial=.8}
919 \ctikzset{tripoles/american xor port/port width/.initial=.7}
920 \ctikzset{tripoles/american xor port/input height/.initial=.5}
921 \ctikzset{tripoles/american xor port/input skip/.initial=.15}
922 \ctikzset{tripoles/american xor port/distance/.initial=.1}
923 \ctikzset{tripoles/american xor port/aaa/.initial=.6}
924 \ctikzset{tripoles/american xor port/bbb/.initial=.4}
925 \ctikzset{tripoles/american xor port/ccc/.initial=.5}
926 \ctikzset{tripoles/american xor port/ddd/.initial=.0}
927 \ctikzset{tripoles/american xnor port/width/.initial=1.1}
928 \ctikzset{tripoles/american xnor port/height/.initial=.8}
929 \ctikzset{tripoles/american xnor port/port width/.initial=.7}
930 \ctikzset{tripoles/american xnor port/input height/.initial=.5}
931 \ctikzset{tripoles/american xnor port/input skip/.initial=.15}
932 \ctikzset{tripoles/american xnor port/distance/.initial=.1}
933 \ctikzset{tripoles/american xnor port/aaa/.initial=.6}
934 \ctikzset{tripoles/american xnor port/bbb/.initial=.4}
935 \ctikzset{tripoles/american xnor port/ccc/.initial=.5}
936 \ctikzset{tripoles/american xnor port/ddd/.initial=.0}
937 \ctikzset{tripoles/american xnor port/circle width/.initial=.15}
938 \ctikzset{tripoles/european and port/width/.initial=1.4}
939 \ctikzset{tripoles/european and port/height/.initial=.65}
940 \ctikzset{tripoles/european and port/reserved/.initial=.6}
941 \ctikzset{tripoles/european and port/input height/.initial=.6}
942 \ctikzset{tripoles/european or port/width/.initial=1.4}
943 \ctikzset{tripoles/european or port/height/.initial=.65}
944 \ctikzset{tripoles/european or port/reserved/.initial=.6}
945 \ctikzset{tripoles/european or port/input height/.initial=.6}
946 \ctikzset{tripoles/european xor port/width/.initial=1.4}
947 \ctikzset{tripoles/european xor port/height/.initial=.65}
948 \ctikzset{tripoles/european xor port/reserved/.initial=.6}
949 \ctikzset{tripoles/european xor port/input height/.initial=.6}
950 \ctikzset{tripoles/european nand port/width/.initial=1.4}
951 \ctikzset{tripoles/european nand port/not height/.initial=.3}
952 \ctikzset{tripoles/european nand port/not width/.initial=.8}
953 \ctikzset{tripoles/european nand port/height/.initial=.65}
954 \ctikzset{tripoles/european nand port/reserved/.initial=.6}
955 \ctikzset{tripoles/european nand port/input height/.initial=.6}
956 \ctikzset{tripoles/european not port/width/.initial=1.4}
957 \ctikzset{tripoles/european not port/not height/.initial=.3}
958 \ctikzset{tripoles/european not port/not width/.initial=.8}
959 \ctikzset{tripoles/european not port/height/.initial=.65}
960 \ctikzset{tripoles/european not port/reserved/.initial=.6}
961 \ctikzset{tripoles/european not port/input height/.initial=0}
962 \ctikzset{tripoles/european xnor port/width/.initial=1.4}
963 \ctikzset{tripoles/european xnor port/not height/.initial=.3}
964 \ctikzset{tripoles/european xnor port/not width/.initial=.8}
965 \ctikzset{tripoles/european xnor port/height/.initial=.65}
966 \ctikzset{tripoles/european xnor port/reserved/.initial=.6}
967 \ctikzset{tripoles/european xnor port/input height/.initial=.6}
968 \ctikzset{tripoles/european nor port/width/.initial=1.4}
969 \ctikzset{tripoles/european nor port/not height/.initial=.3}
970 \ctikzset{tripoles/european nor port/not width/.initial=.8}
971 \ctikzset{tripoles/european nor port/height/.initial=.65}
972 \ctikzset{tripoles/european nor port/reserved/.initial=.6}
973 \ctikzset{tripoles/european nor port/input height/.initial=.6}
974 \ctikzset{tripoles/op amp/width/.initial=1.7}
975 \ctikzset{tripoles/op amp/port width/.initial=.7}
976 \ctikzset{tripoles/op amp/height/.initial=1.4}
977 \ctikzset{tripoles/op amp/input height/.initial=.5}
978 \ctikzset{tripoles/op amp/up pos/.initial=.45}
979 \ctikzset{tripoles/op amp/font/.initial= \fontsize{10}{0}\selectfont\boldmath}%absolut font size needed!
980 \ctikzset{tripoles/gm amp/width/.initial=1.7}
981 \ctikzset{tripoles/gm amp/port width/.initial=.7}
982 \ctikzset{tripoles/gm amp/height/.initial=1.4}
983 \ctikzset{tripoles/gm amp/input height/.initial=.5}
984 \ctikzset{tripoles/gm amp/up pos/.initial=.45}
985 \ctikzset{tripoles/plain amp/width/.initial=1.7}
986 \ctikzset{tripoles/plain amp/port width/.initial=.7}
987 \ctikzset{tripoles/plain amp/height/.initial=1.4}
988 \ctikzset{tripoles/plain amp/input height/.initial=.5}
989 \ctikzset{tripoles/plain amp/up pos/.initial=.45}
990
991 \ctikzset{tripoles/thyristor/height/.initial=1.10}
992 \ctikzset{tripoles/thyristor/height 2/.initial=.5}
993 \ctikzset{tripoles/thyristor/width/.initial=1.0}
994 \ctikzset{tripoles/thyristor/diode height/.initial=.5}
995 \ctikzset{tripoles/thyristor/diode width left/.initial=.4}
996 \ctikzset{tripoles/thyristor/diode width right/.initial=.3}
997
998 \ctikzset{tripoles/triac/height/.initial=1.1}
999 \ctikzset{tripoles/triac/width/.initial=1}
1000 \ctikzset{tripoles/triac/diode width left/.initial=.3}
1001 \ctikzset{tripoles/triac/diode width right/.initial=.3}
1002
1003 \ctikzset{tripoles/spdt/width/.initial=.85}
1004 \ctikzset{tripoles/spdt/height/.initial=.45}
1005 \ctikzset{tripoles/spdt/margin/.initial=.45}
1006
1007 \ctikzset{tripoles/toggleswitch/height/.initial=.8}
1008 \ctikzset{tripoles/toggleswitch/height 2/.initial=.0}
1009 \ctikzset{tripoles/toggleswitch/width/.initial=.80}
1010
1011 \ctikzset{tripoles/mixer/width/.initial=0.7}
1012 \ctikzset{tripoles/adder/width/.initial=0.7}
1013 \ctikzset{tripoles/circulator/width/.initial=.7}
1014 \ctikzset{tripoles/oscillator/width/.initial=.7}
1015
1016
1017 \ctikzset{tripoles/wilkinson/height/.initial=1.3}
1018 \ctikzset{tripoles/wilkinson/width/.initial=1.3}
1019
1020 \ctikzset{quadpoles/transformer/width/.initial=1.5}
1021 \ctikzset{quadpoles/transformer/width1/.initial=.4}
1022 \ctikzset{quadpoles/transformer/height/.initial=1.5}
1023 \ctikzset{quadpoles/transformer/height1/.initial=.8}
1024 \ctikzset{quadpoles/transformer core/width/.initial=1.5}
1025 \ctikzset{quadpoles/transformer core/height/.initial=1.5}
1026 \ctikzset{quadpoles/transformer core/core height/.initial=.5}
1027 \ctikzset{quadpoles/transformer core/core width/.initial=.05}
1028 \ctikzset{quadpoles/gyrator/width/.initial=1.5}
1029 \ctikzset{quadpoles/gyrator/height/.initial=1.5}
1030 \ctikzset{quadpoles/fourport/width/.initial=1.3}
1031 \ctikzset{quadpoles/fourport/height/.initial=1.3}
1032 \ctikzset{quadpoles/coupler/width/.initial=1.3}
1033 \ctikzset{quadpoles/coupler/height/.initial=1.3}
1034 \ctikzset{quadpoles/coupler2/width/.initial=1.3}
1035 \ctikzset{quadpoles/coupler2/height/.initial=1.3}
1036
1037 % %Mechanical section
1038 \ctikzset{/tikz/circuitikz/tripoles/elmech/height/.initial=.8}
1039 \ctikzset{/tikz/circuitikz/tripoles/elmech/width/.initial=.6}
1040 \ctikzset{bipoles/spring/height/.initial=.5}
1041 \ctikzset{bipoles/spring/width/.initial=.5}
1042 \ctikzset{bipoles/mass/height/.initial=.55}
1043 \ctikzset{bipoles/mass/box height/.initial=.4}
1044 \ctikzset{bipoles/mass/width/.initial=.5}
1045
1046 \ctikzset{bipoles/damper/height/.initial=.35}
1047 \ctikzset{bipoles/damper/length/.initial=.3}
1048 \ctikzset{bipoles/damper/width/.initial=.4}
1049
1050
1051 \ctikzset{bipole/.is family}
1052 \ctikzset{bipole/kind/.initial = }
1053 \ctikzset{bipole/name/.initial = }
1054 \newif\ifpgf@circuit@bipole@reversed
1055 \ctikzset{bipole/reversed/.is if=pgf@circuit@bipole@reversed}
1056 \newif\ifpgf@circuit@bipole@isvoltage
1057 \ctikzset{bipole/is voltage/.is if=pgf@circuit@bipole@isvoltage}
1058 \newif\ifpgf@circuit@bipole@voltageoutsideofsymbol
1059 \ctikzset{bipole/is voltageoutsideofsymbol/.is if=pgf@circuit@bipole@voltageoutsideofsymbol}
1060 \newif\ifpgf@circuit@bipole@strokedsymbol
1061 \ctikzset{bipole/is strokedsymbol/.is if=pgf@circuit@bipole@strokedsymbol}
1062 \newif\ifpgf@circuit@bipole@iscurrent
1063 \ctikzset{bipole/is current/.is if=pgf@circuit@bipole@iscurrent}
1064
1065 \ctikzset{bipole/voltage/.is family}
1066 \newif\ifpgf@circuit@bipole@voltage@backward
1067 \ctikzset{bipole/voltage/direction/.is choice}
1068 \ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}}
1069 \ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}}
1070 \newif\ifpgf@circuit@bipole@voltage@below
1071 \ctikzset{bipole/voltage/position/.is choice}
1072 \ctikzset{bipole/voltage/position/above/.code={\pgf@circuit@bipole@voltage@belowfalse}}
1073 \ctikzset{bipole/voltage/position/below/.code={\pgf@circuit@bipole@voltage@belowtrue}}
1074
1075 \ctikzset{bipole/voltage/label/unit/.initial=}
1076 \ctikzset{bipole/voltage/label/name/.initial=}
1077
1078 \ctikzset{bipole/current/.is family}
1079 \newif\ifpgf@circuit@bipole@current@backward
1080 \ctikzset{bipole/current/direction/.is choice}
1081 \ctikzset{bipole/current/direction/forward/.code={\pgf@circuit@bipole@current@backwardfalse}}
1082 \ctikzset{bipole/current/direction/backward/.code={\pgf@circuit@bipole@current@backwardtrue}}
1083 \newif\ifpgf@circuit@bipole@current@before
1084 \ctikzset{bipole/current/x position/.is choice}
1085 \ctikzset{bipole/current/x position/after/.code={\pgf@circuit@bipole@current@beforefalse}}
1086 \ctikzset{bipole/current/x position/before/.code={\pgf@circuit@bipole@current@beforetrue}}
1087 \newif\ifpgf@circuit@bipole@current@below
1088 \ctikzset{bipole/current/y position/.is choice}
1089 \ctikzset{bipole/current/y position/above/.code={\pgf@circuit@bipole@current@belowfalse}}
1090 \ctikzset{bipole/current/y position/below/.code={\pgf@circuit@bipole@current@belowtrue}}
1091
1092 \ctikzset{bipole/current/label/unit/.initial=}
1093 \ctikzset{bipole/current/label/name/.initial=}
1094
1095 \ctikzset{bipole/label/.is family}
1096 \ctikzset{bipole/label/position/.initial=90}
1097 \ctikzset{bipole/label/unit/.initial=}
1098 \ctikzset{bipole/label/name/.initial=}
1099 \ctikzset{bipole/nodes/.is family}
1100 \ctikzset{bipole/nodes/left/.is choice}
1101 \ctikzset{bipole/nodes/left/none/.code={\ctikzsetvalof{bipole/nodes/left}{none}}}
1102 \ctikzset{bipole/nodes/left/empty/.code={\ctikzsetvalof{bipole/nodes/left}{empty}}}
1103 \ctikzset{bipole/nodes/left/full/.code={\ctikzsetvalof{bipole/nodes/left}{full}}}
1104 \ctikzset{bipole/nodes/left/diamond/.code={\ctikzsetvalof{bipole/nodes/left}{diamond}}}
1105 \ctikzset{bipole/nodes/right/.is choice}
1106 \ctikzset{bipole/nodes/right/none/.code={\ctikzsetvalof{bipole/nodes/right}{none}}}
1107 \ctikzset{bipole/nodes/right/empty/.code={\ctikzsetvalof{bipole/nodes/right}{empty}}}
1108 \ctikzset{bipole/nodes/right/full/.code={\ctikzsetvalof{bipole/nodes/right}{full}}}
1109 \ctikzset{bipole/nodes/right/diamond/.code={\ctikzsetvalof{bipole/nodes/right}{diamond}}}
1110
1111
1112
1113
1114 \newif\ifpgf@circuit@europeanresistor
1115 \ctikzset{resistor/.is choice}
1116 \ctikzset{resistor/american/.code = \pgf@circuit@europeanresistorfalse }
1117 \ctikzset{resistor/european/.code = \pgf@circuit@europeanresistortrue }
1118
1119 \ctikzset{inductor/.is choice}
1120 \ctikzset{inductor/cute/.code={\ctikzsetvalof{inductor}{cute}}}
1121 \ctikzset{inductor/european/.code={\ctikzsetvalof{inductor}{european}}}
1122 \ctikzset{inductor/american/.code={\ctikzsetvalof{inductor}{american}}}
1123
1124 \newif\ifpgf@circuit@strokediode
1125 \newif\ifpgf@circuit@fulldiode
1126 \pgf@circuit@strokediodefalse
1127 \pgf@circuit@fulldiodefalse
1128
1129 \ctikzset{diode/.is choice}
1130 \ctikzset{diode/empty/.code = \pgf@circuit@fulldiodefalse\pgf@circuit@strokediodefalse}%default
1131 \ctikzset{diode/full/.code = \pgf@circuit@fulldiodetrue }
1132 \ctikzset{diode/stroke/.code = \pgf@circuit@strokediodetrue}
1133
1134 \tikzset{full diodes/.style = { \circuitikzbasekey/diode = full }}
1135 \tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty }}
1136 \tikzset{stroke diodes/.style = { \circuitikzbasekey/diode = stroke }}
1137
1138 \ctikzset{thickness/.initial=2}
1139 \ctikzset{color/.initial=black}
1140 \pgfkeys{/tikz/color/.add code={}{\ctikzset{color=#1}}}
1141
1142
1143 \newif\ifpgf@circ@siunitx
1144 \newif\ifpgf@circ@siunitx@res
1145
1146 \ctikzset{voltage/.is family}
1147 \ctikzset{voltage/distance from node/.initial=.5} %\pgf@circ@Rlen units
1148 \ctikzset{voltage/distance from line/.initial=.08} % pos, tra 0 e 1
1149 \ctikzset{voltage/bump a/.initial=1.2}
1150 \ctikzset{voltage/bump b/.initial=1.5}
1151 \ctikzset{voltage/european label distance/.initial=1.4}
1152 \ctikzset{voltage/american label distance/.initial=1.1}
1153 % special cases
1154 \ctikzset{bipoles/generic/voltage/distance from node/.initial=.4}
1155 \ctikzset{bipoles/generic/voltage/bump b/.initial=2}
1156 \ctikzset{bipoles/generic/voltage/european label distance/.initial=1.8}
1157 %\ctikzset{bipoles/thermocouple/voltage/distance from node/.initial=.3}
1158 \ctikzset{bipoles/thermocouple/voltage/bump b/.initial=2.2}
1159 \ctikzset{bipoles/thermocouple/voltage/european label distance/.initial=1.5}
1160 \ctikzset{bipoles/ageneric/voltage/distance from node/.initial=.4}
1161 \ctikzset{bipoles/ageneric/voltage/bump b/.initial=2}
1162 \ctikzset{bipoles/ageneric/voltage/european label distance/.initial=1.8}
1163 \ctikzset{bipoles/fullgeneric/voltage/distance from node/.initial=.4}
1164 \ctikzset{bipoles/fullgeneric/voltage/bump b/.initial=2}
1165 \ctikzset{bipoles/fullgeneric/voltage/european label distance/.initial=1.8}
1166 \ctikzset{bipoles/memristor/voltage/distance from node/.initial=.4}
1167 \ctikzset{bipoles/memristor/voltage/bump b/.initial=2}
1168 \ctikzset{bipoles/memristor/voltage/european label distance/.initial=1.8}
1169 %\ctikzset{bipoles/tline/voltage/distance from node/.initial=.2}
1170 \ctikzset{bipoles/tline/voltage/bump b/.initial=2.4}
1171 \ctikzset{bipoles/tline/voltage/european label distance/.initial=2.1}
1172 %\ctikzset{bipoles/varistor/voltage/distance from node/.initial=.2}
1173 \ctikzset{bipoles/varistor/voltage/bump b/.initial=2.4}
1174 \ctikzset{bipoles/varistor/voltage/european label distance/.initial=2}
1175 %\ctikzset{bipoles/photoresistor/voltage/distance from node/.initial=.2}
1176 \ctikzset{bipoles/photoresistor/voltage/bump b/.initial=2}
1177 \ctikzset{bipoles/photoresistor/voltage/european label distance/.initial=1.8}
1178 %\ctikzset{bipoles/thermistor/voltage/distance from node/.initial=.2}
1179 \ctikzset{bipoles/thermistor/voltage/bump b/.initial=2.4}
1180 \ctikzset{bipoles/thermistor/voltage/european label distance/.initial=2}
1181 %\ctikzset{bipoles/thermistorntc/voltage/distance from node/.initial=.2}
1182 \ctikzset{bipoles/thermistorntc/voltage/bump b/.initial=1.6}
1183 %\ctikzset{bipoles/thermistorptc/voltage/distance from node/.initial=.2}
1184 \ctikzset{bipoles/thermistorptc/voltage/bump b/.initial=1.6}
1185
1186 \ctikzset{current/.is family}
1187 \ctikzset{current/distance/.initial = .5}
1188
1189 \tikzset{american currents/.style = { \circuitikzbasekey/current = american } }
1190 \tikzset{european currents/.style = { \circuitikzbasekey/current = european } }
1191 \tikzset{american voltages/.style = { \circuitikzbasekey/voltage = american } }
1192 \tikzset{european voltages/.style = { \circuitikzbasekey/voltage = european } }
1193 \tikzset{american resistors/.style = { \circuitikzbasekey/resistor = american } }
1194 \tikzset{european resistors/.style = { \circuitikzbasekey/resistor = european } }
1195
1196 \newif\ifpgf@circuit@europeangfsurgearrester
1197 \ctikzset{gas filled surge arrester/.is choice}
1198 \ctikzset{gas filled surge arrester/european/.code= {\pgf@circuit@europeangfsurgearrestertrue } }
1199 \ctikzset{gas filled surge arrester/american/.code= {\pgf@circuit@europeangfsurgearresterfalse } }
1200
1201 \tikzset{american gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = american } }
1202 \tikzset{european gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = european } }
1203 \tikzset{american inductors/.style = { \circuitikzbasekey/inductor = american } }
1204 \tikzset{european inductors/.style = { \circuitikzbasekey/inductor = european } }
1205 \tikzset{cute inductors/.style = { \circuitikzbasekey/inductor = cute } }
1206 \tikzset{american ports/.style = { \circuitikzbasekey/logic ports = american } }
1207 \tikzset{european ports/.style = { \circuitikzbasekey/logic ports = european } }
1208 \tikzset{european/.style = { european currents, european voltages, european resistors, european inductors, european ports, european gas filled surge arrester } }
1209 \tikzset{american/.style = { american currents, american voltages, american resistors, american inductors, american ports, american gas filled surge arrester } }
1210 \tikzset{cute/.style = { european currents, european voltages, american resistors, cute inductors, american ports } }
1211
1212 % I should try to make the tree clearer (this voltaege conflicts with the options above)
1213
1214 \newif\ifpgf@circuit@europeanvoltage
1215 \ctikzset{voltage/.is choice}
1216 \ctikzset{voltage/american/.code = {\pgf@circuit@europeanvoltagefalse } }
1217 \ctikzset{voltage/european/.code = {\pgf@circuit@europeanvoltagetrue } }
1218
1219 \newif\ifpgf@circuit@europeancurrent
1220 \ctikzset{current/.is choice}
1221 \ctikzset{current/american/.code = \pgf@circuit@europeancurrentfalse }
1222 \ctikzset{current/european/.code = \pgf@circuit@europeancurrenttrue }
1223
1224 \ctikzset{label/align/.is choice}
1225 \ctikzset{label/align/straight/.code={\ctikzsetvalof{label/align}{straight}}}
1226 \ctikzset{label/align/rotate/.code={\ctikzsetvalof{label/align}{rotate}}}
1227 \ctikzset{label/align/smart/.code={\ctikzsetvalof{label/align}{smart}}}
1228
1229 %%%%%%%%%% new
1230 \pgfkeys{\circuitikzbasekey/.search also={/tikz}}
1231 %%%---------- close: tex/pgfcirc.defines
1232 %%%%%%%%%%% Springe nach tex/pgfcircutils
1233 %%%---------- open: tex/pgfcircutils.tex
1234 % Copyright 2007-2009 by Massimo Redaelli
1235 %
1236 % This file may be distributed and/or modified
1237 %
1238 % 1. under the LaTeX Project Public License and/or
1239 % 2. under the GNU Public License.
1240 %
1241 % See the file doc/LICENSE for more details.
1242
1243 %\def\pgf@circ@handleSI#1{%
1244 % \pgf@circ@siunitx@resfalse
1245 %
1246 % \edef\len{\stringlength[e]{#1}}
1247 %\testmatchingchar[e]{#1}{\len}{>}%
1248 %\ifmatchingchar%
1249 % \ifnum\findchars{#1}{<}=0
1250 % \def\pgf@circ@handleSI@val{\substring{#1}{1}{\findchars{#1}{<}-1}}
1251 %\def\pgf@circ@handleSI@unit{\substring{#1}{\findchars{#1}{<}-1}+1}{\stringlength{#1}}
1252 %\pgf@circ@siunitx@restrue
1253 % \else
1254 % \fi
1255 %\else
1256 %\fi
1257 %}
1258
1259 \def\pgf@circ@handleSI#1{
1260 \noexpandarg
1261 \def\pgf@temp{}
1262 \StrBetween{#1}{<}{>}[\pgf@circ@handleSI@unit]
1263 \StrLen{\pgf@circ@handleSI@unit}[\pgf@circ@handleSI@unit@len]
1264
1265 \ifnum\pgf@circ@handleSI@unit@len=0
1266 \pgf@circ@siunitx@resfalse
1267 \else
1268 \IfEndWith{#1}{>}{
1269 \pgf@circ@siunitx@restrue
1270 \noexpandarg
1271 \StrBefore{#1}{<}[\pgf@circ@handleSI@val]
1272 %\typeout{si |#1|}
1273 }{
1274 \pgf@circ@siunitx@resfalse
1275 %\typeout{no si |#1|}
1276 }
1277 \fi
1278 }
1279
1280 \def\pgf@circ@finallabel#1{%
1281 \edef\pgf@temp{}%
1282 \edef\pgf@circ@temp{\ctikzvalof{bipole/#1label/unit}}%
1283 \ifx\pgf@temp\pgf@circ@temp%
1284 \ctikzvalof{bipole/#1label/name}%
1285 \else%
1286 $\SI{\ctikzvalof{bipole/#1label/name}}{\ctikzvalof{bipole/#1label/unit}}$%
1287 \fi%
1288 }
1289
1290 \def\pgf@circ@ifkeyempty#1{
1291 \pgfextra{
1292 \ctikzset{#1/.get=\pgf@circ@temp}
1293 \edef\pgf@temp{}
1294 }
1295 \ifx\pgf@circ@temp\pgf@temp
1296 }
1297
1298 %%%---------- close: tex/pgfcircutils
1299 %%%%%%%%%%% Springe nach tex/pgfcircmath
1300 %%%---------- open: tex/pgfcircmath.tex
1301 % Copyright 2007-2009 by Massimo Redaelli
1302 %
1303 % This file may be distributed and/or modified
1304 %
1305 % 1. under the LaTeX Project Public License and/or
1306 % 2. under the GNU Public License.
1307 %
1308 % See the file doc/LICENSE for more details.
1309
1310 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1311 %% Math routines
1312
1313 \def\pgf@circ@stripdecimals#1.#2\pgf@nil{#1}
1314
1315 % angle between 0 and 360
1316 \def\pgf@circ@slope#1#2{%
1317 \pgf@process{#1}%
1318 \pgf@xa=\pgf@x%
1319 \pgf@ya=\pgf@y%
1320 \pgf@process{#2}%
1321 \advance\pgf@x by-\pgf@xa%
1322 \advance\pgf@y by-\pgf@ya%
1323 \ifdim\pgf@x<0.1pt
1324 \ifdim\pgf@x>-0.1pt % vertical
1325 \ifdim\pgf@y<0pt
1326 \def\pgfmathresult{-90.0}
1327 \else
1328 \def\pgfmathresult{+90.0}
1329 \fi
1330 \else % oblique with dx < 0
1331 \pgfmathdivide{\pgf@y}{\pgf@x}
1332 \pgfmathatan{\pgfmathresult}
1333 \ifdim\pgf@x<0pt
1334 \pgfmathsubtract{\pgfmathresult}{+180}
1335 \fi
1336 \fi
1337 \else % oblique with dx > 0
1338 \pgfmathdivide{\pgf@y}{\pgf@x}
1339 \pgfmathatan{\pgfmathresult}
1340 \ifdim\pgf@x<0pt
1341 \pgfmathsubtract{\pgfmathresult}{+180}
1342 \fi
1343 \fi
1344 \pgf@x=\pgfmathresult pt
1345 \ifdim\pgf@x<0pt
1346 \pgfmathadd{\pgfmathresult}{+360}
1347 \fi
1348 }
1349
1350
1351 %%%---------- close: tex/pgfcircmath
1352
1353 %%%%%%%%%%% Springe nach tex/pgfcircshapes
1354 %%%---------- open: tex/pgfcircshapes.tex
1355 % Copyright 2007-2009 by Massimo Redaelli
1356 %
1357 % This file may be distributed and/or modified
1358 %
1359 % 1. under the LaTeX Project Public License and/or
1360 % 2. under the GNU Public License.
1361 %
1362 % See the file doc/LICENSE for more details.
1363
1364 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1365 %% Other shapes
1366
1367
1368 %% Nothing
1369
1370 \pgfdeclareshape{emptyshape}{
1371 \savedanchor{\northeast}{%
1372 \pgf@x=.5\wd\pgfnodeparttextbox%
1373 \pgf@y=.5\ht\pgfnodeparttextbox%
1374 }
1375 \anchor{north}{
1376 \northeast
1377 \pgf@x=0cm
1378 }
1379 \anchor{east}{%
1380 \northeast
1381 \pgf@y=0cm
1382 }
1383 \anchor{south}{%
1384 \northeast
1385 \pgf@y=-\pgf@y
1386 \pgf@x=0cm
1387 }
1388 \anchor{west}{
1389 \northeast
1390 \pgf@y=0cm
1391 \pgf@x=-\pgf@x
1392 }
1393 \anchor{text}{%
1394 \pgfpointorigin
1395 }
1396 \anchor{center}{
1397 \pgfpointorigin
1398 }
1399 }
1400
1401 %% Full terminal
1402
1403 \pgfdeclareshape{circ}{
1404 \anchor{center}{
1405 \pgfpointorigin
1406 }
1407 \anchorborder{
1408 \pgf@circ@res@left=\pgf@x
1409 \pgf@circ@res@up=\pgf@y
1410 \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
1411 }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}
1412 }
1413 \behindforegroundpath{
1414
1415 \pgfscope
1416 \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
1417 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1418 \pgfusepath{draw,fill}
1419 \endpgfscope
1420
1421 }
1422 }
1423
1424 %% Empty terminal
1425
1426 \pgfdeclareshape{ocirc}{
1427 \anchor{center}{
1428 \pgfpointorigin
1429 }
1430 \anchorborder{
1431 \pgf@circ@res@left=\pgf@x
1432 \pgf@circ@res@up=\pgf@y
1433 \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
1434 }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}
1435 }
1436
1437 \behindforegroundpath{
1438
1439 \pgfscope
1440 \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
1441 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1442 \pgfsetfillcolor{white}
1443 \pgfusepath{draw,fill}
1444 \endpgfscope
1445
1446 }
1447 }
1448
1449 %% Diamond terminal
1450
1451 \pgfdeclareshape{diamond}{
1452 \anchor{center}{
1453 \pgfpointorigin
1454 }
1455 \anchorborder{
1456 \pgf@circ@res@left=\pgf@x
1457 \pgf@circ@res@up=\pgf@y
1458 }
1459 \behindforegroundpath{
1460 \pgfscope
1461 \pgfmathsetlength{\pgf@circ@res@temp}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
1462 \pgftransformrotate{45}
1463 \pgfpathrectanglecorners
1464 {\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@temp}{\pgf@circ@res@up+\pgf@circ@res@temp}}
1465 {\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@temp}{\pgf@circ@res@up-\pgf@circ@res@temp}}
1466 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1467 \pgfusepath{draw,fill}
1468 \endpgfscope
1469 }
1470 }
1471
1472 %% Current arrow
1473
1474 \pgfdeclareshape{currarrow}{
1475 \anchor{center}{
1476 \pgfpointorigin
1477 }
1478 \behindforegroundpath{
1479
1480 \pgfscope
1481 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
1482 \divide \pgf@circ@res@step by 16
1483
1484 \pgfpathmoveto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
1485 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
1486 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@step}{0pt}}
1487 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1488 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
1489 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1490 \pgfusepath{draw,fill}
1491
1492 \endpgfscope
1493 }
1494
1495 }
1496
1497 %% Current arrow
1498
1499 \pgfdeclareshape{inputarrow}{
1500 \savedanchor{\tip}{
1501 \pgfpointorigin
1502 }
1503 \anchor{center}{
1504 \tip
1505 }
1506 \anchor{tip}{
1507 \tip
1508 }
1509 \behindforegroundpath{
1510
1511 \pgfscope
1512 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
1513 \divide \pgf@circ@res@step by 16
1514
1515 \pgfpathmoveto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}}
1516 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
1517 \pgfpathlineto{\pgfpoint{0pt}{0pt}}
1518 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1519 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}}
1520 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1521 \pgfusepath{fill}
1522
1523 \endpgfscope
1524 }
1525
1526 }
1527
1528
1529 %% box
1530
1531 \pgfdeclareshape{box}{
1532 \anchor{center}{
1533 \pgfpointorigin
1534 }
1535 \behindforegroundpath{
1536
1537 \pgfscope
1538 \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@Rlen
1539 \pgf@circ@res@step = 0.5\pgf@circ@res@step
1540 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1541 \pgfpathrectanglecorners{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@step}}{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1542 \pgfusepath{draw}
1543 \endpgfscope
1544 }
1545
1546 }
1547
1548 %%%---------- close: tex/pgfcircshapes
1549 %%%%%%%%%%% Springe nach tex/pgfcircmonopoles
1550 %%%---------- open: tex/pgfcircmonopoles.tex
1551 % Copyright 2007-2009 by Massimo Redaelli
1552 %
1553 % This file may be distributed and/or modified
1554 %
1555 % 1. under the LaTeX Project Public License and/or
1556 % 2. under the GNU Public License.
1557 %
1558 % See the file doc/LICENSE for more details.
1559
1560 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1561 %% Monopoles
1562
1563 %% Ground symbol
1564
1565 \pgfdeclareshape{ground}{
1566 \anchor{center}{
1567 \pgfpointorigin
1568 }
1569 \behindforegroundpath{
1570 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1571
1572 \pgfscope
1573 \pgfpathmoveto{\pgfpointorigin}
1574 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1575 \pgfusepath{draw}
1576
1577 \pgfstartlinewidth=\pgflinewidth
1578 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1579
1580 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1581 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1582 \pgfusepath{draw}
1583
1584 \pgfsetlinewidth{\pgfstartlinewidth}
1585 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1586 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1587 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1588 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1589 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1590 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1591 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1592 \pgfusepath{draw}
1593
1594
1595 \pgfsetlinewidth{\pgfstartlinewidth}
1596
1597 \endpgfscope
1598 }
1599
1600 }
1601
1602
1603
1604 \pgfdeclareshape{rground}{
1605 \anchor{center}{
1606 \pgfpointorigin
1607 }
1608 \behindforegroundpath{
1609 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1610
1611 \pgfscope
1612 \pgfpathmoveto{\pgfpointorigin}
1613 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1614 \pgfusepath{draw}
1615
1616 \pgfstartlinewidth=\pgflinewidth
1617 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1618
1619 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1620 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1621 \pgfusepath{draw}
1622
1623
1624 \pgfsetlinewidth{\pgfstartlinewidth}
1625
1626 \endpgfscope
1627 }
1628 }
1629
1630 \pgfdeclareshape{tground}{
1631 \anchor{center}{
1632 \pgfpointorigin
1633 }
1634 \behindforegroundpath{
1635 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1636
1637 \pgfscope
1638 \pgfpathmoveto{\pgfpointorigin}
1639 %\pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1640 \pgfusepath{draw}
1641
1642 \pgfstartlinewidth=\pgflinewidth
1643 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth}
1644
1645 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
1646 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
1647 \pgfusepath{draw}
1648
1649
1650 \pgfsetlinewidth{\pgfstartlinewidth}
1651
1652 \endpgfscope
1653 }
1654 }
1655
1656 \pgfdeclareshape{sground}{
1657 \anchor{center}{
1658 \pgfpointorigin
1659 }
1660 \behindforegroundpath{
1661 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1662
1663 \pgfscope
1664 \pgfpathmoveto{\pgfpointorigin}
1665 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1666 \pgfusepath{draw}
1667
1668 \pgfstartlinewidth=\pgflinewidth
1669 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1670
1671 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1672 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1673 \pgfpathlineto{\pgfpoint{0}{-1.8\pgf@circ@res@step}}
1674 \pgfpathclose
1675 \pgfusepath{draw}
1676
1677
1678 \pgfsetlinewidth{\pgfstartlinewidth}
1679
1680 \endpgfscope
1681 }
1682
1683 }
1684
1685 % noiseless ground
1686 \pgfdeclareshape{nground}{
1687 \anchor{center}{
1688 \pgfpointorigin
1689 }
1690 \behindforegroundpath{
1691 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1692
1693 \pgfscope
1694 \pgfpathmoveto{\pgfpointorigin}
1695 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1696 \pgfusepath{draw}
1697
1698 \pgfstartlinewidth=\pgflinewidth
1699 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1700
1701 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1702 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1703 \pgfusepath{draw}
1704
1705 \pgfsetlinewidth{\pgfstartlinewidth}
1706 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1707 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1708 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1709 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1710 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1711 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1712 \pgfusepath{draw}
1713
1714 \pgfpathmoveto{\pgfpoint{1.3\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1715 \pgfpatharc{0}{180}{1.3\pgf@circ@res@step}
1716 \pgfusepath{draw}
1717
1718 \pgfsetlinewidth{\pgfstartlinewidth}
1719 \endpgfscope
1720 }
1721 }
1722
1723 % protective ground
1724 \pgfdeclareshape{pground}{
1725 \anchor{center}{
1726 \pgfpointorigin
1727 }
1728 \behindforegroundpath{
1729 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1730
1731 \pgfscope
1732 \pgfpathmoveto{\pgfpointorigin}
1733 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1734 \pgfusepath{draw}
1735
1736 \pgfstartlinewidth=\pgflinewidth
1737 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1738
1739 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1740 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1741 \pgfpathcircle{\pgfpoint{0pt}{-\pgf@circ@res@step}} {1.2\pgf@circ@res@step}
1742 \pgfusepath{draw}
1743
1744 \pgfsetlinewidth{\pgfstartlinewidth}
1745 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1746 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1747 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1748 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1749 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1750 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1751 \pgfusepath{draw}
1752
1753 \pgfsetlinewidth{\pgfstartlinewidth}
1754 \endpgfscope
1755 }
1756 }
1757
1758 % chassis ground
1759 \pgfdeclareshape{cground}{
1760 \anchor{center}{
1761 \pgfpointorigin
1762 }
1763 \behindforegroundpath{
1764 \pgf@circ@res@step=\ctikzvalof{monopoles/chassis/width}\pgf@circ@Rlen
1765
1766 \pgfscope
1767 \pgfpathmoveto{\pgfpointorigin}
1768 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1769 \pgfusepath{draw}
1770
1771 \pgfpathmoveto{\pgfpoint{-1.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1772 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1773 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1774 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1775 \pgfpathmoveto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1776 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1777 \pgfusepath{draw}
1778 \endpgfscope
1779 }
1780 }
1781
1782 % Contributed by Leonardo Azzinnari
1783 \pgfdeclareshape{tlinestub}{
1784 \anchor{center}{\pgfpointorigin}
1785 \behindforegroundpath{
1786 \pgfstartlinewidth=\pgflinewidth
1787
1788 \pgf@circ@res@step=\ctikzvalof{bipoles/tline/width} \pgf@circ@Rlen
1789 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1790
1791 \pgfpathmoveto{\pgfpointorigin}
1792 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0pt}}
1793 \pgfusepath{draw}
1794 \pgfscope
1795 \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}}
1796 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1797 \pgfpathlineto{\pgfpoint{1.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1798 \pgfpatharc{90}{-90}{0.125\pgf@circ@res@step and 0.25\pgf@circ@res@step}
1799 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-0.25\pgf@circ@res@step}}
1800 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1801 \pgfusepath{draw}
1802 \endpgfscope
1803 }
1804 }
1805
1806
1807
1808
1809 \pgfdeclareshape{antenna}{
1810 \anchor{center}{\pgfpointorigin}
1811 \savedanchor{\northeast}{
1812 \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen
1813 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1814 \pgf@y=6\pgf@circ@res@step
1815 }
1816 \anchor{text}{
1817 \northeast
1818 \pgf@x=\ctikzvalof{monopoles/antenna/label/xanchor}\pgf@x
1819 \pgf@y=\ctikzvalof{monopoles/antenna/label/yanchor}\pgf@y
1820 }
1821 \behindforegroundpath{
1822 \pgfstartlinewidth=\pgflinewidth
1823 \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen
1824
1825 % \pgfpathmoveto{\pgfpointorigin}
1826 % \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1827 % \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1828 % \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1829
1830 \pgftransformxshift{ -4\pgf@circ@res@step }
1831
1832 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1833 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1834
1835 \pgfusepath{draw}
1836
1837 \pgfscope
1838 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1839 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1840 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1841 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1842 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1843 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1844 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1845 \pgfusepath{draw}
1846 \endpgfscope
1847 \pgfsetlinewidth{\pgfstartlinewidth}
1848
1849 }
1850 }
1851
1852
1853 \pgfdeclareshape{txantenna}{
1854 \anchor{center}{\pgfpointorigin}
1855 \savedanchor{\northeast}{
1856 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1857 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1858 \pgf@y=6\pgf@circ@res@step
1859 }
1860 \anchor{text}{
1861 \northeast
1862 \pgf@x=\ctikzvalof{monopoles/txantenna/label/xanchor}\pgf@x
1863 \pgf@y=\ctikzvalof{monopoles/txantenna/label/yanchor}\pgf@y
1864 }
1865 \behindforegroundpath{
1866 \pgfstartlinewidth=\pgflinewidth
1867 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1868
1869 \pgfpathmoveto{\pgfpointorigin}
1870 \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1871 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1872 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1873
1874 \pgfusepath{draw}
1875
1876 \pgfscope
1877 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1878 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1879 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1880 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1881 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1882 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1883 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1884 \pgfusepath{draw}
1885 \endpgfscope
1886 \pgfpathmoveto{\pgfpoint{5.5\pgf@circ@res@step}{6\pgf@circ@res@step}}
1887 % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step}
1888 \pgfpatharc{30}{-30}{2\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{6.25\pgf@circ@res@step}}
1889 \pgfpatharc{30}{-30}{2.5\pgf@circ@res@step}
1890 \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.5\pgf@circ@res@step}}
1891 \pgfpatharc{30}{-30}{3\pgf@circ@res@step}
1892 \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.75\pgf@circ@res@step}}
1893 \pgfpatharc{30}{-30}{3.5\pgf@circ@res@step}
1894 \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{7\pgf@circ@res@step}}
1895 \pgfpatharc{30}{-30}{4\pgf@circ@res@step}
1896 \pgfusepath{draw}
1897 \pgfsetlinewidth{\pgfstartlinewidth}
1898
1899 }
1900 }
1901
1902
1903 \pgfdeclareshape{rxantenna}{
1904 \anchor{center}{\pgfpointorigin}
1905 \savedanchor{\northeast}{
1906 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1907 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1908 \pgf@y=6\pgf@circ@res@step
1909 }
1910 \anchor{text}{
1911 \northeast
1912 \pgf@x=\ctikzvalof{monopoles/rxantenna/label/xanchor}\pgf@x
1913 \pgf@y=\ctikzvalof{monopoles/rxantenna/label/yanchor}\pgf@y
1914 }
1915 \behindforegroundpath{
1916 \pgfstartlinewidth=\pgflinewidth
1917 \pgf@circ@res@step=\ctikzvalof{monopoles/rxantenna/width}\pgf@circ@Rlen
1918
1919 \pgfpathmoveto{\pgfpointorigin}
1920 \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1921 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1922 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1923
1924 \pgfusepath{draw}
1925
1926 \pgfscope
1927 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1928 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1929 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1930 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1931 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1932 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1933 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1934 \pgfusepath{draw}
1935 \endpgfscope
1936
1937 \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{7\pgf@circ@res@step}}
1938 % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step}
1939 \pgfpatharc{150}{210}{4\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.75\pgf@circ@res@step}}
1940 \pgfpatharc{150}{210}{3.5\pgf@circ@res@step}
1941 \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.5\pgf@circ@res@step}}
1942 \pgfpatharc{150}{210}{3\pgf@circ@res@step}
1943 \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{6.25\pgf@circ@res@step}}
1944 \pgfpatharc{150}{210}{2.5\pgf@circ@res@step}
1945 \pgfpathmoveto{\pgfpoint{8\pgf@circ@res@step}{6\pgf@circ@res@step}}
1946 \pgfpatharc{150}{210}{2\pgf@circ@res@step}
1947 \pgfusepath{draw}
1948 \pgfsetlinewidth{\pgfstartlinewidth}
1949
1950 }
1951 }
1952
1953 % Vcc
1954 \pgfdeclareshape{vcc}{
1955 \anchor{center}{\pgfpointorigin}
1956 \anchor{text}{
1957 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
1958 \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}}
1959 \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}}
1960 \pgf@x=0pt
1961 \pgf@y=2\pgf@circ@res@step
1962 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
1963 \pgf@x=-.5\wd\pgfnodeparttextbox
1964 }
1965 \behindforegroundpath{
1966 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
1967 \pgfscope
1968 \pgfpathmoveto{\pgfpointorigin}
1969 \pgfpathlineto{\pgfpoint{0pt}{1.5\pgf@circ@res@step}}
1970 \pgfusepath{draw}
1971
1972 \pgfstartlinewidth=\pgflinewidth
1973 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1974
1975 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1976 \pgfpathlineto{\pgfpoint{0}{1.5\pgf@circ@res@step}}
1977 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1978 \pgfusepath{draw}
1979
1980 \pgfsetlinewidth{\pgfstartlinewidth}
1981
1982 \endpgfscope
1983 }
1984
1985 }
1986
1987 % Vee
1988 \pgfdeclareshape{vee}{
1989 \anchor{center}{\pgfpointorigin}
1990 \anchor{text}{
1991 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
1992 \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}}
1993 \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}}
1994 \pgf@x=0pt
1995 \pgf@y=-2\pgf@circ@res@step
1996 \advance \pgf@y by -1.5\ht\pgfnodeparttextbox
1997 \pgf@x=-.5\wd\pgfnodeparttextbox
1998 }
1999
2000 \behindforegroundpath{
2001 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
2002
2003 \pgfscope
2004 \pgfpathmoveto{\pgfpointorigin}
2005 \pgfpathlineto{\pgfpoint{0pt}{-1.5\pgf@circ@res@step}}
2006 \pgfusepath{draw}
2007
2008 \pgfstartlinewidth=\pgflinewidth
2009 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2010
2011 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
2012 \pgfpathlineto{\pgfpoint{0}{-1.5\pgf@circ@res@step}}
2013 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
2014 \pgfusepath{draw}
2015 \pgfsetlinewidth{\pgfstartlinewidth}
2016
2017 \endpgfscope
2018 }
2019
2020 }
2021
2022
2023 % match
2024 \pgfdeclareshape{match}{
2025 \anchor{center}{
2026 \pgfpointorigin
2027 }
2028 \anchor{text}{
2029 \pgf@x=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen
2030 \pgf@x=1.5\pgf@x
2031 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
2032 \pgf@y=-1.5\ht\pgfnodeparttextbox
2033 }
2034 \behindforegroundpath{
2035 \pgf@circ@res@step=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen
2036
2037 \pgfscope
2038 \pgfpathmoveto{\pgfpointorigin}
2039 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0pt}}
2040 \pgfusepath{draw}
2041
2042 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
2043 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
2044 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0}}
2045 \pgfusepath{fill}
2046
2047 \pgfsetlinewidth{\pgfstartlinewidth}
2048
2049 \endpgfscope
2050 }
2051
2052 }
2053
2054
2055 %%%---------- close: tex/pgfcircmonopoles
2056 %%%%%%%%%%% Springe nach tex/pgfcircbipoles
2057 %%%---------- open: tex/pgfcircbipoles.tex
2058 % Copyright 2007-2009 by Massimo Redaelli
2059 %
2060 % This file may be distributed and/or modified
2061 %
2062 % 1. under the LaTeX Project Public License and/or
2063 % 2. under the GNU Public License.
2064 %
2065 % See the file doc/LICENSE for more details.
2066
2067 %% Generic macro for defining a bipole shape
2068 % #1 - additional anchors
2069 % #2 - lower y-size of the bipole (from the center).
2070 % #3 - #shape is the name of the shape
2071 % #4 - upper y-size of the bipole (from the center)
2072 % #5 - width of the bipole
2073 % #6 - macros drawing the bipole
2074
2075
2076 \long\def\pgfcircdeclarebipole#1#2#3#4#5#6{
2077 \pgfdeclareshape{#3shape}{
2078
2079 \savedanchor{\northeast}{
2080 \pgf@y=#4\pgf@circ@Rlen
2081 \pgf@y=.5\pgf@y
2082 \pgf@x=#5\pgf@circ@Rlen
2083 \pgf@x=.5\pgf@x
2084 }
2085 \savedanchor{\northeastborder}{
2086 \pgf@y=#4\pgf@circ@Rlen
2087 \pgf@y=.5\pgf@y
2088 \pgf@y=\ctikzvalof{bipoles/border margin}\pgf@y
2089 \pgf@x=#5\pgf@circ@Rlen
2090 \pgf@x=.5\pgf@x
2091 \pgf@x=\ctikzvalof{bipoles/border margin}\pgf@x
2092 }
2093 \savedanchor{\southwestborder}{
2094 \pgf@y=-#2\pgf@circ@Rlen
2095 \pgf@y=.5\pgf@y
2096 \pgf@y=\ctikzvalof{bipoles/border margin}\pgf@y
2097 \pgf@x=-#5\pgf@circ@Rlen
2098 \pgf@x=.5\pgf@x
2099 \pgf@x=\ctikzvalof{bipoles/border margin}\pgf@x
2100 }
2101 \savedanchor{\southwest}{
2102 \pgf@y=-#2\pgf@circ@Rlen
2103 \pgf@y=.5\pgf@y
2104 \pgf@x=-#5\pgf@circ@Rlen
2105 \pgf@x=.5\pgf@x
2106 }
2107 \savedanchor{\centerpoint}{
2108 \pgf@circ@res@down=-#2\pgf@circ@Rlen
2109 \pgf@circ@res@up=#4\pgf@circ@Rlen
2110 \pgfpointorigin
2111 \pgf@y=\pgf@circ@res@up
2112 \advance\pgf@y by\pgf@circ@res@down
2113 \pgf@y=.5\pgf@y
2114 }
2115 \anchor{center}{\pgfpointorigin}
2116 \anchor{n}{
2117 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
2118 \pgf@x=0cm
2119 }
2120 \anchor{ne}{
2121 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
2122 }
2123 \anchor{nw}{
2124 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
2125 \pgf@x=-\pgf@x
2126 }
2127 \anchor{e}{%
2128 \ifpgf@circuit@bipole@reversed\else\southwest\northeast\fi
2129 \pgf@y=0cm
2130 }
2131 \anchor{s}{%
2132 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
2133 \pgf@x=0cm
2134 }
2135 \anchor{se}{%
2136 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
2137 \pgf@x=-\pgf@x
2138 }
2139 \anchor{sw}{%
2140 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
2141 }
2142 \anchor{w}{
2143 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
2144 \pgf@y=0cm
2145 }
2146 \anchor{north}{
2147 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
2148 \pgf@x=0cm
2149 }
2150 \anchor{east}{%
2151 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
2152 \pgf@y=0cm
2153 }
2154 \anchor{south}{%
2155 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
2156 \pgf@x=0cm
2157 }
2158 \anchor{west}{
2159 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
2160 \pgf@y=0cm
2161 }
2162 \anchor{right}{
2163 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
2164 \pgf@y=0cm
2165 }
2166 \anchor{above}{
2167 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
2168 \pgf@x=0cm
2169 }
2170 \anchor{left}{%
2171 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
2172 \pgf@y=0cm
2173 }
2174 \anchor{below}{%
2175 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
2176 \pgf@x=0cm
2177 }
2178 \anchor{a}{%
2179 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
2180 \pgf@y=0cm
2181 }
2182 \anchor{b} {
2183 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
2184 \pgf@y=0cm
2185 }
2186 \savedanchor{\textanchor}{%
2187 \pgf@y=\ht\pgfnodeparttextbox
2188 \pgf@x=-.5\wd\pgfnodeparttextbox
2189 }
2190 \anchor{text}{%
2191 \textanchor
2192 }
2193 \anchorborder{%
2194 \def\pgf@temp{false}
2195 \ifpgf@circuit@bipole@reversed\pgf@temp
2196 \pgf@circ@res@left=-\pgf@x
2197 \pgf@circ@res@right=-\pgf@y
2198 \else
2199 \pgf@circ@res@left=\pgf@x
2200 \pgf@circ@res@right=\pgf@y
2201 \fi
2202 \ifdim\pgf@circ@res@right>0cm
2203 \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\northeastborder}
2204 \else
2205 \southwestborder
2206 \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\pgfpoint{-\pgf@x}{-\pgf@y}}
2207 \fi
2208 }
2209
2210 #1
2211
2212 \backgroundpath{
2213 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
2214
2215 \northeast
2216 \pgf@circ@res@up = \pgf@y
2217 \pgf@circ@res@zero = 0cm
2218 \pgf@circ@res@left = -\pgf@x
2219 \pgf@circ@res@right = \pgf@x
2220 \southwest
2221 \pgf@circ@res@down = \pgf@y
2222
2223 \pgfstartlinewidth=\pgflinewidth
2224
2225 #6
2226
2227 \pgfsetlinewidth{\pgfstartlinewidth}
2228 }
2229 }
2230 }
2231
2232 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2233 %% Standard bipole shapes declarations
2234
2235 %% Resistor
2236 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/resistor/height}}{resistor}{\ctikzvalof{bipoles/resistor/height}}{\ctikzvalof{bipoles/resistor/width}}{
2237 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2238 \pgftransformationadjustments
2239 \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
2240 \divide \pgf@circ@res@step by 12
2241
2242 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
2243 \pgf@circ@res@other = \pgf@circ@res@left
2244 \advance\pgf@circ@res@other by \pgf@circ@res@step
2245 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
2246 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2247 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2248 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2249 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
2250 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2251 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2252 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2253 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
2254 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2255 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2256 \advance\pgf@circ@res@other by \pgf@circ@res@step
2257 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
2258 \pgfsetbeveljoin
2259 \pgfusepath{draw}
2260 }
2261
2262
2263
2264 %% Variable resistor
2265 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistor/height}}{vresistor}{\ctikzvalof{bipoles/vresistor/height}}{\ctikzvalof{bipoles/vresistor/width}}{ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2266 \pgftransformationadjustments
2267 \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
2268 \divide \pgf@circ@res@step by 12
2269
2270 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
2271
2272 \pgf@circ@res@other = \pgf@circ@res@left
2273 \advance\pgf@circ@res@other by \pgf@circ@res@step
2274 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
2275 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2276 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
2277 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2278 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
2279 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2280 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
2281 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2282 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
2283 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2284 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
2285 \advance\pgf@circ@res@other by \pgf@circ@res@step
2286 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
2287 \pgfsetbeveljoin
2288 \pgfusepath{draw}
2289
2290 \pgfscope
2291 \pgfsetarrowsend{latex'}
2292 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@other}{\pgf@circ@res@up}}
2293 \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@other}{\pgf@circ@res@down}}
2294 \pgfusepath{draw}
2295 \endpgfscope
2296 }
2297
2298
2299
2300 %% Capacitor
2301
2302 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/capacitor/height}}{capacitor}{\ctikzvalof{bipoles/capacitor/height}}{\ctikzvalof{bipoles/capacitor/width}}{
2303 \pgf@circ@res@step = \ctikzvalof{bipoles/capacitor/width}\pgf@circ@Rlen
2304 \divide \pgf@circ@res@step by 5
2305
2306 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2307 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2308 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
2309
2310 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2311 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2312 \pgfusepath{draw}
2313 }
2314
2315
2316 %% Polar Capacitor
2317
2318 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pcapacitor/height}}{polarcapacitor}{\ctikzvalof{bipoles/pcapacitor/height}}{\ctikzvalof{bipoles/pcapacitor/width}}{
2319 \pgf@circ@res@step = \ctikzvalof{bipoles/pcapacitor/width}\pgf@circ@Rlen
2320 \divide \pgf@circ@res@step by 5
2321
2322 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2323
2324 \pgfscope
2325 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left+ \ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}{\pgf@circ@res@up}}
2326 \pgftransformrotate{-90}
2327 \pgfpathsine{\pgfpoint{\pgf@circ@res@up}{-\ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}}
2328 \pgfpathcosine{\pgfpoint{\pgf@circ@res@up}{\ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}}
2329 \pgfusepath{draw}
2330 \endpgfscope
2331
2332 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2333 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2334 \pgfusepath{draw}
2335
2336 }
2337
2338 %% Electrolytic Capacitor
2339
2340 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ecapacitor/height}}{ecapacitor}{\ctikzvalof{bipoles/ecapacitor/height}}{\ctikzvalof{bipoles/ecapacitor/width}}{
2341 \pgf@circ@res@step = \ctikzvalof{bipoles/ecapacitor/width}\pgf@circ@Rlen
2342 \divide \pgf@circ@res@step by 5
2343 \pgfsetrectcap
2344 % % % Draw plus pole
2345 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2346 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2347 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@up}}
2348 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
2349 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
2350 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2351 \pgfsetfillcolor{white}
2352 \pgfusepath{draw,fill}
2353 % % Draw minus pole
2354 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2355 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2356 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@down}}
2357 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2358 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2359 \pgfsetfillcolor{black}
2360 \pgfusepath{draw,fill}
2361 \pgfsetfillcolor{black}
2362 % % plus pole annotation
2363 \pgftext[right,at=\pgfpoint{1.2\pgf@circ@res@left}{.6\pgf@circ@res@up}]
2364 {\pgfkeysvalueof{/tikz/circuitikz/bipoles/ecapacitor/font} $+$}
2365 }
2366
2367 %% Battery
2368
2369 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery/height}}{battery}{\ctikzvalof{bipoles/battery/height}}{\ctikzvalof{bipoles/battery/width}}{
2370 \pgf@circ@res@step = \ctikzvalof{bipoles/battery/width}\pgf@circ@Rlen
2371 \divide \pgf@circ@res@step by 6
2372
2373 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2374 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@up}}
2375 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.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@step}{.5\pgf@circ@res@up}}
2381 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{.5\pgf@circ@res@down}}
2382
2383 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2384 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2385
2386 \pgfusepath{draw}
2387 }
2388
2389
2390 %% Battery 1
2391
2392 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery1/height}}{battery1}{\ctikzvalof{bipoles/battery1/height}}{\ctikzvalof{bipoles/battery1/width}}{
2393 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{0}}
2394 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
2395 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{0}}
2396 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}}
2397 \pgfusepath{draw}
2398
2399 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2400 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@up}}
2401 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@down}}
2402
2403 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@up}}
2404 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@down}}
2405
2406
2407
2408
2409 \pgfusepath{draw}
2410 }
2411
2412
2413
2414 %% cute inductor
2415
2416 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/lower coil height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
2417 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2418 \pgftransformationadjustments
2419
2420 \pgfmathsetlength{\pgf@circ@res@other}%width of small coil
2421 {0.5*\ctikzvalof{bipoles/cuteinductor/coil aspect}*\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/cuteinductor/coils}-1)}
2422
2423
2424 \pgfmathsetlength{\pgf@circ@res@step}
2425 {(\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/cuteinductor/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/cuteinductor/coils}/2}
2426
2427 \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
2428 \foreach \x in {2,...,\ctikzvalof{bipoles/cuteinductor/coils}}
2429 {
2430 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up}
2431 \pgfpatharc{0}{-180}{\pgf@circ@res@other and -\pgf@circ@res@down}
2432 }
2433 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up}
2434 \pgfsetbuttcap
2435 \pgfsetbeveljoin
2436 \pgfusepath{stroke}
2437 }
2438
2439 %% variable cute inductor
2440
2441 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcuteinductor/lower coil height}}{vcuteinductor}{\ctikzvalof{bipoles/vcuteinductor/height}}{\ctikzvalof{bipoles/vcuteinductor/width}}{
2442 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2443 \pgftransformationadjustments
2444
2445 \pgfmathsetlength{\pgf@circ@res@other}%width of small coil
2446 {0.5*\ctikzvalof{bipoles/vcuteinductor/coil aspect}*\ctikzvalof{bipoles/vcuteinductor/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/vcuteinductor/coils}-1)}
2447
2448
2449 \pgfmathsetlength{\pgf@circ@res@step}
2450 {(\ctikzvalof{bipoles/vcuteinductor/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/vcuteinductor/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/vcuteinductor/coils}/2}
2451
2452 \pgfscope
2453 \pgfsetarrowsend{latex'}
2454 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
2455 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2456 \pgfusepath{draw}
2457 \endpgfscope
2458
2459 \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
2460 \foreach \x in {2,...,\ctikzvalof{bipoles/vcuteinductor/coils}}
2461 {
2462 \pgfpatharc{180}{0}{\pgf@circ@res@step and .5\pgf@circ@res@up}
2463 \pgfpatharc{0}{-180}{\pgf@circ@res@other and -.5\pgf@circ@res@down}
2464 }
2465 \pgfpatharc{180}{0}{\pgf@circ@res@step and .5\pgf@circ@res@up}
2466 \pgfsetbuttcap
2467 \pgfsetbeveljoin
2468 \pgfusepath{stroke}
2469 }
2470
2471 %% american inductor
2472
2473 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/americaninductor/height 2}}{americaninductor}{\ctikzvalof{bipoles/americaninductor/height}}{\ctikzvalof{bipoles/americaninductor/width}}{
2474 \pgf@circ@res@step=\ctikzvalof{bipoles/americaninductor/width}\pgf@circ@Rlen
2475 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2476 \pgftransformationadjustments
2477 \advance \pgf@circ@res@step by \pgfhorizontaltransformationadjustment\pgflinewidth
2478 \divide \pgf@circ@res@step by \ctikzvalof{bipoles/americaninductor/coils}
2479 \divide \pgf@circ@res@step by 2
2480 \pgf@circ@res@other = \ctikzvalof{bipoles/americaninductor/coil height}\pgf@circ@Rlen
2481
2482 \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
2483 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2484 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2485 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2486 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2487 \pgfsetbuttcap
2488 \pgfsetbeveljoin
2489 \pgfusepath{stroke}
2490 }
2491
2492 %% variable american inductor
2493
2494 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{
2495 \pgf@circ@res@step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf@circ@Rlen
2496 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2497 \pgftransformationadjustments
2498 \advance \pgf@circ@res@step by \pgfhorizontaltransformationadjustment\pgflinewidth
2499 \divide \pgf@circ@res@step by \ctikzvalof{bipoles/vamericaninductor/coils}
2500 \divide \pgf@circ@res@step by 2
2501 \pgf@circ@res@other = \ctikzvalof{bipoles/vamericaninductor/coil height}\pgf@circ@Rlen
2502
2503 \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
2504 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2505 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2506 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2507 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2508 \pgfsetbuttcap
2509 \pgfsetbeveljoin
2510 \pgfusepath{stroke}
2511
2512 \pgfscope
2513 \pgfsetarrowsend{latex'}
2514 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
2515 \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@up}}
2516 \pgfusepath{draw}
2517 \endpgfscope
2518 }
2519
2520
2521 %% Independent voltage source
2522
2523 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsource/height}}{vsource}{\ctikzvalof{bipoles/vsource/height}}{\ctikzvalof{bipoles/vsource/width}}{
2524
2525 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2526
2527 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2528 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2529 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2530 \pgfusepath{draw}
2531 }
2532
2533
2534 %% Independent voltage source - American style
2535
2536 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourceam/height}}{vsourceAM}{\ctikzvalof{bipoles/vsourceam/height}}{\ctikzvalof{bipoles/vsourceam/width}}{
2537
2538 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2539
2540 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2541
2542 \ifpgf@circ@oldvoltagedirection
2543 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$+$}
2544 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$-$}
2545 \else
2546 \ifpgf@circuit@bipole@voltage@backward
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 \else
2550 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$-$}
2551 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$+$}
2552 \fi
2553 \fi
2554 \pgfusepath{draw}
2555 }
2556
2557
2558
2559 %% Independent sinusoidal voltage source
2560
2561 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesin/height}}{vsourcesin}{\ctikzvalof{bipoles/vsourcesin/height}}{\ctikzvalof{bipoles/vsourcesin/width}}{
2562
2563 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2564 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2565 \pgfusepath{draw}
2566
2567 \pgf@circ@res@up = .5\pgf@circ@res@up
2568 \pgfscope
2569 \pgftransformrotate{90}
2570 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2571 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2572 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2573 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2574 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2575 \pgfusepath{draw}
2576 \endpgfscope
2577 }
2578
2579 % Triangle Voltage source - contributed by Ralf Farkas
2580 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcetri/height}}{vsourcetri}{\ctikzvalof{bipoles/vsourcetri/height}}{\ctikzvalof{bipoles/vsourcetri/width}}{
2581
2582 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2583 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2584 \pgfusepath{draw}
2585
2586 \pgf@circ@res@up = .5\pgf@circ@res@up
2587 \pgfscope
2588 \pgftransformrotate{90}
2589 \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}}
2590 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@up}{0.75\pgf@circ@res@up}}
2591 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@up}{-0.75\pgf@circ@res@up}}
2592 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}}
2593 \pgfusepath{draw}
2594 \endpgfscope
2595 }
2596
2597
2598 % contributed by Alistair Kwan
2599 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesquare/height}}{vsourcesquare}{\ctikzvalof{bipoles/vsourcesquare/height}}{\ctikzvalof{bipoles/vsourcesquare/width}}{
2600
2601 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2602 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2603 \pgfusepath{draw}
2604
2605 \pgf@circ@res@up = .5\pgf@circ@res@up
2606 \pgfscope
2607 \pgftransformrotate{90}
2608 \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}}
2609 \pgfpathlineto{\pgfpoint{-1\pgf@circ@res@up}{1\pgf@circ@res@up}}
2610 \pgfpathlineto{\pgfpoint{0\pgf@circ@res@up}{1\pgf@circ@res@up}}
2611 \pgfpathlineto{\pgfpoint{0\pgf@circ@res@up}{-1\pgf@circ@res@up}}
2612 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{-1\pgf@circ@res@up}}
2613 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}}
2614 \pgfusepath{draw}
2615 \endpgfscope
2616 }
2617
2618 % Triangle Voltage source - contributed by Ralf Farkas
2619 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcetri/height}}{vsourcetri}{\ctikzvalof{bipoles/vsourcetri/height}}{\ctikzvalof{bipoles/vsourcetri/width}}{
2620
2621 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2622 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2623 \pgfusepath{draw}
2624
2625 \pgf@circ@res@up = .5\pgf@circ@res@up
2626 \pgfscope
2627 \pgftransformrotate{90}
2628 \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}}
2629 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@up}{0.75\pgf@circ@res@up}}
2630 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@up}{-0.75\pgf@circ@res@up}}
2631 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}}
2632 \pgfusepath{draw}
2633 \endpgfscope
2634 }
2635
2636
2637 %% Empty Source
2638 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/esource/height}}{esource}{\ctikzvalof{bipoles/esource/height}}{\ctikzvalof{bipoles/esource/width}}{
2639 \pgfpointorigin
2640 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2641 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2642 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2643 \pgfusepath{draw}
2644 }
2645
2646 %% PV Source
2647 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pvsource/height}}{pvsource}{\ctikzvalof{bipoles/pvsource/height}}{\ctikzvalof{bipoles/pvsource/width}}{
2648 \pgfpointorigin
2649 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2650 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2651 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2652 \pgfusepath{draw}
2653
2654 %Adapted from battery1
2655 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@right}{0}}
2656 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
2657 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@left}{0}}
2658 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}}
2659 \pgfusepath{draw}
2660
2661 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2662 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@left}{.4\pgf@circ@res@up}}
2663 \pgfpathlineto{\pgfpoint{.15\pgf@circ@res@left}{.4\pgf@circ@res@down}}
2664
2665 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@right}{.6\pgf@circ@res@up}}
2666 \pgfpathlineto{\pgfpoint{.15\pgf@circ@res@right}{.6\pgf@circ@res@down}}
2667 \pgfusepath{draw}
2668
2669 %Arrow Part
2670 \pgfscope
2671 \pgfsetarrowsend{latex}
2672 \pgfpathmoveto{\pgfpointadd{\pgfpoint{.3\pgf@circ@res@left}{0}}{\pgfpointpolar{-45}{2.2\pgf@circ@res@up}}}
2673 \pgfpathlineto{\pgfpointadd{\pgfpoint{.3\pgf@circ@res@left}{0}}{\pgfpointpolar{-45}{1.3\pgf@circ@res@up}}}
2674 \pgfusepath{draw}
2675 \pgfpathmoveto{\pgfpointadd{\pgfpoint{0}{0.3\pgf@circ@res@up}}{\pgfpointpolar{-45}{2.2\pgf@circ@res@up}}}
2676 \pgfpathlineto{\pgfpointadd{\pgfpoint{0}{0.3\pgf@circ@res@up}}{\pgfpointpolar{-45}{1.3\pgf@circ@res@up}}}
2677 \pgfusepath{draw}
2678 \endpgfscope
2679
2680 }
2681
2682 %% Empty Source
2683 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/esource/height}}{esource}{\ctikzvalof{bipoles/esource/height}}{\ctikzvalof{bipoles/esource/width}}{
2684 \pgfpointorigin
2685 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2686 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2687 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2688 \pgfusepath{draw}
2689 }
2690
2691 %% DC Current Source with open shape
2692 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dcisource/height}}{dcisource}{\ctikzvalof{bipoles/dcisource/height}}{\ctikzvalof{bipoles/dcisource/width}}{
2693 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2694 \pgfpathmoveto{\pgfpointorigin}
2695 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}}\pgfpatharc{0}{90}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2696 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}}\pgfpatharc{0}{-90}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2697 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}\pgfpatharc{180}{270}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2698 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}\pgfpatharc{180}{90}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2699 \pgfusepath{draw}
2700 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2701 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@zero}}
2702 \pgfusepath{draw}
2703 \pgfscope
2704 \ifpgf@circ@oldvoltagedirection
2705 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2706 \else
2707 \ifpgf@circuit@bipole@current@backward
2708 \pgftransformshift{\pgfpoint{-.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2709 \pgftransformrotate{180}
2710 \else
2711 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2712 \fi\fi
2713 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
2714 \endpgfscope
2715 }
2716
2717 %% DC-Voltage source
2718 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dcvsource/height}}{dcvsource}{\ctikzvalof{bipoles/dcvsource/height}}{\ctikzvalof{bipoles/dcvsource/width}}{
2719 \pgfpointorigin
2720 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2721 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2722 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2723 \pgfusepath{draw}
2724 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@up}{.5\pgf@circ@res@left}}
2725 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@up}{.5\pgf@circ@res@right}}
2726 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@down}{.5\pgf@circ@res@left}}
2727 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@down}{.5\pgf@circ@res@right}}
2728 \pgfusepath{draw}
2729 }
2730
2731
2732 %% Independent current source
2733
2734 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isource}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
2735 \pgfpointorigin
2736 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2737 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2738 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2739 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
2740 \pgfusepath{draw}
2741 }
2742
2743 %% Independent double oo source
2744
2745 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/oosource/height}}{oosource}{\ctikzvalof{bipoles/oosource/height}}{\ctikzvalof{bipoles/oosource/width}}{
2746 \pgfpointorigin
2747 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2748 \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf@circ@res@left}{0}}
2749 {\ctikzvalof{bipoles/oosource/circlesize}\pgf@circ@res@left}
2750 \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf@circ@res@right}{0}}
2751 {\ctikzvalof{bipoles/oosource/circlesize}\pgf@circ@res@right}
2752 \pgfusepath{draw}
2753 }
2754
2755
2756 %% Independent current source - American
2757
2758 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isourceam/height}}{isourceAM}{\ctikzvalof{bipoles/isourceam/height}}{\ctikzvalof{bipoles/isourceam/width}}{
2759 \pgfpointorigin
2760 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2761 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2762 \pgfusepath{draw}
2763
2764 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2765 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@zero}}
2766 \pgfusepath{draw}
2767 \pgfscope
2768 \ifpgf@circ@oldvoltagedirection
2769 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2770 \else
2771 \ifpgf@circuit@bipole@current@backward
2772 \pgftransformshift{\pgfpoint{-.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2773 \pgftransformrotate{180}
2774 \else
2775 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2776 \fi\fi
2777 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
2778 \endpgfscope
2779 }
2780
2781
2782
2783
2784 %% Independent sinusoidal current source
2785
2786 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isourcesin}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
2787 \pgfpointorigin
2788 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2789 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2790 \pgfusepath{draw}
2791
2792 \pgf@circ@res@up = .5\pgf@circ@res@up
2793 \pgfscope
2794 \pgftransformrotate{90}
2795 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2796 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2797 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2798 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2799 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2800 \pgfusepath{draw}
2801 \endpgfscope
2802
2803 }
2804
2805
2806 %% Controlled voltage source
2807
2808 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsource/height}}{cvsource}{\ctikzvalof{bipoles/cvsource/height}}{\ctikzvalof{bipoles/cvsource/width}}{
2809
2810 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2811
2812 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2813 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2814 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2815 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2816 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2817 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2818 \pgfusepath{draw}
2819 }
2820
2821
2822
2823
2824 %% Controlled voltage source - American
2825
2826 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourceam/height}}{cvsourceAM}{\ctikzvalof{bipoles/cvsourceam/height}}{\ctikzvalof{bipoles/cvsourceam/width}}{
2827
2828 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2829
2830 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2831 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2832 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2833 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2834 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2835 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@left]{$+$}
2836 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@right]{$-$}
2837 \pgfusepath{draw}
2838 }
2839
2840
2841 %% Controlled sinusoidal voltage source
2842
2843 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cvsourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
2844
2845 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2846
2847 \pgfscope
2848 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2849 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2850 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2851 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2852 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2853 \pgfusepath{draw}
2854 \endpgfscope
2855
2856 \pgf@circ@res@up = .5\pgf@circ@res@up
2857 \pgfscope
2858 \pgftransformrotate{90}
2859 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2860 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2861 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2862 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2863 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2864 \pgfusepath{draw}
2865 \endpgfscope
2866 }
2867
2868
2869
2870 %% Controlled sinusoidal current source
2871
2872 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cisourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
2873
2874 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2875
2876 \pgfscope
2877 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2878 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2879 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2880 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2881 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2882 \pgfusepath{draw}
2883 \endpgfscope
2884
2885 \pgf@circ@res@up = .5\pgf@circ@res@up
2886 \pgfscope
2887 \pgftransformrotate{90}
2888 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2889 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2890 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2891 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2892 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2893 \pgfusepath{draw}
2894 \endpgfscope
2895 }
2896
2897
2898
2899
2900 %% Controlled current source
2901
2902 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisource/height}}{cisource}{\ctikzvalof{bipoles/cisource/height}}{\ctikzvalof{bipoles/cisource/width}}{
2903
2904 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2905
2906 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2907 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2908 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2909 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2910 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2911 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2912 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2913 \pgfusepath{draw}
2914 }
2915
2916
2917
2918
2919 %% Controlled current source - American
2920
2921 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisourceam/height}}{cisourceAM}{\ctikzvalof{bipoles/cisourceam/height}}{\ctikzvalof{bipoles/cisourceam/width}}{
2922
2923 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2924
2925 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2926 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2927 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2928 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2929 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2930 \pgfusepath{draw}
2931
2932 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2933 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@zero}}
2934 \pgfusepath{draw}
2935 \pgfscope
2936 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2937 \pgfnode{currarrow}{center}{}{}{\pgfusepath{draw}}
2938 \endpgfscope
2939 }
2940
2941 %% Black generic diode
2942
2943 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulldiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2944
2945 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2946
2947 \pgfscope
2948 \pgftransformxshift{\pgf@circ@res@left}
2949 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2950 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2951 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2952 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2953 \pgfusepath{draw,fill}
2954 \endpgfscope
2955 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2956 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2957 \pgfusepath{draw}
2958 }
2959
2960 %% Black Zener diode
2961
2962 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2963
2964 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2965
2966 \pgfscope
2967 \pgftransformxshift{\pgf@circ@res@left}
2968 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2969 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2970 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2971 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2972 \pgfusepath{draw,fill}
2973 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2974 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2975 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2976 \pgfusepath{draw}
2977 \endpgfscope
2978 }
2979
2980 %% Black alternative zigzag Zener diode
2981 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2982
2983 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2984
2985 \pgfscope
2986 \pgftransformxshift{\pgf@circ@res@left}
2987 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2988 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2989 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2990 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2991 \pgfusepath{draw,fill}
2992 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@up}}
2993 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2994 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2995 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@down}}
2996 \pgfusepath{draw}
2997 \endpgfscope
2998 }
2999
3000 %% Black Schottky diode
3001
3002 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullsdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3003
3004 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3005 \pgfscope
3006 \pgftransformxshift{\pgf@circ@res@left}
3007 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3008 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3009 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3010 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3011 \pgfusepath{draw,fill}
3012
3013 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@down}}
3014 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3015 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3016 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3017 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3018 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3019 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@up}}
3020 \pgfusepath{draw}
3021 \endpgfscope
3022
3023 }
3024
3025 %% Black tunnel diode
3026
3027 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulltdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3028
3029 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3030 \pgfscope
3031 \pgftransformxshift{\pgf@circ@res@left}
3032 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3033 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3034 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3035 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3036 \pgfusepath{draw,fill}
3037
3038 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3039 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3040 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3041 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3042 \pgfusepath{draw}
3043 \endpgfscope
3044 }
3045
3046 %% Black light emitting diode
3047
3048 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulllediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3049
3050 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3051 \pgfscope
3052 \pgftransformxshift{\pgf@circ@res@left}
3053 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3054 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3055 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3056 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3057 \pgfusepath{draw,fill}
3058 \endpgfscope
3059 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3060 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3061 \pgfusepath{draw}
3062
3063 \pgfsetlinewidth{\pgfstartlinewidth}
3064 \pgfsetarrowsend{latex'}
3065 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
3066 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
3067 \pgfusepath{draw}
3068 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
3069 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
3070 \pgfusepath{draw}
3071
3072 }
3073
3074 %% Black photodiode
3075
3076 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullpdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3077
3078 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3079 \pgfscope
3080 \pgftransformxshift{\pgf@circ@res@left}
3081 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3082 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3083 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3084 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3085 \pgfusepath{draw,fill}
3086 \endpgfscope
3087 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3088 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3089 \pgfusepath{draw}
3090
3091 \pgfsetlinewidth{\pgfstartlinewidth}
3092 \pgfsetarrowsstart{latex'}
3093 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
3094 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
3095 \pgfusepath{draw}
3096 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
3097 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
3098 \pgfusepath{draw}
3099 }
3100
3101 %% Black varcap
3102
3103 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{fullvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
3104
3105 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3106 \pgfscope
3107 \pgftransformxshift{\pgf@circ@res@left}
3108 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{0pt}}
3109 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3110 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3111 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{0pt}}
3112 \pgfusepath{draw,fill}
3113
3114 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3115 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3116 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3117 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3118 \pgfusepath{draw}
3119
3120 \endpgfscope
3121 }
3122
3123 %% Empty generic diode
3124
3125 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptydiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3126
3127
3128 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3129
3130 \pgfscope
3131 \pgftransformxshift{\pgf@circ@res@left}
3132 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3133 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3134 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3135 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3136 \pgfusepath{draw}
3137 \endpgfscope
3138 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3139 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3140 \pgfusepath{draw}
3141 }
3142
3143 %% Empty Zener diode
3144
3145 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3146
3147 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3148
3149 \pgfscope
3150 \pgftransformxshift{\pgf@circ@res@left}
3151 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3152 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3153 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3154 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3155 \pgfusepath{draw}
3156 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3157 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3158 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3159 \pgfusepath{draw}
3160 \endpgfscope
3161 }
3162
3163 %% Empty alternative zigzag Zener diode
3164 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3165
3166 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3167
3168 \pgfscope
3169 \pgftransformxshift{\pgf@circ@res@left}
3170 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3171 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3172 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3173 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3174 \pgfusepath{draw}
3175 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@up}}
3176 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3177 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3178 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@down}}
3179 \pgfusepath{draw}
3180 \endpgfscope
3181 }
3182 %% Empty Schottky diode
3183
3184 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptysdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3185
3186 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3187 \pgfscope
3188 \pgftransformxshift{\pgf@circ@res@left}
3189 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3190 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3191 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3192 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3193 \pgfusepath{draw}
3194
3195 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@down}}
3196 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3197 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3198 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3199 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3200 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3201 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@up}}
3202 \pgfusepath{draw}
3203 \endpgfscope
3204
3205 }
3206
3207 %% Empty tunnel diode
3208
3209 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptytdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3210
3211 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3212 \pgfscope
3213 \pgftransformxshift{\pgf@circ@res@left}
3214 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3215 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3216 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3217 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3218 \pgfusepath{draw}
3219
3220 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3221 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3222 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3223 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3224 \pgfusepath{draw}
3225 \endpgfscope
3226 }
3227
3228 %% Empty light emitting diode
3229
3230 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptylediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3231
3232 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3233 \pgfscope
3234 \pgftransformxshift{\pgf@circ@res@left}
3235 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3236 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3237 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3238 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3239 \pgfusepath{draw}
3240 \endpgfscope
3241 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3242 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3243 \pgfusepath{draw}
3244
3245 \pgfsetlinewidth{\pgfstartlinewidth}
3246 \pgfsetarrowsend{latex'}
3247 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
3248 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
3249 \pgfusepath{draw}
3250 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
3251 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
3252 \pgfusepath{draw}
3253 }
3254
3255 %% Empty photodiode
3256
3257 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptypdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3258
3259 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3260 \pgfscope
3261 \pgftransformxshift{\pgf@circ@res@left}
3262 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3263 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3264 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3265 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3266 \pgfusepath{draw}
3267 \endpgfscope
3268 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3269 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3270 \pgfusepath{draw}
3271
3272 \pgfsetlinewidth{\pgfstartlinewidth}
3273 \pgfsetarrowsstart{latex'}
3274 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
3275 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
3276 \pgfusepath{draw}
3277 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
3278 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
3279 \pgfusepath{draw}
3280 }
3281
3282 %% Empty varcap
3283
3284 \pgfcircdeclarebipole{
3285 \anchor{strokepathstart}{
3286 \northeast
3287 \pgf@y=0cm
3288 \pgf@x=.8\pgf@x
3289 }
3290 \anchor{strokepathend}{
3291 \northeast
3292 \pgf@y=0cm
3293 }
3294 }{\ctikzvalof{bipoles/varcap/height}}{emptyvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
3295
3296 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3297 \pgfscope
3298 \pgftransformxshift{\pgf@circ@res@left}
3299 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{0pt}}
3300 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3301 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3302 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{0pt}}
3303 \pgfusepath{draw}
3304
3305 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3306 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3307 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3308 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3309 \pgfusepath{draw}
3310
3311 \endpgfscope
3312 }
3313
3314 %% SPST
3315
3316 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{spst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
3317
3318 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3319
3320 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3321 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
3322 \pgfpathmoveto{\pgfpoint{.9\pgf@circ@res@left}{.9\pgf@circ@res@up}}
3323 \pgfpatharc{65}{25}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf@circ@Rlen}
3324 %\pgfsetarrowsend{latex'}
3325 \pgfusepath{draw}
3326
3327 \pgfpathmoveto{\pgfpoint{.1\pgf@circ@res@right}{-.25\pgf@circ@res@up}}
3328 \pgfpathlineto{\pgfpoint{.14\pgf@circ@res@right}{-.35\pgf@circ@res@up}}
3329 \pgfsetarrowsend{latex'}
3330 \pgfusepath{draw}
3331
3332 }
3333
3334 %% Closing SPST
3335
3336 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{cspst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
3337
3338 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3339
3340 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3341 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
3342 \pgfpathmoveto{\pgfpoint{.9\pgf@circ@res@left}{.9\pgf@circ@res@up}}
3343 \pgfpatharc{65}{25}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf@circ@Rlen}
3344 %\pgfsetarrowsend{latex'}
3345 \pgfusepath{draw}
3346
3347 }
3348
3349 %% Opening SPST
3350
3351 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{ospst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
3352
3353 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3354
3355 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3356 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
3357 \pgfpathmoveto{\pgfpoint{.3\pgf@circ@res@right}{.1\pgf@circ@res@down}}
3358 \pgfpatharc{15}{50}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf@circ@Rlen}
3359 %\pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
3360 \pgfusepath{draw}
3361
3362 \pgfpathmoveto{\pgfpoint{.85\pgf@circ@res@left}{1.25\pgf@circ@res@up}}
3363 \pgfpathlineto{\pgfpoint{.87\pgf@circ@res@left}{1.26\pgf@circ@res@up}}
3364 \pgfsetarrowsend{latex'}
3365 \pgfusepath{draw}
3366
3367
3368 }
3369
3370
3371 %% Push Button
3372
3373 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pushbutton/height 2}}{pushbutton}{\ctikzvalof{bipoles/pushbutton/height}}{\ctikzvalof{bipoles/pushbutton/width}}{
3374
3375 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3376 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@up}}
3377 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}
3378 \pgfpathmoveto{\pgfpoint{0}{.5\pgf@circ@res@up}}
3379 \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@up}}
3380 \pgfusepath{draw}
3381
3382 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3383 \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
3384 \pgftransformshift{\pgfpoint{2\pgf@circ@res@right}{0pt}}
3385 \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
3386 }
3387
3388 %METERINGSHAPE
3389 \long\def\drawmeteringcircle{
3390 \def\pgf@circ@temp{right}
3391 \ifx\tikz@res@label@pos\pgf@circ@temp
3392 \pgf@circ@res@step=-1.2\pgf@circ@res@up
3393 \else
3394 \def\pgf@circ@temp{below}
3395 \ifx\tikz@res@label@pos\pgf@circ@temp
3396 \pgf@circ@res@step=-1.2\pgf@circ@res@up
3397 \else
3398 \pgf@circ@res@step=1.2\pgf@circ@res@up
3399 \fi
3400 \fi
3401 %draw connections to circle
3402 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3403 \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@left}{\pgf@circ@res@zero}}
3404 \pgfpathmoveto{\pgfpoint{.9\pgf@circ@res@right}{\pgf@circ@res@zero}}
3405 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
3406 \pgfusepath{draw}
3407 %draw circle
3408 \pgfscope
3409 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3410 \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
3411 \pgfusepath{draw}
3412 \endpgfscope
3413 %draw arrow
3414 \pgfscope
3415 \pgfsetarrowsend{latex}
3416 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3417 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3418 \pgfusepath{draw}
3419 \endpgfscope
3420 }
3421 %AMPEREMETER
3422 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ammeter/height}}{ammeter}{\ctikzvalof{bipoles/ammeter/height}}{\ctikzvalof{bipoles/ammeter/width}}{
3423 \drawmeteringcircle
3424 \pgfnode{circle}{center}{\textbf{A}}{}{}
3425 }
3426 %OHMMETER
3427 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ohmmeter/height}}{ohmmeter}{\ctikzvalof{bipoles/ohmmeter/height}}{\ctikzvalof{bipoles/ohmmeter/width}}{
3428 \drawmeteringcircle
3429 \pgfnode{circle}{center}{\boldmath$\Omega$}{}{}
3430 }
3431 %VOLTMETER
3432 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/voltmeter/height}}{voltmeter}{\ctikzvalof{bipoles/voltmeter/height}}{\ctikzvalof{bipoles/voltmeter/width}}{
3433 \drawmeteringcircle
3434 \pgfnode{circle}{center}{\textbf{V}}{}{}
3435
3436 }
3437
3438 %% Short circuit
3439
3440 \pgfcircdeclarebipole{}{0}{short}{0}{0}{ }
3441
3442 %% Open circuit
3443
3444 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/open/height}}{open}{\ctikzvalof{bipoles/open/height}}{\ctikzvalof{bipoles/open/width}}{
3445
3446 }
3447
3448 %% Generic bipole - used as resistor by some (bleah)
3449
3450 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/generic/height}}{generic}{\ctikzvalof{bipoles/generic/height}}{\ctikzvalof{bipoles/generic/width}}{
3451
3452 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3453 %\divide \pgf@circ@res@step by 14
3454
3455 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3456 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3457
3458 \pgfusepath{draw}
3459 }
3460
3461
3462 %% fuse
3463
3464 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fuse/height}}{fuse}{\ctikzvalof{bipoles/fuse/height}}{\ctikzvalof{bipoles/fuse/width}}{
3465
3466 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
3467 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
3468 \pgfusepath{draw}
3469
3470 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3471 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3472
3473 \pgfusepath{draw}
3474 }
3475
3476
3477
3478 %% Generic bipole, filled - used as inductor by some (bleah)
3479
3480 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fullgeneric/height}}{fullgeneric}{\ctikzvalof{bipoles/fullgeneric/height}}{\ctikzvalof{bipoles/fullgeneric/width}}{
3481
3482 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3483 %\divide \pgf@circ@res@step by 14
3484
3485 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3486 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3487
3488 \pgfusepath{draw,fill}
3489 }
3490
3491
3492 %% Generic asymmetric bipole
3493
3494 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ageneric/height}}{ageneric}{\ctikzvalof{bipoles/ageneric/height}}{\ctikzvalof{bipoles/ageneric/width}}{
3495 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3496 %\divide \pgf@circ@res@step by 14
3497
3498 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3499 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3500
3501 \pgfusepath{draw}
3502
3503 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3504 \pgfusepath{stroke,fill}
3505 }
3506
3507
3508 %% asymmetric fuse
3509
3510 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/afuse/height}}{afuse}{\ctikzvalof{bipoles/afuse/height}}{\ctikzvalof{bipoles/afuse/width}}{
3511
3512 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
3513 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
3514 \pgfusepath{draw}
3515
3516 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3517 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3518
3519 \pgfusepath{draw}
3520
3521 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3522 \pgfusepath{stroke,fill}
3523 }
3524
3525
3526
3527
3528 %% Memristor
3529
3530 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/memristor/height}}{memristor}{\ctikzvalof{bipoles/memristor/height}}{\ctikzvalof{bipoles/memristor/width}}{
3531 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3532 \divide \pgf@circ@res@step by 14
3533
3534 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3535 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3536
3537 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3538 \pgfpathlineto{\pgfpoint{.72*\pgf@circ@res@left}{0pt}}
3539 \pgfpathlineto{\pgfpoint{.72*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3540 \pgfpathlineto{\pgfpoint{.35*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3541 \pgfpathlineto{\pgfpoint{.35*\pgf@circ@res@left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3542 \pgfpathlineto{\pgfpoint{-.05*\pgf@circ@res@left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3543 \pgfpathlineto{\pgfpoint{-.05*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3544 \pgfpathlineto{\pgfpoint{.42*\pgf@circ@res@right}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3545 \pgfpathlineto{\pgfpoint{.42*\pgf@circ@res@right}{0pt}}
3546 \pgfpathlineto{\pgfpoint{.8*\pgf@circ@res@right}{0pt}}
3547
3548 \pgfusepath{draw}
3549
3550 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3551 \pgfusepath{stroke,fill}
3552 }
3553
3554
3555
3556
3557 %% Generic empty tunable
3558
3559 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tgeneric/height}}{tgeneric}{\ctikzvalof{bipoles/tgeneric/height}}{\ctikzvalof{bipoles/tgeneric/width}}{
3560 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}}
3561 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3562 \pgfusepath{draw}
3563
3564 \pgfscope
3565 \pgfsetarrowsend{latex'}
3566 \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}}
3567 \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}}
3568 \pgfusepath{draw}
3569 \endpgfscope
3570 }
3571
3572 %% Photoresistor
3573
3574 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/photoresistor/height 2}}{photoresistor}{\ctikzvalof{bipoles/photoresistor/height}}{\ctikzvalof{bipoles/photoresistor/width}}{
3575 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@down}}
3576 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3577 \pgfusepath{draw}
3578
3579 \pgfscope
3580 \pgfsetarrowsend{latex'}
3581 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}
3582 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{-1.2\pgf@circ@res@down}}
3583 \pgfusepath{draw}
3584 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@right}{\pgf@circ@res@up}}
3585 \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@right}{-1.2\pgf@circ@res@down}}
3586 \pgfusepath{draw}
3587 \endpgfscope
3588 }
3589
3590
3591
3592
3593 %% Thermistor
3594 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistor/height}}{thermistor}{\ctikzvalof{bipoles/thermistor/height}}{\ctikzvalof{bipoles/thermistor/width}}{
3595 \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}}
3596 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3597 \pgfusepath{draw}
3598
3599 %\pgfscope
3600 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}}
3601 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
3602 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3603 \pgfusepath{draw}
3604 %\endpgfscope
3605 }
3606
3607
3608 %% Thermistor PTC
3609 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorptc/height 2}}{thermistorptc}{\ctikzvalof{bipoles/thermistorptc/height}}{\ctikzvalof{bipoles/thermistorptc/width}}{
3610 \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}}
3611 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3612 \pgfusepath{draw}
3613
3614 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3615 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}}
3616 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
3617 \pgfusepath{draw}
3618
3619 \pgfsetlinewidth{\pgfstartlinewidth}
3620 \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$}
3621 \pgfsetarrowsend{latex'}
3622 \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}}
3623 \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3624 \pgfusepath{draw}
3625 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}}
3626 \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3627 \pgfusepath{draw}
3628 }
3629
3630 %% Thermistor NTC
3631 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorntc/height 2}}{thermistorntc}{\ctikzvalof{bipoles/thermistorntc/height}}{\ctikzvalof{bipoles/thermistorntc/width}}{
3632 \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}}
3633 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3634 \pgfusepath{draw}
3635
3636 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3637 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}}
3638 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
3639 \pgfusepath{draw}
3640
3641 \pgfsetlinewidth{\pgfstartlinewidth}
3642 \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$}
3643 \pgfsetarrowsend{latex'}
3644 \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}}
3645 \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3646 \pgfusepath{draw}
3647 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3648 \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}}
3649 \pgfusepath{draw}
3650 }
3651
3652 %% thermocouple
3653 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermocouple/height 2}}{thermocouple}{\ctikzvalof{bipoles/thermocouple/height}}{\ctikzvalof{bipoles/thermocouple/width}}{
3654
3655 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
3656 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
3657 \pgfusepath{draw}
3658 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
3659 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3660 \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@down}}
3661 \pgfusepath{draw}
3662 \pgfsetlinewidth{\pgfstartlinewidth}
3663 \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@down}}
3664 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}
3665 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
3666 \pgfusepath{draw}
3667 }
3668
3669 %% Varistor
3670 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varistor/height}}{varistor}{\ctikzvalof{bipoles/varistor/height}}{\ctikzvalof{bipoles/varistor/width}}{
3671 \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}}
3672 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3673 \pgfusepath{draw}
3674
3675 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}}
3676 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
3677 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3678 \pgfusepath{draw}
3679
3680 \pgftext[top,x=.65\pgf@circ@res@left,y=1.2\pgf@circ@res@down]{{\tiny\textsf{U}}}
3681 }
3682
3683
3684
3685 %% Generic full tunable
3686
3687 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tfullgeneric/height}}{tfullgeneric}{\ctikzvalof{bipoles/tfullgeneric/height}}{\ctikzvalof{bipoles/tfullgeneric/width}}{
3688 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3689 \divide \pgf@circ@res@step by 14
3690
3691 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}}
3692 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3693 \pgfusepath{draw,fill}
3694
3695 \pgfscope
3696 \pgfsetarrowsend{latex'}
3697 \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}}
3698 \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}}
3699 \pgfusepath{draw}
3700 \endpgfscope
3701 }
3702
3703
3704
3705
3706
3707
3708
3709 %% Variable Capacitor
3710
3711 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcapacitor/height}}{vcapacitor}{\ctikzvalof{bipoles/vcapacitor/height}}{\ctikzvalof{bipoles/vcapacitor/width}}{
3712 %\pgf@circ@res@step = \ctikzvalof{bipoles/vcapacitor/width}\pgf@circ@Rlen
3713 \pgf@circ@res@step = \ctikzvalof{bipoles/vcapacitor/capacitor width} \pgf@circ@res@right
3714
3715 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3716 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@up}}
3717 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@down}}
3718
3719 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
3720 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
3721 \pgfusepath{draw}
3722
3723 \pgfscope
3724 \pgfsetarrowsend{latex'}
3725 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3726 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3727 \pgfusepath{draw}
3728 \endpgfscope
3729
3730 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3731 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
3732 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3733 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3734 \pgfsetlinewidth{\pgfstartlinewidth}
3735 \pgfusepath{draw}
3736 }
3737
3738
3739 %% Piezoelectric Element
3740
3741 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piezoelectric/height}}{piezoelectric}{\ctikzvalof{bipoles/piezoelectric/height}}{\ctikzvalof{bipoles/piezoelectric/width}}{
3742 \pgf@circ@res@step = \ctikzvalof{bipoles/piezoelectric/width}\pgf@circ@Rlen
3743 \divide \pgf@circ@res@step by 5
3744
3745 %% Outer markings
3746 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3747 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3748 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3749
3750 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3751 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3752 \pgfusepath{draw}
3753
3754 %% Inner Box
3755 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3756 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left+4}{\pgf@circ@res@up-1}}{\pgfpoint{\pgf@circ@res@right-4}{\pgf@circ@res@down+1}}
3757 \pgfusepath{draw}
3758
3759 }
3760
3761
3762
3763
3764
3765 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3766 %% Handling of terminals
3767
3768
3769 %% Easily usable styles
3770
3771 \ctikzset{o-o/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=empty}}
3772 \ctikzset{-o/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=empty}}
3773 \ctikzset{o-/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=none}}
3774 \ctikzset{*-o/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=empty}}
3775 \ctikzset{o-*/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=full}}
3776 \ctikzset{d-o/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=empty}}
3777 \ctikzset{o-d/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=diamond}}
3778 \ctikzset{*-/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=none}}
3779 \ctikzset{-*/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=full}}
3780 \ctikzset{d-/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=none}}
3781 \ctikzset{-d/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=diamond}}
3782 \ctikzset{*-*/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=full}}
3783 \ctikzset{d-*/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=full}}
3784 \ctikzset{*-d/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=diamond}}
3785 \ctikzset{d-d/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=diamond}}
3786
3787 \tikzset{reversed/.style = {\circuitikzbasekey/bipole/reversed=true}}
3788
3789
3790 %% The output routine
3791
3792 \def\drawpoles{
3793 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{diamond} }
3794 \ifx\pgf@temp\pgf@circ@temp
3795 { (\tikztostart) node[diamond] {} }
3796 \else
3797 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{empty} }
3798 \ifx\pgf@temp\pgf@circ@temp
3799 { (\tikztostart) node[ocirc] {} }
3800 \else
3801 \pgfextra{ \def\pgf@temp{full} }
3802 \ifx\pgf@temp\pgf@circ@temp
3803 { (\tikztostart) node[circ] {} }
3804 \fi
3805 \fi
3806 \fi
3807 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{diamond} }
3808 \ifx\pgf@temp\pgf@circ@temp
3809 { (\tikztotarget) node[diamond] {} }
3810 \else
3811 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{empty} }
3812 \ifx\pgf@temp\pgf@circ@temp
3813 { (\tikztotarget) node[ocirc] {} }
3814 \else
3815 \pgfextra{ \def\pgf@temp{full} }
3816 \ifx\pgf@temp\pgf@circ@temp
3817 { (\tikztotarget) node[circ] {} }
3818 \fi
3819 \fi
3820 \fi
3821 }
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842 %% Lamp
3843
3844 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lamp/height}}{lamp}{\ctikzvalof{bipoles/lamp/height}}{\ctikzvalof{bipoles/lamp/width}}{
3845
3846 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3847
3848 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
3849 \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@up}}
3850 \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@down}}
3851 \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@down}}
3852 \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@up}}
3853 \pgfusepath{draw}
3854 }
3855
3856
3857 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tline/height}
3858 }{tline}{\ctikzvalof{bipoles/tline/height}
3859 }{\ctikzvalof{bipoles/tline/width}
3860 }
3861 {
3862 \pgf@circ@res@step=.2\pgf@circ@res@right % half x axis
3863 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3864 \pgfpathellipse{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{0}}
3865 {\pgfpoint{\pgf@circ@res@step}{0}}
3866 {\pgfpoint{0}{-\pgf@circ@res@up}}
3867 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@up}}
3868 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@step}{\pgf@circ@res@up}}
3869 \pgfpatharc{-90}{90}{-\pgf@circ@res@step and -\pgf@circ@res@up}
3870 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@down}}
3871 \pgfusepath{draw}
3872 }
3873
3874
3875
3876
3877 %% SQUID added by Cor Molenaar 5 March 2010
3878
3879 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/squid/height}}{squid}{\ctikzvalof{bipoles/squid/height}}{\ctikzvalof{bipoles/squid/width}}{
3880
3881 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3882
3883 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
3884 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{1.35*\pgf@circ@res@up}}
3885 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.65*\pgf@circ@res@up}}
3886 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.65*\pgf@circ@res@up}}
3887 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{1.35*\pgf@circ@res@up}}
3888 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{1.35*\pgf@circ@res@down}}
3889 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.65*\pgf@circ@res@down}}
3890 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.65*\pgf@circ@res@down}}
3891 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{1.35*\pgf@circ@res@down}}
3892
3893 \pgfusepath{draw}
3894 }
3895
3896
3897
3898 % Generic barrier added by Cor Molenaar 5 March 2010
3899
3900 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/barrier/height}}{barrier}{\ctikzvalof{bipoles/barrier/height}}{\ctikzvalof{bipoles/barrier/width}}{
3901
3902 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3903
3904 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@step}}
3905 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@step}}
3906 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@up}}
3907 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@down}}
3908 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@down}}
3909 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@up}}
3910
3911 \pgfusepath{draw}
3912 }
3913
3914
3915 % Contributed by Danilo Piazzalunga
3916
3917 \pgfdeclareshape{buffer}
3918 {
3919 \anchor{center}{\pgfpointorigin}
3920 \savedanchor\northwest{%
3921 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3922 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/height}\pgf@y
3923 \pgf@y=.5\pgf@y
3924 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3925 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/width}\pgf@x
3926 \pgf@x=.5\pgf@x
3927 }
3928 \anchor{south}{
3929 \northwest
3930 \pgf@y=-\pgf@y
3931 }
3932 \savedanchor\left{%
3933 \pgf@y=0pt
3934 }
3935 \anchor{in}{
3936 \northwest
3937 \pgf@y=0pt
3938 }
3939 \anchor{out}{
3940 \northwest
3941 \pgf@y=0pt
3942 \pgf@x=-\pgf@x
3943 }
3944
3945 \backgroundpath{
3946 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
3947
3948
3949 \northwest
3950 \pgf@circ@res@up = \pgf@y
3951 \pgf@circ@res@down = -\pgf@y
3952 \pgf@circ@res@right = -\pgf@x
3953 \pgf@circ@res@left = \pgf@x
3954
3955 \pgfscope
3956 \pgfsetlinewidth{2\pgflinewidth}
3957 \pgftransformxshift{.7\pgf@circ@res@left}
3958 \pgf@circ@res@step=\pgf@circ@res@right
3959 \advance\pgf@circ@res@step by -\pgf@circ@res@left
3960 \pgf@circ@res@step=.7\pgf@circ@res@step
3961
3962 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3963 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3964 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3965 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3966 \pgfusepath{draw}
3967 \endpgfscope
3968
3969 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3970 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
3971
3972 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3973 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
3974
3975 \pgfusepath{draw}
3976
3977 }
3978 }
3979
3980
3981
3982
3983
3984 \pgfdeclareshape{plain amp}
3985 {
3986 \anchor{center}{\pgfpointorigin}
3987 \savedanchor\northwest{%
3988 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3989 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@y
3990 \pgf@y=.5\pgf@y
3991 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3992 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@x
3993 \pgf@x=.5\pgf@x
3994 }
3995 \anchor{south}{
3996 \northwest
3997 \pgf@y=-\pgf@y
3998 }
3999 \savedanchor\left{%
4000 \pgf@y=0pt
4001 }
4002 \savedanchor\inOne{%
4003 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4004 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@y
4005 \pgf@y=.5\pgf@y
4006 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@y
4007 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4008 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@x
4009 \pgf@x=.5\pgf@x
4010 }
4011 \anchor{-}{
4012 \inOne
4013 }
4014 \anchor{+}{
4015 \inOne
4016 \pgf@y=-\pgf@y
4017 }
4018 \savedanchor\up{%
4019 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4020 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@y
4021 \pgf@y=.5\pgf@y
4022 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4023 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@x
4024 \pgf@x=.5\pgf@x
4025 \pgf@circ@res@up = \pgf@y
4026 \pgf@circ@res@right = -\pgf@x
4027 \pgf@circ@res@left = \pgf@x
4028 \pgfpointlineattime{
4029 \pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/up pos}}{
4030 \pgfpoint{
4031 \pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
4032 {\pgf@circ@res@up}}
4033 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
4034 }
4035 \anchor{up}{
4036 \up
4037 }
4038 \anchor{down}{
4039 \up
4040 \pgf@y=-\pgf@y
4041 }
4042 \anchor{out}{
4043 \northwest
4044 \pgf@y=0pt
4045 \pgf@x=-\pgf@x
4046 }
4047
4048 \backgroundpath{
4049 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
4050
4051
4052 \northwest
4053 \pgf@circ@res@up = \pgf@y
4054 \pgf@circ@res@down = -\pgf@y
4055 \pgf@circ@res@right = -\pgf@x
4056 \pgf@circ@res@left = \pgf@x
4057
4058 \pgfpathmoveto{\pgfpoint
4059 {\pgf@circ@res@left}
4060 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@up}}
4061 \pgfpathlineto{\pgfpoint
4062 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
4063 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@up}}
4064
4065
4066 \pgfpathmoveto{\pgfpoint
4067 {\pgf@circ@res@left}
4068 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@down}}
4069 \pgfpathlineto{\pgfpoint
4070 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
4071 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@down}}
4072
4073 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
4074 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
4075
4076 \pgfusepath{draw}
4077
4078
4079 \pgfscope
4080 \pgfsetlinewidth{2\pgflinewidth}
4081 \pgftransformxshift{.7\pgf@circ@res@left}
4082 \pgf@circ@res@step=\pgf@circ@res@right
4083 \advance\pgf@circ@res@step by -\pgf@circ@res@left
4084 \pgf@circ@res@step=.7\pgf@circ@res@step
4085
4086 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
4087 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
4088 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
4089 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
4090 \pgfusepath{draw}
4091 \endpgfscope
4092
4093
4094
4095 }
4096 }
4097
4098 %% Generic two port box
4099 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/twoport/height}}{twoport}{\ctikzvalof{bipoles/twoport/height}}{\ctikzvalof{bipoles/twoport/width}}{
4100 \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@Rlen
4101 \divide \pgf@circ@res@step by 2
4102
4103 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4104 \pgf@circ@res@other = \pgf@circ@res@left
4105 \advance\pgf@circ@res@other by \pgf@circ@res@step
4106 \ifpgf@circuit@dashed
4107 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4108 \fi
4109 % draw outer box
4110 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4111 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4112 \pgfusepath{draw}
4113
4114 \ifpgf@circuit@inputarrow
4115 {
4116 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4117 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4118 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4119 }
4120 \fi
4121
4122 % rotate inner symbol
4123 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4124 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4125 \pgftransformrotate{270}
4126 \fi\fi
4127 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4128 \pgftransformrotate{180}
4129 \fi\fi
4130 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4131 \pgftransformrotate{90}
4132 \fi\fi
4133
4134 % draw inner symbol
4135 \pgftext[center,x=0,y=0]{\ctikzvalof{bipoles/twoport/text}}
4136
4137 }
4138
4139 %% voltage controled oscillator
4140 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vco/width}}{vco}{\ctikzvalof{bipoles/twoport/width}}{\ctikzvalof{bipoles/vco/width}}{
4141 \pgf@circ@res@step = \ctikzvalof{bipoles/vco/width}\pgf@circ@Rlen
4142 \divide \pgf@circ@res@step by 2
4143
4144 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4145 \pgf@circ@res@other = \pgf@circ@res@left
4146 \advance\pgf@circ@res@other by \pgf@circ@res@step
4147
4148 \ifpgf@circuit@dashed
4149 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4150 \fi
4151 % draw circle
4152 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4153 \pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@step}
4154 \pgfusepath{draw}
4155
4156 \ifpgf@circuit@inputarrow
4157 {
4158 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4159 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4160 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4161 }
4162 \fi
4163
4164 % rotate inner symbol
4165 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4166 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4167 \pgftransformrotate{270}
4168 \fi\fi
4169 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4170 \pgftransformrotate{180}
4171 \fi\fi
4172 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4173 \pgftransformrotate{90}
4174 \fi\fi
4175
4176 % draw inner sine waves
4177 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4178 \pgfsetlinewidth{\pgfstartlinewidth}
4179 \pgfpathmoveto{\pgfpoint{-.5\pgf@circ@res@step}{0\pgf@circ@res@step}}
4180 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4181 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4182 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4183 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4184 \pgfusepath{draw}
4185
4186 }
4187
4188 %% bandpass filter
4189 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/bandpass/width}}{bandpass}{\ctikzvalof{bipoles/bandpass/width}}{\ctikzvalof{bipoles/bandpass/width}}{
4190
4191 \pgf@circ@res@step = \ctikzvalof{bipoles/bandpass/width}\pgf@circ@Rlen
4192 \divide \pgf@circ@res@step by 2
4193
4194 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4195 \pgf@circ@res@other = \pgf@circ@res@left
4196 \advance\pgf@circ@res@other by \pgf@circ@res@step
4197
4198 \ifpgf@circuit@dashed
4199 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4200 \fi
4201
4202 % draw outer box
4203 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4204 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4205 \pgfusepath{draw}
4206
4207 \ifpgf@circuit@inputarrow
4208 {
4209 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4210 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4211 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4212 }
4213 \fi
4214
4215 % rotate inner symbol
4216 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4217 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4218 \pgftransformrotate{270}
4219 \fi\fi
4220 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4221 \pgftransformrotate{180}
4222 \fi\fi
4223 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4224 \pgftransformrotate{90}
4225 \fi\fi
4226
4227 % draw inner symbol
4228 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4229 \pgfsetarrows{-} %never draw arrows
4230 \pgfsetlinewidth{\pgfstartlinewidth}
4231 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
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 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{0.35\pgf@circ@res@step}}
4238 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}}
4239 \pgfusepath{draw}
4240
4241 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
4242 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4243 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4244 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4245 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4246 \pgfusepath{draw}
4247
4248 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4249 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4250 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4251 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4252 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4253 \pgfusepath{draw}
4254 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}}
4255 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
4256 \pgfusepath{draw}
4257 }
4258
4259 %% highpass filter
4260 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/highpass/width}}{highpass}{\ctikzvalof{bipoles/highpass/width}}{\ctikzvalof{bipoles/highpass/width}}{
4261 \pgf@circ@res@step = \ctikzvalof{bipoles/highpass/width}\pgf@circ@Rlen
4262 \divide \pgf@circ@res@step by 2
4263
4264 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4265 \pgf@circ@res@other = \pgf@circ@res@left
4266 \advance\pgf@circ@res@other by \pgf@circ@res@step
4267
4268 \ifpgf@circuit@dashed
4269 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4270 \fi
4271
4272 % draw outer box
4273 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4274 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4275 \pgfusepath{draw}
4276
4277 \ifpgf@circuit@inputarrow
4278 {
4279 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4280 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4281 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4282 }
4283 \fi
4284
4285 % rotate inner symbol
4286 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4287 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4288 \pgftransformrotate{270}
4289 \fi\fi
4290 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4291 \pgftransformrotate{180}
4292 \fi\fi
4293 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4294 \pgftransformrotate{90}
4295 \fi\fi
4296
4297 % draw inner symbol
4298 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4299 \pgfsetarrows{-} %never draw arrows
4300 \pgfsetlinewidth{\pgfstartlinewidth}
4301 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
4302 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4303 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4304 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4305 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4306 \pgfusepath{draw}
4307
4308 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
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.15\pgf@circ@res@step}}
4315 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
4316 \pgfusepath{draw}
4317
4318 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4319 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4320 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4321 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4322 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4323 \pgfusepath{draw}
4324 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}}
4325 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
4326 \pgfusepath{draw}
4327 }
4328
4329 %% lowpass filter
4330 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lowpass/width}}{lowpass}{\ctikzvalof{bipoles/lowpass/width}}{\ctikzvalof{bipoles/lowpass/width}}{
4331 \pgf@circ@res@step = \ctikzvalof{bipoles/lowpass/width}\pgf@circ@Rlen
4332 \divide \pgf@circ@res@step by 2
4333
4334 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4335 \pgf@circ@res@other = \pgf@circ@res@left
4336 \advance\pgf@circ@res@other by \pgf@circ@res@step
4337
4338 \ifpgf@circuit@dashed
4339 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4340 \fi
4341
4342 % draw outer box
4343 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4344 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4345 \pgfusepath{draw}
4346
4347 \ifpgf@circuit@inputarrow
4348 {
4349 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4350 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4351 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4352 }
4353 \fi
4354
4355 % rotate inner symbol
4356 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4357 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4358 \pgftransformrotate{270}
4359 \fi\fi
4360 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4361 \pgftransformrotate{180}
4362 \fi\fi
4363 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4364 \pgftransformrotate{90}
4365 \fi\fi
4366
4367 % draw inner symbol
4368 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4369 \pgfsetarrows{-} %never draw arrows
4370 \pgfsetlinewidth{\pgfstartlinewidth}
4371 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
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.35\pgf@circ@res@step}}
4378 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}}
4379 \pgfusepath{draw}
4380
4381 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
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 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
4388 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
4389 \pgfusepath{draw}
4390
4391 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4392 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4393 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4394 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4395 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4396 \pgfusepath{draw}
4397 }
4398
4399 %% ADC
4400 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/adc/width}}{adc}{\ctikzvalof{bipoles/adc/width}}{\ctikzvalof{bipoles/adc/width}}{
4401 \pgf@circ@res@step = \ctikzvalof{bipoles/adc/width}\pgf@circ@Rlen
4402 \divide \pgf@circ@res@step by 2
4403
4404 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4405 \pgf@circ@res@other = \pgf@circ@res@left
4406 \advance\pgf@circ@res@other by \pgf@circ@res@step
4407
4408 \ifpgf@circuit@dashed
4409 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4410 \fi
4411
4412 % draw outer box
4413 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4414 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4415 \pgfusepath{draw}
4416
4417 \ifpgf@circuit@inputarrow
4418 {
4419 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4420 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4421 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4422 }
4423 \fi
4424
4425 % rotate inner symbol
4426 \def\texti{A}
4427 \def\textii{D}
4428 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4429 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4430 \def\texti{D}
4431 \def\textii{A}
4432 \pgftransformrotate{270}
4433 \fi\fi
4434 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4435 \def\texti{D}
4436 \def\textii{A}
4437 \pgftransformrotate{180}
4438 \fi\fi
4439 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4440 \pgftransformrotate{90}
4441 \def\texti{A}
4442 \def\textii{D}
4443 \fi\fi
4444
4445 % draw inner symbol
4446 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4447 \pgfsetarrows{-} %never draw arrows
4448 \pgfsetlinewidth{\pgfstartlinewidth}
4449 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
4450 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
4451 \pgfusepath{draw}
4452
4453 \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}}
4454 \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}}
4455 }
4456
4457 %% DAC
4458 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dac/width}}{dac}{\ctikzvalof{bipoles/dac/width}}{\ctikzvalof{bipoles/dac/width}}{
4459 \pgf@circ@res@step = \ctikzvalof{bipoles/dac/width}\pgf@circ@Rlen
4460 \divide \pgf@circ@res@step by 2
4461
4462 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4463 \pgf@circ@res@other = \pgf@circ@res@left
4464 \advance\pgf@circ@res@other by \pgf@circ@res@step
4465
4466 \ifpgf@circuit@dashed
4467 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4468 \fi
4469
4470 % draw outer box
4471 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4472 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4473 \pgfusepath{draw}
4474
4475 \ifpgf@circuit@inputarrow
4476 {
4477 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4478 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4479 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4480 }
4481 \fi
4482
4483 % rotate inner symbol
4484 \def\texti{D}
4485 \def\textii{A}
4486 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4487 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4488 \def\texti{A}
4489 \def\textii{D}
4490 \pgftransformrotate{270}
4491 \fi\fi
4492 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4493 \def\texti{A}
4494 \def\textii{D}
4495 \pgftransformrotate{180}
4496 \fi\fi
4497 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4498 \pgftransformrotate{90}
4499 \def\texti{D}
4500 \def\textii{A}
4501 \fi\fi
4502
4503 % draw inner symbol
4504 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4505 \pgfsetarrows{-} %never draw arrows
4506 \pgfsetlinewidth{\pgfstartlinewidth}
4507 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
4508 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
4509 \pgfusepath{draw}
4510
4511 \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}}
4512 \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}}
4513 }
4514
4515 %% DSP
4516 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dsp/width}}{dsp}{\ctikzvalof{bipoles/dsp/width}}{\ctikzvalof{bipoles/dsp/width}}{
4517 \pgf@circ@res@step = \ctikzvalof{bipoles/dsp/width}\pgf@circ@Rlen
4518 \divide \pgf@circ@res@step by 2
4519
4520 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4521 \pgf@circ@res@other = \pgf@circ@res@left
4522 \advance\pgf@circ@res@other by \pgf@circ@res@step
4523
4524 \ifpgf@circuit@dashed
4525 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4526 \fi
4527
4528 % draw outer box
4529 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4530 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4531 \pgfusepath{draw}
4532
4533 \ifpgf@circuit@inputarrow
4534 {
4535 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4536 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4537 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4538 }
4539 \fi
4540
4541 % rotate inner symbol
4542 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4543 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4544 \pgftransformrotate{270}
4545 \fi\fi
4546 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4547 \pgftransformrotate{180}
4548 \fi\fi
4549 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4550 \pgftransformrotate{90}
4551 \fi\fi
4552
4553 % draw inner symbol
4554 \pgftext[center,x=0,y=0]{\textsf{DSP}}
4555 }
4556
4557 %% FFT
4558 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fft/width}}{fft}{\ctikzvalof{bipoles/fft/width}}{\ctikzvalof{bipoles/fft/width}}{
4559 \pgf@circ@res@step = \ctikzvalof{bipoles/fft/width}\pgf@circ@Rlen
4560 \divide \pgf@circ@res@step by 2
4561
4562 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4563 \pgf@circ@res@other = \pgf@circ@res@left
4564 \advance\pgf@circ@res@other by \pgf@circ@res@step
4565
4566 \ifpgf@circuit@dashed
4567 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4568 \fi
4569
4570 % draw outer box
4571 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4572 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4573 \pgfusepath{draw}
4574
4575 \ifpgf@circuit@inputarrow
4576 {
4577 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4578 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4579 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4580 }
4581 \fi
4582
4583 % rotate inner symbol
4584 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4585 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4586 \pgftransformrotate{270}
4587 \fi\fi
4588 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4589 \pgftransformrotate{180}
4590 \fi\fi
4591 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4592 \pgftransformrotate{90}
4593 \fi\fi
4594
4595 % draw inner symbol
4596 \pgftext[center,x=0,y=0]{\textsf{FFT}}
4597 }
4598
4599 %% Amplifier
4600 \pgfcircdeclarebipole{}{
4601 \ifpgf@circuit@boxed
4602 \ctikzvalof{bipoles/twoport/width}
4603 \else
4604 \ctikzvalof{bipoles/amp/width}
4605 \fi
4606 }{amp}{
4607 \ifpgf@circuit@boxed
4608 \ctikzvalof{bipoles/twoport/width}
4609 \else
4610 \ctikzvalof{bipoles/amp/width}
4611 \fi
4612 }{
4613 \ifpgf@circuit@boxed
4614 \ctikzvalof{bipoles/twoport/width}
4615 \else
4616 \ctikzvalof{bipoles/amp/width}
4617 \fi
4618 }{
4619 \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@Rlen
4620
4621 \ifpgf@circuit@dashed
4622 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4623 \fi
4624
4625 % draw outer box
4626 \ifpgf@circuit@boxed
4627 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4628 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
4629 \fi
4630
4631 % draw input arrow
4632 \ifpgf@circuit@inputarrow
4633 {
4634 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4635 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4636 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4637 }
4638 \fi
4639
4640 \ifpgf@circuit@boxed
4641 \pgfsetlinewidth{\pgfstartlinewidth}
4642 \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn
4643 \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box
4644 \else
4645 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4646 \fi
4647
4648 \pgfsetarrows{-} %never draw arrows
4649 \pgfsetlinewidth{\pgfstartlinewidth}
4650
4651 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
4652 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
4653 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
4654
4655 \pgfpathclose
4656 \pgfusepath{draw}
4657
4658 % draw inner text
4659 \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
4660 }
4661
4662
4663 %% variable amplifier
4664 \pgfcircdeclarebipole{}{
4665 \ifpgf@circuit@boxed
4666 \ctikzvalof{bipoles/twoport/width}
4667 \else
4668 \ctikzvalof{bipoles/amp/width}
4669 \fi
4670 }{vamp}{
4671 \ifpgf@circuit@boxed
4672 \ctikzvalof{bipoles/twoport/width}
4673 \else
4674 \ctikzvalof{bipoles/amp/width}
4675 \fi
4676 }{
4677 \ifpgf@circuit@boxed
4678 \ctikzvalof{bipoles/twoport/width}
4679 \else
4680 \ctikzvalof{bipoles/amp/width}
4681 \fi
4682 }{
4683 \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@Rlen
4684
4685 \ifpgf@circuit@dashed
4686 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4687 \fi
4688
4689 % draw outer box
4690 \ifpgf@circuit@boxed
4691 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
4692 \fi
4693
4694 % draw input arrow
4695 \ifpgf@circuit@inputarrow
4696 {
4697 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4698 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4699 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4700 }
4701 \fi
4702
4703 \ifpgf@circuit@boxed
4704 \pgfsetlinewidth{\pgfstartlinewidth}
4705 \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn
4706 \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box
4707 \else
4708 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4709 \fi
4710
4711
4712 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4713 \pgfsetarrows{-} %never draw arrows
4714 \pgfsetlinewidth{\pgfstartlinewidth}
4715
4716 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
4717 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
4718 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
4719
4720 \pgfpathclose
4721 \pgfusepath{draw}
4722
4723 % draw inner text
4724 \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
4725
4726 % draw arrow
4727 \pgfsetlinewidth{\pgfstartlinewidth}
4728 \pgfsetarrowsend{latex}
4729 \pgfpathmoveto{\pgfpoint{-0.8\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4730 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@step}{0.6\pgf@circ@res@step}}
4731 \pgfusepath{draw}
4732 }
4733
4734 %% pi attenuator
4735 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piattenuator/width}}{piattenuator}{\ctikzvalof{bipoles/piattenuator/width}}{\ctikzvalof{bipoles/piattenuator/width}}{
4736 \pgf@circ@res@step = \ctikzvalof{bipoles/piattenuator/width}\pgf@circ@Rlen
4737 \divide \pgf@circ@res@step by 2
4738
4739 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4740 \pgf@circ@res@other = \pgf@circ@res@left
4741 \advance\pgf@circ@res@other by \pgf@circ@res@step
4742
4743 \ifpgf@circuit@dashed
4744 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4745 \fi
4746
4747 % draw outer box
4748 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4749 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4750 \pgfusepath{draw}
4751
4752 \ifpgf@circuit@inputarrow
4753 {
4754 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4755 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4756 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4757 }
4758 \fi
4759
4760 % rotate inner symbol
4761 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4762 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4763 \pgftransformrotate{270}
4764 \fi\fi
4765 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4766 \pgftransformrotate{90}
4767 \fi\fi
4768
4769 % draw inner symbol
4770 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4771 \pgfsetarrows{-} %never draw arrows
4772 \pgfsetlinewidth{\pgfstartlinewidth}
4773 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
4774 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4775 \pgfusepath{draw}
4776 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
4777 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4778 \pgfusepath{draw}
4779 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4780 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4781 \pgfusepath{draw}
4782 }
4783
4784 %% variable pi attenuator
4785 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vpiattenuator/width}}{vpiattenuator}{\ctikzvalof{bipoles/vpiattenuator/width}}{\ctikzvalof{bipoles/vpiattenuator/width}}{
4786 \pgf@circ@res@step = \ctikzvalof{bipoles/vpiattenuator/width}\pgf@circ@Rlen
4787 \divide \pgf@circ@res@step by 2
4788
4789 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4790 \pgf@circ@res@other = \pgf@circ@res@left
4791 \advance\pgf@circ@res@other by \pgf@circ@res@step
4792
4793 \ifpgf@circuit@dashed
4794 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4795 \fi
4796
4797 % draw outer box
4798 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4799 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4800 \pgfusepath{draw}
4801
4802 \ifpgf@circuit@inputarrow
4803 {
4804 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4805 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4806 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4807 }
4808 \fi
4809
4810 % rotate inner symbol
4811 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4812 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4813 \pgftransformrotate{270}
4814 \fi\fi
4815 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4816 \pgftransformrotate{90}
4817 \fi\fi
4818
4819 % draw inner symbol
4820 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4821 \pgfsetarrows{-} %never draw arrows
4822 \pgfsetlinewidth{\pgfstartlinewidth}
4823 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
4824 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4825 \pgfusepath{draw}
4826 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
4827 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4828 \pgfusepath{draw}
4829 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4830 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4831 \pgfusepath{draw}
4832
4833 \pgfsetarrowsend{latex}
4834 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
4835 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
4836 \pgfusepath{draw}
4837 }
4838
4839 %% T attenuator
4840 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tattenuator/width}}{tattenuator}{\ctikzvalof{bipoles/tattenuator/width}}{\ctikzvalof{bipoles/tattenuator/width}}{
4841 \pgf@circ@res@step = \ctikzvalof{bipoles/tattenuator/width}\pgf@circ@Rlen
4842 \divide \pgf@circ@res@step by 2
4843
4844 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4845 \pgf@circ@res@other = \pgf@circ@res@left
4846 \advance\pgf@circ@res@other by \pgf@circ@res@step
4847
4848 \ifpgf@circuit@dashed
4849 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4850 \fi
4851
4852 % draw outer box
4853 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4854 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4855 \pgfusepath{draw}
4856
4857 \ifpgf@circuit@inputarrow
4858 {
4859 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4860 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4861 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4862 }
4863 \fi
4864
4865 % rotate inner symbol
4866 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4867 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4868 \pgftransformrotate{270}
4869 \fi\fi
4870 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4871 \pgftransformrotate{90}
4872 \fi\fi
4873
4874 % draw inner symbol
4875 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4876 \pgfsetarrows{-} %never draw arrows
4877 \pgfsetlinewidth{\pgfstartlinewidth}
4878 \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
4879 \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
4880 \pgfusepath{draw}
4881 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4882 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4883 \pgfusepath{draw}
4884 }
4885
4886 %% variable T attenuator
4887 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vtattenuator/width}}{vtattenuator}{\ctikzvalof{bipoles/vtattenuator/width}}{\ctikzvalof{bipoles/vtattenuator/width}}{
4888 \pgf@circ@res@step = \ctikzvalof{bipoles/vtattenuator/width}\pgf@circ@Rlen
4889 \divide \pgf@circ@res@step by 2
4890
4891 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4892 \pgf@circ@res@other = \pgf@circ@res@left
4893 \advance\pgf@circ@res@other by \pgf@circ@res@step
4894
4895 \ifpgf@circuit@dashed
4896 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4897 \fi
4898
4899 % draw outer box
4900 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4901 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4902 \pgfusepath{draw}
4903
4904 \ifpgf@circuit@inputarrow
4905 {
4906 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4907 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4908 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4909 }
4910 \fi
4911
4912 % rotate inner symbol
4913 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4914 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4915 \pgftransformrotate{270}
4916 \fi\fi
4917 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4918 \pgftransformrotate{90}
4919 \fi\fi
4920
4921 % draw inner symbol
4922 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4923 \pgfsetarrows{-} %never draw arrows
4924 \pgfsetlinewidth{\pgfstartlinewidth}
4925 \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
4926 \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
4927 \pgfusepath{draw}
4928 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4929 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4930 \pgfusepath{draw}
4931
4932 \pgfsetarrowsend{latex}
4933 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
4934 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
4935 \pgfusepath{draw}
4936 }
4937
4938 %% phase shifter
4939 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{phaseshifter}{\ctikzvalof{bipoles/phaseshifter/width}}{\ctikzvalof{bipoles/phaseshifter/width}}{
4940 \pgf@circ@res@step = \ctikzvalof{bipoles/phaseshifter/width}\pgf@circ@Rlen
4941 \divide \pgf@circ@res@step by 2
4942
4943 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4944 \pgf@circ@res@other = \pgf@circ@res@left
4945 \advance\pgf@circ@res@other by \pgf@circ@res@step
4946
4947 \ifpgf@circuit@dashed
4948 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4949 \fi
4950
4951 % draw outer box
4952 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4953 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4954 \pgfusepath{draw}
4955
4956 \ifpgf@circuit@inputarrow
4957 {
4958 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4959 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4960 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4961 }
4962 \fi
4963
4964 % rotate inner symbol
4965 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4966 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4967 \pgftransformrotate{270}
4968 \fi\fi
4969 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4970 \pgftransformrotate{180}
4971 \fi\fi
4972 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4973 \pgftransformrotate{90}
4974 \fi\fi
4975
4976 % inner symbol
4977 \pgftext[center,x=0,y=0]{\Large$\varphi$}
4978 }
4979
4980 %% variable phase shifter
4981 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{vphaseshifter}{\ctikzvalof{bipoles/vphaseshifter/width}}{\ctikzvalof{bipoles/vphaseshifter/width}}{
4982 \pgf@circ@res@step = \ctikzvalof{bipoles/vphaseshifter/width}\pgf@circ@Rlen
4983 \divide \pgf@circ@res@step by 2
4984
4985 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4986 \pgf@circ@res@other = \pgf@circ@res@left
4987 \advance\pgf@circ@res@other by \pgf@circ@res@step
4988
4989 \ifpgf@circuit@dashed
4990 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4991 \fi
4992
4993 % draw outer box
4994 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4995 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4996 \pgfusepath{draw}
4997
4998 \ifpgf@circuit@inputarrow
4999 {
5000 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
5001 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
5002 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
5003 }
5004 \fi
5005
5006 % rotate inner symbol
5007 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
5008 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
5009 \pgftransformrotate{270}
5010 \fi\fi
5011 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
5012 \pgftransformrotate{180}
5013 \fi\fi
5014 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
5015 \pgftransformrotate{90}
5016 \fi\fi
5017
5018 % inner symbol
5019 \pgftext[center,x=0,y=0]{\Large$\varphi$}
5020
5021 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
5022 \pgfsetlinewidth{\pgfstartlinewidth}
5023 \pgfsetarrowsend{latex}
5024 \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0.65\pgf@circ@res@down}}
5025 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.65\pgf@circ@res@up}}
5026 \pgfusepath{draw}
5027 }
5028
5029 %% detector
5030 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/detector/width}}{detector}{\ctikzvalof{bipoles/detector/width}}{\ctikzvalof{bipoles/detector/width}}{
5031 \pgf@circ@res@step = \ctikzvalof{bipoles/detector/width}\pgf@circ@Rlen
5032 \divide \pgf@circ@res@step by 2
5033
5034 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5035 \pgf@circ@res@other = \pgf@circ@res@left
5036 \advance\pgf@circ@res@other by \pgf@circ@res@step
5037
5038 \ifpgf@circuit@dashed
5039 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
5040 \fi
5041
5042 % draw outer box
5043 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5044 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5045 \pgfusepath{draw}
5046
5047 \ifpgf@circuit@inputarrow
5048 {
5049 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
5050 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
5051 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
5052 }
5053 \fi
5054
5055 % draw inner stuff
5056 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
5057 \pgfsetarrows{-} %never draw arrows
5058 \pgfsetlinewidth{0.8\pgfstartlinewidth}
5059 \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0}}
5060 \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@right}{0}}
5061 \pgfusepath{draw}
5062
5063 \ifpgf@circuit@fulldiode
5064 \pgfmathparse{2\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/generic/width}}
5065 \pgftransformscale{\pgfmathresult}
5066 \pgfnode{fulldiodeshape}{center}{}{pgf@fulldiode}{\pgfusepath{fill}}
5067 \else
5068 \pgfmathparse{2\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/resistor/width}}
5069 \pgftransformscale{\pgfmathresult}
5070 \pgfnode{emptydiodeshape}{center}{}{pgf@emptydiode}{\pgfusepath{fill}}
5071 \fi
5072
5073 }
5074
5075
5076
5077
5078 %% european gas filled surge arrester
5079
5080 \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}}{
5081
5082 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
5083 %\divide \pgf@circ@res@step by 14
5084
5085 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5086 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5087
5088 \pgfusepath{draw}
5089
5090 \pgfscope
5091 \pgfsetarrowsend{latex'}
5092 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5093 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/european gas filled surge arrester/inside}\pgf@circ@res@left}{0pt}}
5094 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5095 \pgfusepath{draw}
5096
5097 \endpgfscope
5098 }
5099
5100
5101
5102
5103 %% american gas filled surge arrester
5104
5105 \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}}{
5106 %\def\pgf@circ@temp{right}
5107 %\ifx\tikz@res@label@pos\pgf@circ@temp
5108 % \pgf@circ@res@step=-1.2\pgf@circ@res@up
5109 %\else
5110 % \def\pgf@circ@temp{below}
5111 % \ifx\tikz@res@label@pos\pgf@circ@temp
5112 % \pgf@circ@res@step=-1.2\pgf@circ@res@up
5113 % \else
5114 % \pgf@circ@res@step=1.2\pgf@circ@res@up
5115 % \fi
5116 % \fi
5117
5118 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5119 \pgfpointorigin \pgf@circ@res@other = \pgf@x \advance \pgf@circ@res@other by -\pgf@circ@res@up
5120 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
5121 \pgfusepath{draw}
5122
5123 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5124
5125 \pgfscope
5126 \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
5127 \pgfusepath{draw}
5128 \endpgfscope
5129
5130 \pgfsetlinewidth{\pgfstartlinewidth}
5131
5132
5133 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@zero}}
5134 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
5135 \pgfusepath{draw}
5136
5137 \pgfnode{circle}{center}{}{}{}
5138
5139 \pgfscope
5140 \pgfsetarrowsend{latex}
5141
5142 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
5143 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf@circ@res@right}{\pgf@circ@res@zero}}
5144 \pgfusepath{draw}
5145
5146 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5147 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf@circ@res@left}{\pgf@circ@res@zero}}
5148 \pgfusepath{draw}
5149 \endpgfscope{}
5150
5151 %\pgftransformshift{\pgfpoint{.25\pgf@circ@res@left}{.45\pgf@circ@res@down}}
5152 %\pgfnode{circ}{center}{}{}{}
5153 %\pgftransformshift{}
5154 \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}
5155 \pgfusepath{fill}
5156 }
5157
5158 % % MECHANICAL SYMBOLS
5159
5160 %% mechanical capacitance - stiffness/spring
5161
5162 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/spring/height}}{spring}{\ctikzvalof{bipoles/spring/height}}{\ctikzvalof{bipoles/spring/width}}{
5163 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5164 \pgftransformationadjustments
5165
5166 \pgfmathsetlength{\pgf@circ@res@step}
5167 {(\ctikzvalof{bipoles/spring/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth)/16}
5168
5169 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
5170 \pgfsetcornersarced{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
5171 \pgf@circ@res@other = \pgf@circ@res@left
5172 \advance\pgf@circ@res@other by \pgf@circ@res@step
5173 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
5174 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5175 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
5176 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5177 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
5178 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5179 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
5180 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5181 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
5182 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5183 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
5184 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5185 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
5186 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5187 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
5188 \advance\pgf@circ@res@other by \pgf@circ@res@step
5189 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
5190 \pgfsetbuttcap
5191 \pgfsetbeveljoin
5192 \pgfusepath{stroke}
5193 }
5194
5195 %% mechanical inductance - mass
5196 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/mass/box height}}{mass}{\ctikzvalof{bipoles/mass/height}}{\ctikzvalof{bipoles/mass/width}}{
5197 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5198 \pgftransformationadjustments
5199 \pgfpathrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
5200 {\pgfpoint{-2\pgf@circ@res@down}{-2\pgf@circ@res@down}}
5201
5202 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5203 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5204 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
5205 \pgfsetrectcap
5206 \pgfsetmiterjoin
5207 \pgfusepath{stroke}
5208 }
5209
5210 %% mechanical resistor - damper
5211 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/damper/height}}{damper}{\ctikzvalof{bipoles/damper/height}}{\ctikzvalof{bipoles/damper/width}}{
5212 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5213 \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
5214 {\pgf@circ@res@zero}}
5215 \pgfusepath{stroke}
5216
5217 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5218 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
5219 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5220 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5221 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
5222
5223 \pgfsetrectcap
5224 \pgfsetmiterjoin
5225 \pgfusepath{stroke}
5226
5227 \pgfpathmoveto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
5228 {.8\pgf@circ@res@down}}
5229 \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
5230 {.8\pgf@circ@res@up}}
5231 \pgfsetbuttcap
5232 \pgfusepath{stroke}
5233
5234 }
5235
5236
5237 %%%---------- close: tex/pgfcircbipoles
5238 %%%%%%%%%%% Springe nach tex/pgfcirctripoles
5239 %%%---------- open: tex/pgfcirctripoles.tex
5240 % Copyright 2007-2009 by Massimo Redaelli
5241 %
5242 % This file may be distributed and/or modified
5243 %
5244 % 1. under the LaTeX Project Public License and/or
5245 % 2. under the GNU Public License.
5246 %
5247 % See the file doc/LICENSE for more details.
5248
5249 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5250 %% Tripoles
5251
5252
5253
5254 \pgfdeclareshape{spdt}
5255 {
5256 \savedanchor\northwest{%
5257 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5258 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/height}\pgf@y
5259 \pgf@y=.5\pgf@y
5260 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5261 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/width}\pgf@x
5262 \pgf@x=.5\pgf@x
5263 }
5264 \anchor{left}{%
5265 \northwest
5266 \pgf@y=0pt
5267 }
5268 \anchor{in}{
5269 \northwest
5270 \pgf@y=0pt
5271 }
5272 \anchor{out 1}{
5273 \northwest
5274 \pgf@x=-\pgf@x
5275 }
5276 \anchor{out 2}{
5277 \northwest
5278 \pgf@x=-\pgf@x
5279 \pgf@y=-\pgf@y
5280 }
5281 \anchor{center}{
5282 \pgf@y=0pt
5283 \pgf@x=0pt
5284 }
5285 \anchor{east}{
5286 \northwest
5287 \pgf@y=0pt
5288 \pgf@x=-\pgf@x
5289 }
5290 \anchor{west}{
5291 \northwest
5292 \pgf@y=0pt
5293 }
5294 \anchor{south}{
5295 \northwest
5296 \pgf@x=0pt
5297 \pgf@y=-\pgf@y
5298 }
5299 \anchor{north}{
5300 \northwest
5301 \pgf@x=0pt
5302 }
5303 \anchor{south west}{
5304 \northwest
5305 \pgf@y=-\pgf@y
5306 }
5307 \anchor{north east}{
5308 \northwest
5309 \pgf@x=-\pgf@x
5310 }
5311 \anchor{north west}{
5312 \northwest
5313 }
5314 \anchor{south east}{
5315 \northwest
5316 \pgf@x=-\pgf@x
5317 \pgf@y=-\pgf@y
5318 }
5319 \backgroundpath{
5320 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5321
5322
5323 \northwest
5324 \pgf@circ@res@up = \pgf@y
5325 \pgf@circ@res@down = -\pgf@y
5326 \pgf@circ@res@right = -\pgf@x
5327 \pgf@circ@res@left = \pgf@x
5328 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/margin}\pgf@circ@res@left
5329
5330
5331 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5332 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5333 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5334 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5335
5336 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5337 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}}
5338
5339 \pgfusepath{draw}
5340
5341 \pgfscope
5342 \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5343 \pgfnode{ocirc}{center}{}{spdt1}{\pgfusepath{stroke}}
5344 \endpgfscope
5345 \pgfscope
5346 \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5347 \pgfnode{ocirc}{center}{}{}{\pgfusepath{stroke}}
5348 \endpgfscope
5349 \pgfscope
5350 \pgftransformshift{\pgfpoint{\pgf@circ@res@other}{0pt}}
5351 \pgfnode{ocirc}{center}{}{spdt2}{\pgfusepath{stroke}}
5352 \endpgfscope
5353
5354
5355 \pgfscope
5356 \pgfpathmoveto{\pgfpointshapeborder{spdt2}{\pgfpointorigin}}
5357 \pgfpathlineto{
5358 \pgfpointadd{\pgfpointshapeborder{spdt1}{\pgfpoint{-\pgf@circ@res@other}{-100pt}}}
5359 {\pgfpoint{-.05\pgf@circ@res@up}{-.05\pgf@circ@res@up}}
5360 }
5361 \pgfsetlinewidth{2\pgflinewidth}
5362 \pgfusepath{draw}
5363 \endpgfscope
5364 }
5365 }
5366
5367
5368
5369 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5370 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5371 %%
5372 %% Logic ports
5373 %%
5374
5375
5376
5377
5378
5379
5380 \long\def\pgfcircdeclarelogicport#1#2{
5381 \pgfdeclareshape{american #1 port}
5382 {
5383 \savedanchor\northwest{%
5384 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5385 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@y
5386 \pgf@y=.5\pgf@y
5387 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5388 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@x
5389 \pgf@x=.5\pgf@x
5390 }
5391 \savedanchor\left{%
5392 \pgf@y=0pt
5393 }
5394 \savedanchor\inOne{%
5395 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5396 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@y
5397 \pgf@y=.5\pgf@y
5398 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/input height}\pgf@y
5399 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5400 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@x
5401 \pgf@x=.5\pgf@x
5402 }
5403 \anchor{in 1}{
5404 \inOne
5405 }
5406 \anchor{in}{
5407 \inOne
5408 }
5409 \anchor{in 2}{
5410 \inOne
5411 \pgf@y=-\pgf@y
5412 }
5413 \anchor{out}{
5414 \northwest
5415 \pgf@y=0pt
5416 \pgf@x=-\pgf@x
5417 }
5418 \anchor{center}{
5419 \northwest
5420 \pgf@y=0pt
5421 \pgf@x=-.8\pgf@x
5422 }
5423 \anchor{east}{
5424 \left
5425 \pgf@x=-.8\pgf@x
5426 }
5427 \anchor{west}{
5428 \left
5429 }
5430 \anchor{south}{
5431 \northwest
5432 \pgf@x=0pt
5433 \pgf@y=-\pgf@y
5434 }
5435 \anchor{north}{
5436 \northwest
5437 \pgf@x=0pt
5438 }
5439 \anchor{south west}{
5440 \northwest
5441 \pgf@y=-\pgf@y
5442 }
5443 \anchor{north east}{
5444 \northwest
5445 \pgf@x=-\pgf@x
5446 }
5447 \anchor{north west}{
5448 \northwest
5449 }
5450 \anchor{south east}{
5451 \northwest
5452 \pgf@x=-\pgf@x
5453 \pgf@y=-\pgf@y
5454 }
5455 \backgroundpath{
5456 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5457
5458
5459 \northwest
5460 \pgf@circ@res@up = \pgf@y
5461 \pgf@circ@res@down = -\pgf@y
5462 \pgf@circ@res@right = -\pgf@x
5463 \pgf@circ@res@left = \pgf@x
5464
5465 #2
5466
5467 }
5468 }
5469 }
5470
5471
5472 \pgfcircdeclarelogicport{and}{
5473 \pgfpathmoveto{\pgfpoint
5474 {\pgf@circ@res@left}
5475 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@up}}
5476 \pgfpathlineto{\pgfpoint
5477 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5478 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@up}}
5479
5480 \pgfpathmoveto{\pgfpoint
5481 {\pgf@circ@res@left}
5482 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@down}}
5483 \pgfpathlineto{\pgfpoint
5484 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5485 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@down}}
5486
5487 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5488 \pgfpathlineto{\pgfpoint
5489 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5490 {0pt}}
5491
5492 \pgfusepath{draw}
5493
5494 \pgfsetlinewidth{2\pgflinewidth}
5495 \pgfpathmoveto{\pgfpoint
5496 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5497 {\pgf@circ@res@up}}
5498 \pgfpathlineto{\pgfpoint
5499 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5500 {\pgf@circ@res@down}}
5501 \pgfpathcurveto
5502 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@down}}
5503 {\pgfpoint
5504 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5505 {.5\pgf@circ@res@down}}
5506 {\pgfpoint
5507 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5508 {0pt}}
5509 \pgfpathcurveto
5510 {\pgfpoint
5511 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5512 {.5\pgf@circ@res@up}}
5513 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@up}}
5514 {\pgfpoint
5515 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5516 {\pgf@circ@res@up}}
5517 \pgfusepath{draw}
5518 }
5519
5520
5521
5522 \pgfcircdeclarelogicport{nand}{
5523 \pgfpathmoveto{\pgfpoint
5524 {\pgf@circ@res@left}
5525 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@up}}
5526 \pgfpathlineto{\pgfpoint
5527 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
5528 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@up}}
5529
5530 \pgfpathmoveto{\pgfpoint
5531 {\pgf@circ@res@left}
5532 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@down}}
5533 \pgfpathlineto{\pgfpoint
5534 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
5535 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@down}}
5536
5537 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5538 \pgfpathlineto{\pgfpoint
5539 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right}
5540 {0pt}}
5541
5542 \pgfusepath{draw}
5543
5544 \pgfsetlinewidth{2\pgflinewidth}
5545
5546 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf@circ@res@right
5547 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right
5548
5549 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5550 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5551 \pgfpathcurveto
5552 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@down}}
5553 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{.5\pgf@circ@res@down}}
5554 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5555 \pgfpathcurveto
5556 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{.5\pgf@circ@res@up}}
5557 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@up}}
5558 {\pgfpoint
5559 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
5560 {\pgf@circ@res@up}}
5561 \pgfpathellipse
5562 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5563 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5564 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5565
5566 \pgfusepath{draw}
5567 }
5568
5569
5570 \pgfcircdeclarelogicport{nor}{
5571 \pgfpathmoveto{\pgfpoint
5572 {\pgf@circ@res@left}
5573 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@up}}
5574 \pgfpathlineto{\pgfpoint
5575 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf@circ@res@left}
5576 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@up}}
5577
5578 \pgfpathmoveto{\pgfpoint
5579 {\pgf@circ@res@left}
5580 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@down}}
5581 \pgfpathlineto{\pgfpoint
5582 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf@circ@res@left}
5583 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@down}}
5584
5585 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5586 \pgfpathlineto{\pgfpoint
5587 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf@circ@res@right}
5588 {0pt}}
5589
5590 \pgfusepath{draw}
5591
5592 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf@circ@res@right
5593 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf@circ@res@right
5594
5595 \pgfsetlinewidth{2\pgflinewidth}
5596 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5597 \pgfpathcurveto
5598 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5599 {\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}}
5600 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf@circ@res@left}{0pt}}
5601 \pgfpathcurveto
5602 {\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}}
5603 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5604 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5605
5606 \pgfpathcurveto
5607 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5608 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf@circ@res@down}}
5609 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5610 \pgfpathcurveto
5611 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf@circ@res@up}}
5612 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5613 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5614
5615 \pgfpathellipse
5616 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5617 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5618 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5619
5620 \pgfusepath{draw}
5621 }
5622
5623
5624
5625
5626 \pgfcircdeclarelogicport{or}{
5627
5628
5629 \pgfpathmoveto{\pgfpoint
5630 {\pgf@circ@res@left}
5631 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@up}}
5632 \pgfpathlineto{\pgfpoint
5633 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf@circ@res@left}
5634 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@up}}
5635
5636 \pgfpathmoveto{\pgfpoint
5637 {\pgf@circ@res@left}
5638 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@down}}
5639 \pgfpathlineto{\pgfpoint
5640 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf@circ@res@left}
5641 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@down}}
5642
5643 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5644 \pgfpathlineto{\pgfpoint
5645 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right}
5646 {0pt}}
5647
5648 \pgfusepath{draw}
5649 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right
5650 \pgfsetlinewidth{2\pgflinewidth}
5651 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5652 \pgfpathcurveto
5653 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5654 {\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}}
5655 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf@circ@res@left}{0pt}}
5656 \pgfpathcurveto
5657 {\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}}
5658 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5659 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5660
5661 \pgfpathcurveto
5662 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5663 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@down}}
5664 {\pgfpoint{\pgf@circ@res@other}{0pt}}
5665 \pgfpathcurveto
5666 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@up}}
5667 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5668 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5669 \pgfusepath{draw}
5670 }
5671
5672
5673 \pgfcircdeclarelogicport{xor}{
5674
5675 \pgfpathmoveto{\pgfpoint
5676 {\pgf@circ@res@left}
5677 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@up}}
5678 \pgfpathlineto{\pgfpoint
5679 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf@circ@res@left}
5680 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@up}}
5681
5682 \pgfpathmoveto{\pgfpoint
5683 {\pgf@circ@res@left}
5684 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@down}}
5685 \pgfpathlineto{\pgfpoint
5686 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf@circ@res@left}
5687 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@down}}
5688
5689 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5690 \pgfpathlineto{\pgfpoint
5691 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf@circ@res@right}
5692 {0pt}}
5693
5694 \pgfusepath{draw}
5695 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf@circ@res@right
5696 \pgfsetlinewidth{2\pgflinewidth}
5697 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5698 \pgfpathcurveto
5699 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5700 {\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}}
5701 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{0pt}}
5702 \pgfpathcurveto
5703 {\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}}
5704 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5705 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5706
5707 \pgfpathcurveto
5708 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5709 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@down}}
5710 {\pgfpoint{\pgf@circ@res@other}{0pt}}
5711 \pgfpathcurveto
5712 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@up}}
5713 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5714 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5715
5716 \def\pgf@circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/distance}\pgf@circ@res@right+}
5717 \pgfpathmoveto{\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{\pgf@circ@res@up}}
5718
5719 \pgfpathcurveto
5720 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@up}}
5721 {\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}}
5722 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{0pt}}
5723 \pgfpathcurveto
5724 {\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}}
5725 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@down}}
5726 {\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{.95*\pgf@circ@res@down}}
5727
5728 \pgfusepath{draw}
5729 }
5730
5731
5732
5733 \pgfcircdeclarelogicport{xnor}{
5734
5735 \pgfpathmoveto{\pgfpoint
5736 {\pgf@circ@res@left}
5737 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@up}}
5738 \pgfpathlineto{\pgfpoint
5739 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf@circ@res@left}
5740 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@up}}
5741
5742 \pgfpathmoveto{\pgfpoint
5743 {\pgf@circ@res@left}
5744 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@down}}
5745 \pgfpathlineto{\pgfpoint
5746 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf@circ@res@left}
5747 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@down}}
5748
5749 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5750 \pgfpathlineto{\pgfpoint
5751 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf@circ@res@right}
5752 {0pt}}
5753
5754 \pgfusepath{draw}
5755 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf@circ@res@right
5756 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/circle width}\pgf@circ@res@right
5757
5758 \pgfsetlinewidth{2\pgflinewidth}
5759 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5760 \pgfpathcurveto
5761 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5762 {\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}}
5763 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{0pt}}
5764 \pgfpathcurveto
5765 {\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}}
5766 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5767 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5768
5769 \pgfpathcurveto
5770 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5771 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@down}}
5772 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5773 \pgfpathcurveto
5774 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@up}}
5775 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5776 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5777
5778 \def\pgf@circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/distance}\pgf@circ@res@right+}
5779 \pgfpathmoveto{\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{\pgf@circ@res@up}}
5780
5781 \pgfpathcurveto
5782 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@up}}
5783 {\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}}
5784 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{0pt}}
5785 \pgfpathcurveto
5786 {\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}}
5787 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@down}}
5788 {\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{.95*\pgf@circ@res@down}}
5789
5790
5791 \pgfpathellipse
5792 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5793 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5794 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5795
5796 \pgfusepath{draw}
5797 }
5798
5799
5800 \pgfdeclareshape{american not port}
5801 {
5802 \anchor{center}{\pgfpointorigin}
5803 \savedanchor\northwest{%
5804 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5805 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@y
5806 \pgf@y=.5\pgf@y
5807 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5808 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@x
5809 \pgf@x=.5\pgf@x
5810 }
5811 \savedanchor\left{%
5812 \pgf@y=0pt
5813 }
5814 \anchor{in}{
5815 \northwest
5816 \pgf@y=0pt
5817 }
5818 \anchor{out}{
5819 \northwest
5820 \pgf@y=0pt
5821 \pgf@x=-\pgf@x
5822 }
5823 \anchor{center}{
5824 \pgfpointorigin
5825 }
5826 \anchor{east}{
5827 \left
5828 \pgf@x=-.8\pgf@x
5829 }
5830 \anchor{west}{
5831 \left
5832 }
5833 \anchor{south}{
5834 \northwest
5835 \pgf@x=0pt
5836 \pgf@y=-\pgf@y
5837 }
5838 \anchor{north}{
5839 \northwest
5840 \pgf@x=0pt
5841 }
5842 \anchor{south west}{
5843 \northwest
5844 \pgf@y=-\pgf@y
5845 }
5846 \anchor{north east}{
5847 \northwest
5848 \pgf@x=-\pgf@x
5849 }
5850 \anchor{north west}{
5851 \northwest
5852 }
5853 \anchor{south east}{
5854 \northwest
5855 \pgf@x=-\pgf@x
5856 \pgf@y=-\pgf@y
5857 }
5858 \backgroundpath{
5859 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5860
5861
5862 \northwest
5863 \pgf@circ@res@up = \pgf@y
5864 \pgf@circ@res@down = -\pgf@y
5865 \pgf@circ@res@right = -\pgf@x
5866 \pgf@circ@res@left = \pgf@x
5867
5868 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right
5869
5870 \pgfscope
5871 \pgfsetlinewidth{2\pgflinewidth}
5872 \pgftransformxshift{.7\pgf@circ@res@left}
5873 \pgf@circ@res@step=\pgf@circ@res@right
5874 \advance\pgf@circ@res@step by -\pgf@circ@res@left
5875 \pgf@circ@res@step=.7\pgf@circ@res@step
5876
5877 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5878 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
5879 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
5880 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5881 \pgfusepath{draw}
5882 \pgfpathellipse
5883 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@other}{0pt}}
5884 {\pgfpoint{.5\pgf@circ@res@other}{0pt}}
5885 {\pgfpoint{0pt}{.5\pgf@circ@res@other}}
5886 \pgfusepath{draw}
5887 \endpgfscope
5888
5889 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5890 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
5891
5892 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5893 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
5894
5895 \pgfusepath{draw}
5896
5897 }
5898 }
5899
5900
5901
5902
5903
5904
5905 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5906
5907 % #1 - name
5908 % #2 - text inside
5909 % #3 - number of inputs
5910 % #4 - is it a not
5911
5912 \long\def\pgfcircdeclareeurologicport#1#2#3#4{
5913 \pgfdeclareshape{european #1 port}
5914 {
5915 \savedanchor\northwest{%
5916 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5917 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@y
5918 \pgf@y=.5\pgf@y
5919 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5920 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@x
5921 \pgf@x=.5\pgf@x
5922 }
5923 \savedanchor\left{%
5924 \pgf@y=0pt
5925 }
5926 \savedanchor\inOne{%
5927 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5928 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@y
5929 \pgf@y=.5\pgf@y
5930 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@y
5931 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5932 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@x
5933 \pgf@x=.5\pgf@x
5934 }
5935 \anchor{in}{
5936 \inOne
5937 }
5938 \anchor{in 1}{
5939 \inOne
5940 }
5941 \anchor{in 2}{
5942 \inOne
5943 \pgf@y=-\pgf@y
5944 }
5945 \anchor{out}{
5946 \northwest
5947 \pgf@y=0pt
5948 \pgf@x=-\pgf@x
5949 }
5950 \anchor{center}{
5951 \northwest
5952 \pgf@y=0pt
5953 \pgf@x=-.8\pgf@x
5954 }
5955 \anchor{east}{
5956 \left
5957 \pgf@x=-.8\pgf@x
5958 }
5959 \anchor{west}{
5960 \left
5961 }
5962 \anchor{south}{
5963 \northwest
5964 \pgf@x=0pt
5965 \pgf@y=-\pgf@y
5966 }
5967 \anchor{north}{
5968 \northwest
5969 \pgf@x=0pt
5970 }
5971 \anchor{south west}{
5972 \northwest
5973 \pgf@y=-\pgf@y
5974 }
5975 \anchor{north east}{
5976 \northwest
5977 \pgf@x=-\pgf@x
5978 }
5979 \anchor{north west}{
5980 \northwest
5981 }
5982 \anchor{south east}{
5983 \northwest
5984 \pgf@x=-\pgf@x
5985 \pgf@y=-\pgf@y
5986 }
5987 \backgroundpath{
5988 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5989 \northwest
5990 \pgf@circ@res@up = \pgf@y
5991 \pgf@circ@res@down = -\pgf@y
5992 \pgf@circ@res@right = -\pgf@x
5993 \pgf@circ@res@left = \pgf@x
5994 \def\pgf@temp{1}
5995 \def\pgf@circ@temp{#3}
5996 \ifx\pgftemp\pgf@circ@temp % one input
5997 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5998 \pgfpathlineto{
5999 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}{0pt}}
6000 \else % two inputs
6001 \pgfpathmoveto{
6002 \pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@up}}
6003 \pgfpathlineto{
6004 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}
6005 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@up}}
6006 %
6007 \pgfpathmoveto{
6008 \pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@down}}
6009 \pgfpathlineto{
6010 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}
6011 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@down}}
6012 \fi%
6013 %
6014 %
6015 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6016 \pgfpathlineto{
6017 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{0pt}}
6018 %
6019 \edef\pgf@temp{not}
6020 \edef\pgf@circ@temp{#4}
6021 \ifx\pgf@temp\pgf@circ@temp % is a not
6022 \pgfpathmoveto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not width}\pgf@circ@res@right}{0pt}}
6023 \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}}
6024 \fi
6025 %
6026 \pgfusepath{draw}
6027 %
6028 \pgfpathmoveto{\pgfpointorigin}
6029 \pgftext{#2}
6030 %
6031 %
6032 %
6033 \pgfsetlinewidth{2\pgflinewidth}
6034 \pgfpathrectanglecorners
6035 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}{\pgf@circ@res@up}}
6036 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{\pgf@circ@res@down}}
6037 \pgfusepath{draw}
6038 %
6039 %
6040 }
6041 }
6042 }
6043
6044
6045
6046 \pgfcircdeclareeurologicport{and}{$\&$}{2}{}
6047 \pgfcircdeclareeurologicport{or}{$\ge 1$}{2}{}
6048 \pgfcircdeclareeurologicport{xor}{$=1$}{2}{}
6049 \pgfcircdeclareeurologicport{not}{$1$}{1}{not}
6050 \pgfcircdeclareeurologicport{nand}{$\&$}{2}{not}
6051 \pgfcircdeclareeurologicport{nor}{$\ge 1$}{2}{not}
6052 \pgfcircdeclareeurologicport{xnor}{$=1$}{2}{not}
6053
6054 \long\def\pgfcircdeclaretransistor#1#2#3{
6055 \pgfdeclareshape{#1}
6056 {
6057 \anchor{center}{
6058 \pgfpointorigin
6059 }
6060 \savedanchor\northeast{% upper right
6061 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6062 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@y
6063 \pgf@y=.5\pgf@y
6064 \pgf@x=0pt
6065 }
6066 \savedanchor\left{%center left
6067 \pgf@y=0pt
6068 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6069 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@x
6070 }
6071 \anchor{text}{
6072 \northeast
6073 \pgf@y=.7\pgf@y
6074 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6075 \pgf@x=0.1\pgf@x
6076 }
6077 \anchor{pathstart}{ % south
6078 \northeast
6079 \pgf@y=-\pgf@y
6080 }
6081 \anchor{pathend}{
6082 \northeast
6083 }
6084 \anchor{north}{
6085 \northeast
6086 \pgf@circ@res@step=\pgf@y
6087 \left
6088 \pgf@y=\pgf@circ@res@step
6089 \pgf@x=.5\pgf@x
6090 }
6091 \anchor{west}{
6092 \left
6093 }
6094 \anchor{east}{
6095 \northeast
6096 \pgf@y=0pt
6097 }
6098 \anchor{south}{
6099 \northeast
6100 \pgf@circ@res@step=\pgf@y
6101 \left
6102 \pgf@y=-\pgf@circ@res@step
6103 \pgf@x=.5\pgf@x
6104 }
6105 \anchor{south west}{
6106 \northeast
6107 \pgf@circ@res@step=\pgf@y
6108 \left
6109 \pgf@y=-\pgf@circ@res@step
6110 }
6111 \anchor{north east}{
6112 \northeast
6113 }
6114 \anchor{north west}{
6115 \northeast
6116 \pgf@circ@res@step=\pgf@y
6117 \left
6118 \pgf@y=\pgf@circ@res@step
6119 }
6120 \anchor{south east}{
6121 \northeast
6122 \pgf@y=-\pgf@y
6123 }
6124 \anchor{B}{
6125 \northeast
6126 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6127 \left
6128 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6129 }
6130 \anchor{base}{
6131 \northeast
6132 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6133 \left
6134 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6135 }
6136 \anchor{G}{
6137 \northeast
6138 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6139 \left
6140 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6141 }
6142 \anchor{gate}{
6143 \northeast
6144 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6145 \left
6146 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6147 }
6148 \anchor{nobase}{
6149 \left
6150 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@x
6151 }
6152 \anchor{nogate}{
6153 \left
6154 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@x
6155 }
6156 \anchor{E}{
6157 \northeast
6158 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6159 }
6160 \anchor{emitter}{
6161 \northeast
6162 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6163 }
6164 \anchor{C}{
6165 \northeast
6166 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6167 }
6168 \anchor{collector}{
6169 \northeast
6170 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6171 }
6172 \anchor{S}{
6173 \northeast
6174 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6175 }
6176 \anchor{source}{
6177 \northeast
6178 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6179 }
6180 \anchor{D}{
6181 \northeast
6182 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6183 }
6184 \anchor{drain}{
6185 \northeast
6186 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6187 }
6188 #2
6189 \backgroundpath{
6190 \pgftransformationadjustments
6191 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
6192 %
6193 \ifnum \pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction} > 0
6194 \pgf@circuit@trans@ntypetrue
6195 \else
6196 \pgf@circuit@trans@ntypefalse
6197 \fi
6198 \northeast
6199 \pgf@circ@res@up = \pgf@y
6200 \pgf@circ@res@down = -\pgf@y
6201 \pgf@circ@res@right = \pgf@x
6202 \left
6203 \pgf@circ@res@left = \pgf@x
6204 %
6205 #3
6206 % BODY DIODE
6207 \ifpgf@circuit@fet@bodydiode
6208 \drawbodydiode{#1}
6209 \fi
6210 %
6211 }
6212 }
6213 }
6214
6215 \long\def\drawbodydiode#1{
6216 \pgfscope
6217 \pgftransformshift{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
6218 \pgftransformrotate{90}
6219 \pgftransformscale{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode scale}}
6220 \ifpgf@circuit@fulldiode
6221 \pgfnode{fulldiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
6222 \else
6223 \pgfnode{emptydiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
6224 \fi
6225 \endpgfscope
6226 %Draw upper connection to body diode
6227 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}
6228 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
6229 \pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}
6230 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
6231 \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{east}}
6232 \pgfusepath{draw}
6233 \pgfscope
6234 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}
6235 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
6236 \pgftransformscale{0.5}
6237 \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
6238 \endpgfscope{}
6239 %Draw lower connection to body diode
6240 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}
6241 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
6242 \pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
6243 \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{west}}
6244 \pgfusepath{draw}
6245 \pgfscope
6246 \pgftransformshift{\pgfpoint{\pgf@circ@res@right} {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
6247 \pgftransformscale{0.5}
6248 \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
6249 \endpgfscope
6250 }
6251
6252 \long\def\declarebpt#1{
6253 \pgfcircdeclaretransistor{#1}{}{
6254 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6255 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6256 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
6257 \pgfpathlineto{\pgfpoint
6258 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6259 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@up}}
6260 \pgfusepath{draw}
6261
6262 \pgfscope
6263 \pgfpathmoveto{\pgfpoint
6264 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6265 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
6266 \pgfpathlineto{\pgfpoint
6267 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6268 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6269 \pgfsetlinewidth{2\pgflinewidth}
6270 \pgfusepath{draw}
6271 \endpgfscope
6272
6273 \pgfpathmoveto{\pgfpoint
6274 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6275 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@down}}
6276 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6277 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6278 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6279 \pgfusepath{draw}
6280 %draw arrow depending on type of transiytor
6281 \pgfscope
6282 \pgfslopedattimetrue
6283 \pgfallowupsidedownattimetrue
6284 \pgfresetnontranslationattimefalse
6285 \ifpgf@circuit@trans@ntype
6286 \pgftransformlineattime{.5}{%
6287 \pgfpoint%
6288 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6289 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@down}%
6290 }{%
6291 \pgfpoint{\pgf@circ@res@right}%
6292 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}%
6293 }
6294 \else
6295 \pgftransformlineattime{.5}{%
6296 \pgfpoint{\pgf@circ@res@right}%
6297 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}%
6298 }{%
6299 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6300 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@up}%
6301 }
6302 \fi
6303 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6304 \endpgfscope
6305
6306 \ifpgf@circuit@bpt@drawphoto
6307 \pgfscope
6308 \pgfsetarrowsstart{latex'}
6309 \pgfpathmoveto{\pgfpointadd{\pgfpoint
6310 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6311 {\pgf@circ@res@up+\pgf@circ@res@down}}
6312 {\pgfpoint{0.05\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
6313 \pgfpathlineto{\pgfpointadd{\pgfpoint
6314 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6315 {\pgf@circ@res@up+\pgf@circ@res@down}}
6316 {\pgfpoint{0.5\pgf@circ@res@left}{0.3\pgf@circ@res@up}}}
6317 \pgfusepath{draw}
6318 \pgfpathmoveto{\pgfpointadd{\pgfpoint
6319 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6320 {\pgf@circ@res@up+\pgf@circ@res@down}}
6321 {\pgfpoint{0.05\pgf@circ@res@left}{-0.1\pgf@circ@res@up}}}
6322 \pgfpathlineto{\pgfpointadd{\pgfpoint
6323 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6324 {\pgf@circ@res@up+\pgf@circ@res@down}}
6325 {\pgfpoint{0.5\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
6326 \pgfusepath{draw}
6327 \endpgfscope
6328 \else
6329 \ifpgf@circuit@bpt@drawbase
6330 \pgfpathmoveto{\pgfpoint
6331 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6332 {\pgf@circ@res@up+\pgf@circ@res@down}}
6333 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
6334 \pgfusepath{draw}
6335 \fi
6336 \fi
6337 }
6338 }
6339
6340 \declarebpt{npn}
6341 \declarebpt{pnp}
6342
6343 \long\def\declareigbt#1{
6344 \pgfcircdeclaretransistor{#1}{}
6345 {
6346 %draw upper connection
6347 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6348 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6349 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
6350 \pgfpathlineto{\pgfpoint
6351 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6352 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@up}}
6353 \pgfusepath{draw}
6354
6355 %draw thicker gate lines
6356 \pgfscope
6357 \pgfpathmoveto{\pgfpoint
6358 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6359 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6360 \pgfpathlineto{\pgfpoint
6361 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6362 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
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+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
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-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6369 \pgfsetlinewidth{2\pgflinewidth}
6370 \pgfusepath{draw}
6371 \endpgfscope
6372 %draw lower connection
6373 \pgfpathmoveto{\pgfpoint
6374 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6375 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@down}}
6376 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6377 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate 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/gate height 2}\pgf@circ@res@down}%
6390 }{%
6391 \pgfpoint{\pgf@circ@res@right}%
6392 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}%
6393 }
6394 \else
6395 \pgftransformlineattime{.5}{%
6396 \pgfpoint{\pgf@circ@res@right}%
6397 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate 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/gate height 2}\pgf@circ@res@up}%
6401 }
6402 \fi
6403 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6404 \endpgfscope
6405 %draw gate
6406 \ifpgf@circuit@trans@ntype
6407 \pgfpathmoveto{\pgfpoint
6408 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6409 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6410 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
6411 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6412 \else
6413 \pgfpathmoveto{\pgfpoint
6414 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6415 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@up}}
6416 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
6417 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@up}}
6418 \fi
6419 \pgfusepath{draw}
6420 }
6421 }
6422
6423 \declareigbt{pigbt}
6424 \declareigbt{nigbt}
6425 \declareigbt{Lnigbt}
6426 \declareigbt{Lpigbt}
6427
6428
6429 \pgfcircdeclaretransistor{nmos}{}{%
6430 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6431 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6432 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
6433 \pgfpathlineto{\pgfpoint
6434 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6435 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
6436
6437 \pgfpathmoveto{\pgfpoint
6438 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6439 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
6440 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6441 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
6442 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6443 \pgfusepath{draw}
6444
6445 \pgfscope
6446 \pgfpathmoveto{\pgfpoint
6447 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6448 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@up}}
6449 \pgfpathlineto{\pgfpoint
6450 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6451 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@down}}
6452 \pgfpathmoveto{\pgfpoint
6453 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
6454 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
6455 \pgfpathlineto{\pgfpoint
6456 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
6457 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
6458 \pgfsetlinewidth{2\pgflinewidth}
6459 \pgfusepath{draw}
6460 \endpgfscope
6461 \ifpgf@circuit@mos@arrows
6462 \pgfscope
6463 \pgfslopedattimetrue
6464 \pgfallowupsidedownattimetrue
6465 \pgfresetnontranslationattimefalse
6466 \pgftransformlineattime{.6}{%
6467 \pgfpoint%
6468 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}%
6469 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
6470 }{%
6471 \pgfpoint
6472 {\pgf@circ@res@right}%
6473 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
6474 }
6475 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6476 \endpgfscope
6477 \fi
6478
6479 \ifpgf@circuit@bpt@drawgate
6480 \pgfpathmoveto{\pgfpoint
6481 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
6482 {\pgf@circ@res@up+\pgf@circ@res@down}}
6483 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
6484 \pgfusepath{draw}
6485 \fi
6486 }
6487
6488
6489 \pgfcircdeclaretransistor{pmos}{}{%
6490 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6491 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6492 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
6493 \pgfpathlineto{\pgfpoint
6494 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6495 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
6496 \pgfusepath{draw}
6497
6498 \ifpgf@circuit@mos@arrows
6499 \pgfscope
6500 \pgfslopedattimetrue
6501 \pgfallowupsidedownattimetrue
6502 \pgfresetnontranslationattimefalse
6503 \pgftransformlineattime{.4}{%
6504 \pgfpoint%
6505 {\pgf@circ@res@right}%
6506 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
6507 }{%
6508 \pgfpoint
6509 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}%
6510 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
6511 }
6512 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6513 \endpgfscope
6514 \fi
6515
6516 \pgfscope
6517 \pgfpathmoveto{\pgfpoint
6518 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6519 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@up}}
6520 \pgfpathlineto{\pgfpoint
6521 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6522 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@down}}
6523 \pgfpathmoveto{\pgfpoint
6524 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
6525 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
6526 \pgfpathlineto{\pgfpoint
6527 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
6528 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
6529 \pgfsetlinewidth{2\pgflinewidth}
6530 \pgfusepath{draw}
6531 \endpgfscope
6532
6533 \pgfpathmoveto{\pgfpoint
6534 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6535 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
6536 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6537 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
6538 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6539
6540
6541 \pgfusepath{draw}
6542 \ifpgf@circuit@bpt@drawgate
6543 \pgfpathmoveto{\pgfpoint
6544 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
6545 {\pgf@circ@res@up+\pgf@circ@res@down}}
6546 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
6547 \pgfusepath{draw}
6548 \fi
6549 \pgfpathcircle{\pgfpoint
6550 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
6551 {\pgf@circ@res@up+\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
6552 \ifpgf@circuit@pmos@emptycircle
6553 \pgfsetfillcolor{white}
6554 \fi
6555 \pgfusepath{draw,fill}
6556 }
6557
6558 \long\def\drawfetcore#1{
6559 \pgftransformationadjustments
6560 %top connection
6561 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6562 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6563 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
6564 \pgfpathlineto{\pgfpoint
6565 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6566 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
6567 \pgfusepath{draw}
6568 \pgfscope
6569 \pgfpathmoveto{\pgfpoint
6570 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6571 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
6572 \ifpgf@circuit@trans@depletiontype
6573 \pgfpathlineto{\pgfpoint
6574 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6575 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6576 \else
6577
6578 \pgfpathlineto{\pgfpoint
6579 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6580 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up*0.45}}
6581 \pgfpathmoveto{\pgfpoint
6582 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6583 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up*0.25}}
6584 \pgfpathlineto{\pgfpoint
6585 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6586 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down*0.25}}
6587 \pgfpathmoveto{\pgfpoint
6588 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6589 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@down*0.45}}
6590 \pgfpathlineto{\pgfpoint
6591 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6592 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6593 \fi
6594 \pgfsetlinewidth{2\pgflinewidth}
6595 \pgfusepath{draw}
6596 \endpgfscope
6597 %Bulk connection line
6598 \pgfpathmoveto{\pgfpoint
6599 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6600 {\pgf@circ@res@up+\pgf@circ@res@down}}
6601 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
6602 {\pgf@circ@res@up+\pgf@circ@res@down}}
6603
6604 %bottom connection
6605 \pgfpathmoveto{\pgfpoint
6606 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6607 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
6608 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6609 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
6610 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6611 \pgfusepath{draw}
6612
6613 %draw thick gate line
6614 \pgfscope
6615 \pgfpathmoveto{\pgfpoint
6616 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6617 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6618 \pgfpathlineto{\pgfpoint
6619 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6620 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6621 \pgfsetlinewidth{2\pgflinewidth}
6622 \pgfusepath{draw}
6623 \endpgfscope
6624
6625 \pgfscope
6626 \pgfslopedattimetrue
6627 \pgfallowupsidedownattimetrue
6628 \pgfresetnontranslationattimefalse
6629
6630 \pgftransformlineattime{.6}{%
6631 \pgfpoint
6632 {\pgf@circ@res@right}%
6633 {\pgf@circ@res@up+\pgf@circ@res@down}%
6634 }{%
6635 \pgfpoint%
6636 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6637 {\pgf@circ@res@up+\pgf@circ@res@down}%
6638 }
6639 \ifpgf@circuit@trans@ntype
6640 \else
6641 \pgftransformrotate{180}
6642 \fi
6643 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6644 \endpgfscope
6645
6646 % GATE CONNECTION
6647 \ifpgf@circuit@bpt@drawgate
6648 \ifpgf@circuit@trans@ntype
6649 \pgfpathmoveto{\pgfpoint
6650 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6651 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6652 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6653 \else
6654 \pgfpathmoveto{\pgfpoint
6655 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6656 {-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6657 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6658 \fi
6659 \pgfusepath{draw}
6660 \fi
6661
6662 }
6663
6664 \long\def\pgfdeclaretransistorwrapperaddbulk#1#2#3
6665 {\pgfcircdeclaretransistor{#1}{
6666 \anchor{bulk}{\left\pgf@x=0pt}
6667 \anchor{B}{\left\pgf@x=0pt}%override Base anchor from npn&igbt
6668 #2
6669 }
6670 {#3}
6671 }
6672
6673
6674 \pgfdeclaretransistorwrapperaddbulk{nfet}{}{%
6675 \pgf@circuit@trans@depletiontypefalse
6676 \drawfetcore{nfet}
6677 }
6678
6679
6680 \pgfdeclaretransistorwrapperaddbulk{pfet}{}{%
6681 \pgf@circuit@trans@depletiontypefalse
6682 \drawfetcore{pfet}
6683 }
6684
6685 % N-CHANNEL IGFET ENHANCEMENT TYPE
6686 \pgfdeclaretransistorwrapperaddbulk{nigfete}{}{%
6687 \pgf@circuit@trans@depletiontypefalse
6688 \drawfetcore{nigfete}
6689
6690 % SOURCE CONNECTION
6691 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6692 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6693 \pgfusepath{draw}
6694
6695 % SOLDER DOT at source-bulk connection
6696 \ifpgf@circuit@fet@solderdot
6697 \pgfscope
6698 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6699 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6700 \pgfnode{circ}{center}{}{}{}
6701 \endpgfscope{}
6702 \fi
6703 }
6704
6705
6706
6707
6708 % N-CHANNEL IGFET ENHANCEMENT TYPE with Bulk connector
6709 \pgfdeclaretransistorwrapperaddbulk{nigfetebulk}{}{%
6710 \pgf@circuit@trans@depletiontypefalse
6711 \drawfetcore{nigfetebulk}
6712 % SOLDER DOT at source-bulk connection
6713 \ifpgf@circuit@fet@solderdot
6714 \pgfscope
6715 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6716 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}}
6717 \pgfnode{circ}{center}{}{}{}
6718 \endpgfscope{}
6719 \fi
6720 }
6721
6722
6723
6724 % N-CHANNEL IGFET DEPLETION TYPE
6725 \pgfdeclaretransistorwrapperaddbulk{nigfetd}{}{%
6726 \pgf@circuit@trans@depletiontypetrue
6727 \drawfetcore{nigfetd}
6728
6729 % SOURCE CONNECTION
6730 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6731 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6732 \pgfusepath{draw}
6733
6734 % SOLDER DOT at source-bulk connection
6735 \ifpgf@circuit@fet@solderdot
6736 \pgfscope
6737 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6738 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6739 \pgfnode{circ}{center}{}{}{}
6740 \endpgfscope{}
6741 \fi
6742 }
6743
6744 % P-CHANNEL IGFET ENHANCEMENT TYPE
6745 \pgfdeclaretransistorwrapperaddbulk{pigfete}{}{%
6746 \pgf@circuit@trans@depletiontypefalse
6747 \drawfetcore{pigfete}
6748 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6749
6750 % SOURCE CONNECTION
6751 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6752 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6753 \pgfusepath{draw}
6754
6755
6756 % SOLDER DOT at source-bulk connection
6757 \ifpgf@circuit@fet@solderdot
6758 \pgfscope
6759 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6760 \pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@up}}
6761 \pgfnode{circ}{center}{}{}{}
6762 \endpgfscope
6763 \fi
6764 }
6765
6766 % P-CHANNEL IGFET ENHANCEMENT TYPE with bulk connector
6767 \pgfdeclaretransistorwrapperaddbulk{pigfetebulk}{}{%
6768 \pgf@circuit@trans@depletiontypefalse
6769 \drawfetcore{pigfetebulk}
6770 }
6771
6772
6773 % P-CHANNEL IGFET DEPLETION TYPE
6774 \pgfdeclaretransistorwrapperaddbulk{pigfetd}{}{%
6775 \pgf@circuit@trans@depletiontypetrue
6776 \drawfetcore{pigfetd}
6777
6778 % SOURCE CONNECTION
6779 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6780 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6781 \pgfusepath{draw}
6782
6783
6784 % SOLDER DOT at source-bulk connection
6785 \ifpgf@circuit@fet@solderdot
6786 \pgfscope
6787 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6788 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@up}}
6789 \pgfnode{circ}{center}{}{}{}
6790 \endpgfscope{}
6791 \fi
6792 }
6793
6794 \pgfcircdeclaretransistor{njfet}{}{%
6795 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6796 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6797 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}}
6798 \pgfpathlineto{\pgfpoint
6799 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6800 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}}
6801
6802 \pgfpathmoveto{\pgfpoint
6803 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6804 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6805 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6806 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6807 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6808 \pgfusepath{draw}
6809
6810 \pgfscope
6811 \pgfpathmoveto{\pgfpoint
6812 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6813 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf@circ@res@up}}
6814 \pgfpathlineto{\pgfpoint
6815 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6816 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf@circ@res@down}}
6817 \pgfsetlinewidth{2\pgflinewidth}
6818 \pgfusepath{draw}
6819 \endpgfscope
6820
6821 \pgfscope
6822 \pgfslopedattimetrue
6823 \pgfallowupsidedownattimetrue
6824 \pgfresetnontranslationattimefalse
6825 \pgftransformlineattime{.6}{%
6826 \pgfpoint{\pgf@circ@res@left}%
6827 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}%
6828 }{%
6829 \pgfpoint
6830 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}%
6831 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}%
6832 }
6833 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6834 \endpgfscope
6835
6836 \pgfpathmoveto{\pgfpoint
6837 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6838 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6839 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
6840 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6841 \pgfusepath{draw}
6842 }
6843
6844
6845 \pgfcircdeclaretransistor{pjfet}{}{%
6846 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6847 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6848 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6849 \pgfpathlineto{\pgfpoint
6850 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6851 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6852
6853 \pgfpathmoveto{\pgfpoint
6854 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6855 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}}
6856 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6857 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}}
6858 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6859 \pgfusepath{draw}
6860
6861 \pgfscope
6862 \pgfpathmoveto{\pgfpoint
6863 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6864 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf@circ@res@up}}
6865 \pgfpathlineto{\pgfpoint
6866 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6867 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf@circ@res@down}}
6868 \pgfsetlinewidth{2\pgflinewidth}
6869 \pgfusepath{draw}
6870 \endpgfscope
6871
6872 \pgfscope
6873 \pgfslopedattimetrue
6874 \pgfallowupsidedownattimetrue
6875 \pgfresetnontranslationattimefalse
6876 \pgftransformlineattime{.4}{%
6877 \pgfpoint%
6878 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}%
6879 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}%
6880 }{%
6881 \pgfpoint{\pgf@circ@res@left}%
6882 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}%
6883 }
6884 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6885 \endpgfscope
6886
6887
6888 \pgfpathmoveto{\pgfpoint
6889 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6890 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6891 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
6892 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6893 \pgfusepath{draw}
6894 }
6895
6896
6897 \pgfdeclaretransistorwrapperaddbulk{isfet}{}{%
6898 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6899 % DRAIN CONNECTION
6900 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6901 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
6902 % DRAIN
6903 \pgfpathlineto{\pgfpoint
6904 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
6905 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
6906 \pgfusepath{draw}
6907
6908 % GATE, DEPLETION TYPE
6909 \pgfscope %% added
6910 \pgfpathmoveto{\pgfpoint
6911 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
6912 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@up}}
6913 \pgfpathlineto{\pgfpoint
6914 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
6915 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@down}}
6916 \pgfsetlinewidth{2\pgflinewidth} %% added
6917 \pgfusepath{draw} %% added
6918 \endpgfscope %% added
6919
6920 % BULK
6921 \pgfpathmoveto{\pgfpoint
6922 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
6923 {\pgf@circ@res@up+\pgf@circ@res@down}}
6924 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+.5\pgflinewidth}
6925 {\pgf@circ@res@up+\pgf@circ@res@down}}
6926
6927 % SOURCE
6928 \pgfpathmoveto{\pgfpoint
6929 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
6930 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
6931 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6932 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
6933 % SOURCE CONNECTION
6934 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6935 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6936 \pgfusepath{draw}
6937
6938 % GATE
6939 %\pgfscope
6940 %\pgfpathmoveto{\pgfpoint
6941 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf@circ@res@left}
6942 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
6943 %\pgfpathlineto{\pgfpoint
6944 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf@circ@res@left}
6945 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
6946 %\pgfsetlinewidth{2\pgflinewidth}
6947 %\pgfusepath{draw}
6948 %\endpgfscope
6949
6950
6951 % SOLDER DOT at source-bulk connection
6952 \ifpgf@circuit@fet@solderdot
6953 \pgfscope
6954 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6955 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6956 \pgfnode{circ}{center}{}{}{}
6957 \endpgfscope{}
6958 \fi
6959 % ARROW
6960 \pgfscope
6961 \pgfslopedattimetrue
6962 \pgfallowupsidedownattimetrue
6963 \pgfresetnontranslationattimefalse
6964 \pgftransformlineattime{.6}{%
6965 \pgfpoint
6966 {\pgf@circ@res@right}%
6967 {\pgf@circ@res@up+\pgf@circ@res@down}%
6968 }{%
6969 \pgfpoint%
6970 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}%
6971 {\pgf@circ@res@up+\pgf@circ@res@down}%
6972 }
6973 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6974 \endpgfscope
6975 \pgfusepath{draw}
6976
6977 % Wavy lines
6978 \pgfscope
6979 \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}}
6980 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6981 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6982 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6983 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6984 \pgfusepath{draw}
6985
6986 \pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf@circ@res@up}{0cm}}
6987 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6988 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6989 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6990 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6991 \pgfusepath{draw}
6992
6993 \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}}
6994 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6995 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6996 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6997 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
6998 \pgfusepath{draw}
6999 \endpgfscope
7000
7001 }
7002
7003
7004 %% Black thyristor
7005
7006 \pgfcircdeclarebipole{
7007 \anchor{gate}{
7008 \northeast
7009 }
7010 \anchor{anode}{
7011 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
7012 \pgf@y=0cm
7013 }
7014 \anchor{G}{
7015 \northeast
7016 }
7017 \anchor{cathode}{
7018 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
7019 \pgf@y=0cm
7020 }
7021 }{\ctikzvalof{tripoles/thyristor/height 2}}{fullthyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
7022
7023 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7024
7025 \pgf@circ@res@other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf@circ@res@left
7026 \pgf@circ@res@step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf@circ@res@right
7027
7028 \pgfscope
7029 \pgftransformxshift{\pgf@circ@res@other}
7030 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7031
7032 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7033 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7034 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7035 \pgfusepath{draw,fill}
7036
7037 \pgfsetlinewidth{\pgfstartlinewidth}
7038
7039 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7040 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf@circ@res@up}}
7041 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\pgf@circ@res@up}}
7042 \pgfusepath{draw}
7043 \endpgfscope
7044
7045 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
7046 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@down}}
7047
7048 \pgfusepath{draw}
7049
7050 \pgfsetlinewidth{\pgfstartlinewidth}
7051
7052 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7053 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7054
7055 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7056 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7057
7058 \pgfusepath{draw}
7059
7060 }
7061
7062 %% Empty thyristor
7063
7064 \pgfcircdeclarebipole{
7065 \anchor{gate}{
7066 \northeast
7067 }
7068 \anchor{anode}{
7069 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
7070 \pgf@y=0cm
7071 }
7072 \anchor{G}{
7073 \northeast
7074 }
7075 \anchor{cathode}{
7076 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
7077 \pgf@y=0cm
7078 }
7079 }{\ctikzvalof{tripoles/thyristor/height 2}}{emptythyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
7080
7081 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7082
7083 \pgf@circ@res@other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf@circ@res@left
7084 \pgf@circ@res@step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf@circ@res@right
7085
7086 \pgfscope
7087 \pgftransformxshift{\pgf@circ@res@other}
7088 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7089
7090 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7091 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7092 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7093 \pgfusepath{draw}
7094
7095 \pgfsetlinewidth{\pgfstartlinewidth}
7096
7097 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7098 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf@circ@res@up}}
7099 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\pgf@circ@res@up}}
7100 \pgfusepath{draw}
7101 \endpgfscope
7102
7103 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
7104 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@down}}
7105
7106 \pgfusepath{draw}
7107
7108 \pgfsetlinewidth{\pgfstartlinewidth}
7109
7110 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7111 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7112
7113 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7114 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7115
7116 \pgfusepath{draw}
7117
7118 }
7119
7120 %% Empty triac
7121
7122 \pgfcircdeclarebipole{
7123 \anchor{gate}{
7124 \northeast
7125 }
7126 \anchor{G}{
7127 \northeast
7128 }
7129 \anchor{anode}{
7130 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
7131 \pgf@y=0cm
7132 }
7133 \anchor{cathode}{
7134 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
7135 \pgf@y=0cm
7136 }
7137 }{\ctikzvalof{tripoles/triac/height}}{emptytriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
7138
7139 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7140
7141 \pgf@circ@res@other = \ctikzvalof{tripoles/triac/diode width left}\pgf@circ@res@left
7142 \pgf@circ@res@step = \ctikzvalof{tripoles/triac/diode width right}\pgf@circ@res@right
7143
7144 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7145 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7146 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7147 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7148
7149 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7150 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7151 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7152 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7153
7154 \pgfusepath{draw}
7155
7156 \pgfsetlinewidth{\pgfstartlinewidth}
7157
7158 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7159 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7160 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % sqrt(1/2)
7161
7162 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7163 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7164
7165 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7166 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7167
7168 \pgfusepath{draw}
7169
7170 }
7171
7172 %% Empty triac
7173
7174 \pgfcircdeclarebipole{
7175 \anchor{gate}{
7176 \northeast
7177 }
7178 \anchor{G}{
7179 \northeast
7180 }
7181 \anchor{anode}{
7182 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
7183 \pgf@y=0cm
7184 }
7185 \anchor{cathode}{
7186 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
7187 \pgf@y=0cm
7188 }
7189 }{\ctikzvalof{tripoles/triac/height}}{fulltriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
7190
7191 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7192
7193 \pgf@circ@res@other = \ctikzvalof{tripoles/triac/diode width left}\pgf@circ@res@left
7194 \pgf@circ@res@step = \ctikzvalof{tripoles/triac/diode width right}\pgf@circ@res@right
7195
7196 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7197 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7198 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7199 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7200
7201 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7202 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7203 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7204 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7205
7206 \pgfusepath{draw,fill}
7207
7208 \pgfsetlinewidth{\pgfstartlinewidth}
7209
7210 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7211 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7212 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % sqrt(1/2)
7213
7214 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7215 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7216
7217 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7218 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7219
7220 \pgfusepath{draw}
7221
7222 }
7223
7224
7225
7226
7227
7228
7229
7230 \pgfcircdeclarebipole{
7231 \anchor{out 1}{
7232 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
7233 \pgf@y=0cm
7234 }
7235 \anchor{out 2}{
7236 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
7237 \pgf@y=.8\pgf@y
7238 }
7239 }{\ctikzvalof{tripoles/toggleswitch/height 2}}{toggleswitch}{\ctikzvalof{tripoles/toggleswitch/height}}{\ctikzvalof{tripoles/toggleswitch/width}}{
7240
7241 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7242 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@left}{0pt}}
7243 \pgfusepath{draw}
7244 \pgfscope
7245 \pgfpathmoveto{\pgfpoint{.3\pgf@circ@res@left}{0pt}}
7246 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7247 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{.5\pgf@circ@res@up}}
7248 \pgfusepath{draw}
7249 \endpgfscope
7250
7251 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7252 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{0}}
7253
7254 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{.8\pgf@circ@res@up}}
7255 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.8\pgf@circ@res@up}}
7256 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.15\pgf@circ@res@up}}
7257 \pgfusepath{draw}
7258
7259
7260 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@left}{\pgf@circ@res@up}}
7261 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{\pgf@circ@res@up}}
7262 \pgfusepath{draw}
7263
7264 \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}
7265 \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@up}}
7266 \pgfpathlineto{\pgfpoint{0}{.8\pgf@circ@res@up}}
7267 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@left}{.6\pgf@circ@res@up}}
7268 \pgfpathlineto{\pgfpoint{0}{.4\pgf@circ@res@up}}
7269 \pgfpathlineto{\pgfpoint{0}{.2\pgf@circ@res@up}}
7270 \pgfusepath{draw}
7271 \pgfsetdash{}{0cm}
7272 }
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283 \pgfdeclareshape{op amp}
7284 {
7285 \anchor{center}{\pgfpointorigin}
7286 \savedanchor\northwest{%
7287 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7288 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
7289 \pgf@y=.5\pgf@y
7290 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7291 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
7292 \pgf@x=.5\pgf@x
7293 }
7294 \anchor{south}{
7295 \northwest
7296 \pgf@y=-\pgf@y
7297 }
7298 \anchor{north}{
7299 \northwest
7300 }
7301 \savedanchor\left{%
7302 \pgf@y=0pt
7303 }
7304 \savedanchor\inOne{%
7305 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7306 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
7307 \pgf@y=.5\pgf@y
7308 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
7309 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7310 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
7311 \pgf@x=.5\pgf@x
7312 }
7313 \anchor{-}{
7314 \inOne
7315 }
7316 \anchor{+}{
7317 \inOne
7318 \pgf@y=-\pgf@y
7319 }
7320 \savedanchor\up{%
7321 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7322 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
7323 \pgf@y=.5\pgf@y
7324 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7325 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
7326 \pgf@x=.5\pgf@x
7327 \pgf@circ@res@up = \pgf@y
7328 \pgf@circ@res@right = -\pgf@x
7329 \pgf@circ@res@left = \pgf@x
7330 \pgfpointlineattime{
7331 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
7332 \pgfpoint{
7333 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7334 {\pgf@circ@res@up}}
7335 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7336 }
7337 \anchor{up}{
7338 \up
7339 }
7340 \anchor{down}{
7341 \up
7342 \pgf@y=-\pgf@y
7343 }
7344 \anchor{out}{
7345 \northwest
7346 \pgf@y=0pt
7347 \pgf@x=-\pgf@x
7348 }
7349 \anchor{west}{
7350 \left
7351 }
7352 \anchor{east}{
7353 \left
7354 \pgf@x=-\pgf@x
7355 }
7356
7357 \backgroundpath{
7358 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7359
7360
7361 \northwest
7362 \pgf@circ@res@up = \pgf@y
7363 \pgf@circ@res@down = -\pgf@y
7364 \pgf@circ@res@right = -\pgf@x
7365 \pgf@circ@res@left = \pgf@x
7366
7367 \pgfpathmoveto{\pgfpoint
7368 {\pgf@circ@res@left}
7369 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
7370 \pgfpathlineto{\pgfpoint
7371 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7372 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
7373 \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} $-$}
7374
7375
7376 \pgfpathmoveto{\pgfpoint
7377 {\pgf@circ@res@left}
7378 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
7379 \pgfpathlineto{\pgfpoint
7380 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7381 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
7382 \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} $+$}
7383
7384 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7385 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7386
7387 \pgfusepath{draw}
7388
7389
7390 \pgfscope
7391 \pgfsetlinewidth{2\pgflinewidth}
7392 \pgftransformxshift{.7\pgf@circ@res@left}
7393 \pgf@circ@res@step=\pgf@circ@res@right
7394 \advance\pgf@circ@res@step by -\pgf@circ@res@left
7395 \pgf@circ@res@step=.7\pgf@circ@res@step
7396
7397 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7398 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7399 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7400 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7401 \pgfusepath{draw}
7402 \endpgfscope
7403
7404
7405
7406 }
7407 }
7408
7409 %%Transkonduktanzverstärker
7410 \pgfdeclareshape{gm amp}
7411 {
7412 \anchor{center}{\pgfpointorigin}
7413 \savedanchor\northwest{%
7414 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7415 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@y
7416 \pgf@y=.5\pgf@y
7417 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7418 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@x
7419 \pgf@x=.5\pgf@x
7420 }
7421 \anchor{south}{
7422 \northwest
7423 \pgf@y=-\pgf@y
7424 }
7425 \anchor{north}{
7426 \northwest
7427 }
7428 \savedanchor\left{%
7429 \pgf@y=0pt
7430 }
7431 \savedanchor\inOne{%
7432 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7433 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@y
7434 \pgf@y=.5\pgf@y
7435 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@y
7436 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7437 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@x
7438 \pgf@x=.5\pgf@x
7439 }
7440 \anchor{-}{
7441 \inOne
7442 }
7443 \anchor{+}{
7444 \inOne
7445 \pgf@y=-\pgf@y
7446 }
7447 \savedanchor\up{%
7448 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7449 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@y
7450 \pgf@y=.5\pgf@y
7451 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7452 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@x
7453 \pgf@x=.5\pgf@x
7454 \pgf@circ@res@up = \pgf@y
7455 \pgf@circ@res@right = -\pgf@x
7456 \pgf@circ@res@left = \pgf@x
7457 \pgfpointlineattime{
7458 \pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/up pos}}{
7459 \pgfpoint{
7460 \pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}
7461 {\pgf@circ@res@up}}
7462 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7463 }
7464 \anchor{up}{
7465 \up
7466 }
7467 \anchor{down}{
7468 \up
7469 \pgf@y=-\pgf@y
7470 }
7471 \anchor{out}{
7472 \northwest
7473 \pgf@y=0pt
7474 \pgf@x=-\pgf@x
7475 }
7476 \anchor{west}{
7477 \left
7478 }
7479 \anchor{east}{
7480 \left
7481 \pgf@x=-\pgf@x
7482 }
7483
7484 \backgroundpath{
7485 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7486
7487 \northwest
7488 \pgf@circ@res@up = \pgf@y
7489 \pgf@circ@res@down = -\pgf@y
7490 \pgf@circ@res@right = -\pgf@x
7491 \pgf@circ@res@left = \pgf@x
7492
7493 \pgfpathmoveto{\pgfpoint
7494 {\pgf@circ@res@left}
7495 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}}
7496 \pgfpathlineto{\pgfpoint
7497 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}
7498 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}}
7499 \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} $-$}
7500
7501
7502 \pgfpathmoveto{\pgfpoint
7503 {\pgf@circ@res@left}
7504 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}}
7505 \pgfpathlineto{\pgfpoint
7506 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}
7507 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}}
7508 \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} $+$}
7509
7510 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7511 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{0pt}} %
7512
7513 \pgfusepath{draw}
7514
7515 \pgfscope
7516 \pgfsetlinewidth{2\pgflinewidth}
7517 \pgftransformxshift{.7\pgf@circ@res@left}
7518 \pgf@circ@res@step=\pgf@circ@res@right
7519 \advance\pgf@circ@res@step by -\pgf@circ@res@left
7520 \pgf@circ@res@step=.7\pgf@circ@res@step
7521 %Umrandung:
7522 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}} %geändert startpunkt neu am ausgangsstrich
7523 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{15pt}}%vom Ausgang nach oben
7524 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} %neu ecke links oben nach rechts oben
7525 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} %bei deneigängen runter
7526 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-15pt}}%ecke links unten nach rechts unten
7527 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} %rechts unten zum ausgang
7528 \pgfusepath{draw}
7529 \endpgfscope
7530
7531
7532
7533 }
7534 }
7535
7536
7537
7538 %% Potentiometer
7539 \pgfcircdeclarebipole{
7540 \anchor{wiper}{
7541 \northeast
7542 \pgfpoint{0pt}{\pgf@y}
7543 }
7544 \anchor{W}{
7545 \northeast
7546 \pgfpoint{0pt}{\pgf@y}
7547 }
7548 }{\ctikzvalof{bipoles/potentiometer/height 2}}{potentiometer}{\ctikzvalof{bipoles/potentiometer/height}}{\ctikzvalof{bipoles/potentiometer/width}}{
7549 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7550 \pgftransformationadjustments
7551 \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
7552 \divide \pgf@circ@res@step by 12
7553
7554 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
7555
7556 \pgf@circ@res@other = \pgf@circ@res@left
7557 \advance\pgf@circ@res@other by \pgf@circ@res@step
7558 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7559 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7560 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7561 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7562 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7563 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7564 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7565 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7566 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7567 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7568 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7569 \advance\pgf@circ@res@other by \pgf@circ@res@step
7570 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
7571 \pgfsetbeveljoin
7572 \pgfusepath{draw}
7573
7574 \pgfscope
7575 %\pgfsetlinewidth{\pgfstartlinewidth}
7576 \pgfsetarrowsend{latex'}
7577 \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7578 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7579 \pgfusepath{draw}
7580 \endpgfscope
7581 }
7582
7583
7584
7585
7586
7587 %% Generic tunable
7588
7589 \pgfcircdeclarebipole{
7590 \anchor{wiper}{
7591 \northeast
7592 \pgfpoint{0pt}{\pgf@y}
7593 }
7594 }{\ctikzvalof{bipoles/generic potentiometer/height 2}}{genericpotentiometer}{\ctikzvalof{bipoles/generic potentiometer/height}}{\ctikzvalof{bipoles/generic potentiometer/width}}{
7595
7596 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
7597 \divide \pgf@circ@res@step by 14
7598
7599 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
7600 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7601
7602 \pgfusepath{draw}
7603
7604 \pgfscope
7605 %\pgfsetlinewidth{\pgfstartlinewidth}
7606 \pgfsetarrowsend{latex'}
7607 \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7608 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7609 \pgfusepath{draw}
7610 \endpgfscope
7611 }
7612
7613
7614 \pgfdeclareshape{mixer}
7615 {
7616 \savedanchor\northwest{
7617 \ifpgf@circuit@boxed
7618 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7619 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
7620 \pgf@y=.5\pgf@y
7621 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7622 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
7623 \pgf@x=.5\pgf@x
7624 \else
7625 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7626 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@y
7627 \pgf@y=.5\pgf@y
7628 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7629 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@x
7630 \pgf@x=.5\pgf@x
7631 \fi
7632 }
7633 \anchor{center}{
7634 \pgfpointorigin
7635 }
7636 \anchor{left}{%
7637 \northwest
7638 \pgf@y=0pt
7639 }
7640 \anchor{1}{
7641 \northwest
7642 \pgf@y=0pt
7643 }
7644 \anchor{2}{
7645 \northwest
7646 \pgf@y=-\pgf@y
7647 \pgf@x=0pt
7648 }
7649 \anchor{3}{
7650 \northwest
7651 \pgf@y=0pt
7652 \pgf@x=-\pgf@x
7653 }
7654 \anchor{4}{
7655 \northwest
7656 \pgf@y=\pgf@y
7657 \pgf@x=0pt
7658 }
7659 \anchor{in 1}{
7660 \northwest
7661 \pgf@y=0pt
7662 }
7663 \anchor{in1}{
7664 \northwest
7665 \pgf@y=0pt
7666 }
7667 \anchor{in}{
7668 \northwest
7669 \pgf@y=0pt
7670 }
7671 \anchor{in 2}{
7672 \northwest
7673 \pgf@y=-\pgf@y
7674 \pgf@x=0pt
7675 }
7676 \anchor{in2}{
7677 \northwest
7678 \pgf@y=-\pgf@y
7679 \pgf@x=0pt
7680 }
7681 \anchor{out}{
7682 \northwest
7683 \pgf@y=0pt
7684 \pgf@x=-\pgf@x
7685 }
7686 \anchor{center}{
7687 \pgf@y=0pt
7688 \pgf@x=0pt
7689 }
7690 \anchor{east}{
7691 \northwest
7692 \pgf@y=0pt
7693 \pgf@x=-\pgf@x
7694 }
7695 \anchor{west}{
7696 \northwest
7697 \pgf@y=0pt
7698 }
7699 \anchor{south}{
7700 \northwest
7701 \pgf@x=0pt
7702 \pgf@y=-\pgf@y
7703 }
7704 \anchor{north}{
7705 \northwest
7706 \pgf@x=0pt
7707 }
7708 \anchor{south west}{
7709 \northwest
7710 \pgf@y=-\pgf@y
7711 }
7712 \anchor{north east}{
7713 \northwest
7714 \pgf@x=-\pgf@x
7715 }
7716 \anchor{north west}{
7717 \northwest
7718 }
7719 \anchor{south east}{
7720 \northwest
7721 \pgf@x=-\pgf@x
7722 \pgf@y=-\pgf@y
7723 }
7724 \backgroundpath{
7725 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7726
7727 \pgf@circ@res@step=\ctikzvalof{tripoles/mixer/width}\pgf@circ@Rlen
7728
7729 \pgfscope
7730 \pgfstartlinewidth=\pgflinewidth
7731
7732 % draw outer box
7733 \ifpgf@circuit@boxed
7734 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
7735 \fi
7736
7737 % draw outer circle
7738 \ifpgf@circuit@boxed
7739 \pgf@circ@res@step=.7\pgf@circ@res@step
7740 \pgfsetdash{}{0pt} % draw solid circle if boxed
7741 \else
7742 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7743 \fi
7744 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
7745 \pgfusepath{draw}
7746
7747 % draw inner stuff
7748 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
7749 \pgfsetlinewidth{\pgfstartlinewidth}
7750 \pgfpathmoveto{\pgfpointorigin}
7751 \pgfpathmoveto{\pgfpointpolar{135}{0.5\pgf@circ@res@step}}
7752 \pgfpathlineto{\pgfpointpolar{-45}{0.5\pgf@circ@res@step}}
7753 \pgfpathmoveto{\pgfpointorigin}
7754 \pgfpathmoveto{\pgfpointpolar{45}{0.5\pgf@circ@res@step}}
7755 \pgfpathlineto{\pgfpointpolar{-135}{0.5\pgf@circ@res@step}}
7756 \pgfusepath{draw}
7757
7758 \endpgfscope
7759 }
7760 }
7761
7762 \pgfdeclareshape{adder}
7763 {
7764 \savedanchor\northwest{
7765 \ifpgf@circuit@boxed
7766 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7767 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
7768 \pgf@y=.5\pgf@y
7769 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7770 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
7771 \pgf@x=.5\pgf@x
7772 \else
7773 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7774 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@y
7775 \pgf@y=.5\pgf@y
7776 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7777 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@x
7778 \pgf@x=.5\pgf@x
7779 \fi
7780 }
7781 \anchor{center}{
7782 \pgfpointorigin
7783 }
7784 \anchor{left}{%
7785 \northwest
7786 \pgf@y=0pt
7787 }
7788 \anchor{1}{
7789 \northwest
7790 \pgf@y=0pt
7791 }
7792 \anchor{2}{
7793 \northwest
7794 \pgf@y=-\pgf@y
7795 \pgf@x=0pt
7796 }
7797 \anchor{3}{
7798 \northwest
7799 \pgf@y=0pt
7800 \pgf@x=-\pgf@x
7801 }
7802 \anchor{4}{
7803 \northwest
7804 \pgf@y=\pgf@y
7805 \pgf@x=0pt
7806 }
7807 \anchor{in 1}{
7808 \northwest
7809 \pgf@y=0pt
7810 }
7811 \anchor{in1}{
7812 \northwest
7813 \pgf@y=0pt
7814 }
7815 \anchor{in}{
7816 \northwest
7817 \pgf@y=0pt
7818 }
7819 \anchor{in 2}{
7820 \northwest
7821 \pgf@y=-\pgf@y
7822 \pgf@x=0pt
7823 }
7824 \anchor{in2}{
7825 \northwest
7826 \pgf@y=-\pgf@y
7827 \pgf@x=0pt
7828 }
7829 \anchor{out}{
7830 \northwest
7831 \pgf@y=0pt
7832 \pgf@x=-\pgf@x
7833 }
7834 \anchor{center}{
7835 \pgf@y=0pt
7836 \pgf@x=0pt
7837 }
7838 \anchor{east}{
7839 \northwest
7840 \pgf@y=0pt
7841 \pgf@x=-\pgf@x
7842 }
7843 \anchor{west}{
7844 \northwest
7845 \pgf@y=0pt
7846 }
7847 \anchor{south}{
7848 \northwest
7849 \pgf@x=0pt
7850 \pgf@y=-\pgf@y
7851 }
7852 \anchor{north}{
7853 \northwest
7854 \pgf@x=0pt
7855 }
7856 \anchor{south west}{
7857 \northwest
7858 \pgf@y=-\pgf@y
7859 }
7860 \anchor{north east}{
7861 \northwest
7862 \pgf@x=-\pgf@x
7863 }
7864 \anchor{north west}{
7865 \northwest
7866 }
7867 \anchor{south east}{
7868 \northwest
7869 \pgf@x=-\pgf@x
7870 \pgf@y=-\pgf@y
7871 }
7872 \backgroundpath{
7873 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7874
7875 \pgf@circ@res@step=\ctikzvalof{tripoles/adder/width}\pgf@circ@Rlen
7876
7877 \pgfscope
7878 \pgfstartlinewidth=\pgflinewidth
7879
7880 % draw outer box
7881 \ifpgf@circuit@boxed
7882 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
7883 \fi
7884
7885 % draw outer circle
7886 \ifpgf@circuit@boxed
7887 \pgf@circ@res@step=.7\pgf@circ@res@step{}
7888 \pgfsetdash{}{0pt} % draw solid circle if boxed
7889 \else
7890 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7891 \fi
7892 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
7893 \pgfusepath{draw}
7894
7895 % draw inner stuff
7896 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
7897 \pgfsetlinewidth{\pgfstartlinewidth}
7898
7899 \pgfpathmoveto{\pgfpointorigin}
7900 \pgfpathmoveto{\pgfpointpolar{0}{0.3\pgf@circ@res@step}}
7901 \pgfpathlineto{\pgfpointpolar{180}{0.3\pgf@circ@res@step}}
7902 \pgfpathmoveto{\pgfpointorigin}
7903 \pgfpathmoveto{\pgfpointpolar{90}{0.3\pgf@circ@res@step}}
7904 \pgfpathlineto{\pgfpointpolar{270}{0.3\pgf@circ@res@step}}
7905 \pgfsetlinewidth{2\pgflinewidth}
7906 \pgfusepath{draw}
7907
7908 \endpgfscope
7909 }
7910 }
7911
7912 \pgfdeclareshape{oscillator}
7913 {
7914 \savedanchor\northwest{
7915 \ifpgf@circuit@boxed
7916 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7917 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
7918 \pgf@y=.5\pgf@y
7919 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7920 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
7921 \else
7922 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7923 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@y
7924 \pgf@y=.5\pgf@y
7925 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7926 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@x
7927 \fi
7928 }
7929 \anchor{center}{
7930 \pgfpointorigin
7931 }
7932 \anchor{north}{
7933 \northwest
7934 \pgf@x=.5\pgf@x
7935 }
7936 \anchor{south}{
7937 \northwest
7938 \pgf@x=.5\pgf@x
7939 \pgf@y=-\pgf@y
7940 }
7941 \anchor{east}{
7942 \northwest
7943 \pgf@y=0pt
7944 \pgf@x=0pt
7945 }
7946 \anchor{west}{
7947 \northwest
7948 \pgf@y=0pt
7949 }
7950 \anchor{text}{
7951 \pgf@x=-2\pgf@x
7952 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
7953 \advance \pgf@y by -1.5\ht\pgfnodeparttextbox
7954 }
7955 \backgroundpath{
7956 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7957
7958 \pgf@circ@res@step=\ctikzvalof{tripoles/oscillator/width}\pgf@circ@Rlen{}
7959
7960 \pgfscope
7961 \pgfstartlinewidth=\pgflinewidth
7962
7963 \pgftransformxshift{-0.5\pgf@circ@res@step} % The oscillator is shifted to the left, so a connection comes out of the anchor "east"
7964
7965 % draw outer box
7966 \ifpgf@circuit@boxed{}
7967 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
7968 \fi
7969
7970 % draw outer circle
7971 \ifpgf@circuit@boxed
7972 \pgf@circ@res@step=.7\pgf@circ@res@step{}
7973 \pgfsetdash{}{0pt} % draw solid circle if boxed
7974 \else
7975 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7976 \fi
7977 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
7978 \pgfusepath{draw}
7979
7980 % draw inner sine waves
7981 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
7982 \pgfsetlinewidth{\pgfstartlinewidth}
7983
7984 \pgfpathmoveto{\pgfpoint{-0.3\pgf@circ@res@step}{0\pgf@circ@res@step}}
7985 \pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}}
7986 \pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}}
7987 \pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}}
7988 \pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}}
7989 \pgfusepath{draw}
7990
7991 \endpgfscope
7992 }
7993 }
7994
7995 \pgfdeclareshape{circulator}
7996 {
7997 \savedanchor\northwest{
7998 \ifpgf@circuit@boxed
7999 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8000 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
8001 \pgf@y=.5\pgf@y
8002 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8003 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
8004 \pgf@x=.5\pgf@x
8005 \else
8006 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8007 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@y
8008 \pgf@y=.5\pgf@y
8009 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8010 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@x
8011 \pgf@x=.5\pgf@x
8012 \fi
8013 }
8014 \anchor{center}{
8015 \pgfpointorigin
8016 }
8017 \anchor{left}{%
8018 \northwest
8019 \pgf@y=0pt
8020 }
8021 \anchor{1}{
8022 \northwest
8023 \pgf@y=0pt
8024 }
8025 \anchor{2}{
8026 \northwest
8027 \pgf@y=0pt
8028 \pgf@x=-\pgf@x
8029 }
8030 \anchor{3}{
8031 \northwest
8032 \pgf@y=-\pgf@y
8033 \pgf@x=0pt
8034 }
8035 \anchor{east}{
8036 \northwest
8037 \pgf@y=0pt
8038 \pgf@x=-\pgf@x
8039 }
8040 \anchor{west}{
8041 \northwest
8042 \pgf@y=0pt
8043 }
8044 \anchor{south}{
8045 \northwest
8046 \pgf@x=0pt
8047 \pgf@y=-\pgf@y
8048 }
8049 \anchor{north}{
8050 \northwest
8051 \pgf@x=0pt
8052 }
8053 \anchor{south west}{
8054 \northwest
8055 \pgf@y=-\pgf@y
8056 }
8057 \anchor{north east}{
8058 \northwest
8059 \pgf@x=-\pgf@x
8060 }
8061 \anchor{north west}{
8062 \northwest
8063 }
8064 \anchor{south east}{
8065 \northwest
8066 \pgf@x=-\pgf@x
8067 \pgf@y=-\pgf@y
8068 }
8069 \backgroundpath{
8070 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8071
8072 \pgf@circ@res@step=\ctikzvalof{tripoles/circulator/width}\pgf@circ@Rlen
8073
8074 \pgfscope
8075 \pgfstartlinewidth=\pgflinewidth
8076
8077 % draw outer box
8078 \ifpgf@circuit@boxed
8079 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8080 \fi
8081
8082 % draw outer circle
8083 \ifpgf@circuit@boxed{}
8084 \pgf@circ@res@step=.7\pgf@circ@res@step{}
8085 \pgfsetdash{}{0pt} % draw solid circle if boxed
8086 \else
8087 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8088 \fi
8089 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
8090 \pgfusepath{draw}
8091
8092 % inner arrow
8093 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8094 \pgfsetlinewidth{\pgfstartlinewidth}
8095
8096 \pgfsetarrowsend{latex}
8097 \pgfpathmoveto{\pgfpoint{-0.25\pgf@circ@res@step}{0}}
8098 \pgfpatharc{180}{-90} {0.25\pgf@circ@res@step}
8099 \pgfpathlineto{\pgfpoint{-5pt}{-0.2\pgf@circ@res@step}}
8100 \pgfusepath{draw}
8101
8102 \endpgfscope
8103 }
8104 }
8105
8106
8107 % Wilkinson divider
8108 \pgfdeclareshape{wilkinson}{
8109 \anchor{center}{
8110 \northwest
8111 \pgf@x=0pt
8112 \pgf@y=0pt
8113 }
8114 \savedanchor\northwest{%
8115 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8116 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/height}\pgf@y
8117 \pgf@y=.5\pgf@y
8118 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8119 \pgf@x=.5\pgf@x
8120 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/width}\pgf@x
8121 }
8122 \anchor{north}{
8123 \northwest
8124 \pgf@x=0pt
8125 }
8126 \anchor{south}{
8127 \northwest
8128 \pgf@x=0pt
8129 \pgf@y=-\pgf@y
8130 }
8131 \anchor{west}{
8132 \northwest
8133 \pgf@y=0pt
8134 }
8135 \anchor{east}{
8136 \northwest
8137 \pgf@y=0pt
8138 \pgf@x=-\pgf@x
8139 }
8140 \anchor{south west}{
8141 \northwest
8142 \pgf@y=-\pgf@y
8143 }
8144 \anchor{north east}{
8145 \northwest
8146 \pgf@x=-\pgf@x
8147 }
8148 \anchor{north west}{
8149 \northwest
8150 }
8151 \anchor{south east}{
8152 \northwest
8153 \pgf@x=-\pgf@x
8154 \pgf@y=-\pgf@y
8155 }
8156 \anchor{in}{
8157 \northwest
8158 \pgf@y=0pt
8159 }
8160 \anchor{out1}{
8161 \northwest
8162 \pgf@x=-\pgf@x
8163 \pgf@y=-0.5\pgf@y
8164 }
8165 \anchor{out2}{
8166 \northwest
8167 \pgf@x=-\pgf@x
8168 \pgf@y=0.5\pgf@y
8169 }
8170 \anchor{text}{
8171 \northwest
8172 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
8173 \pgf@x=-.5\wd\pgfnodeparttextbox
8174 }
8175 \backgroundpath{
8176 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8177
8178 \northwest
8179 \pgf@circ@res@up = \pgf@y
8180 \pgf@circ@res@down = -\pgf@y
8181 \pgf@circ@res@right = -\pgf@x
8182 \pgf@circ@res@left = \pgf@x
8183
8184 \pgfstartlinewidth=\pgflinewidth
8185
8186 % draw outer box
8187 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8188 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8189 \pgfusepath{draw}
8190
8191 % draw inner stuff
8192 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8193 \pgfsetarrows{-} %never draw arrows
8194 \pgfsetlinewidth{\pgfstartlinewidth}
8195 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
8196 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
8197 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8198 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8199 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
8200 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8201 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8202
8203 \pgfusepath{draw}
8204
8205 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8206 % draw inner resisitor - european or american style is recognised
8207 {
8208 \pgftransformshift{\pgfpoint{0.5\pgf@circ@res@right}{0pt}}
8209 \pgftransformrotate{90}
8210
8211 % calculate size of resistor
8212 \ifpgf@circuit@europeanresistor
8213 \pgfmathparse{\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/generic/width} / 2}
8214 \pgftransformscale{\pgfmathresult}
8215 \pgfnode{genericshape}{center}{}{pgf@generic}{\pgfusepath{fill}}
8216 \else
8217 \pgfmathparse{\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/resistor/width} / 2}
8218 \pgftransformscale{\pgfmathresult}
8219 \pgfnode{resistorshape}{center}{}{pgf@resistor}{\pgfusepath{fill}}
8220 \fi
8221 }
8222
8223 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8224 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}}
8225
8226 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}}
8227 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8228 \pgfusepath{draw}
8229
8230 }
8231 }
8232
8233 % electromechanical device (motor/generator)
8234 \pgfdeclareshape{elmech}
8235 {
8236 \savedanchor\northwest{
8237 %\ifpgf@circuit@boxed
8238 % \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8239 % \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
8240 % \pgf@y=.5\pgf@y
8241 % \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8242 % \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
8243 % \pgf@x=.5\pgf@x
8244 %\else
8245 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8246 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/height}\pgf@y
8247 \pgf@y=.5\pgf@y
8248 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8249 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/width}\pgf@x
8250 \pgf@x=.5\pgf@x
8251 %\fi
8252 }
8253 \anchor{center}{
8254 \pgfpointorigin
8255 }
8256 \anchor{text}{
8257 \pgfpointorigin
8258 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
8259 \advance \pgf@y by -.5\ht\pgfnodeparttextbox
8260 }
8261 \anchor{left}{%
8262 \northwest
8263 \pgf@y=0pt
8264 }
8265 \anchor{right}{%
8266 \northwest
8267 \pgf@y=0pt
8268 \pgf@x=-\pgf@x
8269 }
8270 \anchor{top}{
8271 \northwest
8272 \pgf@x=0pt
8273 }
8274 \anchor{pathstart}{
8275 \northwest
8276 \pgf@x=0pt
8277 }
8278 \anchor{pathend}{
8279 \northwest
8280 \pgf@x=0pt
8281 \pgf@y=-\pgf@y
8282 }
8283 \anchor{bottom}{
8284 \northwest
8285 \pgf@x=0pt
8286 \pgf@y=-\pgf@y
8287 }
8288 \anchor{center}{
8289 \pgf@y=0pt
8290 \pgf@x=0pt
8291 }
8292 \anchor{east}{
8293 \northwest
8294 \pgf@y=0pt
8295 \pgf@x=-\pgf@x
8296 }
8297 \anchor{west}{
8298 \northwest
8299 \pgf@y=0pt
8300 }
8301 \anchor{south}{
8302 \northwest
8303 \pgf@x=0pt
8304 \pgf@y=-\pgf@y
8305 }
8306 \anchor{north}{
8307 \northwest
8308 \pgf@x=0pt
8309 }
8310 \backgroundpath{
8311 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8312 \pgf@circ@res@step=\ctikzvalof{tripoles/elmech/width}\pgf@circ@Rlen
8313 \pgf@circ@res@up=\ctikzvalof{tripoles/elmech/height}\pgf@circ@Rlen
8314 \pgfscope
8315 \pgfstartlinewidth=\pgflinewidth
8316 % draw outer box
8317 % \ifpgf@circuit@boxed
8318 % \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8319 % \fi
8320 % draw outer circle
8321 %\ifpgf@circuit@boxed
8322 % \pgf@circ@res@step=.7\pgf@circ@res@step
8323 % \pgfsetdash{}{0pt} % draw solid circle if boxed
8324 %\else
8325 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8326 %\fi
8327 \pgfpathrectangle{\pgfpoint{-.25\pgf@circ@res@step}{-.5\pgf@circ@res@up}}{\pgfpoint{.5\pgf@circ@res@step}{\pgf@circ@res@up}}
8328 \pgfsetfillcolor{black}
8329 \pgfusepath{draw,fill}
8330 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
8331 \pgfsetfillcolor{white}
8332 \pgfusepath{draw,fill}
8333 \endpgfscope
8334 }
8335 }
8336
8337 %%%---------- close: tex/pgfcirctripoles
8338 %%%%%%%%%%% Springe nach tex/pgfcircquadpoles
8339 %%%---------- open: tex/pgfcircquadpoles.tex
8340 % Copyright 2007-2009 by Massimo Redaelli
8341 %
8342 % This file may be distributed and/or modified
8343 %
8344 % 1. under the LaTeX Project Public License and/or
8345 % 2. under the GNU Public License.
8346 %
8347 % See the file doc/LICENSE for more details.
8348
8349 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8350 %% Quadripoles
8351
8352 \long\def\pgfcircdeclarequadpole#1#2#3{
8353 \pgfdeclareshape{#1}
8354 {
8355 \anchor{center}{
8356 \northwest
8357 \pgf@x=0pt
8358 }
8359 \savedanchor\northwest{%
8360 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8361 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@y
8362 \pgf@y=.5\pgf@y
8363 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8364 \pgf@x=.5\pgf@x
8365 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x
8366 }
8367 \anchor{A2}{
8368 \northwest
8369 \pgf@y=-\pgf@y
8370 }
8371 \anchor{B1}{
8372 \northwest
8373 \pgf@x=-\pgf@x
8374 }
8375 \anchor{A1}{
8376 \northwest
8377 }
8378 \anchor{B2}{
8379 \northwest
8380 \pgf@x=-\pgf@x
8381 \pgf@y=-\pgf@y
8382 }
8383 \anchor{north}{
8384 \northwest
8385 \pgf@x=0pt
8386 }
8387 \anchor{south}{
8388 \northwest
8389 \pgf@x=0pt
8390 \pgf@y=-\pgf@y
8391 }
8392 \anchor{west}{
8393 \northwest
8394 \pgf@y=0pt
8395 }
8396 \anchor{east}{
8397 \northwest
8398 \pgf@y=0pt
8399 \pgf@x=-\pgf@x
8400 }
8401 \anchor{south west}{
8402 \northwest
8403 \pgf@y=-\pgf@y
8404 }
8405 \anchor{north east}{
8406 \northwest
8407 \pgf@x=-\pgf@x
8408 }
8409 \anchor{north west}{
8410 \northwest
8411 }
8412 \anchor{south east}{
8413 \northwest
8414 \pgf@x=-\pgf@x
8415 \pgf@y=-\pgf@y
8416 }
8417 \anchor{base}{
8418 \northwest
8419 \pgf@x=0pt
8420 }
8421 #3
8422 \backgroundpath{
8423 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8424
8425 \northwest
8426 \pgf@circ@res@up = \pgf@y
8427 \pgf@circ@res@down = -\pgf@y
8428 \pgf@circ@res@right = -\pgf@x
8429 \pgf@circ@res@left = \pgf@x
8430
8431 %\pgf@circ@Rlen=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8432
8433 #2
8434
8435 }
8436 }
8437 }
8438
8439
8440
8441 \def\pgf@circ@drawtransformerbasicanchor{
8442 \pgfkeysvalueof{/tikz/circuitikz/quadpoles/trans/height}
8443 \anchor{AA2}{
8444 \northwest
8445 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8446 \pgf@x=.7\pgf@x
8447 \pgf@y=-\pgf@y
8448 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8449 }
8450 \anchor{BB1}{
8451 \northwest
8452 \pgf@x=-\pgf@x
8453 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8454 \pgf@x=.7\pgf@x
8455 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8456 }
8457 \anchor{AA1}{
8458 \northwest
8459 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8460 \pgf@x=.7\pgf@x
8461 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8462 }
8463 \anchor{BB2}{
8464 \northwest
8465 \pgf@x=-\pgf@x
8466 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8467 \pgf@x=.7\pgf@x
8468 \pgf@y=-\pgf@y
8469 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8470 }
8471 }
8472
8473 \def\pgf@circ@drawtransformerbasicbody{
8474 \def\stretto{.4}
8475 \pgfscope
8476 \pgfslopedattimetrue
8477 \pgfallowupsidedownattimetrue
8478 \pgftransformlineattime{.5}{%
8479 \pgfpoint%
8480 {\stretto\pgf@circ@res@left}%
8481 {\pgf@circ@res@up}%
8482 }{%
8483 \pgfpoint
8484 {\stretto\pgf@circ@res@left}%
8485 {\pgf@circ@res@down}%
8486 }
8487
8488 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
8489 \def\pgf@temp{european}%
8490 \ifx\pgf@temp\pgf@circ@temp%
8491 \pgfnode{fullgenericshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8492 \else%
8493 \def\pgf@temp{cute}
8494 \ifx\pgf@temp\pgf@circ@temp%
8495 \pgfnode{cuteinductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8496 \else%
8497 \pgfnode{americaninductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8498 \fi%
8499 \fi%
8500
8501
8502 \endpgfscope
8503 \pgfscope
8504 \pgfslopedattimetrue
8505 \pgfallowupsidedownattimetrue
8506 \pgftransformlineattime{.5}{%
8507 \pgfpoint%
8508 {\stretto\pgf@circ@res@right}%
8509 {\pgf@circ@res@down}%
8510 }{%
8511 \pgfpoint
8512 {\stretto\pgf@circ@res@right}%
8513 {\pgf@circ@res@up}%
8514 }
8515
8516 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
8517 \def\pgf@temp{european}%
8518 \ifx\pgf@temp\pgf@circ@temp%
8519 \pgfnode{fullgenericshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
8520 \else%
8521 \def\pgf@temp{cute}
8522 \ifx\pgf@temp\pgf@circ@temp%
8523 \pgfnode{cuteinductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
8524 \else%
8525 \pgfnode{americaninductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
8526 \fi%
8527 \fi%
8528
8529 \endpgfscope
8530
8531 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
8532 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
8533 \pgfpathlineto{\pgfpointanchor{pgf@inductor1}{b}}
8534
8535 \pgfpathmoveto{\pgfpointanchor{pgf@inductor1}{a}}
8536 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
8537 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
8538
8539 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
8540 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
8541 \pgfpathlineto{\pgfpointanchor{pgf@inductor2}{a}}
8542
8543 \pgfpathmoveto{\pgfpointanchor{pgf@inductor2}{b}}
8544 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
8545 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8546
8547 \pgfusepath{draw}
8548
8549 }
8550
8551
8552
8553 % contrib Kristofer M. Monisit
8554
8555 \pgfdeclareshape{fd op amp}
8556 {
8557 \anchor{center}{\pgfpointorigin}
8558 \savedanchor\northwest{%
8559 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8560 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
8561 \pgf@y=.5\pgf@y
8562 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8563 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
8564 \pgf@x=.5\pgf@x
8565 }
8566 \anchor{south}{
8567 \northwest
8568 \pgf@y=-\pgf@y
8569 }
8570 \anchor{north}{
8571 \northwest
8572 }
8573 \savedanchor\left{%
8574 \pgf@y=0pt
8575 }
8576 \savedanchor\inOne{%
8577 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8578 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
8579 \pgf@y=.5\pgf@y
8580 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
8581 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8582 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
8583 \pgf@x=.5\pgf@x
8584 }
8585 \anchor{-}{
8586 \inOne
8587 }
8588 \anchor{+}{
8589 \inOne
8590 \pgf@y=-\pgf@y
8591 }
8592 \savedanchor\up{%
8593 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8594 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
8595 \pgf@y=.5\pgf@y
8596 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8597 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
8598 \pgf@x=.5\pgf@x
8599 \pgf@circ@res@up = \pgf@y
8600 \pgf@circ@res@right = -\pgf@x
8601 \pgf@circ@res@left = \pgf@x
8602 \pgfpointlineattime{
8603 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
8604 \pgfpoint{
8605 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8606 {\pgf@circ@res@up}}
8607 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
8608 }
8609 \anchor{up}{
8610 \up
8611 }
8612 \anchor{down}{
8613 \up
8614 \pgf@y=-\pgf@y
8615 }
8616 \anchor{out +}{
8617 \northwest
8618 \pgf@y=.5\pgf@y
8619 \pgf@x=-.7\pgf@x
8620 }
8621 \anchor{out -}{
8622 \northwest
8623 \pgf@y=-.5\pgf@y
8624 \pgf@x=-.7\pgf@x
8625 }
8626 \anchor{west}{
8627 \left
8628 }
8629 \anchor{east}{
8630 \left
8631 \pgf@x=-\pgf@x
8632 }
8633
8634 \backgroundpath{
8635 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8636
8637 \northwest
8638 \pgf@circ@res@up = \pgf@y
8639 \pgf@circ@res@down = -\pgf@y
8640 \pgf@circ@res@right = -\pgf@x
8641 \pgf@circ@res@left = \pgf@x
8642
8643 % Negative input terminal
8644 \pgfpathmoveto{\pgfpoint
8645 {\pgf@circ@res@left}
8646 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8647 \pgfpathlineto{\pgfpoint
8648 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8649 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8650 \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} $-$}
8651
8652
8653 % Positive input terminal
8654 \pgfpathmoveto{\pgfpoint
8655 {\pgf@circ@res@left}
8656 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8657 \pgfpathlineto{\pgfpoint
8658 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8659 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8660 \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} $+$}
8661
8662
8663 % Negative output terminal
8664 \pgfpathmoveto{\pgfpoint
8665 {0.7\pgf@circ@res@right}
8666 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8667 \pgfpathlineto{\pgfpoint
8668 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
8669 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8670 \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
8671
8672
8673 % Positive output terminal
8674 \pgfpathmoveto{\pgfpoint
8675 {0.7\pgf@circ@res@right}
8676 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8677 \pgfpathlineto{\pgfpoint
8678 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
8679 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8680 \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
8681
8682
8683 % Draw them all!
8684 \pgfusepath{draw}
8685
8686 % Triangle
8687 \pgfscope
8688 \pgfsetlinewidth{2\pgflinewidth}
8689 \pgftransformxshift{.7\pgf@circ@res@left}
8690 \pgf@circ@res@step=\pgf@circ@res@right
8691 \advance\pgf@circ@res@step by -\pgf@circ@res@left
8692 \pgf@circ@res@step=.7\pgf@circ@res@step
8693 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
8694 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
8695 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
8696 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
8697 \pgfusepath{draw}
8698 \endpgfscope
8699 }
8700 }
8701
8702
8703
8704
8705 \pgfcircdeclarequadpole{transformer}{
8706
8707 \pgf@circ@drawtransformerbasicbody
8708
8709 }{\pgf@circ@drawtransformerbasicanchor}
8710
8711 \pgfcircdeclarequadpole{transformer core}{
8712
8713 \pgf@circ@drawtransformerbasicbody
8714
8715 \pgfmoveto{\pgfpoint%
8716 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
8717 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
8718 }
8719 \pgflineto{
8720 \pgfpoint
8721 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
8722 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
8723 }
8724
8725 \pgfmoveto{\pgfpoint%
8726 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
8727 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
8728 }
8729 \pgflineto{
8730 \pgfpoint
8731 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
8732 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
8733 }
8734
8735 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth}
8736 \pgfusepath{draw}
8737 }{\pgf@circ@drawtransformerbasicanchor}
8738
8739
8740 \pgfcircdeclarequadpole{gyrator}{
8741
8742 \def\stretto{.4}
8743
8744 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
8745 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
8746 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
8747 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
8748
8749 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
8750 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
8751 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
8752 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8753
8754 \pgfusepath{draw}
8755
8756 \pgfsetlinewidth{2\pgflinewidth}
8757 \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@left}{.7*\stretto\pgf@circ@res@down}}
8758 \pgfpatharc{90}{270}{.7*\stretto\pgf@circ@res@down}
8759
8760 \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@right}{.7*\stretto\pgf@circ@res@up}}
8761 \pgfpatharc{-90}{90}{.7*\stretto\pgf@circ@res@down}
8762 \pgfusepath{draw}
8763
8764 }{}
8765
8766 %% four-port
8767 % defines a general outer box for four-ports
8768 % TikZ usage:
8769 % \draw (0,0) node[coupler](coup){\SI{-3}{dB}}
8770 % (coup.port1) to[short,-o] ++(-1,0)
8771 %
8772
8773 \long\def\pgfcircdeclarefourport#1#2{
8774 \pgfdeclareshape{#1}{
8775 \anchor{center}{
8776 \northwest
8777 \pgf@x=0pt
8778 \pgf@y=0pt
8779 }
8780 \savedanchor\northwest{%
8781 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8782 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@y
8783 \pgf@y=.5\pgf@y
8784 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8785 \pgf@x=.5\pgf@x
8786 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x
8787 }
8788 \anchor{north}{
8789 \northwest
8790 \pgf@x=0pt
8791 }
8792 \anchor{south}{
8793 \northwest
8794 \pgf@x=0pt
8795 \pgf@y=-\pgf@y
8796 }
8797 \anchor{west}{
8798 \northwest
8799 \pgf@y=0pt
8800 }
8801 \anchor{east}{
8802 \northwest
8803 \pgf@y=0pt
8804 \pgf@x=-\pgf@x
8805 }
8806 \anchor{south west}{
8807 \northwest
8808 \pgf@y=-\pgf@y
8809 }
8810 \anchor{north east}{
8811 \northwest
8812 \pgf@x=-\pgf@x
8813 }
8814 \anchor{north west}{
8815 \northwest
8816 }
8817 \anchor{south east}{
8818 \northwest
8819 \pgf@x=-\pgf@x
8820 \pgf@y=-\pgf@y
8821 }
8822 \anchor{port1}{
8823 \northwest
8824 \pgf@y=-0.5\pgf@y
8825 }
8826 \anchor{port2}{
8827 \northwest
8828 \pgf@x=-\pgf@x
8829 \pgf@y=-0.5\pgf@y
8830 }
8831 \anchor{port3}{
8832 \northwest
8833 \pgf@x=-\pgf@x
8834 \pgf@y=0.5\pgf@y
8835 }
8836 \anchor{port4}{
8837 \northwest
8838 \pgf@y=0.5\pgf@y
8839 }
8840 \anchor{1}{
8841 \northwest
8842 \pgf@y=-0.5\pgf@y
8843 }
8844 \anchor{2}{
8845 \northwest
8846 \pgf@x=-\pgf@x
8847 \pgf@y=-0.5\pgf@y
8848 }
8849 \anchor{3}{
8850 \northwest
8851 \pgf@x=-\pgf@x
8852 \pgf@y=0.5\pgf@y
8853 }
8854 \anchor{4}{
8855 \northwest
8856 \pgf@y=0.5\pgf@y
8857 }
8858
8859 \anchor{text}{
8860 \northwest
8861 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
8862 \pgf@x=-.5\wd\pgfnodeparttextbox
8863 }
8864 \backgroundpath{
8865 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8866
8867 \northwest
8868 \pgf@circ@res@up = \pgf@y
8869 \pgf@circ@res@down = -\pgf@y
8870 \pgf@circ@res@right = -\pgf@x
8871 \pgf@circ@res@left = \pgf@x
8872
8873 \pgfstartlinewidth=\pgflinewidth
8874
8875 % draw outer box
8876 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8877 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8878 \pgfusepath{draw}
8879
8880 % draw inner stuff
8881 #2
8882
8883 % draw inner text
8884 \pgftext[center,x=-0.15\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
8885 }
8886 }
8887 }
8888
8889 % four-port
8890 \pgfcircdeclarefourport{fourport}{}
8891
8892
8893 % straight coupler
8894 \pgfcircdeclarefourport{coupler}{
8895 \pgfsetlinewidth{\pgfstartlinewidth}
8896 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}}
8897 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8898 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
8899 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8900 \pgfusepath{draw}
8901
8902 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
8903 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
8904 \pgfsetarrows{latex-latex}
8905 \pgfusepath{draw}
8906 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
8907 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
8908 \pgfsetarrows{latex-latex}
8909 \pgfusepath{draw}
8910 }
8911
8912 % "bended" coupler
8913 \pgfcircdeclarefourport{coupler2}{
8914 \pgfsetlinewidth{\pgfstartlinewidth}
8915 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}}
8916 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8917 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
8918 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8919 \pgfusepath{draw}
8920
8921 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
8922 \pgfpatharc{0}{90} {0.4\pgf@circ@res@up}
8923 \pgfsetarrowsend{latex}
8924 \pgfusepath{draw}
8925 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
8926 \pgfpatharc{0}{-90} {0.4\pgf@circ@res@up}
8927 \pgfsetarrowsend{latex}
8928 \pgfusepath{draw}
8929
8930 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
8931 \pgfpatharc{180}{90} {0.4\pgf@circ@res@up}
8932 \pgfsetarrowsend{latex}
8933 \pgfusepath{draw}
8934 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
8935 \pgfpatharc{-180}{-90} {0.4\pgf@circ@res@up}
8936 \pgfsetarrowsend{latex}
8937 \pgfusepath{draw}
8938
8939
8940 }
8941 %%%---------- close: tex/pgfcircquadpoles
8942
8943 %%%%%%%%%%% Springe nach tex/pgfcirclabel
8944 %%%---------- open: tex/pgfcirclabel.tex
8945 % Copyright 2007-2009 by Massimo Redaelli
8946 %
8947 % This file may be distributed and/or modified
8948 %
8949 % 1. under the LaTeX Project Public License and/or
8950 % 2. under the GNU Public License.
8951 %
8952 % See the file doc/LICENSE for more details.
8953
8954 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8955 %% Bipole label positioning
8956
8957 %% Options
8958 \ctikzset{label/.style = { l=#1 } }
8959 \ctikzset{l/.code = {
8960 \pgfkeys{/tikz/circuitikz/bipole/label/name=#1}
8961 \ctikzsetvalof{bipole/label/unit}{}
8962 \ifpgf@circ@siunitx
8963 \pgf@circ@handleSI{#1}
8964 \ifpgf@circ@siunitx@res
8965 \edef\pgf@temp{\pgf@circ@handleSI@val}
8966 \pgfkeyslet{/tikz/circuitikz/bipole/label/name}{\pgf@temp}
8967 \edef\pgf@temp{\pgf@circ@handleSI@unit}
8968 \pgfkeyslet{/tikz/circuitikz/bipole/label/unit}{\pgf@temp}
8969 \else
8970 \fi
8971 \else
8972 \fi
8973 }}
8974
8975 \ctikzset{label above/.code = {
8976 l=#1,
8977 \circuitikzbasekey/bipole/label/position=90 }
8978 }
8979 \ctikzset{l^/.style = {
8980 l=#1,
8981 \circuitikzbasekey/bipole/label/position=90 }
8982 }
8983
8984 \ctikzset{label below/.code = {
8985 l=#1,
8986 \circuitikzbasekey/bipole/label/position=-90 }
8987 }
8988 \ctikzset{l_/.style = {
8989 l=#1,
8990 \circuitikzbasekey/bipole/label/position=-90 }
8991 }
8992
8993
8994
8995 \def\pgf@circ@drawlabel{
8996 \pgfextra{
8997 \edef\pgf@temp{\ctikzvalof{label/align}}
8998 \def\pgf@circ@temp{straight}
8999 }
9000 \ifx\pgf@temp\pgf@circ@temp %straight
9001 \pgf@circ@drawreglabel
9002 \else
9003 \pgfextra{\def\pgf@circ@temp{rotate}}
9004 \ifx\pgf@temp\pgf@circ@temp %rotate
9005 \pgf@circ@drawrotlabel
9006 \else % smart
9007 \pgf@circ@drawsmartlabel
9008 \fi
9009 \fi
9010 }
9011
9012 \def\pgf@circ@drawsmartlabel{
9013 \pgfextra{
9014 %\pgfmathadd{\pgf@circ@direction}{360}
9015 \pgfmathmod{\pgf@circ@direction}{90}
9016 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9017 }
9018 \ifnum \pgfcircmathresult > 20
9019 \ifnum \pgfcircmathresult < 70 % NON quasi retto
9020 \pgf@circ@drawrotlabel
9021 \else
9022 \pgf@circ@drawreglabel
9023 \fi
9024 \else
9025 \pgf@circ@drawreglabel
9026 \fi
9027 }
9028
9029 %% Output routing
9030 %% #1 - node name
9031
9032 \def\pgf@circ@drawrotlabel{
9033 \pgfextra{
9034 % calcolo rotazione label
9035 \def\pgf@circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
9036 \edef\pgfcirclabrot{\pgf@circ@direction} % primo e quarto quadrante
9037 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
9038 \ifnum \pgfcircmathresult > 90 \ifnum \pgfcircmathresult < 270 % terzo e secondo
9039 \pgfmathsubtract{\pgf@circ@direction}{180}
9040 \edef\pgfcirclabrot{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9041 \pgfmathadd{\pgf@circ@temp}{180} %%%
9042 \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} %%%
9043 \fi\fi
9044
9045 \ifnum \ctikzvalof{mirror value} = -1
9046 \pgfmathadd{\pgf@circ@temp}{180}
9047 \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9048 \fi
9049 }
9050 coordinate (labelcoor) at ($(\ctikzvalof{bipole/name})!2!(\ctikzvalof{bipole/name}.north)$)
9051 (labelcoor) node [rotate=\pgfcirclabrot] {\pgf@circ@finallabel{}} % c'era un transform shape
9052 }
9053
9054 \def\pgf@circ@drawreglabel{
9055 \pgfextra{
9056 \pgfmathsubtract{\pgf@circ@direction}{90}
9057 \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9058
9059 \edef\pgf@circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
9060 \ifnum \pgf@circ@temp < 0
9061 \pgfmathadd{\pgf@circ@labanc}{180}
9062 \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9063 \fi
9064
9065 \ifnum \ctikzvalof{mirror value} = -1
9066 \pgfmathadd{\pgf@circ@labanc}{180}
9067 \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9068 \fi
9069 }
9070 node [ anchor = \pgf@circ@labanc]
9071 at (\ctikzvalof{bipole/name}.\pgf@circ@temp) {\pgf@circ@finallabel{}}
9072 }
9073
9074
9075 \ctikzset{text/.style = { t=#1 } }
9076 \ctikzset{t/.code = {
9077 \ctikzsetvalof{bipoles/twoport/text}{#1}
9078 }}
9079
9080 %%%---------- close: tex/pgfcirclabel
9081 %%%%%%%%%%% Springe nach tex/pgfcircvoltage
9082 %%%---------- open: tex/pgfcircvoltage.tex
9083 % Copyright 2007-2009 by Massimo Redaelli
9084 %
9085 % This file may be distributed and/or modified
9086 %
9087 % 1. under the LaTeX Project Public License and/or
9088 % 2. under the GNU Public License.
9089 %
9090 % See the file doc/LICENSE for more details.
9091
9092 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9093 %% Voltage management
9094
9095
9096 \ctikzset{v^>/.style = {
9097 v = #1,
9098 \circuitikzbasekey/bipole/voltage/direction = forward,
9099 \circuitikzbasekey/bipole/voltage/position = above
9100 }
9101 }
9102
9103 \ctikzset{v^</.style = {
9104 v = #1,
9105 \circuitikzbasekey/bipole/voltage/direction = backward,
9106 \circuitikzbasekey/bipole/voltage/position = above
9107 }
9108 }
9109
9110 \ctikzset{v_>/.style = {
9111 v = #1,
9112 \circuitikzbasekey/bipole/voltage/direction = forward,
9113 \circuitikzbasekey/bipole/voltage/position = below
9114 }
9115 }
9116
9117 \ctikzset{v_</.style = {
9118 v = #1,
9119 \circuitikzbasekey/bipole/voltage/direction = backward,
9120 \circuitikzbasekey/bipole/voltage/position = below
9121 }
9122 }
9123
9124
9125 % Default position varies whether the component is a voltage source
9126 % or not
9127 \ctikzset{v/.code = {
9128 \ifpgf@circuit@bipole@isvoltage
9129 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=above,
9130 \circuitikzbasekey/bipole/voltage/direction=forward}
9131 \else
9132 \ifpgf@circ@oldvoltagedirection
9133 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9134 \circuitikzbasekey/bipole/voltage/direction=backward}
9135 \else
9136 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9137 \circuitikzbasekey/bipole/voltage/direction=forward}
9138 \fi
9139 \fi
9140 \ifpgf@circ@oldvoltagedirection\else
9141 \ifpgf@circuit@bipole@iscurrent
9142 \ifpgf@circuit@bipole@current@backward
9143 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9144 \circuitikzbasekey/bipole/voltage/direction=forward}
9145 \else
9146 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9147 \circuitikzbasekey/bipole/voltage/direction=backward}
9148 \fi\fi\fi
9149 \pgfkeys{/tikz/circuitikz/bipole/voltage/label/name=#1}
9150 \ctikzsetvalof{bipole/voltage/label/unit}{}
9151 \ifpgf@circ@siunitx
9152 \pgf@circ@handleSI{#1}
9153 \ifpgf@circ@siunitx@res
9154 \edef\pgf@temp{\pgf@circ@handleSI@val}
9155 \pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/name}{\pgf@temp}
9156 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9157 \pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/unit}{\pgf@temp}
9158 \else
9159 \fi
9160 \else
9161 \fi
9162 }
9163 }
9164
9165 \ctikzset{v_/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = below} }
9166 \ctikzset{v^/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = above} }
9167 \ctikzset{v>/.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = forward} }
9168 \ctikzset{v</.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = backward} }
9169
9170
9171 %% Output routine for generic bipoles
9172
9173 \def\pgf@circ@drawvoltagegeneric{
9174 \pgfextra{
9175 \ifnum \ctikzvalof{mirror value}=-1
9176 \ifpgf@circuit@bipole@voltage@below\pgf@circuit@bipole@voltage@belowfalse\else\pgf@circuit@bipole@voltage@belowtrue\fi
9177 \fi
9178
9179 \ifpgf@circuit@bipole@voltage@below
9180 \def\pgf@circ@voltage@angle{90}
9181 \else
9182 \def\pgf@circ@voltage@angle{-90}
9183 \fi
9184
9185 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}
9186 \pgfkeysifdefined{\pgf@temp}
9187 { \edef\distacefromnode{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}} }
9188 { \edef\distacefromnode{\ctikzvalof{voltage/distance from node}} }
9189 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}
9190 \pgfkeysifdefined{\pgf@temp}
9191 { \edef\bumpb{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}} }
9192 { \edef\bumpb{\ctikzvalof{voltage/bump b}} }
9193 }
9194
9195 coordinate (pgfcirc@mid) at ($(\tikztostart) ! \distacefromnode ! (\ctikzvalof{bipole/name}.left)$)
9196 coordinate (pgfcirc@Vfrom) at ($(pgfcirc@mid) ! -\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen ! \pgf@circ@voltage@angle:(\ctikzvalof{bipole/name}.left)$)
9197
9198 coordinate (pgfcirc@mid) at ($(\tikztotarget) ! \distacefromnode ! (\ctikzvalof{bipole/name}.right)$)
9199 coordinate (pgfcirc@Vto) at ($(pgfcirc@mid) ! \ctikzvalof{voltage/distance from line}\pgf@circ@Rlen ! \pgf@circ@voltage@angle : (\ctikzvalof{bipole/name}.right)$)
9200
9201 \ifpgf@circuit@bipole@voltage@below
9202 coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-110)$)
9203 coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-70)$)
9204 \else
9205 coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.110)$)
9206 coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.70)$)
9207 \fi
9208
9209 \ifpgf@circuit@europeanvoltage
9210 \ifpgf@circuit@bipole@voltage@backward
9211 (pgfcirc@Vto) .. controls (pgfcirc@Vcont2) and (pgfcirc@Vcont1) ..
9212 node[currarrow, sloped, allow upside down, pos=1] {}
9213 (pgfcirc@Vfrom)
9214 \else
9215 (pgfcirc@Vfrom) .. controls (pgfcirc@Vcont1) and (pgfcirc@Vcont2) ..
9216 node[currarrow, sloped, allow upside down, pos=1] {}
9217 (pgfcirc@Vto)
9218 \fi
9219 \else
9220 \ifpgf@circuit@bipole@voltage@backward
9221 \ifpgf@circ@oldvoltagedirection
9222 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$}
9223 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$-$}
9224 \else
9225 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$}
9226 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$+$}
9227 \fi
9228 \else
9229 \ifpgf@circ@oldvoltagedirection
9230 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$}
9231 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$+$}
9232 \else
9233 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$}
9234 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$-$}
9235 \fi
9236 \fi
9237 \fi
9238 }
9239
9240 %% Output routine for voltage sources
9241
9242 \def\pgf@circ@drawvoltagegenerator{
9243 \ifpgf@circuit@bipole@voltage@below
9244 coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-120)$)
9245 coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-60)$)
9246 \else
9247 coordinate (pgfcirc@Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.120)$)
9248 coordinate (pgfcirc@Vcont2) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.60)$)
9249 \fi
9250
9251 \ifpgf@circuit@europeanvoltage
9252 \ifpgf@circuit@bipole@voltage@backward
9253 (pgfcirc@Vcont2) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vcont1)
9254 \else
9255 (pgfcirc@Vcont1) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vcont2)
9256 \fi
9257
9258 \else % american voltage
9259
9260 \ifpgf@circuit@bipole@voltageoutsideofsymbol
9261 % if it is a battery, must put + and -
9262 \ifpgf@circuit@bipole@voltage@backward
9263 (pgfcirc@Vcont2) node {$-$} (pgfcirc@Vcont1) node {$+$}
9264 \else
9265 (pgfcirc@Vcont1) node {$+$} (pgfcirc@Vcont2) node {$-$}
9266 \fi
9267 \fi
9268
9269 \fi
9270 }
9271
9272 %% Output routine
9273
9274 \def\pgf@circ@drawvoltage{ % node name
9275 \pgfextra{
9276 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
9277
9278 \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
9279 \ifpgf@circuit@bipole@voltage@below
9280 \def\pgf@circ@bipole@voltage@label@anchor{north west}
9281 \else \def\pgf@circ@bipole@voltage@label@anchor{south east}
9282 \fi
9283 \fi\fi
9284 \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
9285 \ifpgf@circuit@bipole@voltage@below
9286 \def\pgf@circ@bipole@voltage@label@anchor{west}
9287 \else \def\pgf@circ@bipole@voltage@label@anchor{east}
9288 \fi
9289 \fi\fi
9290 \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
9291 \ifpgf@circuit@bipole@voltage@below
9292 \def\pgf@circ@bipole@voltage@label@anchor{south west}
9293 \else \def\pgf@circ@bipole@voltage@label@anchor{north east}
9294 \fi
9295 \fi\fi
9296 \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
9297 \ifpgf@circuit@bipole@voltage@below
9298 \def\pgf@circ@bipole@voltage@label@anchor{south}
9299 \else\def\pgf@circ@bipole@voltage@label@anchor{north}
9300 \fi
9301 \fi\fi
9302 \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
9303 \ifpgf@circuit@bipole@voltage@below
9304 \def\pgf@circ@bipole@voltage@label@anchor{south east}
9305 \else\def\pgf@circ@bipole@voltage@label@anchor{north west}
9306 \fi
9307 \fi\fi
9308 \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
9309 \ifpgf@circuit@bipole@voltage@below
9310 \def\pgf@circ@bipole@voltage@label@anchor{east}
9311 \else \def\pgf@circ@bipole@voltage@label@anchor{west}
9312 \fi
9313 \fi\fi
9314 \ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
9315 \ifpgf@circuit@bipole@voltage@below
9316 \def\pgf@circ@bipole@voltage@label@anchor{north east}
9317 \else\def\pgf@circ@bipole@voltage@label@anchor{south west}
9318 \fi
9319 \fi\fi
9320 \ifnum\pgfcircmathresult >-1 \ifnum\pgfcircmathresult <5
9321 \ifpgf@circuit@bipole@voltage@below
9322 \def\pgf@circ@bipole@voltage@label@anchor{north}
9323 \else\def\pgf@circ@bipole@voltage@label@anchor{south}
9324 \fi
9325 \fi\fi
9326 \ifnum\pgfcircmathresult >355 \ifnum\pgfcircmathresult <361
9327 \ifpgf@circuit@bipole@voltage@below
9328 \def\pgf@circ@bipole@voltage@label@anchor{north}
9329 \else\def\pgf@circ@bipole@voltage@label@anchor{south}
9330 \fi
9331 \fi\fi
9332
9333 \ifpgf@circuit@bipole@voltage@below
9334 \def\pgf@circ@bipole@voltage@label@where{-90}
9335 \else
9336 \def\pgf@circ@bipole@voltage@label@where{90}
9337 \fi
9338
9339 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}
9340 \pgfkeysifdefined{\pgf@temp}
9341 { \edef\eudist{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}} }
9342 { \edef\eudist{\ctikzvalof{voltage/european label distance}} }
9343 }
9344
9345 \ifpgf@circuit@bipole@isvoltage
9346 \pgf@circ@drawvoltagegenerator
9347 \else
9348 \pgf@circ@drawvoltagegeneric
9349 \fi
9350 (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where)
9351 coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) !
9352 \ifpgf@circuit@europeanvoltage\eudist\else\ctikzvalof{voltage/american label distance}\fi !
9353 (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where)$)
9354 node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=0]
9355 at (Vlab) { \pgf@circ@finallabel{voltage/} }
9356 }
9357
9358
9359
9360
9361
9362 % coordinate (pgfcirc@Vcont1) at ($ (\ctikzvalof{bipole/name}.center) !
9363 % \ctikzvalof{voltage/bump b} !
9364 % (\ctikzvalof{bipole/name}.-110) $)
9365 % coordinate (pgfcirc@Vcont2) at ($ (\ctikzvalof{bipole/name}.center) !
9366 % \ctikzvalof{voltage/bump b} !
9367 % (\ctikzvalof{bipole/name}.-70) $)
9368 % \else
9369 % coordinate (pgfcirc@Vcont1) at ($ (\ctikzvalof{bipole/name}.center) !
9370 % \ctikzvalof{voltage/bump b} !
9371 % (\ctikzvalof{bipole/name}.110) $)
9372 % coordinate (pgfcirc@Vcont2) at ($ (\ctikzvalof{bipole/name}.center) !
9373 % \ctikzvalof{voltage/bump b} !
9374 % (\ctikzvalof{bipole/name}.70) $)
9375 % \fi
9376 %%%---------- close: tex/pgfcircvoltage
9377 %%%%%%%%%%% Springe nach tex/pgfcirccurrent
9378 %%%---------- open: tex/pgfcirccurrent.tex
9379 % Copyright 2007-2009 by Massimo Redaelli
9380 %
9381 % This file may be distributed and/or modified
9382 %
9383 % 1. under the LaTeX Project Public License and/or
9384 % 2. under the GNU Public License.
9385 %
9386 % See the file doc/LICENSE for more details.
9387
9388 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9389 %% Current handling
9390
9391 %% Options
9392
9393
9394 \ctikzset{i^>/.style = {
9395 i = #1,
9396 \circuitikzbasekey/bipole/current/direction = forward,
9397 \circuitikzbasekey/bipole/current/x position = after,
9398 \circuitikzbasekey/bipole/current/y position = above
9399 }
9400 }
9401
9402 \ctikzset{i_>/.style = {
9403 i = #1,
9404 \circuitikzbasekey/bipole/current/direction = forward,
9405 \circuitikzbasekey/bipole/current/x position = after,
9406 \circuitikzbasekey/bipole/current/y position = below
9407 }
9408 }
9409
9410 \ctikzset{i>^/.style = {
9411 i = #1,
9412 \circuitikzbasekey/bipole/current/direction = forward,
9413 \circuitikzbasekey/bipole/current/x position = before,
9414 \circuitikzbasekey/bipole/current/y position = above
9415 }
9416 }
9417
9418 \ctikzset{i>_/.style = {
9419 i = #1,
9420 \circuitikzbasekey/bipole/current/direction = forward,
9421 \circuitikzbasekey/bipole/current/x position = before,
9422 \circuitikzbasekey/bipole/current/y position = below
9423 }
9424 }
9425
9426 \ctikzset{i^</.style = {
9427 i = #1,
9428 \circuitikzbasekey/bipole/current/direction = backward,
9429 \circuitikzbasekey/bipole/current/x position = after,
9430 \circuitikzbasekey/bipole/current/y position = above
9431 }
9432 }
9433
9434 \ctikzset{i_</.style = {
9435 i = #1,
9436 \circuitikzbasekey/bipole/current/direction = backward,
9437 \circuitikzbasekey/bipole/current/x position = after,
9438 \circuitikzbasekey/bipole/current/y position = below
9439 }
9440 }
9441
9442 \ctikzset{i<^/.style = {
9443 i = #1,
9444 \circuitikzbasekey/bipole/current/direction = backward,
9445 \circuitikzbasekey/bipole/current/x position = before,
9446 \circuitikzbasekey/bipole/current/y position = above
9447 }
9448 }
9449
9450 \ctikzset{i<_/.style = {
9451 i = #1,
9452 \circuitikzbasekey/bipole/current/direction = backward,
9453 \circuitikzbasekey/bipole/current/x position = before,
9454 \circuitikzbasekey/bipole/current/y position = below
9455 }
9456 }
9457
9458 \ctikzset{i/.code = {
9459 % \ifpgf@circuit@bipole@iscurrent
9460 % \pgfkeys{\circuitikzbasekey/bipole/current/position=above}
9461 % \else
9462 % \pgfkeys{\circuitikzbasekey/bipole/current/position=below}
9463 % \fi
9464 \pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
9465 \circuitikzbasekey/bipole/current/x position = after,
9466 \circuitikzbasekey/bipole/current/y position = above }
9467 \pgfkeys{/tikz/circuitikz/bipole/current/label/name=#1}
9468 \ctikzsetvalof{bipole/current/label/unit}{}
9469 \ifpgf@circ@siunitx
9470 \pgf@circ@handleSI{#1}
9471 \ifpgf@circ@siunitx@res
9472 \edef\pgf@temp{\pgf@circ@handleSI@val}
9473 \pgfkeyslet{/tikz/circuitikz/bipole/current/label/name}{\pgf@temp}
9474 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9475 \pgfkeyslet{/tikz/circuitikz/bipole/current/label/unit}{\pgf@temp}
9476 \else
9477 \fi
9478 \else
9479 \fi
9480 %reverse current direction for voltage sources
9481 \ifpgf@circ@oldvoltagedirection\else
9482 \ifpgf@circuit@bipole@isvoltage
9483 \ifpgf@circuit@bipole@voltage@backward
9484 \pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
9485 \circuitikzbasekey/bipole/current/x position = after,
9486 \circuitikzbasekey/bipole/current/y position = below }
9487 \else
9488 \pgfkeys{\circuitikzbasekey/bipole/current/direction = backward,
9489 \circuitikzbasekey/bipole/current/x position = before,
9490 \circuitikzbasekey/bipole/current/y position = above }
9491 \fi\fi\fi
9492 }
9493 }
9494
9495
9496 \ifpgf@circ@oldvoltagedirection
9497 \ctikzset{i</.style = { i = #1, \circuitikzbasekey/bipole/current/direction = backward } }
9498 \else
9499 \ctikzset{i</.style = { i = #1, \circuitikzbasekey/bipole/current/direction = backward, \circuitikzbasekey/bipole/current/x position = before } }
9500 \fi
9501 \ctikzset{i_/.style = { i = #1, \circuitikzbasekey/bipole/current/y position = below } }
9502 \ctikzset{i>/.style = {i = #1, \circuitikzbasekey/bipole/current/direction = forward } }
9503 \ctikzset{i^/.style = { i= #1, \circuitikzbasekey/bipole/current/y position = above } }
9504
9505
9506 \def\pgf@circ@drawnormalcurrent{
9507 \ifpgf@circuit@bipole@current@before
9508 \ifpgf@circuit@bipole@current@backward
9509 { (\ctikzvalof{bipole/name}.left) --
9510 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9511 (\tikztostart)
9512 }
9513 \else
9514 { (\tikztostart) --
9515 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9516 (\ctikzvalof{bipole/name}.left)
9517 }
9518 \fi
9519 \else
9520 \ifpgf@circuit@bipole@current@backward
9521 { (\tikztotarget) --
9522 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9523 (\ctikzvalof{bipole/name}.right)
9524 }
9525 \else
9526 { (\ctikzvalof{bipole/name}.right) --
9527 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9528 (\tikztotarget)
9529 }
9530 \fi
9531 \fi
9532 }
9533
9534 %% Output routine
9535 %% #1 - node name
9536
9537 \def\pgf@circ@drawcurrent{
9538 \pgfextra{
9539 \edef\pgf@circ@ffffff{\pgf@circ@direction}
9540 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@ffffff\pgf@nil}
9541
9542 \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
9543 \ifpgf@circuit@bipole@current@below
9544 \def\pgf@circ@dir{north west} \else \def\pgf@circ@dir{south east}
9545 \fi
9546 \fi\fi
9547 \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
9548 \ifpgf@circuit@bipole@current@below
9549 \def\pgf@circ@dir{west} \else \def\pgf@circ@dir{east}
9550 \fi
9551 \fi\fi
9552 \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
9553 \ifpgf@circuit@bipole@current@below
9554 \def\pgf@circ@dir{south west}\else \def\pgf@circ@dir{north east}
9555 \fi
9556 \fi\fi
9557 \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
9558 \ifpgf@circuit@bipole@current@below
9559 \def\pgf@circ@dir{south}\else\def\pgf@circ@dir{north}
9560 \fi
9561 \fi\fi
9562 \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
9563 \ifpgf@circuit@bipole@current@below
9564 \def\pgf@circ@dir{south east}\else\def\pgf@circ@dir{north west}
9565 \fi
9566 \fi\fi
9567 \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
9568 \ifpgf@circuit@bipole@current@below
9569 \def\pgf@circ@dir{east}\else \def\pgf@circ@dir{west}
9570 \fi
9571 \fi\fi
9572 \ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
9573 \ifpgf@circuit@bipole@current@below
9574 \def\pgf@circ@dir{north east}\else\def\pgf@circ@dir{south west}
9575 \fi
9576 \fi\fi
9577 \ifnum\pgfcircmathresult <5
9578 \ifpgf@circuit@bipole@current@below
9579 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
9580 \fi
9581 \fi
9582 \ifnum\pgfcircmathresult >355
9583 \ifpgf@circuit@bipole@current@below
9584 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
9585 \fi
9586 \fi
9587
9588 \ifpgf@circuit@bipole@current@below
9589 \def\pgf@circ@bipole@current@label@where{-90}
9590 \else
9591 \def\pgf@circ@bipole@current@label@where{+90}
9592 \fi
9593 }
9594
9595
9596 \pgfextra{ \def\pgf@temp{short} \edef\pgf@circ@temp{\ctikzvalof{bipole/kind}} }
9597
9598 \ifx\pgf@circ@temp\pgf@temp % caso di corrente (centrata) su un corto
9599 \ifpgf@circuit@bipole@current@backward
9600 { (\tikztotarget) --
9601 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9602 (\tikztostart) }
9603 \else
9604 { (\tikztostart) --
9605 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9606 (\tikztotarget) }
9607 \fi
9608
9609 \else % altri bipoli - e quindi tra nodo e target
9610
9611 \ifpgf@circuit@bipole@iscurrent
9612 \ifpgf@circuit@europeancurrent
9613 \pgf@circ@drawnormalcurrent
9614 \else
9615 \fi
9616 \else
9617 \pgf@circ@drawnormalcurrent
9618 \fi
9619 \fi
9620
9621 \ifpgf@circuit@bipole@iscurrent
9622 node [anchor=\pgf@circ@dir] at (\ctikzvalof{bipole/name}.\pgf@circ@bipole@current@label@where)
9623 { \pgf@circ@finallabel{current/} }
9624 \else
9625 (Iarrow.\pgf@circ@bipole@current@label@where) node [anchor=\pgf@circ@dir]
9626 { \pgf@circ@finallabel{current/} }
9627 \fi
9628
9629 }
9630
9631
9632
9633
9634 %%%---------- close: tex/pgfcirccurrent
9635
9636 \ExecuteOptions{nofetbodydiode,nofetsolderdot,nooldvoltagedirection,europeancurrents,europeanvoltages,americanports,americanresistors,cuteinductors,europeangfsurgearrester,nosiunitx,noarrowmos,smartlabels,nocompatibility}
9637
9638 \ProcessOptions\relax
9639
9640 %%%%%%%%%%% Springe nach tex/pgfcircpath
9641 %%%---------- open: tex/pgfcircpath.tex
9642
9643 \pgf@circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
9644
9645
9646 % Names
9647 \ctikzset{name/.style = { n=#1 } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@
9648 \ctikzset{n/.code = {
9649 \pgfkeys{/tikz/circuitikz/bipole/name=#1}
9650 }}
9651
9652 % Reflect the node along
9653 \ctikzset{mirrored/.is choice}
9654 \ctikzset{mirror value/.initial=1}
9655 \ctikzset{mirrored/true/.code = {\ctikzsetvalof{mirror value}{-1}} }
9656 \ctikzset{mirrored/false/.code = {\ctikzsetvalof{mirror value}{1}} }
9657 \ctikzset{mirror/.style = {/tikz/circuitikz/mirrored=true}}
9658
9659 % Initialize paths
9660 \def\pgfcircresetpath{
9661 \ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90,
9662 bipole/reversed=false, bipole/kind=,
9663 bipole/voltage/direction=backward, bipole/voltage/label/name=, bipole/voltage/position=below,
9664 bipole/nodes/left=none, bipole/nodes/right=none, bipole/is voltage=false,bipole/is voltageoutsideofsymbol=false,bipole/is strokedsymbol=false,
9665 bipole/is current=false, bipole/current/label/name=, bipole/current/x position=after,
9666 bipole/current/y position=above, bipole/current/direction=forward,
9667 mirrored=false
9668 }
9669 }
9670
9671
9672 %% Generic bipole path
9673 \def\pgf@circ@bipole@path#1#2{
9674 \pgfextra{
9675 \ctikzset{bipole/kind = #1}
9676
9677 \edef\pgf@temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
9678 \def\pgf@circ@temp{}
9679 \ifx\pgf@temp\pgf@circ@temp % if it has not a name
9680 \pgfmathrandominteger{\pgf@circ@rand}{1000}{9999}
9681 \ctikzset{bipole/name = #2\pgf@circ@rand} % create it
9682 \fi
9683
9684 \def\pgf@temp{open}
9685 \def\pgf@circ@temp{#1}
9686 }
9687 \ifpgf@circuit@bipole@reversed
9688 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
9689 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {}
9690 \else
9691 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
9692 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {}
9693 \fi
9694 \pgfextra{
9695 \pgf@circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
9696 {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
9697 \edef\pgf@circ@direction{\pgfmathresult}
9698 }
9699 ($(\tikztostart) ! .5 ! (\tikztotarget)$)
9700 node[#1shape, rotate=\pgf@circ@direction, yscale=\ctikzvalof{mirror value}]
9701 (\ctikzvalof{bipole/name}) {}
9702 \ifx\pgf@temp\pgf@circ@temp % if it is an open
9703 \else
9704 \ifpgf@circuit@bipole@strokedsymbol%draw line thrue symbol(e.g. diodes)
9705 \ifcsname pgf@anchor@#1shape@strokepathstart\endcsname%if special path-anchors are defined, use them!
9706 (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.strokepathstart)
9707 (\ctikzvalof{bipole/name}.strokepathend) -- (\ctikzvalof{bipole/name}end.center)
9708 \else
9709 (\ctikzvalof{bipole/name}start.center)--(\ctikzvalof{bipole/name}end.center)
9710 \fi
9711 \else
9712 \ifcsname pgf@anchor@#1shape@pathstart\endcsname%if special path-anchors are defined, use them!
9713 (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.pathstart)
9714 (\ctikzvalof{bipole/name}.pathend) -- (\ctikzvalof{bipole/name}end.center)
9715 \else
9716 (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.left)
9717 (\ctikzvalof{bipole/name}.right) -- (\ctikzvalof{bipole/name}end.center)
9718 \fi
9719 \fi
9720 \fi
9721 \pgf@circ@ifkeyempty{bipole/label/name}\else\pgf@circ@drawlabel\fi
9722 \drawpoles
9723 \pgf@circ@ifkeyempty{bipole/voltage/label/name}\else\pgf@circ@drawvoltage\fi
9724 \pgf@circ@ifkeyempty{bipole/current/label/name}\else\pgf@circ@drawcurrent\fi
9725 % reset
9726 \pgfextra{
9727 \pgfcircresetpath
9728 }
9729 (\tikztotarget) \tikztonodes % e si continua
9730 }
9731
9732
9733 %% Path definitions
9734
9735 \def\pgf@circ@resistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{generic}{#1}\else\pgf@circ@bipole@path{resistor}{#1}\fi}
9736 \def\pgf@circ@vresistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{tgeneric}{#1}\else\pgf@circ@bipole@path{vresistor}{#1}\fi}
9737 \def\pgf@circ@potentiometer@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{genericpotentiometer}{#1}\else\pgf@circ@bipole@path{potentiometer}{#1}\fi}
9738 \def\pgf@circ@thermistor@path#1{\pgf@circ@bipole@path{thermistor}{#1}}
9739 \def\pgf@circ@thermistorptc@path#1{\pgf@circ@bipole@path{thermistorptc}{#1}}
9740 \def\pgf@circ@thermistorntc@path#1{\pgf@circ@bipole@path{thermistorntc}{#1}}
9741 \def\pgf@circ@varistor@path#1{\pgf@circ@bipole@path{varistor}{#1}}
9742 \def\pgf@circ@capacitor@path#1{\pgf@circ@bipole@path{capacitor}{#1}}
9743 \def\pgf@circ@ecapacitor@path#1{\pgf@circ@bipole@path{ecapacitor}{#1}}
9744 \def\pgf@circ@polarcapacitor@path#1{\pgf@circ@bipole@path{polarcapacitor}{#1}}
9745 \def\pgf@circ@vcapacitor@path#1{\pgf@circ@bipole@path{vcapacitor}{#1}}
9746 \def\pgf@circ@piezoelectric@path#1{\pgf@circ@bipole@path{piezoelectric}{#1}}
9747 \def\pgf@circ@battery@path#1{\pgf@circ@bipole@path{battery}{#1}}
9748 \def\pgf@circ@battery1@path#1{\pgf@circ@bipole@path{battery1}{#1}}
9749 \def\pgf@circ@europeaninductor@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}}
9750 \def\pgf@circ@americaninductor@path#1{\pgf@circ@bipole@path{americaninductor}{#1}}
9751 \def\pgf@circ@cuteinductor@path#1{\pgf@circ@bipole@path{cuteinductor}{#1}}
9752 \def\pgf@circ@inductor@path#1{%
9753 \pgfextra{
9754 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
9755 \def\pgf@temp{european}%
9756 }
9757 \ifx\pgf@temp\pgf@circ@temp%
9758 \pgf@circ@europeaninductor@path{#1}%
9759 \else%
9760 \pgfextra{ \def\pgf@temp{cute} }%
9761 \ifx\pgf@temp\pgf@circ@temp%
9762 \pgf@circ@cuteinductor@path{#1}%
9763 \else%
9764 \pgf@circ@americaninductor@path{#1}%
9765 \fi%
9766 \fi%
9767 }
9768 \def\pgf@circ@vinductor@path#1{
9769 \pgfextra{
9770 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
9771 \def\pgf@temp{european}%
9772 }
9773 \ifx\pgf@temp\pgf@circ@temp%
9774 \pgf@circ@veuropeaninductor@path{#1}%
9775 \else%
9776 \pgfextra{ \def\pgf@temp{cute} }%
9777 \ifx\pgf@temp\pgf@circ@temp%
9778 \pgf@circ@vcuteinductor@path{#1}%
9779 \else%
9780 \pgf@circ@vamericaninductor@path{#1}%
9781 \fi%
9782 \fi%
9783 }
9784 \def\pgf@circ@veuropeaninductor@path#1{\pgf@circ@bipole@path{tfullgeneric}{#1}}
9785 \def\pgf@circ@vamericaninductor@path#1{\pgf@circ@bipole@path{vamericaninductor}{#1}}
9786 \def\pgf@circ@vcuteinductor@path#1{\pgf@circ@bipole@path{vcuteinductor}{#1}}
9787 \def\pgf@circ@lamp@path#1{\pgf@circ@bipole@path{lamp}{#1}}
9788 \def\pgf@circ@esource@path#1{\pgf@circ@bipole@path{esource}{#1}}
9789 \def\pgf@circ@pvsource@path#1{\pgf@circ@bipole@path{pvsource}{#1}}
9790 \def\pgf@circ@vsource@path#1{\pgf@circ@bipole@path{vsource}{#1}}
9791 \def\pgf@circ@dcvsource@path#1{\pgf@circ@bipole@path{dcvsource}{#1}}
9792 \def\pgf@circ@vsourceam@path#1{\pgf@circ@bipole@path{vsourceAM}{#1}}
9793 \def\pgf@circ@vsourcesin@path#1{\pgf@circ@bipole@path{vsourcesin}{#1}}
9794 \def\pgf@circ@isource@path#1{\pgf@circ@bipole@path{isource}{#1}}
9795 \def\pgf@circ@oosource@path#1{\pgf@circ@bipole@path{oosource}{#1}}
9796 \def\pgf@circ@dcisource@path#1{\pgf@circ@bipole@path{dcisource}{#1}}
9797 \def\pgf@circ@isourcesin@path#1{\pgf@circ@bipole@path{isourcesin}{#1}}
9798 \def\pgf@circ@vsourcesquare@path#1{\pgf@circ@bipole@path{vsourcesquare}{#1}}
9799 \def\pgf@circ@vsourcetri@path#1{\pgf@circ@bipole@path{vsourcetri}{#1}}
9800 \def\pgf@circ@isourceam@path#1{\pgf@circ@bipole@path{isourceAM}{#1}}
9801 \def\pgf@circ@cvsource@path#1{\pgf@circ@bipole@path{cvsource}{#1}}
9802 \def\pgf@circ@cvsourceam@path#1{\pgf@circ@bipole@path{cvsourceAM}{#1}}
9803 \def\pgf@circ@cvsourcesin@path#1{\pgf@circ@bipole@path{cvsourcesin}{#1}}
9804 \def\pgf@circ@cisource@path#1{\pgf@circ@bipole@path{cisource}{#1}}
9805 \def\pgf@circ@cisourceam@path#1{\pgf@circ@bipole@path{cisourceAM}{#1}}
9806 \def\pgf@circ@cisourcesin@path#1{\pgf@circ@bipole@path{cisourcesin}{#1}}
9807 \def\pgf@circ@short@path#1{\pgf@circ@bipole@path{short}{#1}}
9808 \def\pgf@circ@cspst@path#1{\pgf@circ@bipole@path{cspst}{#1}}
9809 \def\pgf@circ@spst@path#1{\pgf@circ@bipole@path{spst}{#1}}
9810 \def\pgf@circ@ospst@path#1{\pgf@circ@bipole@path{ospst}{#1}}
9811 \def\pgf@circ@pushbutton@path#1{\pgf@circ@bipole@path{pushbutton}{#1}}
9812 \def\pgf@circ@open@path#1{\pgf@circ@bipole@path{open}{#1}}
9813 \def\pgf@circ@generic@path#1{\pgf@circ@bipole@path{generic}{#1}}
9814 \def\pgf@circ@ageneric@path#1{\pgf@circ@bipole@path{ageneric}{#1}}
9815 \def\pgf@circ@tgeneric@path#1{\pgf@circ@bipole@path{tgeneric}{#1}}
9816 \def\pgf@circ@fullgeneric@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}}
9817 \def\pgf@circ@tfullgeneric@path#1{\pgf@circ@bipole@path{tfullgeneric}{#1}}
9818 \def\pgf@circ@ammeter@path#1{\pgf@circ@bipole@path{ammeter}{#1}}
9819 \def\pgf@circ@ohmmeter@path#1{\pgf@circ@bipole@path{ohmmeter}{#1}}
9820 \def\pgf@circ@voltmeter@path#1{\pgf@circ@bipole@path{voltmeter}{#1}}
9821 \def\pgf@circ@empty@path#1{}
9822 \def\pgf@circ@photoresistor@path#1{\pgf@circ@bipole@path{photoresistor}{#1}}
9823 \def\pgf@circ@emptythyristor@path#1{\pgf@circ@bipole@path{emptythyristor}{#1}}
9824 \def\pgf@circ@fullthyristor@path#1{\pgf@circ@bipole@path{fullthyristor}{#1}}
9825 \def\pgf@circ@toggleswitch@path#1{\pgf@circ@bipole@path{toggleswitch}{#1}}
9826 \def\pgf@circ@memristor@path#1{\pgf@circ@bipole@path{memristor}{#1}}
9827 \def\pgf@circ@emptytriac@path#1{\pgf@circ@bipole@path{emptytriac}{#1}}
9828 \def\pgf@circ@fulltriac@path#1{\pgf@circ@bipole@path{fulltriac}{#1}}
9829 \def\pgf@circ@tline@path#1{\pgf@circ@bipole@path{tline}{#1}}
9830 \def\pgf@circ@squid@path#1{\pgf@circ@bipole@path{squid}{#1}}
9831 \def\pgf@circ@barrier@path#1{\pgf@circ@bipole@path{barrier}{#1}}
9832 \def\pgf@circ@thermocouple@path#1{\pgf@circ@bipole@path{thermocouple}{#1}}
9833 \def\pgf@circ@fuse@path#1{\pgf@circ@bipole@path{fuse}{#1}}
9834 \def\pgf@circ@afuse@path#1{\pgf@circ@bipole@path{afuse}{#1}}
9835
9836 \def\pgf@circ@gfsurgearrester@path#1{\ifpgf@circuit@europeangfsurgearrester\pgf@circ@europeangfsurgearrester@path{#1}\else\pgf@circ@americangfsurgearrester@path{#1}\fi}
9837 \def\pgf@circ@europeangfsurgearrester@path#1{\pgf@circ@bipole@path{european gas filled surge arrester}{#1}}
9838 \def\pgf@circ@americangfsurgearrester@path#1{\pgf@circ@bipole@path{american gas filled surge arrester}{#1}}
9839
9840 \def\pgf@circ@twoport@path#1{\pgf@circ@bipole@path{twoport}{#1}}
9841 \def\pgf@circ@vco@path#1{\pgf@circ@bipole@path{vco}{#1}}
9842 \def\pgf@circ@bandpass@path#1{\pgf@circ@bipole@path{bandpass}{#1}}
9843 \def\pgf@circ@highpass@path#1{\pgf@circ@bipole@path{highpass}{#1}}
9844 \def\pgf@circ@lowpass@path#1{\pgf@circ@bipole@path{lowpass}{#1}}
9845 \def\pgf@circ@adc@path#1{\pgf@circ@bipole@path{adc}{#1}}
9846 \def\pgf@circ@dac@path#1{\pgf@circ@bipole@path{dac}{#1}}
9847 \def\pgf@circ@dsp@path#1{\pgf@circ@bipole@path{dsp}{#1}}
9848 \def\pgf@circ@fft@path#1{\pgf@circ@bipole@path{fft}{#1}}
9849 \def\pgf@circ@amp@path#1{\pgf@circ@bipole@path{amp}{#1}}
9850 \def\pgf@circ@vamp@path#1{\pgf@circ@bipole@path{vamp}{#1}}
9851 \def\pgf@circ@piattenuator@path#1{\pgf@circ@bipole@path{piattenuator}{#1}}
9852 \def\pgf@circ@vpiattenuator@path#1{\pgf@circ@bipole@path{vpiattenuator}{#1}}
9853 \def\pgf@circ@tattenuator@path#1{\pgf@circ@bipole@path{tattenuator}{#1}}
9854 \def\pgf@circ@vtattenuator@path#1{\pgf@circ@bipole@path{vtattenuator}{#1}}
9855 \def\pgf@circ@phaseshifter@path#1{\pgf@circ@bipole@path{phaseshifter}{#1}}
9856 \def\pgf@circ@vphaseshifter@path#1{\pgf@circ@bipole@path{vphaseshifter}{#1}}
9857 \def\pgf@circ@detector@path#1{\pgf@circ@bipole@path{detector}{#1}}
9858
9859 %%Mechanical
9860 \def\pgf@circ@spring@path#1{\pgf@circ@bipole@path{spring}{#1}}
9861 \def\pgf@circ@mass@path#1{\pgf@circ@bipole@path{mass}{#1}}
9862 \def\pgf@circ@damper@path#1{\pgf@circ@bipole@path{damper}{#1}}
9863
9864
9865
9866
9867 %% Styles
9868
9869 \def\comnpatname{\ifpgf@circuit@compat *\else\fi}
9870 \def\compattikzset#1{\tikzset{\comnpatname#1}}
9871
9872 %\def\ctikzsetbipole#1#2{%
9873 % \tikzset{#1/.style= {to path=#2, \circuitikzbasekey, l=##1}}%
9874 %}
9875
9876 \compattikzset{spring/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@spring@path, l=#1}}
9877 \compattikzset{mass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@mass@path, l=#1}}
9878 \compattikzset{damper/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@damper@path, l=#1}}
9879 \compattikzset{resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@resistor@path, l=#1}}
9880 \compattikzset{american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{resistor}{#1}, l=#1}}
9881 \compattikzset{european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{generic}{#1}, l=#1}}
9882 \compattikzset{potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@potentiometer@path, l=#1}}
9883 \compattikzset{varistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@varistor@path, l=#1}}
9884 \compattikzset{photoresistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@photoresistor@path, l=#1}}
9885 \compattikzset{thermistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistor@path, l=#1}}
9886 \compattikzset{thermistor ptc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorptc@path, l=#1}}
9887 \compattikzset{thermistor ntc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorntc@path, l=#1}}
9888 \compattikzset{american potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{potentiometer}{#1}, l=#1}}
9889 \compattikzset{european potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{genericpotentiometer}{#1}, l=#1}}
9890 \compattikzset{variable resistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vresistor@path, l=#1}}
9891 \compattikzset{variable american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{vresistor}{#1}, l=#1}}
9892 \compattikzset{variable european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{tgeneric}{#1}, l=#1}}
9893 \compattikzset{capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@capacitor@path, l=#1}}
9894 \compattikzset{elko/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ecapacitor@path, l=#1}}
9895 \compattikzset{ecapacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ecapacitor@path, l=#1}}
9896 \compattikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@polarcapacitor@path, l=#1}}
9897 \compattikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcapacitor@path, l=#1}}
9898 \compattikzset{piezoelectric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@piezoelectric@path, l=#1}}
9899 \compattikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
9900 \compattikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery1@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
9901 \compattikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@inductor@path, l=#1}}
9902 \compattikzset{gf surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@gfsurgearrester@path, l=#1}}
9903 \compattikzset{american gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americangfsurgearrester@path, l=#1}}
9904 \compattikzset{european gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@europeangfsurgearrester@path, l=#1}}
9905 \compattikzset{gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@gfsurgearrester@path, l=#1}}
9906 \compattikzset{american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americaninductor@path, l=#1}}
9907 \compattikzset{cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cuteinductor@path, l=#1}}
9908 \compattikzset{european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@europeaninductor@path, l=#1}}
9909 \compattikzset{variable inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vinductor@path, l=#1}}
9910 \compattikzset{variable european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@veuropeaninductor@path, l=#1}}
9911 \compattikzset{variable american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vamericaninductor@path, l=#1}}
9912 \compattikzset{variable cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcuteinductor@path, l=#1}}
9913 \compattikzset{tline/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tline@path, l=#1}}
9914 \compattikzset{transmission line/.style = {tline = #1}}
9915 \compattikzset{TL/.style = {tline = #1}}
9916 \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}}
9917 \compattikzset{american voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
9918 \compattikzset{european current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
9919 \compattikzset{american current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
9920 \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}}
9921 \compattikzset{american controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
9922 \compattikzset{european controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
9923 \compattikzset{american controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
9924 \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 }}
9925 \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 }}
9926 \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 }}
9927 \compattikzset{sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
9928 \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}}
9929 \compattikzset{controlled sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
9930
9931 \compattikzset{voltage source/.style = {\comnpatname \ifpgf@circuit@europeanvoltage european \else american \fi voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
9932 \compattikzset{current source/.style = {\comnpatname \ifpgf@circuit@europeancurrent european \else american \fi current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
9933 \compattikzset{controlled voltage source/.style = {\comnpatname \ifpgf@circuit@europeanvoltage european \else american \fi controlled voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
9934 \compattikzset{controlled current source/.style = {\comnpatname \ifpgf@circuit@europeancurrent european \else american \fi controlled current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
9935
9936
9937 \compattikzset{generic/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@generic@path, l=#1}}
9938 \compattikzset{ageneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ageneric@path, l=#1}}
9939 \compattikzset{tgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tgeneric@path, l=#1}}
9940 \compattikzset{fullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullgeneric@path, l=#1}}
9941 \compattikzset{tfullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tfullgeneric@path, l=#1}}
9942 \compattikzset{short/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@short@path}}
9943 \compattikzset{open/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@open@path}}
9944
9945 \compattikzset{lamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lamp@path}}
9946
9947 \compattikzset{squid/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@squid@path}}
9948 \compattikzset{barrier/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@barrier@path}}
9949 \compattikzset{thermocouple/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermocouple@path}}
9950 \compattikzset{fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fuse@path}}
9951 \compattikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@afuse@path}}
9952
9953 \compattikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@twoport@path}}
9954 \compattikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vco@path}}
9955 \compattikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandpass@path}}
9956 \compattikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@highpass@path}}
9957 \compattikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lowpass@path}}
9958 \compattikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@adc@path}}
9959 \compattikzset{dac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dac@path}}
9960 \compattikzset{dsp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dsp@path}}
9961 \compattikzset{fft/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fft@path}}
9962 \compattikzset{amp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@amp@path}}
9963 \compattikzset{vamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vamp@path}}
9964 \compattikzset{piattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@piattenuator@path}}
9965 \compattikzset{vpiattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vpiattenuator@path}}
9966 \compattikzset{tattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tattenuator@path}}
9967 \compattikzset{vtattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vtattenuator@path}}
9968 \compattikzset{phaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@phaseshifter@path}}
9969 \compattikzset{vphaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vphaseshifter@path}}
9970 \compattikzset{detector/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@detector@path}}
9971
9972 % % % % % %
9973 % % Beginn of Diodes
9974 % % % % % %
9975
9976 \def\pgf@circ@fulldiode@path#1{\pgf@circ@bipole@path{fulldiode}{#1}}
9977 \def\pgf@circ@fullzdiode@path#1{\pgf@circ@bipole@path{fullzdiode}{#1}}
9978 \def\pgf@circ@fullzzdiode@path#1{\pgf@circ@bipole@path{fullzzdiode}{#1}}
9979 \def\pgf@circ@fullsdiode@path#1{\pgf@circ@bipole@path{fullsdiode}{#1}}
9980 \def\pgf@circ@fulltdiode@path#1{\pgf@circ@bipole@path{fulltdiode}{#1}}
9981 \def\pgf@circ@fulllediode@path#1{\pgf@circ@bipole@path{fulllediode}{#1}}
9982 \def\pgf@circ@fullpdiode@path#1{\pgf@circ@bipole@path{fullpdiode}{#1}}
9983 \def\pgf@circ@fullvarcap@path#1{\pgf@circ@bipole@path{fullvarcap}{#1}}
9984 \def\pgf@circ@emptydiode@path#1{\pgf@circ@bipole@path{emptydiode}{#1}}
9985 \def\pgf@circ@emptyzdiode@path#1{\pgf@circ@bipole@path{emptyzdiode}{#1}}
9986 \def\pgf@circ@emptyzzdiode@path#1{\pgf@circ@bipole@path{emptyzzdiode}{#1}}
9987 \def\pgf@circ@emptysdiode@path#1{\pgf@circ@bipole@path{emptysdiode}{#1}}
9988 \def\pgf@circ@emptytdiode@path#1{\pgf@circ@bipole@path{emptytdiode}{#1}}
9989 \def\pgf@circ@emptylediode@path#1{\pgf@circ@bipole@path{emptylediode}{#1}}
9990 \def\pgf@circ@emptypdiode@path#1{\pgf@circ@bipole@path{emptypdiode}{#1}}
9991 \def\pgf@circ@emptyvarcap@path#1{\pgf@circ@bipole@path{emptyvarcap}{#1}}
9992
9993 \compattikzset{full diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulldiode@path}}
9994 \compattikzset{full Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullsdiode@path}}
9995 \compattikzset{full Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullzdiode@path}}
9996 \compattikzset{full ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullzzdiode@path}}
9997 \compattikzset{full tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulltdiode@path}}
9998 \compattikzset{full photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullpdiode@path}}
9999 \compattikzset{full led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulllediode@path}}
10000 \compattikzset{full varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullvarcap@path}}
10001 \compattikzset{full thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullthyristor@path}}
10002 \compattikzset{full triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulltriac@path}}
10003
10004 \compattikzset{empty diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptydiode@path}}
10005 \compattikzset{empty Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptysdiode@path}}
10006 \compattikzset{empty Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyzdiode@path}}
10007 \compattikzset{empty ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyzzdiode@path}}
10008 \compattikzset{empty tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptytdiode@path}}
10009 \compattikzset{empty photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptypdiode@path}}
10010 \compattikzset{empty led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptylediode@path}}
10011 \compattikzset{empty varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyvarcap@path}}
10012 \compattikzset{empty thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptythyristor@path}}
10013 \compattikzset{empty triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptytriac@path}}
10014
10015 \compattikzset{stroke diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptydiode@path}}
10016 \compattikzset{stroke Schottky diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptysdiode@path}}
10017 \compattikzset{stroke Zener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyzdiode@path}}
10018 \compattikzset{stroke ZZener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyzzdiode@path}}
10019 \compattikzset{stroke tunnel diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptytdiode@path}}
10020 \compattikzset{stroke photodiode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptypdiode@path}}
10021 \compattikzset{stroke led/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptylediode@path}}
10022 \compattikzset{stroke varcap/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyvarcap@path}}
10023 \compattikzset{stroke thyristor/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptythyristor@path}}
10024 %\compattikzset{stroke triac/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptytriac@path}}
10025
10026 \def\pgfcircdiodestylemacro{\ifpgf@circuit@strokediode stroke \else\ifpgf@circuit@fulldiode full \else empty \fi\fi}
10027
10028 \compattikzset{Schottky diode/.style = {\comnpatname \pgfcircdiodestylemacro Schottky diode}}
10029 \compattikzset{Zener diode/.style = {\comnpatname \pgfcircdiodestylemacro Zener diode}}
10030 \compattikzset{ZZener diode/.style = {\comnpatname \pgfcircdiodestylemacro ZZener diode}}
10031 \compattikzset{tunnel diode/.style = {\comnpatname \pgfcircdiodestylemacro tunnel diode}}
10032 \compattikzset{photodiode/.style = {\comnpatname \pgfcircdiodestylemacro photodiode}}
10033 \compattikzset{led/.style = {\comnpatname \pgfcircdiodestylemacro led}}
10034 \compattikzset{varcap/.style = {\comnpatname \pgfcircdiodestylemacro varcap}}
10035 \compattikzset{diode/.style = {\comnpatname \pgfcircdiodestylemacro diode}}
10036 \compattikzset{thyristor/.style = {\comnpatname \pgfcircdiodestylemacro thyristor}}
10037 \compattikzset{triac/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi triac}}%no stroke triac!
10038
10039 %% Define Shortcuts
10040 \compattikzset{Do/.style = {\comnpatname empty diode}}
10041 \compattikzset{tDo/.style = {\comnpatname empty tunnel diode}}
10042 \compattikzset{zDo/.style = {\comnpatname empty Zener diode}}
10043 \compattikzset{zzDo/.style = {\comnpatname empty ZZener diode}}
10044 \compattikzset{sDo/.style = {\comnpatname empty Schottky diode}}
10045 \compattikzset{pDo/.style = {\comnpatname empty photodiode}}
10046 \compattikzset{leDo/.style = {\comnpatname empty led}}
10047 \compattikzset{VCo/.style = {\comnpatname empty varcap}}
10048 \compattikzset{Tyo/.style = {\comnpatname empty thyristor}}
10049 \compattikzset{Tro/.style = {\comnpatname empty triac}}
10050
10051 \compattikzset{D*/.style = {\comnpatname full diode}}
10052 \compattikzset{tD*/.style = {\comnpatname full tunnel diode}}
10053 \compattikzset{zD*/.style = {\comnpatname full Zener diode}}
10054 \compattikzset{zzD*/.style = {\comnpatname full ZZener diode}}
10055 \compattikzset{sD*/.style = {\comnpatname full Schottky diode}}
10056 \compattikzset{pD*/.style = {\comnpatname full photodiode}}
10057 \compattikzset{leD*/.style = {\comnpatname full led}}
10058 \compattikzset{VC*/.style = {\comnpatname full varcap}}
10059 \compattikzset{Ty*/.style = {\comnpatname full thyristor}}
10060 \compattikzset{Tr*/.style = {\comnpatname full triac}}
10061
10062 \compattikzset{D/.style = {\comnpatname diode}}
10063 \compattikzset{tD/.style = {\comnpatname tunnel diode}}
10064 \compattikzset{zD/.style = {\comnpatname Zener diode}}
10065 \compattikzset{zzD/.style = {\comnpatname ZZener diode}}
10066 \compattikzset{sD/.style = {\comnpatname Schottky diode}}
10067 \compattikzset{pD/.style = {\comnpatname photodiode}}
10068 \compattikzset{leD/.style = {\comnpatname led}}
10069 \compattikzset{VC/.style = {\comnpatname varcap}}
10070 \compattikzset{Ty/.style = {\comnpatname thyristor}}
10071 \compattikzset{Tr/.style = {\comnpatname triac}}
10072
10073 \compattikzset{D-/.style = {\comnpatname stroke diode}}
10074 \compattikzset{tD-/.style = {\comnpatname stroke tunnel diode}}
10075 \compattikzset{zD-/.style = {\comnpatname stroke Zener diode}}
10076 \compattikzset{zzD-/.style = {\comnpatname stroke ZZener diode}}
10077 \compattikzset{sD-/.style = {\comnpatname stroke Schottky diode}}
10078 \compattikzset{pD-/.style = {\comnpatname stroke photodiode}}
10079 \compattikzset{leD-/.style = {\comnpatname stroke led}}
10080 \compattikzset{VC-/.style = {\comnpatname stroke varcap}}
10081 \compattikzset{Ty-/.style = {\comnpatname stroke thyristor}}
10082 \compattikzset{Tr-/.style = {\comnpatname empty triac}}%no stroke triac!
10083
10084 % % % % % %
10085 % % End of Diodes
10086 % % % % % %
10087
10088
10089 \compattikzset{memristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@memristor@path}}
10090 \compattikzset{closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cspst@path, l=#1}}
10091 \compattikzset{opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ospst@path, l=#1}}
10092 \compattikzset{switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@spst@path, l=#1}}
10093 \compattikzset{push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pushbutton@path, l=#1}}
10094 \compattikzset{toggle switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@toggleswitch@path}}
10095
10096 \compattikzset{ammeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ammeter@path}}
10097 \compattikzset{voltmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@voltmeter@path}}
10098 \compattikzset{ohmmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ohmmeter@path}}
10099
10100 % short forms
10101 \compattikzset{esource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@esource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10102 \compattikzset{pvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pvsource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10103 \compattikzset{dcvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dcvsource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10104 \compattikzset{dcisource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dcisource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10105
10106 \compattikzset{ioosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is current=true,/tikz/to path=\pgf@circ@oosource@path}}
10107 \compattikzset{voosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is voltage=true,/tikz/to path=\pgf@circ@oosource@path}}
10108
10109 \compattikzset{vsource/.style = {\comnpatname voltage source = #1}}
10110 \compattikzset{isource/.style = {\comnpatname current source = #1}}
10111 \compattikzset{cisource/.style = {\comnpatname controlled current source = #1}}
10112 \compattikzset{cvsource/.style = {\comnpatname controlled voltage source = #1}}
10113 \compattikzset{vsourcesin/.style = {\comnpatname sinusoidal voltage source = #1}}
10114 \compattikzset{vsourcesquare/.style = {\comnpatname square voltage source = #1}}
10115 \compattikzset{vsourcetri/.style = {triangle voltage source = #1}}
10116 \compattikzset{isourcesin/.style = {\comnpatname sinusoidal current source = #1}}
10117 \compattikzset{cisourcesin/.style = {\comnpatname controlled sinusoidal current source = #1}}
10118 \compattikzset{cvsourcesin/.style = {\comnpatname controlled sinusoidal voltage source = #1}}
10119
10120 \compattikzset{controlled vsource/.style = {\comnpatname controlled voltage source = #1}}
10121 \compattikzset{controlled isource/.style = {\comnpatname controlled current source = #1}}
10122 \compattikzset{controlled vsourcesin/.style = {\comnpatname controlled sinusoidal voltage source = #1}}
10123 \compattikzset{controlled isourcesin/.style = {\comnpatname controlled sinusoidal current source = #1}}
10124
10125 \compattikzset{R/.style= {\comnpatname resistor = #1}}
10126 %\ifpgf@circuit@compat\else\compattikzset{R/.style= {resistor = #1}}\fi
10127 \compattikzset{vR/.style= {\comnpatname variable resistor = #1}}
10128 \compattikzset{phR/.style= {\comnpatname photoresistor = #1}}
10129 \compattikzset{thR/.style= {\comnpatname thermistor = #1}}
10130 \compattikzset{thRp/.style= {\comnpatname thermistor ptc= #1}}
10131 \compattikzset{thRn/.style= {\comnpatname thermistor ntc= #1}}
10132 \compattikzset{pR/.style= {\comnpatname potentiometer = #1}}
10133 \compattikzset{C/.style = {\comnpatname capacitor = #1}}
10134 \compattikzset{eC/.style = {\comnpatname ecapacitor = #1}}
10135 \compattikzset{pC/.style = {\comnpatname polar capacitor = #1}}
10136 \compattikzset{vC/.style = {\comnpatname variable capacitor = #1}}
10137 \compattikzset{PZ/.style = {\comnpatname piezoelectric = #1}}
10138 \compattikzset{L/.style = {\comnpatname inductor = #1}}
10139 \compattikzset{vL/.style = {\comnpatname variable inductor = #1}}
10140 \compattikzset{V/.style = {\comnpatname voltage source = #1}}
10141 \compattikzset{cV/.style = {\comnpatname controlled voltage source = #1}}
10142 \compattikzset{sV/.style = {\comnpatname sinusoidal voltage source = #1}}
10143 \compattikzset{sqV/.style = {\comnpatname square voltage source = #1}}
10144 \compattikzset{tV/.style = {\comnpatname triangle voltage source = #1}}
10145 \compattikzset{csV/.style = {\comnpatname controlled sinusoidal voltage source = #1}}
10146 \def\pgf@temp#1{
10147 \compattikzset{V#1/.style = {\comnpatname voltage source, v#1=##1} }
10148 \compattikzset{cV#1/.style = {\comnpatname controlled voltage source, v#1=##1} }
10149 \compattikzset{sV#1/.style = {\comnpatname sinusoidal voltage source, v#1=##1} }
10150 \compattikzset{csV#1/.style = {\comnpatname controlled sinusoidal voltage source, v#1=##1} }
10151 }
10152 \pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<}
10153 \pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_}
10154 \compattikzset{I/.style = {\comnpatname current source = #1}}
10155 \compattikzset{cI/.style = {\comnpatname controlled current source = #1}}
10156 \compattikzset{sI/.style = {\comnpatname sinusoidal current source = #1}}
10157 \compattikzset{csI/.style = {\comnpatname controlled sinusoidal current source = #1}}
10158 \def\pgf@temp#1{
10159 \compattikzset{I#1/.style = {\comnpatname current source, i#1=##1} }
10160 \compattikzset{cI#1/.style = {\comnpatname controlled current source, i#1=##1} }
10161 \compattikzset{sI#1/.style = {\comnpatname sinusoidal current source, i#1=##1} }
10162 \compattikzset{csI#1/.style = {\comnpatname controlled sinusoidal current source, i#1=##1} }
10163 }
10164 \pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<}
10165 \pgf@temp{>_} \pgf@temp{<_} \pgf@temp{>^} \pgf@temp{<^}
10166 \pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_}
10167
10168
10169
10170 \compattikzset{Mr/.style = {\comnpatname memristor}}
10171
10172 \compattikzset{cspst/.style = {\comnpatname closing switch = #1}}
10173 \compattikzset{ospst/.style = {\comnpatname opening switch = #1}}
10174 \compattikzset{spst/.style = {\comnpatname switch = #1}}
10175
10176 \compattikzset{afuse/.style = {\comnpatname asymmetric fuse=#1}}
10177
10178 \compattikzset{vdd/.style = {\comnpatname vcc = #1}}
10179 \compattikzset{vss/.style = {\comnpatname vee = #1}}
10180
10181 \def\inheritlogicport#1#2{
10182 \pgfdeclareshape{#2 port}{
10183 \inheritsavedanchors[from=#1 #2 port]
10184 \inheritbackgroundpath[from=#1 #2 port]
10185 \inheritanchor[from=#1 #2 port]{in}
10186 \inheritanchor[from=#1 #2 port]{in 1}
10187 \inheritanchor[from=#1 #2 port]{in 2}
10188 \inheritanchor[from=#1 #2 port]{out}
10189 \inheritanchor[from=#1 #2 port]{center}
10190 \inheritanchor[from=#1 #2 port]{left}
10191 }
10192 }
10193
10194 \ifpgf@circuit@europeanlogicport
10195 \inheritlogicport{european}{and}
10196 \inheritlogicport{european}{or}
10197 \inheritlogicport{european}{xor}
10198 \inheritlogicport{european}{not}
10199 \inheritlogicport{european}{nand}
10200 \inheritlogicport{european}{nor}
10201 \inheritlogicport{european}{xnor}
10202 \else
10203 \inheritlogicport{american}{and}
10204 \inheritlogicport{american}{or}
10205 \inheritlogicport{american}{xor}
10206 \inheritlogicport{american}{not}
10207 \inheritlogicport{american}{nand}
10208 \inheritlogicport{american}{nor}
10209 \inheritlogicport{american}{xnor}
10210 \fi
10211
10212 % Transistor like bipoles
10213
10214 \def\pgf@circ@trans@path#1#2{
10215 \pgfextra{
10216 \edef\pgf@temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
10217 \def\pgf@circ@temp{#2}
10218 \ifx\pgf@temp\pgf@circ@temp % if it has not a name
10219 \pgfmathrandominteger{\pgf@circ@rand}{1000}{9999}
10220 \ctikzset{bipole/name = trans\pgf@circ@rand} % create it
10221 \fi
10222 }
10223 \ifpgf@circuit@bipole@reversed
10224 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
10225 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {}
10226 \else
10227 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
10228 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {}
10229 \fi
10230 \pgfextra{
10231 \pgf@circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
10232 {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
10233 \pgfmathadd{\pgfmathresult}{-90}
10234 \edef\pgf@circ@direction{\pgfmathresult}
10235 }
10236 ($(\tikztostart) ! .5 ! (\tikztotarget)$)
10237 node[#1, /tikz/rotate=\pgf@circ@direction, xscale=\ctikzvalof{mirror value}]
10238 (\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}}
10239 \ifcsname pgf@anchor@#1@pathstart\endcsname%if special path-anchors are defined, use them!
10240 (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.pathstart)
10241 (\ctikzvalof{bipole/name}.pathend) -- (\ctikzvalof{bipole/name}end.center)
10242 \else
10243 (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.left)
10244 (\ctikzvalof{bipole/name}.right) -- (\ctikzvalof{bipole/name}end.center)
10245 \fi
10246 \pgfextra{
10247 \pgfcircresetpath
10248 }
10249 (\tikztotarget) \tikztonodes % e si continua
10250 }
10251
10252
10253 \def\pgf@circ@definetranspath#1{
10254 \compattikzset{T#1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@trans@path{#1}{}, l=##1}}
10255 }
10256
10257 \pgf@circ@definetranspath{elmech}
10258 \pgf@circ@definetranspath{nmos}
10259 \pgf@circ@definetranspath{pmos}
10260 \pgf@circ@definetranspath{npn}
10261 \pgf@circ@definetranspath{pnp}
10262 \pgf@circ@definetranspath{nfet}
10263 \pgf@circ@definetranspath{nigfete}
10264 \pgf@circ@definetranspath{nigfetd}
10265 \pgf@circ@definetranspath{nigfetebulk}
10266 \pgf@circ@definetranspath{pfet}
10267 \pgf@circ@definetranspath{pigfete}
10268 \pgf@circ@definetranspath{pigfetd}
10269 \pgf@circ@definetranspath{pigfetebulk}
10270 \pgf@circ@definetranspath{njfet}
10271 \pgf@circ@definetranspath{pjfet}
10272 \pgf@circ@definetranspath{pigbt}
10273 \pgf@circ@definetranspath{nigbt}
10274 \pgf@circ@definetranspath{Lpigbt}
10275 \pgf@circ@definetranspath{Lnigbt}%%%---------- close: tex/pgfcircpath
10276
10277 \ifpgf@circ@siunitx
10278 \RequirePackage{xstring}[2009/03/13]
10279 %\expandafter\let\csname angstrom\endcsname\relax
10280 \RequirePackage{siunitx}
10281 \fi
10282
10283
10284
10285 \newenvironment{circuitikz}{\begin{tikzpicture}}{\end{tikzpicture}}
10286 %override (unused) circuitikz environment for compability to externalization)
10287 \let\circuitikz\tikzpicture
10288 \let\endcircuitikz\endtikzpicture
10289
10290 \endinput