Debian Codegraph @

texmf-dist/tex/latex/circuitikz/circuitikz-0.4-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 con warning
18 %%%%%
19 %%%%%
20
21 \NeedsTeXFormat{LaTeX2e}
22
23 \def\pgfcircversion{0.4}
24 \def\pgfcircversiondate{2012/12/20}
25
26 %% Version 2.0 of pgf/TikZ is required
27 \RequirePackage{tikz}
28 \usetikzlibrary{calc}
29 \usepgflibrary{decorations.pathmorphing,arrows}
30
31 \DeclareOption{european}{
32 \ctikzset{voltage=european} \ctikzset{current=european} \ctikzset{inductor=european}
33 \ctikzset{resistor=european} \ctikzset{logic ports=european} \ctikzset{gas filled surge arrester = european}
34 }
35
36 \DeclareOption{american}{
37 \ctikzset{voltage=american} \ctikzset{current=american} \ctikzset{resistor=american} \ctikzset{inductor=american} \ctikzset{gas filled surge arrester = american}
38 \ctikzset{logic ports = american}
39 }
40
41 \DeclareOption{fulldiodes}{
42 \ctikzset{diode = full}
43 }
44
45 \DeclareOption{emptydiodes}{
46 \ctikzset{diode = empty}
47 }
48
49 \DeclareOption{europeanvoltages}{
50 \ctikzset{voltage=european}
51 }
52
53 \DeclareOption{americanvoltages}{
54 \ctikzset{voltage=american}
55 }
56
57 \DeclareOption{europeancurrents}{
58 \ctikzset{current = european}
59 }
60
61 \DeclareOption{americancurrents}{
62 \ctikzset{current = american}
63 }
64
65 \DeclareOption{europeanvoltages}{
66 \ctikzset{voltage = european}
67 }
68
69 \DeclareOption{americanresistors}{
70 \ctikzset{resistor = american}
71 }
72
73 \DeclareOption{europeanresistors}{
74 \ctikzset{resistor = european}
75 }
76
77 \DeclareOption{americaninductors}{
78 \ctikzset{inductor = american}
79 }
80
81 \DeclareOption{europeaninductors}{
82 \ctikzset{inductor = european}
83 }
84
85 \DeclareOption{cuteinductors}{
86 \ctikzset{inductor = cute}
87 }
88
89 \DeclareOption{americanports}{
90 \ctikzset{logic ports = american}
91 }
92
93 \DeclareOption{europeanports}{
94 \ctikzset{logic ports = european}
95 }
96
97 \DeclareOption{americangfsurgearrester}{
98 \ctikzset{gas filled surge arrester = american}
99 }
100
101 \DeclareOption{europeangfsurgearrester}{
102 \ctikzset{gas filled surge arrester = european}
103 }
104
105
106 \DeclareOption{siunitx}{
107 \pgf@circ@siunitxtrue
108 }
109
110 \DeclareOption{nosiunitx}{
111 \pgf@circ@siunitxfalse
112 }
113
114 \DeclareOption{arrowmos}{
115 \pgf@circuit@mos@arrowstrue
116 }
117
118 \DeclareOption{noarrowmos}{
119 \pgf@circuit@mos@arrowsfalse
120 }
121
122 \DeclareOption{straightlabels}{
123 \ctikzset{label/align = straight}
124 }
125
126 \DeclareOption{rotatelabels}{
127 \ctikzset{label/align = rotate}
128 }
129
130 \DeclareOption{smartlabels}{
131 \ctikzset{label/align = smart}
132 }
133
134
135
136 \DeclareOption{fulldiode}{
137 \ctikzset{diode = full}
138 }
139
140 \DeclareOption{emptydiode}{
141 \ctikzset{diode = empty}
142 }
143
144 \DeclareOption{europeanvoltage}{
145 \ctikzset{voltage=european}
146 }
147
148 \DeclareOption{americanvoltage}{
149 \ctikzset{voltage=american}
150 }
151
152 \DeclareOption{europeancurrent}{
153 \ctikzset{current = european}
154 }
155
156 \DeclareOption{americancurrent}{
157 \ctikzset{current = american}
158 }
159
160 \DeclareOption{europeanvoltage}{
161 \ctikzset{voltage = european}
162 }
163
164 \DeclareOption{americanresistor}{
165 \ctikzset{resistor = american}
166 }
167
168 \DeclareOption{europeanresistor}{
169 \ctikzset{resistor = european}
170 }
171
172 \DeclareOption{americaninductor}{
173 \ctikzset{inductor = american}
174 }
175
176 \DeclareOption{europeaninductor}{
177 \ctikzset{inductor = european}
178 }
179
180 \DeclareOption{cuteinductor}{
181 \ctikzset{inductor = cute}
182 }
183
184 \DeclareOption{americanport}{
185 \ctikzset{logic ports = american}
186 }
187
188 \DeclareOption{europeanport}{
189 \ctikzset{logic ports = european}
190 }
191
192 \DeclareOption{europeanport}{
193 \ctikzset{logic ports = european}
194 }
195
196 \DeclareOption{betterproportions}{
197 \ctikzset{monopoles/ground/width/.initial=.15}
198
199 \ctikzset{bipoles/resistor/height/.initial=.23}
200 \ctikzset{bipoles/resistor/width/.initial=.6}
201 \ctikzset{bipoles/capacitor/height/.initial=.4}
202 \ctikzset{bipoles/capacitor/width/.initial=.1}
203 \ctikzset{bipoles/potentiometer/height/.initial=.6}
204 \ctikzset{bipoles/potentiometer/height 2/.initial=.23}
205 \ctikzset{bipoles/potentiometer/width/.initial=.6}
206 \ctikzset{bipoles/photoresistor/height/.initial=.6}
207 \ctikzset{bipoles/photoresistor/height 2/.initial=.23}
208 \ctikzset{bipoles/photoresistor/width/.initial=.6}
209 \ctikzset{bipoles/thermistor/main/.initial=.7}
210 \ctikzset{bipoles/thermistor/height/.initial=.328}%.23/.7
211 \ctikzset{bipoles/thermistor/width/.initial=.6}
212 \ctikzset{bipoles/thermistorntc/width/.initial=.6}
213 \ctikzset{bipoles/thermistorntc/main/.initial=.7}
214 \ctikzset{bipoles/thermistorntc/height/.initial=.328}%.23/.7
215 \ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.23/.7
216 \ctikzset{bipoles/thermistorptc/width/.initial=.6}
217 \ctikzset{bipoles/thermistorptc/main/.initial=.7}
218 \ctikzset{bipoles/thermistorptc/height/.initial=.328}%.23/.7
219 \ctikzset{bipoles/varistor/main/.initial=.7}
220 \ctikzset{bipoles/varistor/height/.initial=.328}%.23/.7
221 \ctikzset{bipoles/varistor/width/.initial=.6}
222 \ctikzset{bipoles/vresistor/height/.initial=.45}
223 \ctikzset{bipoles/vresistor/width/.initial=.6}
224 \ctikzset{bipoles/cuteinductor/height/.initial=.23}
225 \ctikzset{bipoles/cuteinductor/width/.initial=.6}
226 \ctikzset{bipoles/cuteinductor/coils/.initial=6}
227 \ctikzset{bipoles/americaninductor/height/.initial=.23}
228 \ctikzset{bipoles/americaninductor/height 2/.initial=.1}
229 \ctikzset{bipoles/americaninductor/width/.initial=.6}
230 \ctikzset{bipoles/americaninductor/coils/.initial=4}
231 \ctikzset{bipoles/vcuteinductor/height/.initial=.6}
232 \ctikzset{bipoles/vcuteinductor/coil height/.initial=.23}
233 \ctikzset{bipoles/vcuteinductor/width/.initial=.6}
234 \ctikzset{bipoles/vcuteinductor/coils/.initial=6}
235 \ctikzset{bipoles/vamericaninductor/height/.initial=.45}
236 \ctikzset{bipoles/vamericaninductor/height 2/.initial=.2}
237 \ctikzset{bipoles/vamericaninductor/width/.initial=.6}
238 \ctikzset{bipoles/vamericaninductor/coils/.initial=4}
239 \ctikzset{bipoles/generic/height/.initial=.23}
240 \ctikzset{bipoles/generic/width/.initial=.6}
241 \ctikzset{bipoles/generic potentiometer/height/.initial=.6}
242 \ctikzset{bipoles/generic potentiometer/height 2/.initial=.23}
243 \ctikzset{bipoles/generic potentiometer/width/.initial=.6}
244 \ctikzset{bipoles/ageneric/height/.initial=.23}
245 \ctikzset{bipoles/ageneric/width/.initial=.6}
246 \ctikzset{bipoles/memristor/height/.initial=.23}
247 \ctikzset{bipoles/memristor/wave height/.initial=.375}
248 \ctikzset{bipoles/memristor/width/.initial=.60}
249 \ctikzset{bipoles/tgeneric/height/.initial=.525}
250 \ctikzset{bipoles/tgeneric/width/.initial=.6}
251 \ctikzset{bipoles/tfullgeneric/height/.initial=.525}
252 \ctikzset{bipoles/tfullgeneric/width/.initial=.60}
253 \ctikzset{bipoles/fullgeneric/height/.initial=.23}
254 \ctikzset{bipoles/fullgeneric/width/.initial=.6}
255 \ctikzset{bipoles/diode/height/.initial=.3}
256 \ctikzset{bipoles/diode/width/.initial=.25}
257
258 \ctikzset{tripoles/thyristor/height/.initial=.66}
259 \ctikzset{tripoles/thyristor/height 2/.initial=.3}
260 \ctikzset{tripoles/thyristor/width/.initial=.6}
261 \ctikzset{tripoles/thyristor/diode height/.initial=.3}
262 \ctikzset{tripoles/thyristor/diode width left/.initial=.4}
263 \ctikzset{tripoles/thyristor/diode width right/.initial=.3}
264
265 \ctikzset{tripoles/triac/height/.initial=.66}
266 \ctikzset{tripoles/triac/width/.initial=.6}
267 \ctikzset{tripoles/triac/diode width left/.initial=.3}
268 \ctikzset{tripoles/triac/diode width right/.initial=.3}
269 }
270
271 %%%%%%%%%
272
273
274
275 %%%%%%%%%%% Springe nach circuitikz.code
276 %%%---------- open: circuitikz.code.tex
277
278 %% Options
279
280
281
282
283 %% Keys
284
285 \long\def\pgf@circ@comment#1{}
286
287 \def\circuitikzbasekey{/tikz/circuitikz}
288
289 \pgfkeys{\circuitikzbasekey/.is family}
290
291 \def\circuitikzset#1{\pgfkeys{\circuitikzbasekey,#1}}
292 \let\ctikzset\circuitikzset
293 \def\ctikzvalof#1{\pgfkeysvalueof{\circuitikzbasekey/#1}}
294 \def\ctikzsetvalof#1#2{\pgfkeyssetvalue{\circuitikzbasekey/#1}{#2}}
295
296 \newif\ifpgf@circuit@inputarrow
297 \ctikzset{inputarrow/.is choice}
298 \ctikzset{inputarrow/true/.code={\pgf@circuit@inputarrowtrue}}
299 \ctikzset{inputarrow/false/.code={\pgf@circuit@inputarrowfalse}}
300
301 \ctikzset{bipoles/.is family}
302 \ctikzset{bipoles/border margin/.initial=1.1}
303 \ctikzset{bipoles/thickness/.initial=2}
304 \ctikzset{bipoles/length/.initial=1.4cm}
305 \ctikzset{nodes width/.initial=.04}
306 \newdimen\pgf@circ@Rlen
307 \ctikzset{bipoles/length/.code={\pgf@circ@Rlen = #1}}
308
309
310 \ctikzset{monopoles/.is family}
311 \ctikzset{monopoles/ground/width/.initial=.25}
312 \ctikzset{monopoles/chassis/width/.initial=.25}
313 \ctikzset{monopoles/alternative chassis/width/.initial=.25}
314 \ctikzset{monopoles/equipotentiality/width/.initial=.25}
315 \ctikzset{monopoles/tlinestub/width/.initial=.25}
316 \ctikzset{monopoles/antenna/width/.initial=.25}
317 \ctikzset{monopoles/antenna/label/xanchor/.initial=.4}
318 \ctikzset{monopoles/antenna/label/yanchor/.initial=.75}
319 \ctikzset{monopoles/txantenna/label/xanchor/.initial=.4}
320 \ctikzset{monopoles/txantenna/label/yanchor/.initial=.75}
321 \ctikzset{monopoles/txantenna/width/.initial=.25}
322 \ctikzset{monopoles/rxantenna/label/xanchor/.initial=.4}
323 \ctikzset{monopoles/rxantenna/label/yanchor/.initial=.75}
324 \ctikzset{monopoles/rxantenna/width/.initial=.25}
325 \ctikzset{monopoles/tground/thickness/.initial=3}
326 \ctikzset{monopoles/vcc/width/.initial=.2}
327 \ctikzset{monopoles/match/width/.initial=.4}
328 \ctikzset{monopoles/oscillator/width/.initial=.7}
329
330 \ctikzset{bipoles/resistor/height/.initial=.3}
331 \ctikzset{bipoles/resistor/width/.initial=.8}
332 \ctikzset{bipoles/potentiometer/height/.initial=.8}
333 \ctikzset{bipoles/potentiometer/height 2/.initial=.3}
334 \ctikzset{bipoles/potentiometer/width/.initial=.8}
335 \ctikzset{bipoles/photoresistor/height/.initial=.6}
336 \ctikzset{bipoles/photoresistor/height 2/.initial=.3}
337 \ctikzset{bipoles/photoresistor/width/.initial=.8}
338 \ctikzset{bipoles/thermistor/main/.initial=.7}
339 \ctikzset{bipoles/thermistor/height/.initial=.428}%.3/.7
340 \ctikzset{bipoles/thermistorntc/width/.initial=.8}
341 \ctikzset{bipoles/thermistorntc/main/.initial=.7}
342 \ctikzset{bipoles/thermistorntc/height/.initial=.428}%.3/.7
343 \ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.3/.7
344 \ctikzset{bipoles/thermistorptc/width/.initial=.8}
345 \ctikzset{bipoles/thermistorptc/main/.initial=.7}
346 \ctikzset{bipoles/thermistorptc/height/.initial=.428}%.3/.7
347 \ctikzset{bipoles/thermistorptc/height 2/.initial=.75}%.3/.7
348 \ctikzset{bipoles/thermistor/width/.initial=.8}
349 \ctikzset{bipoles/varistor/main/.initial=.7}
350 \ctikzset{bipoles/varistor/height/.initial=.428}%.3/.7
351 \ctikzset{bipoles/varistor/width/.initial=.8}
352 \ctikzset{bipoles/vresistor/height/.initial=.6}
353 \ctikzset{bipoles/vresistor/width/.initial=.8}
354 \ctikzset{bipoles/cuteinductor/height/.initial=.3}
355 \ctikzset{bipoles/cuteinductor/width/.initial=.8}
356 \ctikzset{bipoles/cuteinductor/coils/.initial=6}
357 \ctikzset{bipoles/americaninductor/height/.initial=.3}
358 \ctikzset{bipoles/americaninductor/height 2/.initial=.1}
359 \ctikzset{bipoles/americaninductor/width/.initial=.8}
360 \ctikzset{bipoles/americaninductor/coils/.initial=4}
361 \ctikzset{bipoles/vcuteinductor/height/.initial=.6}
362 \ctikzset{bipoles/vcuteinductor/coil height/.initial=.3}
363 \ctikzset{bipoles/vcuteinductor/width/.initial=.8}
364 \ctikzset{bipoles/vcuteinductor/coils/.initial=6}
365 \ctikzset{bipoles/vamericaninductor/height/.initial=.6}
366 \ctikzset{bipoles/vamericaninductor/height 2/.initial=.2}
367 \ctikzset{bipoles/vamericaninductor/width/.initial=.8}
368 \ctikzset{bipoles/vamericaninductor/coils/.initial=4}
369 \ctikzset{bipoles/isource/height/.initial=.60}
370 \ctikzset{bipoles/isource/width/.initial=.60}
371 \ctikzset{bipoles/isourceam/height/.initial=.60}
372 \ctikzset{bipoles/isourceam/width/.initial=.60}
373 \ctikzset{bipoles/vsource/height/.initial=.60}
374 \ctikzset{bipoles/vsource/width/.initial=.60}
375 \ctikzset{bipoles/vsourceam/height/.initial=.60}
376 \ctikzset{bipoles/vsourceam/width/.initial=.60}
377 \ctikzset{bipoles/vsourceam/margin/.initial=.7}
378 \ctikzset{bipoles/isourcesin/height/.initial=.60}
379 \ctikzset{bipoles/isourcesin/width/.initial=.60}
380 \ctikzset{bipoles/vsourcesin/height/.initial=.60}
381 \ctikzset{bipoles/vsourcesin/width/.initial=.60}
382 \ctikzset{bipoles/vsourcesquare/height/.initial=.60}
383 \ctikzset{bipoles/vsourcesquare/width/.initial=.60}
384 \ctikzset{bipoles/cisource/height/.initial=.7}
385 \ctikzset{bipoles/cisource/width/.initial=.7}
386 \ctikzset{bipoles/cisourceam/height/.initial=.7}
387 \ctikzset{bipoles/cisourceam/width/.initial=.7}
388 \ctikzset{bipoles/cvsource/height/.initial=.7}
389 \ctikzset{bipoles/cvsource/width/.initial=.7}
390 \ctikzset{bipoles/cvsourceam/height/.initial=.7}
391 \ctikzset{bipoles/cvsourceam/width/.initial=.7}
392 \ctikzset{bipoles/cvsourceam/margin/.initial=.7}
393 \ctikzset{bipoles/cvsourceam/text scale/.initial=1}
394 \ctikzset{bipoles/cisourcesin/width/.initial=.7}
395 \ctikzset{bipoles/cvsourcesin/height/.initial=.7}
396 \ctikzset{bipoles/cvsourcesin/width/.initial=.7}
397 \ctikzset{bipoles/capacitor/height/.initial=.6}
398 \ctikzset{bipoles/capacitor/width/.initial=.2}
399 \ctikzset{bipoles/pcapacitor/height/.initial=.6}
400 \ctikzset{bipoles/pcapacitor/width/.initial=.2}
401 \ctikzset{bipoles/pcapacitor/bend width/.initial=1.1}
402 \ctikzset{bipoles/vcapacitor/height/.initial=.6}
403 \ctikzset{bipoles/vcapacitor/width/.initial=.5}
404 \ctikzset{bipoles/vcapacitor/capacitor width/.initial=.4}
405 \ctikzset{bipoles/battery/height/.initial=.6}
406 \ctikzset{bipoles/battery/width/.initial=.3}
407 \ctikzset{bipoles/battery1/height/.initial=.6}
408 \ctikzset{bipoles/battery1/width/.initial=.3}
409 \ctikzset{bipoles/diode/height/.initial=.50}
410 \ctikzset{bipoles/diode/width/.initial=.40}
411 \ctikzset{bipoles/varcap/height/.initial=.50}
412 \ctikzset{bipoles/varcap/width/.initial=.45}
413 \ctikzset{bipoles/interr/height/.initial=.35}
414 \ctikzset{bipoles/interr/width/.initial=.35}
415 \ctikzset{bipoles/interr/height 2/.initial=.1}
416 \ctikzset{bipoles/generic/height/.initial=.30}
417 \ctikzset{bipoles/generic/width/.initial=.80}
418 \ctikzset{bipoles/european gas filled surge arrester/height/.initial=.30}
419 \ctikzset{bipoles/european gas filled surge arrester/width/.initial=.80}
420 \ctikzset{bipoles/european gas filled surge arrester/inside/.initial=.30}
421 \ctikzset{bipoles/american gas filled surge arrester/height/.initial=.60}
422 \ctikzset{bipoles/american gas filled surge arrester/width/.initial=.60}
423 \ctikzset{bipoles/american gas filled surge arrester/inside/.initial=.15}
424 \ctikzset{bipoles/american gas filled surge arrester/dot x/.initial=.25}
425 \ctikzset{bipoles/american gas filled surge arrester/dot y/.initial=.45}
426 \ctikzset{bipoles/american gas filled surge arrester/size/.initial=.1}
427 \ctikzset{bipoles/fuse/height/.initial=.20}
428 \ctikzset{bipoles/fuse/width/.initial=.50}
429 \ctikzset{bipoles/afuse/height/.initial=.20}
430 \ctikzset{bipoles/afuse/width/.initial=.50}
431 \ctikzset{bipoles/generic potentiometer/height/.initial=.80}
432 \ctikzset{bipoles/generic potentiometer/height 2/.initial=.30}
433 \ctikzset{bipoles/generic potentiometer/width/.initial=.80}
434 \ctikzset{bipoles/ageneric/height/.initial=.30}
435 \ctikzset{bipoles/ageneric/width/.initial=.80}
436 \ctikzset{bipoles/memristor/height/.initial=.30}
437 \ctikzset{bipoles/memristor/wave height/.initial=.5}
438 \ctikzset{bipoles/memristor/width/.initial=.80}
439 \ctikzset{bipoles/tgeneric/height/.initial=.70}
440 \ctikzset{bipoles/tgeneric/width/.initial=.80}
441 \ctikzset{bipoles/tfullgeneric/height/.initial=.70}
442 \ctikzset{bipoles/tfullgeneric/width/.initial=.80}
443 \ctikzset{bipoles/fullgeneric/height/.initial=.30}
444 \ctikzset{bipoles/fullgeneric/width/.initial=.80}
445 \ctikzset{bipoles/open/height/.initial=.25}
446 \ctikzset{bipoles/open/width/.initial=.8}
447 \ctikzset{bipoles/ammeter/height/.initial=.60}
448 \ctikzset{bipoles/ammeter/width/.initial=.60}
449 \ctikzset{bipoles/voltmeter/height/.initial=.60}
450 \ctikzset{bipoles/voltmeter/width/.initial=.60}
451 \ctikzset{bipoles/buffer/height/.initial=1}
452 \ctikzset{bipoles/buffer/width/.initial=1}
453 \ctikzset{bipoles/not port/width/.initial=1}
454 \ctikzset{bipoles/not port/height/.initial=.8}
455 \ctikzset{bipoles/not port/circle width/.initial=.15}
456 \ctikzset{bipoles/lamp/height/.initial=.60}
457 \ctikzset{bipoles/lamp/width/.initial=.60}
458 \ctikzset{bipoles/tline/height/.initial=.3}
459 \ctikzset{bipoles/tline/width/.initial=.8}
460 \ctikzset{bipoles/squid/height/.initial=.60}
461 \ctikzset{bipoles/squid/width/.initial=.60}
462 \ctikzset{bipoles/barrier/height/.initial=.60}
463 \ctikzset{bipoles/barrier/width/.initial=.60}
464 \ctikzset{bipoles/thermocouple/height/.initial=.250}
465 \ctikzset{bipoles/thermocouple/height 2/.initial=.60}
466 \ctikzset{bipoles/thermocouple/width/.initial=.140}
467 \ctikzset{bipoles/pushbutton/height/.initial=.5}
468 \ctikzset{bipoles/pushbutton/height 2/.initial=.0}
469 \ctikzset{bipoles/pushbutton/width/.initial=.50}
470 \ctikzset{bipoles/twoport/width/.initial=.7}
471 \ctikzset{bipoles/twoport/height/.initial=.7}
472 \ctikzset{bipoles/twoport/text/.initial=}
473 \ctikzset{bipoles/vco/width/.initial=.7}
474 \ctikzset{bipoles/bandpass/width/.initial=.7}
475 \ctikzset{bipoles/highpass/width/.initial=.7}
476 \ctikzset{bipoles/lowpass/width/.initial=.7}
477 \ctikzset{bipoles/adc/width/.initial=.7}
478 \ctikzset{bipoles/dac/width/.initial=.7}
479 \ctikzset{bipoles/dsp/width/.initial=.7}
480 \ctikzset{bipoles/fft/width/.initial=.7}
481 \ctikzset{bipoles/amp/width/.initial=.7}
482 \ctikzset{bipoles/vamp/width/.initial=.7}
483 \ctikzset{bipoles/piattenuator/width/.initial=.7}
484 \ctikzset{bipoles/vpiattenuator/width/.initial=.7}
485 \ctikzset{bipoles/tattenuator/width/.initial=.7}
486 \ctikzset{bipoles/vtattenuator/width/.initial=.7}
487 \ctikzset{bipoles/phaseshifter/width/.initial=.7}
488 \ctikzset{bipoles/vphaseshifter/width/.initial=.7}
489 \ctikzset{bipoles/detector/width/.initial=.7}
490
491 \newif\ifpgf@circuit@mos@arrows
492 \ctikzset{tripoles/mos style/.is choice}
493 \ctikzset{tripoles/mos style/no arrows/.code={\pgf@circuit@mos@arrowsfalse}}
494 \ctikzset{tripoles/mos style/arrows/.code={\pgf@circuit@mos@arrowstrue}}
495 \ctikzset{tripoles/nmos/width/.initial=.7}
496 \ctikzset{tripoles/nmos/gate height/.initial=.35}
497 \ctikzset{tripoles/nmos/base height/.initial=.5}
498 \ctikzset{tripoles/nmos/height/.initial=1.1}
499 \ctikzset{tripoles/nmos/base width/.initial=.5}
500 \ctikzset{tripoles/nmos/gate width/.initial=.62}
501 \ctikzset{tripoles/pmos/width/.initial=.7}
502 \ctikzset{tripoles/pmos/gate height/.initial=.35}
503 \ctikzset{tripoles/pmos/base height/.initial=.5}
504 \ctikzset{tripoles/pmos/height/.initial=1.1}
505 \ctikzset{tripoles/pmos/base width/.initial=.5}
506 \ctikzset{tripoles/pmos/gate width/.initial=.62}
507
508 \ctikzset{tripoles/nfet/width/.initial=.7}
509 \ctikzset{tripoles/nfet/gate height/.initial=.35}
510 \ctikzset{tripoles/nfet/base height/.initial=.5}
511 \ctikzset{tripoles/nfet/height/.initial=1.1}
512 \ctikzset{tripoles/nfet/base width/.initial=.5}
513 \ctikzset{tripoles/nfet/gate width/.initial=.62}
514
515 \ctikzset{tripoles/pfet/width/.initial=.7}
516 \ctikzset{tripoles/pfet/gate height/.initial=.35}
517 \ctikzset{tripoles/pfet/base height/.initial=.5}
518 \ctikzset{tripoles/pfet/height/.initial=1.1}
519 \ctikzset{tripoles/pfet/base width/.initial=.5}
520 \ctikzset{tripoles/pfet/gate width/.initial=.62}
521
522 \ctikzset{tripoles/nigfete/width/.initial=.7}
523 \ctikzset{tripoles/nigfete/gate height/.initial=.35}
524 \ctikzset{tripoles/nigfete/base height/.initial=.5}
525 \ctikzset{tripoles/nigfete/height/.initial=1.1}
526 \ctikzset{tripoles/nigfete/base width/.initial=.5}
527 \ctikzset{tripoles/nigfete/gate width/.initial=.62}
528
529 \ctikzset{tripoles/nigfetd/width/.initial=.7}
530 \ctikzset{tripoles/nigfetd/gate height/.initial=.35}
531 \ctikzset{tripoles/nigfetd/base height/.initial=.5}
532 \ctikzset{tripoles/nigfetd/height/.initial=1.1}
533 \ctikzset{tripoles/nigfetd/base width/.initial=.5}
534 \ctikzset{tripoles/nigfetd/gate width/.initial=.62}
535
536 \ctikzset{tripoles/pigfete/width/.initial=.7}
537 \ctikzset{tripoles/pigfete/gate height/.initial=.35}
538 \ctikzset{tripoles/pigfete/base height/.initial=.5}
539 \ctikzset{tripoles/pigfete/height/.initial=1.1}
540 \ctikzset{tripoles/pigfete/base width/.initial=.5}
541 \ctikzset{tripoles/pigfete/gate width/.initial=.62}
542
543 \ctikzset{tripoles/pigfetd/width/.initial=.7}
544 \ctikzset{tripoles/pigfetd/gate height/.initial=.35}
545 \ctikzset{tripoles/pigfetd/base height/.initial=.5}
546 \ctikzset{tripoles/pigfetd/height/.initial=1.1}
547 \ctikzset{tripoles/pigfetd/base width/.initial=.5}
548 \ctikzset{tripoles/pigfetd/gate width/.initial=.62}
549
550 \ctikzset{tripoles/npn/width/.initial=.6}
551 \ctikzset{tripoles/npn/gate height/.initial=.45}
552 \ctikzset{tripoles/npn/gate height 2/.initial=.15}
553 \ctikzset{tripoles/npn/base height/.initial=.4}
554 \ctikzset{tripoles/npn/height/.initial=1.1}
555 \ctikzset{tripoles/npn/gate width/.initial=.5}
556
557
558
559 \ctikzset{tripoles/pnp/width/.initial=.6}
560 \ctikzset{tripoles/pnp/gate height/.initial=.45}
561 \ctikzset{tripoles/pnp/gate height 2/.initial=.15}
562 \ctikzset{tripoles/pnp/base height/.initial=.4}
563 \ctikzset{tripoles/pnp/height/.initial=1.1}
564 \ctikzset{tripoles/pnp/gate width/.initial=.5}
565
566 \ctikzset{tripoles/pigbt/width/.initial=.6}
567 \ctikzset{tripoles/pigbt/gate height/.initial=.45}
568 \ctikzset{tripoles/pigbt/gate height 2/.initial=.15}
569 \ctikzset{tripoles/pigbt/base height/.initial=.4}
570 \ctikzset{tripoles/pigbt/height/.initial=1.1}
571 \ctikzset{tripoles/pigbt/gate width/.initial=.62}
572 \ctikzset{tripoles/pigbt/base width/.initial=.5}
573 \ctikzset{tripoles/nigbt/width/.initial=.6}
574 \ctikzset{tripoles/nigbt/gate height/.initial=.45}
575 \ctikzset{tripoles/nigbt/gate height 2/.initial=.15}
576 \ctikzset{tripoles/nigbt/base height/.initial=.4}
577 \ctikzset{tripoles/nigbt/height/.initial=1.1}
578 \ctikzset{tripoles/nigbt/gate width/.initial=.62}
579 \ctikzset{tripoles/nigbt/base width/.initial=.5}
580
581 \ctikzset{tripoles/njfet/width/.initial=.7}
582 \ctikzset{tripoles/njfet/gate height/.initial=.5}
583 \ctikzset{tripoles/njfet/gate height 2/.initial=.35}
584 \ctikzset{tripoles/njfet/gate width/.initial=.5}
585 \ctikzset{tripoles/njfet/height/.initial=1.1}
586 \ctikzset{tripoles/pjfet/width/.initial=.7}
587 \ctikzset{tripoles/pjfet/gate height/.initial=.5}
588 \ctikzset{tripoles/pjfet/gate height 2/.initial=.35}
589 \ctikzset{tripoles/pjfet/gate width/.initial=.5}
590 \ctikzset{tripoles/pjfet/height/.initial=1.1}
591
592 \ctikzset{tripoles/isfet/width/.initial=1}
593 \ctikzset{tripoles/isfet/gate height/.initial=.35}
594 \ctikzset{tripoles/isfet/base height/.initial=.5}
595 \ctikzset{tripoles/isfet/height/.initial=1.1}
596 \ctikzset{tripoles/isfet/base width/.initial=.3}
597 \ctikzset{tripoles/isfet/gate width/.initial=.5}
598 \ctikzset{tripoles/isfet/wave width/.initial=.16}
599 \ctikzset{tripoles/isfet/wave amp/.initial=.06}
600 \ctikzset{tripoles/isfet/waves y sep/.initial=.22}
601 \ctikzset{tripoles/isfet/waves x sep/.initial=.8}
602
603 \newif\ifpgf@circuit@europeanlogicport
604 \ctikzset{logic ports/.is choice}
605 \ctikzset{logic ports/european/.code= {\pgf@circuit@europeanlogicporttrue } }
606 \ctikzset{logic ports/american/.code= {\pgf@circuit@europeanlogicportfalse } }
607
608 \newif\ifpgf@circuit@bipole@voltage@backward
609 \ctikzset{bipole/voltage/direction/.is choice}
610 \ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}}
611 \ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}}
612
613 \ctikzset{tripoles/american and port/width/.initial=1.1}
614 \ctikzset{tripoles/american and port/height/.initial=.8}
615 \ctikzset{tripoles/american and port/port width/.initial=.7}
616 \ctikzset{tripoles/american and port/input height/.initial=.5}
617 \ctikzset{tripoles/american nand port/width/.initial=1.1}
618 \ctikzset{tripoles/american nand port/height/.initial=.8}
619 \ctikzset{tripoles/american nand port/port width/.initial=.7}
620 \ctikzset{tripoles/american nand port/circle width/.initial=.15}
621 \ctikzset{tripoles/american nand port/input height/.initial=.5}
622 \ctikzset{tripoles/american or port/width/.initial=1.1}
623 \ctikzset{tripoles/american or port/height/.initial=.8}
624 \ctikzset{tripoles/american or port/port width/.initial=.7}
625 \ctikzset{tripoles/american or port/input height/.initial=.5}
626 \ctikzset{tripoles/american or port/input skip/.initial=.25}
627 \ctikzset{tripoles/american or port/aaa/.initial=.6}
628 \ctikzset{tripoles/american or port/bbb/.initial=.4}
629 \ctikzset{tripoles/american or port/ccc/.initial=.5}
630 \ctikzset{tripoles/american or port/ddd/.initial=.0}
631 \ctikzset{tripoles/american nor port/width/.initial=1.1}
632 \ctikzset{tripoles/american nor port/height/.initial=.8}
633 \ctikzset{tripoles/american nor port/port width/.initial=.7}
634 \ctikzset{tripoles/american nor port/input height/.initial=.5}
635 \ctikzset{tripoles/american nor port/input skip/.initial=.25}
636 \ctikzset{tripoles/american nor port/circle width/.initial=.15}
637 \ctikzset{tripoles/american nor port/aaa/.initial=.6}
638 \ctikzset{tripoles/american nor port/bbb/.initial=.4}
639 \ctikzset{tripoles/american nor port/ccc/.initial=.5}
640 \ctikzset{tripoles/american nor port/ddd/.initial=.0}
641 \ctikzset{tripoles/american xor port/width/.initial=1.1}
642 \ctikzset{tripoles/american xor port/height/.initial=.8}
643 \ctikzset{tripoles/american xor port/port width/.initial=.7}
644 \ctikzset{tripoles/american xor port/input height/.initial=.5}
645 \ctikzset{tripoles/american xor port/input skip/.initial=.15}
646 \ctikzset{tripoles/american xor port/distance/.initial=.1}
647 \ctikzset{tripoles/american xor port/aaa/.initial=.6}
648 \ctikzset{tripoles/american xor port/bbb/.initial=.4}
649 \ctikzset{tripoles/american xor port/ccc/.initial=.5}
650 \ctikzset{tripoles/american xor port/ddd/.initial=.0}
651 \ctikzset{tripoles/american xnor port/width/.initial=1.1}
652 \ctikzset{tripoles/american xnor port/height/.initial=.8}
653 \ctikzset{tripoles/american xnor port/port width/.initial=.7}
654 \ctikzset{tripoles/american xnor port/input height/.initial=.5}
655 \ctikzset{tripoles/american xnor port/input skip/.initial=.15}
656 \ctikzset{tripoles/american xnor port/distance/.initial=.1}
657 \ctikzset{tripoles/american xnor port/aaa/.initial=.6}
658 \ctikzset{tripoles/american xnor port/bbb/.initial=.4}
659 \ctikzset{tripoles/american xnor port/ccc/.initial=.5}
660 \ctikzset{tripoles/american xnor port/ddd/.initial=.0}
661 \ctikzset{tripoles/american xnor port/circle width/.initial=.15}
662 \ctikzset{tripoles/european and port/width/.initial=1.4}
663 \ctikzset{tripoles/european and port/height/.initial=.65}
664 \ctikzset{tripoles/european and port/reserved/.initial=.6}
665 \ctikzset{tripoles/european and port/input height/.initial=.6}
666 \ctikzset{tripoles/european or port/width/.initial=1.4}
667 \ctikzset{tripoles/european or port/height/.initial=.65}
668 \ctikzset{tripoles/european or port/reserved/.initial=.6}
669 \ctikzset{tripoles/european or port/input height/.initial=.6}
670 \ctikzset{tripoles/european xor port/width/.initial=1.4}
671 \ctikzset{tripoles/european xor port/height/.initial=.65}
672 \ctikzset{tripoles/european xor port/reserved/.initial=.6}
673 \ctikzset{tripoles/european xor port/input height/.initial=.6}
674 \ctikzset{tripoles/european nand port/width/.initial=1.4}
675 \ctikzset{tripoles/european nand port/not height/.initial=.3}
676 \ctikzset{tripoles/european nand port/not width/.initial=.8}
677 \ctikzset{tripoles/european nand port/height/.initial=.65}
678 \ctikzset{tripoles/european nand port/reserved/.initial=.6}
679 \ctikzset{tripoles/european nand port/input height/.initial=.6}
680 \ctikzset{tripoles/european not port/width/.initial=1.4}
681 \ctikzset{tripoles/european not port/not height/.initial=.3}
682 \ctikzset{tripoles/european not port/not width/.initial=.8}
683 \ctikzset{tripoles/european not port/height/.initial=.65}
684 \ctikzset{tripoles/european not port/reserved/.initial=.6}
685 \ctikzset{tripoles/european not port/input height/.initial=0}
686 \ctikzset{tripoles/european xnor port/width/.initial=1.4}
687 \ctikzset{tripoles/european xnor port/not height/.initial=.3}
688 \ctikzset{tripoles/european xnor port/not width/.initial=.8}
689 \ctikzset{tripoles/european xnor port/height/.initial=.65}
690 \ctikzset{tripoles/european xnor port/reserved/.initial=.6}
691 \ctikzset{tripoles/european xnor port/input height/.initial=.6}
692 \ctikzset{tripoles/european nor port/width/.initial=1.4}
693 \ctikzset{tripoles/european nor port/not height/.initial=.3}
694 \ctikzset{tripoles/european nor port/not width/.initial=.8}
695 \ctikzset{tripoles/european nor port/height/.initial=.65}
696 \ctikzset{tripoles/european nor port/reserved/.initial=.6}
697 \ctikzset{tripoles/european nor port/input height/.initial=.6}
698 \ctikzset{tripoles/op amp/width/.initial=1.7}
699 \ctikzset{tripoles/op amp/port width/.initial=.7}
700 \ctikzset{tripoles/op amp/height/.initial=1.4}
701 \ctikzset{tripoles/op amp/input height/.initial=.5}
702 \ctikzset{tripoles/op amp/up pos/.initial=.45}
703 \ctikzset{tripoles/plain amp/width/.initial=1.7}
704 \ctikzset{tripoles/plain amp/port width/.initial=.7}
705 \ctikzset{tripoles/plain amp/height/.initial=1.4}
706 \ctikzset{tripoles/plain amp/input height/.initial=.5}
707 \ctikzset{tripoles/plain amp/up pos/.initial=.45}
708
709 \ctikzset{tripoles/thyristor/height/.initial=1.10}
710 \ctikzset{tripoles/thyristor/height 2/.initial=.5}
711 \ctikzset{tripoles/thyristor/width/.initial=1.0}
712 \ctikzset{tripoles/thyristor/diode height/.initial=.5}
713 \ctikzset{tripoles/thyristor/diode width left/.initial=.4}
714 \ctikzset{tripoles/thyristor/diode width right/.initial=.3}
715
716 \ctikzset{tripoles/triac/height/.initial=1.1}
717 \ctikzset{tripoles/triac/width/.initial=1}
718 \ctikzset{tripoles/triac/diode width left/.initial=.3}
719 \ctikzset{tripoles/triac/diode width right/.initial=.3}
720
721 \ctikzset{tripoles/spdt/width/.initial=.85}
722 \ctikzset{tripoles/spdt/height/.initial=.45}
723 \ctikzset{tripoles/spdt/margin/.initial=.45}
724
725 \ctikzset{tripoles/toggleswitch/height/.initial=.8}
726 \ctikzset{tripoles/toggleswitch/height 2/.initial=.0}
727 \ctikzset{tripoles/toggleswitch/width/.initial=.80}
728
729 \ctikzset{tripoles/mixer/width/.initial=0.7}
730 \ctikzset{tripoles/adder/width/.initial=0.7}
731 \ctikzset{tripoles/circulator/width/.initial=.7}
732
733 \ctikzset{tripoles/wilkinson/height/.initial=1.3}
734 \ctikzset{tripoles/wilkinson/width/.initial=1.3}
735
736 \ctikzset{quadpoles/transformer/width/.initial=1.5}
737 \ctikzset{quadpoles/transformer/width1/.initial=.4}
738 \ctikzset{quadpoles/transformer/height/.initial=1.5}
739 \ctikzset{quadpoles/transformer/height1/.initial=.8}
740 \ctikzset{quadpoles/transformer core/width/.initial=1.5}
741 \ctikzset{quadpoles/transformer core/height/.initial=1.5}
742 \ctikzset{quadpoles/transformer core/core height/.initial=.5}
743 \ctikzset{quadpoles/transformer core/core width/.initial=.05}
744 \ctikzset{quadpoles/gyrator/width/.initial=1.5}
745 \ctikzset{quadpoles/gyrator/height/.initial=1.5}
746 \ctikzset{quadpoles/coupler/width/.initial=1.3}
747 \ctikzset{quadpoles/coupler/height/.initial=1.3}
748
749 \ctikzset{bipole/.is family}
750 \ctikzset{bipole/kind/.initial = }
751 \ctikzset{bipole/name/.initial = }
752 \newif\ifpgf@circuit@bipole@reversed
753 \ctikzset{bipole/reversed/.is if=pgf@circuit@bipole@reversed}
754 \newif\ifpgf@circuit@bipole@isvoltage
755 \ctikzset{bipole/is voltage/.is if=pgf@circuit@bipole@isvoltage}
756 \newif\ifpgf@circuit@bipole@iscurrent
757 \ctikzset{bipole/is current/.is if=pgf@circuit@bipole@iscurrent}
758
759 \ctikzset{bipole/voltage/.is family}
760 \newif\ifpgf@circuit@bipole@voltage@backward
761 \ctikzset{bipole/voltage/direction/.is choice}
762 \ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}}
763 \ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}}
764 \newif\ifpgf@circuit@bipole@voltage@below
765 \ctikzset{bipole/voltage/position/.is choice}
766 \ctikzset{bipole/voltage/position/above/.code={\pgf@circuit@bipole@voltage@belowfalse}}
767 \ctikzset{bipole/voltage/position/below/.code={\pgf@circuit@bipole@voltage@belowtrue}}
768
769 \ctikzset{bipole/voltage/label/unit/.initial=}
770 \ctikzset{bipole/voltage/label/name/.initial=}
771
772 \ctikzset{bipole/current/.is family}
773 \newif\ifpgf@circuit@bipole@current@backward
774 \ctikzset{bipole/current/direction/.is choice}
775 \ctikzset{bipole/current/direction/forward/.code={\pgf@circuit@bipole@current@backwardfalse}}
776 \ctikzset{bipole/current/direction/backward/.code={\pgf@circuit@bipole@current@backwardtrue}}
777 \newif\ifpgf@circuit@bipole@current@before
778 \ctikzset{bipole/current/x position/.is choice}
779 \ctikzset{bipole/current/x position/after/.code={\pgf@circuit@bipole@current@beforefalse}}
780 \ctikzset{bipole/current/x position/before/.code={\pgf@circuit@bipole@current@beforetrue}}
781 \newif\ifpgf@circuit@bipole@current@below
782 \ctikzset{bipole/current/y position/.is choice}
783 \ctikzset{bipole/current/y position/above/.code={\pgf@circuit@bipole@current@belowfalse}}
784 \ctikzset{bipole/current/y position/below/.code={\pgf@circuit@bipole@current@belowtrue}}
785
786 \ctikzset{bipole/current/label/unit/.initial=}
787 \ctikzset{bipole/current/label/name/.initial=}
788
789 \ctikzset{bipole/label/.is family}
790 \ctikzset{bipole/label/position/.initial=90}
791 \ctikzset{bipole/label/unit/.initial=}
792 \ctikzset{bipole/label/name/.initial=}
793 \ctikzset{bipole/nodes/.is family}
794 \ctikzset{bipole/nodes/left/.is choice}
795 \ctikzset{bipole/nodes/left/none/.code={\ctikzsetvalof{bipole/nodes/left}{none}}}
796 \ctikzset{bipole/nodes/left/empty/.code={\ctikzsetvalof{bipole/nodes/left}{empty}}}
797 \ctikzset{bipole/nodes/left/full/.code={\ctikzsetvalof{bipole/nodes/left}{full}}}
798 \ctikzset{bipole/nodes/right/.is choice}
799 \ctikzset{bipole/nodes/right/none/.code={\ctikzsetvalof{bipole/nodes/right}{none}}}
800 \ctikzset{bipole/nodes/right/empty/.code={\ctikzsetvalof{bipole/nodes/right}{empty}}}
801 \ctikzset{bipole/nodes/right/full/.code={\ctikzsetvalof{bipole/nodes/right}{full}}}
802
803
804 \newif\ifpgf@circuit@europeanresistor
805 \ctikzset{resistor/.is choice}
806 \ctikzset{resistor/american/.code = \pgf@circuit@europeanresistorfalse }
807 \ctikzset{resistor/european/.code = \pgf@circuit@europeanresistortrue }
808
809 \ctikzset{inductor/.is choice}
810 \ctikzset{inductor/cute/.code={\ctikzsetvalof{inductor}{cute}}}
811 \ctikzset{inductor/european/.code={\ctikzsetvalof{inductor}{european}}}
812 \ctikzset{inductor/american/.code={\ctikzsetvalof{inductor}{american}}}
813
814 \newif\ifpgf@circuit@fulldiode
815 \ctikzset{diode/.is if=pgf@circuit@fulldiode}
816 \ctikzset{diode/.is choice}
817 \ctikzset{diode/empty/.code = \pgf@circuit@fulldiodefalse }
818 \ctikzset{diode/full/.code = \pgf@circuit@fulldiodetrue }
819 \ctikzset{thickness/.initial=2}
820 \ctikzset{color/.initial=black}
821 \pgfkeys{/tikz/color/.add code={}{\ctikzset{color=#1}}}
822
823
824 \newif\ifpgf@circ@siunitx
825 \newif\ifpgf@circ@siunitx@res
826
827 \ctikzset{voltage/.is family}
828 \ctikzset{voltage/distance from node/.initial=.5} %\pgf@circ@Rlen units
829 \ctikzset{voltage/distance from line/.initial=.08} % pos, tra 0 e 1
830 \ctikzset{voltage/bump a/.initial=1.2}
831 \ctikzset{voltage/bump b/.initial=1.5}
832 \ctikzset{voltage/european label distance/.initial=1.4}
833 \ctikzset{voltage/american label distance/.initial=1.1}
834 % special cases
835 \ctikzset{bipoles/generic/voltage/distance from node/.initial=.4}
836 \ctikzset{bipoles/generic/voltage/bump b/.initial=2}
837 \ctikzset{bipoles/generic/voltage/european label distance/.initial=1.8}
838 %\ctikzset{bipoles/thermocouple/voltage/distance from node/.initial=.3}
839 \ctikzset{bipoles/thermocouple/voltage/bump b/.initial=2.2}
840 \ctikzset{bipoles/thermocouple/voltage/european label distance/.initial=1.5}
841 \ctikzset{bipoles/ageneric/voltage/distance from node/.initial=.4}
842 \ctikzset{bipoles/ageneric/voltage/bump b/.initial=2}
843 \ctikzset{bipoles/ageneric/voltage/european label distance/.initial=1.8}
844 \ctikzset{bipoles/fullgeneric/voltage/distance from node/.initial=.4}
845 \ctikzset{bipoles/fullgeneric/voltage/bump b/.initial=2}
846 \ctikzset{bipoles/fullgeneric/voltage/european label distance/.initial=1.8}
847 \ctikzset{bipoles/memristor/voltage/distance from node/.initial=.4}
848 \ctikzset{bipoles/memristor/voltage/bump b/.initial=2}
849 \ctikzset{bipoles/memristor/voltage/european label distance/.initial=1.8}
850 %\ctikzset{bipoles/tline/voltage/distance from node/.initial=.2}
851 \ctikzset{bipoles/tline/voltage/bump b/.initial=2.4}
852 \ctikzset{bipoles/tline/voltage/european label distance/.initial=2.1}
853 %\ctikzset{bipoles/varistor/voltage/distance from node/.initial=.2}
854 \ctikzset{bipoles/varistor/voltage/bump b/.initial=2.4}
855 \ctikzset{bipoles/varistor/voltage/european label distance/.initial=2}
856 %\ctikzset{bipoles/photoresistor/voltage/distance from node/.initial=.2}
857 \ctikzset{bipoles/photoresistor/voltage/bump b/.initial=2}
858 \ctikzset{bipoles/photoresistor/voltage/european label distance/.initial=1.8}
859 %\ctikzset{bipoles/thermistor/voltage/distance from node/.initial=.2}
860 \ctikzset{bipoles/thermistor/voltage/bump b/.initial=2.4}
861 \ctikzset{bipoles/thermistor/voltage/european label distance/.initial=2}
862 %\ctikzset{bipoles/thermistorntc/voltage/distance from node/.initial=.2}
863 \ctikzset{bipoles/thermistorntc/voltage/bump b/.initial=1.6}
864 %\ctikzset{bipoles/thermistorptc/voltage/distance from node/.initial=.2}
865 \ctikzset{bipoles/thermistorptc/voltage/bump b/.initial=1.6}
866
867 \ctikzset{current/.is family}
868 \ctikzset{current/distance/.initial = .5}
869
870 \tikzset{american currents/.style = { \circuitikzbasekey/current = american } }
871 \tikzset{european currents/.style = { \circuitikzbasekey/current = european } }
872 \tikzset{american voltages/.style = { \circuitikzbasekey/voltage = american } }
873 \tikzset{european voltages/.style = { \circuitikzbasekey/voltage = european } }
874 \tikzset{american resistors/.style = { \circuitikzbasekey/resistor = american } }
875 \tikzset{european resistors/.style = { \circuitikzbasekey/resistor = european } }
876
877 \newif\ifpgf@circuit@europeangfsurgearrester
878 \ctikzset{gas filled surge arrester/.is choice}
879 \ctikzset{gas filled surge arrester/european/.code= {\pgf@circuit@europeangfsurgearrestertrue } }
880 \ctikzset{gas filled surge arrester/american/.code= {\pgf@circuit@europeangfsurgearresterfalse } }
881
882 \tikzset{american gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = american } }
883 \tikzset{european gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = european } }
884 \tikzset{american inductors/.style = { \circuitikzbasekey/inductor = american } }
885 \tikzset{european inductors/.style = { \circuitikzbasekey/inductor = european } }
886 \tikzset{cute inductors/.style = { \circuitikzbasekey/inductor = cute } }
887 \tikzset{full diodes/.style = { \circuitikzbasekey/diode = full } }
888 \tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty } }
889 \tikzset{american ports/.style = { \circuitikzbasekey/logic ports = american } }
890 \tikzset{european ports/.style = { \circuitikzbasekey/logic ports = european } }
891 \tikzset{european/.style = { european currents, european voltages, european resistors, european inductors, european ports, european gas filled surge arrester } }
892 \tikzset{american/.style = { american currents, american voltages, american resistors, american inductors, american ports, american gas filled surge arrester } }
893 \tikzset{cute/.style = { european currents, european voltages, american resistors, cute inductors, american ports } }
894
895 % I should try to make the tree clearer (this voltaege conflicts with the options above)
896
897 \newif\ifpgf@circuit@europeanvoltage
898 \ctikzset{voltage/.is choice}
899 \ctikzset{voltage/american/.code = {\pgf@circuit@europeanvoltagefalse } }
900 \ctikzset{voltage/european/.code = {\pgf@circuit@europeanvoltagetrue } }
901
902 \newif\ifpgf@circuit@europeancurrent
903 \ctikzset{current/.is choice}
904 \ctikzset{current/american/.code = \pgf@circuit@europeancurrentfalse }
905 \ctikzset{current/european/.code = \pgf@circuit@europeancurrenttrue }
906
907 \ctikzset{label/align/.is choice}
908 \ctikzset{label/align/straight/.code={\ctikzsetvalof{label/align}{straight}}}
909 \ctikzset{label/align/rotate/.code={\ctikzsetvalof{label/align}{rotate}}}
910 \ctikzset{label/align/smart/.code={\ctikzsetvalof{label/align}{smart}}}
911 %% dependencies
912
913
914
915
916 %%%%%%%%%% new
917 \pgfkeys{\circuitikzbasekey/.search also={/tikz}}
918
919
920
921
922
923 %%%%%%%%%%% Springe nach pgfcircutils
924 %%%---------- open: pgfcircutils.tex
925 % Copyright 2007-2009 by Massimo Redaelli
926 %
927 % This file may be distributed and/or modified
928 %
929 % 1. under the LaTeX Project Public License and/or
930 % 2. under the GNU Public License.
931 %
932 % See the file doc/LICENSE for more details.
933
934 %\def\pgf@circ@handleSI#1{%
935 % \pgf@circ@siunitx@resfalse
936 %
937 % \edef\len{\stringlength[e]{#1}}
938 %\testmatchingchar[e]{#1}{\len}{>}%
939 %\ifmatchingchar%
940 % \ifnum\findchars{#1}{<}=0
941 % \def\pgf@circ@handleSI@val{\substring{#1}{1}{\findchars{#1}{<}-1}}
942 %\def\pgf@circ@handleSI@unit{\substring{#1}{\findchars{#1}{<}-1}+1}{\stringlength{#1}}
943 %\pgf@circ@siunitx@restrue
944 % \else
945 % \fi
946 %\else
947 %\fi
948 %}
949
950 \def\pgf@circ@handleSI#1{
951 \noexpandarg
952 \def\pgf@temp{}
953 \StrBetween{#1}{<}{>}[\pgf@circ@handleSI@unit]
954 \StrLen{\pgf@circ@handleSI@unit}[\pgf@circ@handleSI@unit@len]
955
956 \ifnum\pgf@circ@handleSI@unit@len=0
957 \pgf@circ@siunitx@resfalse
958 \else
959 \IfEndWith{#1}{>}{
960 \pgf@circ@siunitx@restrue
961 \noexpandarg
962 \StrBefore{#1}{<}[\pgf@circ@handleSI@val]
963 %\typeout{si |#1|}
964 }{
965 \pgf@circ@siunitx@resfalse
966 %\typeout{no si |#1|}
967 }
968 \fi
969 }
970
971 \def\pgf@circ@finallabel#1{%
972 \edef\pgf@temp{}%
973 \edef\pgf@circ@temp{\ctikzvalof{bipole/#1label/unit}}%
974 \ifx\pgf@temp\pgf@circ@temp%
975 \ctikzvalof{bipole/#1label/name}%
976 \else%
977 $\SI{\ctikzvalof{bipole/#1label/name}}{\ctikzvalof{bipole/#1label/unit}}$%
978 \fi%
979 }
980
981 \def\pgf@circ@ifkeyempty#1{
982 \pgfextra{
983 \ctikzset{#1/.get=\pgf@circ@temp}
984 \edef\pgf@temp{}
985 }
986 \ifx\pgf@circ@temp\pgf@temp
987 }
988
989
990 %%%---------- close: pgfcircutils
991 %%%%%%%%%%% Springe nach pgfcircmath
992 %%%---------- open: pgfcircmath.tex
993 % Copyright 2007-2009 by Massimo Redaelli
994 %
995 % This file may be distributed and/or modified
996 %
997 % 1. under the LaTeX Project Public License and/or
998 % 2. under the GNU Public License.
999 %
1000 % See the file doc/LICENSE for more details.
1001
1002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1003 %% Math routines
1004
1005 \def\pgf@circ@stripdecimals#1.#2\pgf@nil{#1}
1006
1007 % angle between 0 and 360
1008 \def\pgf@circ@slope#1#2{%
1009 \pgf@process{#1}%
1010 \pgf@xa=\pgf@x%
1011 \pgf@ya=\pgf@y%
1012 \pgf@process{#2}%
1013 \advance\pgf@x by-\pgf@xa%
1014 \advance\pgf@y by-\pgf@ya%
1015 \ifdim\pgf@x<0.1pt
1016 \ifdim\pgf@x>-0.1pt % vertical
1017 \ifdim\pgf@y<0pt
1018 \def\pgfmathresult{-90.0}
1019 \else
1020 \def\pgfmathresult{+90.0}
1021 \fi
1022 \else % oblique with dx < 0
1023 \pgfmathdivide{\pgf@y}{\pgf@x}
1024 \pgfmathatan{\pgfmathresult}
1025 \ifdim\pgf@x<0pt
1026 \pgfmathsubtract{\pgfmathresult}{+180}
1027 \fi
1028 \fi
1029 \else % oblique with dx > 0
1030 \pgfmathdivide{\pgf@y}{\pgf@x}
1031 \pgfmathatan{\pgfmathresult}
1032 \ifdim\pgf@x<0pt
1033 \pgfmathsubtract{\pgfmathresult}{+180}
1034 \fi
1035 \fi
1036 \pgf@x=\pgfmathresult pt
1037 \ifdim\pgf@x<0pt
1038 \pgfmathadd{\pgfmathresult}{+360}
1039 \fi
1040 }
1041
1042
1043 %%%---------- close: pgfcircmath
1044
1045 %%%%%%%%%%% Springe nach pgfcircshapes
1046 %%%---------- open: pgfcircshapes.tex
1047 % Copyright 2007-2009 by Massimo Redaelli
1048 %
1049 % This file may be distributed and/or modified
1050 %
1051 % 1. under the LaTeX Project Public License and/or
1052 % 2. under the GNU Public License.
1053 %
1054 % See the file doc/LICENSE for more details.
1055
1056 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1057 %% Other shapes
1058
1059
1060 %% Nothing
1061
1062 \pgfdeclareshape{emptyshape}{
1063 \savedanchor{\northeast}{%
1064 \pgf@x=.5\wd\pgfnodeparttextbox%
1065 \pgf@y=.5\ht\pgfnodeparttextbox%
1066 }
1067 \anchor{north}{
1068 \northeast
1069 \pgf@x=0cm
1070 }
1071 \anchor{east}{%
1072 \northeast
1073 \pgf@y=0cm
1074 }
1075 \anchor{south}{%
1076 \northeast
1077 \pgf@y=-\pgf@y
1078 \pgf@x=0cm
1079 }
1080 \anchor{west}{
1081 \northeast
1082 \pgf@y=0cm
1083 \pgf@x=-\pgf@x
1084 }
1085 \anchor{text}{%
1086 \pgfpointorigin
1087 }
1088 \anchor{center}{
1089 \pgfpointorigin
1090 }
1091 }
1092
1093 %% Full terminal
1094
1095 \pgfdeclareshape{circ}{
1096 \anchor{center}{
1097 \pgfpointorigin
1098 }
1099 \anchorborder{
1100 \pgf@circ@res@left=\pgf@x
1101 \pgf@circ@res@up=\pgf@y
1102 \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
1103 }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}
1104 }
1105 \behindforegroundpath{
1106
1107 \pgfscope
1108 \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
1109 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1110 \pgfusepath{draw,fill}
1111 \endpgfscope
1112
1113 }
1114 }
1115
1116 %% Empty terminal
1117
1118 \pgfdeclareshape{ocirc}{
1119 \anchor{center}{
1120 \pgfpointorigin
1121 }
1122 \anchorborder{
1123 \pgf@circ@res@left=\pgf@x
1124 \pgf@circ@res@up=\pgf@y
1125 \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
1126 }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}
1127 }
1128
1129 \behindforegroundpath{
1130
1131 \pgfscope
1132 \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
1133 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1134 \pgfsetfillcolor{white}
1135 \pgfusepath{draw,fill}
1136 \endpgfscope
1137
1138 }
1139 }
1140
1141 %% Current arrow
1142
1143 \pgfdeclareshape{currarrow}{
1144 \anchor{center}{
1145 \pgfpointorigin
1146 }
1147 \behindforegroundpath{
1148
1149 \pgfscope
1150 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
1151 \divide \pgf@circ@res@step by 16
1152
1153 \pgfpathmoveto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
1154 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
1155 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@step}{0pt}}
1156 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1157 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
1158 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1159 \pgfusepath{draw,fill}
1160
1161 \endpgfscope
1162 }
1163
1164 }
1165
1166 %% Current arrow
1167
1168 \pgfdeclareshape{inputarrow}{
1169 \savedanchor{\tip}{
1170 \pgfpointorigin
1171 }
1172 \anchor{center}{
1173 \tip
1174 }
1175 \anchor{tip}{
1176 \tip
1177 }
1178 \behindforegroundpath{
1179
1180 \pgfscope
1181 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
1182 \divide \pgf@circ@res@step by 16
1183
1184 \pgfpathmoveto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}}
1185 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
1186 \pgfpathlineto{\pgfpoint{0pt}{0pt}}
1187 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1188 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}}
1189 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1190 \pgfusepath{fill}
1191
1192 \endpgfscope
1193 }
1194
1195 }
1196
1197 %%%---------- close: pgfcircshapes
1198 %%%%%%%%%%% Springe nach pgfcircmonopoles
1199 %%%---------- open: pgfcircmonopoles.tex
1200 % Copyright 2007-2009 by Massimo Redaelli
1201 %
1202 % This file may be distributed and/or modified
1203 %
1204 % 1. under the LaTeX Project Public License and/or
1205 % 2. under the GNU Public License.
1206 %
1207 % See the file doc/LICENSE for more details.
1208
1209 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1210 %% Monopoles
1211
1212 %% Ground symbol
1213
1214 \pgfdeclareshape{ground}{
1215 \anchor{center}{
1216 \pgfpointorigin
1217 }
1218 \behindforegroundpath{
1219 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1220
1221 \pgfscope
1222 \pgfpathmoveto{\pgfpointorigin}
1223 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1224 \pgfusepath{draw}
1225
1226 \pgfstartlinewidth=\pgflinewidth
1227 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1228
1229 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1230 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1231 \pgfusepath{draw}
1232
1233 \pgfsetlinewidth{\pgfstartlinewidth}
1234 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1235 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1236 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1237 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1238 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1239 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1240 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1241 \pgfusepath{draw}
1242
1243
1244 \pgfsetlinewidth{\pgfstartlinewidth}
1245
1246 \endpgfscope
1247 }
1248
1249 }
1250
1251
1252
1253 \pgfdeclareshape{rground}{
1254 \anchor{center}{
1255 \pgfpointorigin
1256 }
1257 \behindforegroundpath{
1258 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1259
1260 \pgfscope
1261 \pgfpathmoveto{\pgfpointorigin}
1262 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1263 \pgfusepath{draw}
1264
1265 \pgfstartlinewidth=\pgflinewidth
1266 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1267
1268 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1269 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1270 \pgfusepath{draw}
1271
1272
1273 \pgfsetlinewidth{\pgfstartlinewidth}
1274
1275 \endpgfscope
1276 }
1277 }
1278
1279 \pgfdeclareshape{tground}{
1280 \anchor{center}{
1281 \pgfpointorigin
1282 }
1283 \behindforegroundpath{
1284 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1285
1286 \pgfscope
1287 \pgfpathmoveto{\pgfpointorigin}
1288 %\pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1289 \pgfusepath{draw}
1290
1291 \pgfstartlinewidth=\pgflinewidth
1292 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth}
1293
1294 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
1295 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
1296 \pgfusepath{draw}
1297
1298
1299 \pgfsetlinewidth{\pgfstartlinewidth}
1300
1301 \endpgfscope
1302 }
1303 }
1304
1305 \pgfdeclareshape{sground}{
1306 \anchor{center}{
1307 \pgfpointorigin
1308 }
1309 \behindforegroundpath{
1310 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1311
1312 \pgfscope
1313 \pgfpathmoveto{\pgfpointorigin}
1314 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1315 \pgfusepath{draw}
1316
1317 \pgfstartlinewidth=\pgflinewidth
1318 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1319
1320 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1321 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1322 \pgfpathlineto{\pgfpoint{0}{-1.8\pgf@circ@res@step}}
1323 \pgfpathclose
1324 \pgfusepath{draw}
1325
1326
1327 \pgfsetlinewidth{\pgfstartlinewidth}
1328
1329 \endpgfscope
1330 }
1331
1332 }
1333
1334 % noiseless ground
1335 \pgfdeclareshape{nground}{
1336 \anchor{center}{
1337 \pgfpointorigin
1338 }
1339 \behindforegroundpath{
1340 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1341
1342 \pgfscope
1343 \pgfpathmoveto{\pgfpointorigin}
1344 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1345 \pgfusepath{draw}
1346
1347 \pgfstartlinewidth=\pgflinewidth
1348 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1349
1350 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1351 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1352 \pgfusepath{draw}
1353
1354 \pgfsetlinewidth{\pgfstartlinewidth}
1355 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1356 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1357 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1358 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1359 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1360 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1361 \pgfusepath{draw}
1362
1363 \pgfpathmoveto{\pgfpoint{1.3\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1364 \pgfpatharc{0}{180}{1.3\pgf@circ@res@step}
1365 \pgfusepath{draw}
1366
1367 \pgfsetlinewidth{\pgfstartlinewidth}
1368 \endpgfscope
1369 }
1370 }
1371
1372 % protective ground
1373 \pgfdeclareshape{pground}{
1374 \anchor{center}{
1375 \pgfpointorigin
1376 }
1377 \behindforegroundpath{
1378 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1379
1380 \pgfscope
1381 \pgfpathmoveto{\pgfpointorigin}
1382 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1383 \pgfusepath{draw}
1384
1385 \pgfstartlinewidth=\pgflinewidth
1386 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1387
1388 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1389 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1390 \pgfpathcircle{\pgfpoint{0pt}{-\pgf@circ@res@step}} {1.2\pgf@circ@res@step}
1391 \pgfusepath{draw}
1392
1393 \pgfsetlinewidth{\pgfstartlinewidth}
1394 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1395 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1396 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1397 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1398 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1399 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1400 \pgfusepath{draw}
1401
1402 \pgfsetlinewidth{\pgfstartlinewidth}
1403 \endpgfscope
1404 }
1405 }
1406
1407 % chassis ground
1408 \pgfdeclareshape{cground}{
1409 \anchor{center}{
1410 \pgfpointorigin
1411 }
1412 \behindforegroundpath{
1413 \pgf@circ@res@step=\ctikzvalof{monopoles/chassis/width}\pgf@circ@Rlen
1414
1415 \pgfscope
1416 \pgfpathmoveto{\pgfpointorigin}
1417 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1418 \pgfusepath{draw}
1419
1420 \pgfpathmoveto{\pgfpoint{-1.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1421 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1422 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1423 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1424 \pgfpathmoveto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1425 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1426 \pgfusepath{draw}
1427 \endpgfscope
1428 }
1429 }
1430
1431 % Contributed by Leonardo Azzinnari
1432 \pgfdeclareshape{tlinestub}{
1433 \anchor{center}{\pgfpointorigin}
1434 \behindforegroundpath{
1435 \pgfstartlinewidth=\pgflinewidth
1436
1437 \pgf@circ@res@step=\ctikzvalof{bipoles/tline/width} \pgf@circ@Rlen
1438 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1439
1440 \pgfpathmoveto{\pgfpointorigin}
1441 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0pt}}
1442 \pgfusepath{draw}
1443 \pgfscope
1444 \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}}
1445 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1446 \pgfpathlineto{\pgfpoint{1.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1447 \pgfpatharc{90}{-90}{0.125\pgf@circ@res@step and 0.25\pgf@circ@res@step}
1448 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-0.25\pgf@circ@res@step}}
1449 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1450 \pgfusepath{draw}
1451 \endpgfscope
1452 }
1453 }
1454
1455
1456
1457
1458 \pgfdeclareshape{antenna}{
1459 \anchor{center}{\pgfpointorigin}
1460 \savedanchor{\northeast}{
1461 \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen
1462 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1463 \pgf@y=6\pgf@circ@res@step
1464 }
1465 \anchor{text}{
1466 \northeast
1467 \pgf@x=\ctikzvalof{monopoles/antenna/label/xanchor}\pgf@x
1468 \pgf@y=\ctikzvalof{monopoles/antenna/label/yanchor}\pgf@y
1469 }
1470 \behindforegroundpath{
1471 \pgfstartlinewidth=\pgflinewidth
1472 \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen
1473
1474 % \pgfpathmoveto{\pgfpointorigin}
1475 % \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1476 % \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1477 % \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1478
1479 \pgftransformxshift{ -4\pgf@circ@res@step }
1480
1481 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1482 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1483
1484 \pgfusepath{draw}
1485
1486 \pgfscope
1487 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1488 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1489 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1490 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1491 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1492 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1493 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1494 \pgfusepath{draw}
1495 \endpgfscope
1496 \pgfsetlinewidth{\pgfstartlinewidth}
1497
1498 }
1499 }
1500
1501
1502 \pgfdeclareshape{txantenna}{
1503 \anchor{center}{\pgfpointorigin}
1504 \savedanchor{\northeast}{
1505 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1506 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1507 \pgf@y=6\pgf@circ@res@step
1508 }
1509 \anchor{text}{
1510 \northeast
1511 \pgf@x=\ctikzvalof{monopoles/txantenna/label/xanchor}\pgf@x
1512 \pgf@y=\ctikzvalof{monopoles/txantenna/label/yanchor}\pgf@y
1513 }
1514 \behindforegroundpath{
1515 \pgfstartlinewidth=\pgflinewidth
1516 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1517
1518 \pgfpathmoveto{\pgfpointorigin}
1519 \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1520 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1521 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1522
1523 \pgfusepath{draw}
1524
1525 \pgfscope
1526 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1527 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1528 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1529 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1530 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1531 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1532 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1533 \pgfusepath{draw}
1534 \endpgfscope
1535 \pgfpathmoveto{\pgfpoint{5.5\pgf@circ@res@step}{6\pgf@circ@res@step}}
1536 % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step}
1537 \pgfpatharc{30}{-30}{2\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{6.25\pgf@circ@res@step}}
1538 \pgfpatharc{30}{-30}{2.5\pgf@circ@res@step}
1539 \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.5\pgf@circ@res@step}}
1540 \pgfpatharc{30}{-30}{3\pgf@circ@res@step}
1541 \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.75\pgf@circ@res@step}}
1542 \pgfpatharc{30}{-30}{3.5\pgf@circ@res@step}
1543 \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{7\pgf@circ@res@step}}
1544 \pgfpatharc{30}{-30}{4\pgf@circ@res@step}
1545 \pgfusepath{draw}
1546 \pgfsetlinewidth{\pgfstartlinewidth}
1547
1548 }
1549 }
1550
1551
1552 \pgfdeclareshape{rxantenna}{
1553 \anchor{center}{\pgfpointorigin}
1554 \savedanchor{\northeast}{
1555 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1556 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1557 \pgf@y=6\pgf@circ@res@step
1558 }
1559 \anchor{text}{
1560 \northeast
1561 \pgf@x=\ctikzvalof{monopoles/rxantenna/label/xanchor}\pgf@x
1562 \pgf@y=\ctikzvalof{monopoles/rxantenna/label/yanchor}\pgf@y
1563 }
1564 \behindforegroundpath{
1565 \pgfstartlinewidth=\pgflinewidth
1566 \pgf@circ@res@step=\ctikzvalof{monopoles/rxantenna/width}\pgf@circ@Rlen
1567
1568 \pgfpathmoveto{\pgfpointorigin}
1569 \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1570 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1571 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1572
1573 \pgfusepath{draw}
1574
1575 \pgfscope
1576 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1577 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1578 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1579 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1580 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1581 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1582 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1583 \pgfusepath{draw}
1584 \endpgfscope
1585
1586 \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{7\pgf@circ@res@step}}
1587 % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step}
1588 \pgfpatharc{150}{210}{4\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.75\pgf@circ@res@step}}
1589 \pgfpatharc{150}{210}{3.5\pgf@circ@res@step}
1590 \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.5\pgf@circ@res@step}}
1591 \pgfpatharc{150}{210}{3\pgf@circ@res@step}
1592 \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{6.25\pgf@circ@res@step}}
1593 \pgfpatharc{150}{210}{2.5\pgf@circ@res@step}
1594 \pgfpathmoveto{\pgfpoint{8\pgf@circ@res@step}{6\pgf@circ@res@step}}
1595 \pgfpatharc{150}{210}{2\pgf@circ@res@step}
1596 \pgfusepath{draw}
1597 \pgfsetlinewidth{\pgfstartlinewidth}
1598
1599 }
1600 }
1601
1602 % Vcc
1603 \pgfdeclareshape{vcc}{
1604 \anchor{center}{
1605 \pgfpointorigin
1606 }
1607 \anchor{text}{
1608 \pgf@x=0pt
1609 \pgf@y=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
1610 \pgf@y=2\pgf@y
1611 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
1612 \pgf@x=-.5\wd\pgfnodeparttextbox
1613 }
1614 \behindforegroundpath{
1615 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
1616
1617 \pgfscope
1618 \pgfpathmoveto{\pgfpointorigin}
1619 \pgfpathlineto{\pgfpoint{0pt}{1.5\pgf@circ@res@step}}
1620 \pgfusepath{draw}
1621
1622 \pgfstartlinewidth=\pgflinewidth
1623 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1624
1625 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1626 \pgfpathlineto{\pgfpoint{0}{1.5\pgf@circ@res@step}}
1627 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1628 \pgfusepath{draw}
1629
1630 \pgfsetlinewidth{\pgfstartlinewidth}
1631
1632 \endpgfscope
1633 }
1634
1635 }
1636
1637 % match
1638 \pgfdeclareshape{match}{
1639 \anchor{center}{
1640 \pgfpointorigin
1641 }
1642 \anchor{text}{
1643 \pgf@x=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen
1644 \pgf@x=1.5\pgf@x
1645 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
1646 \pgf@y=-1.5\ht\pgfnodeparttextbox
1647 }
1648 \behindforegroundpath{
1649 \pgf@circ@res@step=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen
1650
1651 \pgfscope
1652 \pgfpathmoveto{\pgfpointorigin}
1653 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0pt}}
1654 \pgfusepath{draw}
1655
1656 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
1657 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
1658 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0}}
1659 \pgfusepath{fill}
1660
1661 \pgfsetlinewidth{\pgfstartlinewidth}
1662
1663 \endpgfscope
1664 }
1665
1666 }
1667
1668 % oscillator
1669 \pgfdeclareshape{oscillator}{
1670 \anchor{center}{
1671 \pgfpointorigin
1672 }
1673 \anchor{north}{
1674 \pgf@x=\ctikzvalof{monopoles/oscillator/width}\pgf@circ@Rlen
1675 \pgf@x=-0.5\pgf@x
1676 \pgf@y=\ctikzvalof{monopoles/oscillator/width}\pgf@circ@Rlen
1677 \pgf@y=0.5\pgf@y
1678 }
1679 \anchor{south}{
1680 \pgf@x=\ctikzvalof{monopoles/oscillator/width}\pgf@circ@Rlen
1681 \pgf@x=-0.5\pgf@x
1682 \pgf@y=\ctikzvalof{monopoles/oscillator/width}\pgf@circ@Rlen
1683 \pgf@y=-0.5\pgf@y
1684 }
1685 \anchor{east}{
1686 \pgfpointorigin
1687 \pgf@x=-\ctikzvalof{monopoles/oscillator/width}\pgf@circ@Rlen
1688 }
1689 \anchor{west}{
1690 \pgfpointorigin
1691 }
1692 \anchor{text}{
1693 \pgf@x=\ctikzvalof{monopoles/oscillator/width}\pgf@circ@Rlen
1694 \pgf@x=-2\pgf@x
1695 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
1696 \pgf@y=-\ctikzvalof{monopoles/oscillator/width}\pgf@circ@Rlen
1697 \advance \pgf@y by -1.5\ht\pgfnodeparttextbox
1698 }
1699 \behindforegroundpath{
1700 \pgf@circ@res@step=\ctikzvalof{monopoles/oscillator/width}\pgf@circ@Rlen
1701 \pgf@circ@res@step=.5\pgf@circ@res@step
1702
1703 \pgfscope
1704 \pgfpathmoveto{\pgfpointorigin}
1705 \pgfstartlinewidth=\pgflinewidth
1706
1707 % draw circle
1708 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1709 \pgfpathcircle{\pgfpoint{-\pgf@circ@res@step}{0}} {\pgf@circ@res@step}
1710 \pgfusepath{draw}
1711
1712 % draw inner sine waves
1713 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
1714 \pgfsetlinewidth{\pgfstartlinewidth}
1715
1716 \pgfpathmoveto{\pgfpoint{-1.5\pgf@circ@res@step}{0\pgf@circ@res@step}}
1717 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
1718 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
1719 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
1720 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
1721 \pgfusepath{draw}
1722
1723 \pgfsetlinewidth{\pgfstartlinewidth}
1724
1725 \endpgfscope
1726 }
1727 }
1728
1729 %%%---------- close: pgfcircmonopoles
1730 %%%%%%%%%%% Springe nach pgfcircbipoles
1731 %%%---------- open: pgfcircbipoles.tex
1732 % Copyright 2007-2009 by Massimo Redaelli
1733 %
1734 % This file may be distributed and/or modified
1735 %
1736 % 1. under the LaTeX Project Public License and/or
1737 % 2. under the GNU Public License.
1738 %
1739 % See the file doc/LICENSE for more details.
1740
1741 %% Generic macro for defining a bipole shape
1742 % #1 - additional anchors
1743 % #2 - lower y-size of the bipole (from the center).
1744 % #3 - #shape is the name of the shape
1745 % #4 - upper y-size of the bipole (from the center)
1746 % #5 - width of the bipole
1747 % #6 - macros drawing the bipole
1748
1749
1750 \long\def\pgfcircdeclarebipole#1#2#3#4#5#6{
1751 \pgfdeclareshape{#3shape}{
1752
1753 \savedanchor{\northeast}{
1754 \pgf@y=#4\pgf@circ@Rlen
1755 \pgf@y=.5\pgf@y
1756 \pgf@x=#5\pgf@circ@Rlen
1757 \pgf@x=.5\pgf@x
1758 }
1759 \savedanchor{\northeastborder}{
1760 \pgf@y=#4\pgf@circ@Rlen
1761 \pgf@y=.5\pgf@y
1762 \pgf@y=\ctikzvalof{bipoles/border margin}\pgf@y
1763 \pgf@x=#5\pgf@circ@Rlen
1764 \pgf@x=.5\pgf@x
1765 \pgf@x=\ctikzvalof{bipoles/border margin}\pgf@x
1766 }
1767 \savedanchor{\southwestborder}{
1768 \pgf@y=-#2\pgf@circ@Rlen
1769 \pgf@y=.5\pgf@y
1770 \pgf@y=\ctikzvalof{bipoles/border margin}\pgf@y
1771 \pgf@x=-#5\pgf@circ@Rlen
1772 \pgf@x=.5\pgf@x
1773 \pgf@x=\ctikzvalof{bipoles/border margin}\pgf@x
1774 }
1775 \savedanchor{\southwest}{
1776 \pgf@y=-#2\pgf@circ@Rlen
1777 \pgf@y=.5\pgf@y
1778 \pgf@x=-#5\pgf@circ@Rlen
1779 \pgf@x=.5\pgf@x
1780 }
1781 \savedanchor{\centerpoint}{
1782 \pgf@circ@res@down=-#2\pgf@circ@Rlen
1783 \pgf@circ@res@up=#4\pgf@circ@Rlen
1784 \pgfpointorigin
1785 \pgf@y=\pgf@circ@res@up
1786 \advance\pgf@y by\pgf@circ@res@down
1787 \pgf@y=.5\pgf@y
1788 }
1789 \anchor{center}{\pgfpointorigin}
1790 \anchor{n}{
1791 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
1792 \pgf@x=0cm
1793 }
1794 \anchor{ne}{
1795 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
1796 }
1797 \anchor{nw}{
1798 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
1799 \pgf@x=-\pgf@x
1800 }
1801 \anchor{e}{%
1802 \ifpgf@circuit@bipole@reversed\else\southwest\northeast\fi
1803 \pgf@y=0cm
1804 }
1805 \anchor{s}{%
1806 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
1807 \pgf@x=0cm
1808 }
1809 \anchor{se}{%
1810 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
1811 \pgf@x=-\pgf@x
1812 }
1813 \anchor{sw}{%
1814 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
1815 }
1816 \anchor{w}{
1817 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
1818 \pgf@y=0cm
1819 }
1820 \anchor{north}{
1821 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
1822 \pgf@x=0cm
1823 }
1824 \anchor{east}{%
1825 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
1826 \pgf@y=0cm
1827 }
1828 \anchor{south}{%
1829 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
1830 \pgf@x=0cm
1831 }
1832 \anchor{west}{
1833 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
1834 \pgf@y=0cm
1835 }
1836 \anchor{right}{
1837 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
1838 \pgf@y=0cm
1839 }
1840 \anchor{above}{
1841 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
1842 \pgf@x=0cm
1843 }
1844 \anchor{left}{%
1845 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
1846 \pgf@y=0cm
1847 }
1848 \anchor{below}{%
1849 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
1850 \pgf@x=0cm
1851 }
1852 \anchor{a}{%
1853 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
1854 \pgf@y=0cm
1855 }
1856 \anchor{b} {
1857 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
1858 \pgf@y=0cm
1859 }
1860 \savedanchor{\textanchor}{%
1861 \pgf@y=\ht\pgfnodeparttextbox
1862 \pgf@x=-.5\wd\pgfnodeparttextbox
1863 }
1864 \anchor{text}{%
1865 \textanchor
1866 }
1867 \anchorborder{%
1868 \def\pgf@temp{false}
1869 \ifpgf@circuit@bipole@reversed\pgf@temp
1870 \pgf@circ@res@left=-\pgf@x
1871 \pgf@circ@res@right=-\pgf@y
1872 \else
1873 \pgf@circ@res@left=\pgf@x
1874 \pgf@circ@res@right=\pgf@y
1875 \fi
1876 \ifdim\pgf@circ@res@right>0cm
1877 \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\northeastborder}
1878 \else
1879 \southwestborder
1880 \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\pgfpoint{-\pgf@x}{-\pgf@y}}
1881 \fi
1882 }
1883
1884 #1
1885
1886 \backgroundpath{
1887 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1888
1889 \northeast
1890 \pgf@circ@res@up = \pgf@y
1891 \pgf@circ@res@zero = 0cm
1892 \pgf@circ@res@left = -\pgf@x
1893 \pgf@circ@res@right = \pgf@x
1894 \southwest
1895 \pgf@circ@res@down = \pgf@y
1896
1897 \pgfstartlinewidth=\pgflinewidth
1898
1899 #6
1900
1901 \pgfsetlinewidth{\pgfstartlinewidth}
1902 }
1903 }
1904 }
1905
1906 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1907 %% Standard bipole shapes declarations
1908
1909 %% Resistor
1910 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/resistor/height}}{resistor}{\ctikzvalof{bipoles/resistor/height}}{\ctikzvalof{bipoles/resistor/width}}{
1911 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
1912 \divide \pgf@circ@res@step by 12
1913
1914 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
1915 \pgf@circ@res@other = \pgf@circ@res@left
1916 \advance\pgf@circ@res@other by \pgf@circ@res@step
1917
1918 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1919 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
1920 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
1921 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
1922 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
1923 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
1924 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
1925 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
1926 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
1927 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
1928 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
1929 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
1930 \advance\pgf@circ@res@other by \pgf@circ@res@step
1931 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
1932 \pgfusepath{draw}
1933 }
1934
1935
1936
1937 %% Variable resistor
1938 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistor/height}}{vresistor}{\ctikzvalof{bipoles/vresistor/height}}{\ctikzvalof{bipoles/vresistor/width}}{
1939 \pgf@circ@res@step = \ctikzvalof{bipoles/vresistor/width}\pgf@circ@Rlen
1940 \divide \pgf@circ@res@step by 12
1941 \def\myfrac{.5}
1942
1943 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1944
1945 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
1946 \pgf@circ@res@other = \pgf@circ@res@left
1947 \advance\pgf@circ@res@other by \pgf@circ@res@step
1948 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@up}}
1949 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
1950 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@down}}
1951 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
1952 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@up}}
1953 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
1954 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@down}}
1955 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
1956 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@up}}
1957 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
1958 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@down}}
1959 \advance\pgf@circ@res@other by \pgf@circ@res@step
1960 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
1961 \pgfusepath{draw}
1962
1963 \pgfscope
1964 \pgfsetarrowsend{latex'}
1965 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@other}{\pgf@circ@res@up}}
1966 \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@other}{\pgf@circ@res@down}}
1967 \pgfusepath{draw}
1968 \endpgfscope
1969 }
1970
1971
1972
1973 %% Capacitor
1974
1975 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/capacitor/height}}{capacitor}{\ctikzvalof{bipoles/capacitor/height}}{\ctikzvalof{bipoles/capacitor/width}}{
1976 \pgf@circ@res@step = \ctikzvalof{bipoles/capacitor/width}\pgf@circ@Rlen
1977 \divide \pgf@circ@res@step by 5
1978
1979 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1980 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
1981 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
1982
1983 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
1984 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
1985 \pgfusepath{draw}
1986 }
1987
1988
1989 %% Polar Capacitor
1990
1991 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pcapacitor/height}}{polarcapacitor}{\ctikzvalof{bipoles/pcapacitor/height}}{\ctikzvalof{bipoles/pcapacitor/width}}{
1992 \pgf@circ@res@step = \ctikzvalof{bipoles/pcapacitor/width}\pgf@circ@Rlen
1993 \divide \pgf@circ@res@step by 5
1994
1995 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1996
1997 \pgfscope
1998 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left+ \ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}{\pgf@circ@res@up}}
1999 \pgftransformrotate{-90}
2000 \pgfpathsine{\pgfpoint{\pgf@circ@res@up}{-\ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}}
2001 \pgfpathcosine{\pgfpoint{\pgf@circ@res@up}{\ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}}
2002 \pgfusepath{draw}
2003 \endpgfscope
2004
2005 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2006 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2007 \pgfusepath{draw}
2008
2009 }
2010
2011 %% Battery
2012
2013 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery/height}}{battery}{\ctikzvalof{bipoles/battery/height}}{\ctikzvalof{bipoles/battery/width}}{
2014 \pgf@circ@res@step = \ctikzvalof{bipoles/battery/width}\pgf@circ@Rlen
2015 \divide \pgf@circ@res@step by 6
2016
2017 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2018 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@up}}
2019 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
2020
2021 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@up}}
2022 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@down}}
2023
2024 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{.5\pgf@circ@res@up}}
2025 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{.5\pgf@circ@res@down}}
2026
2027 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2028 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2029
2030 \pgfusepath{draw}
2031 }
2032
2033
2034 %% Battery 1
2035
2036 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery1/height}}{battery1}{\ctikzvalof{bipoles/battery1/height}}{\ctikzvalof{bipoles/battery1/width}}{
2037 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{0}}
2038 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
2039 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{0}}
2040 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}}
2041 \pgfusepath{draw}
2042
2043 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2044 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@up}}
2045 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@down}}
2046
2047 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@up}}
2048 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@down}}
2049
2050
2051
2052
2053 \pgfusepath{draw}
2054 }
2055
2056
2057
2058 %% cute inductor
2059
2060 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
2061 \pgf@circ@res@step=\ctikzvalof{bipoles/cuteinductor/width}\pgf@circ@Rlen
2062 \divide \pgf@circ@res@step by \ctikzvalof{bipoles/cuteinductor/coils}
2063
2064 \pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/cuteinductor/height}\pgf@circ@Rlen
2065 \pgfdecorationsegmentamplitude=.5\pgfdecorationsegmentamplitude
2066 \pgfdecorationsegmentlength = \pgf@circ@res@step
2067 \pgfdecorationsegmentaspect=.6
2068
2069 \pgfdecoration{{coil}{\pgfdecoratedremainingdistance}}
2070 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2071 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2072 \endpgfdecoration
2073 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2074 \pgfusepath{stroke}
2075 }
2076
2077
2078
2079 %% american inductor
2080
2081 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/americaninductor/height 2}}{americaninductor}{\ctikzvalof{bipoles/americaninductor/height}}{\ctikzvalof{bipoles/americaninductor/width}}{
2082 \pgf@circ@res@step=\ctikzvalof{bipoles/americaninductor/width}\pgf@circ@Rlen
2083 \divide \pgf@circ@res@step by \ctikzvalof{bipoles/americaninductor/coils}
2084
2085 \pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/americaninductor/height}\pgf@circ@Rlen
2086 \pgfdecorationsegmentamplitude=.45\pgfdecorationsegmentamplitude
2087 \pgfdecorationsegmentlength = 1.99\pgf@circ@res@step
2088
2089 \pgfdecoration{{bumps}{\pgfdecoratedremainingdistance}}
2090 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2091 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2092 \endpgfdecoration
2093 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2094 \pgfusepath{stroke}
2095 }
2096
2097
2098
2099
2100
2101 %% Independent voltage source
2102
2103 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsource/height}}{vsource}{\ctikzvalof{bipoles/vsource/height}}{\ctikzvalof{bipoles/vsource/width}}{
2104
2105 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2106
2107 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2108 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2109 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2110 \pgfusepath{draw}
2111 }
2112
2113
2114 %% Independent voltage source - American style
2115
2116 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourceam/height}}{vsourceAM}{\ctikzvalof{bipoles/vsourceam/height}}{\ctikzvalof{bipoles/vsourceam/width}}{
2117
2118 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2119
2120 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2121
2122
2123 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$+$}
2124 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$-$}
2125
2126 \pgfusepath{draw}
2127 }
2128
2129
2130
2131 %% Independent sinusoidal voltage source
2132
2133 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesin/height}}{vsourcesin}{\ctikzvalof{bipoles/vsourcesin/height}}{\ctikzvalof{bipoles/vsourcesin/width}}{
2134
2135 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2136 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2137 \pgfusepath{draw}
2138
2139 \pgf@circ@res@up = .5\pgf@circ@res@up
2140 \pgfscope
2141 \pgftransformrotate{90}
2142 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2143 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2144 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2145 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2146 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2147 \pgfusepath{draw}
2148 \endpgfscope
2149 }
2150
2151
2152
2153
2154 % contributed by Alistair Kwan
2155 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesquare/height}}{vsourcesquare}{\ctikzvalof{bipoles/vsourcesquare/height}}{\ctikzvalof{bipoles/vsourcesquare/width}}{
2156
2157 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2158 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2159 \pgfusepath{draw}
2160
2161 \pgf@circ@res@up = .5\pgf@circ@res@up
2162 \pgfscope
2163 \pgftransformrotate{90}
2164 \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}}
2165 \pgfpathlineto{\pgfpoint{-1\pgf@circ@res@up}{1\pgf@circ@res@up}}
2166 \pgfpathlineto{\pgfpoint{0\pgf@circ@res@up}{1\pgf@circ@res@up}}
2167 \pgfpathlineto{\pgfpoint{0\pgf@circ@res@up}{-1\pgf@circ@res@up}}
2168 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{-1\pgf@circ@res@up}}
2169 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}}
2170 \pgfusepath{draw}
2171 \endpgfscope
2172 }
2173
2174
2175 %% Independent current source
2176
2177 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isource}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
2178 \pgfpointorigin
2179 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2180 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2181 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2182 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
2183 \pgfusepath{draw}
2184 }
2185
2186
2187
2188
2189 %% Independent current source - American
2190
2191 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isourceam/height}}{isourceAM}{\ctikzvalof{bipoles/isourceam/height}}{\ctikzvalof{bipoles/isourceam/width}}{
2192 \pgfpointorigin
2193 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2194 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2195 \pgfusepath{draw}
2196
2197 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2198 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@zero}}
2199 \pgfusepath{draw}
2200 \pgfscope
2201 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2202 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
2203 \endpgfscope
2204 }
2205
2206
2207
2208
2209 %% Independent sinusoidal current source
2210
2211 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isourcesin}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
2212 \pgfpointorigin
2213 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2214 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2215 \pgfusepath{draw}
2216
2217 \pgf@circ@res@up = .5\pgf@circ@res@up
2218 \pgfscope
2219 \pgftransformrotate{90}
2220 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2221 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2222 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2223 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2224 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2225 \pgfusepath{draw}
2226 \endpgfscope
2227
2228 }
2229
2230
2231 %% Controlled voltage source
2232
2233 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsource/height}}{cvsource}{\ctikzvalof{bipoles/cvsource/height}}{\ctikzvalof{bipoles/cvsource/width}}{
2234
2235 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2236
2237 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2238 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2239 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2240 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2241 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2242 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2243 \pgfusepath{draw}
2244 }
2245
2246
2247
2248
2249 %% Controlled voltage source - American
2250
2251 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourceam/height}}{cvsourceAM}{\ctikzvalof{bipoles/cvsourceam/height}}{\ctikzvalof{bipoles/cvsourceam/width}}{
2252
2253 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2254
2255 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2256 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2257 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2258 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2259 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2260 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@left]{$+$}
2261 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@right]{$-$}
2262 \pgfusepath{draw}
2263 }
2264
2265
2266 %% Controlled sinusoidal voltage source
2267
2268 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cvsourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
2269
2270 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2271
2272 \pgfscope
2273 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2274 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2275 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2276 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2277 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2278 \pgfusepath{draw}
2279 \endpgfscope
2280
2281 \pgf@circ@res@up = .5\pgf@circ@res@up
2282 \pgfscope
2283 \pgftransformrotate{90}
2284 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2285 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2286 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2287 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2288 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2289 \pgfusepath{draw}
2290 \endpgfscope
2291 }
2292
2293
2294
2295 %% Controlled sinusoidal current source
2296
2297 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cisourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
2298
2299 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2300
2301 \pgfscope
2302 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2303 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2304 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2305 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2306 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2307 \pgfusepath{draw}
2308 \endpgfscope
2309
2310 \pgf@circ@res@up = .5\pgf@circ@res@up
2311 \pgfscope
2312 \pgftransformrotate{90}
2313 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2314 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2315 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2316 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2317 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2318 \pgfusepath{draw}
2319 \endpgfscope
2320 }
2321
2322
2323
2324
2325 %% Controlled current source
2326
2327 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisource/height}}{cisource}{\ctikzvalof{bipoles/cisource/height}}{\ctikzvalof{bipoles/cisource/width}}{
2328
2329 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2330
2331 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2332 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2333 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2334 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2335 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2336 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2337 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2338 \pgfusepath{draw}
2339 }
2340
2341
2342
2343
2344 %% Controlled current source - American
2345
2346 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisourceam/height}}{cisourceAM}{\ctikzvalof{bipoles/cisourceam/height}}{\ctikzvalof{bipoles/cisourceam/width}}{
2347
2348 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2349
2350 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2351 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2352 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2353 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2354 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2355 \pgfusepath{draw}
2356
2357 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2358 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@zero}}
2359 \pgfusepath{draw}
2360 \pgfscope
2361 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2362 \pgfnode{currarrow}{center}{}{}{\pgfusepath{draw}}
2363 \endpgfscope
2364 }
2365
2366 %% Black generic diode
2367
2368 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulldiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2369
2370 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2371
2372 \pgfscope
2373 \pgftransformxshift{\pgf@circ@res@left}
2374 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2375 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2376 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2377 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2378 \pgfusepath{draw,fill}
2379 \endpgfscope
2380 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2381 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2382 \pgfusepath{draw}
2383 }
2384
2385 %% Black Zener diode
2386
2387 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2388
2389 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2390
2391 \pgfscope
2392 \pgftransformxshift{\pgf@circ@res@left}
2393 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2394 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2395 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2396 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2397 \pgfusepath{draw,fill}
2398 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2399 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2400 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2401 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2402 \pgfusepath{draw}
2403 \endpgfscope
2404 }
2405
2406 %% Black Schottky diode
2407
2408 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullsdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2409
2410 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2411 \pgfscope
2412 \pgftransformxshift{\pgf@circ@res@left}
2413 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2414 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2415 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2416 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2417 \pgfusepath{draw,fill}
2418
2419 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.8\pgf@circ@res@down}}
2420 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
2421 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2422 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2423 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2424 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2425 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.8\pgf@circ@res@up}}
2426 \pgfusepath{draw}
2427 \endpgfscope
2428
2429 }
2430
2431 %% Black tunnel diode
2432
2433 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulltdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2434
2435 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2436 \pgfscope
2437 \pgftransformxshift{\pgf@circ@res@left}
2438 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2439 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2440 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2441 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2442 \pgfusepath{draw,fill}
2443
2444 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
2445 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2446 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2447 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2448 \pgfusepath{draw}
2449 \endpgfscope
2450 }
2451
2452 %% Black light emitting diode
2453
2454 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulllediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2455
2456 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2457 \pgfscope
2458 \pgftransformxshift{\pgf@circ@res@left}
2459 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2460 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2461 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2462 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2463 \pgfusepath{draw,fill}
2464 \endpgfscope
2465 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2466 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2467 \pgfusepath{draw}
2468
2469 \pgfsetlinewidth{\pgfstartlinewidth}
2470 \pgfsetarrowsend{latex'}
2471 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2472 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
2473 \pgfusepath{draw}
2474 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
2475 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
2476 \pgfusepath{draw}
2477
2478 }
2479
2480 %% Black photodiode
2481
2482 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullpdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2483
2484 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2485 \pgfscope
2486 \pgftransformxshift{\pgf@circ@res@left}
2487 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2488 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2489 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2490 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2491 \pgfusepath{draw,fill}
2492 \endpgfscope
2493 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2494 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2495 \pgfusepath{draw}
2496
2497 \pgfsetlinewidth{\pgfstartlinewidth}
2498 \pgfsetarrowsstart{latex'}
2499 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2500 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
2501 \pgfusepath{draw}
2502 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
2503 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
2504 \pgfusepath{draw}
2505 }
2506
2507 %% Black varcap
2508
2509 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{fullvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
2510
2511 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2512 \pgfscope
2513 \pgftransformxshift{\pgf@circ@res@left}
2514 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{0pt}}
2515 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2516 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2517 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{0pt}}
2518 \pgfusepath{draw,fill}
2519
2520 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
2521 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2522 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2523 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2524 \pgfusepath{draw}
2525
2526 \endpgfscope
2527 }
2528
2529 %% Empty generic diode
2530
2531 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptydiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2532
2533
2534 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2535
2536 \pgfscope
2537 \pgftransformxshift{\pgf@circ@res@left}
2538 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2539 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2540 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2541 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2542 \pgfusepath{draw}
2543 \endpgfscope
2544 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2545 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2546 \pgfusepath{draw}
2547 }
2548
2549 %% Empty Zener diode
2550
2551 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2552
2553 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2554
2555 \pgfscope
2556 \pgftransformxshift{\pgf@circ@res@left}
2557 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2558 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2559 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2560 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2561 \pgfusepath{draw}
2562 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2563 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2564 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2565 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2566 \pgfusepath{draw}
2567 \endpgfscope
2568 }
2569
2570 %% Empty Schottky diode
2571
2572 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptysdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2573
2574 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2575 \pgfscope
2576 \pgftransformxshift{\pgf@circ@res@left}
2577 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2578 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2579 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2580 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2581 \pgfusepath{draw}
2582
2583 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.8\pgf@circ@res@down}}
2584 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
2585 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2586 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2587 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2588 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2589 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.8\pgf@circ@res@up}}
2590 \pgfusepath{draw}
2591 \endpgfscope
2592
2593 }
2594
2595 %% Empty tunnel diode
2596
2597 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptytdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2598
2599 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2600 \pgfscope
2601 \pgftransformxshift{\pgf@circ@res@left}
2602 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2603 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2604 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2605 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2606 \pgfusepath{draw}
2607
2608 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
2609 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2610 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2611 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2612 \pgfusepath{draw}
2613 \endpgfscope
2614 }
2615
2616 %% Empty light emitting diode
2617
2618 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptylediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2619
2620 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2621 \pgfscope
2622 \pgftransformxshift{\pgf@circ@res@left}
2623 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2624 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2625 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2626 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2627 \pgfusepath{draw}
2628 \endpgfscope
2629 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2630 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2631 \pgfusepath{draw}
2632
2633 \pgfsetlinewidth{\pgfstartlinewidth}
2634 \pgfsetarrowsend{latex'}
2635 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2636 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
2637 \pgfusepath{draw}
2638 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
2639 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
2640 \pgfusepath{draw}
2641 }
2642
2643 %% Empty photodiode
2644
2645 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptypdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2646
2647 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2648 \pgfscope
2649 \pgftransformxshift{\pgf@circ@res@left}
2650 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2651 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2652 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2653 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2654 \pgfusepath{draw}
2655 \endpgfscope
2656 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2657 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2658 \pgfusepath{draw}
2659
2660 \pgfsetlinewidth{\pgfstartlinewidth}
2661 \pgfsetarrowsstart{latex'}
2662 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2663 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
2664 \pgfusepath{draw}
2665 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
2666 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
2667 \pgfusepath{draw}
2668 }
2669
2670 %% Empty varcap
2671
2672 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{emptyvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
2673
2674 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2675 \pgfscope
2676 \pgftransformxshift{\pgf@circ@res@left}
2677 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{0pt}}
2678 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2679 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2680 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{0pt}}
2681 \pgfusepath{draw}
2682
2683 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
2684 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
2685 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
2686 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
2687 \pgfusepath{draw}
2688
2689 \endpgfscope
2690 }
2691
2692 %% Closing SPST
2693
2694 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{cspst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
2695
2696 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2697
2698 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
2699 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
2700 \pgfpathmoveto{\pgfpoint{.9\pgf@circ@res@left}{.9\pgf@circ@res@up}}
2701 \pgfpatharc{65}{25}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf@circ@Rlen}
2702 %\pgfsetarrowsend{latex'}
2703 \pgfusepath{draw}
2704
2705 \pgfpathmoveto{\pgfpoint{.1\pgf@circ@res@right}{-.25\pgf@circ@res@up}}
2706 \pgfpathlineto{\pgfpoint{.14\pgf@circ@res@right}{-.35\pgf@circ@res@up}}
2707 \pgfsetarrowsend{latex'}
2708 \pgfusepath{draw}
2709
2710 }
2711
2712 %% Opening SPST
2713
2714 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{ospst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
2715
2716 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2717
2718 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
2719 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
2720 \pgfpathmoveto{\pgfpoint{.3\pgf@circ@res@right}{.1\pgf@circ@res@down}}
2721 \pgfpatharc{15}{50}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf@circ@Rlen}
2722 %\pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
2723 \pgfusepath{draw}
2724
2725 \pgfpathmoveto{\pgfpoint{.85\pgf@circ@res@left}{1.25\pgf@circ@res@up}}
2726 \pgfpathlineto{\pgfpoint{.87\pgf@circ@res@left}{1.26\pgf@circ@res@up}}
2727 \pgfsetarrowsend{latex'}
2728 \pgfusepath{draw}
2729
2730
2731 }
2732
2733
2734 %% Push Button
2735
2736 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pushbutton/height 2}}{pushbutton}{\ctikzvalof{bipoles/pushbutton/height}}{\ctikzvalof{bipoles/pushbutton/width}}{
2737
2738 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2739 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@up}}
2740 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}
2741 \pgfpathmoveto{\pgfpoint{0}{.5\pgf@circ@res@up}}
2742 \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@up}}
2743 \pgfusepath{draw}
2744
2745 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
2746 \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
2747 \pgftransformshift{\pgfpoint{2\pgf@circ@res@right}{0pt}}
2748 \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
2749 }
2750
2751
2752 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2753
2754 %% Ammeter
2755
2756 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ammeter/height}}{ammeter}{\ctikzvalof{bipoles/ammeter/height}}{\ctikzvalof{bipoles/ammeter/width}}{
2757 \def\pgf@circ@temp{right}
2758 \ifx\tikz@res@label@pos\pgf@circ@temp
2759 \pgf@circ@res@step=-1.2\pgf@circ@res@up
2760 \else
2761 \def\pgf@circ@temp{below}
2762 \ifx\tikz@res@label@pos\pgf@circ@temp
2763 \pgf@circ@res@step=-1.2\pgf@circ@res@up
2764 \else
2765 \pgf@circ@res@step=1.2\pgf@circ@res@up
2766 \fi
2767 \fi
2768
2769 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2770 \pgfpointorigin \pgf@circ@res@other = \pgf@x \advance \pgf@circ@res@other by -\pgf@circ@res@up
2771 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
2772 \pgfusepath{draw}
2773
2774 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2775
2776 \pgfscope
2777 \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
2778 \pgfusepath{draw}
2779 \endpgfscope
2780
2781 \pgfsetlinewidth{\pgfstartlinewidth}
2782
2783 \pgfsetarrowsend{latex}
2784 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2785 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
2786 \pgfusepath{draw}
2787 \pgfsetarrowsend{}
2788
2789
2790 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@zero}}
2791 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2792 \pgfusepath{draw}
2793
2794 \pgfnode{circle}{center}{\textbf{A}}{}{}
2795 }
2796
2797 %% Voltmeter
2798
2799 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/voltmeter/height}}{voltmeter}{\ctikzvalof{bipoles/voltmeter/height}}{\ctikzvalof{bipoles/voltmeter/width}}{
2800 \def\pgf@circ@temp{right}
2801 \ifx\tikz@res@label@pos\pgf@circ@temp
2802 \pgf@circ@res@step=-1.2\pgf@circ@res@up
2803 \else
2804 \def\pgf@circ@temp{below}
2805 \ifx\tikz@res@label@pos\pgf@circ@temp
2806 \pgf@circ@res@step=-1.2\pgf@circ@res@up
2807 \else
2808 \pgf@circ@res@step=1.2\pgf@circ@res@up
2809 \fi
2810 \fi
2811
2812 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2813 \pgfpointorigin \pgf@circ@res@other = \pgf@x \advance \pgf@circ@res@other by -\pgf@circ@res@up
2814 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
2815 \pgfusepath{draw}
2816
2817 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2818
2819 \pgfscope
2820 \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
2821 \pgfusepath{draw}
2822 \endpgfscope
2823
2824 \pgfsetlinewidth{\pgfstartlinewidth}
2825
2826 \pgfsetarrowsend{latex}
2827 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2828 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
2829 \pgfusepath{draw}
2830 \pgfsetarrowsend{}
2831
2832
2833 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@zero}}
2834 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2835 \pgfusepath{draw}
2836
2837 \pgfnode{circle}{center}{\textbf{V}}{}{}
2838
2839 }
2840
2841 %% Short circuit
2842
2843 \pgfcircdeclarebipole{}{0}{short}{0}{0}{ }
2844
2845 %% Open circuit
2846
2847 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/open/height}}{open}{\ctikzvalof{bipoles/open/height}}{\ctikzvalof{bipoles/open/width}}{
2848
2849 }
2850
2851 %% Generic bipole - used as resistor by some (bleah)
2852
2853 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/generic/height}}{generic}{\ctikzvalof{bipoles/generic/height}}{\ctikzvalof{bipoles/generic/width}}{
2854
2855 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
2856 %\divide \pgf@circ@res@step by 14
2857
2858 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2859 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2860
2861 \pgfusepath{draw}
2862 }
2863
2864
2865 %% fuse
2866
2867 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fuse/height}}{fuse}{\ctikzvalof{bipoles/fuse/height}}{\ctikzvalof{bipoles/fuse/width}}{
2868
2869 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
2870 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
2871 \pgfusepath{draw}
2872
2873 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2874 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2875
2876 \pgfusepath{draw}
2877 }
2878
2879
2880
2881 %% Generic bipole, filled - used as inductor by some (bleah)
2882
2883 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fullgeneric/height}}{fullgeneric}{\ctikzvalof{bipoles/fullgeneric/height}}{\ctikzvalof{bipoles/fullgeneric/width}}{
2884
2885 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
2886 %\divide \pgf@circ@res@step by 14
2887
2888 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2889 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2890
2891 \pgfusepath{draw,fill}
2892 }
2893
2894
2895 %% Generic asymmetric bipole
2896
2897 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ageneric/height}}{ageneric}{\ctikzvalof{bipoles/ageneric/height}}{\ctikzvalof{bipoles/ageneric/width}}{
2898 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
2899 %\divide \pgf@circ@res@step by 14
2900
2901 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2902 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2903
2904 \pgfusepath{draw}
2905
2906 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2907 \pgfusepath{stroke,fill}
2908 }
2909
2910
2911 %% asymmetric fuse
2912
2913 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/afuse/height}}{afuse}{\ctikzvalof{bipoles/afuse/height}}{\ctikzvalof{bipoles/afuse/width}}{
2914
2915 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
2916 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
2917 \pgfusepath{draw}
2918
2919 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2920 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2921
2922 \pgfusepath{draw}
2923
2924 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2925 \pgfusepath{stroke,fill}
2926 }
2927
2928
2929
2930
2931 %% Memristor
2932
2933 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/memristor/height}}{memristor}{\ctikzvalof{bipoles/memristor/height}}{\ctikzvalof{bipoles/memristor/width}}{
2934 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
2935 \divide \pgf@circ@res@step by 14
2936
2937 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2938 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2939
2940 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
2941 \pgfpathlineto{\pgfpoint{.72*\pgf@circ@res@left}{0pt}}
2942 \pgfpathlineto{\pgfpoint{.72*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
2943 \pgfpathlineto{\pgfpoint{.35*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
2944 \pgfpathlineto{\pgfpoint{.35*\pgf@circ@res@left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
2945 \pgfpathlineto{\pgfpoint{-.05*\pgf@circ@res@left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
2946 \pgfpathlineto{\pgfpoint{-.05*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
2947 \pgfpathlineto{\pgfpoint{.42*\pgf@circ@res@right}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
2948 \pgfpathlineto{\pgfpoint{.42*\pgf@circ@res@right}{0pt}}
2949 \pgfpathlineto{\pgfpoint{.8*\pgf@circ@res@right}{0pt}}
2950
2951 \pgfusepath{draw}
2952
2953 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2954 \pgfusepath{stroke,fill}
2955 }
2956
2957
2958
2959
2960 %% Generic empty tunable
2961
2962 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tgeneric/height}}{tgeneric}{\ctikzvalof{bipoles/tgeneric/height}}{\ctikzvalof{bipoles/tgeneric/width}}{
2963 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}}
2964 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2965 \pgfusepath{draw}
2966
2967 \pgfscope
2968 \pgfsetarrowsend{latex'}
2969 \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}}
2970 \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}}
2971 \pgfusepath{draw}
2972 \endpgfscope
2973 }
2974
2975 %% Photoresistor
2976
2977 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/photoresistor/height 2}}{photoresistor}{\ctikzvalof{bipoles/photoresistor/height}}{\ctikzvalof{bipoles/photoresistor/width}}{
2978 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@down}}
2979 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2980 \pgfusepath{draw}
2981
2982 \pgfscope
2983 \pgfsetarrowsend{latex'}
2984 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}
2985 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{-1.2\pgf@circ@res@down}}
2986 \pgfusepath{draw}
2987 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@right}{\pgf@circ@res@up}}
2988 \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@right}{-1.2\pgf@circ@res@down}}
2989 \pgfusepath{draw}
2990 \endpgfscope
2991 }
2992
2993
2994
2995
2996 %% Thermistor
2997 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistor/height}}{thermistor}{\ctikzvalof{bipoles/thermistor/height}}{\ctikzvalof{bipoles/thermistor/width}}{
2998 \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}}
2999 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3000 \pgfusepath{draw}
3001
3002 %\pgfscope
3003 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}}
3004 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
3005 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3006 \pgfusepath{draw}
3007 %\endpgfscope
3008 }
3009
3010
3011 %% Thermistor PTC
3012 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorptc/height 2}}{thermistorptc}{\ctikzvalof{bipoles/thermistorptc/height}}{\ctikzvalof{bipoles/thermistorptc/width}}{
3013 \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}}
3014 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3015 \pgfusepath{draw}
3016
3017 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3018 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}}
3019 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
3020 \pgfusepath{draw}
3021
3022 \pgfsetlinewidth{\pgfstartlinewidth}
3023 \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$}
3024 \pgfsetarrowsend{latex'}
3025 \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}}
3026 \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3027 \pgfusepath{draw}
3028 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}}
3029 \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3030 \pgfusepath{draw}
3031 }
3032
3033 %% Thermistor NTC
3034 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorntc/height 2}}{thermistorntc}{\ctikzvalof{bipoles/thermistorntc/height}}{\ctikzvalof{bipoles/thermistorntc/width}}{
3035 \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}}
3036 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3037 \pgfusepath{draw}
3038
3039 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3040 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}}
3041 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
3042 \pgfusepath{draw}
3043
3044 \pgfsetlinewidth{\pgfstartlinewidth}
3045 \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$}
3046 \pgfsetarrowsend{latex'}
3047 \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}}
3048 \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3049 \pgfusepath{draw}
3050 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3051 \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}}
3052 \pgfusepath{draw}
3053 }
3054
3055 %% thermocouple
3056 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermocouple/height 2}}{thermocouple}{\ctikzvalof{bipoles/thermocouple/height}}{\ctikzvalof{bipoles/thermocouple/width}}{
3057
3058 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
3059 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
3060 \pgfusepath{draw}
3061 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
3062 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3063 \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@down}}
3064 \pgfusepath{draw}
3065 \pgfsetlinewidth{\pgfstartlinewidth}
3066 \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@down}}
3067 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}
3068 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
3069 \pgfusepath{draw}
3070 }
3071
3072 %% Varistor
3073 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varistor/height}}{varistor}{\ctikzvalof{bipoles/varistor/height}}{\ctikzvalof{bipoles/varistor/width}}{
3074 \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}}
3075 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3076 \pgfusepath{draw}
3077
3078 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}}
3079 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
3080 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3081 \pgfusepath{draw}
3082
3083 \pgftext[top,x=.65\pgf@circ@res@left,y=1.2\pgf@circ@res@down]{{\tiny\textsf{U}}}
3084 }
3085
3086
3087
3088 %% Generic full tunable
3089
3090 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tfullgeneric/height}}{tfullgeneric}{\ctikzvalof{bipoles/tfullgeneric/height}}{\ctikzvalof{bipoles/tfullgeneric/width}}{
3091 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3092 \divide \pgf@circ@res@step by 14
3093
3094 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}}
3095 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3096 \pgfusepath{draw,fill}
3097
3098 \pgfscope
3099 \pgfsetarrowsend{latex'}
3100 \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}}
3101 \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}}
3102 \pgfusepath{draw}
3103 \endpgfscope
3104 }
3105
3106
3107 %% Variable Cute Inductor
3108
3109 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcuteinductor/height}}{vcuteinductor}{\ctikzvalof{bipoles/vcuteinductor/height}}{\ctikzvalof{bipoles/vcuteinductor/width}}{
3110 \pgf@circ@res@step=\ctikzvalof{bipoles/vcuteinductor/width}\pgf@circ@Rlen
3111 \divide \pgf@circ@res@step by \ctikzvalof{bipoles/vcuteinductor/coils}
3112
3113 \pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/vcuteinductor/coil height}\pgf@circ@Rlen
3114 \pgfdecorationsegmentamplitude=.5\pgfdecorationsegmentamplitude
3115 \pgfdecorationsegmentlength = \pgf@circ@res@step
3116 \pgfdecorationsegmentaspect=.6
3117
3118 \pgfdecoration{{coil}{\pgfdecoratedremainingdistance}}
3119 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3120 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
3121 \endpgfdecoration
3122 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3123 \pgfusepath{stroke}
3124
3125 \pgfscope
3126 \pgfsetarrowsend{latex'}
3127 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@up}}
3128 \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@down}}
3129 \pgfusepath{draw}
3130 \endpgfscope
3131 }
3132
3133
3134 %% variable american inductor
3135
3136 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{
3137 \pgf@circ@res@step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf@circ@Rlen
3138 \divide \pgf@circ@res@step by \ctikzvalof{bipoles/vamericaninductor/coils}
3139
3140 \pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/vamericaninductor/height}\pgf@circ@Rlen
3141 \pgfdecorationsegmentamplitude=.45\pgfdecorationsegmentamplitude
3142 \pgfdecorationsegmentamplitude=.45\pgfdecorationsegmentamplitude % per freccia
3143 \pgfdecorationsegmentlength = 1.99\pgf@circ@res@step
3144
3145 \pgfdecoration{{bumps}{\pgfdecoratedremainingdistance}}
3146 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3147 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
3148 \endpgfdecoration
3149 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3150 \pgfusepath{stroke}
3151
3152 \pgfscope
3153 \pgfsetarrowsend{latex'}
3154 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
3155 \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@up}}
3156 \pgfusepath{draw}
3157 \endpgfscope
3158 }
3159
3160
3161
3162
3163 %% Variable Capacitor
3164
3165 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcapacitor/height}}{vcapacitor}{\ctikzvalof{bipoles/vcapacitor/height}}{\ctikzvalof{bipoles/vcapacitor/width}}{
3166 %\pgf@circ@res@step = \ctikzvalof{bipoles/vcapacitor/width}\pgf@circ@Rlen
3167 \pgf@circ@res@step = \ctikzvalof{bipoles/vcapacitor/capacitor width} \pgf@circ@res@right
3168
3169 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3170 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@up}}
3171 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@down}}
3172
3173 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
3174 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
3175 \pgfusepath{draw}
3176
3177 \pgfscope
3178 \pgfsetarrowsend{latex'}
3179 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3180 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3181 \pgfusepath{draw}
3182 \endpgfscope
3183
3184 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3185 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
3186 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3187 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3188 \pgfsetlinewidth{\pgfstartlinewidth}
3189 \pgfusepath{draw}
3190 }
3191
3192 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3193 %% Handling of terminals
3194
3195
3196 %% Easily usable styles
3197
3198 \ctikzset{*-/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=none}}
3199 \ctikzset{*-o/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=empty}}
3200 \ctikzset{*-*/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=full}}
3201 \ctikzset{o-/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=none}}
3202 \ctikzset{o-o/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=empty}}
3203 \ctikzset{o-*/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=full}}
3204 \ctikzset{-o/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=empty}}
3205 \ctikzset{-*/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=full}}
3206
3207 \tikzset{reversed/.style = {\circuitikzbasekey/bipole/reversed=true}}
3208
3209
3210 %% The output routine
3211
3212 \def\drawpoles{
3213 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{empty} }
3214 \ifx\pgf@temp\pgf@circ@temp
3215 { (\tikztostart) node[ocirc] {} }
3216 \else
3217 \pgfextra{ \def\pgf@temp{full} }
3218 \ifx\pgf@temp\pgf@circ@temp
3219 { (\tikztostart) node[circ] {} }
3220 \fi
3221 \fi
3222 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{empty} }
3223 \ifx\pgf@temp\pgf@circ@temp
3224 { (\tikztotarget) node[ocirc] {} }
3225 \else
3226 \pgfextra{ \def\pgf@temp{full} }
3227 \ifx\pgf@temp\pgf@circ@temp
3228 { (\tikztotarget) node[circ] {} }
3229 \fi
3230 \fi
3231 }
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252 %% Lamp
3253
3254 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lamp/height}}{lamp}{\ctikzvalof{bipoles/lamp/height}}{\ctikzvalof{bipoles/lamp/width}}{
3255
3256 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3257
3258 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
3259 \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@up}}
3260 \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@down}}
3261 \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@down}}
3262 \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@up}}
3263 \pgfusepath{draw}
3264 }
3265
3266
3267 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tline/height}
3268 }{tline}{\ctikzvalof{bipoles/tline/height}
3269 }{\ctikzvalof{bipoles/tline/width}
3270 }
3271 {
3272 \pgf@circ@res@step=.2\pgf@circ@res@right % half x axis
3273 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3274 \pgfpathellipse{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{0}}
3275 {\pgfpoint{\pgf@circ@res@step}{0}}
3276 {\pgfpoint{0}{-\pgf@circ@res@up}}
3277 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@up}}
3278 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@step}{\pgf@circ@res@up}}
3279 \pgfpatharc{-90}{90}{-\pgf@circ@res@step and -\pgf@circ@res@up}
3280 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@down}}
3281 \pgfusepath{draw}
3282 }
3283
3284
3285
3286
3287 %% SQUID added by Cor Molenaar 5 March 2010
3288
3289 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/squid/height}}{squid}{\ctikzvalof{bipoles/squid/height}}{\ctikzvalof{bipoles/squid/width}}{
3290
3291 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3292
3293 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
3294 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{1.35*\pgf@circ@res@up}}
3295 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.65*\pgf@circ@res@up}}
3296 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.65*\pgf@circ@res@up}}
3297 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{1.35*\pgf@circ@res@up}}
3298 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{1.35*\pgf@circ@res@down}}
3299 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.65*\pgf@circ@res@down}}
3300 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.65*\pgf@circ@res@down}}
3301 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{1.35*\pgf@circ@res@down}}
3302
3303 \pgfusepath{draw}
3304 }
3305
3306
3307
3308 % Generic barrier added by Cor Molenaar 5 March 2010
3309
3310 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/barrier/height}}{barrier}{\ctikzvalof{bipoles/barrier/height}}{\ctikzvalof{bipoles/barrier/width}}{
3311
3312 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3313
3314 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@step}}
3315 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@step}}
3316 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@up}}
3317 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@down}}
3318 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@down}}
3319 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@up}}
3320
3321 \pgfusepath{draw}
3322 }
3323
3324
3325 % Contributed by Danilo Piazzalunga
3326
3327 \pgfdeclareshape{buffer}
3328 {
3329 \anchor{center}{\pgfpointorigin}
3330 \savedanchor\northwest{%
3331 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3332 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/height}\pgf@y
3333 \pgf@y=.5\pgf@y
3334 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3335 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/width}\pgf@x
3336 \pgf@x=.5\pgf@x
3337 }
3338 \anchor{south}{
3339 \northwest
3340 \pgf@y=-\pgf@y
3341 }
3342 \savedanchor\left{%
3343 \pgf@y=0pt
3344 }
3345 \anchor{in}{
3346 \northwest
3347 \pgf@y=0pt
3348 }
3349 \anchor{out}{
3350 \northwest
3351 \pgf@y=0pt
3352 \pgf@x=-\pgf@x
3353 }
3354
3355 \backgroundpath{
3356 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
3357
3358
3359 \northwest
3360 \pgf@circ@res@up = \pgf@y
3361 \pgf@circ@res@down = -\pgf@y
3362 \pgf@circ@res@right = -\pgf@x
3363 \pgf@circ@res@left = \pgf@x
3364
3365 \pgfscope
3366 \pgfsetlinewidth{2\pgflinewidth}
3367 \pgftransformxshift{.7\pgf@circ@res@left}
3368 \pgf@circ@res@step=\pgf@circ@res@right
3369 \advance\pgf@circ@res@step by -\pgf@circ@res@left
3370 \pgf@circ@res@step=.7\pgf@circ@res@step
3371
3372 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3373 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3374 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3375 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3376 \pgfusepath{draw}
3377 \endpgfscope
3378
3379 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3380 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
3381
3382 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3383 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
3384
3385 \pgfusepath{draw}
3386
3387 }
3388 }
3389
3390
3391
3392
3393
3394 \pgfdeclareshape{plain amp}
3395 {
3396 \anchor{center}{\pgfpointorigin}
3397 \savedanchor\northwest{%
3398 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3399 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@y
3400 \pgf@y=.5\pgf@y
3401 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3402 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@x
3403 \pgf@x=.5\pgf@x
3404 }
3405 \anchor{south}{
3406 \northwest
3407 \pgf@y=-\pgf@y
3408 }
3409 \savedanchor\left{%
3410 \pgf@y=0pt
3411 }
3412 \savedanchor\inOne{%
3413 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3414 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@y
3415 \pgf@y=.5\pgf@y
3416 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@y
3417 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3418 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@x
3419 \pgf@x=.5\pgf@x
3420 }
3421 \anchor{-}{
3422 \inOne
3423 }
3424 \anchor{+}{
3425 \inOne
3426 \pgf@y=-\pgf@y
3427 }
3428 \savedanchor\up{%
3429 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3430 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@y
3431 \pgf@y=.5\pgf@y
3432 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
3433 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@x
3434 \pgf@x=.5\pgf@x
3435 \pgf@circ@res@up = \pgf@y
3436 \pgf@circ@res@right = -\pgf@x
3437 \pgf@circ@res@left = \pgf@x
3438 \pgfpointlineattime{
3439 \pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/up pos}}{
3440 \pgfpoint{
3441 \pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
3442 {\pgf@circ@res@up}}
3443 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
3444 }
3445 \anchor{up}{
3446 \up
3447 }
3448 \anchor{down}{
3449 \up
3450 \pgf@y=-\pgf@y
3451 }
3452 \anchor{out}{
3453 \northwest
3454 \pgf@y=0pt
3455 \pgf@x=-\pgf@x
3456 }
3457
3458 \backgroundpath{
3459 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
3460
3461
3462 \northwest
3463 \pgf@circ@res@up = \pgf@y
3464 \pgf@circ@res@down = -\pgf@y
3465 \pgf@circ@res@right = -\pgf@x
3466 \pgf@circ@res@left = \pgf@x
3467
3468 \pgfpathmoveto{\pgfpoint
3469 {\pgf@circ@res@left}
3470 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@up}}
3471 \pgfpathlineto{\pgfpoint
3472 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
3473 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@up}}
3474
3475
3476 \pgfpathmoveto{\pgfpoint
3477 {\pgf@circ@res@left}
3478 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@down}}
3479 \pgfpathlineto{\pgfpoint
3480 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
3481 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@down}}
3482
3483 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3484 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
3485
3486 \pgfusepath{draw}
3487
3488
3489 \pgfscope
3490 \pgfsetlinewidth{2\pgflinewidth}
3491 \pgftransformxshift{.7\pgf@circ@res@left}
3492 \pgf@circ@res@step=\pgf@circ@res@right
3493 \advance\pgf@circ@res@step by -\pgf@circ@res@left
3494 \pgf@circ@res@step=.7\pgf@circ@res@step
3495
3496 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3497 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3498 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3499 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3500 \pgfusepath{draw}
3501 \endpgfscope
3502
3503
3504
3505 }
3506 }
3507
3508 %% Generic two port box
3509 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/twoport/height}}{twoport}{\ctikzvalof{bipoles/twoport/height}}{\ctikzvalof{bipoles/twoport/width}}{
3510 \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@Rlen
3511 \divide \pgf@circ@res@step by 2
3512
3513 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3514 \pgf@circ@res@other = \pgf@circ@res@left
3515 \advance\pgf@circ@res@other by \pgf@circ@res@step
3516
3517 % draw outer box
3518 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3519 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3520 \pgfusepath{draw}
3521
3522 \ifpgf@circuit@inputarrow
3523 {
3524 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3525 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3526 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
3527 }
3528 \fi
3529
3530 % rotate inner symbol
3531 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
3532 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
3533 \pgftransformrotate{270}
3534 \fi\fi
3535 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
3536 \pgftransformrotate{180}
3537 \fi\fi
3538 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
3539 \pgftransformrotate{90}
3540 \fi\fi
3541
3542 % draw inner symbol
3543 \pgftext[center,x=0,y=0]{\ctikzvalof{bipoles/twoport/text}}
3544
3545 }
3546
3547 %% voltage controled oscillator
3548 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vco/width}}{vco}{\ctikzvalof{bipoles/twoport/width}}{\ctikzvalof{bipoles/vco/width}}{
3549 \pgf@circ@res@step = \ctikzvalof{bipoles/vco/width}\pgf@circ@Rlen
3550 \divide \pgf@circ@res@step by 2
3551
3552 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3553 \pgf@circ@res@other = \pgf@circ@res@left
3554 \advance\pgf@circ@res@other by \pgf@circ@res@step
3555
3556 % draw circle
3557 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3558 \pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@step}
3559 \pgfusepath{draw}
3560
3561 \ifpgf@circuit@inputarrow
3562 {
3563 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3564 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3565 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
3566 }
3567 \fi
3568
3569 % rotate inner symbol
3570 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
3571 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
3572 \pgftransformrotate{270}
3573 \fi\fi
3574 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
3575 \pgftransformrotate{180}
3576 \fi\fi
3577 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
3578 \pgftransformrotate{90}
3579 \fi\fi
3580
3581 % draw inner sine waves
3582 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
3583 \pgfsetlinewidth{\pgfstartlinewidth}
3584 \pgfpathmoveto{\pgfpoint{-.5\pgf@circ@res@step}{0\pgf@circ@res@step}}
3585 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3586 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3587 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3588 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3589 \pgfusepath{draw}
3590
3591 }
3592
3593 %% bandpass filter
3594 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/bandpass/width}}{bandpass}{\ctikzvalof{bipoles/bandpass/width}}{\ctikzvalof{bipoles/bandpass/width}}{
3595
3596 \pgf@circ@res@step = \ctikzvalof{bipoles/bandpass/width}\pgf@circ@Rlen
3597 \divide \pgf@circ@res@step by 2
3598
3599 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3600 \pgf@circ@res@other = \pgf@circ@res@left
3601 \advance\pgf@circ@res@other by \pgf@circ@res@step
3602
3603 % draw outer box
3604 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3605 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3606 \pgfusepath{draw}
3607
3608 \ifpgf@circuit@inputarrow
3609 {
3610 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3611 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3612 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
3613 }
3614 \fi
3615
3616 % rotate inner symbol
3617 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
3618 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
3619 \pgftransformrotate{270}
3620 \fi\fi
3621 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
3622 \pgftransformrotate{180}
3623 \fi\fi
3624 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
3625 \pgftransformrotate{90}
3626 \fi\fi
3627
3628 % draw inner symbol
3629 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
3630 \pgfsetlinewidth{\pgfstartlinewidth}
3631 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
3632 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3633 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3634 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3635 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3636 \pgfusepath{draw}
3637 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{0.35\pgf@circ@res@step}}
3638 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}}
3639 \pgfusepath{draw}
3640
3641 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
3642 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3643 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3644 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3645 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3646 \pgfusepath{draw}
3647
3648 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
3649 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3650 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3651 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3652 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3653 \pgfusepath{draw}
3654 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}}
3655 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
3656 \pgfusepath{draw}
3657 }
3658
3659 %% highpass filter
3660 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/highpass/width}}{highpass}{\ctikzvalof{bipoles/highpass/width}}{\ctikzvalof{bipoles/highpass/width}}{
3661 \pgf@circ@res@step = \ctikzvalof{bipoles/highpass/width}\pgf@circ@Rlen
3662 \divide \pgf@circ@res@step by 2
3663
3664 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3665 \pgf@circ@res@other = \pgf@circ@res@left
3666 \advance\pgf@circ@res@other by \pgf@circ@res@step
3667
3668 % draw outer box
3669 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3670 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3671 \pgfusepath{draw}
3672
3673 \ifpgf@circuit@inputarrow
3674 {
3675 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3676 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3677 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
3678 }
3679 \fi
3680
3681 % rotate inner symbol
3682 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
3683 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
3684 \pgftransformrotate{270}
3685 \fi\fi
3686 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
3687 \pgftransformrotate{180}
3688 \fi\fi
3689 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
3690 \pgftransformrotate{90}
3691 \fi\fi
3692
3693 % draw inner symbol
3694 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
3695 \pgfsetlinewidth{\pgfstartlinewidth}
3696 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
3697 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3698 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3699 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3700 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3701 \pgfusepath{draw}
3702
3703 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
3704 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3705 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3706 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3707 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3708 \pgfusepath{draw}
3709 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
3710 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
3711 \pgfusepath{draw}
3712
3713 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
3714 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3715 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3716 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3717 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3718 \pgfusepath{draw}
3719 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}}
3720 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
3721 \pgfusepath{draw}
3722 }
3723
3724 %% lowpass filter
3725 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lowpass/width}}{lowpass}{\ctikzvalof{bipoles/lowpass/width}}{\ctikzvalof{bipoles/lowpass/width}}{
3726 \pgf@circ@res@step = \ctikzvalof{bipoles/lowpass/width}\pgf@circ@Rlen
3727 \divide \pgf@circ@res@step by 2
3728
3729 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3730 \pgf@circ@res@other = \pgf@circ@res@left
3731 \advance\pgf@circ@res@other by \pgf@circ@res@step
3732
3733 % draw outer box
3734 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3735 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3736 \pgfusepath{draw}
3737
3738 \ifpgf@circuit@inputarrow
3739 {
3740 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3741 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3742 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
3743 }
3744 \fi
3745
3746 % rotate inner symbol
3747 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
3748 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
3749 \pgftransformrotate{270}
3750 \fi\fi
3751 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
3752 \pgftransformrotate{180}
3753 \fi\fi
3754 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
3755 \pgftransformrotate{90}
3756 \fi\fi
3757
3758 % draw inner symbol
3759 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
3760 \pgfsetlinewidth{\pgfstartlinewidth}
3761 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
3762 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3763 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3764 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3765 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3766 \pgfusepath{draw}
3767 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{0.35\pgf@circ@res@step}}
3768 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}}
3769 \pgfusepath{draw}
3770
3771 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
3772 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3773 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3774 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3775 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3776 \pgfusepath{draw}
3777 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
3778 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
3779 \pgfusepath{draw}
3780
3781 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
3782 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3783 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3784 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
3785 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
3786 \pgfusepath{draw}
3787 }
3788
3789 %% ADC
3790 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/adc/width}}{adc}{\ctikzvalof{bipoles/adc/width}}{\ctikzvalof{bipoles/adc/width}}{
3791 \pgf@circ@res@step = \ctikzvalof{bipoles/adc/width}\pgf@circ@Rlen
3792 \divide \pgf@circ@res@step by 2
3793
3794 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3795 \pgf@circ@res@other = \pgf@circ@res@left
3796 \advance\pgf@circ@res@other by \pgf@circ@res@step
3797
3798 % draw outer box
3799 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3800 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3801 \pgfusepath{draw}
3802
3803 \ifpgf@circuit@inputarrow
3804 {
3805 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3806 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3807 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
3808 }
3809 \fi
3810
3811 % rotate inner symbol
3812 \def\texti{A}
3813 \def\textii{D}
3814 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
3815 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
3816 \def\texti{D}
3817 \def\textii{A}
3818 \pgftransformrotate{270}
3819 \fi\fi
3820 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
3821 \def\texti{D}
3822 \def\textii{A}
3823 \pgftransformrotate{180}
3824 \fi\fi
3825 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
3826 \pgftransformrotate{90}
3827 \def\texti{A}
3828 \def\textii{D}
3829 \fi\fi
3830
3831 % draw inner symbol
3832 \pgfsetlinewidth{\pgfstartlinewidth}
3833 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3834 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3835 \pgfusepath{draw}
3836
3837 \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}}
3838 \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}}
3839 }
3840
3841 %% DAC
3842 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dac/width}}{dac}{\ctikzvalof{bipoles/dac/width}}{\ctikzvalof{bipoles/dac/width}}{
3843 \pgf@circ@res@step = \ctikzvalof{bipoles/dac/width}\pgf@circ@Rlen
3844 \divide \pgf@circ@res@step by 2
3845
3846 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3847 \pgf@circ@res@other = \pgf@circ@res@left
3848 \advance\pgf@circ@res@other by \pgf@circ@res@step
3849
3850 % draw outer box
3851 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3852 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3853 \pgfusepath{draw}
3854
3855 \ifpgf@circuit@inputarrow
3856 {
3857 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3858 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3859 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
3860 }
3861 \fi
3862
3863 % rotate inner symbol
3864 \def\texti{D}
3865 \def\textii{A}
3866 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
3867 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
3868 \def\texti{A}
3869 \def\textii{D}
3870 \pgftransformrotate{270}
3871 \fi\fi
3872 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
3873 \def\texti{A}
3874 \def\textii{D}
3875 \pgftransformrotate{180}
3876 \fi\fi
3877 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
3878 \pgftransformrotate{90}
3879 \def\texti{D}
3880 \def\textii{A}
3881 \fi\fi
3882
3883 % draw inner symbol
3884 \pgfsetlinewidth{\pgfstartlinewidth}
3885 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3886 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3887 \pgfusepath{draw}
3888
3889 \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}}
3890 \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}}
3891 }
3892
3893 %% DSP
3894 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dsp/width}}{dsp}{\ctikzvalof{bipoles/dsp/width}}{\ctikzvalof{bipoles/dsp/width}}{
3895 \pgf@circ@res@step = \ctikzvalof{bipoles/dsp/width}\pgf@circ@Rlen
3896 \divide \pgf@circ@res@step by 2
3897
3898 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3899 \pgf@circ@res@other = \pgf@circ@res@left
3900 \advance\pgf@circ@res@other by \pgf@circ@res@step
3901
3902 % draw outer box
3903 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3904 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3905 \pgfusepath{draw}
3906
3907 \ifpgf@circuit@inputarrow
3908 {
3909 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3910 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3911 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
3912 }
3913 \fi
3914
3915 % rotate inner symbol
3916 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
3917 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
3918 \pgftransformrotate{270}
3919 \fi\fi
3920 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
3921 \pgftransformrotate{180}
3922 \fi\fi
3923 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
3924 \pgftransformrotate{90}
3925 \fi\fi
3926
3927 % draw inner symbol
3928 \pgftext[center,x=0,y=0]{\textsf{DSP}}
3929 }
3930
3931 %% FFT
3932 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fft/width}}{fft}{\ctikzvalof{bipoles/fft/width}}{\ctikzvalof{bipoles/fft/width}}{
3933 \pgf@circ@res@step = \ctikzvalof{bipoles/fft/width}\pgf@circ@Rlen
3934 \divide \pgf@circ@res@step by 2
3935
3936 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3937 \pgf@circ@res@other = \pgf@circ@res@left
3938 \advance\pgf@circ@res@other by \pgf@circ@res@step
3939
3940 % draw outer box
3941 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3942 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3943 \pgfusepath{draw}
3944
3945 \ifpgf@circuit@inputarrow
3946 {
3947 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3948 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3949 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
3950 }
3951 \fi
3952
3953 % rotate inner symbol
3954 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
3955 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
3956 \pgftransformrotate{270}
3957 \fi\fi
3958 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
3959 \pgftransformrotate{180}
3960 \fi\fi
3961 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
3962 \pgftransformrotate{90}
3963 \fi\fi
3964
3965 % draw inner symbol
3966 \pgftext[center,x=0,y=0]{\textsf{FFT}}
3967 }
3968
3969 %% Amplifier
3970 \pgfcircdeclarebipole{}{
3971 %\ifpgf@circuit@box
3972 \ctikzvalof{bipoles/twoport/width}
3973 %\else
3974 % \ctikzvalof{bipoles/amp/width}
3975 %\fi
3976 }{amp}{
3977 %\ifpgf@circuit@box
3978 \ctikzvalof{bipoles/twoport/width}
3979 %\else
3980 % \ctikzvalof{bipoles/amp/width}
3981 % \fi
3982 }{
3983 % \ifpgf@circuit@box
3984 \ctikzvalof{bipoles/twoport/width}
3985 % \else
3986 % \ctikzvalof{bipoles/amp/width}
3987 % \fi
3988 }{
3989 \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@Rlen
3990
3991
3992 % draw outer box
3993 %\ifpgf@circuit@box
3994 % \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
3995 %\fi
3996 % draw outer box
3997 % draw outer box
3998 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3999 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4000 \pgfusepath{draw}
4001
4002 % draw input arrow
4003 \ifpgf@circuit@inputarrow
4004 {
4005 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4006 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4007 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4008 }
4009 \fi
4010
4011 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4012 \pgfsetlinewidth{\pgfstartlinewidth}
4013 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@left}{0.75\pgf@circ@res@up}}
4014 \pgfpathlineto{\pgfpoint{0.63\pgf@circ@res@right}{0}}
4015 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.75\pgf@circ@res@down}}
4016 \pgfpathclose
4017 \pgfusepath{draw}
4018 }
4019
4020
4021 %% variable amplifier
4022 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamp/width}}{vamp}{\ctikzvalof{bipoles/vamp/width}}{\ctikzvalof{bipoles/vamp/width}}{
4023 \pgf@circ@res@step = \ctikzvalof{bipoles/vamp/width}\pgf@circ@Rlen
4024 \divide \pgf@circ@res@step by 2
4025
4026 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4027 \pgf@circ@res@other = \pgf@circ@res@left
4028 \advance\pgf@circ@res@other by \pgf@circ@res@step
4029
4030 % draw outer box
4031 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4032 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4033 \pgfusepath{draw}
4034
4035 \ifpgf@circuit@inputarrow
4036 {
4037 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4038 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4039 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4040 }
4041 \fi
4042
4043 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4044 \pgfsetlinewidth{\pgfstartlinewidth}
4045 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@left}{0.75\pgf@circ@res@up}}
4046 \pgfpathlineto{\pgfpoint{0.63\pgf@circ@res@right}{0}}
4047 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.75\pgf@circ@res@down}}
4048 \pgfpathclose
4049 \pgfusepath{draw}
4050
4051 \pgfsetarrowsend{latex}
4052 \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
4053 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.7\pgf@circ@res@up}}
4054 \pgfusepath{draw}
4055 }
4056
4057 %% pi attenuator
4058 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piattenuator/width}}{piattenuator}{\ctikzvalof{bipoles/piattenuator/width}}{\ctikzvalof{bipoles/piattenuator/width}}{
4059 \pgf@circ@res@step = \ctikzvalof{bipoles/piattenuator/width}\pgf@circ@Rlen
4060 \divide \pgf@circ@res@step by 2
4061
4062 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4063 \pgf@circ@res@other = \pgf@circ@res@left
4064 \advance\pgf@circ@res@other by \pgf@circ@res@step
4065
4066 % draw outer box
4067 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4068 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4069 \pgfusepath{draw}
4070
4071 \ifpgf@circuit@inputarrow
4072 {
4073 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4074 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4075 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4076 }
4077 \fi
4078
4079 % rotate inner symbol
4080 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4081 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4082 \pgftransformrotate{270}
4083 \fi\fi
4084 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4085 \pgftransformrotate{90}
4086 \fi\fi
4087
4088 % draw inner symbol
4089 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4090 \pgfsetlinewidth{\pgfstartlinewidth}
4091 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
4092 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4093 \pgfusepath{draw}
4094 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
4095 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4096 \pgfusepath{draw}
4097 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4098 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4099 \pgfusepath{draw}
4100 }
4101
4102 %% variable pi attenuator
4103 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vpiattenuator/width}}{vpiattenuator}{\ctikzvalof{bipoles/vpiattenuator/width}}{\ctikzvalof{bipoles/vpiattenuator/width}}{
4104 \pgf@circ@res@step = \ctikzvalof{bipoles/vpiattenuator/width}\pgf@circ@Rlen
4105 \divide \pgf@circ@res@step by 2
4106
4107 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4108 \pgf@circ@res@other = \pgf@circ@res@left
4109 \advance\pgf@circ@res@other by \pgf@circ@res@step
4110
4111 % draw outer box
4112 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4113 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4114 \pgfusepath{draw}
4115
4116 \ifpgf@circuit@inputarrow
4117 {
4118 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4119 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4120 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4121 }
4122 \fi
4123
4124 % rotate inner symbol
4125 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4126 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4127 \pgftransformrotate{270}
4128 \fi\fi
4129 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4130 \pgftransformrotate{90}
4131 \fi\fi
4132
4133 % draw inner symbol
4134 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4135 \pgfsetlinewidth{\pgfstartlinewidth}
4136 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
4137 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4138 \pgfusepath{draw}
4139 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
4140 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4141 \pgfusepath{draw}
4142 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4143 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4144 \pgfusepath{draw}
4145
4146 \pgfsetarrowsend{latex}
4147 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
4148 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
4149 \pgfusepath{draw}
4150 }
4151
4152 %% T attenuator
4153 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tattenuator/width}}{tattenuator}{\ctikzvalof{bipoles/tattenuator/width}}{\ctikzvalof{bipoles/tattenuator/width}}{
4154 \pgf@circ@res@step = \ctikzvalof{bipoles/tattenuator/width}\pgf@circ@Rlen
4155 \divide \pgf@circ@res@step by 2
4156
4157 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4158 \pgf@circ@res@other = \pgf@circ@res@left
4159 \advance\pgf@circ@res@other by \pgf@circ@res@step
4160
4161 % draw outer box
4162 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4163 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4164 \pgfusepath{draw}
4165
4166 \ifpgf@circuit@inputarrow
4167 {
4168 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4169 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4170 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4171 }
4172 \fi
4173
4174 % rotate inner symbol
4175 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4176 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4177 \pgftransformrotate{270}
4178 \fi\fi
4179 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4180 \pgftransformrotate{90}
4181 \fi\fi
4182
4183 % draw inner symbol
4184 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4185 \pgfsetlinewidth{\pgfstartlinewidth}
4186 \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
4187 \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
4188 \pgfusepath{draw}
4189 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4190 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4191 \pgfusepath{draw}
4192 }
4193
4194 %% variable T attenuator
4195 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vtattenuator/width}}{vtattenuator}{\ctikzvalof{bipoles/vtattenuator/width}}{\ctikzvalof{bipoles/vtattenuator/width}}{
4196 \pgf@circ@res@step = \ctikzvalof{bipoles/vtattenuator/width}\pgf@circ@Rlen
4197 \divide \pgf@circ@res@step by 2
4198
4199 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4200 \pgf@circ@res@other = \pgf@circ@res@left
4201 \advance\pgf@circ@res@other by \pgf@circ@res@step
4202
4203 % draw outer box
4204 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4205 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4206 \pgfusepath{draw}
4207
4208 \ifpgf@circuit@inputarrow
4209 {
4210 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4211 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4212 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4213 }
4214 \fi
4215
4216 % rotate inner symbol
4217 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4218 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4219 \pgftransformrotate{270}
4220 \fi\fi
4221 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4222 \pgftransformrotate{90}
4223 \fi\fi
4224
4225 % draw inner symbol
4226 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4227 \pgfsetlinewidth{\pgfstartlinewidth}
4228 \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
4229 \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
4230 \pgfusepath{draw}
4231 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4232 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4233 \pgfusepath{draw}
4234
4235 \pgfsetarrowsend{latex}
4236 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
4237 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
4238 \pgfusepath{draw}
4239 }
4240
4241 %% phase shifter
4242 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{phaseshifter}{\ctikzvalof{bipoles/phaseshifter/width}}{\ctikzvalof{bipoles/phaseshifter/width}}{
4243 \pgf@circ@res@step = \ctikzvalof{bipoles/phaseshifter/width}\pgf@circ@Rlen
4244 \divide \pgf@circ@res@step by 2
4245
4246 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4247 \pgf@circ@res@other = \pgf@circ@res@left
4248 \advance\pgf@circ@res@other by \pgf@circ@res@step
4249
4250 % draw outer box
4251 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4252 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4253 \pgfusepath{draw}
4254
4255 \ifpgf@circuit@inputarrow
4256 {
4257 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4258 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4259 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4260 }
4261 \fi
4262
4263 % rotate inner symbol
4264 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4265 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4266 \pgftransformrotate{270}
4267 \fi\fi
4268 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4269 \pgftransformrotate{180}
4270 \fi\fi
4271 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4272 \pgftransformrotate{90}
4273 \fi\fi
4274
4275 % inner symbol
4276 \pgftext[center,x=0,y=0]{\Large$\varphi$}
4277 }
4278
4279 %% variable phase shifter
4280 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{vphaseshifter}{\ctikzvalof{bipoles/vphaseshifter/width}}{\ctikzvalof{bipoles/vphaseshifter/width}}{
4281 \pgf@circ@res@step = \ctikzvalof{bipoles/vphaseshifter/width}\pgf@circ@Rlen
4282 \divide \pgf@circ@res@step by 2
4283
4284 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4285 \pgf@circ@res@other = \pgf@circ@res@left
4286 \advance\pgf@circ@res@other by \pgf@circ@res@step
4287
4288 % draw outer box
4289 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4290 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4291 \pgfusepath{draw}
4292
4293 \ifpgf@circuit@inputarrow
4294 {
4295 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4296 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4297 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4298 }
4299 \fi
4300
4301 % rotate inner symbol
4302 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4303 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4304 \pgftransformrotate{270}
4305 \fi\fi
4306 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4307 \pgftransformrotate{180}
4308 \fi\fi
4309 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4310 \pgftransformrotate{90}
4311 \fi\fi
4312
4313 % inner symbol
4314 \pgftext[center,x=0,y=0]{\Large$\varphi$}
4315
4316 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4317 \pgfsetlinewidth{\pgfstartlinewidth}
4318 \pgfsetarrowsend{latex}
4319 \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0.65\pgf@circ@res@down}}
4320 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.65\pgf@circ@res@up}}
4321 \pgfusepath{draw}
4322 }
4323
4324 %% detector
4325 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/detector/width}}{detector}{\ctikzvalof{bipoles/detector/width}}{\ctikzvalof{bipoles/detector/width}}{
4326 \pgf@circ@res@step = \ctikzvalof{bipoles/detector/width}\pgf@circ@Rlen
4327 \divide \pgf@circ@res@step by 2
4328
4329 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4330 \pgf@circ@res@other = \pgf@circ@res@left
4331 \advance\pgf@circ@res@other by \pgf@circ@res@step
4332
4333 % draw outer box
4334 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4335 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4336 \pgfusepath{draw}
4337
4338 \ifpgf@circuit@inputarrow
4339 {
4340 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4341 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4342 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4343 }
4344 \fi
4345
4346 % draw inner stuff
4347 \pgfsetlinewidth{0.8\pgfstartlinewidth}
4348 \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0}}
4349 \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@right}{0}}
4350 \pgfusepath{draw}
4351
4352 \ifpgf@circuit@fulldiode
4353 \pgfmathparse{2\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/generic/width}}
4354 \pgftransformscale{\pgfmathresult}
4355 \pgfnode{fulldiodeshape}{center}{}{pgf@fulldiode}{\pgfusepath{fill}}
4356 \else
4357 \pgfmathparse{2\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/resistor/width}}
4358 \pgftransformscale{\pgfmathresult}
4359 \pgfnode{emptydiodeshape}{center}{}{pgf@emptydiode}{\pgfusepath{fill}}
4360 \fi
4361
4362 }
4363
4364
4365
4366
4367 %% european gas filled surge arrester
4368
4369 \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}}{
4370
4371 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
4372 %\divide \pgf@circ@res@step by 14
4373
4374 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4375 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4376
4377 \pgfusepath{draw}
4378
4379 \pgfscope
4380 \pgfsetarrowsend{latex'}
4381 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
4382 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/european gas filled surge arrester/inside}\pgf@circ@res@left}{0pt}}
4383 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4384 \pgfusepath{draw}
4385
4386 \endpgfscope
4387 }
4388
4389
4390
4391
4392 %% american gas filled surge arrester
4393
4394 \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}}{
4395 %\def\pgf@circ@temp{right}
4396 %\ifx\tikz@res@label@pos\pgf@circ@temp
4397 % \pgf@circ@res@step=-1.2\pgf@circ@res@up
4398 %\else
4399 % \def\pgf@circ@temp{below}
4400 % \ifx\tikz@res@label@pos\pgf@circ@temp
4401 % \pgf@circ@res@step=-1.2\pgf@circ@res@up
4402 % \else
4403 % \pgf@circ@res@step=1.2\pgf@circ@res@up
4404 % \fi
4405 % \fi
4406
4407 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4408 \pgfpointorigin \pgf@circ@res@other = \pgf@x \advance \pgf@circ@res@other by -\pgf@circ@res@up
4409 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
4410 \pgfusepath{draw}
4411
4412 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4413
4414 \pgfscope
4415 \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
4416 \pgfusepath{draw}
4417 \endpgfscope
4418
4419 \pgfsetlinewidth{\pgfstartlinewidth}
4420
4421
4422 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@zero}}
4423 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
4424 \pgfusepath{draw}
4425
4426 \pgfnode{circle}{center}{}{}{}
4427
4428 \pgfscope
4429 \pgfsetarrowsend{latex}
4430
4431 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
4432 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf@circ@res@right}{\pgf@circ@res@zero}}
4433 \pgfusepath{draw}
4434
4435 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4436 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf@circ@res@left}{\pgf@circ@res@zero}}
4437 \pgfusepath{draw}
4438 \endpgfscope{}
4439
4440 %\pgftransformshift{\pgfpoint{.25\pgf@circ@res@left}{.45\pgf@circ@res@down}}
4441 %\pgfnode{circ}{center}{}{}{}
4442 %\pgftransformshift{}
4443 \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}
4444 \pgfusepath{fill}
4445 }
4446
4447
4448
4449
4450
4451
4452 %%%---------- close: pgfcircbipoles
4453 %%%%%%%%%%% Springe nach pgfcirctripoles
4454 %%%---------- open: pgfcirctripoles.tex
4455 % Copyright 2007-2009 by Massimo Redaelli
4456 %
4457 % This file may be distributed and/or modified
4458 %
4459 % 1. under the LaTeX Project Public License and/or
4460 % 2. under the GNU Public License.
4461 %
4462 % See the file doc/LICENSE for more details.
4463
4464 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4465 %% Tripoles
4466
4467
4468 \pgfdeclareshape{mixer}
4469 {
4470 \savedanchor\northwest{
4471 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4472 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@y
4473 \pgf@y=.5\pgf@y
4474 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4475 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@x
4476 \pgf@x=.5\pgf@x
4477 }
4478 \anchor{center}{
4479 \pgfpointorigin
4480 }
4481 \anchor{left}{%
4482 \northwest
4483 \pgf@y=0pt
4484 }
4485 \anchor{in 1}{
4486 \northwest
4487 \pgf@y=0pt
4488 }
4489 \anchor{in1}{
4490 \northwest
4491 \pgf@y=0pt
4492 }
4493 \anchor{in}{
4494 \northwest
4495 \pgf@y=0pt
4496 }
4497 \anchor{in 2}{
4498 \northwest
4499 \pgf@y=-\pgf@y
4500 \pgf@x=0pt
4501 }
4502 \anchor{in2}{
4503 \northwest
4504 \pgf@y=-\pgf@y
4505 \pgf@x=0pt
4506 }
4507 \anchor{out}{
4508 \northwest
4509 \pgf@y=0pt
4510 \pgf@x=-\pgf@x
4511 }
4512 \anchor{center}{
4513 \pgf@y=0pt
4514 \pgf@x=0pt
4515 }
4516 \anchor{east}{
4517 \northwest
4518 \pgf@y=0pt
4519 \pgf@x=-\pgf@x
4520 }
4521 \anchor{west}{
4522 \northwest
4523 \pgf@y=0pt
4524 }
4525 \anchor{south}{
4526 \northwest
4527 \pgf@x=0pt
4528 \pgf@y=-\pgf@y
4529 }
4530 \anchor{north}{
4531 \northwest
4532 \pgf@x=0pt
4533 }
4534 \anchor{south west}{
4535 \northwest
4536 \pgf@y=-\pgf@y
4537 }
4538 \anchor{north east}{
4539 \northwest
4540 \pgf@x=-\pgf@x
4541 }
4542 \anchor{north west}{
4543 \northwest
4544 }
4545 \anchor{south east}{
4546 \northwest
4547 \pgf@x=-\pgf@x
4548 \pgf@y=-\pgf@y
4549 }
4550 \backgroundpath{
4551 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
4552
4553 \pgf@circ@res@step=\ctikzvalof{tripoles/mixer/width}\pgf@circ@Rlen
4554
4555 \pgfscope
4556 \pgfstartlinewidth=\pgflinewidth
4557
4558 % draw outer circle
4559 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4560 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
4561 \pgfusepath{draw}
4562
4563 % draw inner stuff
4564 \pgfsetlinewidth{\pgfstartlinewidth}
4565 \pgfpathmoveto{\pgfpointorigin}
4566 \pgfpathmoveto{\pgfpointpolar{135}{0.5\pgf@circ@res@step}}
4567 \pgfpathlineto{\pgfpointpolar{-45}{0.5\pgf@circ@res@step}}
4568 \pgfpathmoveto{\pgfpointorigin}
4569 \pgfpathmoveto{\pgfpointpolar{45}{0.5\pgf@circ@res@step}}
4570 \pgfpathlineto{\pgfpointpolar{-135}{0.5\pgf@circ@res@step}}
4571 \pgfsetlinewidth{2\pgflinewidth}
4572 \pgfusepath{draw}
4573 \endpgfscope
4574 }
4575 }
4576
4577 \pgfdeclareshape{adder}
4578 {
4579 \savedanchor\northwest{
4580 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4581 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@y
4582 \pgf@y=.5\pgf@y
4583 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4584 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@x
4585 \pgf@x=.5\pgf@x
4586 }
4587 \anchor{center}{
4588 \pgfpointorigin
4589 }
4590 \anchor{left}{%
4591 \northwest
4592 \pgf@y=0pt
4593 }
4594 \anchor{in 1}{
4595 \northwest
4596 \pgf@y=0pt
4597 }
4598 \anchor{in1}{
4599 \northwest
4600 \pgf@y=0pt
4601 }
4602 \anchor{in}{
4603 \northwest
4604 \pgf@y=0pt
4605 }
4606 \anchor{in 2}{
4607 \northwest
4608 \pgf@y=-\pgf@y
4609 \pgf@x=0pt
4610 }
4611 \anchor{in2}{
4612 \northwest
4613 \pgf@y=-\pgf@y
4614 \pgf@x=0pt
4615 }
4616 \anchor{out}{
4617 \northwest
4618 \pgf@y=0pt
4619 \pgf@x=-\pgf@x
4620 }
4621 \anchor{center}{
4622 \pgf@y=0pt
4623 \pgf@x=0pt
4624 }
4625 \anchor{east}{
4626 \northwest
4627 \pgf@y=0pt
4628 \pgf@x=-\pgf@x
4629 }
4630 \anchor{west}{
4631 \northwest
4632 \pgf@y=0pt
4633 }
4634 \anchor{south}{
4635 \northwest
4636 \pgf@x=0pt
4637 \pgf@y=-\pgf@y
4638 }
4639 \anchor{north}{
4640 \northwest
4641 \pgf@x=0pt
4642 }
4643 \anchor{south west}{
4644 \northwest
4645 \pgf@y=-\pgf@y
4646 }
4647 \anchor{north east}{
4648 \northwest
4649 \pgf@x=-\pgf@x
4650 }
4651 \anchor{north west}{
4652 \northwest
4653 }
4654 \anchor{south east}{
4655 \northwest
4656 \pgf@x=-\pgf@x
4657 \pgf@y=-\pgf@y
4658 }
4659 \backgroundpath{
4660 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
4661
4662 \pgf@circ@res@step=\ctikzvalof{tripoles/adder/width}\pgf@circ@Rlen
4663
4664 \pgfscope
4665 \pgfstartlinewidth=\pgflinewidth
4666
4667 % draw outer circle
4668 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4669 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
4670 \pgfusepath{draw}
4671
4672 % draw inner stuff
4673 \pgfsetlinewidth{\pgfstartlinewidth}
4674 \pgfpathmoveto{\pgfpointorigin}
4675 \pgfpathmoveto{\pgfpointpolar{0}{0.3\pgf@circ@res@step}}
4676 \pgfpathlineto{\pgfpointpolar{180}{0.3\pgf@circ@res@step}}
4677 \pgfpathmoveto{\pgfpointorigin}
4678 \pgfpathmoveto{\pgfpointpolar{90}{0.3\pgf@circ@res@step}}
4679 \pgfpathlineto{\pgfpointpolar{270}{0.3\pgf@circ@res@step}}
4680 \pgfsetlinewidth{2\pgflinewidth}
4681 \pgfusepath{draw}
4682 \endpgfscope
4683 }
4684 }
4685
4686
4687
4688 \pgfdeclareshape{spdt}
4689 {
4690 \savedanchor\northwest{%
4691 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4692 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/height}\pgf@y
4693 \pgf@y=.5\pgf@y
4694 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4695 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/width}\pgf@x
4696 \pgf@x=.5\pgf@x
4697 }
4698 \anchor{left}{%
4699 \northwest
4700 \pgf@y=0pt
4701 }
4702 \anchor{in}{
4703 \northwest
4704 \pgf@y=0pt
4705 }
4706 \anchor{out 1}{
4707 \northwest
4708 \pgf@x=-\pgf@x
4709 }
4710 \anchor{out 2}{
4711 \northwest
4712 \pgf@x=-\pgf@x
4713 \pgf@y=-\pgf@y
4714 }
4715 \anchor{center}{
4716 \pgf@y=0pt
4717 \pgf@x=0pt
4718 }
4719 \anchor{east}{
4720 \northwest
4721 \pgf@y=0pt
4722 \pgf@x=-\pgf@x
4723 }
4724 \anchor{west}{
4725 \northwest
4726 \pgf@y=0pt
4727 }
4728 \anchor{south}{
4729 \northwest
4730 \pgf@x=0pt
4731 \pgf@y=-\pgf@y
4732 }
4733 \anchor{north}{
4734 \northwest
4735 \pgf@x=0pt
4736 }
4737 \anchor{south west}{
4738 \northwest
4739 \pgf@y=-\pgf@y
4740 }
4741 \anchor{north east}{
4742 \northwest
4743 \pgf@x=-\pgf@x
4744 }
4745 \anchor{north west}{
4746 \northwest
4747 }
4748 \anchor{south east}{
4749 \northwest
4750 \pgf@x=-\pgf@x
4751 \pgf@y=-\pgf@y
4752 }
4753 \backgroundpath{
4754 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
4755
4756
4757 \northwest
4758 \pgf@circ@res@up = \pgf@y
4759 \pgf@circ@res@down = -\pgf@y
4760 \pgf@circ@res@right = -\pgf@x
4761 \pgf@circ@res@left = \pgf@x
4762 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/margin}\pgf@circ@res@left
4763
4764
4765 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
4766 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
4767 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4768 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
4769
4770 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
4771 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}}
4772
4773 \pgfusepath{draw}
4774
4775 \pgfscope
4776 \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
4777 \pgfnode{ocirc}{center}{}{spdt1}{\pgfusepath{stroke}}
4778 \endpgfscope
4779 \pgfscope
4780 \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
4781 \pgfnode{ocirc}{center}{}{}{\pgfusepath{stroke}}
4782 \endpgfscope
4783 \pgfscope
4784 \pgftransformshift{\pgfpoint{\pgf@circ@res@other}{0pt}}
4785 \pgfnode{ocirc}{center}{}{spdt2}{\pgfusepath{stroke}}
4786 \endpgfscope
4787
4788
4789 \pgfscope
4790 \pgfpathmoveto{\pgfpointshapeborder{spdt2}{\pgfpointorigin}}
4791 \pgfpathlineto{
4792 \pgfpointadd{\pgfpointshapeborder{spdt1}{\pgfpoint{-\pgf@circ@res@other}{-100pt}}}
4793 {\pgfpoint{-.05\pgf@circ@res@up}{-.05\pgf@circ@res@up}}
4794 }
4795 \pgfsetlinewidth{2\pgflinewidth}
4796 \pgfusepath{draw}
4797 \endpgfscope
4798 }
4799 }
4800
4801
4802
4803 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4804 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4805 %%
4806 %% Logic ports
4807 %%
4808
4809
4810
4811
4812
4813
4814 \long\def\pgfcircdeclarelogicport#1#2{
4815 \pgfdeclareshape{american #1 port}
4816 {
4817 \savedanchor\northwest{%
4818 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4819 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@y
4820 \pgf@y=.5\pgf@y
4821 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4822 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@x
4823 \pgf@x=.5\pgf@x
4824 }
4825 \savedanchor\left{%
4826 \pgf@y=0pt
4827 }
4828 \savedanchor\inOne{%
4829 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4830 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@y
4831 \pgf@y=.5\pgf@y
4832 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/input height}\pgf@y
4833 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
4834 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@x
4835 \pgf@x=.5\pgf@x
4836 }
4837 \anchor{in 1}{
4838 \inOne
4839 }
4840 \anchor{in}{
4841 \inOne
4842 }
4843 \anchor{in 2}{
4844 \inOne
4845 \pgf@y=-\pgf@y
4846 }
4847 \anchor{out}{
4848 \northwest
4849 \pgf@y=0pt
4850 \pgf@x=-\pgf@x
4851 }
4852 \anchor{center}{
4853 \northwest
4854 \pgf@y=0pt
4855 \pgf@x=-.8\pgf@x
4856 }
4857 \anchor{east}{
4858 \left
4859 \pgf@x=-.8\pgf@x
4860 }
4861 \anchor{west}{
4862 \left
4863 }
4864 \anchor{south}{
4865 \northwest
4866 \pgf@x=0pt
4867 \pgf@y=-\pgf@y
4868 }
4869 \anchor{north}{
4870 \northwest
4871 \pgf@x=0pt
4872 }
4873 \anchor{south west}{
4874 \northwest
4875 \pgf@y=-\pgf@y
4876 }
4877 \anchor{north east}{
4878 \northwest
4879 \pgf@x=-\pgf@x
4880 }
4881 \anchor{north west}{
4882 \northwest
4883 }
4884 \anchor{south east}{
4885 \northwest
4886 \pgf@x=-\pgf@x
4887 \pgf@y=-\pgf@y
4888 }
4889 \backgroundpath{
4890 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
4891
4892
4893 \northwest
4894 \pgf@circ@res@up = \pgf@y
4895 \pgf@circ@res@down = -\pgf@y
4896 \pgf@circ@res@right = -\pgf@x
4897 \pgf@circ@res@left = \pgf@x
4898
4899 #2
4900
4901 }
4902 }
4903 }
4904
4905
4906 \pgfcircdeclarelogicport{and}{
4907 \pgfpathmoveto{\pgfpoint
4908 {\pgf@circ@res@left}
4909 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@up}}
4910 \pgfpathlineto{\pgfpoint
4911 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
4912 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@up}}
4913
4914 \pgfpathmoveto{\pgfpoint
4915 {\pgf@circ@res@left}
4916 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@down}}
4917 \pgfpathlineto{\pgfpoint
4918 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
4919 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@down}}
4920
4921 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
4922 \pgfpathlineto{\pgfpoint
4923 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
4924 {0pt}}
4925
4926 \pgfusepath{draw}
4927
4928 \pgfsetlinewidth{2\pgflinewidth}
4929 \pgfpathmoveto{\pgfpoint
4930 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
4931 {\pgf@circ@res@up}}
4932 \pgfpathlineto{\pgfpoint
4933 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
4934 {\pgf@circ@res@down}}
4935 \pgfpathcurveto
4936 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@down}}
4937 {\pgfpoint
4938 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
4939 {.5\pgf@circ@res@down}}
4940 {\pgfpoint
4941 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
4942 {0pt}}
4943 \pgfpathcurveto
4944 {\pgfpoint
4945 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
4946 {.5\pgf@circ@res@up}}
4947 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@up}}
4948 {\pgfpoint
4949 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
4950 {\pgf@circ@res@up}}
4951 \pgfusepath{draw}
4952 }
4953
4954
4955
4956 \pgfcircdeclarelogicport{nand}{
4957 \pgfpathmoveto{\pgfpoint
4958 {\pgf@circ@res@left}
4959 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@up}}
4960 \pgfpathlineto{\pgfpoint
4961 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
4962 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@up}}
4963
4964 \pgfpathmoveto{\pgfpoint
4965 {\pgf@circ@res@left}
4966 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@down}}
4967 \pgfpathlineto{\pgfpoint
4968 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
4969 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@down}}
4970
4971 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
4972 \pgfpathlineto{\pgfpoint
4973 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right}
4974 {0pt}}
4975
4976 \pgfusepath{draw}
4977
4978 \pgfsetlinewidth{2\pgflinewidth}
4979
4980 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf@circ@res@right
4981 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right
4982
4983 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
4984 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
4985 \pgfpathcurveto
4986 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@down}}
4987 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{.5\pgf@circ@res@down}}
4988 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
4989 \pgfpathcurveto
4990 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{.5\pgf@circ@res@up}}
4991 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@up}}
4992 {\pgfpoint
4993 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
4994 {\pgf@circ@res@up}}
4995 \pgfpathellipse
4996 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
4997 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
4998 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
4999
5000 \pgfusepath{draw}
5001 }
5002
5003
5004 \pgfcircdeclarelogicport{nor}{
5005 \pgfpathmoveto{\pgfpoint
5006 {\pgf@circ@res@left}
5007 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@up}}
5008 \pgfpathlineto{\pgfpoint
5009 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf@circ@res@left}
5010 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@up}}
5011
5012 \pgfpathmoveto{\pgfpoint
5013 {\pgf@circ@res@left}
5014 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@down}}
5015 \pgfpathlineto{\pgfpoint
5016 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf@circ@res@left}
5017 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@down}}
5018
5019 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5020 \pgfpathlineto{\pgfpoint
5021 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf@circ@res@right}
5022 {0pt}}
5023
5024 \pgfusepath{draw}
5025
5026 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf@circ@res@right
5027 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf@circ@res@right
5028
5029 \pgfsetlinewidth{2\pgflinewidth}
5030 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5031 \pgfpathcurveto
5032 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5033 {\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}}
5034 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf@circ@res@left}{0pt}}
5035 \pgfpathcurveto
5036 {\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}}
5037 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5038 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5039
5040 \pgfpathcurveto
5041 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5042 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf@circ@res@down}}
5043 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5044 \pgfpathcurveto
5045 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf@circ@res@up}}
5046 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5047 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5048
5049 \pgfpathellipse
5050 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5051 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5052 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5053
5054 \pgfusepath{draw}
5055 }
5056
5057
5058
5059
5060 \pgfcircdeclarelogicport{or}{
5061
5062
5063 \pgfpathmoveto{\pgfpoint
5064 {\pgf@circ@res@left}
5065 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@up}}
5066 \pgfpathlineto{\pgfpoint
5067 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf@circ@res@left}
5068 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@up}}
5069
5070 \pgfpathmoveto{\pgfpoint
5071 {\pgf@circ@res@left}
5072 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@down}}
5073 \pgfpathlineto{\pgfpoint
5074 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf@circ@res@left}
5075 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@down}}
5076
5077 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5078 \pgfpathlineto{\pgfpoint
5079 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right}
5080 {0pt}}
5081
5082 \pgfusepath{draw}
5083 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right
5084 \pgfsetlinewidth{2\pgflinewidth}
5085 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5086 \pgfpathcurveto
5087 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5088 {\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}}
5089 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf@circ@res@left}{0pt}}
5090 \pgfpathcurveto
5091 {\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}}
5092 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5093 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5094
5095 \pgfpathcurveto
5096 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5097 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@down}}
5098 {\pgfpoint{\pgf@circ@res@other}{0pt}}
5099 \pgfpathcurveto
5100 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@up}}
5101 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5102 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5103 \pgfusepath{draw}
5104 }
5105
5106
5107 \pgfcircdeclarelogicport{xor}{
5108
5109 \pgfpathmoveto{\pgfpoint
5110 {\pgf@circ@res@left}
5111 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@up}}
5112 \pgfpathlineto{\pgfpoint
5113 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf@circ@res@left}
5114 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@up}}
5115
5116 \pgfpathmoveto{\pgfpoint
5117 {\pgf@circ@res@left}
5118 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@down}}
5119 \pgfpathlineto{\pgfpoint
5120 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf@circ@res@left}
5121 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@down}}
5122
5123 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5124 \pgfpathlineto{\pgfpoint
5125 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf@circ@res@right}
5126 {0pt}}
5127
5128 \pgfusepath{draw}
5129 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf@circ@res@right
5130 \pgfsetlinewidth{2\pgflinewidth}
5131 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5132 \pgfpathcurveto
5133 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5134 {\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}}
5135 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{0pt}}
5136 \pgfpathcurveto
5137 {\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}}
5138 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5139 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5140
5141 \pgfpathcurveto
5142 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5143 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@down}}
5144 {\pgfpoint{\pgf@circ@res@other}{0pt}}
5145 \pgfpathcurveto
5146 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@up}}
5147 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5148 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5149
5150 \def\pgf@circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/distance}\pgf@circ@res@right+}
5151 \pgfpathmoveto{\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{\pgf@circ@res@up}}
5152
5153 \pgfpathcurveto
5154 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@up}}
5155 {\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}}
5156 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{0pt}}
5157 \pgfpathcurveto
5158 {\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}}
5159 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@down}}
5160 {\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{.95*\pgf@circ@res@down}}
5161
5162 \pgfusepath{draw}
5163 }
5164
5165
5166
5167 \pgfcircdeclarelogicport{xnor}{
5168
5169 \pgfpathmoveto{\pgfpoint
5170 {\pgf@circ@res@left}
5171 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@up}}
5172 \pgfpathlineto{\pgfpoint
5173 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf@circ@res@left}
5174 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@up}}
5175
5176 \pgfpathmoveto{\pgfpoint
5177 {\pgf@circ@res@left}
5178 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@down}}
5179 \pgfpathlineto{\pgfpoint
5180 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf@circ@res@left}
5181 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@down}}
5182
5183 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5184 \pgfpathlineto{\pgfpoint
5185 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf@circ@res@right}
5186 {0pt}}
5187
5188 \pgfusepath{draw}
5189 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf@circ@res@right
5190 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/circle width}\pgf@circ@res@right
5191
5192 \pgfsetlinewidth{2\pgflinewidth}
5193 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5194 \pgfpathcurveto
5195 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5196 {\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}}
5197 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{0pt}}
5198 \pgfpathcurveto
5199 {\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}}
5200 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5201 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5202
5203 \pgfpathcurveto
5204 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5205 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@down}}
5206 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5207 \pgfpathcurveto
5208 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@up}}
5209 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5210 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5211
5212 \def\pgf@circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/distance}\pgf@circ@res@right+}
5213 \pgfpathmoveto{\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{\pgf@circ@res@up}}
5214
5215 \pgfpathcurveto
5216 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@up}}
5217 {\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}}
5218 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{0pt}}
5219 \pgfpathcurveto
5220 {\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}}
5221 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@down}}
5222 {\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{.95*\pgf@circ@res@down}}
5223
5224
5225 \pgfpathellipse
5226 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5227 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5228 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5229
5230 \pgfusepath{draw}
5231 }
5232
5233
5234 \pgfdeclareshape{american not port}
5235 {
5236 \anchor{center}{\pgfpointorigin}
5237 \savedanchor\northwest{%
5238 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5239 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@y
5240 \pgf@y=.5\pgf@y
5241 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5242 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@x
5243 \pgf@x=.5\pgf@x
5244 }
5245 \savedanchor\left{%
5246 \pgf@y=0pt
5247 }
5248 \anchor{in}{
5249 \northwest
5250 \pgf@y=0pt
5251 }
5252 \anchor{out}{
5253 \northwest
5254 \pgf@y=0pt
5255 \pgf@x=-\pgf@x
5256 }
5257 \anchor{center}{
5258 \pgfpointorigin
5259 }
5260 \anchor{east}{
5261 \left
5262 \pgf@x=-.8\pgf@x
5263 }
5264 \anchor{west}{
5265 \left
5266 }
5267 \anchor{south}{
5268 \northwest
5269 \pgf@x=0pt
5270 \pgf@y=-\pgf@y
5271 }
5272 \anchor{north}{
5273 \northwest
5274 \pgf@x=0pt
5275 }
5276 \anchor{south west}{
5277 \northwest
5278 \pgf@y=-\pgf@y
5279 }
5280 \anchor{north east}{
5281 \northwest
5282 \pgf@x=-\pgf@x
5283 }
5284 \anchor{north west}{
5285 \northwest
5286 }
5287 \anchor{south east}{
5288 \northwest
5289 \pgf@x=-\pgf@x
5290 \pgf@y=-\pgf@y
5291 }
5292 \backgroundpath{
5293 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5294
5295
5296 \northwest
5297 \pgf@circ@res@up = \pgf@y
5298 \pgf@circ@res@down = -\pgf@y
5299 \pgf@circ@res@right = -\pgf@x
5300 \pgf@circ@res@left = \pgf@x
5301
5302 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right
5303
5304 \pgfscope
5305 \pgfsetlinewidth{2\pgflinewidth}
5306 \pgftransformxshift{.7\pgf@circ@res@left}
5307 \pgf@circ@res@step=\pgf@circ@res@right
5308 \advance\pgf@circ@res@step by -\pgf@circ@res@left
5309 \pgf@circ@res@step=.7\pgf@circ@res@step
5310
5311 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5312 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
5313 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
5314 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5315 \pgfusepath{draw}
5316 \pgfpathellipse
5317 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@other}{0pt}}
5318 {\pgfpoint{.5\pgf@circ@res@other}{0pt}}
5319 {\pgfpoint{0pt}{.5\pgf@circ@res@other}}
5320 \pgfusepath{draw}
5321 \endpgfscope
5322
5323 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5324 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
5325
5326 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5327 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
5328
5329 \pgfusepath{draw}
5330
5331 }
5332 }
5333
5334
5335
5336
5337
5338
5339 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5340
5341 % #1 - name
5342 % #2 - text inside
5343 % #3 - number of inputs
5344 % #4 - is it a not
5345
5346 \long\def\pgfcircdeclareeurologicport#1#2#3#4{
5347 \pgfdeclareshape{european #1 port}
5348 {
5349 \savedanchor\northwest{%
5350 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5351 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@y
5352 \pgf@y=.5\pgf@y
5353 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5354 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@x
5355 \pgf@x=.5\pgf@x
5356 }
5357 \savedanchor\left{%
5358 \pgf@y=0pt
5359 }
5360 \savedanchor\inOne{%
5361 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5362 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@y
5363 \pgf@y=.5\pgf@y
5364 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@y
5365 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5366 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@x
5367 \pgf@x=.5\pgf@x
5368 }
5369 \anchor{in}{
5370 \inOne
5371 }
5372 \anchor{in 1}{
5373 \inOne
5374 }
5375 \anchor{in 2}{
5376 \inOne
5377 \pgf@y=-\pgf@y
5378 }
5379 \anchor{out}{
5380 \northwest
5381 \pgf@y=0pt
5382 \pgf@x=-\pgf@x
5383 }
5384 \anchor{center}{
5385 \northwest
5386 \pgf@y=0pt
5387 \pgf@x=-.8\pgf@x
5388 }
5389 \anchor{east}{
5390 \left
5391 \pgf@x=-.8\pgf@x
5392 }
5393 \anchor{west}{
5394 \left
5395 }
5396 \anchor{south}{
5397 \northwest
5398 \pgf@x=0pt
5399 \pgf@y=-\pgf@y
5400 }
5401 \anchor{north}{
5402 \northwest
5403 \pgf@x=0pt
5404 }
5405 \anchor{south west}{
5406 \northwest
5407 \pgf@y=-\pgf@y
5408 }
5409 \anchor{north east}{
5410 \northwest
5411 \pgf@x=-\pgf@x
5412 }
5413 \anchor{north west}{
5414 \northwest
5415 }
5416 \anchor{south east}{
5417 \northwest
5418 \pgf@x=-\pgf@x
5419 \pgf@y=-\pgf@y
5420 }
5421 \backgroundpath{
5422 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5423 \northwest
5424 \pgf@circ@res@up = \pgf@y
5425 \pgf@circ@res@down = -\pgf@y
5426 \pgf@circ@res@right = -\pgf@x
5427 \pgf@circ@res@left = \pgf@x
5428 \def\pgf@temp{1}
5429 \def\pgf@circ@temp{#3}
5430 \ifx\pgftemp\pgf@circ@temp % one input
5431 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5432 \pgfpathlineto{
5433 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}{0pt}}
5434 \else % two inputs
5435 \pgfpathmoveto{
5436 \pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@up}}
5437 \pgfpathlineto{
5438 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}
5439 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@up}}
5440 %
5441 \pgfpathmoveto{
5442 \pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@down}}
5443 \pgfpathlineto{
5444 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}
5445 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@down}}
5446 \fi%
5447 %
5448 %
5449 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5450 \pgfpathlineto{
5451 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{0pt}}
5452 %
5453 \edef\pgf@temp{not}
5454 \edef\pgf@circ@temp{#4}
5455 \ifx\pgf@temp\pgf@circ@temp % is a not
5456 \pgfpathmoveto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not width}\pgf@circ@res@right}{0pt}}
5457 \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}}
5458 \fi
5459 %
5460 \pgfusepath{draw}
5461 %
5462 \pgfpathmoveto{\pgfpointorigin}
5463 \pgftext{#2}
5464 %
5465 %
5466 %
5467 \pgfsetlinewidth{2\pgflinewidth}
5468 \pgfpathrectanglecorners
5469 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}{\pgf@circ@res@up}}
5470 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{\pgf@circ@res@down}}
5471 \pgfusepath{draw}
5472 %
5473 %
5474 }
5475 }
5476 }
5477
5478
5479
5480 \pgfcircdeclareeurologicport{and}{$\&$}{2}{}
5481 \pgfcircdeclareeurologicport{or}{$\ge 1$}{2}{}
5482 \pgfcircdeclareeurologicport{xor}{$=1$}{2}{}
5483 \pgfcircdeclareeurologicport{not}{$1$}{1}{not}
5484 \pgfcircdeclareeurologicport{nand}{$\&$}{2}{not}
5485 \pgfcircdeclareeurologicport{nor}{$\ge 1$}{2}{not}
5486 \pgfcircdeclareeurologicport{xnor}{$=1$}{2}{not}
5487
5488
5489
5490
5491 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5492
5493
5494 \long\def\pgfcircdeclaretransistor#1#2#3{
5495 \pgfdeclareshape{#1}
5496 {
5497 \anchor{center}{\pgfpointorigin}
5498 \savedanchor\northeast{% upper right
5499 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5500 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@y
5501 \pgf@y=.5\pgf@y
5502 \pgf@x=0pt
5503 }
5504 % \savedanchor\northeast{%
5505 % \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5506 % \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@y
5507 % \pgf@y=.5\pgf@y
5508 % \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5509 % \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@x
5510 % }
5511 \savedanchor\left{%center left
5512 \pgf@y=0pt
5513 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
5514 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@x
5515 }
5516 \anchor{text}{
5517 \northeast
5518 \pgfpoint
5519 {12\pgf@circ@res@right +0.2*(\pgf@circ@res@right-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left)}
5520 {0.6\pgf@y}
5521 }
5522 %
5523 % pseudo-bipole
5524 \anchor{left}{ % south
5525 \northeast
5526 \pgf@y=-\pgf@y
5527 }
5528 \anchor{right}{
5529 \northeast
5530 }
5531 \anchor{north}{
5532 \northeast
5533 \pgf@circ@res@step=\pgf@y
5534 \left
5535 \pgf@y=\pgf@circ@res@step
5536 \pgf@x=.5\pgf@x
5537 }
5538 \anchor{west}{
5539 \left
5540 }
5541 \anchor{east}{
5542 \pgf@x=0pt
5543 \pgf@y=0pt
5544 }
5545 \anchor{south}{
5546 \northeast
5547 \pgf@circ@res@step=\pgf@y
5548 \left
5549 \pgf@y=-\pgf@circ@res@step
5550 \pgf@x=.5\pgf@x
5551 }
5552 \anchor{south west}{
5553 \northeast
5554 \pgf@circ@res@step=\pgf@y
5555 \left
5556 \pgf@y=-\pgf@circ@res@step
5557 }
5558 \anchor{north east}{
5559 \northeast
5560 }
5561 \anchor{north west}{
5562 \northeast
5563 \pgf@circ@res@step=\pgf@y
5564 \left
5565 \pgf@y=\pgf@circ@res@step
5566 }
5567 \anchor{south east}{
5568 \northeast
5569 \pgf@y=-\pgf@y
5570 }
5571
5572 #2
5573 \backgroundpath{
5574 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5575 %
5576 %
5577 \northeast
5578 \pgf@circ@res@up = \pgf@y
5579 \pgf@circ@res@down = -\pgf@y
5580 \pgf@circ@res@right = \pgf@x
5581 \left
5582 \pgf@circ@res@left = \pgf@x
5583 %
5584 #3
5585 %
5586 }
5587 }
5588 }
5589
5590
5591
5592
5593
5594
5595 \long\def\pgfcircdeclaremos#1#2#3{
5596 \pgfcircdeclaretransistor{#1}{
5597 \anchor{G}{
5598 \left
5599 }
5600 \anchor{gate}{
5601 \left
5602 }
5603 \anchor{B}{
5604 \left
5605 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@x
5606 }
5607 \anchor{base}{
5608 \left
5609 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@x
5610 }
5611 #2
5612 }
5613 {#3}
5614 }
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624 \pgfcircdeclaremos{nmos}{
5625 \anchor{D}{
5626 \northeast
5627 }
5628 \anchor{drain}{
5629 \northeast
5630 }
5631 \anchor{S}{
5632 \northeast
5633 \pgf@y=-\pgf@y
5634 }
5635 \anchor{source}{
5636 \northeast
5637 \pgf@y=-\pgf@y
5638 }
5639 }{%
5640 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5641 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
5642 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
5643 \pgfpathlineto{\pgfpoint
5644 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
5645 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
5646
5647 \pgfpathmoveto{\pgfpoint
5648 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
5649 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@up}}
5650 \pgfpathlineto{\pgfpoint
5651 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
5652 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@down}}
5653
5654 \pgfpathmoveto{\pgfpoint
5655 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
5656 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
5657 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
5658 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
5659 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5660 \pgfusepath{draw}
5661
5662 \pgfscope
5663 \pgfpathmoveto{\pgfpoint
5664 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
5665 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
5666 \pgfpathlineto{\pgfpoint
5667 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
5668 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
5669 \pgfsetlinewidth{2\pgflinewidth}
5670 \pgfusepath{draw}
5671 \endpgfscope
5672
5673 \ifpgf@circuit@mos@arrows
5674 \pgfscope
5675 \pgfslopedattimetrue
5676 \pgfallowupsidedownattimetrue
5677 \pgfresetnontranslationattimefalse
5678 \pgftransformlineattime{.6}{%
5679 \pgfpoint%
5680 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}%
5681 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
5682 }{%
5683 \pgfpoint
5684 {\pgf@circ@res@right}%
5685 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
5686 }
5687 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
5688 \endpgfscope
5689 \fi
5690
5691
5692 \pgfpathmoveto{\pgfpoint
5693 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
5694 {\pgf@circ@res@up+\pgf@circ@res@down}}
5695 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
5696 \pgfusepath{draw}
5697 }
5698
5699
5700 \pgfcircdeclaremos{pmos}{
5701 \anchor{S}{
5702 \northeast
5703 }
5704 \anchor{source}{
5705 \northeast
5706 }
5707 \anchor{D}{
5708 \northeast
5709 \pgf@y=-\pgf@y
5710 }
5711 \anchor{drain}{
5712 \northeast
5713 \pgf@y=-\pgf@y
5714 }
5715 }{%
5716 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5717 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
5718 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
5719 \pgfpathlineto{\pgfpoint
5720 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
5721 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
5722 \pgfusepath{draw}
5723
5724 \ifpgf@circuit@mos@arrows
5725 \pgfscope
5726 \pgfslopedattimetrue
5727 \pgfallowupsidedownattimetrue
5728 \pgfresetnontranslationattimefalse
5729 \pgftransformlineattime{.4}{%
5730 \pgfpoint%
5731 {\pgf@circ@res@right}%
5732 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
5733 }{%
5734 \pgfpoint
5735 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}%
5736 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
5737 }
5738 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
5739 \endpgfscope
5740 \fi
5741
5742 \pgfscope
5743 \pgfpathmoveto{\pgfpoint
5744 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
5745 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@up}}
5746 \pgfpathlineto{\pgfpoint
5747 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
5748 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@down}}
5749 \pgfsetlinewidth{2\pgflinewidth}
5750 \pgfusepath{draw}
5751 \endpgfscope
5752
5753 \pgfpathmoveto{\pgfpoint
5754 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
5755 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
5756 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
5757 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
5758 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5759
5760 \pgfpathmoveto{\pgfpoint
5761 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
5762 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
5763 \pgfpathlineto{\pgfpoint
5764 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
5765 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
5766
5767
5768 \pgfpathmoveto{\pgfpoint
5769 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
5770 {\pgf@circ@res@up+\pgf@circ@res@down}}
5771 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
5772 \pgfusepath{draw}
5773
5774 \pgfpathcircle{\pgfpoint
5775 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
5776 {\pgf@circ@res@up+\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
5777 \pgfusepath{draw,fill}
5778
5779 }
5780
5781
5782
5783
5784
5785
5786
5787 \pgfcircdeclaretransistor{pnp}{
5788 \anchor{E}{
5789 \northeast
5790 }
5791 \anchor{emitter}{
5792 \northeast
5793 }
5794 \anchor{B}{
5795 \left
5796 }
5797 \anchor{base}{
5798 \left
5799 }
5800 \anchor{C}{
5801 \northeast
5802 \pgf@y=-\pgf@y
5803 }
5804 \anchor{collector}{
5805 \northeast
5806 \pgf@y=-\pgf@y
5807 }
5808 }{
5809 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5810 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
5811 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height}\pgf@circ@res@up}}
5812 \pgfpathlineto{\pgfpoint
5813 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf@circ@res@left}
5814 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height 2}\pgf@circ@res@up}}
5815 \pgfusepath{draw}
5816
5817 \pgfscope
5818 \pgfpathmoveto{\pgfpoint
5819 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf@circ@res@left}
5820 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf@circ@res@up}}
5821 \pgfpathlineto{\pgfpoint
5822 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf@circ@res@left}
5823 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf@circ@res@down}}
5824 \pgfsetlinewidth{2\pgflinewidth}
5825 \pgfusepath{draw}
5826 \endpgfscope
5827
5828 \pgfpathmoveto{\pgfpoint
5829 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf@circ@res@left}
5830 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height 2}\pgf@circ@res@down}}
5831 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
5832 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height}\pgf@circ@res@down}}
5833 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5834 \pgfusepath{draw}
5835
5836 \pgfscope
5837 \pgfslopedattimetrue
5838 \pgfallowupsidedownattimetrue
5839 \pgfresetnontranslationattimefalse
5840 \pgftransformlineattime{.5}{%
5841 \pgfpoint%
5842 {\pgf@circ@res@right}%
5843 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height}\pgf@circ@res@up}%
5844 }{%
5845 \pgfpoint
5846 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf@circ@res@left}%
5847 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height 2}\pgf@circ@res@up}%
5848 }
5849 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
5850 \endpgfscope
5851
5852 \pgfpathmoveto{\pgfpoint
5853 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf@circ@res@left}
5854 {\pgf@circ@res@up+\pgf@circ@res@down}}
5855 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
5856 \pgfusepath{draw}
5857 }
5858
5859
5860
5861
5862
5863
5864 \pgfcircdeclaretransistor{npn}{
5865 \anchor{C}{
5866 \northeast
5867 }
5868 \anchor{collector}{
5869 \northeast
5870 }
5871 \anchor{B}{
5872 \left
5873 }
5874 \anchor{base}{
5875 \left
5876 }
5877 \anchor{E}{
5878 \northeast
5879 \pgf@y=-\pgf@y
5880 }
5881 \anchor{emitter}{
5882 \northeast
5883 \pgf@y=-\pgf@y
5884 }
5885 }{%
5886 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5887 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
5888 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height}\pgf@circ@res@up}}
5889 \pgfpathlineto{\pgfpoint
5890 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf@circ@res@left}
5891 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height 2}\pgf@circ@res@up}}
5892 \pgfusepath{draw}
5893
5894 \pgfscope
5895 \pgfpathmoveto{\pgfpoint
5896 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf@circ@res@left}
5897 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf@circ@res@up}}
5898 \pgfpathlineto{\pgfpoint
5899 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf@circ@res@left}
5900 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf@circ@res@down}}
5901 \pgfsetlinewidth{2\pgflinewidth}
5902 \pgfusepath{draw}
5903 \endpgfscope
5904
5905 \pgfpathmoveto{\pgfpoint
5906 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf@circ@res@left}
5907 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height 2}\pgf@circ@res@down}}
5908 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
5909 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height}\pgf@circ@res@down}}
5910 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5911 \pgfusepath{draw}
5912
5913 \pgfscope
5914 \pgfslopedattimetrue
5915 \pgfallowupsidedownattimetrue
5916 \pgfresetnontranslationattimefalse
5917 \pgftransformlineattime{.5}{%
5918 \pgfpoint%
5919 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf@circ@res@left}%
5920 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height 2}\pgf@circ@res@down}%
5921 }{%
5922 \pgfpoint{\pgf@circ@res@right}%
5923 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height}\pgf@circ@res@down}%
5924 }
5925 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
5926 \endpgfscope
5927
5928 \pgfpathmoveto{\pgfpoint
5929 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf@circ@res@left}
5930 {\pgf@circ@res@up+\pgf@circ@res@down}}
5931 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
5932 \pgfusepath{draw}
5933
5934
5935 }
5936
5937
5938
5939 \pgfcircdeclaretransistor{pigbt}{
5940 \anchor{E}{
5941 \northeast
5942 }
5943 \anchor{emitter}{
5944 \northeast
5945 }
5946 \anchor{B}{
5947 \left
5948 }
5949 \anchor{base}{
5950 \left
5951 }
5952 \anchor{C}{
5953 \northeast
5954 \pgf@y=-\pgf@y
5955 }
5956 \anchor{collector}{
5957 \northeast
5958 \pgf@y=-\pgf@y
5959 }
5960 }{
5961 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5962 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
5963 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf@circ@res@up}}
5964 \pgfpathlineto{\pgfpoint
5965 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
5966 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf@circ@res@up}}
5967 \pgfusepath{draw}
5968
5969 \pgfscope
5970 \pgfpathmoveto{\pgfpoint
5971 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf@circ@res@left}
5972 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@up}}
5973 \pgfpathlineto{\pgfpoint
5974 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf@circ@res@left}
5975 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@down}}
5976 %\pgfsetlinewidth{2\pgflinewidth}
5977 \pgfusepath{draw}
5978 \endpgfscope
5979
5980 \pgfscope
5981 \pgfpathmoveto{\pgfpoint
5982 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
5983 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@up}}
5984 \pgfpathlineto{\pgfpoint
5985 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
5986 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@down}}
5987 \pgfsetlinewidth{2\pgflinewidth}
5988 \pgfusepath{draw}
5989 \endpgfscope
5990
5991 \pgfpathmoveto{\pgfpoint
5992 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
5993 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf@circ@res@down}}
5994 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
5995 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf@circ@res@down}}
5996 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5997 \pgfusepath{draw}
5998
5999 \pgfscope
6000 \pgfslopedattimetrue
6001 \pgfallowupsidedownattimetrue
6002 \pgfresetnontranslationattimefalse
6003 \pgftransformlineattime{.5}{%
6004 \pgfpoint%
6005 {\pgf@circ@res@right}%
6006 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf@circ@res@up}%
6007 }{%
6008 \pgfpoint
6009 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}%
6010 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf@circ@res@up}%
6011 }
6012 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6013 \endpgfscope
6014
6015 \pgfpathmoveto{\pgfpoint
6016 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf@circ@res@left}
6017 {\pgf@circ@res@up+\pgf@circ@res@down}}
6018 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
6019 \pgfusepath{draw}
6020
6021
6022 }
6023
6024
6025
6026 \pgfcircdeclaretransistor{nigbt}{
6027 \anchor{C}{
6028 \northeast
6029 }
6030 \anchor{collector}{
6031 \northeast
6032 }
6033 \anchor{B}{
6034 \left
6035 }
6036 \anchor{base}{
6037 \left
6038 }
6039 \anchor{E}{
6040 \northeast
6041 \pgf@y=-\pgf@y
6042 }
6043 \anchor{emitter}{
6044 \northeast
6045 \pgf@y=-\pgf@y
6046 }
6047 }{
6048 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6049 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6050 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf@circ@res@up}}
6051 \pgfpathlineto{\pgfpoint
6052 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
6053 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf@circ@res@up}}
6054 \pgfusepath{draw}
6055
6056 \pgfscope
6057 \pgfpathmoveto{\pgfpoint
6058 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf@circ@res@left}
6059 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@up}}
6060 \pgfpathlineto{\pgfpoint
6061 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf@circ@res@left}
6062 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@down}}
6063 \pgfsetlinewidth{2\pgflinewidth}
6064 \pgfusepath{draw}
6065 \endpgfscope
6066
6067 \pgfscope
6068 \pgfpathmoveto{\pgfpoint
6069 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
6070 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@up}}
6071 \pgfpathlineto{\pgfpoint
6072 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
6073 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@down}}
6074 %\pgfsetlinewidth{2\pgflinewidth}
6075 \pgfusepath{draw}
6076 \endpgfscope
6077
6078 \pgfpathmoveto{\pgfpoint
6079 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
6080 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf@circ@res@down}}
6081 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6082 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf@circ@res@down}}
6083 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6084 \pgfusepath{draw}
6085
6086 \pgfscope
6087 \pgfslopedattimetrue
6088 \pgfallowupsidedownattimetrue
6089 \pgfresetnontranslationattimefalse
6090 \pgftransformlineattime{.5}{%
6091 \pgfpoint%
6092 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}%
6093 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf@circ@res@down}%
6094 }{%
6095 \pgfpoint{\pgf@circ@res@right}%
6096 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf@circ@res@down}%
6097 }
6098 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6099 \endpgfscope
6100
6101 \pgfpathmoveto{\pgfpoint
6102 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf@circ@res@left}
6103 {\pgf@circ@res@up+\pgf@circ@res@down}}
6104 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
6105 \pgfusepath{draw}
6106
6107
6108 }
6109
6110
6111
6112
6113
6114
6115
6116
6117 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6118 %%% Contrib
6119
6120
6121 %%
6122 % IGFET (e.g. MOSFET)
6123 \long\def\pgfcircdeclarefet#1#2#3{
6124 \pgfcircdeclaretransistor{#1}{
6125 \anchor{B}{
6126 \left
6127 \pgf@x=\pgf@circ@res@right
6128 }
6129 \anchor{base}{
6130 \left
6131 \pgf@x=\pgf@circ@res@right
6132 }
6133 #2
6134 }
6135 {#3}
6136 }
6137
6138
6139
6140 \pgfcircdeclarefet{nfet}{
6141 \anchor{D}{
6142 \northeast
6143 }
6144 \anchor{drain}{
6145 \northeast
6146 }
6147 \anchor{S}{
6148 \northeast
6149 \pgf@y=-\pgf@y
6150 }
6151 \anchor{source}{
6152 \northeast
6153 \pgf@y=-\pgf@y
6154 }
6155 \anchor{G}{
6156 \left
6157 }
6158 \anchor{gate}{
6159 \left
6160 }
6161
6162 }{%
6163 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6164 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6165 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf@circ@res@up}}
6166 \pgfpathlineto{\pgfpoint
6167 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
6168 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf@circ@res@up}}
6169
6170 \pgfpathmoveto{\pgfpoint
6171 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
6172 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@up}}
6173 \pgfpathlineto{\pgfpoint
6174 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
6175 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@up*0.45}}
6176 \pgfpathmoveto{\pgfpoint
6177 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
6178 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@up*0.25}}
6179 \pgfpathlineto{\pgfpoint
6180 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
6181 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@down*0.25}}
6182 \pgfpathmoveto{\pgfpoint
6183 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
6184 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@down*0.45}}
6185 \pgfpathlineto{\pgfpoint
6186 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
6187 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@down}}
6188
6189 \pgfpathmoveto{\pgfpoint
6190 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
6191 {\pgf@circ@res@up+\pgf@circ@res@down}}
6192 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6193 {\pgf@circ@res@up+\pgf@circ@res@down}}
6194
6195 \pgfpathmoveto{\pgfpoint
6196 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
6197 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf@circ@res@down}}
6198 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6199 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf@circ@res@down}}
6200 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6201 \pgfusepath{draw}
6202
6203 \pgfscope
6204 \pgfpathmoveto{\pgfpoint
6205 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf@circ@res@left}
6206 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf@circ@res@up}}
6207 \pgfpathlineto{\pgfpoint
6208 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf@circ@res@left}
6209 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf@circ@res@down}}
6210 \pgfsetlinewidth{2\pgflinewidth}
6211 \pgfusepath{draw}
6212 \endpgfscope
6213
6214 \pgfscope
6215 \pgfslopedattimetrue
6216 \pgfallowupsidedownattimetrue
6217 \pgfresetnontranslationattimefalse
6218 \pgftransformlineattime{.6}{%
6219 \pgfpoint
6220 {\pgf@circ@res@right}%
6221 {\pgf@circ@res@up+\pgf@circ@res@down}%
6222 }{%
6223 \pgfpoint%
6224 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}%
6225 {\pgf@circ@res@up+\pgf@circ@res@down}%
6226 }
6227 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6228 \endpgfscope
6229
6230
6231 \pgfpathmoveto{\pgfpoint
6232 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf@circ@res@left}
6233 {\pgf@circ@res@up+\pgf@circ@res@down}}
6234 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
6235 \pgfusepath{draw}
6236 }
6237
6238
6239 \pgfcircdeclarefet{pfet}{
6240 \anchor{D}{
6241 \northeast
6242 }
6243 \anchor{drain}{
6244 \northeast
6245 }
6246 \anchor{S}{
6247 \northeast
6248 \pgf@y=-\pgf@y
6249 }
6250 \anchor{source}{
6251 \northeast
6252 \pgf@y=-\pgf@y
6253 }
6254 \anchor{G}{
6255 \left
6256 }
6257 \anchor{gate}{
6258 \left
6259 }
6260
6261 }{%
6262 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6263 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6264 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf@circ@res@up}}
6265 \pgfpathlineto{\pgfpoint
6266 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
6267 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf@circ@res@up}}
6268 \pgfusepath{draw}
6269
6270 \pgfscope
6271 \pgfpathmoveto{\pgfpoint
6272 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
6273 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf@circ@res@up}}
6274 \pgfpathlineto{\pgfpoint
6275 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
6276 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf@circ@res@up*0.45}}
6277 \pgfpathmoveto{\pgfpoint
6278 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
6279 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf@circ@res@up*0.25}}
6280 \pgfpathlineto{\pgfpoint
6281 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
6282 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf@circ@res@down*0.25}}
6283 \pgfpathmoveto{\pgfpoint
6284 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
6285 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf@circ@res@down*0.45}}
6286 \pgfpathlineto{\pgfpoint
6287 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
6288 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf@circ@res@down}}
6289 \pgfsetlinewidth{2\pgflinewidth}
6290 \pgfusepath{draw}
6291 \endpgfscope
6292
6293 \pgfpathmoveto{\pgfpoint
6294 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
6295 {\pgf@circ@res@up+\pgf@circ@res@down}}
6296 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6297 {\pgf@circ@res@up+\pgf@circ@res@down}}
6298
6299 \pgfpathmoveto{\pgfpoint
6300 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
6301 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf@circ@res@down}}
6302 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6303 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf@circ@res@down}}
6304 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6305 \pgfusepath{draw}
6306
6307 \pgfscope
6308 \pgfpathmoveto{\pgfpoint
6309 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf@circ@res@left}
6310 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf@circ@res@up}}
6311 \pgfpathlineto{\pgfpoint
6312 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf@circ@res@left}
6313 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf@circ@res@down}}
6314 %\pgfsetlinewidth{2\pgflinewidth}
6315 \pgfusepath{draw}
6316 \endpgfscope
6317
6318 \pgfscope
6319 \pgfslopedattimetrue
6320 \pgfallowupsidedownattimetrue
6321 \pgfresetnontranslationattimefalse
6322 \pgftransformlineattime{.6}{%
6323 \pgfpoint
6324 {\pgf@circ@res@right}%
6325 {\pgf@circ@res@up+\pgf@circ@res@down}%
6326 }{%
6327 \pgfpoint%
6328 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}%
6329 {\pgf@circ@res@up+\pgf@circ@res@down}%
6330 }
6331 \pgftransformrotate{180}
6332 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6333 \endpgfscope
6334
6335
6336 \pgfpathmoveto{\pgfpoint
6337 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf@circ@res@left}
6338 {\pgf@circ@res@up+\pgf@circ@res@down}}
6339 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
6340 \pgfusepath{draw}
6341 }
6342
6343
6344
6345 % N-CHANNEL IGFET ENHANCEMENT TYPE
6346 \pgfcircdeclarefet{nigfete}{
6347 \anchor{D}{
6348 \northeast
6349 }
6350 \anchor{drain}{
6351 \northeast
6352 }
6353 \anchor{S}{
6354 \northeast
6355 \pgf@y=-\pgf@y
6356 }
6357 \anchor{source}{
6358 \northeast
6359 \pgf@y=-\pgf@y
6360 }
6361 \anchor{G}{
6362 \northeast
6363 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
6364 \left
6365 \pgf@y=-\pgf@circ@res@step
6366 }
6367 \anchor{gate}{
6368 \northeast
6369 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
6370 }
6371 }{%
6372 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6373 % DRAIN CONNECTION
6374 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6375 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@up}}
6376 % DRAIN
6377 \pgfpathlineto{\pgfpoint
6378 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
6379 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@up}}
6380
6381 % GATE, ENHANCEMENT TYPE (DASHED)
6382 \pgfpathmoveto{\pgfpoint
6383 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
6384 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf@circ@res@up}}
6385 \pgfpathlineto{\pgfpoint
6386 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
6387 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf@circ@res@up*0.45}}
6388 \pgfpathmoveto{\pgfpoint
6389 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
6390 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf@circ@res@up*0.25}}
6391 \pgfpathlineto{\pgfpoint
6392 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
6393 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf@circ@res@down*0.25}}
6394 \pgfpathmoveto{\pgfpoint
6395 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
6396 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf@circ@res@down*0.45}}
6397 \pgfpathlineto{\pgfpoint
6398 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
6399 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf@circ@res@down}}
6400
6401 % BULK
6402 \pgfpathmoveto{\pgfpoint
6403 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
6404 {\pgf@circ@res@up+\pgf@circ@res@down}}
6405 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6406 {\pgf@circ@res@up+\pgf@circ@res@down}}
6407
6408 % SOURCE
6409 \pgfpathmoveto{\pgfpoint
6410 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
6411 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6412 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6413 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6414 % SOURCE CONNECTION
6415 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6416 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6417 \pgfusepath{draw}
6418
6419 % GATE
6420 \pgfscope
6421 \pgfpathmoveto{\pgfpoint
6422 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf@circ@res@left}
6423 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@up}}
6424 \pgfpathlineto{\pgfpoint
6425 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf@circ@res@left}
6426 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6427 \pgfsetlinewidth{2\pgflinewidth}
6428 \pgfusepath{draw}
6429 \endpgfscope
6430
6431 % ARROW
6432 \pgfscope
6433 \pgfslopedattimetrue
6434 \pgfallowupsidedownattimetrue
6435 \pgfresetnontranslationattimefalse
6436 \pgftransformlineattime{.6}{%
6437 \pgfpoint
6438 {\pgf@circ@res@right}%
6439 {\pgf@circ@res@up+\pgf@circ@res@down}%
6440 }{%
6441 \pgfpoint%
6442 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}%
6443 {\pgf@circ@res@up+\pgf@circ@res@down}%
6444 }
6445 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6446 \endpgfscope
6447
6448 % GATE CONNECTION
6449 \pgfpathmoveto{\pgfpoint
6450 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf@circ@res@left}
6451 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6452 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6453 \pgfusepath{draw}
6454 }
6455
6456 % N-CHANNEL IGFET DEPLETION TYPE
6457 \pgfcircdeclarefet{nigfetd}{
6458 \anchor{D}{
6459 \northeast
6460 }
6461 \anchor{drain}{
6462 \northeast
6463 }
6464 \anchor{S}{
6465 \northeast
6466 \pgf@y=-\pgf@y
6467 }
6468 \anchor{source}{
6469 \northeast
6470 \pgf@y=-\pgf@y
6471 }
6472 \anchor{G}{
6473 \northeast
6474 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
6475 \left
6476 \pgf@y=-\pgf@circ@res@step
6477 }
6478 \anchor{gate}{
6479 \northeast
6480 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
6481 }
6482
6483 }{%
6484 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6485 % DRAIN CONNECTION
6486 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6487 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@up}}
6488 % DRAIN
6489 \pgfpathlineto{\pgfpoint
6490 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf@circ@res@left}
6491 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@up}}
6492
6493 % GATE, DEPLETION TYPE
6494 \pgfpathmoveto{\pgfpoint
6495 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf@circ@res@left}
6496 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base height}\pgf@circ@res@up}}
6497 \pgfpathlineto{\pgfpoint
6498 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf@circ@res@left}
6499 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base height}\pgf@circ@res@down}}
6500
6501 % BULK
6502 \pgfpathmoveto{\pgfpoint
6503 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf@circ@res@left}
6504 {\pgf@circ@res@up+\pgf@circ@res@down}}
6505 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6506 {\pgf@circ@res@up+\pgf@circ@res@down}}
6507
6508 % SOURCE
6509 \pgfpathmoveto{\pgfpoint
6510 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf@circ@res@left}
6511 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@down}}
6512 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6513 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@down}}
6514 % SOURCE CONNECTION
6515 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6516 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6517 \pgfusepath{draw}
6518
6519 % GATE
6520 \pgfscope
6521 \pgfpathmoveto{\pgfpoint
6522 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf@circ@res@left}
6523 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@up}}
6524 \pgfpathlineto{\pgfpoint
6525 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf@circ@res@left}
6526 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@down}}
6527 \pgfsetlinewidth{2\pgflinewidth}
6528 \pgfusepath{draw}
6529 \endpgfscope
6530
6531 % ARROW
6532 \pgfscope
6533 \pgfslopedattimetrue
6534 \pgfallowupsidedownattimetrue
6535 \pgfresetnontranslationattimefalse
6536 \pgftransformlineattime{.6}{%
6537 \pgfpoint
6538 {\pgf@circ@res@right}%
6539 {\pgf@circ@res@up+\pgf@circ@res@down}%
6540 }{%
6541 \pgfpoint%
6542 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf@circ@res@left}%
6543 {\pgf@circ@res@up+\pgf@circ@res@down}%
6544 }
6545 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6546 \endpgfscope
6547
6548 % GATE CONNECTION
6549 \pgfpathmoveto{\pgfpoint
6550 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf@circ@res@left}
6551 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@down}}
6552 %\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
6553 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@down}}
6554 \pgfusepath{draw}
6555 }
6556
6557 % P-CHANNEL IGFET ENHANCEMENT TYPE
6558 \pgfcircdeclarefet{pigfete}{
6559 \anchor{D}{
6560 \northeast
6561 }
6562 \anchor{drain}{
6563 \northeast
6564 }
6565 \anchor{S}{
6566 \northeast
6567 \pgf@y=-\pgf@y
6568 }
6569 \anchor{source}{
6570 \northeast
6571 \pgf@y=-\pgf@y
6572 }
6573 \anchor{G}{
6574 \northeast
6575 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
6576 \left
6577 \pgf@y=-\pgf@circ@res@step
6578 }
6579 \anchor{gate}{
6580 \northeast
6581 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
6582 }
6583 }{%
6584 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6585 % DRAIN CONNECTION
6586 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6587 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@up}}
6588 % DRAIN
6589 \pgfpathlineto{\pgfpoint
6590 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
6591 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@up}}
6592 \pgfusepath{draw}
6593
6594 % GATE, DASHED, BOLD
6595 \pgfscope
6596 \pgfpathmoveto{\pgfpoint
6597 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
6598 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf@circ@res@up}}
6599 \pgfpathlineto{\pgfpoint
6600 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
6601 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf@circ@res@up*0.45}}
6602 \pgfpathmoveto{\pgfpoint
6603 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
6604 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf@circ@res@up*0.25}}
6605 \pgfpathlineto{\pgfpoint
6606 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
6607 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf@circ@res@down*0.25}}
6608 \pgfpathmoveto{\pgfpoint
6609 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
6610 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf@circ@res@down*0.45}}
6611 \pgfpathlineto{\pgfpoint
6612 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
6613 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf@circ@res@down}}
6614 \pgfsetlinewidth{2\pgflinewidth}
6615 \pgfusepath{draw}
6616 \endpgfscope
6617
6618 % BULK
6619 \pgfpathmoveto{\pgfpoint
6620 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
6621 {\pgf@circ@res@up+\pgf@circ@res@down}}
6622 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6623 {\pgf@circ@res@up+\pgf@circ@res@down}}
6624
6625 % SOURCE
6626 \pgfpathmoveto{\pgfpoint
6627 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
6628 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@down}}
6629 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6630 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@down}}
6631 % SOURCE CONNECTION
6632 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6633 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6634 \pgfusepath{draw}
6635
6636 % GATE
6637 \pgfscope
6638 \pgfpathmoveto{\pgfpoint
6639 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf@circ@res@left}
6640 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@up}}
6641 \pgfpathlineto{\pgfpoint
6642 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf@circ@res@left}
6643 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@down}}
6644 %\pgfsetlinewidth{2\pgflinewidth}
6645 \pgfusepath{draw}
6646 \endpgfscope
6647
6648 % ARROW
6649 \pgfscope
6650 \pgfslopedattimetrue
6651 \pgfallowupsidedownattimetrue
6652 \pgfresetnontranslationattimefalse
6653 % Arrow has to be rotated, as this is a p-channel fet
6654 \pgftransformrotate{180}
6655 \pgftransformlineattime{-.6}{%
6656 \pgfpoint
6657 {\pgf@circ@res@right}%
6658 {\pgf@circ@res@up+\pgf@circ@res@down}%
6659 }{%
6660 \pgfpoint%
6661 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}%
6662 {\pgf@circ@res@up+\pgf@circ@res@down}%
6663 }
6664 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6665 \endpgfscope
6666
6667 % GATE CONNECTION (in line with source)
6668 \pgfpathmoveto{\pgfpoint
6669 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf@circ@res@left}
6670 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@down}}
6671 %\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
6672 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@down}}
6673 \pgfusepath{draw}
6674 }
6675
6676 % P-CHANNEL IGFET DEPLETION TYPE
6677 \pgfcircdeclarefet{pigfetd}{
6678 \anchor{D}{
6679 \northeast
6680 }
6681 \anchor{drain}{
6682 \northeast
6683 }
6684 \anchor{S}{
6685 \northeast
6686 \pgf@y=-\pgf@y
6687 }
6688 \anchor{source}{
6689 \northeast
6690 \pgf@y=-\pgf@y
6691 }
6692 \anchor{G}{
6693 \northeast
6694 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
6695 \left
6696 \pgf@y=-\pgf@circ@res@step
6697 }
6698 \anchor{gate}{
6699 \northeast
6700 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
6701 }
6702 }{%
6703 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6704 % DRAIN CONNECTION
6705 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6706 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@up}}
6707 % DRAIN
6708 \pgfpathlineto{\pgfpoint
6709 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf@circ@res@left}
6710 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@up}}
6711
6712 \pgfusepath{draw}
6713
6714
6715 % GATE DEPLETION TYPE
6716 \pgfscope
6717 \pgfpathmoveto{\pgfpoint
6718 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf@circ@res@left}
6719 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base height}\pgf@circ@res@up}}
6720 \pgfpathlineto{\pgfpoint
6721 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf@circ@res@left}
6722 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base height}\pgf@circ@res@down}}
6723 \pgfsetlinewidth{2\pgflinewidth}
6724 \pgfusepath{draw}
6725 \endpgfscope
6726
6727 % BULK
6728
6729 \pgfpathmoveto{\pgfpoint
6730 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf@circ@res@left}
6731 {\pgf@circ@res@up+\pgf@circ@res@down}}
6732 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6733 {\pgf@circ@res@up+\pgf@circ@res@down}}
6734
6735
6736 % SOURCE
6737 \pgfpathmoveto{\pgfpoint
6738 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf@circ@res@left}
6739 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@down}}
6740 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6741 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@down}}
6742 % SOURCE CONNECTION
6743 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6744 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6745 \pgfusepath{draw}
6746
6747 % GATE
6748 \pgfscope
6749 \pgfpathmoveto{\pgfpoint
6750 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf@circ@res@left}
6751 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@up}}
6752 \pgfpathlineto{\pgfpoint
6753 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf@circ@res@left}
6754 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@down}}
6755 %\pgfsetlinewidth{2\pgflinewidth}
6756 \pgfusepath{draw}
6757 \endpgfscope
6758
6759 % ARROW
6760 \pgfscope
6761 \pgfslopedattimetrue
6762 \pgfallowupsidedownattimetrue
6763 \pgfresetnontranslationattimefalse
6764 % PFET!
6765 \pgftransformrotate{180}
6766 \pgftransformlineattime{-.6}{%
6767 \pgfpoint
6768 {\pgf@circ@res@right}%
6769 {\pgf@circ@res@up+\pgf@circ@res@down}%
6770 }{%
6771 \pgfpoint%
6772 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}%
6773 {\pgf@circ@res@up+\pgf@circ@res@down}%
6774 }
6775 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6776 \endpgfscope
6777
6778 % GATE CONNECTION
6779 \pgfpathmoveto{\pgfpoint
6780 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf@circ@res@left}
6781 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@down}}
6782 %\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
6783 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@down}}
6784 \pgfusepath{draw}
6785 }
6786
6787
6788
6789 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6790
6791 %% Contrib Danilo Piazzalunga
6792
6793
6794
6795
6796
6797
6798 \pgfcircdeclaretransistor{njfet}{
6799 \anchor{G}{
6800 \left
6801 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6802 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/height}\pgf@y
6803 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@y
6804 \pgf@y=-.5\pgf@y
6805 }
6806 \anchor{gate}{
6807 \left
6808 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6809 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/height}\pgf@y
6810 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@y
6811 \pgf@y=-.5\pgf@y
6812 }
6813 \anchor{D}{
6814 \northeast
6815 }
6816 \anchor{drain}{
6817 \northeast
6818 }
6819 \anchor{S}{
6820 \northeast
6821 \pgf@y=-\pgf@y
6822 }
6823 \anchor{source}{
6824 \northeast
6825 \pgf@y=-\pgf@y
6826 }
6827 }{%
6828 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6829 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6830 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}}
6831 \pgfpathlineto{\pgfpoint
6832 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6833 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}}
6834
6835 \pgfpathmoveto{\pgfpoint
6836 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6837 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6838 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6839 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6840 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6841 \pgfusepath{draw}
6842
6843 \pgfscope
6844 \pgfpathmoveto{\pgfpoint
6845 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6846 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf@circ@res@up}}
6847 \pgfpathlineto{\pgfpoint
6848 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6849 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf@circ@res@down}}
6850 \pgfsetlinewidth{2\pgflinewidth}
6851 \pgfusepath{draw}
6852 \endpgfscope
6853
6854 \pgfscope
6855 \pgfslopedattimetrue
6856 \pgfallowupsidedownattimetrue
6857 \pgfresetnontranslationattimefalse
6858 \pgftransformlineattime{.6}{%
6859 \pgfpoint{\pgf@circ@res@left}%
6860 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}%
6861 }{%
6862 \pgfpoint
6863 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}%
6864 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}%
6865 }
6866 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6867 \endpgfscope
6868
6869
6870 \pgfpathmoveto{\pgfpoint
6871 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
6872 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6873 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}
6874 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
6875 \pgfusepath{draw}
6876 }
6877
6878
6879 \pgfcircdeclaretransistor{pjfet}{
6880 \anchor{G}{
6881 \left
6882 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6883 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/height}\pgf@y
6884 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@y
6885 \pgf@y=.5\pgf@y
6886 }
6887 \anchor{gate}{
6888 \left
6889 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
6890 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/height}\pgf@y
6891 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@y
6892 \pgf@y=.5\pgf@y
6893 }
6894 \anchor{S}{
6895 \northeast
6896 }
6897 \anchor{source}{
6898 \northeast
6899 }
6900 \anchor{D}{
6901 \northeast
6902 \pgf@y=-\pgf@y
6903 }
6904 \anchor{drain}{
6905 \northeast
6906 \pgf@y=-\pgf@y
6907 }
6908 }{%
6909 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6910 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6911 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6912 \pgfpathlineto{\pgfpoint
6913 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6914 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6915
6916 \pgfpathmoveto{\pgfpoint
6917 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6918 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}}
6919 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6920 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}}
6921 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6922 \pgfusepath{draw}
6923
6924 \pgfscope
6925 \pgfpathmoveto{\pgfpoint
6926 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6927 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf@circ@res@up}}
6928 \pgfpathlineto{\pgfpoint
6929 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6930 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf@circ@res@down}}
6931 \pgfsetlinewidth{2\pgflinewidth}
6932 \pgfusepath{draw}
6933 \endpgfscope
6934
6935 \pgfscope
6936 \pgfslopedattimetrue
6937 \pgfallowupsidedownattimetrue
6938 \pgfresetnontranslationattimefalse
6939 \pgftransformlineattime{.4}{%
6940 \pgfpoint%
6941 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}%
6942 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}%
6943 }{%
6944 \pgfpoint{\pgf@circ@res@left}%
6945 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}%
6946 }
6947 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6948 \endpgfscope
6949
6950
6951 \pgfpathmoveto{\pgfpoint
6952 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
6953 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6954 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}
6955 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
6956 \pgfusepath{draw}
6957 }
6958
6959
6960
6961
6962
6963
6964
6965
6966 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6967
6968
6969
6970
6971
6972
6973
6974 % ISFET
6975 \pgfcircdeclarefet{isfet}{
6976 \anchor{D}{
6977 \northeast
6978 }
6979 \anchor{drain}{
6980 \northeast
6981 }
6982 \anchor{S}{
6983 \northeast
6984 \pgf@y=-\pgf@y
6985 }
6986 \anchor{source}{
6987 \northeast
6988 \pgf@y=-\pgf@y
6989 }
6990 }{%
6991 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
6992 % DRAIN CONNECTION
6993 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6994 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
6995 % DRAIN
6996 \pgfpathlineto{\pgfpoint
6997 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
6998 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
6999 \pgfusepath{draw}
7000
7001 % GATE, DEPLETION TYPE
7002 \pgfscope %% added
7003 \pgfpathmoveto{\pgfpoint
7004 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7005 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@up}}
7006 \pgfpathlineto{\pgfpoint
7007 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7008 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@down}}
7009 \pgfsetlinewidth{2\pgflinewidth} %% added
7010 \pgfusepath{draw} %% added
7011 \endpgfscope %% added
7012
7013 % BULK
7014 \pgfpathmoveto{\pgfpoint
7015 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7016 {\pgf@circ@res@up+\pgf@circ@res@down}}
7017 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
7018 {\pgf@circ@res@up+\pgf@circ@res@down}}
7019
7020 % SOURCE
7021 \pgfpathmoveto{\pgfpoint
7022 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7023 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
7024 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
7025 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
7026 % SOURCE CONNECTION
7027 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7028 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
7029 \pgfusepath{draw}
7030
7031 % GATE
7032 %\pgfscope
7033 %\pgfpathmoveto{\pgfpoint
7034 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf@circ@res@left}
7035 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
7036 %\pgfpathlineto{\pgfpoint
7037 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf@circ@res@left}
7038 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
7039 %\pgfsetlinewidth{2\pgflinewidth}
7040 %\pgfusepath{draw}
7041 %\endpgfscope
7042
7043 % ARROW
7044 \pgfscope
7045 \pgfslopedattimetrue
7046 \pgfallowupsidedownattimetrue
7047 \pgfresetnontranslationattimefalse
7048 \pgftransformlineattime{.6}{%
7049 \pgfpoint
7050 {\pgf@circ@res@right}%
7051 {\pgf@circ@res@up+\pgf@circ@res@down}%
7052 }{%
7053 \pgfpoint%
7054 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}%
7055 {\pgf@circ@res@up+\pgf@circ@res@down}%
7056 }
7057 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
7058 \endpgfscope
7059 \pgfusepath{draw}
7060
7061 % Wavy lines
7062 \pgfscope
7063 \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}}
7064 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7065 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7066 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7067 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7068 \pgfusepath{draw}
7069
7070 \pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf@circ@res@up}{0cm}}
7071 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7072 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7073 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7074 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7075 \pgfusepath{draw}
7076
7077 \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}}
7078 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7079 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7080 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7081 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7082 \pgfusepath{draw}
7083 \endpgfscope
7084
7085 }
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100 %% Black thyristor
7101
7102 \pgfcircdeclarebipole{
7103 \anchor{gate}{
7104 \northeast
7105 }
7106 \anchor{anode}{
7107 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
7108 \pgf@y=0cm
7109 }
7110 \anchor{G}{
7111 \northeast
7112 }
7113 \anchor{cathode}{
7114 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
7115 \pgf@y=0cm
7116 }
7117 }{\ctikzvalof{tripoles/thyristor/height 2}}{thyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
7118
7119 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7120
7121 \pgf@circ@res@other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf@circ@res@left
7122 \pgf@circ@res@step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf@circ@res@right
7123
7124 \pgfscope
7125 \pgftransformxshift{\pgf@circ@res@other}
7126 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7127
7128 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7129 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7130 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7131 \pgfusepath{draw,fill}
7132
7133 \pgfsetlinewidth{\pgfstartlinewidth}
7134
7135 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7136 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf@circ@res@up}}
7137 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\pgf@circ@res@up}}
7138 \pgfusepath{draw}
7139 \endpgfscope
7140
7141 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
7142 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@down}}
7143
7144 \pgfusepath{draw}
7145
7146 \pgfsetlinewidth{\pgfstartlinewidth}
7147
7148 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7149 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7150
7151 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7152 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7153
7154 \pgfusepath{draw}
7155
7156 }
7157
7158
7159 %% Empty triac
7160
7161 \pgfcircdeclarebipole{
7162 \anchor{gate}{
7163 \northeast
7164 }
7165 \anchor{G}{
7166 \northeast
7167 }
7168 \anchor{anode}{
7169 \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
7170 \pgf@y=0cm
7171 }
7172 \anchor{cathode}{
7173 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
7174 \pgf@y=0cm
7175 }
7176 }{\ctikzvalof{tripoles/triac/height}}{triac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
7177
7178 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7179
7180 \pgf@circ@res@other = \ctikzvalof{tripoles/triac/diode width left}\pgf@circ@res@left
7181 \pgf@circ@res@step = \ctikzvalof{tripoles/triac/diode width right}\pgf@circ@res@right
7182
7183 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7184 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7185 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7186 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7187
7188 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7189 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7190 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7191 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7192
7193 \pgfusepath{draw}
7194
7195 \pgfsetlinewidth{\pgfstartlinewidth}
7196
7197 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7198 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7199 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % sqrt(1/2)
7200
7201 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7202 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7203
7204 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7205 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7206
7207 \pgfusepath{draw}
7208
7209 }
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219 \pgfcircdeclarebipole{
7220 \anchor{out 1}{
7221 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
7222 \pgf@y=0cm
7223 }
7224 \anchor{out 2}{
7225 \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
7226 \pgf@y=.8\pgf@y
7227 }
7228 }{\ctikzvalof{tripoles/toggleswitch/height 2}}{toggleswitch}{\ctikzvalof{tripoles/toggleswitch/height}}{\ctikzvalof{tripoles/toggleswitch/width}}{
7229
7230 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7231 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@left}{0pt}}
7232 \pgfusepath{draw}
7233 \pgfscope
7234 \pgfpathmoveto{\pgfpoint{.3\pgf@circ@res@left}{0pt}}
7235 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7236 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{.5\pgf@circ@res@up}}
7237 \pgfusepath{draw}
7238 \endpgfscope
7239
7240 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7241 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{0}}
7242
7243 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{.8\pgf@circ@res@up}}
7244 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.8\pgf@circ@res@up}}
7245 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.15\pgf@circ@res@up}}
7246 \pgfusepath{draw}
7247
7248
7249 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@left}{\pgf@circ@res@up}}
7250 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{\pgf@circ@res@up}}
7251 \pgfusepath{draw}
7252
7253 \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}
7254 \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@up}}
7255 \pgfpathlineto{\pgfpoint{0}{.8\pgf@circ@res@up}}
7256 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@left}{.6\pgf@circ@res@up}}
7257 \pgfpathlineto{\pgfpoint{0}{.4\pgf@circ@res@up}}
7258 \pgfpathlineto{\pgfpoint{0}{.2\pgf@circ@res@up}}
7259 \pgfusepath{draw}
7260 \pgfsetdash{}{0cm}
7261 }
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272 \pgfdeclareshape{op amp}
7273 {
7274 \anchor{center}{\pgfpointorigin}
7275 \savedanchor\northwest{%
7276 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7277 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
7278 \pgf@y=.5\pgf@y
7279 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7280 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
7281 \pgf@x=.5\pgf@x
7282 }
7283 \anchor{south}{
7284 \northwest
7285 \pgf@y=-\pgf@y
7286 }
7287 \anchor{north}{
7288 \northwest
7289 }
7290 \savedanchor\left{%
7291 \pgf@y=0pt
7292 }
7293 \savedanchor\inOne{%
7294 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7295 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
7296 \pgf@y=.5\pgf@y
7297 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
7298 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7299 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
7300 \pgf@x=.5\pgf@x
7301 }
7302 \anchor{-}{
7303 \inOne
7304 }
7305 \anchor{+}{
7306 \inOne
7307 \pgf@y=-\pgf@y
7308 }
7309 \savedanchor\up{%
7310 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7311 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
7312 \pgf@y=.5\pgf@y
7313 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7314 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
7315 \pgf@x=.5\pgf@x
7316 \pgf@circ@res@up = \pgf@y
7317 \pgf@circ@res@right = -\pgf@x
7318 \pgf@circ@res@left = \pgf@x
7319 \pgfpointlineattime{
7320 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
7321 \pgfpoint{
7322 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7323 {\pgf@circ@res@up}}
7324 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7325 }
7326 \anchor{up}{
7327 \up
7328 }
7329 \anchor{down}{
7330 \up
7331 \pgf@y=-\pgf@y
7332 }
7333 \anchor{out}{
7334 \northwest
7335 \pgf@y=0pt
7336 \pgf@x=-\pgf@x
7337 }
7338 \anchor{west}{
7339 \left
7340 }
7341 \anchor{east}{
7342 \left
7343 \pgf@x=-\pgf@x
7344 }
7345
7346 \backgroundpath{
7347 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7348
7349
7350 \northwest
7351 \pgf@circ@res@up = \pgf@y
7352 \pgf@circ@res@down = -\pgf@y
7353 \pgf@circ@res@right = -\pgf@x
7354 \pgf@circ@res@left = \pgf@x
7355
7356 \pgfpathmoveto{\pgfpoint
7357 {\pgf@circ@res@left}
7358 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
7359 \pgfpathlineto{\pgfpoint
7360 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7361 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
7362 \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}]{\scriptsize\ $-$}
7363
7364
7365 \pgfpathmoveto{\pgfpoint
7366 {\pgf@circ@res@left}
7367 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
7368 \pgfpathlineto{\pgfpoint
7369 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7370 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
7371 \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}]{\scriptsize\ $+$}
7372
7373 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7374 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7375
7376 \pgfusepath{draw}
7377
7378
7379 \pgfscope
7380 \pgfsetlinewidth{2\pgflinewidth}
7381 \pgftransformxshift{.7\pgf@circ@res@left}
7382 \pgf@circ@res@step=\pgf@circ@res@right
7383 \advance\pgf@circ@res@step by -\pgf@circ@res@left
7384 \pgf@circ@res@step=.7\pgf@circ@res@step
7385
7386 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7387 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7388 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7389 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7390 \pgfusepath{draw}
7391 \endpgfscope
7392
7393
7394
7395 }
7396 }
7397
7398
7399
7400
7401 %% Potentiometer
7402 \pgfcircdeclarebipole{
7403 \anchor{wiper}{
7404 \northeast
7405 \pgfpoint{0pt}{\pgf@y}
7406 }
7407 \anchor{W}{
7408 \northeast
7409 \pgfpoint{0pt}{\pgf@y}
7410 }
7411 }{\ctikzvalof{bipoles/potentiometer/height 2}}{potentiometer}{\ctikzvalof{bipoles/potentiometer/height}}{\ctikzvalof{bipoles/potentiometer/width}}{
7412 \pgf@circ@res@step = \ctikzvalof{bipoles/potentiometer/width}\pgf@circ@Rlen
7413 \divide \pgf@circ@res@step by 12
7414
7415 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
7416 \pgf@circ@res@other = \pgf@circ@res@left
7417 \advance\pgf@circ@res@other by \pgf@circ@res@step
7418
7419 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7420 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7421 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7422 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7423 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7424 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7425 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7426 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7427 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7428 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7429 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7430 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7431 \advance\pgf@circ@res@other by \pgf@circ@res@step
7432 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
7433 \pgfusepath{draw}
7434
7435 \pgfscope
7436 %\pgfsetlinewidth{\pgfstartlinewidth}
7437 \pgfsetarrowsend{latex'}
7438 \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7439 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7440 \pgfusepath{draw}
7441 \endpgfscope
7442 }
7443
7444
7445
7446
7447
7448 %% Generic tunable
7449
7450 \pgfcircdeclarebipole{
7451 \anchor{wiper}{
7452 \northeast
7453 \pgfpoint{0pt}{\pgf@y}
7454 }
7455 }{\ctikzvalof{bipoles/generic potentiometer/height 2}}{genericpotentiometer}{\ctikzvalof{bipoles/generic potentiometer/height}}{\ctikzvalof{bipoles/generic potentiometer/width}}{
7456
7457 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
7458 \divide \pgf@circ@res@step by 14
7459
7460 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
7461 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7462
7463 \pgfusepath{draw}
7464
7465 \pgfscope
7466 %\pgfsetlinewidth{\pgfstartlinewidth}
7467 \pgfsetarrowsend{latex'}
7468 \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7469 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7470 \pgfusepath{draw}
7471 \endpgfscope
7472 }
7473
7474
7475 \pgfdeclareshape{circulator}
7476 {
7477 \savedanchor\northwest{
7478 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7479 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@y
7480 \pgf@y=.5\pgf@y
7481 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7482 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@x
7483 \pgf@x=.5\pgf@x
7484 }
7485 \anchor{center}{
7486 \pgfpointorigin
7487 }
7488 \anchor{left}{%
7489 \northwest
7490 \pgf@y=0pt
7491 }
7492 \anchor{1}{
7493 \northwest
7494 \pgf@y=0pt
7495 }
7496 \anchor{2}{
7497 \northwest
7498 \pgf@y=0pt
7499 \pgf@x=-\pgf@x
7500 }
7501 \anchor{3}{
7502 \northwest
7503 \pgf@y=-\pgf@y
7504 \pgf@x=0pt
7505 }
7506 \anchor{east}{
7507 \northwest
7508 \pgf@y=0pt
7509 \pgf@x=-\pgf@x
7510 }
7511 \anchor{west}{
7512 \northwest
7513 \pgf@y=0pt
7514 }
7515 \anchor{south}{
7516 \northwest
7517 \pgf@x=0pt
7518 \pgf@y=-\pgf@y
7519 }
7520 \anchor{north}{
7521 \northwest
7522 \pgf@x=0pt
7523 }
7524 \anchor{south west}{
7525 \northwest
7526 \pgf@y=-\pgf@y
7527 }
7528 \anchor{north east}{
7529 \northwest
7530 \pgf@x=-\pgf@x
7531 }
7532 \anchor{north west}{
7533 \northwest
7534 }
7535 \anchor{south east}{
7536 \northwest
7537 \pgf@x=-\pgf@x
7538 \pgf@y=-\pgf@y
7539 }
7540 \backgroundpath{
7541 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7542
7543 \pgf@circ@res@step=\ctikzvalof{tripoles/circulator/width}\pgf@circ@Rlen
7544
7545 \pgfscope
7546 \pgfstartlinewidth=\pgflinewidth
7547
7548 % draw outer circle
7549 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7550 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
7551 \pgfusepath{draw}
7552
7553 % inner arrow
7554 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
7555 \pgfsetlinewidth{\pgfstartlinewidth}
7556 \pgfsetarrowsend{latex}
7557 \pgfpathmoveto{\pgfpoint{-0.25\pgf@circ@res@step}{0}}
7558 \pgfpatharc{180}{-90} {0.25\pgf@circ@res@step}
7559 \pgfpathlineto{\pgfpoint{-5pt}{-0.2\pgf@circ@res@step}}
7560 \pgfusepath{draw}
7561 \endpgfscope
7562 }
7563 }
7564
7565
7566 % Wilkinson divider
7567 \pgfdeclareshape{wilkinson}{
7568 \anchor{center}{
7569 \northwest
7570 \pgf@x=0pt
7571 \pgf@y=0pt
7572 }
7573 \savedanchor\northwest{%
7574 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7575 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/height}\pgf@y
7576 \pgf@y=.5\pgf@y
7577 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7578 \pgf@x=.5\pgf@x
7579 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/width}\pgf@x
7580 }
7581 \anchor{north}{
7582 \northwest
7583 \pgf@x=0pt
7584 }
7585 \anchor{south}{
7586 \northwest
7587 \pgf@x=0pt
7588 \pgf@y=-\pgf@y
7589 }
7590 \anchor{west}{
7591 \northwest
7592 \pgf@y=0pt
7593 }
7594 \anchor{east}{
7595 \northwest
7596 \pgf@y=0pt
7597 \pgf@x=-\pgf@x
7598 }
7599 \anchor{south west}{
7600 \northwest
7601 \pgf@y=-\pgf@y
7602 }
7603 \anchor{north east}{
7604 \northwest
7605 \pgf@x=-\pgf@x
7606 }
7607 \anchor{north west}{
7608 \northwest
7609 }
7610 \anchor{south east}{
7611 \northwest
7612 \pgf@x=-\pgf@x
7613 \pgf@y=-\pgf@y
7614 }
7615 \anchor{in}{
7616 \northwest
7617 \pgf@y=0pt
7618 }
7619 \anchor{out1}{
7620 \northwest
7621 \pgf@x=-\pgf@x
7622 \pgf@y=-0.5\pgf@y
7623 }
7624 \anchor{out2}{
7625 \northwest
7626 \pgf@x=-\pgf@x
7627 \pgf@y=0.5\pgf@y
7628 }
7629 \anchor{text}{
7630 \northwest
7631 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
7632 \pgf@x=-.5\wd\pgfnodeparttextbox
7633 }
7634 \backgroundpath{
7635 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7636
7637 \northwest
7638 \pgf@circ@res@up = \pgf@y
7639 \pgf@circ@res@down = -\pgf@y
7640 \pgf@circ@res@right = -\pgf@x
7641 \pgf@circ@res@left = \pgf@x
7642
7643 \pgfstartlinewidth=\pgflinewidth
7644
7645 % draw outer box
7646 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7647 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
7648 \pgfusepath{draw}
7649
7650 % draw inner stuff
7651 \pgfsetlinewidth{\pgfstartlinewidth}
7652 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7653 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
7654 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
7655 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
7656 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
7657 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
7658 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
7659
7660 \pgfusepath{draw}
7661
7662 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
7663 % draw inner resisitor - european or american style is recognised
7664 {
7665 \pgftransformshift{\pgfpoint{0.5\pgf@circ@res@right}{0pt}}
7666 \pgftransformrotate{90}
7667
7668 % calculate size of resistor
7669 \ifpgf@circuit@europeanresistor
7670 \pgfmathparse{\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/generic/width} / 2}
7671 \pgftransformscale{\pgfmathresult}
7672 \pgfnode{genericshape}{center}{}{pgf@generic}{\pgfusepath{fill}}
7673 \else
7674 \pgfmathparse{\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/resistor/width} / 2}
7675 \pgftransformscale{\pgfmathresult}
7676 \pgfnode{resistorshape}{center}{}{pgf@resistor}{\pgfusepath{fill}}
7677 \fi
7678 }
7679
7680 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
7681 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}}
7682
7683 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}}
7684 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
7685 \pgfusepath{draw}
7686
7687 }
7688 }
7689
7690
7691 %%%---------- close: pgfcirctripoles
7692 %%%%%%%%%%% Springe nach pgfcircquadpoles
7693 %%%---------- open: pgfcircquadpoles.tex
7694 % Copyright 2007-2009 by Massimo Redaelli
7695 %
7696 % This file may be distributed and/or modified
7697 %
7698 % 1. under the LaTeX Project Public License and/or
7699 % 2. under the GNU Public License.
7700 %
7701 % See the file doc/LICENSE for more details.
7702
7703 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7704 %% Quadripoles
7705
7706 \long\def\pgfcircdeclarequadpole#1#2#3{
7707 \pgfdeclareshape{#1}
7708 {
7709 \anchor{center}{
7710 \northwest
7711 \pgf@x=0pt
7712 }
7713 \savedanchor\northwest{%
7714 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7715 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@y
7716 \pgf@y=.5\pgf@y
7717 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7718 \pgf@x=.5\pgf@x
7719 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x
7720 }
7721 \anchor{A2}{
7722 \northwest
7723 \pgf@y=-\pgf@y
7724 }
7725 \anchor{B1}{
7726 \northwest
7727 \pgf@x=-\pgf@x
7728 }
7729 \anchor{A1}{
7730 \northwest
7731 }
7732 \anchor{B2}{
7733 \northwest
7734 \pgf@x=-\pgf@x
7735 \pgf@y=-\pgf@y
7736 }
7737 \anchor{north}{
7738 \northwest
7739 \pgf@x=0pt
7740 }
7741 \anchor{south}{
7742 \northwest
7743 \pgf@x=0pt
7744 \pgf@y=-\pgf@y
7745 }
7746 \anchor{west}{
7747 \northwest
7748 \pgf@y=0pt
7749 }
7750 \anchor{east}{
7751 \northwest
7752 \pgf@y=0pt
7753 \pgf@x=-\pgf@x
7754 }
7755 \anchor{south west}{
7756 \northwest
7757 \pgf@y=-\pgf@y
7758 }
7759 \anchor{north east}{
7760 \northwest
7761 \pgf@x=-\pgf@x
7762 }
7763 \anchor{north west}{
7764 \northwest
7765 }
7766 \anchor{south east}{
7767 \northwest
7768 \pgf@x=-\pgf@x
7769 \pgf@y=-\pgf@y
7770 }
7771 \anchor{base}{
7772 \northwest
7773 \pgf@x=0pt
7774 }
7775 #3
7776 \backgroundpath{
7777 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7778
7779 \northwest
7780 \pgf@circ@res@up = \pgf@y
7781 \pgf@circ@res@down = -\pgf@y
7782 \pgf@circ@res@right = -\pgf@x
7783 \pgf@circ@res@left = \pgf@x
7784
7785 %\pgf@circ@Rlen=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7786
7787 #2
7788
7789 }
7790 }
7791 }
7792
7793
7794
7795 \def\pgf@circ@drawtransformerbasicanchor{
7796 \pgfkeysvalueof{/tikz/circuitikz/quadpoles/trans/height}
7797 \anchor{AA2}{
7798 \northwest
7799 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
7800 \pgf@x=.7\pgf@x
7801 \pgf@y=-\pgf@y
7802 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
7803 }
7804 \anchor{BB1}{
7805 \northwest
7806 \pgf@x=-\pgf@x
7807 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
7808 \pgf@x=.7\pgf@x
7809 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
7810 }
7811 \anchor{AA1}{
7812 \northwest
7813 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
7814 \pgf@x=.7\pgf@x
7815 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
7816 }
7817 \anchor{BB2}{
7818 \northwest
7819 \pgf@x=-\pgf@x
7820 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
7821 \pgf@x=.7\pgf@x
7822 \pgf@y=-\pgf@y
7823 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
7824 }
7825 }
7826
7827 \def\pgf@circ@drawtransformerbasicbody{
7828 \def\stretto{.4}
7829 \pgfscope
7830 \pgfslopedattimetrue
7831 \pgfallowupsidedownattimetrue
7832 \pgftransformlineattime{.5}{%
7833 \pgfpoint%
7834 {\stretto\pgf@circ@res@left}%
7835 {\pgf@circ@res@up}%
7836 }{%
7837 \pgfpoint
7838 {\stretto\pgf@circ@res@left}%
7839 {\pgf@circ@res@down}%
7840 }
7841
7842 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
7843 \def\pgf@temp{european}%
7844 \ifx\pgf@temp\pgf@circ@temp%
7845 \pgfnode{fullgenericshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
7846 \else%
7847 \def\pgf@temp{cute}
7848 \ifx\pgf@temp\pgf@circ@temp%
7849 \pgfnode{cuteinductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
7850 \else%
7851 \pgfnode{americaninductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
7852 \fi%
7853 \fi%
7854
7855
7856 \endpgfscope
7857 \pgfscope
7858 \pgfslopedattimetrue
7859 \pgfallowupsidedownattimetrue
7860 \pgftransformlineattime{.5}{%
7861 \pgfpoint%
7862 {\stretto\pgf@circ@res@right}%
7863 {\pgf@circ@res@down}%
7864 }{%
7865 \pgfpoint
7866 {\stretto\pgf@circ@res@right}%
7867 {\pgf@circ@res@up}%
7868 }
7869
7870 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
7871 \def\pgf@temp{european}%
7872 \ifx\pgf@temp\pgf@circ@temp%
7873 \pgfnode{fullgenericshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
7874 \else%
7875 \def\pgf@temp{cute}
7876 \ifx\pgf@temp\pgf@circ@temp%
7877 \pgfnode{cuteinductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
7878 \else%
7879 \pgfnode{americaninductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
7880 \fi%
7881 \fi%
7882
7883 \endpgfscope
7884
7885 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
7886 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
7887 \pgfpathlineto{\pgfpointanchor{pgf@inductor1}{b}}
7888
7889 \pgfpathmoveto{\pgfpointanchor{pgf@inductor1}{a}}
7890 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
7891 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
7892
7893 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
7894 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
7895 \pgfpathlineto{\pgfpointanchor{pgf@inductor2}{a}}
7896
7897 \pgfpathmoveto{\pgfpointanchor{pgf@inductor2}{b}}
7898 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
7899 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
7900
7901 \pgfusepath{draw}
7902
7903 }
7904
7905
7906
7907 % contrib Kristofer M. Monisit
7908
7909 \pgfdeclareshape{fd op amp}
7910 {
7911 \anchor{center}{\pgfpointorigin}
7912 \savedanchor\northwest{%
7913 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7914 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
7915 \pgf@y=.5\pgf@y
7916 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7917 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
7918 \pgf@x=.5\pgf@x
7919 }
7920 \anchor{south}{
7921 \northwest
7922 \pgf@y=-\pgf@y
7923 }
7924 \anchor{north}{
7925 \northwest
7926 }
7927 \savedanchor\left{%
7928 \pgf@y=0pt
7929 }
7930 \savedanchor\inOne{%
7931 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7932 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
7933 \pgf@y=.5\pgf@y
7934 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
7935 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7936 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
7937 \pgf@x=.5\pgf@x
7938 }
7939 \anchor{-}{
7940 \inOne
7941 }
7942 \anchor{+}{
7943 \inOne
7944 \pgf@y=-\pgf@y
7945 }
7946 \savedanchor\up{%
7947 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7948 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
7949 \pgf@y=.5\pgf@y
7950 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
7951 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
7952 \pgf@x=.5\pgf@x
7953 \pgf@circ@res@up = \pgf@y
7954 \pgf@circ@res@right = -\pgf@x
7955 \pgf@circ@res@left = \pgf@x
7956 \pgfpointlineattime{
7957 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
7958 \pgfpoint{
7959 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7960 {\pgf@circ@res@up}}
7961 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7962 }
7963 \anchor{up}{
7964 \up
7965 }
7966 \anchor{down}{
7967 \up
7968 \pgf@y=-\pgf@y
7969 }
7970 \anchor{out +}{
7971 \northwest
7972 \pgf@y=.5\pgf@y
7973 \pgf@x=-.7\pgf@x
7974 }
7975 \anchor{out -}{
7976 \northwest
7977 \pgf@y=-.5\pgf@y
7978 \pgf@x=-.7\pgf@x
7979 }
7980 \anchor{west}{
7981 \left
7982 }
7983 \anchor{east}{
7984 \left
7985 \pgf@x=-\pgf@x
7986 }
7987
7988 \backgroundpath{
7989 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7990
7991 \northwest
7992 \pgf@circ@res@up = \pgf@y
7993 \pgf@circ@res@down = -\pgf@y
7994 \pgf@circ@res@right = -\pgf@x
7995 \pgf@circ@res@left = \pgf@x
7996
7997 % Negative input terminal
7998 \pgfpathmoveto{\pgfpoint
7999 {\pgf@circ@res@left}
8000 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8001 \pgfpathlineto{\pgfpoint
8002 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8003 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8004 \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}]{\scriptsize\ $-$}
8005
8006
8007 % Positive input terminal
8008 \pgfpathmoveto{\pgfpoint
8009 {\pgf@circ@res@left}
8010 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8011 \pgfpathlineto{\pgfpoint
8012 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8013 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8014 \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}]{\scriptsize\ $+$}
8015
8016
8017 % Negative output terminal
8018 \pgfpathmoveto{\pgfpoint
8019 {0.7\pgf@circ@res@right}
8020 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8021 \pgfpathlineto{\pgfpoint
8022 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
8023 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8024 \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@down}]{\scriptsize\ $-$}
8025
8026
8027 % Positive output terminal
8028 \pgfpathmoveto{\pgfpoint
8029 {0.7\pgf@circ@res@right}
8030 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8031 \pgfpathlineto{\pgfpoint
8032 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
8033 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8034 \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@up}]{\scriptsize\ $+$}
8035
8036
8037 % Draw them all!
8038 \pgfusepath{draw}
8039
8040 % Triangle
8041 \pgfscope
8042 \pgfsetlinewidth{2\pgflinewidth}
8043 \pgftransformxshift{.7\pgf@circ@res@left}
8044 \pgf@circ@res@step=\pgf@circ@res@right
8045 \advance\pgf@circ@res@step by -\pgf@circ@res@left
8046 \pgf@circ@res@step=.7\pgf@circ@res@step
8047 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
8048 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
8049 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
8050 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
8051 \pgfusepath{draw}
8052 \endpgfscope
8053 }
8054 }
8055
8056
8057
8058
8059 \pgfcircdeclarequadpole{transformer}{
8060
8061 \pgf@circ@drawtransformerbasicbody
8062
8063 }{\pgf@circ@drawtransformerbasicanchor}
8064
8065 \pgfcircdeclarequadpole{transformer core}{
8066
8067 \pgf@circ@drawtransformerbasicbody
8068
8069 \pgfmoveto{\pgfpoint%
8070 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
8071 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
8072 }
8073 \pgflineto{
8074 \pgfpoint
8075 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
8076 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
8077 }
8078
8079 \pgfmoveto{\pgfpoint%
8080 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
8081 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
8082 }
8083 \pgflineto{
8084 \pgfpoint
8085 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
8086 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
8087 }
8088
8089 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth}
8090 \pgfusepath{draw}
8091 }{\pgf@circ@drawtransformerbasicanchor}
8092
8093
8094 \pgfcircdeclarequadpole{gyrator}{
8095
8096 \def\stretto{.4}
8097
8098 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
8099 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
8100 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
8101 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
8102
8103 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
8104 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
8105 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
8106 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8107
8108 \pgfusepath{draw}
8109
8110 \pgfsetlinewidth{2\pgflinewidth}
8111 \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@left}{.7*\stretto\pgf@circ@res@down}}
8112 \pgfpatharc{90}{270}{.7*\stretto\pgf@circ@res@down}
8113
8114 \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@right}{.7*\stretto\pgf@circ@res@up}}
8115 \pgfpatharc{-90}{90}{.7*\stretto\pgf@circ@res@down}
8116 \pgfusepath{draw}
8117
8118 }{}
8119
8120 %% coupler
8121 % defines a general outer box for couplers
8122 % TikZ usage:
8123 % \draw (0,0) node[coupler](coup){\SI{-3}{dB}}
8124 % (coup.port1) to[short,-o] ++(-1,0)
8125 %
8126
8127 \long\def\pgfcircdeclarecoupler#1#2{
8128 \pgfdeclareshape{#1}{
8129 \anchor{center}{
8130 \northwest
8131 \pgf@x=0pt
8132 \pgf@y=0pt
8133 }
8134 \savedanchor\northwest{%
8135 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8136 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/coupler/height}\pgf@y
8137 \pgf@y=.5\pgf@y
8138 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8139 \pgf@x=.5\pgf@x
8140 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/coupler/width}\pgf@x
8141 }
8142 \anchor{north}{
8143 \northwest
8144 \pgf@x=0pt
8145 }
8146 \anchor{south}{
8147 \northwest
8148 \pgf@x=0pt
8149 \pgf@y=-\pgf@y
8150 }
8151 \anchor{west}{
8152 \northwest
8153 \pgf@y=0pt
8154 }
8155 \anchor{east}{
8156 \northwest
8157 \pgf@y=0pt
8158 \pgf@x=-\pgf@x
8159 }
8160 \anchor{south west}{
8161 \northwest
8162 \pgf@y=-\pgf@y
8163 }
8164 \anchor{north east}{
8165 \northwest
8166 \pgf@x=-\pgf@x
8167 }
8168 \anchor{north west}{
8169 \northwest
8170 }
8171 \anchor{south east}{
8172 \northwest
8173 \pgf@x=-\pgf@x
8174 \pgf@y=-\pgf@y
8175 }
8176 \anchor{port1}{
8177 \northwest
8178 \pgf@y=-0.5\pgf@y
8179 }
8180 \anchor{port2}{
8181 \northwest
8182 \pgf@x=-\pgf@x
8183 \pgf@y=-0.5\pgf@y
8184 }
8185 \anchor{port3}{
8186 \northwest
8187 \pgf@x=-\pgf@x
8188 \pgf@y=0.5\pgf@y
8189 }
8190 \anchor{port4}{
8191 \northwest
8192 \pgf@y=0.5\pgf@y
8193 }
8194 \anchor{1}{
8195 \northwest
8196 \pgf@y=-0.5\pgf@y
8197 }
8198 \anchor{2}{
8199 \northwest
8200 \pgf@x=-\pgf@x
8201 \pgf@y=-0.5\pgf@y
8202 }
8203 \anchor{3}{
8204 \northwest
8205 \pgf@x=-\pgf@x
8206 \pgf@y=0.5\pgf@y
8207 }
8208 \anchor{4}{
8209 \northwest
8210 \pgf@y=0.5\pgf@y
8211 }
8212 \anchor{text}{
8213 \northwest
8214 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
8215 \pgf@x=-.5\wd\pgfnodeparttextbox
8216 }
8217 \backgroundpath{
8218 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8219
8220 \northwest
8221 \pgf@circ@res@up = \pgf@y
8222 \pgf@circ@res@down = -\pgf@y
8223 \pgf@circ@res@right = -\pgf@x
8224 \pgf@circ@res@left = \pgf@x
8225
8226 \pgfstartlinewidth=\pgflinewidth
8227
8228 % draw outer box
8229 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8230 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8231 \pgfusepath{draw}
8232
8233 % draw inner stuff
8234 #2
8235
8236 }
8237 }
8238 }
8239
8240 % straight coupler
8241 \pgfcircdeclarecoupler{coupler}{
8242 \pgfsetlinewidth{\pgfstartlinewidth}
8243 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}}
8244 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8245 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
8246 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8247 \pgfusepath{draw}
8248
8249 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
8250 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
8251 \pgfsetarrows{latex-latex}
8252 \pgfusepath{draw}
8253 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
8254 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
8255 \pgfsetarrows{latex-latex}
8256 \pgfusepath{draw}
8257 }
8258
8259 % "bended" coupler
8260 \pgfcircdeclarecoupler{coupler2}{
8261 \pgfsetlinewidth{\pgfstartlinewidth}
8262 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}}
8263 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8264 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
8265 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8266 \pgfusepath{draw}
8267
8268 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
8269 \pgfpatharc{0}{90} {0.4\pgf@circ@res@up}
8270 \pgfsetarrowsend{latex}
8271 \pgfusepath{draw}
8272 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
8273 \pgfpatharc{0}{-90} {0.4\pgf@circ@res@up}
8274 \pgfsetarrowsend{latex}
8275 \pgfusepath{draw}
8276
8277 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
8278 \pgfpatharc{180}{90} {0.4\pgf@circ@res@up}
8279 \pgfsetarrowsend{latex}
8280 \pgfusepath{draw}
8281 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
8282 \pgfpatharc{-180}{-90} {0.4\pgf@circ@res@up}
8283 \pgfsetarrowsend{latex}
8284 \pgfusepath{draw}
8285
8286
8287 }
8288
8289 %%%---------- close: pgfcircquadpoles
8290 %%%%%%%%%%% Springe nach pgfcircnpoles
8291 %%%---------- open: pgfcircnpoles.tex
8292 %
8293 % This file may be distributed and/or modified
8294 %
8295 % 1. under the LaTeX Project Public License and/or
8296 % 2. under the GNU Public License.
8297 %
8298 % See the file doc/LICENSE for more details.
8299
8300 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8301 %% N-poles
8302
8303 \pgfkeys{/tikz/circuitikz,lab/.code={
8304
8305
8306 }}
8307
8308 \long\def\pgfcircdeclarenpole#1#2#3{
8309 \pgfdeclareshape{#1}
8310 {
8311 \anchor{center}{
8312 \northwest
8313 \pgf@x=0pt
8314 }
8315 \savedanchor\northwest{%
8316 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8317 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@y
8318 \pgf@y=.5\pgf@y
8319 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8320 \pgf@x=.5\pgf@x
8321 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x
8322 }
8323 \anchor{A2}{
8324 \northwest
8325 \pgf@y=-\pgf@y
8326 }
8327 \anchor{B1}{
8328 \northwest
8329 \pgf@x=-\pgf@x
8330 }
8331 \anchor{A1}{
8332 \northwest
8333 }
8334 \anchor{B2}{
8335 \northwest
8336 \pgf@x=-\pgf@x
8337 \pgf@y=-\pgf@y
8338 }
8339 \anchor{north}{
8340 \northwest
8341 \pgf@x=0pt
8342 }
8343 \anchor{south}{
8344 \northwest
8345 \pgf@x=0pt
8346 \pgf@y=-\pgf@y
8347 }
8348 \anchor{west}{
8349 \northwest
8350 \pgf@y=0pt
8351 }
8352 \anchor{east}{
8353 \northwest
8354 \pgf@y=0pt
8355 \pgf@x=-\pgf@x
8356 }
8357 \anchor{south west}{
8358 \northwest
8359 \pgf@y=-\pgf@y
8360 }
8361 \anchor{north east}{
8362 \northwest
8363 \pgf@x=-\pgf@x
8364 }
8365 \anchor{north west}{
8366 \northwest
8367 }
8368 \anchor{south east}{
8369 \northwest
8370 \pgf@x=-\pgf@x
8371 \pgf@y=-\pgf@y
8372 }
8373 \anchor{base}{
8374 \northwest
8375 \pgf@x=0pt
8376 }
8377 #3
8378 \backgroundpath{
8379 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8380
8381 \northwest
8382 \pgf@circ@res@up = \pgf@y
8383 \pgf@circ@res@down = -\pgf@y
8384 \pgf@circ@res@right = -\pgf@x
8385 \pgf@circ@res@left = \pgf@x
8386
8387 %\pgf@circ@Rlen=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8388
8389 #2
8390
8391 }
8392 }
8393 }
8394
8395
8396
8397 \def\pgf@circ@drawtransformerbasicanchor{
8398 \pgfkeysvalueof{/tikz/circuitikz/quadpoles/trans/height}
8399 \anchor{AA2}{
8400 \northwest
8401 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8402 \pgf@x=.7\pgf@x
8403 \pgf@y=-\pgf@y
8404 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8405 }
8406 \anchor{BB1}{
8407 \northwest
8408 \pgf@x=-\pgf@x
8409 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8410 \pgf@x=.7\pgf@x
8411 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8412 }
8413 \anchor{AA1}{
8414 \northwest
8415 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8416 \pgf@x=.7\pgf@x
8417 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8418 }
8419 \anchor{BB2}{
8420 \northwest
8421 \pgf@x=-\pgf@x
8422 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8423 \pgf@x=.7\pgf@x
8424 \pgf@y=-\pgf@y
8425 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8426 }
8427 }
8428
8429 \def\pgf@circ@drawtransformerbasicbody{
8430 \def\stretto{.4}
8431 \pgfscope
8432 \pgfslopedattimetrue
8433 \pgfallowupsidedownattimetrue
8434 \pgftransformlineattime{.5}{%
8435 \pgfpoint%
8436 {\stretto\pgf@circ@res@left}%
8437 {\pgf@circ@res@up}%
8438 }{%
8439 \pgfpoint
8440 {\stretto\pgf@circ@res@left}%
8441 {\pgf@circ@res@down}%
8442 }
8443
8444 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
8445 \def\pgf@temp{european}%
8446 \ifx\pgf@temp\pgf@circ@temp%
8447 \pgfnode{fullgenericshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8448 \else%
8449 \def\pgf@temp{cute}
8450 \ifx\pgf@temp\pgf@circ@temp%
8451 \pgfnode{cuteinductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8452 \else%
8453 \pgfnode{americaninductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8454 \fi%
8455 \fi%
8456
8457
8458 \endpgfscope
8459 \pgfscope
8460 \pgfslopedattimetrue
8461 \pgfallowupsidedownattimetrue
8462 \pgftransformlineattime{.5}{%
8463 \pgfpoint%
8464 {\stretto\pgf@circ@res@right}%
8465 {\pgf@circ@res@down}%
8466 }{%
8467 \pgfpoint
8468 {\stretto\pgf@circ@res@right}%
8469 {\pgf@circ@res@up}%
8470 }
8471
8472 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
8473 \def\pgf@temp{european}%
8474 \ifx\pgf@temp\pgf@circ@temp%
8475 \pgfnode{fullgenericshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
8476 \else%
8477 \def\pgf@temp{cute}
8478 \ifx\pgf@temp\pgf@circ@temp%
8479 \pgfnode{cuteinductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
8480 \else%
8481 \pgfnode{americaninductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
8482 \fi%
8483 \fi%
8484
8485 \endpgfscope
8486
8487 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
8488 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
8489 \pgfpathlineto{\pgfpointanchor{pgf@inductor1}{b}}
8490
8491 \pgfpathmoveto{\pgfpointanchor{pgf@inductor1}{a}}
8492 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
8493 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
8494
8495 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
8496 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
8497 \pgfpathlineto{\pgfpointanchor{pgf@inductor2}{a}}
8498
8499 \pgfpathmoveto{\pgfpointanchor{pgf@inductor2}{b}}
8500 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
8501 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8502
8503 \pgfusepath{draw}
8504
8505 }
8506
8507
8508
8509 % contrib Kristofer M. Monisit
8510
8511 \pgfdeclareshape{fd op amp}
8512 {
8513 \anchor{center}{\pgfpointorigin}
8514 \savedanchor\northwest{%
8515 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8516 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
8517 \pgf@y=.5\pgf@y
8518 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8519 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
8520 \pgf@x=.5\pgf@x
8521 }
8522 \anchor{south}{
8523 \northwest
8524 \pgf@y=-\pgf@y
8525 }
8526 \anchor{north}{
8527 \northwest
8528 }
8529 \savedanchor\left{%
8530 \pgf@y=0pt
8531 }
8532 \savedanchor\inOne{%
8533 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8534 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
8535 \pgf@y=.5\pgf@y
8536 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
8537 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8538 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
8539 \pgf@x=.5\pgf@x
8540 }
8541 \anchor{-}{
8542 \inOne
8543 }
8544 \anchor{+}{
8545 \inOne
8546 \pgf@y=-\pgf@y
8547 }
8548 \savedanchor\up{%
8549 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8550 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
8551 \pgf@y=.5\pgf@y
8552 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8553 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
8554 \pgf@x=.5\pgf@x
8555 \pgf@circ@res@up = \pgf@y
8556 \pgf@circ@res@right = -\pgf@x
8557 \pgf@circ@res@left = \pgf@x
8558 \pgfpointlineattime{
8559 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
8560 \pgfpoint{
8561 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8562 {\pgf@circ@res@up}}
8563 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
8564 }
8565 \anchor{up}{
8566 \up
8567 }
8568 \anchor{down}{
8569 \up
8570 \pgf@y=-\pgf@y
8571 }
8572 \anchor{out +}{
8573 \northwest
8574 \pgf@y=.5\pgf@y
8575 \pgf@x=-.7\pgf@x
8576 }
8577 \anchor{out -}{
8578 \northwest
8579 \pgf@y=-.5\pgf@y
8580 \pgf@x=-.7\pgf@x
8581 }
8582 \anchor{west}{
8583 \left
8584 }
8585 \anchor{east}{
8586 \left
8587 \pgf@x=-\pgf@x
8588 }
8589
8590 \backgroundpath{
8591 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8592
8593 \northwest
8594 \pgf@circ@res@up = \pgf@y
8595 \pgf@circ@res@down = -\pgf@y
8596 \pgf@circ@res@right = -\pgf@x
8597 \pgf@circ@res@left = \pgf@x
8598
8599 % Negative input terminal
8600 \pgfpathmoveto{\pgfpoint
8601 {\pgf@circ@res@left}
8602 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8603 \pgfpathlineto{\pgfpoint
8604 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8605 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8606 \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}]{\scriptsize\ $-$}
8607
8608
8609 % Positive input terminal
8610 \pgfpathmoveto{\pgfpoint
8611 {\pgf@circ@res@left}
8612 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8613 \pgfpathlineto{\pgfpoint
8614 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
8615 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8616 \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}]{\scriptsize\ $+$}
8617
8618
8619 % Negative output terminal
8620 \pgfpathmoveto{\pgfpoint
8621 {0.7\pgf@circ@res@right}
8622 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8623 \pgfpathlineto{\pgfpoint
8624 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
8625 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
8626 \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@down}]{\scriptsize\ $-$}
8627
8628
8629 % Positive output terminal
8630 \pgfpathmoveto{\pgfpoint
8631 {0.7\pgf@circ@res@right}
8632 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8633 \pgfpathlineto{\pgfpoint
8634 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
8635 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
8636 \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@up}]{\scriptsize\ $+$}
8637
8638
8639 % Draw them all!
8640 \pgfusepath{draw}
8641
8642 % Triangle
8643 \pgfscope
8644 \pgfsetlinewidth{2\pgflinewidth}
8645 \pgftransformxshift{.7\pgf@circ@res@left}
8646 \pgf@circ@res@step=\pgf@circ@res@right
8647 \advance\pgf@circ@res@step by -\pgf@circ@res@left
8648 \pgf@circ@res@step=.7\pgf@circ@res@step
8649 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
8650 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
8651 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
8652 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
8653 \pgfusepath{draw}
8654 \endpgfscope
8655 }
8656 }
8657
8658
8659
8660
8661 \pgfcircdeclarequadpole{transformer}{
8662
8663 \pgf@circ@drawtransformerbasicbody
8664
8665 }{\pgf@circ@drawtransformerbasicanchor}
8666
8667 \pgfcircdeclarequadpole{transformer core}{
8668
8669 \pgf@circ@drawtransformerbasicbody
8670
8671 \pgfmoveto{\pgfpoint%
8672 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
8673 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
8674 }
8675 \pgflineto{
8676 \pgfpoint
8677 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
8678 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
8679 }
8680
8681 \pgfmoveto{\pgfpoint%
8682 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
8683 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
8684 }
8685 \pgflineto{
8686 \pgfpoint
8687 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
8688 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
8689 }
8690
8691 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth}
8692 \pgfusepath{draw}
8693 }{\pgf@circ@drawtransformerbasicanchor}
8694
8695
8696 \pgfcircdeclarequadpole{gyrator}{
8697
8698 \def\stretto{.4}
8699
8700 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
8701 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
8702 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
8703 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
8704
8705 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
8706 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
8707 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
8708 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8709
8710 \pgfusepath{draw}
8711
8712 \pgfsetlinewidth{2\pgflinewidth}
8713 \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@left}{.7*\stretto\pgf@circ@res@down}}
8714 \pgfpatharc{90}{270}{.7*\stretto\pgf@circ@res@down}
8715
8716 \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@right}{.7*\stretto\pgf@circ@res@up}}
8717 \pgfpatharc{-90}{90}{.7*\stretto\pgf@circ@res@down}
8718 \pgfusepath{draw}
8719
8720 }{}
8721
8722 %% coupler
8723 % defines a general outer box for couplers
8724 % TikZ usage:
8725 % \draw (0,0) node[coupler](coup){\SI{-3}{dB}}
8726 % (coup.port1) to[short,-o] ++(-1,0)
8727 %
8728
8729 \long\def\pgfcircdeclarecoupler#1#2{
8730 \pgfdeclareshape{#1}{
8731 \anchor{center}{
8732 \northwest
8733 \pgf@x=0pt
8734 \pgf@y=0pt
8735 }
8736 \savedanchor\northwest{%
8737 \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8738 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/coupler/height}\pgf@y
8739 \pgf@y=.5\pgf@y
8740 \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
8741 \pgf@x=.5\pgf@x
8742 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/coupler/width}\pgf@x
8743 }
8744 \anchor{north}{
8745 \northwest
8746 \pgf@x=0pt
8747 }
8748 \anchor{south}{
8749 \northwest
8750 \pgf@x=0pt
8751 \pgf@y=-\pgf@y
8752 }
8753 \anchor{west}{
8754 \northwest
8755 \pgf@y=0pt
8756 }
8757 \anchor{east}{
8758 \northwest
8759 \pgf@y=0pt
8760 \pgf@x=-\pgf@x
8761 }
8762 \anchor{south west}{
8763 \northwest
8764 \pgf@y=-\pgf@y
8765 }
8766 \anchor{north east}{
8767 \northwest
8768 \pgf@x=-\pgf@x
8769 }
8770 \anchor{north west}{
8771 \northwest
8772 }
8773 \anchor{south east}{
8774 \northwest
8775 \pgf@x=-\pgf@x
8776 \pgf@y=-\pgf@y
8777 }
8778 \anchor{port1}{
8779 \northwest
8780 \pgf@y=-0.5\pgf@y
8781 }
8782 \anchor{port2}{
8783 \northwest
8784 \pgf@x=-\pgf@x
8785 \pgf@y=-0.5\pgf@y
8786 }
8787 \anchor{port3}{
8788 \northwest
8789 \pgf@x=-\pgf@x
8790 \pgf@y=0.5\pgf@y
8791 }
8792 \anchor{port4}{
8793 \northwest
8794 \pgf@y=0.5\pgf@y
8795 }
8796 \anchor{1}{
8797 \northwest
8798 \pgf@y=-0.5\pgf@y
8799 }
8800 \anchor{2}{
8801 \northwest
8802 \pgf@x=-\pgf@x
8803 \pgf@y=-0.5\pgf@y
8804 }
8805 \anchor{3}{
8806 \northwest
8807 \pgf@x=-\pgf@x
8808 \pgf@y=0.5\pgf@y
8809 }
8810 \anchor{4}{
8811 \northwest
8812 \pgf@y=0.5\pgf@y
8813 }
8814 \anchor{text}{
8815 \northwest
8816 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
8817 \pgf@x=-.5\wd\pgfnodeparttextbox
8818 }
8819 \backgroundpath{
8820 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8821
8822 \northwest
8823 \pgf@circ@res@up = \pgf@y
8824 \pgf@circ@res@down = -\pgf@y
8825 \pgf@circ@res@right = -\pgf@x
8826 \pgf@circ@res@left = \pgf@x
8827
8828 \pgfstartlinewidth=\pgflinewidth
8829
8830 % draw outer box
8831 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8832 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8833 \pgfusepath{draw}
8834
8835 % draw inner stuff
8836 #2
8837
8838 }
8839 }
8840 }
8841
8842 % straight coupler
8843 \pgfcircdeclarecoupler{coupler}{
8844 \pgfsetlinewidth{\pgfstartlinewidth}
8845 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}}
8846 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8847 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
8848 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8849 \pgfusepath{draw}
8850
8851 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
8852 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
8853 \pgfsetarrows{latex-latex}
8854 \pgfusepath{draw}
8855 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
8856 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
8857 \pgfsetarrows{latex-latex}
8858 \pgfusepath{draw}
8859 }
8860
8861 % "bended" coupler
8862 \pgfcircdeclarecoupler{coupler2}{
8863 \pgfsetlinewidth{\pgfstartlinewidth}
8864 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}}
8865 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8866 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
8867 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8868 \pgfusepath{draw}
8869
8870 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
8871 \pgfpatharc{0}{90} {0.4\pgf@circ@res@up}
8872 \pgfsetarrowsend{latex}
8873 \pgfusepath{draw}
8874 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
8875 \pgfpatharc{0}{-90} {0.4\pgf@circ@res@up}
8876 \pgfsetarrowsend{latex}
8877 \pgfusepath{draw}
8878
8879 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
8880 \pgfpatharc{180}{90} {0.4\pgf@circ@res@up}
8881 \pgfsetarrowsend{latex}
8882 \pgfusepath{draw}
8883 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
8884 \pgfpatharc{-180}{-90} {0.4\pgf@circ@res@up}
8885 \pgfsetarrowsend{latex}
8886 \pgfusepath{draw}
8887
8888
8889 }
8890
8891 %%%---------- close: pgfcircnpoles
8892
8893 %%%%%%%%%%% Springe nach pgfcirclabel
8894 %%%---------- open: pgfcirclabel.tex
8895 % Copyright 2007-2009 by Massimo Redaelli
8896 %
8897 % This file may be distributed and/or modified
8898 %
8899 % 1. under the LaTeX Project Public License and/or
8900 % 2. under the GNU Public License.
8901 %
8902 % See the file doc/LICENSE for more details.
8903
8904 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8905 %% Bipole label positioning
8906
8907 %% Options
8908 \ctikzset{label/.style = { l=#1 } }
8909 \ctikzset{l/.code = {
8910 \pgfkeys{/tikz/circuitikz/bipole/label/name=#1}
8911 \ctikzsetvalof{bipole/label/unit}{}
8912 \ifpgf@circ@siunitx
8913 \pgf@circ@handleSI{#1}
8914 \ifpgf@circ@siunitx@res
8915 \edef\pgf@temp{\pgf@circ@handleSI@val}
8916 \pgfkeyslet{/tikz/circuitikz/bipole/label/name}{\pgf@temp}
8917 \edef\pgf@temp{\pgf@circ@handleSI@unit}
8918 \pgfkeyslet{/tikz/circuitikz/bipole/label/unit}{\pgf@temp}
8919 \else
8920 \fi
8921 \else
8922 \fi
8923 }}
8924
8925 \ctikzset{label above/.code = {
8926 l=#1,
8927 \circuitikzbasekey/bipole/label/position=90 }
8928 }
8929 \ctikzset{l^/.style = {
8930 l=#1,
8931 \circuitikzbasekey/bipole/label/position=90 }
8932 }
8933
8934 \ctikzset{label below/.code = {
8935 l=#1,
8936 \circuitikzbasekey/bipole/label/position=-90 }
8937 }
8938 \ctikzset{l_/.style = {
8939 l=#1,
8940 \circuitikzbasekey/bipole/label/position=-90 }
8941 }
8942
8943
8944
8945 \def\pgf@circ@drawlabel{
8946 \pgfextra{
8947 \edef\pgf@temp{\ctikzvalof{label/align}}
8948 \def\pgf@circ@temp{straight}
8949 }
8950 \ifx\pgf@temp\pgf@circ@temp %straight
8951 \pgf@circ@drawreglabel
8952 \else
8953 \pgfextra{\def\pgf@circ@temp{rotate}}
8954 \ifx\pgf@temp\pgf@circ@temp %rotate
8955 \pgf@circ@drawrotlabel
8956 \else % smart
8957 \pgf@circ@drawsmartlabel
8958 \fi
8959 \fi
8960 }
8961
8962 \def\pgf@circ@drawsmartlabel{
8963 \pgfextra{
8964 %\pgfmathadd{\pgf@circ@direction}{360}
8965 \pgfmathmod{\pgf@circ@direction}{90}
8966 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
8967 }
8968 \ifnum \pgfcircmathresult > 20
8969 \ifnum \pgfcircmathresult < 70 % NON quasi retto
8970 \pgf@circ@drawrotlabel
8971 \else
8972 \pgf@circ@drawreglabel
8973 \fi
8974 \else
8975 \pgf@circ@drawreglabel
8976 \fi
8977 }
8978
8979 %% Output routing
8980 %% #1 - node name
8981
8982 \def\pgf@circ@drawrotlabel{
8983 \pgfextra{
8984 % calcolo rotazione label
8985 \def\pgf@circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
8986 \edef\pgfcirclabrot{\pgf@circ@direction} % primo e quarto quadrante
8987 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
8988 \ifnum \pgfcircmathresult > 90 \ifnum \pgfcircmathresult < 270 % terzo e secondo
8989 \pgfmathsubtract{\pgf@circ@direction}{180}
8990 \edef\pgfcirclabrot{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
8991 \pgfmathadd{\pgf@circ@temp}{180} %%%
8992 \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} %%%
8993 \fi\fi
8994
8995 \ifnum \ctikzvalof{mirror value} = -1
8996 \pgfmathadd{\pgf@circ@temp}{180}
8997 \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
8998 \fi
8999 }
9000 coordinate (labelcoor) at ($(\ctikzvalof{bipole/name})!2!(\ctikzvalof{bipole/name}.north)$)
9001 (labelcoor) node [rotate=\pgfcirclabrot] {\pgf@circ@finallabel{}} % c'era un transform shape
9002 }
9003
9004 \def\pgf@circ@drawreglabel{
9005 \pgfextra{
9006 \pgfmathsubtract{\pgf@circ@direction}{90}
9007 \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9008
9009 \edef\pgf@circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
9010 \ifnum \pgf@circ@temp < 0
9011 \pgfmathadd{\pgf@circ@labanc}{180}
9012 \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9013 \fi
9014
9015 \ifnum \ctikzvalof{mirror value} = -1
9016 \pgfmathadd{\pgf@circ@labanc}{180}
9017 \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9018 \fi
9019 }
9020 node [ anchor = \pgf@circ@labanc]
9021 at (\ctikzvalof{bipole/name}.\pgf@circ@temp) {\pgf@circ@finallabel{}}
9022 }
9023
9024
9025 \ctikzset{text/.style = { t=#1 } }
9026 \ctikzset{t/.code = {
9027 \ctikzsetvalof{bipoles/twoport/text}{#1}
9028 }}
9029
9030 %%%---------- close: pgfcirclabel
9031 %%%%%%%%%%% Springe nach pgfcircvoltage
9032 %%%---------- open: pgfcircvoltage.tex
9033 % Copyright 2007-2009 by Massimo Redaelli
9034 %
9035 % This file may be distributed and/or modified
9036 %
9037 % 1. under the LaTeX Project Public License and/or
9038 % 2. under the GNU Public License.
9039 %
9040 % See the file doc/LICENSE for more details.
9041
9042 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9043 %% Voltage management
9044
9045
9046 \ctikzset{v^>/.style = {
9047 v = #1,
9048 \circuitikzbasekey/bipole/voltage/direction = forward,
9049 \circuitikzbasekey/bipole/voltage/position = above
9050 }
9051 }
9052
9053 \ctikzset{v^</.style = {
9054 v = #1,
9055 \circuitikzbasekey/bipole/voltage/direction = backward,
9056 \circuitikzbasekey/bipole/voltage/position = above
9057 }
9058 }
9059
9060 \ctikzset{v_>/.style = {
9061 v = #1,
9062 \circuitikzbasekey/bipole/voltage/direction = forward,
9063 \circuitikzbasekey/bipole/voltage/position = below
9064 }
9065 }
9066
9067 \ctikzset{v_</.style = {
9068 v = #1,
9069 \circuitikzbasekey/bipole/voltage/direction = backward,
9070 \circuitikzbasekey/bipole/voltage/position = below
9071 }
9072 }
9073
9074
9075 % Default position varies whether the component is a voltage source
9076 % or not
9077 \ctikzset{v/.code = {
9078 \ifpgf@circuit@bipole@isvoltage
9079 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=above,
9080 \circuitikzbasekey/bipole/voltage/direction=forward}
9081 \else
9082 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9083 \circuitikzbasekey/bipole/voltage/direction=backward}
9084 \fi
9085 \pgfkeys{/tikz/circuitikz/bipole/voltage/label/name=#1}
9086 \ctikzsetvalof{bipole/voltage/label/unit}{}
9087 \ifpgf@circ@siunitx
9088 \pgf@circ@handleSI{#1}
9089 \ifpgf@circ@siunitx@res
9090 \edef\pgf@temp{\pgf@circ@handleSI@val}
9091 \pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/name}{\pgf@temp}
9092 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9093 \pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/unit}{\pgf@temp}
9094 \else
9095 \fi
9096 \else
9097 \fi
9098 }
9099 }
9100
9101 \ctikzset{v_/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = below} }
9102 \ctikzset{v^/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = above} }
9103 \ctikzset{v>/.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = forward} }
9104 \ctikzset{v</.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = backward} }
9105
9106
9107 %% Output routine for generic bipoles
9108
9109 \def\pgf@circ@drawvoltagegeneric{
9110 \pgfextra{
9111 \ifnum \ctikzvalof{mirror value}=-1
9112 \ifpgf@circuit@bipole@voltage@below\pgf@circuit@bipole@voltage@belowfalse\else\pgf@circuit@bipole@voltage@belowtrue\fi
9113 \fi
9114
9115 \ifpgf@circuit@bipole@voltage@below
9116 \def\pgf@circ@voltage@angle{90}
9117 \else
9118 \def\pgf@circ@voltage@angle{-90}
9119 \fi
9120
9121 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}
9122 \pgfkeysifdefined{\pgf@temp}
9123 { \edef\distacefromnode{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}} }
9124 { \edef\distacefromnode{\ctikzvalof{voltage/distance from node}} }
9125 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}
9126 \pgfkeysifdefined{\pgf@temp}
9127 { \edef\bumpb{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}} }
9128 { \edef\bumpb{\ctikzvalof{voltage/bump b}} }
9129 }
9130
9131 coordinate (pgfcirc@mid) at ($(\tikztostart) ! \distacefromnode ! (\ctikzvalof{bipole/name}.left)$)
9132 coordinate (pgfcirc@Vfrom) at ($(pgfcirc@mid) ! -\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen ! \pgf@circ@voltage@angle:(\ctikzvalof{bipole/name}.left)$)
9133
9134 coordinate (pgfcirc@mid) at ($(\tikztotarget) ! \distacefromnode ! (\ctikzvalof{bipole/name}.right)$)
9135 coordinate (pgfcirc@Vto) at ($(pgfcirc@mid) ! \ctikzvalof{voltage/distance from line}\pgf@circ@Rlen ! \pgf@circ@voltage@angle : (\ctikzvalof{bipole/name}.right)$)
9136
9137 \ifpgf@circuit@bipole@voltage@below
9138 coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-110)$)
9139 coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-70)$)
9140 \else
9141 coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.110)$)
9142 coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.70)$)
9143 \fi
9144
9145 \ifpgf@circuit@europeanvoltage
9146 \ifpgf@circuit@bipole@voltage@backward
9147 (pgfcirc@Vto) .. controls (pgfcirc@Vcont2) and (pgfcirc@Vcont1) ..
9148 node[currarrow, sloped, allow upside down, pos=1] {}
9149 (pgfcirc@Vfrom)
9150 \else
9151 (pgfcirc@Vfrom) .. controls (pgfcirc@Vcont1) and (pgfcirc@Vcont2) ..
9152 node[currarrow, sloped, allow upside down, pos=1] {}
9153 (pgfcirc@Vto)
9154 \fi
9155 \else
9156 \ifpgf@circuit@bipole@voltage@backward
9157 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$}
9158 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$-$}
9159 \else
9160 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$}
9161 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$+$}
9162 \fi
9163 \fi
9164 }
9165
9166 %% Output routine for voltage sources
9167
9168 \def\pgf@circ@drawvoltagegenerator{
9169 \ifpgf@circuit@bipole@voltage@below
9170 coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-120)$)
9171 coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-60)$)
9172 \else
9173 coordinate (pgfcirc@Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.120)$)
9174 coordinate (pgfcirc@Vcont2) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.60)$)
9175 \fi
9176
9177 \ifpgf@circuit@europeanvoltage
9178 \ifpgf@circuit@bipole@voltage@backward
9179 (pgfcirc@Vcont2) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vcont1)
9180 \else
9181 (pgfcirc@Vcont1) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vcont2)
9182 \fi
9183
9184 \else % american voltage
9185
9186 \pgfextra{
9187 \def\pgf@temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}}
9188 \def\pgf@circ@temp{battery}
9189 \ifx\pgf@temp\pgf@circ@temp
9190 \edef\pgf@circ@batteria{battery}
9191 \else
9192 \def\pgf@circ@temp{battery1}
9193 \ifx\pgf@temp\pgf@circ@temp
9194 \edef\pgf@circ@batteria{battery}
9195 \else
9196 \edef\pgf@circ@batteria{false}
9197 \fi
9198 \fi
9199 \edef\pgf@circ@temp{battery}
9200 }
9201
9202 \ifx\pgf@circ@batteria\pgf@circ@temp % if it is a battery, must put + and -
9203 \ifpgf@circuit@bipole@voltage@backward
9204 (pgfcirc@Vcont2) node {$-$} (pgfcirc@Vcont1) node {$+$}
9205 \else
9206 (pgfcirc@Vcont1) node {$-$} (pgfcirc@Vcont2) node {$+$}
9207 \fi
9208 \fi
9209
9210 \fi
9211 }
9212
9213 %% Output routine
9214
9215 \def\pgf@circ@drawvoltage{ % node name
9216 \pgfextra{
9217 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
9218
9219 \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
9220 \ifpgf@circuit@bipole@voltage@below
9221 \def\pgf@circ@bipole@voltage@label@anchor{north west}
9222 \else \def\pgf@circ@bipole@voltage@label@anchor{south east}
9223 \fi
9224 \fi\fi
9225 \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
9226 \ifpgf@circuit@bipole@voltage@below
9227 \def\pgf@circ@bipole@voltage@label@anchor{west}
9228 \else \def\pgf@circ@bipole@voltage@label@anchor{east}
9229 \fi
9230 \fi\fi
9231 \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
9232 \ifpgf@circuit@bipole@voltage@below
9233 \def\pgf@circ@bipole@voltage@label@anchor{south west}
9234 \else \def\pgf@circ@bipole@voltage@label@anchor{north east}
9235 \fi
9236 \fi\fi
9237 \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
9238 \ifpgf@circuit@bipole@voltage@below
9239 \def\pgf@circ@bipole@voltage@label@anchor{south}
9240 \else\def\pgf@circ@bipole@voltage@label@anchor{north}
9241 \fi
9242 \fi\fi
9243 \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
9244 \ifpgf@circuit@bipole@voltage@below
9245 \def\pgf@circ@bipole@voltage@label@anchor{south east}
9246 \else\def\pgf@circ@bipole@voltage@label@anchor{north west}
9247 \fi
9248 \fi\fi
9249 \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
9250 \ifpgf@circuit@bipole@voltage@below
9251 \def\pgf@circ@bipole@voltage@label@anchor{east}
9252 \else \def\pgf@circ@bipole@voltage@label@anchor{west}
9253 \fi
9254 \fi\fi
9255 \ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
9256 \ifpgf@circuit@bipole@voltage@below
9257 \def\pgf@circ@bipole@voltage@label@anchor{north east}
9258 \else\def\pgf@circ@bipole@voltage@label@anchor{south west}
9259 \fi
9260 \fi\fi
9261 \ifnum\pgfcircmathresult >-1 \ifnum\pgfcircmathresult <5
9262 \ifpgf@circuit@bipole@voltage@below
9263 \def\pgf@circ@bipole@voltage@label@anchor{north}
9264 \else\def\pgf@circ@bipole@voltage@label@anchor{south}
9265 \fi
9266 \fi\fi
9267 \ifnum\pgfcircmathresult >355 \ifnum\pgfcircmathresult <361
9268 \ifpgf@circuit@bipole@voltage@below
9269 \def\pgf@circ@bipole@voltage@label@anchor{north}
9270 \else\def\pgf@circ@bipole@voltage@label@anchor{south}
9271 \fi
9272 \fi\fi
9273
9274 \ifpgf@circuit@bipole@voltage@below
9275 \def\pgf@circ@bipole@voltage@label@where{-90}
9276 \else
9277 \def\pgf@circ@bipole@voltage@label@where{90}
9278 \fi
9279
9280 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}
9281 \pgfkeysifdefined{\pgf@temp}
9282 { \edef\eudist{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}} }
9283 { \edef\eudist{\ctikzvalof{voltage/european label distance}} }
9284 }
9285
9286 \ifpgf@circuit@bipole@isvoltage
9287 \pgf@circ@drawvoltagegenerator
9288 \else
9289 \pgf@circ@drawvoltagegeneric
9290 \fi
9291 (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where)
9292 coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) !
9293 \ifpgf@circuit@europeanvoltage\eudist\else\ctikzvalof{voltage/american label distance}\fi !
9294 (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where)$)
9295 node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=0]
9296 at (Vlab) { \pgf@circ@finallabel{voltage/} }
9297 }
9298
9299
9300
9301
9302
9303 % coordinate (pgfcirc@Vcont1) at ($ (\ctikzvalof{bipole/name}.center) !
9304 % \ctikzvalof{voltage/bump b} !
9305 % (\ctikzvalof{bipole/name}.-110) $)
9306 % coordinate (pgfcirc@Vcont2) at ($ (\ctikzvalof{bipole/name}.center) !
9307 % \ctikzvalof{voltage/bump b} !
9308 % (\ctikzvalof{bipole/name}.-70) $)
9309 % \else
9310 % coordinate (pgfcirc@Vcont1) at ($ (\ctikzvalof{bipole/name}.center) !
9311 % \ctikzvalof{voltage/bump b} !
9312 % (\ctikzvalof{bipole/name}.110) $)
9313 % coordinate (pgfcirc@Vcont2) at ($ (\ctikzvalof{bipole/name}.center) !
9314 % \ctikzvalof{voltage/bump b} !
9315 % (\ctikzvalof{bipole/name}.70) $)
9316 % \fi
9317 %%%---------- close: pgfcircvoltage
9318 %%%%%%%%%%% Springe nach pgfcirccurrent
9319 %%%---------- open: pgfcirccurrent.tex
9320 % Copyright 2007-2009 by Massimo Redaelli
9321 %
9322 % This file may be distributed and/or modified
9323 %
9324 % 1. under the LaTeX Project Public License and/or
9325 % 2. under the GNU Public License.
9326 %
9327 % See the file doc/LICENSE for more details.
9328
9329 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9330 %% Current handling
9331
9332 %% Options
9333
9334
9335 \ctikzset{i^>/.style = {
9336 i = #1,
9337 \circuitikzbasekey/bipole/current/direction = forward,
9338 \circuitikzbasekey/bipole/current/x position = after,
9339 \circuitikzbasekey/bipole/current/y position = above
9340 }
9341 }
9342
9343 \ctikzset{i_>/.style = {
9344 i = #1,
9345 \circuitikzbasekey/bipole/current/direction = forward,
9346 \circuitikzbasekey/bipole/current/x position = after,
9347 \circuitikzbasekey/bipole/current/y position = below
9348 }
9349 }
9350
9351 \ctikzset{i>^/.style = {
9352 i = #1,
9353 \circuitikzbasekey/bipole/current/direction = forward,
9354 \circuitikzbasekey/bipole/current/x position = before,
9355 \circuitikzbasekey/bipole/current/y position = above
9356 }
9357 }
9358
9359 \ctikzset{i>_/.style = {
9360 i = #1,
9361 \circuitikzbasekey/bipole/current/direction = forward,
9362 \circuitikzbasekey/bipole/current/x position = before,
9363 \circuitikzbasekey/bipole/current/y position = below
9364 }
9365 }
9366
9367 \ctikzset{i^</.style = {
9368 i = #1,
9369 \circuitikzbasekey/bipole/current/direction = backward,
9370 \circuitikzbasekey/bipole/current/x position = after,
9371 \circuitikzbasekey/bipole/current/y position = above
9372 }
9373 }
9374
9375 \ctikzset{i_</.style = {
9376 i = #1,
9377 \circuitikzbasekey/bipole/current/direction = backward,
9378 \circuitikzbasekey/bipole/current/x position = after,
9379 \circuitikzbasekey/bipole/current/y position = below
9380 }
9381 }
9382
9383 \ctikzset{i<^/.style = {
9384 i = #1,
9385 \circuitikzbasekey/bipole/current/direction = backward,
9386 \circuitikzbasekey/bipole/current/x position = before,
9387 \circuitikzbasekey/bipole/current/y position = above
9388 }
9389 }
9390
9391 \ctikzset{i<_/.style = {
9392 i = #1,
9393 \circuitikzbasekey/bipole/current/direction = backward,
9394 \circuitikzbasekey/bipole/current/x position = before,
9395 \circuitikzbasekey/bipole/current/y position = below
9396 }
9397 }
9398
9399 \ctikzset{i/.code = {
9400 % \ifpgf@circuit@bipole@iscurrent
9401 % \pgfkeys{\circuitikzbasekey/bipole/current/position=above}
9402 % \else
9403 % \pgfkeys{\circuitikzbasekey/bipole/current/position=below}
9404 % \fi
9405 \pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
9406 \circuitikzbasekey/bipole/current/x position = after,
9407 \circuitikzbasekey/bipole/current/y position = above }
9408 \pgfkeys{/tikz/circuitikz/bipole/current/label/name=#1}
9409 \ctikzsetvalof{bipole/current/label/unit}{}
9410 \ifpgf@circ@siunitx
9411 \pgf@circ@handleSI{#1}
9412 \ifpgf@circ@siunitx@res
9413 \edef\pgf@temp{\pgf@circ@handleSI@val}
9414 \pgfkeyslet{/tikz/circuitikz/bipole/current/label/name}{\pgf@temp}
9415 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9416 \pgfkeyslet{/tikz/circuitikz/bipole/current/label/unit}{\pgf@temp}
9417 \else
9418 \fi
9419 \else
9420 \fi
9421 }
9422 }
9423
9424 \ctikzset{i</.style = { i = #1, \circuitikzbasekey/bipole/current/direction = backward } }
9425 \ctikzset{i_/.style = { i = #1, \circuitikzbasekey/bipole/current/y position = below } }
9426 \ctikzset{i>/.style = {i = #1, \circuitikzbasekey/bipole/current/direction = forward } }
9427 \ctikzset{i^/.style = { i= #1, \circuitikzbasekey/bipole/current/y position = above } }
9428
9429
9430 \def\pgf@circ@drawnormalcurrent{
9431 \ifpgf@circuit@bipole@current@before
9432 \ifpgf@circuit@bipole@current@backward
9433 { (\ctikzvalof{bipole/name}.left) --
9434 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9435 (\tikztostart)
9436 }
9437 \else
9438 { (\tikztostart) --
9439 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9440 (\ctikzvalof{bipole/name}.left)
9441 }
9442 \fi
9443 \else
9444 \ifpgf@circuit@bipole@current@backward
9445 { (\tikztotarget) --
9446 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9447 (\ctikzvalof{bipole/name}.right)
9448 }
9449 \else
9450 { (\ctikzvalof{bipole/name}.right) --
9451 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9452 (\tikztotarget)
9453 }
9454 \fi
9455 \fi
9456 }
9457
9458 %% Output routine
9459 %% #1 - node name
9460
9461 \def\pgf@circ@drawcurrent{
9462 \pgfextra{
9463 \edef\pgf@circ@ffffff{\pgf@circ@direction}
9464 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@ffffff\pgf@nil}
9465
9466 \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
9467 \ifpgf@circuit@bipole@current@below
9468 \def\pgf@circ@dir{north west} \else \def\pgf@circ@dir{south east}
9469 \fi
9470 \fi\fi
9471 \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
9472 \ifpgf@circuit@bipole@current@below
9473 \def\pgf@circ@dir{west} \else \def\pgf@circ@dir{east}
9474 \fi
9475 \fi\fi
9476 \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
9477 \ifpgf@circuit@bipole@current@below
9478 \def\pgf@circ@dir{south west}\else \def\pgf@circ@dir{north east}
9479 \fi
9480 \fi\fi
9481 \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
9482 \ifpgf@circuit@bipole@current@below
9483 \def\pgf@circ@dir{south}\else\def\pgf@circ@dir{north}
9484 \fi
9485 \fi\fi
9486 \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
9487 \ifpgf@circuit@bipole@current@below
9488 \def\pgf@circ@dir{south east}\else\def\pgf@circ@dir{north west}
9489 \fi
9490 \fi\fi
9491 \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
9492 \ifpgf@circuit@bipole@current@below
9493 \def\pgf@circ@dir{east}\else \def\pgf@circ@dir{west}
9494 \fi
9495 \fi\fi
9496 \ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
9497 \ifpgf@circuit@bipole@current@below
9498 \def\pgf@circ@dir{north east}\else\def\pgf@circ@dir{south west}
9499 \fi
9500 \fi\fi
9501 \ifnum\pgfcircmathresult <5
9502 \ifpgf@circuit@bipole@current@below
9503 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
9504 \fi
9505 \fi
9506 \ifnum\pgfcircmathresult >355
9507 \ifpgf@circuit@bipole@current@below
9508 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
9509 \fi
9510 \fi
9511
9512 \ifpgf@circuit@bipole@current@below
9513 \def\pgf@circ@bipole@current@label@where{-90}
9514 \else
9515 \def\pgf@circ@bipole@current@label@where{+90}
9516 \fi
9517 }
9518
9519
9520 \pgfextra{ \def\pgf@temp{short} \edef\pgf@circ@temp{\ctikzvalof{bipole/kind}} }
9521
9522 \ifx\pgf@circ@temp\pgf@temp % caso di corrente (centrata) su un corto
9523 \ifpgf@circuit@bipole@current@backward
9524 { (\tikztotarget) --
9525 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9526 (\tikztostart) }
9527 \else
9528 { (\tikztostart) --
9529 node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
9530 (\tikztotarget) }
9531 \fi
9532
9533 \else % altri bipoli - e quindi tra nodo e target
9534
9535 \ifpgf@circuit@bipole@iscurrent
9536 \ifpgf@circuit@europeancurrent
9537 \pgf@circ@drawnormalcurrent
9538 \else
9539 \fi
9540 \else
9541 \pgf@circ@drawnormalcurrent
9542 \fi
9543 \fi
9544
9545 \ifpgf@circuit@bipole@iscurrent
9546 node [anchor=\pgf@circ@dir] at (\ctikzvalof{bipole/name}.\pgf@circ@bipole@current@label@where)
9547 { \pgf@circ@finallabel{current/} }
9548 \else
9549 (Iarrow.\pgf@circ@bipole@current@label@where) node [anchor=\pgf@circ@dir]
9550 { \pgf@circ@finallabel{current/} }
9551 \fi
9552
9553 }
9554
9555
9556
9557
9558 %%%---------- close: pgfcirccurrent
9559 %%%%%%%%%%% Springe nach pgfcircinputarrows
9560 %%%---------- open: pgfcircinputarrows.tex
9561 % Copyright 2013 by Stefan Erhardt
9562 %
9563 % This file may be distributed and/or modified
9564 %
9565 % 1. under the LaTeX Project Public License and/or
9566 % 2. under the GNU Public License.
9567 %
9568 % See the file doc/LICENSE for more details.
9569
9570 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9571 %% Show input arrows for selected parts
9572
9573
9574 \ctikzset{>/.style = {
9575 \circuitikzbasekey/inputarrow = true
9576 }
9577 }
9578
9579
9580
9581
9582
9583 %%%---------- close: pgfcircinputarrows
9584
9585
9586
9587
9588 %%%---------- close: circuitikz.code
9589
9590 \ExecuteOptions{europeancurrents,europeanvoltages,americanports,americanresistors,cuteinductors,europeangfsurgearrester,nosiunitx,noarrowmos,smartlabels,nocompatibility}
9591
9592 \ProcessOptions\relax
9593
9594 \ifpgf@circ@siunitx
9595 \RequirePackage{xstring}[2009/03/13]
9596 %\expandafter\let\csname angstrom\endcsname\relax
9597 \RequirePackage{siunitx}
9598 \fi
9599
9600 %%%%%%%%%%% Springe nach circuitikz1.code
9601 %%%---------- open: circuitikz1.code.tex
9602 %%%%%%%%%%%%
9603 %% Dimensions
9604
9605 % coordinate bipoli
9606 \newdimen\pgf@circ@res@up \newdimen\pgf@circ@res@down \newdimen\pgf@circ@res@zero
9607 \newdimen\pgf@circ@res@left \newdimen\pgf@circ@res@right
9608 \newdimen\pgf@circ@res@other
9609 \newdimen\pgf@circ@res@step
9610
9611 % thickness iniziale
9612 \newdimen \pgfstartlinewidth
9613
9614 \pgf@circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
9615
9616
9617
9618 % Names
9619 \ctikzset{name/.style = { n=#1 } }
9620 \ctikzset{n/.code = {
9621 \pgfkeys{/tikz/circuitikz/bipole/name=#1}
9622 }}
9623
9624 % Reflect the node along
9625 \ctikzset{mirrored/.is choice}
9626 \ctikzset{mirror value/.initial=1}
9627 \ctikzset{mirrored/true/.code = {\ctikzsetvalof{mirror value}{-1}} }
9628 \ctikzset{mirrored/false/.code = {\ctikzsetvalof{mirror value}{1}} }
9629 \ctikzset{mirror/.style = {/tikz/circuitikz/mirrored=true}}
9630
9631 % Initialize paths
9632 \def\pgfcircresetpath{
9633 \ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90,
9634 bipole/reversed=false, bipole/kind=,
9635 bipole/voltage/direction=backward, bipole/voltage/label/name=, bipole/voltage/position=below,
9636 bipole/nodes/left=none, bipole/nodes/right=none, bipole/is voltage=false,
9637 bipole/is current=false, bipole/current/label/name=, bipole/current/x position=after,
9638 bipole/current/y position=above, bipole/current/direction=forward,
9639 mirrored=false
9640 }
9641 }
9642
9643
9644 %% Generic bipole path
9645 \def\pgf@circ@bipole@path#1#2{
9646 \pgfextra{
9647 \ctikzset{bipole/kind = #1}
9648
9649 \edef\pgf@temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
9650 \def\pgf@circ@temp{}
9651 \ifx\pgf@temp\pgf@circ@temp % if it has not a name
9652 \pgfmathrandominteger{\pgf@circ@rand}{1000}{9999}
9653 \ctikzset{bipole/name = #2\pgf@circ@rand} % create it
9654 \fi
9655
9656 \def\pgf@temp{open}
9657 \def\pgf@circ@temp{#1}
9658 }
9659 \ifpgf@circuit@bipole@reversed
9660 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
9661 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {}
9662 \else
9663 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
9664 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {}
9665 \fi
9666 \pgfextra{
9667 \pgf@circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
9668 {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
9669 \edef\pgf@circ@direction{\pgfmathresult}
9670 }
9671 ($(\tikztostart) ! .5 ! (\tikztotarget)$)
9672 node[#1shape, rotate=\pgf@circ@direction, yscale=\ctikzvalof{mirror value}]
9673 (\ctikzvalof{bipole/name}) {}
9674 \ifx\pgf@temp\pgf@circ@temp % if it is an open
9675 \else
9676 (\ctikzvalof{bipole/name}start.center) -- (\ctikzvalof{bipole/name}.left)
9677 (\ctikzvalof{bipole/name}.right) -- (\ctikzvalof{bipole/name}end.center)
9678 \fi
9679 \pgf@circ@ifkeyempty{bipole/label/name}\else\pgf@circ@drawlabel\fi
9680 \drawpoles
9681 \pgf@circ@ifkeyempty{bipole/voltage/label/name}\else\pgf@circ@drawvoltage\fi
9682 \pgf@circ@ifkeyempty{bipole/current/label/name}\else\pgf@circ@drawcurrent\fi
9683 % reset
9684 \pgfextra{
9685 \pgfcircresetpath
9686 }
9687 (\tikztotarget) \tikztonodes % e si continua
9688 }
9689
9690
9691 %% Path definitions
9692
9693 \def\pgf@circ@resistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{generic}{#1}\else\pgf@circ@bipole@path{resistor}{#1}\fi}
9694 \def\pgf@circ@vresistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{tgeneric}{#1}\else\pgf@circ@bipole@path{vresistor}{#1}\fi}
9695 \def\pgf@circ@potentiometer@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{genericpotentiometer}{#1}\else\pgf@circ@bipole@path{potentiometer}{#1}\fi}
9696 \def\pgf@circ@thermistor@path#1{\pgf@circ@bipole@path{thermistor}{#1}}
9697 \def\pgf@circ@thermistorptc@path#1{\pgf@circ@bipole@path{thermistorptc}{#1}}
9698 \def\pgf@circ@thermistorntc@path#1{\pgf@circ@bipole@path{thermistorntc}{#1}}
9699 \def\pgf@circ@varistor@path#1{\pgf@circ@bipole@path{varistor}{#1}}
9700 \def\pgf@circ@capacitor@path#1{\pgf@circ@bipole@path{capacitor}{#1}}
9701 \def\pgf@circ@polarcapacitor@path#1{\pgf@circ@bipole@path{polarcapacitor}{#1}}
9702 \def\pgf@circ@vcapacitor@path#1{\pgf@circ@bipole@path{vcapacitor}{#1}}
9703 \def\pgf@circ@battery@path#1{\pgf@circ@bipole@path{battery}{#1}}
9704 \def\pgf@circ@battery1@path#1{\pgf@circ@bipole@path{battery1}{#1}}
9705 \def\pgf@circ@europeaninductor@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}}
9706 \def\pgf@circ@americaninductor@path#1{\pgf@circ@bipole@path{americaninductor}{#1}}
9707 \def\pgf@circ@cuteinductor@path#1{\pgf@circ@bipole@path{cuteinductor}{#1}}
9708 \def\pgf@circ@inductor@path#1{%
9709 \pgfextra{
9710 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
9711 \def\pgf@temp{european}%
9712 }
9713 \ifx\pgf@temp\pgf@circ@temp%
9714 \pgf@circ@europeaninductor@path{#1}%
9715 \else%
9716 \pgfextra{ \def\pgf@temp{cute} }%
9717 \ifx\pgf@temp\pgf@circ@temp%
9718 \pgf@circ@cuteinductor@path{#1}%
9719 \else%
9720 \pgf@circ@americaninductor@path{#1}%
9721 \fi%
9722 \fi%
9723 }
9724 \def\pgf@circ@vinductor@path#1{
9725 \pgfextra{
9726 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
9727 \def\pgf@temp{european}%
9728 }
9729 \ifx\pgf@temp\pgf@circ@temp%
9730 \pgf@circ@veuropeaninductor@path{#1}%
9731 \else%
9732 \pgfextra{ \def\pgf@temp{cute} }%
9733 \ifx\pgf@temp\pgf@circ@temp%
9734 \pgf@circ@vcuteinductor@path{#1}%
9735 \else%
9736 \pgf@circ@vamericaninductor@path{#1}%
9737 \fi%
9738 \fi%
9739 }
9740 \def\pgf@circ@veuropeaninductor@path#1{\pgf@circ@bipole@path{tfullgeneric}{#1}}
9741 \def\pgf@circ@vamericaninductor@path#1{\pgf@circ@bipole@path{vamericaninductor}{#1}}
9742 \def\pgf@circ@vcuteinductor@path#1{\pgf@circ@bipole@path{vcuteinductor}{#1}}
9743 \def\pgf@circ@lamp@path#1{\pgf@circ@bipole@path{lamp}{#1}}
9744 \def\pgf@circ@vsource@path#1{\pgf@circ@bipole@path{vsource}{#1}}
9745 \def\pgf@circ@vsourceam@path#1{\pgf@circ@bipole@path{vsourceAM}{#1}}
9746 \def\pgf@circ@vsourcesin@path#1{\pgf@circ@bipole@path{vsourcesin}{#1}}
9747 \def\pgf@circ@isource@path#1{\pgf@circ@bipole@path{isource}{#1}}
9748 \def\pgf@circ@isourcesin@path#1{\pgf@circ@bipole@path{isourcesin}{#1}}
9749 \def\pgf@circ@vsourcesquare@path#1{\pgf@circ@bipole@path{vsourcesquare}{#1}}
9750 \def\pgf@circ@isourceam@path#1{\pgf@circ@bipole@path{isourceAM}{#1}}
9751 \def\pgf@circ@cvsource@path#1{\pgf@circ@bipole@path{cvsource}{#1}}
9752 \def\pgf@circ@cvsourceam@path#1{\pgf@circ@bipole@path{cvsourceAM}{#1}}
9753 \def\pgf@circ@cvsourcesin@path#1{\pgf@circ@bipole@path{cvsourcesin}{#1}}
9754 \def\pgf@circ@cisource@path#1{\pgf@circ@bipole@path{cisource}{#1}}
9755 \def\pgf@circ@cisourceam@path#1{\pgf@circ@bipole@path{cisourceAM}{#1}}
9756 \def\pgf@circ@cisourcesin@path#1{\pgf@circ@bipole@path{cisourcesin}{#1}}
9757 \def\pgf@circ@fulldiode@path#1{\pgf@circ@bipole@path{fulldiode}{#1}}
9758 \def\pgf@circ@fullzdiode@path#1{\pgf@circ@bipole@path{fullzdiode}{#1}}
9759 \def\pgf@circ@fullsdiode@path#1{\pgf@circ@bipole@path{fullsdiode}{#1}}
9760 \def\pgf@circ@fulltdiode@path#1{\pgf@circ@bipole@path{fulltdiode}{#1}}
9761 \def\pgf@circ@fulllediode@path#1{\pgf@circ@bipole@path{fulllediode}{#1}}
9762 \def\pgf@circ@fullpdiode@path#1{\pgf@circ@bipole@path{fullpdiode}{#1}}
9763 \def\pgf@circ@fullvarcap@path#1{\pgf@circ@bipole@path{fullvarcap}{#1}}
9764 \def\pgf@circ@emptydiode@path#1{\pgf@circ@bipole@path{emptydiode}{#1}}
9765 \def\pgf@circ@emptyzdiode@path#1{\pgf@circ@bipole@path{emptyzdiode}{#1}}
9766 \def\pgf@circ@emptysdiode@path#1{\pgf@circ@bipole@path{emptysdiode}{#1}}
9767 \def\pgf@circ@emptytdiode@path#1{\pgf@circ@bipole@path{emptytdiode}{#1}}
9768 \def\pgf@circ@emptylediode@path#1{\pgf@circ@bipole@path{emptylediode}{#1}}
9769 \def\pgf@circ@emptypdiode@path#1{\pgf@circ@bipole@path{emptypdiode}{#1}}
9770 \def\pgf@circ@emptyvarcap@path#1{\pgf@circ@bipole@path{emptyvarcap}{#1}}
9771 \def\pgf@circ@short@path#1{\pgf@circ@bipole@path{short}{#1}}
9772 \def\pgf@circ@cspst@path#1{\pgf@circ@bipole@path{cspst}{#1}}
9773 \def\pgf@circ@ospst@path#1{\pgf@circ@bipole@path{ospst}{#1}}
9774 \def\pgf@circ@pushbutton@path#1{\pgf@circ@bipole@path{pushbutton}{#1}}
9775 \def\pgf@circ@open@path#1{\pgf@circ@bipole@path{open}{#1}}
9776 \def\pgf@circ@generic@path#1{\pgf@circ@bipole@path{generic}{#1}}
9777 \def\pgf@circ@ageneric@path#1{\pgf@circ@bipole@path{ageneric}{#1}}
9778 \def\pgf@circ@tgeneric@path#1{\pgf@circ@bipole@path{tgeneric}{#1}}
9779 \def\pgf@circ@fullgeneric@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}}
9780 \def\pgf@circ@tfullgeneric@path#1{\pgf@circ@bipole@path{tfullgeneric}{#1}}
9781 \def\pgf@circ@ammeter@path#1{\pgf@circ@bipole@path{ammeter}{#1}}
9782 \def\pgf@circ@voltmeter@path#1{\pgf@circ@bipole@path{voltmeter}{#1}}
9783 \def\pgf@circ@empty@path#1{}
9784 \def\pgf@circ@photoresistor@path#1{\pgf@circ@bipole@path{photoresistor}{#1}}
9785 \def\pgf@circ@thyristor@path#1{\pgf@circ@bipole@path{thyristor}{#1}}
9786 \def\pgf@circ@toggleswitch@path#1{\pgf@circ@bipole@path{toggleswitch}{#1}}
9787 \def\pgf@circ@memristor@path#1{\pgf@circ@bipole@path{memristor}{#1}}
9788 \def\pgf@circ@triac@path#1{\pgf@circ@bipole@path{triac}{#1}}
9789 \def\pgf@circ@tline@path#1{\pgf@circ@bipole@path{tline}{#1}}
9790 \def\pgf@circ@squid@path#1{\pgf@circ@bipole@path{squid}{#1}}
9791 \def\pgf@circ@barrier@path#1{\pgf@circ@bipole@path{barrier}{#1}}
9792 \def\pgf@circ@thermocouple@path#1{\pgf@circ@bipole@path{thermocouple}{#1}}
9793 \def\pgf@circ@fuse@path#1{\pgf@circ@bipole@path{fuse}{#1}}
9794 \def\pgf@circ@afuse@path#1{\pgf@circ@bipole@path{afuse}{#1}}
9795
9796 \def\pgf@circ@twoport@path#1{\pgf@circ@bipole@path{twoport}{#1}}
9797 \def\pgf@circ@vco@path#1{\pgf@circ@bipole@path{vco}{#1}}
9798 \def\pgf@circ@bandpass@path#1{\pgf@circ@bipole@path{bandpass}{#1}}
9799 \def\pgf@circ@highpass@path#1{\pgf@circ@bipole@path{highpass}{#1}}
9800 \def\pgf@circ@lowpass@path#1{\pgf@circ@bipole@path{lowpass}{#1}}
9801 \def\pgf@circ@adc@path#1{\pgf@circ@bipole@path{adc}{#1}}
9802 \def\pgf@circ@dac@path#1{\pgf@circ@bipole@path{dac}{#1}}
9803 \def\pgf@circ@dsp@path#1{\pgf@circ@bipole@path{dsp}{#1}}
9804 \def\pgf@circ@fft@path#1{\pgf@circ@bipole@path{fft}{#1}}
9805 \def\pgf@circ@amp@path#1{\pgf@circ@bipole@path{amp}{#1}}
9806 \def\pgf@circ@vamp@path#1{\pgf@circ@bipole@path{vamp}{#1}}
9807 \def\pgf@circ@piattenuator@path#1{\pgf@circ@bipole@path{piattenuator}{#1}}
9808 \def\pgf@circ@vpiattenuator@path#1{\pgf@circ@bipole@path{vpiattenuator}{#1}}
9809 \def\pgf@circ@tattenuator@path#1{\pgf@circ@bipole@path{tattenuator}{#1}}
9810 \def\pgf@circ@vtattenuator@path#1{\pgf@circ@bipole@path{vtattenuator}{#1}}
9811 \def\pgf@circ@phaseshifter@path#1{\pgf@circ@bipole@path{phaseshifter}{#1}}
9812 \def\pgf@circ@vphaseshifter@path#1{\pgf@circ@bipole@path{vphaseshifter}{#1}}
9813 \def\pgf@circ@detector@path#1{\pgf@circ@bipole@path{detector}{#1}}
9814
9815
9816 %% Styles
9817
9818 %% Aggiungere per thyristor e tripoli semplici
9819
9820 %\def\ctikzsetbipole#1#2{%
9821 % \tikzset{#1/.style= {to path=#2, \circuitikzbasekey, l=##1}}%
9822 %}
9823 %\ctikzsetbipole{resistor}{\pgf@circ@resistor@path}
9824
9825 \tikzset{resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@resistor@path, l=#1}}
9826 \tikzset{american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{resistor}{#1}, l=#1}}
9827 \tikzset{european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{generic}{#1}, l=#1}}
9828 \tikzset{ammeter/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@ammeter@path, l=#1}}
9829 \tikzset{voltmeter/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@voltmeter@path, l=#1}}
9830 \tikzset{potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@potentiometer@path, l=#1}}
9831 \tikzset{varistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@varistor@path, l=#1}}
9832 \tikzset{photoresistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@photoresistor@path, l=#1}}
9833 \tikzset{thermistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistor@path, l=#1}}
9834 \tikzset{thermistor ptc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorptc@path, l=#1}}
9835 \tikzset{thermistor ntc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorntc@path, l=#1}}
9836 \tikzset{american potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{potentiometer}{#1}, l=#1}}
9837 \tikzset{european potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{genericpotentiometer}{#1}, l=#1}}
9838 \tikzset{variable resistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vresistor@path, l=#1}}
9839 \tikzset{variable american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{vresistor}{#1}, l=#1}}
9840 \tikzset{variable european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{tgeneric}{#1}, l=#1}}
9841 \tikzset{capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@capacitor@path, l=#1}}
9842 \tikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@polarcapacitor@path, l=#1}}
9843 \tikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcapacitor@path, l=#1}}
9844 \tikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
9845 \tikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery1@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
9846 \tikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@inductor@path, l=#1}}
9847 \tikzset{american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americaninductor@path, l=#1}}
9848 \tikzset{cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cuteinductor@path, l=#1}}
9849 \tikzset{european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@europeaninductor@path, l=#1}}
9850 \tikzset{variable inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vinductor@path, l=#1}}
9851 \tikzset{variable european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@veuropeaninductor@path, l=#1}}
9852 \tikzset{variable american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vamericaninductor@path, l=#1}}
9853 \tikzset{variable cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcuteinductor@path, l=#1}}
9854 \tikzset{tline/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tline@path, l=#1}}
9855 \tikzset{transmission line/.style = {tline = #1}}
9856 \tikzset{TL/.style = {tline = #1}}
9857 \tikzset{european voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsource@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
9858 \tikzset{american voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
9859 \tikzset{european current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
9860 \tikzset{american current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
9861 \tikzset{european controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsource@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
9862 \tikzset{american controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
9863 \tikzset{european controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
9864 \tikzset{american controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
9865 \tikzset{sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcesin@path, \circuitikzbasekey/bipole/is voltage=true, v=#1 }}
9866 \tikzset{square voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcesquare@path, \circuitikzbasekey/bipole/is voltage=true, v=#1 }}
9867 \tikzset{sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
9868 \tikzset{controlled sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourcesin@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
9869 \tikzset{controlled sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
9870
9871 \tikzset{voltage source/.style = {\ifpgf@circuit@europeanvoltage european \else american \fi voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
9872 \tikzset{current source/.style = {\ifpgf@circuit@europeancurrent european \else american \fi current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
9873 \tikzset{controlled voltage source/.style = {\ifpgf@circuit@europeanvoltage european \else american \fi controlled voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
9874 \tikzset{controlled current source/.style = {\ifpgf@circuit@europeancurrent european \else american \fi controlled current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
9875
9876
9877 \tikzset{generic/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@generic@path, l=#1}}
9878 \tikzset{ageneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ageneric@path, l=#1}}
9879 \tikzset{tgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tgeneric@path, l=#1}}
9880 \tikzset{fullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullgeneric@path, l=#1}}
9881 \tikzset{tfullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tfullgeneric@path, l=#1}}
9882 \tikzset{short/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@short@path}}
9883 \tikzset{open/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@open@path}}
9884
9885 \tikzset{lamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lamp@path}}
9886
9887 \tikzset{squid/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@squid@path}}
9888 \tikzset{barrier/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@barrier@path}}
9889 \tikzset{thermocouple/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermocouple@path}}
9890 \tikzset{fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fuse@path}}
9891 \tikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@afuse@path}}
9892
9893 \tikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@twoport@path}}
9894 \tikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vco@path}}
9895 \tikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandpass@path}}
9896 \tikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@highpass@path}}
9897 \tikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lowpass@path}}
9898 \tikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@adc@path}}
9899 \tikzset{dac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dac@path}}
9900 \tikzset{dsp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dsp@path}}
9901 \tikzset{fft/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fft@path}}
9902 \tikzset{amp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@amp@path}}
9903 \tikzset{vamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vamp@path}}
9904 \tikzset{piattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@piattenuator@path}}
9905 \tikzset{vpiattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vpiattenuator@path}}
9906 \tikzset{tattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tattenuator@path}}
9907 \tikzset{vtattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vtattenuator@path}}
9908 \tikzset{phaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@phaseshifter@path}}
9909 \tikzset{vphaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vphaseshifter@path}}
9910 \tikzset{detector/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@detector@path}}
9911
9912
9913
9914 \tikzset{full diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulldiode@path}}
9915 \tikzset{full Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullsdiode@path}}
9916 \tikzset{full Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullzdiode@path}}
9917 \tikzset{full tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulltdiode@path}}
9918 \tikzset{full photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullpdiode@path}}
9919 \tikzset{full led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulllediode@path}}
9920 \tikzset{full varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullvarcap@path}}
9921
9922 \tikzset{empty diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptydiode@path}}
9923 \tikzset{empty Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptysdiode@path}}
9924 \tikzset{empty Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyzdiode@path}}
9925 \tikzset{empty tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptytdiode@path}}
9926 \tikzset{empty photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptypdiode@path}}
9927 \tikzset{empty led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptylediode@path}}
9928 \tikzset{empty varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyvarcap@path}}
9929
9930 \tikzset{Schottky diode/.style = {\ifpgf@circuit@fulldiode full \else empty \fi Schottky diode}}
9931 \tikzset{Zener diode/.style = {\ifpgf@circuit@fulldiode full \else empty \fi Zener diode}}
9932 \tikzset{tunnel diode/.style = {\ifpgf@circuit@fulldiode full \else empty \fi tunnel diode}}
9933 \tikzset{photodiode/.style = {\ifpgf@circuit@fulldiode full \else empty \fi photodiode}}
9934 \tikzset{led/.style = {\ifpgf@circuit@fulldiode full \else empty \fi led}}
9935 \tikzset{varcap/.style = {\ifpgf@circuit@fulldiode full \else empty \fi varcap}}
9936 \tikzset{diode/.style = {\ifpgf@circuit@fulldiode full \else empty \fi diode}}
9937
9938 \tikzset{thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thyristor@path}}
9939 \tikzset{memristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@memristor@path}}
9940 \tikzset{triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@triac@path}}
9941
9942 \tikzset{closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cspst@path, l=#1}}
9943 \tikzset{opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ospst@path, l=#1}}
9944 \tikzset{push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pushbutton@path, l=#1}}
9945 \tikzset{toggle switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@toggleswitch@path}}
9946
9947 \tikzset{ammeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ammeter@path}}
9948 \tikzset{voltmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@voltmeter@path}}
9949
9950 % short forms
9951 \tikzset{vsource/.style = {voltage source = #1}}
9952 \tikzset{isource/.style = {current source = #1}}
9953 \tikzset{cisource/.style = {controlled current source = #1}}
9954 \tikzset{cvsource/.style = {controlled voltage source = #1}}
9955 \tikzset{vsourcesin/.style = {sinusoidal voltage source = #1}}
9956 \tikzset{vsourcesquare/.style = {square voltage source = #1}}
9957 \tikzset{isourcesin/.style = {sinusoidal current source = #1}}
9958 \tikzset{cisourcesin/.style = {controlled sinusoidal current source = #1}}
9959 \tikzset{cvsourcesin/.style = {controlled sinusoidal voltage source = #1}}
9960
9961 \tikzset{controlled vsource/.style = {controlled voltage source = #1}}
9962 \tikzset{controlled isource/.style = {controlled current source = #1}}
9963 \tikzset{controlled vsourcesin/.style = {controlled sinusoidal voltage source = #1}}
9964 \tikzset{controlled isourcesin/.style = {controlled sinusoidal current source = #1}}
9965
9966 \tikzset{R/.style= {resistor = #1}}
9967 \tikzset{vR/.style= {variable resistor = #1}}
9968 \tikzset{phR/.style= {photoresistor = #1}}
9969 \tikzset{thR/.style= {thermistor = #1}}
9970 \tikzset{thRp/.style= {thermistor ptc= #1}}
9971 \tikzset{thRn/.style= {thermistor ntc= #1}}
9972 \tikzset{pR/.style= {potentiometer = #1}}
9973 \tikzset{C/.style = {capacitor = #1}}
9974 \tikzset{pC/.style = {polar capacitor = #1}}
9975 \tikzset{vC/.style = {variable capacitor = #1}}
9976 \tikzset{L/.style = {inductor = #1}}
9977 \tikzset{vL/.style = {variable inductor = #1}}
9978 \tikzset{V/.style = {voltage source = #1}}
9979 \tikzset{cV/.style = {controlled voltage source = #1}}
9980 \tikzset{sV/.style = {sinusoidal voltage source = #1}}
9981 \tikzset{sqV/.style = {square voltage source = #1}}
9982 \tikzset{csV/.style = {controlled sinusoidal voltage source = #1}}
9983 \def\pgf@temp#1{
9984 \tikzset{V#1/.style = {voltage source, v#1=##1} }
9985 \tikzset{cV#1/.style = {controlled voltage source, v#1=##1} }
9986 \tikzset{sV#1/.style = {sinusoidal voltage source, v#1=##1} }
9987 \tikzset{csV#1/.style = {controlled sinusoidal voltage source, v#1=##1} }
9988 }
9989 \pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<}
9990 \pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_}
9991 \tikzset{I/.style = {current source = #1}}
9992 \tikzset{cI/.style = {controlled current source = #1}}
9993 \tikzset{sI/.style = {sinusoidal current source = #1}}
9994 \tikzset{csI/.style = {controlled sinusoidal current source = #1}}
9995 \def\pgf@temp#1{
9996 \tikzset{I#1/.style = {current source, i#1=##1} }
9997 \tikzset{cI#1/.style = {controlled current source, i#1=##1} }
9998 \tikzset{sI#1/.style = {sinusoidal current source, i#1=##1} }
9999 \tikzset{csI#1/.style = {controlled sinusoidal current source, i#1=##1} }
10000 }
10001 \pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<}
10002 \pgf@temp{>_} \pgf@temp{<_} \pgf@temp{>^} \pgf@temp{<^}
10003 \pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_}
10004 \tikzset{Do/.style = {empty diode}}
10005 \tikzset{tDo/.style = {empty tunnel diode}}
10006 \tikzset{zDo/.style = {empty Zener diode}}
10007 \tikzset{sDo/.style = {empty Schottky diode}}
10008 \tikzset{pDo/.style = {empty photodiode}}
10009 \tikzset{leDo/.style = {empty led}}
10010 \tikzset{VCo/.style = {empty varcap}}
10011 \tikzset{D*/.style = {full diode}}
10012 \tikzset{tD*/.style = {full tunnel diode}}
10013 \tikzset{zD*/.style = {full Zener diode}}
10014 \tikzset{sD*/.style = {full Schottky diode}}
10015 \tikzset{pD*/.style = {full photodiode}}
10016 \tikzset{leD*/.style = {full led}}
10017 \tikzset{VC*/.style = {full varcap}}
10018 \tikzset{D/.style = {diode}}
10019 \tikzset{tD/.style = {tunnel diode}}
10020 \tikzset{zD/.style = {Zener diode}}
10021 \tikzset{sD/.style = {Schottky diode}}
10022 \tikzset{pD/.style = {photodiode}}
10023 \tikzset{leD/.style = {led}}
10024 \tikzset{VC/.style = {varcap}}
10025
10026 \tikzset{Tr/.style = {triac}}
10027 \tikzset{Mr/.style = {memristor}}
10028 \tikzset{Ty/.style = {thyristor}}
10029
10030 \tikzset{cspst/.style = {closing switch = #1}}
10031 \tikzset{ospst/.style = {opening switch = #1}}
10032
10033 \tikzset{afuse/.style = {asymmetric fuse=#1}}
10034
10035
10036 \def\inheritlogicport#1#2{
10037 \pgfdeclareshape{#2 port}{
10038 \inheritsavedanchors[from=#1 #2 port]
10039 \inheritbackgroundpath[from=#1 #2 port]
10040 \inheritanchor[from=#1 #2 port]{in}
10041 \inheritanchor[from=#1 #2 port]{in 1}
10042 \inheritanchor[from=#1 #2 port]{in 2}
10043 \inheritanchor[from=#1 #2 port]{out}
10044 \inheritanchor[from=#1 #2 port]{center}
10045 \inheritanchor[from=#1 #2 port]{left}
10046 }
10047 }
10048
10049 \ifpgf@circuit@europeanlogicport
10050 \inheritlogicport{european}{and}
10051 \inheritlogicport{european}{or}
10052 \inheritlogicport{european}{xor}
10053 \inheritlogicport{european}{not}
10054 \inheritlogicport{european}{nand}
10055 \inheritlogicport{european}{nor}
10056 \inheritlogicport{european}{xnor}
10057 \else
10058 \inheritlogicport{american}{and}
10059 \inheritlogicport{american}{or}
10060 \inheritlogicport{american}{xor}
10061 \inheritlogicport{american}{not}
10062 \inheritlogicport{american}{nand}
10063 \inheritlogicport{american}{nor}
10064 \inheritlogicport{american}{xnor}
10065 \fi
10066
10067 % Transistor like bipoles
10068
10069 \def\pgf@circ@trans@path#1#2{
10070 \pgfextra{
10071 \edef\pgf@temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
10072 \def\pgf@circ@temp{#2}
10073 \ifx\pgf@temp\pgf@circ@temp % if it has not a name
10074 \pgfmathrandominteger{\pgf@circ@rand}{1000}{9999}
10075 \ctikzset{bipole/name = trans\pgf@circ@rand} % create it
10076 \fi
10077 }
10078 \ifpgf@circuit@bipole@reversed
10079 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
10080 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {}
10081 \else
10082 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
10083 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {}
10084 \fi
10085 \pgfextra{
10086 \pgf@circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
10087 {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
10088 \pgfmathadd{\pgfmathresult}{-90}
10089 \edef\pgf@circ@direction{\pgfmathresult}
10090 }
10091 ($(\tikztostart) ! .5 ! (\tikztotarget)$)
10092 node[#1, /tikz/rotate=\pgf@circ@direction, xscale=\ctikzvalof{mirror value}]
10093 (\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}}
10094 (\ctikzvalof{bipole/name}start.center) -- (\ctikzvalof{bipole/name}.left)
10095 (\ctikzvalof{bipole/name}.right) -- (\ctikzvalof{bipole/name}end.center)
10096 \pgfextra{
10097 \pgfcircresetpath
10098 }
10099 (\tikztotarget) \tikztonodes % e si continua
10100 }
10101
10102
10103 \def\pgf@circ@definetranspath#1{
10104 \tikzset{T#1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@trans@path{#1}{}, l=##1}}
10105 }
10106
10107 \pgf@circ@definetranspath{nmos}
10108 \pgf@circ@definetranspath{pmos}
10109 \pgf@circ@definetranspath{npn}
10110 \pgf@circ@definetranspath{pnp}
10111 \pgf@circ@definetranspath{nfet}
10112 \pgf@circ@definetranspath{nigfete}
10113 \pgf@circ@definetranspath{nigfetd}
10114 \pgf@circ@definetranspath{pfet}
10115 \pgf@circ@definetranspath{pigfete}
10116 \pgf@circ@definetranspath{pigfetd}
10117 \pgf@circ@definetranspath{njfet}
10118 \pgf@circ@definetranspath{pjfet}
10119 \pgf@circ@definetranspath{pigbt}
10120 \pgf@circ@definetranspath{nigbt}
10121 %%%---------- close: circuitikz1.code
10122
10123 \newenvironment{circuitikz}{\begin{tikzpicture}}{\end{tikzpicture}}
10124
10125
10126 \endinput
10127