Debian Codegraph @

texmf-dist/tex/latex/circuitikz/circuitikz-0.8.3-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 \NeedsTeXFormat{LaTeX2e}
15
16 \def\pgfcircversion{0.8.3}
17 \def\pgfcircversiondate{2017/05/28}
18
19
20 %% Version 3.0 of pgf/TikZ is required
21 \RequirePackage{tikz}
22 \usetikzlibrary{calc}
23 \usepgflibrary{arrows}
24
25
26 % The options are listed in the manual in this order
27
28 \DeclareOption{europeanvoltage}{
29 \ctikzset{voltage=european}
30 }
31
32 \DeclareOption{straightvoltages}{
33 \pgf@circuit@bipole@voltage@straighttrue
34 }
35
36 \DeclareOption{americanvoltage}{
37 \ctikzset{voltage=american}
38 }
39
40 \DeclareOption{europeancurrent}{
41 \ctikzset{current = european}
42 }
43
44 \DeclareOption{americancurrent}{
45 \ctikzset{current = american}
46 }
47
48
49
50 \DeclareOption{americanresistor}{
51 \ctikzset{resistor = american}
52 }
53
54 \DeclareOption{europeanresistor}{
55 \ctikzset{resistor = european}
56 }
57
58 \DeclareOption{americaninductor}{
59 \ctikzset{inductor = american}
60 }
61
62 \DeclareOption{europeaninductor}{
63 \ctikzset{inductor = european}
64 }
65
66 \DeclareOption{cuteinductor}{
67 \ctikzset{inductor = cute}
68 }
69
70 \DeclareOption{americanport}{
71 \ctikzset{logic ports = american}
72 }
73
74 \DeclareOption{europeanport}{
75 \ctikzset{logic ports = european}
76 }
77
78 \DeclareOption{europeanport}{
79 \ctikzset{logic ports = european}
80 }
81
82 \DeclareOption{european}{
83 \ctikzset{voltage=european} \ctikzset{current=european} \ctikzset{inductor=european}
84 \ctikzset{resistor=european} \ctikzset{logic ports=european} \ctikzset{gas filled surge arrester choice = european}
85 }
86
87 \DeclareOption{american}{
88 \ctikzset{voltage=american} \ctikzset{current=american} \ctikzset{resistor=american} \ctikzset{inductor=american} \ctikzset{gas filled surge arrester choice = american}
89 \ctikzset{logic ports = american}
90 }
91
92 \DeclareOption{fulldiodes}{
93 \ctikzset{diode = full}
94 }
95
96 \DeclareOption{emptydiodes}{
97 \ctikzset{diode = empty}
98 }
99
100 \DeclareOption{europeanvoltages}{
101 \ctikzset{voltage=european}
102 }
103
104 \DeclareOption{americanvoltages}{
105 \ctikzset{voltage=american}
106 }
107
108 \DeclareOption{europeancurrents}{
109 \ctikzset{current = european}
110 }
111
112 \DeclareOption{americancurrents}{
113 \ctikzset{current = american}
114 }
115
116 \DeclareOption{americanresistors}{
117 \ctikzset{resistor = american}
118 }
119
120 \DeclareOption{europeanresistors}{
121 \ctikzset{resistor = european}
122 }
123
124 \DeclareOption{americaninductors}{
125 \ctikzset{inductor = american}
126 }
127
128 \DeclareOption{europeaninductors}{
129 \ctikzset{inductor = european}
130 }
131
132 \DeclareOption{cuteinductors}{
133 \ctikzset{inductor = cute}
134 }
135
136 \DeclareOption{americanports}{
137 \ctikzset{logic ports = american}
138 }
139
140 \DeclareOption{europeanports}{
141 \ctikzset{logic ports = european}
142 }
143
144 \DeclareOption{americangfsurgearrester}{
145 \ctikzset{gas filled surge arrester choice = american}
146 }
147
148 \DeclareOption{europeangfsurgearrester}{
149 \ctikzset{gas filled surge arrester choice = european}
150 }
151
152 \DeclareOption{siunitx}{
153 \pgf@circ@siunitxtrue
154 }
155
156 \DeclareOption{nosiunitx}{
157 \pgf@circ@siunitxfalse
158 }
159
160 \DeclareOption{fulldiode}{
161 \ctikzset{diode = full}
162 }
163
164 \DeclareOption{emptydiode}{
165 \ctikzset{diode = empty}
166 }
167
168 \DeclareOption{strokediode}{
169 \ctikzset{diode = stroke}
170 }
171
172 \DeclareOption{arrowmos}{
173 \pgf@circuit@mos@arrowstrue
174 }
175
176 \DeclareOption{noarrowmos}{
177 \pgf@circuit@mos@arrowsfalse
178 }
179
180 \DeclareOption{fetbodydiode}{
181 \pgf@circuit@fet@bodydiodetrue
182 }
183
184 \DeclareOption{nofetbodydiode}{
185 \pgf@circuit@fet@bodydiodefalse
186 }
187
188 \DeclareOption{fetsolderdot}{
189 \pgf@circuit@fet@solderdottrue
190 }
191
192 \DeclareOption{nofetsolderdot}{
193 \pgf@circuit@fet@solderdotfalse
194 }
195
196 \DeclareOption{emptypmoscircle}{
197 \pgf@circuit@pmos@emptycircletrue
198 }
199
200
201 \DeclareOption{lazymos}{
202 \ctikzset{tripoles/nmos/width=.5}
203 \ctikzset{tripoles/nmos/gate height=.35}
204 \ctikzset{tripoles/nmos/base height=.35}
205 \ctikzset{tripoles/nmos/height/.initial=1.2}
206 \ctikzset{tripoles/nmos/base width=.5}
207 \ctikzset{tripoles/nmos/gate width=.65}
208
209 \ctikzset{tripoles/pmos/width=.5}
210 \ctikzset{tripoles/pmos/gate height=.35}
211 \ctikzset{tripoles/pmos/base height=.35}
212 \ctikzset{tripoles/pmos/height/.initial=1.2}
213 \ctikzset{tripoles/pmos/base width=.5}
214 \ctikzset{tripoles/pmos/gate width=.65}
215
216 \pgf@circuit@pmos@emptycircletrue
217 }
218
219 \DeclareOption{straightlabels}{
220 \ctikzset{label/align = straight}
221 }
222
223 \DeclareOption{rotatelabels}{
224 \ctikzset{label/align = rotate}
225 }
226
227 \DeclareOption{smartlabels}{
228 \ctikzset{label/align = smart}
229 }
230
231 \DeclareOption{compatibility}{
232 \pgf@circuit@compattrue
233 }
234
235 \DeclareOption{oldvoltagedirection}{
236 \pgf@circ@oldvoltagedirectiontrue
237 }
238 \DeclareOption{nooldvoltagedirection}{
239 \pgf@circ@oldvoltagedirectionfalse
240 }
241
242 \DeclareOption{betterproportions}{
243 \ctikzset{monopoles/ground/width/.initial=.15}
244
245 \ctikzset{bipoles/resistor/height/.initial=.23}
246 \ctikzset{bipoles/resistor/width/.initial=.6}
247 \ctikzset{bipoles/capacitor/height/.initial=.4}
248 \ctikzset{bipoles/capacitor/width/.initial=.1}
249 \ctikzset{bipoles/potentiometer/height/.initial=.6}
250 \ctikzset{bipoles/potentiometer/height 2/.initial=.23}
251 \ctikzset{bipoles/potentiometer/width/.initial=.6}
252 \ctikzset{bipoles/photoresistor/height/.initial=.6}
253 \ctikzset{bipoles/photoresistor/height 2/.initial=.23}
254 \ctikzset{bipoles/photoresistor/width/.initial=.6}
255 \ctikzset{bipoles/thermistor/main/.initial=.7}
256 \ctikzset{bipoles/thermistor/height/.initial=.328}%.23/.7
257 \ctikzset{bipoles/thermistor/width/.initial=.6}
258 \ctikzset{bipoles/thermistorntc/width/.initial=.6}
259 \ctikzset{bipoles/thermistorntc/main/.initial=.7}
260 \ctikzset{bipoles/thermistorntc/height/.initial=.328}%.23/.7
261 \ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.23/.7
262 \ctikzset{bipoles/thermistorptc/width/.initial=.6}
263 \ctikzset{bipoles/thermistorptc/main/.initial=.7}
264 \ctikzset{bipoles/thermistorptc/height/.initial=.328}%.23/.7
265 \ctikzset{bipoles/varistor/main/.initial=.7}
266 \ctikzset{bipoles/varistor/height/.initial=.328}%.23/.7
267 \ctikzset{bipoles/varistor/width/.initial=.6}
268 \ctikzset{bipoles/vresistor/height/.initial=.45}
269 \ctikzset{bipoles/vresistor/width/.initial=.6}
270 \ctikzset{bipoles/generic/height/.initial=.23}
271 \ctikzset{bipoles/generic/width/.initial=.6}
272 \ctikzset{bipoles/generic potentiometer/height/.initial=.6}
273 \ctikzset{bipoles/generic potentiometer/height 2/.initial=.23}
274 \ctikzset{bipoles/generic potentiometer/width/.initial=.6}
275 \ctikzset{bipoles/ageneric/height/.initial=.23}
276 \ctikzset{bipoles/ageneric/width/.initial=.6}
277 \ctikzset{bipoles/memristor/height/.initial=.23}
278 \ctikzset{bipoles/memristor/wave height/.initial=.375}
279 \ctikzset{bipoles/memristor/width/.initial=.60}
280 \ctikzset{bipoles/tgeneric/height/.initial=.525}
281 \ctikzset{bipoles/tgeneric/width/.initial=.6}
282 \ctikzset{bipoles/tfullgeneric/height/.initial=.525}
283 \ctikzset{bipoles/tfullgeneric/width/.initial=.60}
284 \ctikzset{bipoles/fullgeneric/height/.initial=.23}
285 \ctikzset{bipoles/fullgeneric/width/.initial=.6}
286 \ctikzset{bipoles/diode/height/.initial=.3}
287 \ctikzset{bipoles/diode/width/.initial=.25}
288
289 \ctikzset{tripoles/thyristor/height/.initial=.66}
290 \ctikzset{tripoles/thyristor/height 2/.initial=.3}
291 \ctikzset{tripoles/thyristor/width/.initial=.6}
292 \ctikzset{tripoles/thyristor/diode height/.initial=.3}
293 \ctikzset{tripoles/thyristor/diode width left/.initial=.4}
294 \ctikzset{tripoles/thyristor/diode width right/.initial=.3}
295
296 \ctikzset{tripoles/triac/height/.initial=.66}
297 \ctikzset{tripoles/triac/width/.initial=.6}
298 \ctikzset{tripoles/triac/diode width left/.initial=.3}
299 \ctikzset{tripoles/triac/diode width right/.initial=.3}
300 }
301
302 %%%%%%%%%
303 %%%%%%%%%%% Springe nach tex/pgfcirc.defines
304 %%%---------- open: tex/pgfcirc.defines.tex
305
306 %% Options
307
308 %%%%%%%%%%%%
309 %% Dimensions
310
311 % coordinates
312 \newdimen\pgf@circ@res@up
313 \newdimen\pgf@circ@res@down
314 \newdimen\pgf@circ@res@zero
315 \newdimen\pgf@circ@res@left
316 \newdimen\pgf@circ@res@right
317 \newdimen\pgf@circ@res@other
318 \newdimen\pgf@circ@res@step
319 \newdimen\pgf@circ@res@temp
320 % inital thickness
321 \newdimen \pgfstartlinewidth
322 %% Keys
323
324 \long\def\pgf@circ@comment#1{}
325
326 \def\circuitikzbasekey{/tikz/circuitikz}
327
328 \pgfkeys{\circuitikzbasekey/.is family}
329
330 \def\circuitikzset#1{\pgfkeys{\circuitikzbasekey,#1}}
331 \let\ctikzset\circuitikzset
332 \def\ctikzvalof#1{\pgfkeysvalueof{\circuitikzbasekey/#1}}
333 \def\ctikzsetvalof#1#2{\pgfkeyssetvalue{\circuitikzbasekey/#1}{#2}}
334
335 \newif\ifpgf@circ@siunitx
336 \newif\ifpgf@circuit@compat
337 \newif\ifpgf@circ@oldvoltagedirection
338
339 % Option ">" for twoports
340 \newif\ifpgf@circuit@inputarrow
341 \ctikzset{>/.add code={}{\pgf@circuit@inputarrowtrue}}
342 \ctikzset{inputarrow/.is choice}
343 \ctikzset{inputarrow/true/.code={\pgf@circuit@inputarrowtrue}}
344 \ctikzset{inputarrow/false/.code={\pgf@circuit@inputarrowfalse}}
345
346 % Option "boxed" for nodes and twoports
347 \newif\ifpgf@circuit@boxed
348 \pgfkeys{/tikz/boxed/.add code={}{\pgf@circuit@boxedtrue}}
349 \ctikzset{boxed/.add code={}{\pgf@circuit@boxedtrue}}
350 \pgfkeys{/tikz/box/.add code={}{\pgf@circuit@boxedtrue}}
351 \ctikzset{box/.add code={}{\pgf@circuit@boxedtrue}}
352
353 % Option "dashed" for nodes and twoports
354 \newif\ifpgf@circuit@dashed
355 \pgfkeys{/tikz/dashed/.add code={}{\pgf@circuit@dashedtrue}}
356 \ctikzset{dashed/.add code={}{\pgf@circuit@dashedtrue}}
357
358 % Option "t=*" for nodes
359 \pgfkeys{/tikz/t/.add code={}{\ctikzset{text=#1}}}
360
361
362
363 \ctikzset{bipoles/.is family}
364 \ctikzset{bipoles/border margin/.initial=1.1}
365 \ctikzset{bipoles/thickness/.initial=2}
366 \ctikzset{nodes width/.initial=.04}
367 \newdimen\pgf@circ@Rlen
368 \ctikzset{bipoles/length/.code={\pgf@circ@Rlen = #1}}
369 \pgf@circ@Rlen = 1.4cm
370
371 \ctikzset{monopoles/.is family}
372 \ctikzset{monopoles/ground/width/.initial=.25}
373 \ctikzset{monopoles/tground/thickness/.initial=3}
374 \ctikzset{monopoles/vcc/width/.initial=.2}
375 \ctikzset{monopoles/match/width/.initial=.4}
376 \ctikzset{monopoles/chassis/width/.initial=.25}
377 \ctikzset{monopoles/alternative chassis/width/.initial=.25}
378 \ctikzset{monopoles/equipotentiality/width/.initial=.25}
379 \ctikzset{monopoles/tlinestub/width/.initial=.25}
380 \ctikzset{monopoles/antenna/width/.initial=.25}
381 \ctikzset{monopoles/antenna/label/xanchor/.initial=.4}
382 \ctikzset{monopoles/antenna/label/yanchor/.initial=.75}
383 \ctikzset{monopoles/txantenna/label/xanchor/.initial=.4}
384 \ctikzset{monopoles/txantenna/label/yanchor/.initial=.75}
385 \ctikzset{monopoles/txantenna/width/.initial=.25}
386 \ctikzset{monopoles/rxantenna/label/xanchor/.initial=.4}
387 \ctikzset{monopoles/rxantenna/label/yanchor/.initial=.75}
388 \ctikzset{monopoles/rxantenna/width/.initial=.25}
389
390 \ctikzset{bipoles/resistor/height/.initial=.3}
391 \ctikzset{bipoles/resistor/width/.initial=.8}
392 \ctikzset{bipoles/potentiometer/height/.initial=.8}
393 \ctikzset{bipoles/potentiometer/height 2/.initial=.3}
394 \ctikzset{bipoles/potentiometer/width/.initial=.8}
395 \ctikzset{bipoles/photoresistor/height/.initial=.6}
396 \ctikzset{bipoles/photoresistor/height 2/.initial=.3}
397 \ctikzset{bipoles/photoresistor/width/.initial=.8}
398 \ctikzset{bipoles/thermistor/main/.initial=.7}
399 \ctikzset{bipoles/thermistor/height/.initial=.428}%.3/.7
400 \ctikzset{bipoles/thermistorntc/width/.initial=.8}
401 \ctikzset{bipoles/thermistorntc/main/.initial=.7}
402 \ctikzset{bipoles/thermistorntc/height/.initial=.428}%.3/.7
403 \ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.3/.7
404 \ctikzset{bipoles/thermistorptc/width/.initial=.8}
405 \ctikzset{bipoles/thermistorptc/main/.initial=.7}
406 \ctikzset{bipoles/thermistorptc/height/.initial=.428}%.3/.7
407 \ctikzset{bipoles/thermistorptc/height 2/.initial=.75}%.3/.7
408 \ctikzset{bipoles/thermistor/width/.initial=.8}
409 \ctikzset{bipoles/varistor/main/.initial=.7}
410 \ctikzset{bipoles/varistor/height/.initial=.428}%.3/.7
411 \ctikzset{bipoles/varistor/width/.initial=.8}
412 \ctikzset{bipoles/vresistor/height/.initial=.6}
413 \ctikzset{bipoles/vresistor/width/.initial=.8}
414 \ctikzset{bipoles/cuteinductor/height/.initial=.3}
415 \ctikzset{bipoles/cuteinductor/lower coil height/.initial=.15}
416 \ctikzset{bipoles/cuteinductor/width/.initial=.6}
417 \ctikzset{bipoles/cuteinductor/coils/.initial=5}
418 \ctikzset{bipoles/cuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
419 \ctikzset{bipoles/americaninductor/height/.initial=.3}
420 \ctikzset{bipoles/americaninductor/height 2/.initial=.1}
421 \ctikzset{bipoles/americaninductor/width/.initial=.8}
422 \ctikzset{bipoles/americaninductor/coils/.initial=4}
423 \ctikzset{bipoles/americaninductor/coil height/.initial=.15}
424 \ctikzset{bipoles/vcuteinductor/height/.initial=.6}
425 \ctikzset{bipoles/vcuteinductor/lower coil height/.initial=.3}
426 \ctikzset{bipoles/vcuteinductor/width/.initial=.6}
427 \ctikzset{bipoles/vcuteinductor/coils/.initial=5}
428 \ctikzset{bipoles/vcuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
429 \ctikzset{bipoles/vamericaninductor/height/.initial=.6}
430 \ctikzset{bipoles/vamericaninductor/height 2/.initial=.2}
431 \ctikzset{bipoles/vamericaninductor/width/.initial=.8}
432 \ctikzset{bipoles/vamericaninductor/coils/.initial=4}
433 \ctikzset{bipoles/vamericaninductor/coil height/.initial=.15}
434 \ctikzset{bipoles/esource/height/.initial=.60}
435 \ctikzset{bipoles/esource/width/.initial=.60}
436 \ctikzset{bipoles/pvsource/height/.initial=.60}
437 \ctikzset{bipoles/pvsource/width/.initial=.60}
438 \ctikzset{bipoles/isource/height/.initial=.60}
439 \ctikzset{bipoles/isource/width/.initial=.60}
440 \ctikzset{bipoles/oosource/height/.initial=.60}
441 \ctikzset{bipoles/oosource/width/.initial=.60}
442 \ctikzset{bipoles/oosource/circlesize/.initial=.65}%circlesize+circleoffset should be =1
443 \ctikzset{bipoles/oosource/circleoffset/.initial=.35}%circlesize+circleoffset should be =1
444 \ctikzset{bipoles/dcisource/height/.initial=.60}
445 \ctikzset{bipoles/dcisource/width/.initial=.60}
446 \ctikzset{bipoles/dcvsource/height/.initial=.60}
447 \ctikzset{bipoles/dcvsource/width/.initial=.60}
448 \ctikzset{bipoles/vsourcetri/height/.initial=.60}
449 \ctikzset{bipoles/vsourcetri/width/.initial=.60}
450 \ctikzset{bipoles/isourceam/height/.initial=.60}
451 \ctikzset{bipoles/isourceam/width/.initial=.60}
452 \ctikzset{bipoles/vsource/height/.initial=.60}
453 \ctikzset{bipoles/vsource/width/.initial=.60}
454 \ctikzset{bipoles/vsourceam/height/.initial=.60}
455 \ctikzset{bipoles/vsourceam/width/.initial=.60}
456 \ctikzset{bipoles/vsourceam/margin/.initial=.7}
457 \ctikzset{bipoles/isourcesin/height/.initial=.60}
458 \ctikzset{bipoles/isourcesin/width/.initial=.60}
459 \ctikzset{bipoles/vsourcesin/height/.initial=.60}
460 \ctikzset{bipoles/vsourcesin/width/.initial=.60}
461 \ctikzset{bipoles/vsourcesquare/height/.initial=.60}
462 \ctikzset{bipoles/vsourcesquare/width/.initial=.60}
463 \ctikzset{bipoles/cisource/height/.initial=.7}
464 \ctikzset{bipoles/cisource/width/.initial=.7}
465 \ctikzset{bipoles/cisourceam/height/.initial=.7}
466 \ctikzset{bipoles/cisourceam/width/.initial=.7}
467 \ctikzset{bipoles/cvsource/height/.initial=.7}
468 \ctikzset{bipoles/cvsource/width/.initial=.7}
469 \ctikzset{bipoles/cvsourceam/height/.initial=.7}
470 \ctikzset{bipoles/cvsourceam/width/.initial=.7}
471 \ctikzset{bipoles/cvsourceam/margin/.initial=.7}
472 \ctikzset{bipoles/cvsourceam/text scale/.initial=1}
473 \ctikzset{bipoles/cisourcesin/width/.initial=.7}
474 \ctikzset{bipoles/cvsourcesin/height/.initial=.7}
475 \ctikzset{bipoles/cvsourcesin/width/.initial=.7}
476 \ctikzset{bipoles/capacitor/height/.initial=.6}
477 \ctikzset{bipoles/capacitor/width/.initial=.2}
478 \ctikzset{bipoles/ecapacitor/height/.initial=.5}
479 \ctikzset{bipoles/ecapacitor/width/.initial=.2}
480 \ctikzset{bipoles/ecapacitor/font/.initial= \fontsize{6}{0}\selectfont\boldmath}
481 \ctikzset{bipoles/pcapacitor/height/.initial=.6}
482 \ctikzset{bipoles/pcapacitor/width/.initial=.2}
483 \ctikzset{bipoles/pcapacitor/bend width/.initial=1.1}
484 \ctikzset{bipoles/vcapacitor/height/.initial=.6}
485 \ctikzset{bipoles/vcapacitor/width/.initial=.5}
486 \ctikzset{bipoles/vcapacitor/capacitor width/.initial=.4}
487 \ctikzset{bipoles/piezoelectric/height/.initial=.7}
488 \ctikzset{bipoles/piezoelectric/width/.initial=.5}
489 \ctikzset{bipoles/battery/height/.initial=.6}
490 \ctikzset{bipoles/battery/width/.initial=.3}
491 \ctikzset{bipoles/battery1/height/.initial=.6}
492 \ctikzset{bipoles/battery1/width/.initial=.3}
493 \ctikzset{bipoles/battery2/height/.initial=.6}
494 \ctikzset{bipoles/battery2/width/.initial=.3}
495 \ctikzset{bipoles/diode/height/.initial=.50}
496 \ctikzset{bipoles/diode/width/.initial=.40}
497 \ctikzset{bipoles/varcap/height/.initial=.50}
498 \ctikzset{bipoles/varcap/width/.initial=.45}
499 \ctikzset{bipoles/spst/height/.initial=.35}
500 \ctikzset{bipoles/spst/width/.initial=.35}
501 \ctikzset{bipoles/spst/depth/.initial=.2}
502 \ctikzset{bipoles/nos/height/.initial=.3}
503 \ctikzset{bipoles/nos/width/.initial=.35}
504 \ctikzset{bipoles/ncs/height/.initial=.35}
505 \ctikzset{bipoles/ncs/width/.initial=.35}
506 \ctikzset{bipoles/generic/height/.initial=.30}
507 \ctikzset{bipoles/generic/width/.initial=.80}
508 \ctikzset{bipoles/european gas filled surge arrester/height/.initial=.30}
509 \ctikzset{bipoles/european gas filled surge arrester/width/.initial=.80}
510 \ctikzset{bipoles/european gas filled surge arrester/inside/.initial=.30}
511 \ctikzset{bipoles/american gas filled surge arrester/height/.initial=.60}
512 \ctikzset{bipoles/american gas filled surge arrester/width/.initial=.60}
513 \ctikzset{bipoles/american gas filled surge arrester/inside/.initial=.15}
514 \ctikzset{bipoles/american gas filled surge arrester/dot x/.initial=.25}
515 \ctikzset{bipoles/american gas filled surge arrester/dot y/.initial=.45}
516 \ctikzset{bipoles/american gas filled surge arrester/size/.initial=.1}
517 \ctikzset{bipoles/fuse/height/.initial=.20}
518 \ctikzset{bipoles/fuse/width/.initial=.50}
519 \ctikzset{bipoles/afuse/height/.initial=.20}
520 \ctikzset{bipoles/afuse/width/.initial=.50}
521 \ctikzset{bipoles/generic potentiometer/height/.initial=.80}
522 \ctikzset{bipoles/generic potentiometer/height 2/.initial=.30}
523 \ctikzset{bipoles/generic potentiometer/width/.initial=.80}
524 \ctikzset{bipoles/ageneric/height/.initial=.30}
525 \ctikzset{bipoles/ageneric/width/.initial=.80}
526 \ctikzset{bipoles/memristor/height/.initial=.30}
527 \ctikzset{bipoles/memristor/wave height/.initial=.5}
528 \ctikzset{bipoles/memristor/width/.initial=.80}
529 \ctikzset{bipoles/tgeneric/height/.initial=.70}
530 \ctikzset{bipoles/tgeneric/width/.initial=.80}
531 \ctikzset{bipoles/tfullgeneric/height/.initial=.70}
532 \ctikzset{bipoles/tfullgeneric/width/.initial=.80}
533 \ctikzset{bipoles/fullgeneric/height/.initial=.30}
534 \ctikzset{bipoles/fullgeneric/width/.initial=.80}
535 \ctikzset{bipoles/open/height/.initial=.3} %necessary for curly voltages
536 \ctikzset{bipoles/open/width/.initial=.3} %necessary for curly voltages
537 \ctikzset{bipoles/open/voltage/straight label distance/.initial=0}
538 \ctikzset{bipoles/open/voltage/distance from node/.initial=.2}
539 \ctikzset{bipoles/short/height/.initial=0} %dummy height for voltage positioning
540 \ctikzset{bipoles/short/width/.initial=0} %dummy width for voltage positioning
541 %\ctikzset{bipoles/short/voltage/straight label distance/.initial=.2}
542 %\ctikzset{bipoles/short/voltage/distance from node/.initial=.5}
543 \ctikzset{bipoles/ammeter/height/.initial=.60}
544 \ctikzset{bipoles/ammeter/width/.initial=.60}
545 \ctikzset{bipoles/ohmmeter/height/.initial=.60}
546 \ctikzset{bipoles/ohmmeter/width/.initial=.60}
547 \ctikzset{bipoles/voltmeter/height/.initial=.60}
548 \ctikzset{bipoles/voltmeter/width/.initial=.60}
549 \ctikzset{bipoles/buffer/height/.initial=1}
550 \ctikzset{bipoles/buffer/width/.initial=1}
551 \ctikzset{bipoles/not port/width/.initial=1}
552 \ctikzset{bipoles/not port/height/.initial=.8}
553 \ctikzset{bipoles/not port/circle width/.initial=.15}
554 \ctikzset{bipoles/lamp/height/.initial=.60}
555 \ctikzset{bipoles/lamp/width/.initial=.60}
556 \ctikzset{bipoles/tline/height/.initial=.3}
557 \ctikzset{bipoles/tline/width/.initial=.8}
558 \ctikzset{bipoles/squid/height/.initial=.60}
559 \ctikzset{bipoles/squid/width/.initial=.60}
560 \ctikzset{bipoles/barrier/height/.initial=.60}
561 \ctikzset{bipoles/barrier/width/.initial=.60}
562 \ctikzset{bipoles/thermocouple/height/.initial=.250}
563 \ctikzset{bipoles/thermocouple/height 2/.initial=.60}
564 \ctikzset{bipoles/thermocouple/width/.initial=.140}
565 \ctikzset{bipoles/pushbutton/height/.initial=.5}
566 \ctikzset{bipoles/pushbutton/height 2/.initial=.0}
567 \ctikzset{bipoles/pushbutton/width/.initial=.50}
568
569 \ctikzset{bipoles/twoport/width/.initial=.7}
570 \ctikzset{bipoles/twoport/height/.initial=.7}
571 \ctikzset{bipoles/twoport/text/.initial=}
572 \ctikzset{bipoles/vco/width/.initial=.7}
573 \ctikzset{bipoles/bandpass/width/.initial=.7}
574 \ctikzset{bipoles/bandstop/width/.initial=.7}
575 \ctikzset{bipoles/highpass/width/.initial=.7}
576 \ctikzset{bipoles/lowpass/width/.initial=.7}
577 \ctikzset{bipoles/adc/width/.initial=.7}
578 \ctikzset{bipoles/dac/width/.initial=.7}
579 \ctikzset{bipoles/dsp/width/.initial=.7}
580 \ctikzset{bipoles/fft/width/.initial=.7}
581 \ctikzset{bipoles/amp/width/.initial=.7}
582 \ctikzset{bipoles/vamp/width/.initial=.7}
583 \ctikzset{bipoles/piattenuator/width/.initial=.7}
584 \ctikzset{bipoles/vpiattenuator/width/.initial=.7}
585 \ctikzset{bipoles/tattenuator/width/.initial=.7}
586 \ctikzset{bipoles/vtattenuator/width/.initial=.7}
587 \ctikzset{bipoles/phaseshifter/width/.initial=.7}
588 \ctikzset{bipoles/vphaseshifter/width/.initial=.7}
589 \ctikzset{bipoles/detector/width/.initial=.7}
590
591
592 \newif\ifpgf@circuit@trans@depletiontype
593 \pgf@circuit@trans@depletiontypefalse
594
595 \newif\ifpgf@circuit@mos@arrows
596 \ctikzset{tripoles/mos style/.is choice}
597 \ctikzset{tripoles/mos style/no arrows/.code={\pgf@circuit@mos@arrowsfalse}}
598 \ctikzset{tripoles/mos style/arrows/.code={\pgf@circuit@mos@arrowstrue}}
599
600 % Option solderdot for fet
601 \newif\ifpgf@circuit@fet@solderdot
602 \pgfkeys{/tikz/solderdot/.add code={}{\pgf@circuit@fet@solderdottrue}}
603 \ctikzset{solderdot/.add code={}{\pgf@circuit@fet@solderdottrue}}
604 \pgfkeys{/tikz/nosolderdot/.add code={}{\pgf@circuit@fet@solderdotfalse}}
605 \ctikzset{nosolderdot/.add code={}{\pgf@circuit@fet@solderdotfalse}}
606
607 % Option bodydiode for fet
608 \newif\ifpgf@circuit@fet@bodydiode
609 \pgfkeys{/tikz/bodydiode/.add code={}{\pgf@circuit@fet@bodydiodetrue}}
610 \ctikzset{bodydiode/.add code={}{\pgf@circuit@fet@bodydiodetrue}}
611 \pgfkeys{/tikz/nobodydiode/.add code={}{\pgf@circuit@fet@bodydiodefalse}}
612 \ctikzset{nobodydiode/.add code={}{\pgf@circuit@fet@bodydiodefalse}}
613
614 % Option draw fet without gate connection
615 \newif\ifpgf@circuit@bpt@drawgate
616 \pgf@circuit@bpt@drawgatetrue
617 \pgfkeys{/tikz/nogate/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
618 \ctikzset{nogate/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
619 \pgfkeys{/tikz/nobase/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
620 \ctikzset{nobase/.add code={}{\pgf@circuit@bpt@drawgatefalse}}
621
622 % Option draw bpt without base connection
623 \newif\ifpgf@circuit@bpt@drawbase
624 \pgf@circuit@bpt@drawbasetrue
625 \pgfkeys{/tikz/nobase/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
626 \ctikzset{nobase/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
627 \pgfkeys{/tikz/nogate/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
628 \ctikzset{nogate/.add code={}{\pgf@circuit@bpt@drawbasefalse}}
629
630 % Option draw bpt with optical input
631 \newif\ifpgf@circuit@bpt@drawphoto
632 \pgf@circuit@bpt@drawphotofalse
633 \pgfkeys{/tikz/photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
634 \ctikzset{photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
635 \pgfkeys{/tikz/photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
636 \ctikzset{photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
637
638 % Option draw pmos with empty circle
639 \newif\ifpgf@circuit@pmos@emptycircle
640 \newif\ifpgf@circuit@pmos@emptycircle
641 \pgf@circuit@pmos@emptycirclefalse
642 \pgfkeys{/tikz/emptycircle/.add code={}{\pgf@circuit@pmos@emptycircletrue}}
643 \ctikzset{tripoles/pmos style/emptycircle/.add code={}{\pgf@circuit@pmos@emptycircletrue}}
644
645
646 \newif\ifpgf@circuit@trans@ntype
647 \pgf@circuit@trans@ntypetrue %default true
648 %\newif\ifpgf@circuit@trans@ptype
649 %\ctikzset{tripoles/nmos/.add code={\pgf@circuit@trans@ntypetrue}}
650 \ctikzset{tripoles/nmos/width/.initial=.7}
651 \ctikzset{tripoles/nmos/gate height/.initial=.35}
652 \ctikzset{tripoles/nmos/base height/.initial=.5}
653 \ctikzset{tripoles/nmos/conn height/.initial=0}
654 \ctikzset{tripoles/nmos/height/.initial=1.1}
655 \ctikzset{tripoles/nmos/base width/.initial=.5}
656 \ctikzset{tripoles/nmos/gate width/.initial=.62}
657 \ctikzset{tripoles/nmos/bodydiode scale/.initial=.3}
658 \ctikzset{tripoles/nmos/bodydiode distance/.initial=.3}
659 \ctikzset{tripoles/nmos/bodydiode conn/.initial=.6}
660 \ctikzset{tripoles/nmos/curr direction/.initial=1}
661
662 \ctikzset{tripoles/pmos/width/.initial=.7}
663 \ctikzset{tripoles/pmos/gate height/.initial=.35}
664 \ctikzset{tripoles/pmos/base height/.initial=.5}
665 \ctikzset{tripoles/pmos/conn height/.initial=0}
666 \ctikzset{tripoles/pmos/height/.initial=1.1}
667 \ctikzset{tripoles/pmos/base width/.initial=.5}
668 \ctikzset{tripoles/pmos/gate width/.initial=.62}
669 \ctikzset{tripoles/pmos/bodydiode scale/.initial=.3}
670 \ctikzset{tripoles/pmos/bodydiode distance/.initial=.3}
671 \ctikzset{tripoles/pmos/bodydiode conn/.initial=.6}
672 \ctikzset{tripoles/pmos/curr direction/.initial=-1}
673
674 \ctikzset{tripoles/nfet/width/.initial=.7}
675 \ctikzset{tripoles/nfet/gate height/.initial=.35}
676 \ctikzset{tripoles/nfet/base height/.initial=.5}
677 \ctikzset{tripoles/nfet/conn height/.initial=0}
678 \ctikzset{tripoles/nfet/height/.initial=1.1}
679 \ctikzset{tripoles/nfet/base width/.initial=.5}
680 \ctikzset{tripoles/nfet/gate width/.initial=.62}
681 \ctikzset{tripoles/nfet/bodydiode scale/.initial=.3}
682 \ctikzset{tripoles/nfet/bodydiode distance/.initial=.3}
683 \ctikzset{tripoles/nfet/bodydiode conn/.initial=.6}
684 \ctikzset{tripoles/nfet/curr direction/.initial=1}
685
686 \ctikzset{tripoles/pfet/width/.initial=.7}
687 \ctikzset{tripoles/pfet/gate height/.initial=.35}
688 \ctikzset{tripoles/pfet/base height/.initial=.5}
689 \ctikzset{tripoles/pfet/conn height/.initial=0}
690 \ctikzset{tripoles/pfet/height/.initial=1.1}
691 \ctikzset{tripoles/pfet/base width/.initial=.5}
692 \ctikzset{tripoles/pfet/gate width/.initial=.62}
693 \ctikzset{tripoles/pfet/bodydiode scale/.initial=.3}
694 \ctikzset{tripoles/pfet/bodydiode distance/.initial=.3}
695 \ctikzset{tripoles/pfet/bodydiode conn/.initial=.6}
696 \ctikzset{tripoles/pfet/curr direction/.initial=-1}
697
698 \ctikzset{tripoles/nigfete/width/.initial=.7}
699 \ctikzset{tripoles/nigfete/gate height/.initial=.35}
700 \ctikzset{tripoles/nigfete/base height/.initial=.5}
701 \ctikzset{tripoles/nigfete/conn height/.initial=.35}
702 \ctikzset{tripoles/nigfete/height/.initial=1.1}
703 \ctikzset{tripoles/nigfete/base width/.initial=.5}
704 \ctikzset{tripoles/nigfete/gate width/.initial=.62}
705 \ctikzset{tripoles/nigfete/bodydiode scale/.initial=.3}
706 \ctikzset{tripoles/nigfete/bodydiode distance/.initial=.3}
707 \ctikzset{tripoles/nigfete/bodydiode conn/.initial=.6}
708 \ctikzset{tripoles/nigfete/curr direction/.initial=1}
709
710 \ctikzset{tripoles/nigfetd/width/.initial=.7}
711 \ctikzset{tripoles/nigfetd/gate height/.initial=.35}
712 \ctikzset{tripoles/nigfetd/base height/.initial=.5}
713 \ctikzset{tripoles/nigfetd/conn height/.initial=.35}
714 \ctikzset{tripoles/nigfetd/height/.initial=1.1}
715 \ctikzset{tripoles/nigfetd/base width/.initial=.5}
716 \ctikzset{tripoles/nigfetd/gate width/.initial=.62}
717 \ctikzset{tripoles/nigfetd/bodydiode scale/.initial=.3}
718 \ctikzset{tripoles/nigfetd/bodydiode distance/.initial=.3}
719 \ctikzset{tripoles/nigfetd/bodydiode conn/.initial=.6}
720 \ctikzset{tripoles/nigfetd/curr direction/.initial=1}
721
722 \ctikzset{tripoles/nigfetebulk/width/.initial=.7}
723 \ctikzset{tripoles/nigfetebulk/gate height/.initial=.35}
724 \ctikzset{tripoles/nigfetebulk/base height/.initial=.5}
725 \ctikzset{tripoles/nigfetebulk/conn height/.initial=.35}
726 \ctikzset{tripoles/nigfetebulk/height/.initial=1.1}
727 \ctikzset{tripoles/nigfetebulk/base width/.initial=.5}
728 \ctikzset{tripoles/nigfetebulk/gate width/.initial=.62}
729 \ctikzset{tripoles/nigfetebulk/bodydiode scale/.initial=.3}
730 \ctikzset{tripoles/nigfetebulk/bodydiode distance/.initial=.3}
731 \ctikzset{tripoles/nigfetebulk/bodydiode conn/.initial=.6}
732 \ctikzset{tripoles/nigfetebulk/curr direction/.initial=1}
733
734 \ctikzset{tripoles/pigfete/width/.initial=.7}
735 \ctikzset{tripoles/pigfete/gate height/.initial=.35}
736 \ctikzset{tripoles/pigfete/base height/.initial=.5}
737 \ctikzset{tripoles/pigfete/conn height/.initial=.35}
738 \ctikzset{tripoles/pigfete/height/.initial=1.1}
739 \ctikzset{tripoles/pigfete/base width/.initial=.5}
740 \ctikzset{tripoles/pigfete/gate width/.initial=.62}
741 \ctikzset{tripoles/pigfete/bodydiode scale/.initial=.3}
742 \ctikzset{tripoles/pigfete/bodydiode distance/.initial=.3}
743 \ctikzset{tripoles/pigfete/bodydiode conn/.initial=.6}
744 \ctikzset{tripoles/pigfete/curr direction/.initial=-1}
745
746 \ctikzset{tripoles/pigfetd/width/.initial=.7}
747 \ctikzset{tripoles/pigfetd/gate height/.initial=.35}
748 \ctikzset{tripoles/pigfetd/base height/.initial=.5}
749 \ctikzset{tripoles/pigfetd/conn height/.initial=.35}
750 \ctikzset{tripoles/pigfetd/height/.initial=1.1}
751 \ctikzset{tripoles/pigfetd/base width/.initial=.5}
752 \ctikzset{tripoles/pigfetd/gate width/.initial=.62}
753 \ctikzset{tripoles/pigfetd/bodydiode scale/.initial=.3}
754 \ctikzset{tripoles/pigfetd/bodydiode distance/.initial=.3}
755 \ctikzset{tripoles/pigfetd/bodydiode conn/.initial=.6}
756 \ctikzset{tripoles/pigfetd/curr direction/.initial=-1}
757
758 \ctikzset{tripoles/pigfetebulk/width/.initial=.7}
759 \ctikzset{tripoles/pigfetebulk/gate height/.initial=.35}
760 \ctikzset{tripoles/pigfetebulk/conn height/.initial=.35}
761 \ctikzset{tripoles/pigfetebulk/base height/.initial=.5}
762 \ctikzset{tripoles/pigfetebulk/height/.initial=1.1}
763 \ctikzset{tripoles/pigfetebulk/base width/.initial=.5}
764 \ctikzset{tripoles/pigfetebulk/gate width/.initial=.62}
765 \ctikzset{tripoles/pigfetebulk/bodydiode scale/.initial=.3}
766 \ctikzset{tripoles/pigfetebulk/bodydiode distance/.initial=.3}
767 \ctikzset{tripoles/pigfetebulk/bodydiode conn/.initial=.6}
768 \ctikzset{tripoles/pigfetebulk/curr direction/.initial=-1}
769
770 \ctikzset{tripoles/npn/width/.initial=.6}
771 \ctikzset{tripoles/npn/base height/.initial=.45}
772 \ctikzset{tripoles/npn/base height 2/.initial=.15}
773 \ctikzset{tripoles/npn/base height/.initial=.4}
774 \ctikzset{tripoles/npn/conn height/.initial=0}
775 \ctikzset{tripoles/npn/height/.initial=1.1}
776 \ctikzset{tripoles/npn/base width/.initial=.5}
777 \ctikzset{tripoles/npn/bodydiode scale/.initial=.3}
778 \ctikzset{tripoles/npn/bodydiode distance/.initial=.3}
779 \ctikzset{tripoles/npn/bodydiode conn/.initial=.6}
780 \ctikzset{tripoles/npn/curr direction/.initial=1}
781
782 \ctikzset{tripoles/pnp/width/.initial=.6}
783 \ctikzset{tripoles/pnp/base height/.initial=.45}
784 \ctikzset{tripoles/pnp/base height 2/.initial=.15}
785 \ctikzset{tripoles/pnp/base height/.initial=.4}
786 \ctikzset{tripoles/pnp/conn height/.initial=0}
787 \ctikzset{tripoles/pnp/height/.initial=1.1}
788 \ctikzset{tripoles/pnp/base width/.initial=.5}
789 \ctikzset{tripoles/pnp/bodydiode scale/.initial=.3}
790 \ctikzset{tripoles/pnp/bodydiode distance/.initial=.3}
791 \ctikzset{tripoles/pnp/bodydiode conn/.initial=.6}
792 \ctikzset{tripoles/pnp/curr direction/.initial=-1}
793
794 \ctikzset{tripoles/pigbt/width/.initial=.6}
795 \ctikzset{tripoles/pigbt/gate height/.initial=.45}
796 \ctikzset{tripoles/pigbt/gate height 2/.initial=.15}
797 \ctikzset{tripoles/pigbt/base height/.initial=.4}
798 \ctikzset{tripoles/pigbt/conn height/.initial=0}
799 \ctikzset{tripoles/pigbt/height/.initial=1.1}
800 \ctikzset{tripoles/pigbt/gate width/.initial=.62}
801 \ctikzset{tripoles/pigbt/base width/.initial=.5}
802 \ctikzset{tripoles/pigbt/bodydiode scale/.initial=.3}
803 \ctikzset{tripoles/pigbt/bodydiode distance/.initial=.3}
804 \ctikzset{tripoles/pigbt/bodydiode conn/.initial=.6}
805 \ctikzset{tripoles/pigbt/curr direction/.initial=-1}
806
807 \ctikzset{tripoles/nigbt/width/.initial=.6}
808 \ctikzset{tripoles/nigbt/gate height/.initial=.45}
809 \ctikzset{tripoles/nigbt/gate height 2/.initial=.15}
810 \ctikzset{tripoles/nigbt/base height/.initial=.4}
811 \ctikzset{tripoles/nigbt/conn height/.initial=0}
812 \ctikzset{tripoles/nigbt/height/.initial=1.1}
813 \ctikzset{tripoles/nigbt/gate width/.initial=.62}
814 \ctikzset{tripoles/nigbt/base width/.initial=.5}
815 \ctikzset{tripoles/nigbt/bodydiode scale/.initial=.3}
816 \ctikzset{tripoles/nigbt/bodydiode distance/.initial=.3}
817 \ctikzset{tripoles/nigbt/bodydiode conn/.initial=.6}
818 \ctikzset{tripoles/nigbt/curr direction/.initial=1}
819
820 \ctikzset{tripoles/Lpigbt/width/.initial=.6}
821 \ctikzset{tripoles/Lpigbt/gate height/.initial=.45}
822 \ctikzset{tripoles/Lpigbt/gate height 2/.initial=.15}
823 \ctikzset{tripoles/Lpigbt/base height/.initial=.4}
824 \ctikzset{tripoles/Lpigbt/conn height/.initial=.4}
825 \ctikzset{tripoles/Lpigbt/height/.initial=1.1}
826 \ctikzset{tripoles/Lpigbt/gate width/.initial=.62}
827 \ctikzset{tripoles/Lpigbt/base width/.initial=.5}
828 \ctikzset{tripoles/Lpigbt/bodydiode scale/.initial=.3}
829 \ctikzset{tripoles/Lpigbt/bodydiode distance/.initial=.3}
830 \ctikzset{tripoles/Lpigbt/bodydiode conn/.initial=.6}
831 \ctikzset{tripoles/Lpigbt/curr direction/.initial=-1}
832
833 \ctikzset{tripoles/Lnigbt/width/.initial=.6}
834 \ctikzset{tripoles/Lnigbt/gate height/.initial=.45}
835 \ctikzset{tripoles/Lnigbt/gate height 2/.initial=.15}
836 \ctikzset{tripoles/Lnigbt/base height/.initial=.4}
837 \ctikzset{tripoles/Lnigbt/conn height/.initial=.4}
838 \ctikzset{tripoles/Lnigbt/height/.initial=1.1}
839 \ctikzset{tripoles/Lnigbt/gate width/.initial=.62}
840 \ctikzset{tripoles/Lnigbt/base width/.initial=.5}
841 \ctikzset{tripoles/Lnigbt/bodydiode scale/.initial=.3}
842 \ctikzset{tripoles/Lnigbt/bodydiode distance/.initial=.3}
843 \ctikzset{tripoles/Lnigbt/bodydiode conn/.initial=.6}
844 \ctikzset{tripoles/Lnigbt/curr direction/.initial=1}
845
846 \ctikzset{tripoles/njfet/width/.initial=.7}
847 \ctikzset{tripoles/njfet/gate height/.initial=.5}
848 \ctikzset{tripoles/njfet/gate height 2/.initial=.35}
849 \ctikzset{tripoles/njfet/gate width/.initial=.5}
850 \ctikzset{tripoles/njfet/conn height/.initial=.35}
851 \ctikzset{tripoles/njfet/height/.initial=1.1}
852 \ctikzset{tripoles/njfet/bodydiode scale/.initial=.3}
853 \ctikzset{tripoles/njfet/bodydiode distance/.initial=.3}
854 \ctikzset{tripoles/njfet/bodydiode conn/.initial=.6}
855 \ctikzset{tripoles/njfet/curr direction/.initial=1}
856
857 \ctikzset{tripoles/pjfet/width/.initial=.7}
858 \ctikzset{tripoles/pjfet/gate height/.initial=.5}
859 \ctikzset{tripoles/pjfet/gate height 2/.initial=.35}
860 \ctikzset{tripoles/pjfet/gate width/.initial=.5}
861 \ctikzset{tripoles/pjfet/conn height/.initial=.35}
862 \ctikzset{tripoles/pjfet/height/.initial=1.1}
863 \ctikzset{tripoles/pjfet/bodydiode scale/.initial=.3}
864 \ctikzset{tripoles/pjfet/bodydiode distance/.initial=.3}
865 \ctikzset{tripoles/pjfet/bodydiode conn/.initial=.6}
866 \ctikzset{tripoles/pjfet/curr direction/.initial=-1}
867
868 \ctikzset{tripoles/isfet/width/.initial=1}
869 \ctikzset{tripoles/isfet/gate height/.initial=.35}
870 \ctikzset{tripoles/isfet/base height/.initial=.5}
871 \ctikzset{tripoles/isfet/height/.initial=1.1}
872 \ctikzset{tripoles/isfet/base width/.initial=.3}
873 \ctikzset{tripoles/isfet/gate width/.initial=.5}
874 \ctikzset{tripoles/isfet/conn height/.initial=0}
875 \ctikzset{tripoles/isfet/wave width/.initial=.16}
876 \ctikzset{tripoles/isfet/wave amp/.initial=.06}
877 \ctikzset{tripoles/isfet/waves y sep/.initial=.22}
878 \ctikzset{tripoles/isfet/waves x sep/.initial=.8}
879 \ctikzset{tripoles/isfet/bodydiode scale/.initial=.3}
880 \ctikzset{tripoles/isfet/bodydiode distance/.initial=.3}
881 \ctikzset{tripoles/isfet/bodydiode conn/.initial=.6}
882 \ctikzset{tripoles/isfet/curr direction/.initial=1}
883
884 \newif\ifpgf@circuit@europeanlogicport
885 \ctikzset{logic ports/.is choice}
886 \ctikzset{logic ports/european/.code= {\pgf@circuit@europeanlogicporttrue } }
887 \ctikzset{logic ports/american/.code= {\pgf@circuit@europeanlogicportfalse } }
888
889
890 \ctikzset{tripoles/american and port/width/.initial=1.1}
891 \ctikzset{tripoles/american and port/height/.initial=.8}
892 \ctikzset{tripoles/american and port/port width/.initial=.7}
893 \ctikzset{tripoles/american and port/input height/.initial=.5}
894 \ctikzset{tripoles/american nand port/width/.initial=1.1}
895 \ctikzset{tripoles/american nand port/height/.initial=.8}
896 \ctikzset{tripoles/american nand port/port width/.initial=.7}
897 \ctikzset{tripoles/american nand port/circle width/.initial=.15}
898 \ctikzset{tripoles/american nand port/input height/.initial=.5}
899 \ctikzset{tripoles/american or port/width/.initial=1.1}
900 \ctikzset{tripoles/american or port/height/.initial=.8}
901 \ctikzset{tripoles/american or port/port width/.initial=.7}
902 \ctikzset{tripoles/american or port/input height/.initial=.5}
903 \ctikzset{tripoles/american or port/input skip/.initial=.25}
904 \ctikzset{tripoles/american or port/aaa/.initial=.6}
905 \ctikzset{tripoles/american or port/bbb/.initial=.4}
906 \ctikzset{tripoles/american or port/ccc/.initial=.5}
907 \ctikzset{tripoles/american or port/ddd/.initial=.0}
908 \ctikzset{tripoles/american nor port/width/.initial=1.1}
909 \ctikzset{tripoles/american nor port/height/.initial=.8}
910 \ctikzset{tripoles/american nor port/port width/.initial=.7}
911 \ctikzset{tripoles/american nor port/input height/.initial=.5}
912 \ctikzset{tripoles/american nor port/input skip/.initial=.25}
913 \ctikzset{tripoles/american nor port/circle width/.initial=.15}
914 \ctikzset{tripoles/american nor port/aaa/.initial=.6}
915 \ctikzset{tripoles/american nor port/bbb/.initial=.4}
916 \ctikzset{tripoles/american nor port/ccc/.initial=.5}
917 \ctikzset{tripoles/american nor port/ddd/.initial=.0}
918 \ctikzset{tripoles/american xor port/width/.initial=1.1}
919 \ctikzset{tripoles/american xor port/height/.initial=.8}
920 \ctikzset{tripoles/american xor port/port width/.initial=.7}
921 \ctikzset{tripoles/american xor port/input height/.initial=.5}
922 \ctikzset{tripoles/american xor port/input skip/.initial=.15}
923 \ctikzset{tripoles/american xor port/distance/.initial=.1}
924 \ctikzset{tripoles/american xor port/aaa/.initial=.6}
925 \ctikzset{tripoles/american xor port/bbb/.initial=.4}
926 \ctikzset{tripoles/american xor port/ccc/.initial=.5}
927 \ctikzset{tripoles/american xor port/ddd/.initial=.0}
928 \ctikzset{tripoles/american xnor port/width/.initial=1.1}
929 \ctikzset{tripoles/american xnor port/height/.initial=.8}
930 \ctikzset{tripoles/american xnor port/port width/.initial=.7}
931 \ctikzset{tripoles/american xnor port/input height/.initial=.5}
932 \ctikzset{tripoles/american xnor port/input skip/.initial=.15}
933 \ctikzset{tripoles/american xnor port/distance/.initial=.1}
934 \ctikzset{tripoles/american xnor port/aaa/.initial=.6}
935 \ctikzset{tripoles/american xnor port/bbb/.initial=.4}
936 \ctikzset{tripoles/american xnor port/ccc/.initial=.5}
937 \ctikzset{tripoles/american xnor port/ddd/.initial=.0}
938 \ctikzset{tripoles/american xnor port/circle width/.initial=.15}
939 \ctikzset{tripoles/european and port/width/.initial=1.4}
940 \ctikzset{tripoles/european and port/height/.initial=.65}
941 \ctikzset{tripoles/european and port/reserved/.initial=.6}
942 \ctikzset{tripoles/european and port/input height/.initial=.6}
943 \ctikzset{tripoles/european or port/width/.initial=1.4}
944 \ctikzset{tripoles/european or port/height/.initial=.65}
945 \ctikzset{tripoles/european or port/reserved/.initial=.6}
946 \ctikzset{tripoles/european or port/input height/.initial=.6}
947 \ctikzset{tripoles/european xor port/width/.initial=1.4}
948 \ctikzset{tripoles/european xor port/height/.initial=.65}
949 \ctikzset{tripoles/european xor port/reserved/.initial=.6}
950 \ctikzset{tripoles/european xor port/input height/.initial=.6}
951 \ctikzset{tripoles/european nand port/width/.initial=1.4}
952 \ctikzset{tripoles/european nand port/not height/.initial=.3}
953 \ctikzset{tripoles/european nand port/not width/.initial=.8}
954 \ctikzset{tripoles/european nand port/height/.initial=.65}
955 \ctikzset{tripoles/european nand port/reserved/.initial=.6}
956 \ctikzset{tripoles/european nand port/input height/.initial=.6}
957 \ctikzset{tripoles/european not port/width/.initial=1.4}
958 \ctikzset{tripoles/european not port/not height/.initial=.3}
959 \ctikzset{tripoles/european not port/not width/.initial=.8}
960 \ctikzset{tripoles/european not port/height/.initial=.65}
961 \ctikzset{tripoles/european not port/reserved/.initial=.6}
962 \ctikzset{tripoles/european not port/input height/.initial=0}
963 \ctikzset{tripoles/european xnor port/width/.initial=1.4}
964 \ctikzset{tripoles/european xnor port/not height/.initial=.3}
965 \ctikzset{tripoles/european xnor port/not width/.initial=.8}
966 \ctikzset{tripoles/european xnor port/height/.initial=.65}
967 \ctikzset{tripoles/european xnor port/reserved/.initial=.6}
968 \ctikzset{tripoles/european xnor port/input height/.initial=.6}
969 \ctikzset{tripoles/european nor port/width/.initial=1.4}
970 \ctikzset{tripoles/european nor port/not height/.initial=.3}
971 \ctikzset{tripoles/european nor port/not width/.initial=.8}
972 \ctikzset{tripoles/european nor port/height/.initial=.65}
973 \ctikzset{tripoles/european nor port/reserved/.initial=.6}
974 \ctikzset{tripoles/european nor port/input height/.initial=.6}
975 \ctikzset{tripoles/op amp/width/.initial=1.7}
976 \ctikzset{tripoles/op amp/port width/.initial=.7}
977 \ctikzset{tripoles/op amp/height/.initial=1.4}
978 \ctikzset{tripoles/op amp/input height/.initial=.5}
979 \ctikzset{tripoles/op amp/up pos/.initial=.45}
980 \ctikzset{tripoles/op amp/font/.initial= \fontsize{10}{0}\selectfont\boldmath}%absolut font size needed!
981 \ctikzset{tripoles/en amp/width/.initial=1.7}
982 \ctikzset{tripoles/en amp/port width/.initial=.7}
983 \ctikzset{tripoles/en amp/height/.initial=1.6}
984 \ctikzset{tripoles/en amp/input height/.initial=.3}
985 \ctikzset{tripoles/en amp/up pos/.initial=.45}
986 \ctikzset{tripoles/en amp/font/.initial= \fontsize{10}{0}\selectfont\boldmath}%absolut font size needed!
987 \ctikzset{tripoles/en amp/font2/.initial= \fontsize{14}{0}\selectfont\boldmath}%absolut font size needed!
988 \ctikzset{tripoles/gm amp/width/.initial=1.7}
989 \ctikzset{tripoles/gm amp/port width/.initial=.7}
990 \ctikzset{tripoles/gm amp/height/.initial=1.4}
991 \ctikzset{tripoles/gm amp/input height/.initial=.5}
992 \ctikzset{tripoles/gm amp/up pos/.initial=.45}
993 \ctikzset{tripoles/plain amp/width/.initial=1.7}
994 \ctikzset{tripoles/plain amp/port width/.initial=.7}
995 \ctikzset{tripoles/plain amp/height/.initial=1.4}
996 \ctikzset{tripoles/plain amp/input height/.initial=.5}
997 \ctikzset{tripoles/plain amp/up pos/.initial=.45}
998
999 \ctikzset{tripoles/thyristor/height/.initial=1.10}
1000 \ctikzset{tripoles/thyristor/height 2/.initial=.5}
1001 \ctikzset{tripoles/thyristor/width/.initial=1.0}
1002 \ctikzset{tripoles/thyristor/diode height/.initial=.5}
1003 \ctikzset{tripoles/thyristor/diode width left/.initial=.4}
1004 \ctikzset{tripoles/thyristor/diode width right/.initial=.3}
1005
1006 \ctikzset{tripoles/triac/height/.initial=1.1}
1007 \ctikzset{tripoles/triac/width/.initial=1}
1008 \ctikzset{tripoles/triac/diode width left/.initial=.3}
1009 \ctikzset{tripoles/triac/diode width right/.initial=.3}
1010
1011 \ctikzset{tripoles/spdt/width/.initial=.85}
1012 \ctikzset{tripoles/spdt/height/.initial=.45}
1013 \ctikzset{tripoles/spdt/margin/.initial=.45}
1014
1015 \ctikzset{tripoles/toggleswitch/height/.initial=.8}
1016 \ctikzset{tripoles/toggleswitch/height 2/.initial=.0}
1017 \ctikzset{tripoles/toggleswitch/width/.initial=.80}
1018
1019 \ctikzset{tripoles/mixer/width/.initial=0.7}
1020 \ctikzset{tripoles/adder/width/.initial=0.7}
1021 \ctikzset{tripoles/circulator/width/.initial=.7}
1022 \ctikzset{tripoles/oscillator/width/.initial=.7}
1023
1024
1025 \ctikzset{tripoles/wilkinson/height/.initial=1.3}
1026 \ctikzset{tripoles/wilkinson/width/.initial=1.3}
1027
1028 \ctikzset{quadpoles/transformer/width/.initial=1.5}
1029 \ctikzset{quadpoles/transformer/width1/.initial=.4}
1030 \ctikzset{quadpoles/transformer/height/.initial=1.5}
1031 \ctikzset{quadpoles/transformer/height1/.initial=.8}
1032 \ctikzset{quadpoles/transformer core/width/.initial=1.5}
1033 \ctikzset{quadpoles/transformer core/height/.initial=1.5}
1034 \ctikzset{quadpoles/transformer core/core height/.initial=.5}
1035 \ctikzset{quadpoles/transformer core/core width/.initial=.05}
1036 \ctikzset{quadpoles/gyrator/width/.initial=1.5}
1037 \ctikzset{quadpoles/gyrator/height/.initial=1.5}
1038 \ctikzset{quadpoles/fourport/width/.initial=1.3}
1039 \ctikzset{quadpoles/fourport/height/.initial=1.3}
1040 \ctikzset{quadpoles/coupler/width/.initial=1.3}
1041 \ctikzset{quadpoles/coupler/height/.initial=1.3}
1042 \ctikzset{quadpoles/coupler2/width/.initial=1.3}
1043 \ctikzset{quadpoles/coupler2/height/.initial=1.3}
1044
1045 \ctikzset{/tikz/circuitikz/tripoles/magnetron/width/.initial=1}
1046
1047
1048 % %Mechanical section
1049 \ctikzset{/tikz/circuitikz/tripoles/elmech/height/.initial=.8}
1050 \ctikzset{/tikz/circuitikz/tripoles/elmech/width/.initial=.6}
1051 \ctikzset{bipoles/spring/height/.initial=.5}
1052 \ctikzset{bipoles/spring/width/.initial=.5}
1053 \ctikzset{bipoles/mass/height/.initial=.55}
1054 \ctikzset{bipoles/mass/box height/.initial=.4}
1055 \ctikzset{bipoles/mass/width/.initial=.5}
1056
1057 \ctikzset{bipoles/damper/height/.initial=.35}
1058 \ctikzset{bipoles/damper/length/.initial=.3}
1059 \ctikzset{bipoles/damper/width/.initial=.4}
1060
1061
1062 \ctikzset{bipole/.is family}
1063 \ctikzset{bipole/kind/.initial = }
1064 \ctikzset{bipole/name/.initial = }
1065 \newif\ifpgf@circuit@bipole@isvoltage
1066 \ctikzset{bipole/is voltage/.is if=pgf@circuit@bipole@isvoltage}
1067 \newif\ifpgf@circuit@bipole@voltageoutsideofsymbol
1068 \ctikzset{bipole/is voltageoutsideofsymbol/.is if=pgf@circuit@bipole@voltageoutsideofsymbol}
1069 \newif\ifpgf@circuit@bipole@strokedsymbol
1070 \ctikzset{bipole/is strokedsymbol/.is if=pgf@circuit@bipole@strokedsymbol}
1071 \newif\ifpgf@circuit@bipole@iscurrent
1072 \ctikzset{bipole/is current/.is if=pgf@circuit@bipole@iscurrent}
1073
1074 \ctikzset{bipole/voltage/.is family}
1075 \newif\ifpgf@circuit@bipole@voltage@backward
1076 \ctikzset{bipole/voltage/direction/.is choice}
1077 \ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}}
1078 \ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}}
1079 \newif\ifpgf@circuit@bipole@voltage@below
1080 \ctikzset{bipole/voltage/position/.is choice}
1081 \ctikzset{bipole/voltage/position/above/.code={\pgf@circuit@bipole@voltage@belowfalse}}
1082 \ctikzset{bipole/voltage/position/below/.code={\pgf@circuit@bipole@voltage@belowtrue}}
1083
1084 \ctikzset{bipole/voltage/label/unit/.initial=}
1085 \ctikzset{bipole/voltage/label/name/.initial=}
1086
1087 \ctikzset{bipole/current/.is family}
1088 \newif\ifpgf@circuit@bipole@current@backward
1089 \ctikzset{bipole/current/direction/.is choice}
1090 \ctikzset{bipole/current/direction/forward/.code={\pgf@circuit@bipole@current@backwardfalse}}
1091 \ctikzset{bipole/current/direction/backward/.code={\pgf@circuit@bipole@current@backwardtrue}}
1092 \newif\ifpgf@circuit@bipole@current@before
1093 \ctikzset{bipole/current/x position/.is choice}
1094 \ctikzset{bipole/current/x position/after/.code={\pgf@circuit@bipole@current@beforefalse}}
1095 \ctikzset{bipole/current/x position/before/.code={\pgf@circuit@bipole@current@beforetrue}}
1096 \newif\ifpgf@circuit@bipole@current@below
1097 \ctikzset{bipole/current/y position/.is choice}
1098 \ctikzset{bipole/current/y position/above/.code={\pgf@circuit@bipole@current@belowfalse}}
1099 \ctikzset{bipole/current/y position/below/.code={\pgf@circuit@bipole@current@belowtrue}}
1100 \ctikzset{bipole/current/label/unit/.initial=}
1101 \ctikzset{bipole/current/label/name/.initial=}
1102
1103 \ctikzset{bipole/flow/.is family}
1104 \newif\ifpgf@circuit@bipole@flow@backward
1105 \ctikzset{bipole/flow/direction/.is choice}
1106 \ctikzset{bipole/flow/direction/forward/.code={\pgf@circuit@bipole@flow@backwardfalse}}
1107 \ctikzset{bipole/flow/direction/backward/.code={\pgf@circuit@bipole@flow@backwardtrue}}
1108 \newif\ifpgf@circuit@bipole@flow@before
1109 \ctikzset{bipole/flow/x position/.is choice}
1110 \ctikzset{bipole/flow/x position/after/.code={\pgf@circuit@bipole@flow@beforefalse}}
1111 \ctikzset{bipole/flow/x position/before/.code={\pgf@circuit@bipole@flow@beforetrue}}
1112 \newif\ifpgf@circuit@bipole@flow@below
1113 \ctikzset{bipole/flow/y position/.is choice}
1114 \ctikzset{bipole/flow/y position/above/.code={\pgf@circuit@bipole@flow@belowfalse}}
1115 \ctikzset{bipole/flow/y position/below/.code={\pgf@circuit@bipole@flow@belowtrue}}
1116 \ctikzset{bipole/flow/label/unit/.initial=}
1117 \ctikzset{bipole/flow/label/name/.initial=}
1118 \ctikzset{flow/distance/.initial = .5}
1119 \ctikzset{flow/offset/.initial = .2}%distance between flow-arrow and conductor
1120
1121
1122 \ctikzset{bipole/label/.is family}
1123 \ctikzset{bipole/label/position/.initial=90}
1124 \ctikzset{bipole/label/unit/.initial=}
1125 \ctikzset{bipole/label/name/.initial=}
1126 \ctikzset{bipole/annotation/.is family}
1127 \ctikzset{bipole/annotation/position/.initial=-90}
1128 \ctikzset{bipole/annotation/unit/.initial=}
1129 \ctikzset{bipole/annotation/name/.initial=}
1130 \ctikzset{bipole/nodes/.is family}
1131 \ctikzset{bipole/nodes/left/.is choice}
1132 \ctikzset{bipole/nodes/left/none/.code={\ctikzsetvalof{bipole/nodes/left}{none}}}
1133 \ctikzset{bipole/nodes/left/empty/.code={\ctikzsetvalof{bipole/nodes/left}{empty}}}
1134 \ctikzset{bipole/nodes/left/full/.code={\ctikzsetvalof{bipole/nodes/left}{full}}}
1135 \ctikzset{bipole/nodes/left/diamond/.code={\ctikzsetvalof{bipole/nodes/left}{diamond}}}
1136 \ctikzset{bipole/nodes/left/rectjoinfill/.code={\ctikzsetvalof{bipole/nodes/left}{rectjoinfill}}}
1137 \ctikzset{bipole/nodes/right/.is choice}
1138 \ctikzset{bipole/nodes/right/none/.code={\ctikzsetvalof{bipole/nodes/right}{none}}}
1139 \ctikzset{bipole/nodes/right/empty/.code={\ctikzsetvalof{bipole/nodes/right}{empty}}}
1140 \ctikzset{bipole/nodes/right/full/.code={\ctikzsetvalof{bipole/nodes/right}{full}}}
1141 \ctikzset{bipole/nodes/right/diamond/.code={\ctikzsetvalof{bipole/nodes/right}{diamond}}}
1142 \ctikzset{bipole/nodes/right/rectjoinfill/.code={\ctikzsetvalof{bipole/nodes/right}{rectjoinfill}}}
1143
1144
1145
1146
1147 \newif\ifpgf@circuit@europeanresistor
1148 \ctikzset{resistor/.is choice}
1149 \ctikzset{resistor/american/.code = \pgf@circuit@europeanresistorfalse }
1150 \ctikzset{resistor/european/.code = \pgf@circuit@europeanresistortrue }
1151
1152 \ctikzset{inductor/.is choice}
1153 \ctikzset{inductor/cute/.code={\ctikzsetvalof{inductor}{cute}}}
1154 \ctikzset{inductor/european/.code={\ctikzsetvalof{inductor}{european}}}
1155 \ctikzset{inductor/american/.code={\ctikzsetvalof{inductor}{american}}}
1156
1157 \newif\ifpgf@circuit@strokediode
1158 \newif\ifpgf@circuit@fulldiode
1159 \pgf@circuit@strokediodefalse
1160 \pgf@circuit@fulldiodefalse
1161
1162 \ctikzset{diode/.is choice}
1163 \ctikzset{diode/empty/.code = \pgf@circuit@fulldiodefalse\pgf@circuit@strokediodefalse}%default
1164 \ctikzset{diode/full/.code = \pgf@circuit@fulldiodetrue }
1165 \ctikzset{diode/stroke/.code = \pgf@circuit@strokediodetrue}
1166
1167 \tikzset{full diodes/.style = { \circuitikzbasekey/diode = full }}
1168 \tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty }}
1169 \tikzset{stroke diodes/.style = { \circuitikzbasekey/diode = stroke }}
1170
1171 \ctikzset{thickness/.initial=2}
1172 \ctikzset{color/.initial=black}
1173 \pgfkeys{/tikz/color/.add code={}{\ctikzset{color={#1}}}}
1174
1175
1176 \newif\ifpgf@circ@siunitx
1177 \newif\ifpgf@circ@siunitx@res
1178
1179 \ctikzset{straight/.is choice}
1180 \ctikzset{straightvoltage value/.initial=true}
1181 \ctikzset{straight/true/.code = {\pgf@circuit@bipole@voltage@straighttrue}}
1182 \ctikzset{straight/false/.code = {\pgf@circuit@bipole@voltage@straightfalse}}
1183 \ctikzset{straightvoltage/.style = {/tikz/circuitikz/straight=true}}
1184 \newif\ifpgf@circuit@bipole@voltage@straight
1185 \ctikzset{bipole/straight/.is if=pgf@circuit@bipole@voltage@straight}
1186
1187
1188 \ctikzset{voltage/.is family}
1189 \ctikzset{voltage/distance from node/.initial=.5} %\pgf@circ@Rlen units
1190 \ctikzset{voltage/distance from line/.initial=.08} % pos, tra 0 e 1
1191 \ctikzset{voltage/bump a/.initial=1.2}
1192 \ctikzset{voltage/bump b/.initial=1.5}
1193 \ctikzset{voltage/european label distance/.initial=1.4}
1194 \ctikzset{voltage/american label distance/.initial=1.1}
1195 % special cases
1196 \ctikzset{bipoles/generic/voltage/distance from node/.initial=.4}
1197 \ctikzset{bipoles/generic/voltage/bump b/.initial=2}
1198 \ctikzset{bipoles/generic/voltage/european label distance/.initial=1.8}
1199 %\ctikzset{bipoles/thermocouple/voltage/distance from node/.initial=.3}
1200 \ctikzset{bipoles/thermocouple/voltage/bump b/.initial=2.2}
1201 \ctikzset{bipoles/thermocouple/voltage/european label distance/.initial=1.5}
1202 \ctikzset{bipoles/ageneric/voltage/distance from node/.initial=.4}
1203 \ctikzset{bipoles/ageneric/voltage/bump b/.initial=2}
1204 \ctikzset{bipoles/ageneric/voltage/european label distance/.initial=1.8}
1205 \ctikzset{bipoles/fullgeneric/voltage/distance from node/.initial=.4}
1206 \ctikzset{bipoles/fullgeneric/voltage/bump b/.initial=2}
1207 \ctikzset{bipoles/fullgeneric/voltage/european label distance/.initial=1.8}
1208 \ctikzset{bipoles/memristor/voltage/distance from node/.initial=.4}
1209 \ctikzset{bipoles/memristor/voltage/bump b/.initial=2}
1210 \ctikzset{bipoles/memristor/voltage/european label distance/.initial=1.8}
1211 %\ctikzset{bipoles/tline/voltage/distance from node/.initial=.2}
1212 \ctikzset{bipoles/tline/voltage/bump b/.initial=2.4}
1213 \ctikzset{bipoles/tline/voltage/european label distance/.initial=2.1}
1214 %\ctikzset{bipoles/varistor/voltage/distance from node/.initial=.2}
1215 \ctikzset{bipoles/varistor/voltage/bump b/.initial=2.4}
1216 \ctikzset{bipoles/varistor/voltage/european label distance/.initial=2}
1217 %\ctikzset{bipoles/photoresistor/voltage/distance from node/.initial=.2}
1218 \ctikzset{bipoles/photoresistor/voltage/bump b/.initial=2}
1219 \ctikzset{bipoles/photoresistor/voltage/european label distance/.initial=1.8}
1220 %\ctikzset{bipoles/thermistor/voltage/distance from node/.initial=.2}
1221 \ctikzset{bipoles/thermistor/voltage/bump b/.initial=2.4}
1222 \ctikzset{bipoles/thermistor/voltage/european label distance/.initial=2}
1223 %\ctikzset{bipoles/thermistorntc/voltage/distance from node/.initial=.2}
1224 \ctikzset{bipoles/thermistorntc/voltage/bump b/.initial=1.6}
1225 %\ctikzset{bipoles/thermistorptc/voltage/distance from node/.initial=.2}
1226 \ctikzset{bipoles/thermistorptc/voltage/bump b/.initial=1.6}
1227
1228 \ctikzset{current/.is family}
1229 \ctikzset{current/distance/.initial = .5}
1230
1231
1232 \tikzset{american currents/.style = { \circuitikzbasekey/current = american } }
1233 \tikzset{european currents/.style = { \circuitikzbasekey/current = european } }
1234 \tikzset{american voltages/.style = { \circuitikzbasekey/voltage = american } }
1235 \tikzset{european voltages/.style = { \circuitikzbasekey/voltage = european } }
1236 \tikzset{american resistors/.style = { \circuitikzbasekey/resistor = american } }
1237 \tikzset{european resistors/.style = { \circuitikzbasekey/resistor = european } }
1238
1239 \newif\ifpgf@circuit@europeangfsurgearrester
1240 \ctikzset{gas filled surge arrester choice/.is choice}
1241 \ctikzset{gas filled surge arrester choice/european/.code= {\pgf@circuit@europeangfsurgearrestertrue } }
1242 \ctikzset{gas filled surge arrester choice/american/.code= {\pgf@circuit@europeangfsurgearresterfalse } }
1243
1244 \tikzset{american gas filled surge arrester set/.style = { \circuitikzbasekey/gas filled surge arrester choice=american } }
1245 \tikzset{european gas filled surge arrester set/.style = { \circuitikzbasekey/gas filled surge arrester choice=european } }
1246 \tikzset{american inductors/.style = { \circuitikzbasekey/inductor = american } }
1247 \tikzset{european inductors/.style = { \circuitikzbasekey/inductor = european } }
1248 \tikzset{cute inductors/.style = { \circuitikzbasekey/inductor = cute } }
1249 \tikzset{american ports/.style = { \circuitikzbasekey/logic ports = american } }
1250 \tikzset{european ports/.style = { \circuitikzbasekey/logic ports = european } }
1251 \tikzset{european/.style = { european currents, european voltages, european resistors, european inductors, european ports, european gas filled surge arrester set} }
1252 \tikzset{american/.style = { american currents, american voltages, american resistors, american inductors, american ports, american gas filled surge arrester set} }
1253 \tikzset{cute/.style = { european currents, european voltages, american resistors, cute inductors, american ports } }
1254
1255 % I should try to make the tree clearer (this voltaege conflicts with the options above)
1256
1257 \newif\ifpgf@circuit@europeanvoltage
1258 \ctikzset{voltage/.is choice}
1259 \ctikzset{voltage/american/.code = {\pgf@circuit@europeanvoltagefalse } }
1260 \ctikzset{voltage/european/.code = {\pgf@circuit@europeanvoltagetrue } }
1261
1262 \newif\ifpgf@circuit@europeancurrent
1263 \ctikzset{current/.is choice}
1264 \ctikzset{current/american/.code = \pgf@circuit@europeancurrentfalse }
1265 \ctikzset{current/european/.code = \pgf@circuit@europeancurrenttrue }
1266
1267 \ctikzset{label/align/.is choice}
1268 \ctikzset{label/align/straight/.code={\ctikzsetvalof{label/align}{straight}}}
1269 \ctikzset{label/align/rotate/.code={\ctikzsetvalof{label/align}{rotate}}}
1270 \ctikzset{label/align/smart/.code={\ctikzsetvalof{label/align}{smart}}}
1271
1272 %%%%%%%%%% new
1273 \pgfkeys{\circuitikzbasekey/.search also={/tikz}}
1274 %%%---------- close: tex/pgfcirc.defines
1275 %%%%%%%%%%% Springe nach tex/pgfcircutils
1276 %%%---------- open: tex/pgfcircutils.tex
1277 % Copyright 2007-2009 by Massimo Redaelli
1278 %
1279 % This file may be distributed and/or modified
1280 %
1281 % 1. under the LaTeX Project Public License and/or
1282 % 2. under the GNU Public License.
1283 %
1284 % See the file doc/LICENSE for more details.
1285
1286 %\def\pgf@circ@handleSI#1{%
1287 % \pgf@circ@siunitx@resfalse
1288 %
1289 % \edef\len{\stringlength[e]{#1}}
1290 %\testmatchingchar[e]{#1}{\len}{>}%
1291 %\ifmatchingchar%
1292 % \ifnum\findchars{#1}{<}=0
1293 % \def\pgf@circ@handleSI@val{\substring{#1}{1}{\findchars{#1}{<}-1}}
1294 %\def\pgf@circ@handleSI@unit{\substring{#1}{\findchars{#1}{<}-1}+1}{\stringlength{#1}}
1295 %\pgf@circ@siunitx@restrue
1296 % \else
1297 % \fi
1298 %\else
1299 %\fi
1300 %}
1301
1302 \def\pgf@circ@handleSI#1{
1303 \noexpandarg
1304 \def\pgf@temp{}
1305 \StrBetween{#1}{<}{>}[\pgf@circ@handleSI@unit]
1306 \StrLen{\pgf@circ@handleSI@unit}[\pgf@circ@handleSI@unit@len]
1307
1308 \ifnum\pgf@circ@handleSI@unit@len=0
1309 \pgf@circ@siunitx@resfalse
1310 \else
1311 \IfEndWith{#1}{>}{
1312 \pgf@circ@siunitx@restrue
1313 \noexpandarg
1314 \StrBefore{#1}{<}[\pgf@circ@handleSI@val]
1315 %\typeout{si |#1|}
1316 }{
1317 \pgf@circ@siunitx@resfalse
1318 %\typeout{no si |#1|}
1319 }
1320 \fi
1321 }
1322
1323 \def\pgf@circ@ifkeyempty#1{
1324 \pgfextra{
1325 \ctikzset{#1/.get=\pgf@circ@temp}
1326 \edef\pgf@temp{}
1327 }
1328 \ifx\pgf@circ@temp\pgf@temp
1329 }
1330
1331 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1332 %% Math routines
1333
1334 \def\pgf@circ@stripdecimals#1.#2\pgf@nil{#1}
1335
1336
1337 %%%---------- close: tex/pgfcircutils
1338
1339 %%%%%%%%%%% Springe nach tex/pgfcircshapes
1340 %%%---------- open: tex/pgfcircshapes.tex
1341 % Copyright 2007-2009 by Massimo Redaelli
1342 %
1343 % This file may be distributed and/or modified
1344 %
1345 % 1. under the LaTeX Project Public License and/or
1346 % 2. under the GNU Public License.
1347 %
1348 % See the file doc/LICENSE for more details.
1349
1350 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1351 %% Other shapes
1352
1353
1354 %% Nothing
1355
1356 \pgfdeclareshape{emptyshape}{
1357 \savedanchor{\northeast}{%
1358 \pgf@x=.5\wd\pgfnodeparttextbox%
1359 \pgf@y=.5\ht\pgfnodeparttextbox%
1360 }
1361 \anchor{north}{
1362 \northeast
1363 \pgf@x=0cm
1364 }
1365 \anchor{east}{%
1366 \northeast
1367 \pgf@y=0cm
1368 }
1369 \anchor{south}{%
1370 \northeast
1371 \pgf@y=-\pgf@y
1372 \pgf@x=0cm
1373 }
1374 \anchor{west}{
1375 \northeast
1376 \pgf@y=0cm
1377 \pgf@x=-\pgf@x
1378 }
1379 \anchor{text}{%
1380 \pgfpointorigin
1381 }
1382 \anchor{center}{
1383 \pgfpointorigin
1384 }
1385 }
1386
1387 %% Full terminal
1388
1389 \pgfdeclareshape{circ}{
1390 \anchor{center}{
1391 \pgfpointorigin
1392 }
1393 \anchorborder{
1394 \pgf@circ@res@left=\pgf@x
1395 \pgf@circ@res@up=\pgf@y
1396 \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
1397 }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}}
1398 }
1399 \behindforegroundpath{
1400
1401 \pgfscope
1402 \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
1403 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1404 \pgfusepath{draw,fill}
1405 \endpgfscope
1406
1407 }
1408 }
1409
1410 %% Empty terminal
1411
1412 \pgfdeclareshape{ocirc}{
1413 \anchor{center}{
1414 \pgfpointorigin
1415 }
1416 \anchorborder{
1417 \pgf@circ@res@left=\pgf@x
1418 \pgf@circ@res@up=\pgf@y
1419 \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
1420 }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}}
1421 }
1422
1423 \behindforegroundpath{
1424
1425 \pgfscope
1426 \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
1427 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1428 \pgfsetfillcolor{white}
1429 \pgfusepath{draw,fill}
1430 \endpgfscope
1431
1432 }
1433 }
1434
1435 %% Diamond terminal
1436
1437 \pgfdeclareshape{diamondpole}{
1438 \anchor{center}{
1439 \pgfpointorigin
1440 }
1441 \anchorborder{
1442 \pgf@circ@res@left=\pgf@x
1443 \pgf@circ@res@up=\pgf@y
1444 }
1445 \behindforegroundpath{
1446 \pgfscope
1447 \pgfmathsetlength{\pgf@circ@res@temp}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
1448 \pgftransformrotate{45}
1449 \pgfpathrectanglecorners
1450 {\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@temp}{\pgf@circ@res@up+\pgf@circ@res@temp}}
1451 {\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@temp}{\pgf@circ@res@up-\pgf@circ@res@temp}}
1452 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1453 \pgfusepath{draw,fill}
1454 \endpgfscope
1455 }
1456 }
1457
1458 %% Fill for correct rectangular joins
1459
1460 \pgfdeclareshape{rectjoinfill}{
1461 \anchor{center}{
1462 \pgfpointorigin
1463 }
1464 \anchorborder{
1465 \pgf@circ@res@left=\pgf@x
1466 \pgf@circ@res@up=\pgf@y
1467 }
1468 \behindforegroundpath{
1469 \pgfscope
1470 \pgfpathrectanglecorners
1471 {\pgfpoint{0}{.5\pgflinewidth}}
1472 {\pgfpoint{0}{-.5\pgflinewidth}}
1473 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1474 \pgfusepath{draw,fill}
1475 \endpgfscope
1476 }
1477 }
1478
1479
1480 %% Current arrow
1481
1482 \pgfdeclareshape{currarrow}{
1483 \anchor{center}{
1484 \pgfpointorigin
1485 }
1486 \anchor{tip}{
1487 \pgfpointorigin
1488 \pgf@circ@res@step = \pgf@circ@Rlen
1489 \divide \pgf@circ@res@step by 16
1490 \pgf@x =\pgf@circ@res@step
1491 }
1492 \behindforegroundpath{
1493
1494 \pgfscope
1495 \pgf@circ@res@step = \pgf@circ@Rlen
1496 \divide \pgf@circ@res@step by 16
1497
1498 \pgfpathmoveto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
1499 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
1500 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@step}{0pt}}
1501 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1502 \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
1503 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1504 \pgfusepath{draw,fill}
1505
1506 \endpgfscope
1507 }
1508
1509 }
1510
1511 %% Flow arrow
1512
1513 \pgfdeclareshape{flowarrow}{
1514 \anchor{center}{
1515 \pgfpointorigin
1516 }
1517 \anchor{tip}{
1518 \pgfpointorigin
1519 \pgf@circ@res@step = \pgf@circ@Rlen
1520 \divide \pgf@circ@res@step by 16
1521 \pgf@x =\pgf@circ@res@step
1522 }
1523 \behindforegroundpath{
1524 \pgfscope
1525 \pgf@circ@res@step = \pgf@circ@Rlen
1526 \divide \pgf@circ@res@step by 4
1527 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
1528 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
1529 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1530 \pgfusepath{draw}
1531 \pgftransformshift{\pgfpoint{\pgf@circ@res@step}{0pt}}
1532 \pgfnode{currarrow}{tip}{}{}{\pgfusepath{fill}}
1533 \endpgfscope
1534 }
1535 }
1536
1537 %% Input arrow
1538
1539 \pgfdeclareshape{inputarrow}{
1540 \savedanchor{\tip}{
1541 \pgfpointorigin
1542 }
1543 \anchor{center}{
1544 \tip
1545 }
1546 \anchor{tip}{
1547 \tip
1548 }
1549 \behindforegroundpath{
1550
1551 \pgfscope
1552 \pgf@circ@res@step = \pgf@circ@Rlen
1553 \divide \pgf@circ@res@step by 16
1554
1555 \pgfpathmoveto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}}
1556 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
1557 \pgfpathlineto{\pgfpoint{0pt}{0pt}}
1558 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{.8\pgf@circ@res@step}}
1559 \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}}
1560 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1561 \pgfusepath{fill}
1562
1563 \endpgfscope
1564 }
1565
1566 }
1567
1568
1569 %% box
1570
1571 \pgfdeclareshape{box}{
1572 \anchor{center}{
1573 \pgfpointorigin
1574 }
1575 \behindforegroundpath{
1576
1577 \pgfscope
1578 \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@Rlen
1579 \pgf@circ@res@step = 0.5\pgf@circ@res@step
1580 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1581 \pgfpathrectanglecorners{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@step}}{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1582 \pgfusepath{draw}
1583 \endpgfscope
1584 }
1585
1586 }
1587
1588 %%%---------- close: tex/pgfcircshapes
1589 %%%%%%%%%%% Springe nach tex/pgfcircmonopoles
1590 %%%---------- open: tex/pgfcircmonopoles.tex
1591 % Copyright 2007-2009 by Massimo Redaelli
1592 %
1593 % This file may be distributed and/or modified
1594 %
1595 % 1. under the LaTeX Project Public License and/or
1596 % 2. under the GNU Public License.
1597 %
1598 % See the file doc/LICENSE for more details.
1599
1600 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1601 %% Monopoles
1602
1603 %% Ground symbol
1604
1605 \pgfdeclareshape{ground}{
1606 \anchor{center}{
1607 \pgfpointorigin
1608 }
1609 \behindforegroundpath{
1610 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1611
1612 \pgfscope
1613 \pgfpathmoveto{\pgfpointorigin}
1614 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1615 \pgfusepath{draw}
1616
1617 \pgfstartlinewidth=\pgflinewidth
1618 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1619
1620 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1621 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1622 \pgfusepath{draw}
1623
1624 \pgfsetlinewidth{\pgfstartlinewidth}
1625 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1626 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1627 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1628 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1629 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1630 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1631 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1632 \pgfusepath{draw}
1633
1634
1635 \pgfsetlinewidth{\pgfstartlinewidth}
1636
1637 \endpgfscope
1638 }
1639
1640 }
1641
1642
1643
1644 \pgfdeclareshape{rground}{
1645 \anchor{center}{
1646 \pgfpointorigin
1647 }
1648 \behindforegroundpath{
1649 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1650
1651 \pgfscope
1652 \pgfpathmoveto{\pgfpointorigin}
1653 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1654 \pgfusepath{draw}
1655
1656 \pgfstartlinewidth=\pgflinewidth
1657 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1658
1659 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1660 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1661 \pgfusepath{draw}
1662
1663
1664 \pgfsetlinewidth{\pgfstartlinewidth}
1665
1666 \endpgfscope
1667 }
1668 }
1669
1670 \pgfdeclareshape{tground}{
1671 \anchor{center}{
1672 \pgfpointorigin
1673 }
1674 \behindforegroundpath{
1675 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1676
1677 \pgfscope
1678 \pgfpathmoveto{\pgfpointorigin}
1679 %\pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1680 \pgfusepath{draw}
1681
1682 \pgfstartlinewidth=\pgflinewidth
1683 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth}
1684
1685 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
1686 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
1687 \pgfusepath{draw}
1688
1689
1690 \pgfsetlinewidth{\pgfstartlinewidth}
1691
1692 \endpgfscope
1693 }
1694 }
1695
1696 \pgfdeclareshape{sground}{
1697 \anchor{center}{
1698 \pgfpointorigin
1699 }
1700 \behindforegroundpath{
1701 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1702
1703 \pgfscope
1704 \pgfpathmoveto{\pgfpointorigin}
1705 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1706 \pgfusepath{draw}
1707
1708 \pgfstartlinewidth=\pgflinewidth
1709 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1710
1711 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1712 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1713 \pgfpathlineto{\pgfpoint{0}{-1.8\pgf@circ@res@step}}
1714 \pgfpathclose
1715 \pgfusepath{draw}
1716
1717
1718 \pgfsetlinewidth{\pgfstartlinewidth}
1719
1720 \endpgfscope
1721 }
1722
1723 }
1724
1725 % noiseless ground
1726 \pgfdeclareshape{nground}{
1727 \anchor{center}{
1728 \pgfpointorigin
1729 }
1730 \behindforegroundpath{
1731 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1732
1733 \pgfscope
1734 \pgfpathmoveto{\pgfpointorigin}
1735 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1736 \pgfusepath{draw}
1737
1738 \pgfstartlinewidth=\pgflinewidth
1739 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1740
1741 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1742 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1743 \pgfusepath{draw}
1744
1745 \pgfsetlinewidth{\pgfstartlinewidth}
1746 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1747 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1748 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1749 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1750 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1751 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1752 \pgfusepath{draw}
1753
1754 \pgfpathmoveto{\pgfpoint{1.3\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1755 \pgfpatharc{0}{180}{1.3\pgf@circ@res@step}
1756 \pgfusepath{draw}
1757
1758 \pgfsetlinewidth{\pgfstartlinewidth}
1759 \endpgfscope
1760 }
1761 }
1762
1763 % protective ground
1764 \pgfdeclareshape{pground}{
1765 \anchor{center}{
1766 \pgfpointorigin
1767 }
1768 \behindforegroundpath{
1769 \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen
1770
1771 \pgfscope
1772 \pgfpathmoveto{\pgfpointorigin}
1773 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1774 \pgfusepath{draw}
1775
1776 \pgfstartlinewidth=\pgflinewidth
1777 %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1778
1779 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1780 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1781 \pgfpathcircle{\pgfpoint{0pt}{-\pgf@circ@res@step}} {1.2\pgf@circ@res@step}
1782 \pgfusepath{draw}
1783
1784 \pgfsetlinewidth{\pgfstartlinewidth}
1785 \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1786 \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}}
1787 \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1788 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}}
1789 \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1790 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}}
1791 \pgfusepath{draw}
1792
1793 \pgfsetlinewidth{\pgfstartlinewidth}
1794 \endpgfscope
1795 }
1796 }
1797
1798 % chassis ground
1799 \pgfdeclareshape{cground}{
1800 \anchor{center}{
1801 \pgfpointorigin
1802 }
1803 \behindforegroundpath{
1804 \pgf@circ@res@step=\ctikzvalof{monopoles/chassis/width}\pgf@circ@Rlen
1805
1806 \pgfscope
1807 \pgfpathmoveto{\pgfpointorigin}
1808 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1809 \pgfusepath{draw}
1810
1811 \pgfpathmoveto{\pgfpoint{-1.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1812 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
1813 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
1814 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1815 \pgfpathmoveto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
1816 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}}
1817 \pgfusepath{draw}
1818 \endpgfscope
1819 }
1820 }
1821
1822 % Contributed by Leonardo Azzinnari
1823 \pgfdeclareshape{tlinestub}{
1824 \anchor{center}{\pgfpointorigin}
1825 \behindforegroundpath{
1826 \pgfstartlinewidth=\pgflinewidth
1827
1828 \pgf@circ@res@step=\ctikzvalof{bipoles/tline/width} \pgf@circ@Rlen
1829 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1830
1831 \pgfpathmoveto{\pgfpointorigin}
1832 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0pt}}
1833 \pgfusepath{draw}
1834 \pgfscope
1835 \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}}
1836 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1837 \pgfpathlineto{\pgfpoint{1.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
1838 \pgfpatharc{90}{-90}{0.125\pgf@circ@res@step and 0.25\pgf@circ@res@step}
1839 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-0.25\pgf@circ@res@step}}
1840 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1841 \pgfusepath{draw}
1842 \endpgfscope
1843 }
1844 }
1845
1846
1847
1848
1849 \pgfdeclareshape{antenna}{
1850 \anchor{center}{\pgfpointorigin}
1851 \savedanchor{\northeast}{
1852 \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen
1853 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1854 \pgf@y=6\pgf@circ@res@step
1855 }
1856 \anchor{text}{
1857 \northeast
1858 \pgf@x=\ctikzvalof{monopoles/antenna/label/xanchor}\pgf@x
1859 \pgf@y=\ctikzvalof{monopoles/antenna/label/yanchor}\pgf@y
1860 }
1861 \behindforegroundpath{
1862 \pgfstartlinewidth=\pgflinewidth
1863 \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen
1864
1865 % \pgfpathmoveto{\pgfpointorigin}
1866 % \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1867 % \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1868 % \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1869
1870 \pgftransformxshift{ -4\pgf@circ@res@step }
1871
1872 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1873 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1874
1875 \pgfusepath{draw}
1876
1877 \pgfscope
1878 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1879 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1880 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1881 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1882 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1883 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1884 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1885 \pgfusepath{draw}
1886 \endpgfscope
1887 \pgfsetlinewidth{\pgfstartlinewidth}
1888
1889 }
1890 }
1891
1892
1893 \pgfdeclareshape{txantenna}{
1894 \anchor{center}{\pgfpointorigin}
1895 \savedanchor{\northeast}{
1896 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1897 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1898 \pgf@y=6\pgf@circ@res@step
1899 }
1900 \anchor{text}{
1901 \northeast
1902 \pgf@x=\ctikzvalof{monopoles/txantenna/label/xanchor}\pgf@x
1903 \pgf@y=\ctikzvalof{monopoles/txantenna/label/yanchor}\pgf@y
1904 }
1905 \behindforegroundpath{
1906 \pgfstartlinewidth=\pgflinewidth
1907 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1908
1909 \pgfpathmoveto{\pgfpointorigin}
1910 \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1911 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1912 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1913
1914 \pgfusepath{draw}
1915
1916 \pgfscope
1917 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1918 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1919 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1920 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1921 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1922 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1923 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1924 \pgfusepath{draw}
1925 \endpgfscope
1926 \pgfpathmoveto{\pgfpoint{5.5\pgf@circ@res@step}{6\pgf@circ@res@step}}
1927 % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step}
1928 \pgfpatharc{30}{-30}{2\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{6.25\pgf@circ@res@step}}
1929 \pgfpatharc{30}{-30}{2.5\pgf@circ@res@step}
1930 \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.5\pgf@circ@res@step}}
1931 \pgfpatharc{30}{-30}{3\pgf@circ@res@step}
1932 \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.75\pgf@circ@res@step}}
1933 \pgfpatharc{30}{-30}{3.5\pgf@circ@res@step}
1934 \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{7\pgf@circ@res@step}}
1935 \pgfpatharc{30}{-30}{4\pgf@circ@res@step}
1936 \pgfusepath{draw}
1937 \pgfsetlinewidth{\pgfstartlinewidth}
1938
1939 }
1940 }
1941
1942
1943 \pgfdeclareshape{rxantenna}{
1944 \anchor{center}{\pgfpointorigin}
1945 \savedanchor{\northeast}{
1946 \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen
1947 \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth
1948 \pgf@y=6\pgf@circ@res@step
1949 }
1950 \anchor{text}{
1951 \northeast
1952 \pgf@x=\ctikzvalof{monopoles/rxantenna/label/xanchor}\pgf@x
1953 \pgf@y=\ctikzvalof{monopoles/rxantenna/label/yanchor}\pgf@y
1954 }
1955 \behindforegroundpath{
1956 \pgfstartlinewidth=\pgflinewidth
1957 \pgf@circ@res@step=\ctikzvalof{monopoles/rxantenna/width}\pgf@circ@Rlen
1958
1959 \pgfpathmoveto{\pgfpointorigin}
1960 \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}}
1961 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{0pt}}
1962 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1963
1964 \pgfusepath{draw}
1965
1966 \pgfscope
1967 \pgfpathmoveto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1968 \pgfpathlineto{\pgfpoint{5\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1969 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{4\pgf@circ@res@step}}
1970 \pgfpathlineto{\pgfpoint{3\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1971 \pgfpathlineto{\pgfpoint{4\pgf@circ@[email protected]\pgflinewidth}{6\pgf@circ@res@step}}
1972 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
1973 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
1974 \pgfusepath{draw}
1975 \endpgfscope
1976
1977 \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{7\pgf@circ@res@step}}
1978 % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step}
1979 \pgfpatharc{150}{210}{4\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.75\pgf@circ@res@step}}
1980 \pgfpatharc{150}{210}{3.5\pgf@circ@res@step}
1981 \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.5\pgf@circ@res@step}}
1982 \pgfpatharc{150}{210}{3\pgf@circ@res@step}
1983 \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{6.25\pgf@circ@res@step}}
1984 \pgfpatharc{150}{210}{2.5\pgf@circ@res@step}
1985 \pgfpathmoveto{\pgfpoint{8\pgf@circ@res@step}{6\pgf@circ@res@step}}
1986 \pgfpatharc{150}{210}{2\pgf@circ@res@step}
1987 \pgfusepath{draw}
1988 \pgfsetlinewidth{\pgfstartlinewidth}
1989
1990 }
1991 }
1992
1993 % Vcc
1994 \pgfdeclareshape{vcc}{
1995 \anchor{center}{\pgfpointorigin}
1996 \anchor{text}{
1997 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
1998 \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}}
1999 \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}}
2000 \pgf@x=0pt
2001 \pgf@y=2\pgf@circ@res@step
2002 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
2003 \pgf@x=-.5\wd\pgfnodeparttextbox
2004 }
2005 \behindforegroundpath{
2006 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
2007 \pgfscope
2008 \pgfpathmoveto{\pgfpointorigin}
2009 \pgfpathlineto{\pgfpoint{0pt}{1.5\pgf@circ@res@step}}
2010 \pgfusepath{draw}
2011
2012 \pgfstartlinewidth=\pgflinewidth
2013 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2014
2015 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}}
2016 \pgfpathlineto{\pgfpoint{0}{1.5\pgf@circ@res@step}}
2017 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}}
2018 \pgfusepath{draw}
2019
2020 \pgfsetlinewidth{\pgfstartlinewidth}
2021
2022 \endpgfscope
2023 }
2024
2025 }
2026
2027 % Vee
2028 \pgfdeclareshape{vee}{
2029 \anchor{center}{\pgfpointorigin}
2030 \anchor{text}{
2031 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
2032 \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}}
2033 \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}}
2034 \pgf@x=0pt
2035 \pgf@y=-2\pgf@circ@res@step
2036 \advance \pgf@y by -1.5\ht\pgfnodeparttextbox
2037 \pgf@x=-.5\wd\pgfnodeparttextbox
2038 }
2039
2040 \behindforegroundpath{
2041 \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen
2042
2043 \pgfscope
2044 \pgfpathmoveto{\pgfpointorigin}
2045 \pgfpathlineto{\pgfpoint{0pt}{-1.5\pgf@circ@res@step}}
2046 \pgfusepath{draw}
2047
2048 \pgfstartlinewidth=\pgflinewidth
2049 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2050
2051 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
2052 \pgfpathlineto{\pgfpoint{0}{-1.5\pgf@circ@res@step}}
2053 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
2054 \pgfusepath{draw}
2055 \pgfsetlinewidth{\pgfstartlinewidth}
2056
2057 \endpgfscope
2058 }
2059
2060 }
2061
2062
2063 % match
2064 \pgfdeclareshape{match}{
2065 \anchor{center}{
2066 \pgfpointorigin
2067 }
2068 \anchor{text}{
2069 \pgf@x=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen
2070 \pgf@x=1.5\pgf@x
2071 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
2072 \pgf@y=-1.5\ht\pgfnodeparttextbox
2073 }
2074 \behindforegroundpath{
2075 \pgf@circ@res@step=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen
2076
2077 \pgfscope
2078 \pgfpathmoveto{\pgfpointorigin}
2079 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0pt}}
2080 \pgfusepath{draw}
2081
2082 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
2083 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
2084 \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0}}
2085 \pgfusepath{fill}
2086
2087 \pgfsetlinewidth{\pgfstartlinewidth}
2088
2089 \endpgfscope
2090 }
2091
2092 }
2093
2094
2095 %%%---------- close: tex/pgfcircmonopoles
2096 %%%%%%%%%%% Springe nach tex/pgfcircbipoles
2097 %%%---------- open: tex/pgfcircbipoles.tex
2098 % Copyright 2007-2009 by Massimo Redaelli
2099 %
2100 % This file may be distributed and/or modified
2101 %
2102 % 1. under the LaTeX Project Public License and/or
2103 % 2. under the GNU Public License.
2104 %
2105 % See the file doc/LICENSE for more details.
2106
2107 %% Generic macro for defining a bipole shape
2108 % #1 - additional anchors
2109 % #2 - lower y-size of the bipole (from the center).
2110 % #3 - #shape is the name of the shape
2111 % #4 - upper y-size of the bipole (from the center)
2112 % #5 - width of the bipole
2113 % #6 - macros drawing the bipole
2114
2115
2116 \long\def\pgfcircdeclarebipole#1#2#3#4#5#6{
2117 \pgfdeclareshape{#3shape}{
2118
2119 \savedanchor{\northeast}{
2120 \pgf@y=#4\pgf@circ@Rlen
2121 \pgf@y=.5\pgf@y
2122 \pgf@x=#5\pgf@circ@Rlen
2123 \pgf@x=.5\pgf@x
2124 }
2125 \savedanchor{\northeastborder}{
2126 \pgf@y=#4\pgf@circ@Rlen
2127 \pgf@y=.5\pgf@y
2128 \pgf@y=\ctikzvalof{bipoles/border margin}\pgf@y
2129 \pgf@x=#5\pgf@circ@Rlen
2130 \pgf@x=.5\pgf@x
2131 \pgf@x=\ctikzvalof{bipoles/border margin}\pgf@x
2132 }
2133 \savedanchor{\southwestborder}{
2134 \pgf@y=-#2\pgf@circ@Rlen
2135 \pgf@y=.5\pgf@y
2136 \pgf@y=\ctikzvalof{bipoles/border margin}\pgf@y
2137 \pgf@x=-#5\pgf@circ@Rlen
2138 \pgf@x=.5\pgf@x
2139 \pgf@x=\ctikzvalof{bipoles/border margin}\pgf@x
2140 }
2141 \savedanchor{\southwest}{
2142 \pgf@y=-#2\pgf@circ@Rlen
2143 \pgf@y=.5\pgf@y
2144 \pgf@x=-#5\pgf@circ@Rlen
2145 \pgf@x=.5\pgf@x
2146 }
2147 \savedanchor{\centerpoint}{
2148 \pgf@circ@res@down=-#2\pgf@circ@Rlen
2149 \pgf@circ@res@up=#4\pgf@circ@Rlen
2150 \pgfpointorigin
2151 \pgf@y=\pgf@circ@res@up
2152 \advance\pgf@y by\pgf@circ@res@down
2153 \pgf@y=.5\pgf@y
2154 }
2155 \anchor{center}{\pgfpointorigin}
2156 \anchor{n}{
2157 \northeast
2158 \pgf@x=0cm
2159 }
2160 \anchor{ne}{
2161 \northeast
2162 }
2163 \anchor{nw}{
2164 \northeast
2165 \pgf@x=-\pgf@x
2166 }
2167 \anchor{e}{%
2168 \northeast
2169 \pgf@y=0cm
2170 }
2171 \anchor{s}{%
2172 \southwest
2173 \pgf@x=0cm
2174 }
2175 \anchor{se}{%
2176 \southwest
2177 \pgf@x=-\pgf@x
2178 }
2179 \anchor{sw}{%
2180 \southwest
2181 }
2182 \anchor{w}{
2183 \southwest
2184 \pgf@y=0cm
2185 }
2186 \anchor{north}{
2187 \northeast
2188 \pgf@x=0cm
2189 }
2190 \anchor{east}{%
2191 \northeast
2192 \pgf@y=0cm
2193 }
2194 \anchor{south}{%
2195 \southwest
2196 \pgf@x=0cm
2197 }
2198 \anchor{west}{
2199 \southwest
2200 \pgf@y=0cm
2201 }
2202 \anchor{right}{
2203 \northeast
2204 \pgf@y=0cm
2205 }
2206 \anchor{above}{
2207 \northeast
2208 \pgf@x=0cm
2209 }
2210 \anchor{left}{%
2211 \southwest
2212 \pgf@y=0cm
2213 }
2214 \anchor{below}{%
2215 \southwest
2216 \pgf@x=0cm
2217 }
2218 \anchor{a}{%
2219 \northeast
2220 \pgf@y=0cm
2221 }
2222 \anchor{b} {
2223 \southwest
2224 \pgf@y=0cm
2225 }
2226 \savedanchor{\textanchor}{%
2227 \pgf@y=\ht\pgfnodeparttextbox
2228 \pgf@x=-.5\wd\pgfnodeparttextbox
2229 }
2230 \anchor{text}{%
2231 \textanchor
2232 }
2233 \anchorborder{%
2234 \ifpgf@circuit@bipole@inverted
2235 \pgf@circ@res@left=-\pgf@x
2236 \pgf@circ@res@right=-\pgf@y
2237 \else
2238 \pgf@circ@res@left=\pgf@x
2239 \pgf@circ@res@right=\pgf@y
2240 \fi
2241 \ifdim\pgf@circ@res@right>0cm
2242 \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\northeastborder}
2243 \else
2244 \southwestborder
2245 \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\pgfpoint{-\pgf@x}{-\pgf@y}}
2246 \fi
2247 }
2248
2249 #1
2250
2251 \backgroundpath{
2252 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
2253
2254 \northeast
2255 \pgf@circ@res@up = \pgf@y
2256 \pgf@circ@res@zero = 0cm
2257 \pgf@circ@res@left = -\pgf@x
2258 \pgf@circ@res@right = \pgf@x
2259 \southwest
2260 \pgf@circ@res@down = \pgf@y
2261
2262 \pgfstartlinewidth=\pgflinewidth
2263 \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
2264 #6
2265
2266 \pgfsetlinewidth{\pgfstartlinewidth}
2267 }
2268 }
2269 }
2270
2271 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2272 %% Standard bipole shapes declarations
2273
2274 %% Resistor
2275 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/resistor/height}}{resistor}{\ctikzvalof{bipoles/resistor/height}}{\ctikzvalof{bipoles/resistor/width}}{
2276 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2277 \pgftransformationadjustments
2278 \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
2279 \divide \pgf@circ@res@step by 12
2280
2281 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
2282 \pgf@circ@res@other = \pgf@circ@res@left
2283 \advance\pgf@circ@res@other by \pgf@circ@res@step
2284 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
2285 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2286 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2287 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2288 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
2289 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2290 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2291 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2292 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
2293 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2294 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
2295 \advance\pgf@circ@res@other by \pgf@circ@res@step
2296 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
2297 \pgfsetbeveljoin
2298 \pgfusepath{draw}
2299 }
2300
2301
2302
2303 %% Variable resistor
2304 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistor/height}}{vresistor}{\ctikzvalof{bipoles/vresistor/height}}{\ctikzvalof{bipoles/vresistor/width}}{ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2305 \pgftransformationadjustments
2306 \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
2307 \divide \pgf@circ@res@step by 12
2308
2309 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
2310
2311 \pgf@circ@res@other = \pgf@circ@res@left
2312 \advance\pgf@circ@res@other by \pgf@circ@res@step
2313 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
2314 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2315 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
2316 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2317 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
2318 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2319 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
2320 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2321 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
2322 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
2323 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
2324 \advance\pgf@circ@res@other by \pgf@circ@res@step
2325 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
2326 \pgfsetbeveljoin
2327 \pgfusepath{draw}
2328
2329 \pgfscope
2330 \pgfsetarrowsend{latex'}
2331 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@other}{\pgf@circ@res@up}}
2332 \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@other}{\pgf@circ@res@down}}
2333 \pgfusepath{draw}
2334 \endpgfscope
2335 }
2336
2337
2338
2339 %% Capacitor
2340
2341 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/capacitor/height}}{capacitor}{\ctikzvalof{bipoles/capacitor/height}}{\ctikzvalof{bipoles/capacitor/width}}{
2342 \pgf@circ@res@step = \ctikzvalof{bipoles/capacitor/width}\pgf@circ@Rlen
2343 \divide \pgf@circ@res@step by 5
2344
2345 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2346 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2347 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
2348
2349 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2350 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2351 \pgfusepath{draw}
2352 }
2353
2354
2355 %% Polar Capacitor
2356
2357 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pcapacitor/height}}{polarcapacitor}{\ctikzvalof{bipoles/pcapacitor/height}}{\ctikzvalof{bipoles/pcapacitor/width}}{
2358 \pgf@circ@res@step = \ctikzvalof{bipoles/pcapacitor/width}\pgf@circ@Rlen
2359 \divide \pgf@circ@res@step by 5
2360
2361 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2362
2363 \pgfscope
2364 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left+ \ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}{\pgf@circ@res@up}}
2365 \pgftransformrotate{-90}
2366 \pgfpathsine{\pgfpoint{\pgf@circ@res@up}{-\ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}}
2367 \pgfpathcosine{\pgfpoint{\pgf@circ@res@up}{\ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}}
2368 \pgfusepath{draw}
2369 \endpgfscope
2370
2371 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2372 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2373 \pgfusepath{draw}
2374
2375 }
2376
2377 %% Electrolytic Capacitor
2378
2379 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ecapacitor/height}}{ecapacitor}{\ctikzvalof{bipoles/ecapacitor/height}}{\ctikzvalof{bipoles/ecapacitor/width}}{
2380 \pgf@circ@res@step = \ctikzvalof{bipoles/ecapacitor/width}\pgf@circ@Rlen
2381 \divide \pgf@circ@res@step by 5
2382 \pgfsetrectcap
2383 % % % Draw plus pole
2384 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2385 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2386 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@up}}
2387 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
2388 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
2389 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2390 \pgfsetfillcolor{white}
2391 \pgfusepath{draw,fill}
2392 % % Draw minus pole
2393 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2394 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2395 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@down}}
2396 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2397 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2398 \pgfsetfillcolor{black}
2399 \pgfusepath{draw,fill}
2400 \pgfsetfillcolor{black}
2401 % % plus pole annotation
2402 \pgftext[right,at=\pgfpoint{1.2\pgf@circ@res@left}{.6\pgf@circ@res@up}]
2403 {\pgfkeysvalueof{/tikz/circuitikz/bipoles/ecapacitor/font} $+$}
2404 }
2405
2406 %% Battery
2407
2408 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery/height}}{battery}{\ctikzvalof{bipoles/battery/height}}{\ctikzvalof{bipoles/battery/width}}{
2409 \pgf@circ@res@step = \ctikzvalof{bipoles/battery/width}\pgf@circ@Rlen
2410 \divide \pgf@circ@res@step by 6
2411
2412 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2413 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
2414 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
2415
2416 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{.5\pgf@circ@res@up}}
2417 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{.5\pgf@circ@res@down}}
2418
2419 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2420 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
2421
2422 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}
2423 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}
2424
2425 \pgfusepath{draw}
2426 }
2427
2428
2429 %% Battery 1 % poles with equl thickness
2430
2431 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery1/height}}{battery1}{\ctikzvalof{bipoles/battery1/height}}{\ctikzvalof{bipoles/battery1/width}}{
2432 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{0}}
2433 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
2434 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{0}}
2435 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}}
2436 \pgfusepath{draw}
2437
2438 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2439 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@up}}
2440 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@down}}
2441
2442 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@up}}
2443 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@down}}
2444 \pgfusepath{draw}
2445 }
2446
2447 %% Battery 2 % negative pole thicker
2448
2449 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery2/height}}{battery2}{\ctikzvalof{bipoles/battery2/height}}{\ctikzvalof{bipoles/battery2/width}}{
2450 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{0}}
2451 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
2452 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{0}}
2453 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}}
2454 \pgfusepath{draw}
2455
2456 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2457 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@up}}
2458 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@down}}
2459 \pgfusepath{draw}
2460 \pgfsetlinewidth{3\pgflinewidth}
2461 \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@up}}
2462 \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@down}}
2463 \pgfusepath{draw}
2464 }
2465
2466
2467 %% cute inductor
2468
2469 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/lower coil height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
2470 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2471 \pgftransformationadjustments
2472
2473 \pgfmathsetlength{\pgf@circ@res@other}%width of small coil
2474 {0.5*\ctikzvalof{bipoles/cuteinductor/coil aspect}*\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/cuteinductor/coils}-1)}
2475
2476
2477 \pgfmathsetlength{\pgf@circ@res@step}
2478 {(\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/cuteinductor/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/cuteinductor/coils}/2}
2479
2480 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
2481 \foreach \x in {2,...,\ctikzvalof{bipoles/cuteinductor/coils}}
2482 {
2483 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up}
2484 \pgfpatharc{0}{-180}{\pgf@circ@res@other and -\pgf@circ@res@down}
2485 }
2486 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up}
2487 \pgfsetbuttcap
2488 \pgfsetbeveljoin
2489 \pgfusepath{stroke}
2490 }
2491
2492 %% variable cute inductor
2493
2494 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcuteinductor/lower coil height}}{vcuteinductor}{\ctikzvalof{bipoles/vcuteinductor/height}}{\ctikzvalof{bipoles/vcuteinductor/width}}{
2495 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2496 \pgftransformationadjustments
2497
2498 \pgfmathsetlength{\pgf@circ@res@other}%width of small coil
2499 {0.5*\ctikzvalof{bipoles/vcuteinductor/coil aspect}*\ctikzvalof{bipoles/vcuteinductor/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/vcuteinductor/coils}-1)}
2500
2501
2502 \pgfmathsetlength{\pgf@circ@res@step}
2503 {(\ctikzvalof{bipoles/vcuteinductor/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/vcuteinductor/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/vcuteinductor/coils}/2}
2504
2505 \pgfscope
2506 \pgfsetarrowsend{latex'}
2507 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
2508 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@up}}
2509 \pgfusepath{draw}
2510 \endpgfscope
2511
2512 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
2513 \foreach \x in {2,...,\ctikzvalof{bipoles/vcuteinductor/coils}}
2514 {
2515 \pgfpatharc{180}{0}{\pgf@circ@res@step and .5\pgf@circ@res@up}
2516 \pgfpatharc{0}{-180}{\pgf@circ@res@other and -.5\pgf@circ@res@down}
2517 }
2518 \pgfpatharc{180}{0}{\pgf@circ@res@step and .5\pgf@circ@res@up}
2519 \pgfsetbuttcap
2520 \pgfsetbeveljoin
2521 \pgfusepath{stroke}
2522 }
2523
2524 %% american inductor
2525
2526 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/americaninductor/height 2}}{americaninductor}{\ctikzvalof{bipoles/americaninductor/height}}{\ctikzvalof{bipoles/americaninductor/width}}{
2527 \pgf@circ@res@step=\ctikzvalof{bipoles/americaninductor/width}\pgf@circ@Rlen
2528 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2529 \pgftransformationadjustments
2530 \advance \pgf@circ@res@step by \pgfhorizontaltransformationadjustment\pgflinewidth
2531 \divide \pgf@circ@res@step by \ctikzvalof{bipoles/americaninductor/coils}
2532 \divide \pgf@circ@res@step by 2
2533 \pgf@circ@res@other = \ctikzvalof{bipoles/americaninductor/coil height}\pgf@circ@Rlen
2534
2535 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
2536 \foreach \x in {1,...,\ctikzvalof{bipoles/americaninductor/coils}}
2537 {
2538 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2539 }
2540 \pgfsetbuttcap
2541 \pgfsetbeveljoin
2542 \pgfusepath{stroke}
2543 }
2544
2545 %% variable american inductor
2546
2547 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{
2548 \pgf@circ@res@step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf@circ@Rlen
2549 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2550 \pgftransformationadjustments
2551 \advance \pgf@circ@res@step by \pgfhorizontaltransformationadjustment\pgflinewidth
2552 \divide \pgf@circ@res@step by \ctikzvalof{bipoles/vamericaninductor/coils}
2553 \divide \pgf@circ@res@step by 2
2554 \pgf@circ@res@other = \ctikzvalof{bipoles/vamericaninductor/coil height}\pgf@circ@Rlen
2555
2556 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
2557 \foreach \x in {1,...,\ctikzvalof{bipoles/vamericaninductor/coils}}
2558 {
2559 \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
2560 }
2561 \pgfsetbuttcap
2562 \pgfsetbeveljoin
2563 \pgfusepath{stroke}
2564
2565 \pgfscope
2566 \pgfsetarrowsend{latex'}
2567 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
2568 \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@up}}
2569 \pgfusepath{draw}
2570 \endpgfscope
2571 }
2572
2573
2574 %% Independent voltage source
2575
2576 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsource/height}}{vsource}{\ctikzvalof{bipoles/vsource/height}}{\ctikzvalof{bipoles/vsource/width}}{
2577
2578 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2579
2580 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2581 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2582 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2583 \pgfusepath{draw}
2584 }
2585
2586
2587 %% Independent voltage source - American style
2588
2589 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourceam/height}}{vsourceAM}{\ctikzvalof{bipoles/vsourceam/height}}{\ctikzvalof{bipoles/vsourceam/width}}{
2590
2591 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2592 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2593 \pgfusepath{draw}
2594 \ifpgf@circ@oldvoltagedirection
2595 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$+$}
2596 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$-$}
2597 \else
2598 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$-$}
2599 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$+$}
2600 \fi
2601 }
2602
2603
2604
2605 %% Independent sinusoidal voltage source
2606
2607 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesin/height}}{vsourcesin}{\ctikzvalof{bipoles/vsourcesin/height}}{\ctikzvalof{bipoles/vsourcesin/width}}{
2608
2609 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2610 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2611 \pgfusepath{draw}
2612
2613 \pgf@circ@res@up = .5\pgf@circ@res@up
2614 \pgfscope
2615 \pgftransformrotate{90}
2616 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2617 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2618 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2619 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2620 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2621 \pgfusepath{draw}
2622 \endpgfscope
2623 }
2624
2625 % Triangle Voltage source - contributed by Ralf Farkas
2626 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcetri/height}}{vsourcetri}{\ctikzvalof{bipoles/vsourcetri/height}}{\ctikzvalof{bipoles/vsourcetri/width}}{
2627
2628 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2629 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2630 \pgfusepath{draw}
2631
2632 \pgf@circ@res@up = .5\pgf@circ@res@up
2633 \pgfscope
2634 \pgftransformrotate{90}
2635 \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}}
2636 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@up}{0.75\pgf@circ@res@up}}
2637 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@up}{-0.75\pgf@circ@res@up}}
2638 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}}
2639 \pgfusepath{draw}
2640 \endpgfscope
2641 }
2642
2643
2644 % Square Voltage source - contributed by Alistair Kwan
2645 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesquare/height}}{vsourcesquare}{\ctikzvalof{bipoles/vsourcesquare/height}}{\ctikzvalof{bipoles/vsourcesquare/width}}{
2646 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2647 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2648 \pgfusepath{draw}
2649 \pgf@circ@res@up = .5\pgf@circ@res@up
2650 \pgfscope
2651 \pgftransformrotate{90}
2652 \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}}
2653 \pgfpathlineto{\pgfpoint{-1\pgf@circ@res@up}{1\pgf@circ@res@up}}
2654 \pgfpathlineto{\pgfpoint{0\pgf@circ@res@up}{1\pgf@circ@res@up}}
2655 \pgfpathlineto{\pgfpoint{0\pgf@circ@res@up}{-1\pgf@circ@res@up}}
2656 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{-1\pgf@circ@res@up}}
2657 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}}
2658 \pgfusepath{draw}
2659 \endpgfscope
2660 }
2661
2662 % Triangle Voltage source - contributed by Ralf Farkas
2663 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcetri/height}}{vsourcetri}{\ctikzvalof{bipoles/vsourcetri/height}}{\ctikzvalof{bipoles/vsourcetri/width}}{
2664
2665 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2666 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2667 \pgfusepath{draw}
2668
2669 \pgf@circ@res@up = .5\pgf@circ@res@up
2670 \pgfscope
2671 \pgftransformrotate{90}
2672 \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}}
2673 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@up}{0.75\pgf@circ@res@up}}
2674 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@up}{-0.75\pgf@circ@res@up}}
2675 \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}}
2676 \pgfusepath{draw}
2677 \endpgfscope
2678 }
2679
2680
2681 %% Empty Source
2682 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/esource/height}}{esource}{\ctikzvalof{bipoles/esource/height}}{\ctikzvalof{bipoles/esource/width}}{
2683 \pgfpointorigin
2684 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2685 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2686 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2687 \pgfusepath{draw}
2688 }
2689
2690 %% PV Source
2691 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pvsource/height}}{pvsource}{\ctikzvalof{bipoles/pvsource/height}}{\ctikzvalof{bipoles/pvsource/width}}{
2692 \pgfpointorigin
2693 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2694 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2695 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2696 \pgfusepath{draw}
2697
2698 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@right}{0}}
2699 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
2700 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@left}{0}}
2701 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}}
2702 \pgfusepath{draw}
2703
2704 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2705 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@left}{.4\pgf@circ@res@up}}
2706 \pgfpathlineto{\pgfpoint{.15\pgf@circ@res@left}{.4\pgf@circ@res@down}}
2707
2708 \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@right}{.6\pgf@circ@res@up}}
2709 \pgfpathlineto{\pgfpoint{.15\pgf@circ@res@right}{.6\pgf@circ@res@down}}
2710 \pgfusepath{draw}
2711
2712 %Arrow Part
2713 \pgfscope
2714 \pgfsetarrowsend{latex}
2715 \pgfpathmoveto{\pgfpointadd{\pgfpoint{.3\pgf@circ@res@left}{0}}{\pgfpointpolar{-45}{2.2\pgf@circ@res@up}}}
2716 \pgfpathlineto{\pgfpointadd{\pgfpoint{.3\pgf@circ@res@left}{0}}{\pgfpointpolar{-45}{1.3\pgf@circ@res@up}}}
2717 \pgfusepath{draw}
2718 \pgfpathmoveto{\pgfpointadd{\pgfpoint{0}{0.3\pgf@circ@res@up}}{\pgfpointpolar{-45}{2.2\pgf@circ@res@up}}}
2719 \pgfpathlineto{\pgfpointadd{\pgfpoint{0}{0.3\pgf@circ@res@up}}{\pgfpointpolar{-45}{1.3\pgf@circ@res@up}}}
2720 \pgfusepath{draw}
2721 \endpgfscope
2722
2723 }
2724
2725 %% Empty Source
2726 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/esource/height}}{esource}{\ctikzvalof{bipoles/esource/height}}{\ctikzvalof{bipoles/esource/width}}{
2727 \pgfpointorigin
2728 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2729 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2730 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2731 \pgfusepath{draw}
2732 }
2733
2734 %% DC Current Source with open shape
2735 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dcisource/height}}{dcisource}{\ctikzvalof{bipoles/dcisource/height}}{\ctikzvalof{bipoles/dcisource/width}}{
2736 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2737 \pgfpathmoveto{\pgfpointorigin}
2738 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}}\pgfpatharc{0}{90}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2739 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}}\pgfpatharc{0}{-90}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2740 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}\pgfpatharc{180}{270}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2741 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}\pgfpatharc{180}{90}{0.85\pgf@circ@res@right and \pgf@circ@res@up}
2742 \pgfusepath{draw}
2743
2744 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2745 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@zero}}
2746 \pgfusepath{draw}
2747 \pgfscope
2748
2749 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2750 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
2751 \endpgfscope
2752 }
2753
2754 %% DC-Voltage source
2755 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dcvsource/height}}{dcvsource}{\ctikzvalof{bipoles/dcvsource/height}}{\ctikzvalof{bipoles/dcvsource/width}}{
2756 \pgfpointorigin
2757 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2758 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2759 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2760 \pgfusepath{draw}
2761 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@up}{.5\pgf@circ@res@left}}
2762 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@up}{.5\pgf@circ@res@right}}
2763 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@down}{.5\pgf@circ@res@left}}
2764 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@down}{.5\pgf@circ@res@right}}
2765 \pgfusepath{draw}
2766 }
2767
2768
2769 %% Independent current source
2770
2771 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isource}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
2772 \pgfpointorigin
2773 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2774 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2775 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
2776 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
2777 \pgfusepath{draw}
2778 }
2779
2780 %% Independent double oo source
2781
2782 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/oosource/height}}{oosource}{\ctikzvalof{bipoles/oosource/height}}{\ctikzvalof{bipoles/oosource/width}}{
2783 \pgfpointorigin
2784 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2785 \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf@circ@res@left}{0}}
2786 {\ctikzvalof{bipoles/oosource/circlesize}\pgf@circ@res@left}
2787 \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf@circ@res@right}{0}}
2788 {\ctikzvalof{bipoles/oosource/circlesize}\pgf@circ@res@right}
2789 \pgfusepath{draw}
2790 }
2791
2792
2793 %% Independent current source - American
2794
2795 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isourceam/height}}{isourceAM}{\ctikzvalof{bipoles/isourceam/height}}{\ctikzvalof{bipoles/isourceam/width}}{
2796 \pgfpointorigin
2797 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2798 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2799 \pgfusepath{draw}
2800
2801 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2802 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@zero}}
2803 \pgfusepath{draw}
2804 \pgfscope
2805 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2806 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
2807 \endpgfscope
2808 }
2809
2810
2811 %% Independent sinusoidal current source
2812
2813 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isourcesin}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
2814 \pgfpointorigin
2815 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2816 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
2817 \pgfusepath{draw}
2818
2819 \pgf@circ@res@up = .5\pgf@circ@res@up
2820 \pgfscope
2821 \pgftransformrotate{90}
2822 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2823 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2824 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2825 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2826 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2827 \pgfusepath{draw}
2828 \endpgfscope
2829
2830 }
2831
2832
2833 %% Controlled voltage source
2834
2835 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsource/height}}{cvsource}{\ctikzvalof{bipoles/cvsource/height}}{\ctikzvalof{bipoles/cvsource/width}}{
2836
2837 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2838
2839 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2840 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2841 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2842 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2843 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2844 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2845 \pgfusepath{draw}
2846 }
2847
2848
2849
2850
2851 %% Controlled voltage source - American
2852 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourceam/height}}{cvsourceAM}{\ctikzvalof{bipoles/cvsourceam/height}}{\ctikzvalof{bipoles/cvsourceam/width}}{
2853 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2854 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2855 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2856 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2857 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2858 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2859 \pgfusepath{draw}
2860
2861 \ifpgf@circ@oldvoltagedirection
2862 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@left]{$+$}
2863 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@right]{$-$}
2864 \else
2865 \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@left]{$-$}
2866 \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@right]{$+$}
2867 \fi
2868 }
2869
2870
2871 %% Controlled sinusoidal voltage source
2872 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cvsourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
2873
2874 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2875
2876 \pgfscope
2877 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2878 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2879 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2880 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2881 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2882 \pgfusepath{draw}
2883 \endpgfscope
2884
2885 \pgf@circ@res@up = .5\pgf@circ@res@up
2886 \pgfscope
2887 \pgftransformrotate{90}
2888 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2889 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2890 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2891 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2892 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2893 \pgfusepath{draw}
2894 \endpgfscope
2895 }
2896
2897
2898
2899 %% Controlled sinusoidal current source
2900
2901 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cisourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
2902
2903 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2904
2905 \pgfscope
2906 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2907 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2908 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2909 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2910 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2911 \pgfusepath{draw}
2912 \endpgfscope
2913
2914 \pgf@circ@res@up = .5\pgf@circ@res@up
2915 \pgfscope
2916 \pgftransformrotate{90}
2917 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}}
2918 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2919 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2920 \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}}
2921 \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
2922 \pgfusepath{draw}
2923 \endpgfscope
2924 }
2925
2926
2927
2928
2929 %% Controlled current source
2930
2931 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisource/height}}{cisource}{\ctikzvalof{bipoles/cisource/height}}{\ctikzvalof{bipoles/cisource/width}}{
2932
2933 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2934
2935 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2936 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2937 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2938 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2939 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2940 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2941 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2942 \pgfusepath{draw}
2943 }
2944
2945
2946
2947
2948 %% Controlled current source - American
2949
2950 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisourceam/height}}{cisourceAM}{\ctikzvalof{bipoles/cisourceam/height}}{\ctikzvalof{bipoles/cisourceam/width}}{
2951
2952 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2953
2954 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2955 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
2956 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
2957 \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}}
2958 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
2959 \pgfusepath{draw}
2960
2961 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}}
2962 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@zero}}
2963 \pgfusepath{draw}
2964 \pgfscope
2965 \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
2966 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
2967 \endpgfscope
2968 }
2969
2970 %% Black generic diode
2971
2972 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulldiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2973
2974 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2975
2976 \pgfscope
2977 \pgftransformxshift{\pgf@circ@res@left}
2978 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2979 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2980 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
2981 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2982 \pgfusepath{draw,fill}
2983 \endpgfscope
2984 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
2985 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
2986 \pgfusepath{draw}
2987 }
2988
2989 %% Black Zener diode
2990
2991 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
2992
2993 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
2994
2995 \pgfscope
2996 \pgftransformxshift{\pgf@circ@res@left}
2997 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
2998 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
2999 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3000 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3001 \pgfusepath{draw,fill}
3002 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3003 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3004 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3005 \pgfusepath{draw}
3006 \endpgfscope
3007 }
3008
3009 %% Black alternative zigzag Zener diode
3010 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3011
3012 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3013
3014 \pgfscope
3015 \pgftransformxshift{\pgf@circ@res@left}
3016 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3017 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3018 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3019 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3020 \pgfusepath{draw,fill}
3021 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@up}}
3022 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3023 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3024 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@down}}
3025 \pgfusepath{draw}
3026 \endpgfscope
3027 }
3028
3029 %% Black Schottky diode
3030
3031 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullsdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3032
3033 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3034 \pgfscope
3035 \pgftransformxshift{\pgf@circ@res@left}
3036 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3037 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3038 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3039 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3040 \pgfusepath{draw,fill}
3041
3042 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@down}}
3043 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3044 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3045 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3046 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3047 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3048 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@up}}
3049 \pgfusepath{draw}
3050 \endpgfscope
3051
3052 }
3053
3054 %% Black tunnel diode
3055
3056 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulltdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3057
3058 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3059 \pgfscope
3060 \pgftransformxshift{\pgf@circ@res@left}
3061 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3062 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3063 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3064 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3065 \pgfusepath{draw,fill}
3066
3067 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3068 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3069 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3070 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3071 \pgfusepath{draw}
3072 \endpgfscope
3073 }
3074
3075 %% Black light emitting diode
3076
3077 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulllediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3078
3079 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3080 \pgfscope
3081 \pgftransformxshift{\pgf@circ@res@left}
3082 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3083 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3084 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3085 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3086 \pgfusepath{draw,fill}
3087 \endpgfscope
3088 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3089 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3090 \pgfusepath{draw}
3091
3092 \pgfsetlinewidth{\pgfstartlinewidth}
3093 \pgfsetarrowsend{latex'}
3094 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
3095 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
3096 \pgfusepath{draw}
3097 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
3098 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
3099 \pgfusepath{draw}
3100
3101 }
3102
3103 %% Black photodiode
3104
3105 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullpdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3106
3107 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3108 \pgfscope
3109 \pgftransformxshift{\pgf@circ@res@left}
3110 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3111 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3112 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3113 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3114 \pgfusepath{draw,fill}
3115 \endpgfscope
3116 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3117 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3118 \pgfusepath{draw}
3119
3120 \pgfsetlinewidth{\pgfstartlinewidth}
3121 \pgfsetarrowsstart{latex'}
3122 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
3123 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
3124 \pgfusepath{draw}
3125 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
3126 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
3127 \pgfusepath{draw}
3128 }
3129
3130 %% Black varcap
3131
3132 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{fullvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
3133 \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3134 \pgfsetlinewidth{\pgf@circ@res@temp}
3135 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
3136 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3137 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3138 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
3139 \pgfusepath{draw,fill}
3140 %
3141 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@down}}
3142 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@up}}
3143 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3144 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3145 \pgfusepath{draw}
3146 }
3147
3148 %% Empty generic diode
3149
3150 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptydiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3151
3152
3153 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3154
3155 \pgfscope
3156 \pgftransformxshift{\pgf@circ@res@left}
3157 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3158 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3159 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3160 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3161 \pgfusepath{draw}
3162 \endpgfscope
3163 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3164 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3165 \pgfusepath{draw}
3166 }
3167
3168 %% Empty Zener diode
3169
3170 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3171
3172 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3173
3174 \pgfscope
3175 \pgftransformxshift{\pgf@circ@res@left}
3176 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3177 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3178 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3179 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3180 \pgfusepath{draw}
3181 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3182 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3183 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3184 \pgfusepath{draw}
3185 \endpgfscope
3186 }
3187
3188 %% Empty alternative zigzag Zener diode
3189 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3190
3191 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3192
3193 \pgfscope
3194 \pgftransformxshift{\pgf@circ@res@left}
3195 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3196 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3197 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3198 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3199 \pgfusepath{draw}
3200 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@up}}
3201 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3202 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3203 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@[email protected]\pgf@circ@res@down}}
3204 \pgfusepath{draw}
3205 \endpgfscope
3206 }
3207 %% Empty Schottky diode
3208
3209 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptysdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3210
3211 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3212 \pgfscope
3213 \pgftransformxshift{\pgf@circ@res@left}
3214 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3215 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3216 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3217 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3218 \pgfusepath{draw}
3219
3220 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@down}}
3221 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3222 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3223 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3224 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3225 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3226 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{.6\pgf@circ@res@up}}
3227 \pgfusepath{draw}
3228 \endpgfscope
3229
3230 }
3231
3232 %% Empty tunnel diode
3233
3234 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptytdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3235
3236 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3237 \pgfscope
3238 \pgftransformxshift{\pgf@circ@res@left}
3239 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3240 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3241 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3242 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3243 \pgfusepath{draw}
3244
3245 \pgfpathmoveto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@down}}
3246 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
3247 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
3248 \pgfpathlineto{\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@left}{\pgf@circ@res@up}}
3249 \pgfusepath{draw}
3250 \endpgfscope
3251 }
3252
3253 %% Empty light emitting diode
3254
3255 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptylediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3256
3257 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3258 \pgfscope
3259 \pgftransformxshift{\pgf@circ@res@left}
3260 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3261 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3262 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3263 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3264 \pgfusepath{draw}
3265 \endpgfscope
3266 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3267 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3268 \pgfusepath{draw}
3269
3270 \pgfsetlinewidth{\pgfstartlinewidth}
3271 \pgfsetarrowsend{latex'}
3272 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
3273 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
3274 \pgfusepath{draw}
3275 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
3276 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
3277 \pgfusepath{draw}
3278 }
3279
3280 %% Empty photodiode
3281
3282 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptypdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
3283
3284 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3285 \pgfscope
3286 \pgftransformxshift{\pgf@circ@res@left}
3287 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3288 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3289 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3290 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
3291 \pgfusepath{draw}
3292 \endpgfscope
3293 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3294 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3295 \pgfusepath{draw}
3296
3297 \pgfsetlinewidth{\pgfstartlinewidth}
3298 \pgfsetarrowsstart{latex'}
3299 \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
3300 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
3301 \pgfusepath{draw}
3302 \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
3303 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
3304 \pgfusepath{draw}
3305 }
3306
3307 %% Empty varcap
3308
3309 \pgfcircdeclarebipole{
3310 \anchor{strokepathstart}{
3311 \northeast
3312 \pgf@y=0cm
3313 \advance\pgf@x by -\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth
3314 \advance\pgf@x by -\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth
3315 }
3316 \anchor{strokepathend}{
3317 \northeast
3318 \pgf@y=0cm
3319 }
3320 }{\ctikzvalof{bipoles/varcap/height}}{emptyvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
3321 \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
3322 \pgfsetlinewidth{\pgf@circ@res@temp}
3323 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
3324 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3325 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3326 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
3327 \pgfusepath{draw}
3328 %
3329 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@down}}
3330 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@up}}
3331 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3332 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3333 \pgfusepath{draw}
3334 }
3335
3336 %% (Closing) SPST
3337 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/spst/depth}}{cspst}{\ctikzvalof{bipoles/spst/height}}{\ctikzvalof{bipoles/spst/width}}{
3338 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3339 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3340 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
3341 \pgfusepath{draw}
3342
3343 \pgfsetarrowsstart{latex'}
3344 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@right}{\pgf@circ@res@down}}
3345 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{0\pgf@circ@res@down}}
3346 \pgfpatharcto{1.2\pgf@circ@res@right}{1.2\pgf@circ@res@right}{0}{0}{1}{\pgfpoint{.9\pgf@circ@res@left}{.9\pgf@circ@res@up}}
3347 \pgfsetbeveljoin
3348 \pgfusepath{draw}
3349 }
3350
3351 %% Opening SPST
3352 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/spst/depth}}{ospst}{\ctikzvalof{bipoles/spst/height}}{\ctikzvalof{bipoles/spst/width}}{
3353
3354 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3355 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3356 \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
3357 \pgfusepath{draw}
3358
3359 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
3360 \pgfpatharcto{1.1\pgf@circ@res@right}{1.1\pgf@circ@res@right}{0}{0}{1}{\pgfpoint{.7\pgf@circ@res@left}{.9\pgf@circ@res@up}}
3361 \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@left}{1\pgf@circ@res@up}}
3362 \pgfsetarrowsend{latex'}
3363 \pgfsetbeveljoin
3364 \pgfusepath{draw}
3365 }
3366
3367 %% Normal open Switch
3368 \pgfcircdeclarebipole{}{0}{nos}{\ctikzvalof{bipoles/nos/height}}{\ctikzvalof{bipoles/nos/width}}{
3369
3370 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3371 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3372 \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@right}{\pgf@circ@res@up}}
3373 \pgfsetbuttcap
3374 \pgfusepath{draw}
3375 }
3376
3377 %% Normal closed Switch
3378 \pgfcircdeclarebipole{}{0}{ncs}{\ctikzvalof{bipoles/ncs/height}}{\ctikzvalof{bipoles/ncs/width}}{
3379 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3380 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3381 \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@right}{\pgf@circ@res@up}}
3382 \pgfusepath{draw}
3383 \pgfsetlinewidth{\pgfstartlinewidth}
3384 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3385 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{0pt}}
3386 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{\pgf@circ@res@up}}
3387 \pgfusepath{draw}
3388 }
3389
3390 %% Push Button
3391 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pushbutton/height 2}}{pushbutton}{\ctikzvalof{bipoles/pushbutton/height}}{\ctikzvalof{bipoles/pushbutton/width}}{
3392 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3393 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@up}}
3394 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}
3395 \pgfpathmoveto{\pgfpoint{0}{.5\pgf@circ@res@up}}
3396 \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@up}}
3397 \pgfusepath{draw}
3398
3399 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
3400 \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
3401 \pgftransformshift{\pgfpoint{2\pgf@circ@res@right}{0pt}}
3402 \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
3403 }
3404
3405 % % METERINGSHAPE
3406 \long\def\drawmeteringcircle{
3407 \def\pgf@circ@temp{right}
3408 \ifx\tikz@res@label@pos\pgf@circ@temp
3409 \pgf@circ@res@step=-1.2\pgf@circ@res@up
3410 \else
3411 \def\pgf@circ@temp{below}
3412 \ifx\tikz@res@label@pos\pgf@circ@temp
3413 \pgf@circ@res@step=-1.2\pgf@circ@res@up
3414 \else
3415 \pgf@circ@res@step=1.2\pgf@circ@res@up
3416 \fi
3417 \fi
3418 %draw connections to circle
3419 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
3420 \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@left}{\pgf@circ@res@zero}}
3421 \pgfpathmoveto{\pgfpoint{.9\pgf@circ@res@right}{\pgf@circ@res@zero}}
3422 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
3423 \pgfusepath{draw}
3424 %draw circle
3425 \pgfscope
3426 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3427 \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
3428 \pgfusepath{draw}
3429 \endpgfscope
3430 %draw arrow
3431 \pgfscope
3432 \pgfsetarrowsend{latex}
3433 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3434 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3435 \pgfusepath{draw}
3436 \endpgfscope
3437 }
3438 %AMPEREMETER
3439 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ammeter/height}}{ammeter}{\ctikzvalof{bipoles/ammeter/height}}{\ctikzvalof{bipoles/ammeter/width}}{
3440 \drawmeteringcircle
3441 \pgfnode{circle}{center}{\textbf{A}}{}{}
3442 }
3443 %OHMMETER
3444 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ohmmeter/height}}{ohmmeter}{\ctikzvalof{bipoles/ohmmeter/height}}{\ctikzvalof{bipoles/ohmmeter/width}}{
3445 \drawmeteringcircle
3446 \pgfnode{circle}{center}{\boldmath$\Omega$}{}{}
3447 }
3448 %VOLTMETER
3449 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/voltmeter/height}}{voltmeter}{\ctikzvalof{bipoles/voltmeter/height}}{\ctikzvalof{bipoles/voltmeter/width}}{
3450 \drawmeteringcircle
3451 \pgfnode{circle}{center}{\textbf{V}}{}{}
3452
3453 }
3454
3455 %% Short circuit
3456
3457 \pgfcircdeclarebipole{}{0}{short}{0}{0}{ }
3458
3459 %% Open circuit
3460
3461 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/open/height}}{open}{\ctikzvalof{bipoles/open/height}}{\ctikzvalof{bipoles/open/width}}{
3462
3463 }
3464
3465 %% Generic bipole - used as resistor by some (bleah)
3466
3467 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/generic/height}}{generic}{\ctikzvalof{bipoles/generic/height}}{\ctikzvalof{bipoles/generic/width}}{
3468
3469 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3470 %\divide \pgf@circ@res@step by 14
3471
3472 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3473 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3474
3475 \pgfusepath{draw}
3476 }
3477
3478
3479 %% fuse
3480
3481 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fuse/height}}{fuse}{\ctikzvalof{bipoles/fuse/height}}{\ctikzvalof{bipoles/fuse/width}}{
3482
3483 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
3484 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
3485 \pgfusepath{draw}
3486
3487 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3488 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3489
3490 \pgfusepath{draw}
3491 }
3492
3493
3494
3495 %% Generic bipole, filled - used as inductor by some (bleah)
3496
3497 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fullgeneric/height}}{fullgeneric}{\ctikzvalof{bipoles/fullgeneric/height}}{\ctikzvalof{bipoles/fullgeneric/width}}{
3498
3499 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3500 %\divide \pgf@circ@res@step by 14
3501
3502 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3503 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3504
3505 \pgfusepath{draw,fill}
3506 }
3507
3508
3509 %% Generic asymmetric bipole
3510
3511 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ageneric/height}}{ageneric}{\ctikzvalof{bipoles/ageneric/height}}{\ctikzvalof{bipoles/ageneric/width}}{
3512 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3513 %\divide \pgf@circ@res@step by 14
3514
3515 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3516 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3517
3518 \pgfusepath{draw}
3519
3520 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3521 \pgfusepath{stroke,fill}
3522 }
3523
3524
3525 %% asymmetric fuse
3526
3527 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/afuse/height}}{afuse}{\ctikzvalof{bipoles/afuse/height}}{\ctikzvalof{bipoles/afuse/width}}{
3528
3529 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
3530 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
3531 \pgfusepath{draw}
3532
3533 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3534 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3535
3536 \pgfusepath{draw}
3537
3538 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3539 \pgfusepath{stroke,fill}
3540 }
3541
3542
3543
3544
3545 %% Memristor
3546
3547 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/memristor/height}}{memristor}{\ctikzvalof{bipoles/memristor/height}}{\ctikzvalof{bipoles/memristor/width}}{
3548 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3549 \divide \pgf@circ@res@step by 14
3550
3551 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3552 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3553
3554 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3555 \pgfpathlineto{\pgfpoint{.72*\pgf@circ@res@left}{0pt}}
3556 \pgfpathlineto{\pgfpoint{.72*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3557 \pgfpathlineto{\pgfpoint{.35*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3558 \pgfpathlineto{\pgfpoint{.35*\pgf@circ@res@left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3559 \pgfpathlineto{\pgfpoint{-.05*\pgf@circ@res@left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3560 \pgfpathlineto{\pgfpoint{-.05*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3561 \pgfpathlineto{\pgfpoint{.42*\pgf@circ@res@right}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}}
3562 \pgfpathlineto{\pgfpoint{.42*\pgf@circ@res@right}{0pt}}
3563 \pgfpathlineto{\pgfpoint{.8*\pgf@circ@res@right}{0pt}}
3564
3565 \pgfusepath{draw}
3566
3567 \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3568 \pgfusepath{stroke,fill}
3569 }
3570
3571
3572
3573
3574 %% Generic empty tunable
3575
3576 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tgeneric/height}}{tgeneric}{\ctikzvalof{bipoles/tgeneric/height}}{\ctikzvalof{bipoles/tgeneric/width}}{
3577 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}}
3578 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3579 \pgfusepath{draw}
3580
3581 \pgfscope
3582 \pgfsetarrowsend{latex'}
3583 \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}}
3584 \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}}
3585 \pgfusepath{draw}
3586 \endpgfscope
3587 }
3588
3589 %% Photoresistor
3590
3591 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/photoresistor/height 2}}{photoresistor}{\ctikzvalof{bipoles/photoresistor/height}}{\ctikzvalof{bipoles/photoresistor/width}}{
3592 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@down}}
3593 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3594 \pgfusepath{draw}
3595
3596 \pgfscope
3597 \pgfsetarrowsend{latex'}
3598 \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}
3599 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{-1.2\pgf@circ@res@down}}
3600 \pgfusepath{draw}
3601 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@right}{\pgf@circ@res@up}}
3602 \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@right}{-1.2\pgf@circ@res@down}}
3603 \pgfusepath{draw}
3604 \endpgfscope
3605 }
3606
3607
3608
3609
3610 %% Thermistor
3611 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistor/height}}{thermistor}{\ctikzvalof{bipoles/thermistor/height}}{\ctikzvalof{bipoles/thermistor/width}}{
3612 \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}}
3613 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3614 \pgfusepath{draw}
3615
3616 %\pgfscope
3617 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}}
3618 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
3619 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3620 \pgfusepath{draw}
3621 %\endpgfscope
3622 }
3623
3624
3625 %% Thermistor PTC
3626 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorptc/height 2}}{thermistorptc}{\ctikzvalof{bipoles/thermistorptc/height}}{\ctikzvalof{bipoles/thermistorptc/width}}{
3627 \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}}
3628 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3629 \pgfusepath{draw}
3630
3631 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3632 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}}
3633 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
3634 \pgfusepath{draw}
3635
3636 \pgfsetlinewidth{\pgfstartlinewidth}
3637 \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$}
3638 \pgfsetarrowsend{latex'}
3639 \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}}
3640 \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3641 \pgfusepath{draw}
3642 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}}
3643 \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3644 \pgfusepath{draw}
3645 }
3646
3647 %% Thermistor NTC
3648 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorntc/height 2}}{thermistorntc}{\ctikzvalof{bipoles/thermistorntc/height}}{\ctikzvalof{bipoles/thermistorntc/width}}{
3649 \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}}
3650 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3651 \pgfusepath{draw}
3652
3653 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
3654 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}}
3655 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
3656 \pgfusepath{draw}
3657
3658 \pgfsetlinewidth{\pgfstartlinewidth}
3659 \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$}
3660 \pgfsetarrowsend{latex'}
3661 \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}}
3662 \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3663 \pgfusepath{draw}
3664 \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}}
3665 \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}}
3666 \pgfusepath{draw}
3667 }
3668
3669 %% thermocouple
3670 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermocouple/height 2}}{thermocouple}{\ctikzvalof{bipoles/thermocouple/height}}{\ctikzvalof{bipoles/thermocouple/width}}{
3671
3672 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
3673 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
3674 \pgfusepath{draw}
3675 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
3676 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3677 \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@down}}
3678 \pgfusepath{draw}
3679 \pgfsetlinewidth{\pgfstartlinewidth}
3680 \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@down}}
3681 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}
3682 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
3683 \pgfusepath{draw}
3684 }
3685
3686 %% Varistor
3687 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varistor/height}}{varistor}{\ctikzvalof{bipoles/varistor/height}}{\ctikzvalof{bipoles/varistor/width}}{
3688 \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}}
3689 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3690 \pgfusepath{draw}
3691
3692 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}}
3693 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
3694 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3695 \pgfusepath{draw}
3696
3697 \pgftext[top,x=.65\pgf@circ@res@left,y=1.2\pgf@circ@res@down]{{\tiny\textsf{U}}}
3698 }
3699
3700
3701
3702 %% Generic full tunable
3703
3704 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tfullgeneric/height}}{tfullgeneric}{\ctikzvalof{bipoles/tfullgeneric/height}}{\ctikzvalof{bipoles/tfullgeneric/width}}{
3705 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
3706 \divide \pgf@circ@res@step by 14
3707
3708 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}}
3709 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3710 \pgfusepath{draw,fill}
3711
3712 \pgfscope
3713 \pgfsetarrowsend{latex'}
3714 \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}}
3715 \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}}
3716 \pgfusepath{draw}
3717 \endpgfscope
3718 }
3719
3720
3721
3722
3723
3724
3725
3726 %% Variable Capacitor
3727
3728 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcapacitor/height}}{vcapacitor}{\ctikzvalof{bipoles/vcapacitor/height}}{\ctikzvalof{bipoles/vcapacitor/width}}{
3729 %\pgf@circ@res@step = \ctikzvalof{bipoles/vcapacitor/width}\pgf@circ@Rlen
3730 \pgf@circ@res@step = \ctikzvalof{bipoles/vcapacitor/capacitor width} \pgf@circ@res@right
3731
3732 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3733 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@up}}
3734 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@down}}
3735
3736 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
3737 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
3738 \pgfusepath{draw}
3739
3740 \pgfscope
3741 \pgfsetarrowsend{latex'}
3742 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3743 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3744 \pgfusepath{draw}
3745 \endpgfscope
3746
3747 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3748 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
3749 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3750 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3751 \pgfsetlinewidth{\pgfstartlinewidth}
3752 \pgfusepath{draw}
3753 }
3754
3755
3756 %% Piezoelectric Element
3757
3758 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piezoelectric/height}}{piezoelectric}{\ctikzvalof{bipoles/piezoelectric/height}}{\ctikzvalof{bipoles/piezoelectric/width}}{
3759 \pgf@circ@res@step = \ctikzvalof{bipoles/piezoelectric/width}\pgf@circ@Rlen
3760 \divide \pgf@circ@res@step by 5
3761
3762 %% Outer markings
3763 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3764 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
3765 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
3766
3767 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
3768 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
3769 \pgfusepath{draw}
3770
3771 %% Inner Box
3772 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3773 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left+4}{\pgf@circ@res@up-1}}{\pgfpoint{\pgf@circ@res@right-4}{\pgf@circ@res@down+1}}
3774 \pgfusepath{draw}
3775
3776 }
3777
3778
3779
3780
3781
3782 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3783 %% Handling of terminals
3784
3785
3786 %% Easily usable styles
3787
3788 \ctikzset{o-o/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=empty}}
3789 \ctikzset{-o/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=empty}}
3790 \ctikzset{o-/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=none}}
3791 \ctikzset{*-o/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=empty}}
3792 \ctikzset{o-*/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=full}}
3793 \ctikzset{d-o/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=empty}}
3794 \ctikzset{o-d/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=diamond}}
3795 \ctikzset{*-/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=none}}
3796 \ctikzset{-*/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=full}}
3797 \ctikzset{d-/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=none}}
3798 \ctikzset{-d/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=diamond}}
3799 \ctikzset{*-*/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=full}}
3800 \ctikzset{d-*/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=full}}
3801 \ctikzset{*-d/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=diamond}}
3802 \ctikzset{d-d/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=diamond}}
3803
3804 \ctikzset{.-/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=none}}
3805 \ctikzset{.-*/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=full}}
3806 \ctikzset{.-o/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=empty}}
3807 \ctikzset{.-d/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=diamond}}
3808 \ctikzset{-./.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
3809 \ctikzset{o-./.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
3810 \ctikzset{*-./.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
3811 \ctikzset{d-./.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
3812 \ctikzset{.-./.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
3813
3814 \tikzset{reversed/.style = {\circuitikzbasekey/bipole/inverted=true}}
3815
3816
3817 %% The output routine
3818
3819 \def\drawpoles{
3820 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{diamond} }
3821 \ifx\pgf@temp\pgf@circ@temp
3822 (\tikztostart) node[diamondpole] {}
3823 \else
3824 \pgfextra{ \def\pgf@temp{empty} }
3825 \ifx\pgf@temp\pgf@circ@temp
3826 (\tikztostart) node[ocirc] {}
3827 \else
3828 \pgfextra{ \def\pgf@temp{full} }
3829 \ifx\pgf@temp\pgf@circ@temp
3830 (\tikztostart) node[circ] {}
3831 \else
3832 \pgfextra{ \def\pgf@temp{rectjoinfill} }
3833 \ifx\pgf@temp\pgf@circ@temp
3834 (\tikztostart) node[rectjoinfill] {}
3835 \else
3836 \fi
3837 \fi
3838 \fi
3839 \fi
3840 \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{diamond} }
3841 \ifx\pgf@temp\pgf@circ@temp
3842 (\tikztotarget) node[diamondpole] {}
3843 \else
3844 \pgfextra{ \def\pgf@temp{empty} }
3845 \ifx\pgf@temp\pgf@circ@temp
3846 (\tikztotarget) node[ocirc] {}
3847 \else
3848 \pgfextra{ \def\pgf@temp{full} }
3849 \ifx\pgf@temp\pgf@circ@temp
3850 (\tikztotarget) node[circ] {}
3851 \else
3852 \pgfextra{ \def\pgf@temp{rectjoinfill} }
3853 \ifx\pgf@temp\pgf@circ@temp
3854 (\tikztotarget) node[rectjoinfill] {}
3855 \else
3856 \fi
3857 \fi
3858 \fi
3859 \fi
3860 }
3861
3862
3863
3864 %% Lamp
3865
3866 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lamp/height}}{lamp}{\ctikzvalof{bipoles/lamp/height}}{\ctikzvalof{bipoles/lamp/width}}{
3867
3868 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3869
3870 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
3871 \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@up}}
3872 \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@down}}
3873 \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@down}}
3874 \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@up}}
3875 \pgfusepath{draw}
3876 }
3877
3878
3879 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tline/height}
3880 }{tline}{\ctikzvalof{bipoles/tline/height}
3881 }{\ctikzvalof{bipoles/tline/width}
3882 }
3883 {
3884 \pgf@circ@res@step=.2\pgf@circ@res@right % half x axis
3885 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3886 \pgfpathellipse{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{0}}
3887 {\pgfpoint{\pgf@circ@res@step}{0}}
3888 {\pgfpoint{0}{-\pgf@circ@res@up}}
3889 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@up}}
3890 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@step}{\pgf@circ@res@up}}
3891 \pgfpatharc{-90}{90}{-\pgf@circ@res@step and -\pgf@circ@res@up}
3892 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@down}}
3893 \pgfusepath{draw}
3894 }
3895
3896
3897
3898
3899 %% SQUID added by Cor Molenaar 5 March 2010
3900
3901 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/squid/height}}{squid}{\ctikzvalof{bipoles/squid/height}}{\ctikzvalof{bipoles/squid/width}}{
3902
3903 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3904
3905 \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
3906 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{1.35*\pgf@circ@res@up}}
3907 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.65*\pgf@circ@res@up}}
3908 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.65*\pgf@circ@res@up}}
3909 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{1.35*\pgf@circ@res@up}}
3910 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{1.35*\pgf@circ@res@down}}
3911 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.65*\pgf@circ@res@down}}
3912 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.65*\pgf@circ@res@down}}
3913 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{1.35*\pgf@circ@res@down}}
3914
3915 \pgfusepath{draw}
3916 }
3917
3918
3919
3920 % Generic barrier added by Cor Molenaar 5 March 2010
3921
3922 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/barrier/height}}{barrier}{\ctikzvalof{bipoles/barrier/height}}{\ctikzvalof{bipoles/barrier/width}}{
3923
3924 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
3925
3926 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@step}}
3927 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@step}}
3928 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@up}}
3929 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@down}}
3930 \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@down}}
3931 \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@up}}
3932
3933 \pgfusepath{draw}
3934 }
3935
3936
3937 % Contributed by Danilo Piazzalunga
3938
3939 \pgfdeclareshape{buffer}
3940 {
3941 \anchor{center}{\pgfpointorigin}
3942 \savedanchor\northwest{%
3943 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/height}\pgf@circ@Rlen
3944 \pgf@y=.5\pgf@y
3945 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/width}\pgf@circ@Rlen
3946 \pgf@x=.5\pgf@x
3947 }
3948 \anchor{south}{
3949 \northwest
3950 \pgf@y=-\pgf@y
3951 }
3952 \savedanchor\left{%
3953 \pgf@y=0pt
3954 }
3955 \anchor{in}{
3956 \northwest
3957 \pgf@y=0pt
3958 }
3959 \anchor{out}{
3960 \northwest
3961 \pgf@y=0pt
3962 \pgf@x=-\pgf@x
3963 }
3964
3965 \backgroundpath{
3966 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
3967
3968
3969 \northwest
3970 \pgf@circ@res@up = \pgf@y
3971 \pgf@circ@res@down = -\pgf@y
3972 \pgf@circ@res@right = -\pgf@x
3973 \pgf@circ@res@left = \pgf@x
3974
3975 \pgfscope
3976 \pgfsetlinewidth{2\pgflinewidth}
3977 \pgftransformxshift{.7\pgf@circ@res@left}
3978 \pgf@circ@res@step=\pgf@circ@res@right
3979 \advance\pgf@circ@res@step by -\pgf@circ@res@left
3980 \pgf@circ@res@step=.7\pgf@circ@res@step
3981
3982 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3983 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
3984 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
3985 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
3986 \pgfusepath{draw}
3987 \endpgfscope
3988
3989 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
3990 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
3991
3992 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
3993 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
3994
3995 \pgfusepath{draw}
3996
3997 }
3998 }
3999
4000
4001
4002
4003
4004 \pgfdeclareshape{plain amp}
4005 {
4006 \anchor{center}{\pgfpointorigin}
4007 \savedanchor\northwest{%
4008 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@circ@Rlen
4009 \pgf@y=.5\pgf@y
4010 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@circ@Rlen
4011 \pgf@x=.5\pgf@x
4012 }
4013 \anchor{south}{
4014 \northwest
4015 \pgf@y=-\pgf@y
4016 }
4017 \savedanchor\left{%
4018 \pgf@y=0pt
4019 }
4020 \savedanchor\inOne{%
4021 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@circ@Rlen
4022 \pgf@y=.5\pgf@y
4023 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@y
4024 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@circ@Rlen
4025 \pgf@x=.5\pgf@x
4026 }
4027 \anchor{-}{
4028 \inOne
4029 }
4030 \anchor{+}{
4031 \inOne
4032 \pgf@y=-\pgf@y
4033 }
4034 \savedanchor\up{%
4035 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@circ@Rlen
4036 \pgf@y=.5\pgf@y
4037 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@circ@Rlen
4038 \pgf@x=.5\pgf@x
4039 \pgf@circ@res@up = \pgf@y
4040 \pgf@circ@res@right = -\pgf@x
4041 \pgf@circ@res@left = \pgf@x
4042 \pgfpointlineattime{
4043 \pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/up pos}}{
4044 \pgfpoint{
4045 \pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
4046 {\pgf@circ@res@up}}
4047 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
4048 }
4049 \anchor{up}{
4050 \up
4051 }
4052 \anchor{down}{
4053 \up
4054 \pgf@y=-\pgf@y
4055 }
4056 \anchor{out}{
4057 \northwest
4058 \pgf@y=0pt
4059 \pgf@x=-\pgf@x
4060 }
4061
4062 \backgroundpath{
4063 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
4064
4065
4066 \northwest
4067 \pgf@circ@res@up = \pgf@y
4068 \pgf@circ@res@down = -\pgf@y
4069 \pgf@circ@res@right = -\pgf@x
4070 \pgf@circ@res@left = \pgf@x
4071
4072 \pgfpathmoveto{\pgfpoint
4073 {\pgf@circ@res@left}
4074 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@up}}
4075 \pgfpathlineto{\pgfpoint
4076 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
4077 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@up}}
4078
4079
4080 \pgfpathmoveto{\pgfpoint
4081 {\pgf@circ@res@left}
4082 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@down}}
4083 \pgfpathlineto{\pgfpoint
4084 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left}
4085 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@down}}
4086
4087 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
4088 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
4089
4090 \pgfusepath{draw}
4091
4092
4093 \pgfscope
4094 \pgfsetlinewidth{2\pgflinewidth}
4095 \pgftransformxshift{.7\pgf@circ@res@left}
4096 \pgf@circ@res@step=\pgf@circ@res@right
4097 \advance\pgf@circ@res@step by -\pgf@circ@res@left
4098 \pgf@circ@res@step=.7\pgf@circ@res@step
4099
4100 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
4101 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
4102 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
4103 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
4104 \pgfusepath{draw}
4105 \endpgfscope
4106
4107
4108
4109 }
4110 }
4111
4112 %% Generic two port box
4113 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/twoport/height}}{twoport}{\ctikzvalof{bipoles/twoport/height}}{\ctikzvalof{bipoles/twoport/width}}{
4114 \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@Rlen
4115 \divide \pgf@circ@res@step by 2
4116
4117 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4118 \pgf@circ@res@other = \pgf@circ@res@left
4119 \advance\pgf@circ@res@other by \pgf@circ@res@step
4120 \ifpgf@circuit@dashed
4121 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4122 \fi
4123 % draw outer box
4124 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4125 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4126 \pgfusepath{draw}
4127
4128 \ifpgf@circuit@inputarrow
4129 {
4130 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4131 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4132 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4133 }
4134 \fi
4135
4136 % rotate inner symbol
4137 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4138 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4139 \pgftransformrotate{270}
4140 \fi\fi
4141 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4142 \pgftransformrotate{180}
4143 \fi\fi
4144 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4145 \pgftransformrotate{90}
4146 \fi\fi
4147
4148 % draw inner symbol
4149 \pgftext[center,x=0,y=0]{\ctikzvalof{bipoles/twoport/text}}
4150
4151 }
4152
4153 %% voltage controled oscillator
4154 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vco/width}}{vco}{\ctikzvalof{bipoles/twoport/width}}{\ctikzvalof{bipoles/vco/width}}{
4155 \pgf@circ@res@step = \ctikzvalof{bipoles/vco/width}\pgf@circ@Rlen
4156 \divide \pgf@circ@res@step by 2
4157
4158 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4159 \pgf@circ@res@other = \pgf@circ@res@left
4160 \advance\pgf@circ@res@other by \pgf@circ@res@step
4161
4162 \ifpgf@circuit@dashed
4163 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4164 \fi
4165 % draw circle
4166 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4167 \pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@step}
4168 \pgfusepath{draw}
4169
4170 \ifpgf@circuit@inputarrow
4171 {
4172 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4173 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4174 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4175 }
4176 \fi
4177
4178 % rotate inner symbol
4179 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4180 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4181 \pgftransformrotate{270}
4182 \fi\fi
4183 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4184 \pgftransformrotate{180}
4185 \fi\fi
4186 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4187 \pgftransformrotate{90}
4188 \fi\fi
4189
4190 % draw inner sine waves
4191 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4192 \pgfsetlinewidth{\pgfstartlinewidth}
4193 \pgfpathmoveto{\pgfpoint{-.5\pgf@circ@res@step}{0\pgf@circ@res@step}}
4194 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4195 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4196 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4197 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4198 \pgfusepath{draw}
4199
4200 }
4201
4202 %% bandpass filter
4203 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/bandpass/width}}{bandpass}{\ctikzvalof{bipoles/bandpass/width}}{\ctikzvalof{bipoles/bandpass/width}}{
4204
4205 \pgf@circ@res@step = \ctikzvalof{bipoles/bandpass/width}\pgf@circ@Rlen
4206 \divide \pgf@circ@res@step by 2
4207
4208 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4209 \pgf@circ@res@other = \pgf@circ@res@left
4210 \advance\pgf@circ@res@other by \pgf@circ@res@step
4211
4212 \ifpgf@circuit@dashed
4213 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4214 \fi
4215
4216 % draw outer box
4217 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4218 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4219 \pgfusepath{draw}
4220
4221 \ifpgf@circuit@inputarrow
4222 {
4223 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4224 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4225 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4226 }
4227 \fi
4228
4229 % rotate inner symbol
4230 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4231 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4232 \pgftransformrotate{270}
4233 \fi\fi
4234 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4235 \pgftransformrotate{180}
4236 \fi\fi
4237 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4238 \pgftransformrotate{90}
4239 \fi\fi
4240
4241 % draw inner symbol
4242 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4243 \pgfsetarrows{-} %never draw arrows
4244 \pgfsetlinewidth{\pgfstartlinewidth}
4245 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
4246 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4247 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4248 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4249 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4250 \pgfusepath{draw}
4251 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{0.35\pgf@circ@res@step}}
4252 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}}
4253 \pgfusepath{draw}
4254
4255 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
4256 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4257 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4258 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4259 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4260 \pgfusepath{draw}
4261
4262 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4263 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4264 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4265 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4266 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4267 \pgfusepath{draw}
4268 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}}
4269 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
4270 \pgfusepath{draw}
4271 }
4272
4273 %% bandstop filter
4274 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/bandstop/width}}{bandstop}{\ctikzvalof{bipoles/bandstop/width}}{\ctikzvalof{bipoles/bandstop/width}}{
4275 \pgf@circ@res@step = \ctikzvalof{bipoles/bandstop/width}\pgf@circ@Rlen
4276 \divide \pgf@circ@res@step by 2
4277
4278 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4279 \pgf@circ@res@other = \pgf@circ@res@left
4280 \advance\pgf@circ@res@other by \pgf@circ@res@step
4281
4282 \ifpgf@circuit@dashed
4283 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4284 \fi
4285
4286 % draw outer box
4287 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4288 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4289 \pgfusepath{draw}
4290
4291 \ifpgf@circuit@inputarrow
4292 {
4293 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4294 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4295 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4296 }
4297 \fi
4298
4299 % rotate inner symbol
4300 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4301 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4302 \pgftransformrotate{270}
4303 \fi\fi
4304 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225% 134 degree, because >= 135 is not possible
4305 \pgftransformrotate{180}
4306 \fi\fi
4307 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4308 \pgftransformrotate{90}
4309 \fi\fi
4310
4311 % draw inner symbol
4312 \pgfsetdash{}{0pt}% always draw solid line for inner symbol
4313 \pgfsetarrows{-}%never draw arrows
4314 \pgfsetlinewidth{\pgfstartlinewidth}
4315 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
4316 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4317 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4318 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4319 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4320 \pgfusepath{draw}
4321
4322 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
4323 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4324 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4325 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4326 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4327 \pgfusepath{draw}
4328 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
4329 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
4330 \pgfusepath{draw}
4331
4332 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4333 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4334 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4335 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4336 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4337 \pgfusepath{draw}
4338 }
4339
4340 %% highpass filter
4341 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/highpass/width}}{highpass}{\ctikzvalof{bipoles/highpass/width}}{\ctikzvalof{bipoles/highpass/width}}{
4342 \pgf@circ@res@step = \ctikzvalof{bipoles/highpass/width}\pgf@circ@Rlen
4343 \divide \pgf@circ@res@step by 2
4344
4345 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4346 \pgf@circ@res@other = \pgf@circ@res@left
4347 \advance\pgf@circ@res@other by \pgf@circ@res@step
4348
4349 \ifpgf@circuit@dashed
4350 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4351 \fi
4352
4353 % draw outer box
4354 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4355 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4356 \pgfusepath{draw}
4357
4358 \ifpgf@circuit@inputarrow
4359 {
4360 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4361 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4362 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4363 }
4364 \fi
4365
4366 % rotate inner symbol
4367 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4368 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4369 \pgftransformrotate{270}
4370 \fi\fi
4371 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4372 \pgftransformrotate{180}
4373 \fi\fi
4374 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4375 \pgftransformrotate{90}
4376 \fi\fi
4377
4378 % draw inner symbol
4379 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4380 \pgfsetarrows{-} %never draw arrows
4381 \pgfsetlinewidth{\pgfstartlinewidth}
4382 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
4383 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4384 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4385 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4386 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4387 \pgfusepath{draw}
4388
4389 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
4390 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4391 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4392 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4393 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4394 \pgfusepath{draw}
4395 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
4396 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
4397 \pgfusepath{draw}
4398
4399 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4400 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4401 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4402 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4403 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4404 \pgfusepath{draw}
4405 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}}
4406 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
4407 \pgfusepath{draw}
4408 }
4409
4410 %% lowpass filter
4411 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lowpass/width}}{lowpass}{\ctikzvalof{bipoles/lowpass/width}}{\ctikzvalof{bipoles/lowpass/width}}{
4412 \pgf@circ@res@step = \ctikzvalof{bipoles/lowpass/width}\pgf@circ@Rlen
4413 \divide \pgf@circ@res@step by 2
4414
4415 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4416 \pgf@circ@res@other = \pgf@circ@res@left
4417 \advance\pgf@circ@res@other by \pgf@circ@res@step
4418
4419 \ifpgf@circuit@dashed
4420 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4421 \fi
4422
4423 % draw outer box
4424 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4425 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4426 \pgfusepath{draw}
4427
4428 \ifpgf@circuit@inputarrow
4429 {
4430 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4431 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4432 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4433 }
4434 \fi
4435
4436 % rotate inner symbol
4437 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4438 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4439 \pgftransformrotate{270}
4440 \fi\fi
4441 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4442 \pgftransformrotate{180}
4443 \fi\fi
4444 \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
4445 \pgftransformrotate{90}
4446 \fi\fi
4447
4448 % draw inner symbol
4449 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4450 \pgfsetarrows{-} %never draw arrows
4451 \pgfsetlinewidth{\pgfstartlinewidth}
4452 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
4453 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4454 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4455 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4456 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4457 \pgfusepath{draw}
4458 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{0.35\pgf@circ@res@step}}
4459 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}}
4460 \pgfusepath{draw}
4461
4462 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
4463 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4464 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4465 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4466 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4467 \pgfusepath{draw}
4468 \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
4469 \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
4470 \pgfusepath{draw}
4471
4472 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4473 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4474 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4475 \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
4476 \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
4477 \pgfusepath{draw}
4478 }
4479
4480 %% ADC
4481 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/adc/width}}{adc}{\ctikzvalof{bipoles/adc/width}}{\ctikzvalof{bipoles/adc/width}}{
4482 \pgf@circ@res@step = \ctikzvalof{bipoles/adc/width}\pgf@circ@Rlen
4483 \divide \pgf@circ@res@step by 2
4484
4485 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4486 \pgf@circ@res@other = \pgf@circ@res@left
4487 \advance\pgf@circ@res@other by \pgf@circ@res@step
4488
4489 \ifpgf@circuit@dashed
4490 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4491 \fi
4492
4493 % draw outer box
4494 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4495 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4496 \pgfusepath{draw}
4497
4498 \ifpgf@circuit@inputarrow
4499 {
4500 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4501 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4502 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4503 }
4504 \fi
4505
4506 % rotate inner symbol
4507 \def\texti{A}
4508 \def\textii{D}
4509 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4510 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4511 \def\texti{D}
4512 \def\textii{A}
4513 \pgftransformrotate{270}
4514 \fi\fi
4515 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4516 \def\texti{D}
4517 \def\textii{A}
4518 \pgftransformrotate{180}
4519 \fi\fi
4520 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4521 \pgftransformrotate{90}
4522 \def\texti{A}
4523 \def\textii{D}
4524 \fi\fi
4525
4526 % draw inner symbol
4527 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4528 \pgfsetarrows{-} %never draw arrows
4529 \pgfsetlinewidth{\pgfstartlinewidth}
4530 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
4531 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
4532 \pgfusepath{draw}
4533
4534 \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}}
4535 \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}}
4536 }
4537
4538 %% DAC
4539 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dac/width}}{dac}{\ctikzvalof{bipoles/dac/width}}{\ctikzvalof{bipoles/dac/width}}{
4540 \pgf@circ@res@step = \ctikzvalof{bipoles/dac/width}\pgf@circ@Rlen
4541 \divide \pgf@circ@res@step by 2
4542
4543 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4544 \pgf@circ@res@other = \pgf@circ@res@left
4545 \advance\pgf@circ@res@other by \pgf@circ@res@step
4546
4547 \ifpgf@circuit@dashed
4548 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4549 \fi
4550
4551 % draw outer box
4552 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4553 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4554 \pgfusepath{draw}
4555
4556 \ifpgf@circuit@inputarrow
4557 {
4558 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4559 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4560 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4561 }
4562 \fi
4563
4564 % rotate inner symbol
4565 \def\texti{D}
4566 \def\textii{A}
4567 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4568 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4569 \def\texti{A}
4570 \def\textii{D}
4571 \pgftransformrotate{270}
4572 \fi\fi
4573 \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
4574 \def\texti{A}
4575 \def\textii{D}
4576 \pgftransformrotate{180}
4577 \fi\fi
4578 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4579 \pgftransformrotate{90}
4580 \def\texti{D}
4581 \def\textii{A}
4582 \fi\fi
4583
4584 % draw inner symbol
4585 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4586 \pgfsetarrows{-} %never draw arrows
4587 \pgfsetlinewidth{\pgfstartlinewidth}
4588 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
4589 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
4590 \pgfusepath{draw}
4591
4592 \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}}
4593 \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}}
4594 }
4595
4596 %% DSP
4597 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dsp/width}}{dsp}{\ctikzvalof{bipoles/dsp/width}}{\ctikzvalof{bipoles/dsp/width}}{
4598 \pgf@circ@res@step = \ctikzvalof{bipoles/dsp/width}\pgf@circ@Rlen
4599 \divide \pgf@circ@res@step by 2
4600
4601 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4602 \pgf@circ@res@other = \pgf@circ@res@left
4603 \advance\pgf@circ@res@other by \pgf@circ@res@step
4604
4605 \ifpgf@circuit@dashed
4606 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4607 \fi
4608
4609 % draw outer box
4610 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4611 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4612 \pgfusepath{draw}
4613
4614 \ifpgf@circuit@inputarrow
4615 {
4616 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4617 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4618 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4619 }
4620 \fi
4621
4622 % rotate inner symbol
4623 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4624 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4625 \pgftransformrotate{270}
4626 \fi\fi
4627 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4628 \pgftransformrotate{180}
4629 \fi\fi
4630 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4631 \pgftransformrotate{90}
4632 \fi\fi
4633
4634 % draw inner symbol
4635 \pgftext[center,x=0,y=0]{\textsf{DSP}}
4636 }
4637
4638 %% FFT
4639 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fft/width}}{fft}{\ctikzvalof{bipoles/fft/width}}{\ctikzvalof{bipoles/fft/width}}{
4640 \pgf@circ@res@step = \ctikzvalof{bipoles/fft/width}\pgf@circ@Rlen
4641 \divide \pgf@circ@res@step by 2
4642
4643 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4644 \pgf@circ@res@other = \pgf@circ@res@left
4645 \advance\pgf@circ@res@other by \pgf@circ@res@step
4646
4647 \ifpgf@circuit@dashed
4648 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4649 \fi
4650
4651 % draw outer box
4652 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4653 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4654 \pgfusepath{draw}
4655
4656 \ifpgf@circuit@inputarrow
4657 {
4658 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4659 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4660 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4661 }
4662 \fi
4663
4664 % rotate inner symbol
4665 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4666 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4667 \pgftransformrotate{270}
4668 \fi\fi
4669 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
4670 \pgftransformrotate{180}
4671 \fi\fi
4672 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4673 \pgftransformrotate{90}
4674 \fi\fi
4675
4676 % draw inner symbol
4677 \pgftext[center,x=0,y=0]{\textsf{FFT}}
4678 }
4679
4680 %% Amplifier
4681 \pgfcircdeclarebipole{}{
4682 \ifpgf@circuit@boxed
4683 \ctikzvalof{bipoles/twoport/width}
4684 \else
4685 \ctikzvalof{bipoles/amp/width}
4686 \fi
4687 }{amp}{
4688 \ifpgf@circuit@boxed
4689 \ctikzvalof{bipoles/twoport/width}
4690 \else
4691 \ctikzvalof{bipoles/amp/width}
4692 \fi
4693 }{
4694 \ifpgf@circuit@boxed
4695 \ctikzvalof{bipoles/twoport/width}
4696 \else
4697 \ctikzvalof{bipoles/amp/width}
4698 \fi
4699 }{
4700 \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@Rlen
4701
4702 \ifpgf@circuit@dashed
4703 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4704 \fi
4705
4706 % draw outer box
4707 \ifpgf@circuit@boxed
4708 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4709 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
4710 \fi
4711
4712 % draw input arrow
4713 \ifpgf@circuit@inputarrow
4714 {
4715 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4716 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4717 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4718 }
4719 \fi
4720
4721 \ifpgf@circuit@boxed
4722 \pgfsetlinewidth{\pgfstartlinewidth}
4723 \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn
4724 \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box
4725 \else
4726 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4727 \fi
4728
4729 \pgfsetarrows{-} %never draw arrows
4730 \pgfsetlinewidth{\pgfstartlinewidth}
4731
4732 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
4733 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
4734 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
4735
4736 \pgfpathclose
4737 \pgfusepath{draw}
4738
4739 % draw inner text
4740 \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
4741 }
4742
4743
4744 %% variable amplifier
4745 \pgfcircdeclarebipole{}{
4746 \ifpgf@circuit@boxed
4747 \ctikzvalof{bipoles/twoport/width}
4748 \else
4749 \ctikzvalof{bipoles/amp/width}
4750 \fi
4751 }{vamp}{
4752 \ifpgf@circuit@boxed
4753 \ctikzvalof{bipoles/twoport/width}
4754 \else
4755 \ctikzvalof{bipoles/amp/width}
4756 \fi
4757 }{
4758 \ifpgf@circuit@boxed
4759 \ctikzvalof{bipoles/twoport/width}
4760 \else
4761 \ctikzvalof{bipoles/amp/width}
4762 \fi
4763 }{
4764 \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@Rlen
4765
4766 \ifpgf@circuit@dashed
4767 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4768 \fi
4769
4770 % draw outer box
4771 \ifpgf@circuit@boxed
4772 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
4773 \fi
4774
4775 % draw input arrow
4776 \ifpgf@circuit@inputarrow
4777 {
4778 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4779 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4780 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4781 }
4782 \fi
4783
4784 \ifpgf@circuit@boxed
4785 \pgfsetlinewidth{\pgfstartlinewidth}
4786 \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn
4787 \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box
4788 \else
4789 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4790 \fi
4791
4792
4793 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4794 \pgfsetarrows{-} %never draw arrows
4795 \pgfsetlinewidth{\pgfstartlinewidth}
4796
4797 \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
4798 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
4799 \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
4800
4801 \pgfpathclose
4802 \pgfusepath{draw}
4803
4804 % draw inner text
4805 \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
4806
4807 % draw arrow
4808 \pgfsetlinewidth{\pgfstartlinewidth}
4809 \pgfsetarrowsend{latex}
4810 \pgfpathmoveto{\pgfpoint{-0.8\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
4811 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@step}{0.6\pgf@circ@res@step}}
4812 \pgfusepath{draw}
4813 }
4814
4815 %% pi attenuator
4816 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piattenuator/width}}{piattenuator}{\ctikzvalof{bipoles/piattenuator/width}}{\ctikzvalof{bipoles/piattenuator/width}}{
4817 \pgf@circ@res@step = \ctikzvalof{bipoles/piattenuator/width}\pgf@circ@Rlen
4818 \divide \pgf@circ@res@step by 2
4819
4820 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4821 \pgf@circ@res@other = \pgf@circ@res@left
4822 \advance\pgf@circ@res@other by \pgf@circ@res@step
4823
4824 \ifpgf@circuit@dashed
4825 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4826 \fi
4827
4828 % draw outer box
4829 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4830 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4831 \pgfusepath{draw}
4832
4833 \ifpgf@circuit@inputarrow
4834 {
4835 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4836 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4837 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4838 }
4839 \fi
4840
4841 % rotate inner symbol
4842 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4843 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4844 \pgftransformrotate{270}
4845 \fi\fi
4846 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4847 \pgftransformrotate{90}
4848 \fi\fi
4849
4850 % draw inner symbol
4851 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4852 \pgfsetarrows{-} %never draw arrows
4853 \pgfsetlinewidth{\pgfstartlinewidth}
4854 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
4855 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4856 \pgfusepath{draw}
4857 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
4858 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4859 \pgfusepath{draw}
4860 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4861 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4862 \pgfusepath{draw}
4863 }
4864
4865 %% variable pi attenuator
4866 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vpiattenuator/width}}{vpiattenuator}{\ctikzvalof{bipoles/vpiattenuator/width}}{\ctikzvalof{bipoles/vpiattenuator/width}}{
4867 \pgf@circ@res@step = \ctikzvalof{bipoles/vpiattenuator/width}\pgf@circ@Rlen
4868 \divide \pgf@circ@res@step by 2
4869
4870 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4871 \pgf@circ@res@other = \pgf@circ@res@left
4872 \advance\pgf@circ@res@other by \pgf@circ@res@step
4873
4874 \ifpgf@circuit@dashed
4875 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4876 \fi
4877
4878 % draw outer box
4879 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4880 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4881 \pgfusepath{draw}
4882
4883 \ifpgf@circuit@inputarrow
4884 {
4885 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4886 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4887 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4888 }
4889 \fi
4890
4891 % rotate inner symbol
4892 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4893 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4894 \pgftransformrotate{270}
4895 \fi\fi
4896 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4897 \pgftransformrotate{90}
4898 \fi\fi
4899
4900 % draw inner symbol
4901 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4902 \pgfsetarrows{-} %never draw arrows
4903 \pgfsetlinewidth{\pgfstartlinewidth}
4904 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
4905 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4906 \pgfusepath{draw}
4907 \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
4908 \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4909 \pgfusepath{draw}
4910 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4911 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4912 \pgfusepath{draw}
4913
4914 \pgfsetarrowsend{latex}
4915 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
4916 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
4917 \pgfusepath{draw}
4918 }
4919
4920 %% T attenuator
4921 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tattenuator/width}}{tattenuator}{\ctikzvalof{bipoles/tattenuator/width}}{\ctikzvalof{bipoles/tattenuator/width}}{
4922 \pgf@circ@res@step = \ctikzvalof{bipoles/tattenuator/width}\pgf@circ@Rlen
4923 \divide \pgf@circ@res@step by 2
4924
4925 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4926 \pgf@circ@res@other = \pgf@circ@res@left
4927 \advance\pgf@circ@res@other by \pgf@circ@res@step
4928
4929 \ifpgf@circuit@dashed
4930 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4931 \fi
4932
4933 % draw outer box
4934 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4935 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4936 \pgfusepath{draw}
4937
4938 \ifpgf@circuit@inputarrow
4939 {
4940 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4941 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4942 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4943 }
4944 \fi
4945
4946 % rotate inner symbol
4947 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4948 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4949 \pgftransformrotate{270}
4950 \fi\fi
4951 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4952 \pgftransformrotate{90}
4953 \fi\fi
4954
4955 % draw inner symbol
4956 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
4957 \pgfsetarrows{-} %never draw arrows
4958 \pgfsetlinewidth{\pgfstartlinewidth}
4959 \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
4960 \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
4961 \pgfusepath{draw}
4962 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
4963 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
4964 \pgfusepath{draw}
4965 }
4966
4967 %% variable T attenuator
4968 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vtattenuator/width}}{vtattenuator}{\ctikzvalof{bipoles/vtattenuator/width}}{\ctikzvalof{bipoles/vtattenuator/width}}{
4969 \pgf@circ@res@step = \ctikzvalof{bipoles/vtattenuator/width}\pgf@circ@Rlen
4970 \divide \pgf@circ@res@step by 2
4971
4972 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
4973 \pgf@circ@res@other = \pgf@circ@res@left
4974 \advance\pgf@circ@res@other by \pgf@circ@res@step
4975
4976 \ifpgf@circuit@dashed
4977 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
4978 \fi
4979
4980 % draw outer box
4981 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
4982 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
4983 \pgfusepath{draw}
4984
4985 \ifpgf@circuit@inputarrow
4986 {
4987 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
4988 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
4989 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
4990 }
4991 \fi
4992
4993 % rotate inner symbol
4994 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
4995 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
4996 \pgftransformrotate{270}
4997 \fi\fi
4998 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
4999 \pgftransformrotate{90}
5000 \fi\fi
5001
5002 % draw inner symbol
5003 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
5004 \pgfsetarrows{-} %never draw arrows
5005 \pgfsetlinewidth{\pgfstartlinewidth}
5006 \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
5007 \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
5008 \pgfusepath{draw}
5009 \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
5010 \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
5011 \pgfusepath{draw}
5012
5013 \pgfsetarrowsend{latex}
5014 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
5015 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
5016 \pgfusepath{draw}
5017 }
5018
5019 %% phase shifter
5020 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{phaseshifter}{\ctikzvalof{bipoles/phaseshifter/width}}{\ctikzvalof{bipoles/phaseshifter/width}}{
5021 \pgf@circ@res@step = \ctikzvalof{bipoles/phaseshifter/width}\pgf@circ@Rlen
5022 \divide \pgf@circ@res@step by 2
5023
5024 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5025 \pgf@circ@res@other = \pgf@circ@res@left
5026 \advance\pgf@circ@res@other by \pgf@circ@res@step
5027
5028 \ifpgf@circuit@dashed
5029 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
5030 \fi
5031
5032 % draw outer box
5033 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5034 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5035 \pgfusepath{draw}
5036
5037 \ifpgf@circuit@inputarrow
5038 {
5039 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
5040 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
5041 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
5042 }
5043 \fi
5044
5045 % rotate inner symbol
5046 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
5047 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
5048 \pgftransformrotate{270}
5049 \fi\fi
5050 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
5051 \pgftransformrotate{180}
5052 \fi\fi
5053 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
5054 \pgftransformrotate{90}
5055 \fi\fi
5056
5057 % inner symbol
5058 \pgftext[center,x=0,y=0]{\Large$\varphi$}
5059 }
5060
5061 %% variable phase shifter
5062 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{vphaseshifter}{\ctikzvalof{bipoles/vphaseshifter/width}}{\ctikzvalof{bipoles/vphaseshifter/width}}{
5063 \pgf@circ@res@step = \ctikzvalof{bipoles/vphaseshifter/width}\pgf@circ@Rlen
5064 \divide \pgf@circ@res@step by 2
5065
5066 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5067 \pgf@circ@res@other = \pgf@circ@res@left
5068 \advance\pgf@circ@res@other by \pgf@circ@res@step
5069
5070 \ifpgf@circuit@dashed
5071 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
5072 \fi
5073
5074 % draw outer box
5075 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5076 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5077 \pgfusepath{draw}
5078
5079 \ifpgf@circuit@inputarrow
5080 {
5081 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
5082 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
5083 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
5084 }
5085 \fi
5086
5087 % rotate inner symbol
5088 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
5089 \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
5090 \pgftransformrotate{270}
5091 \fi\fi
5092 \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
5093 \pgftransformrotate{180}
5094 \fi\fi
5095 \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
5096 \pgftransformrotate{90}
5097 \fi\fi
5098
5099 % inner symbol
5100 \pgftext[center,x=0,y=0]{\Large$\varphi$}
5101
5102 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
5103 \pgfsetlinewidth{\pgfstartlinewidth}
5104 \pgfsetarrowsend{latex}
5105 \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0.65\pgf@circ@res@down}}
5106 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.65\pgf@circ@res@up}}
5107 \pgfusepath{draw}
5108 }
5109
5110 %% detector
5111 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/detector/width}}{detector}{\ctikzvalof{bipoles/detector/width}}{\ctikzvalof{bipoles/detector/width}}{
5112 \pgf@circ@res@step = \ctikzvalof{bipoles/detector/width}\pgf@circ@Rlen
5113 \divide \pgf@circ@res@step by 2
5114
5115 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5116 \pgf@circ@res@other = \pgf@circ@res@left
5117 \advance\pgf@circ@res@other by \pgf@circ@res@step
5118
5119 \ifpgf@circuit@dashed
5120 \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
5121 \fi
5122
5123 % draw outer box
5124 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5125 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5126 \pgfusepath{draw}
5127
5128 \ifpgf@circuit@inputarrow
5129 {
5130 \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
5131 \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
5132 \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
5133 }
5134 \fi
5135
5136 % draw inner stuff
5137 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
5138 \pgfsetarrows{-} %never draw arrows
5139 \pgfsetlinewidth{0.8\pgfstartlinewidth}
5140 \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0}}
5141 \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@right}{0}}
5142 \pgfusepath{draw}
5143
5144 \ifpgf@circuit@fulldiode
5145 \pgfmathparse{2\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/generic/width}}
5146 \pgftransformscale{\pgfmathresult}
5147 \pgfnode{fulldiodeshape}{center}{}{pgf@fulldiode}{\pgfusepath{fill}}
5148 \else
5149 \pgfmathparse{2\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/resistor/width}}
5150 \pgftransformscale{\pgfmathresult}
5151 \pgfnode{emptydiodeshape}{center}{}{pgf@emptydiode}{\pgfusepath{fill}}
5152 \fi
5153
5154 }
5155
5156
5157
5158
5159 %% european gas filled surge arrester
5160
5161 \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}}{
5162
5163 %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
5164 %\divide \pgf@circ@res@step by 14
5165
5166 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5167 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5168
5169 \pgfusepath{draw}
5170
5171 \pgfscope
5172 \pgfsetarrowsend{latex'}
5173 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5174 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/european gas filled surge arrester/inside}\pgf@circ@res@left}{0pt}}
5175 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5176 \pgfusepath{draw}
5177
5178 \endpgfscope
5179 }
5180
5181
5182
5183
5184 %% american gas filled surge arrester
5185
5186 \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}}{
5187 %\def\pgf@circ@temp{right}
5188 %\ifx\tikz@res@label@pos\pgf@circ@temp
5189 % \pgf@circ@res@step=-1.2\pgf@circ@res@up
5190 %\else
5191 % \def\pgf@circ@temp{below}
5192 % \ifx\tikz@res@label@pos\pgf@circ@temp
5193 % \pgf@circ@res@step=-1.2\pgf@circ@res@up
5194 % \else
5195 % \pgf@circ@res@step=1.2\pgf@circ@res@up
5196 % \fi
5197 % \fi
5198
5199 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5200 \pgfpointorigin \pgf@circ@res@other = \pgf@x \advance \pgf@circ@res@other by -\pgf@circ@res@up
5201 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
5202 \pgfusepath{draw}
5203
5204 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5205
5206 \pgfscope
5207 \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
5208 \pgfusepath{draw}
5209 \endpgfscope
5210
5211 \pgfsetlinewidth{\pgfstartlinewidth}
5212
5213
5214 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@zero}}
5215 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
5216 \pgfusepath{draw}
5217
5218 \pgfnode{circle}{center}{}{}{}
5219
5220 \pgfscope
5221 \pgfsetarrowsend{latex}
5222
5223 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
5224 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf@circ@res@right}{\pgf@circ@res@zero}}
5225 \pgfusepath{draw}
5226
5227 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5228 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf@circ@res@left}{\pgf@circ@res@zero}}
5229 \pgfusepath{draw}
5230 \endpgfscope{}
5231
5232 %\pgftransformshift{\pgfpoint{.25\pgf@circ@res@left}{.45\pgf@circ@res@down}}
5233 %\pgfnode{circ}{center}{}{}{}
5234 %\pgftransformshift{}
5235 \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}
5236 \pgfusepath{fill}
5237 }
5238
5239 % % MECHANICAL SYMBOLS
5240
5241 %% mechanical capacitance - stiffness/spring
5242
5243 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/spring/height}}{spring}{\ctikzvalof{bipoles/spring/height}}{\ctikzvalof{bipoles/spring/width}}{
5244 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5245 \pgftransformationadjustments
5246
5247 \pgfmathsetlength{\pgf@circ@res@step}
5248 {(\ctikzvalof{bipoles/spring/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth)/16}
5249
5250 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
5251 \pgfsetcornersarced{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
5252 \pgf@circ@res@other = \pgf@circ@res@left
5253 \advance\pgf@circ@res@other by \pgf@circ@res@step
5254 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
5255 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5256 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
5257 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5258 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
5259 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5260 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
5261 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5262 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
5263 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5264 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
5265 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5266 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
5267 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
5268 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
5269 \advance\pgf@circ@res@other by \pgf@circ@res@step
5270 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
5271 \pgfsetbuttcap
5272 \pgfsetbeveljoin
5273 \pgfusepath{stroke}
5274 }
5275
5276 %% mechanical inductance - mass
5277 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/mass/box height}}{mass}{\ctikzvalof{bipoles/mass/height}}{\ctikzvalof{bipoles/mass/width}}{
5278 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5279 \pgftransformationadjustments
5280 \pgfpathrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
5281 {\pgfpoint{-2\pgf@circ@res@down}{-2\pgf@circ@res@down}}
5282
5283 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5284 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5285 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
5286 \pgfsetrectcap
5287 \pgfsetmiterjoin
5288 \pgfusepath{stroke}
5289 }
5290
5291 %% mechanical resistor - damper
5292 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/damper/height}}{damper}{\ctikzvalof{bipoles/damper/height}}{\ctikzvalof{bipoles/damper/width}}{
5293 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
5294 \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
5295 {\pgf@circ@res@zero}}
5296 \pgfusepath{stroke}
5297
5298 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
5299 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
5300 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5301 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5302 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
5303
5304 \pgfsetrectcap
5305 \pgfsetmiterjoin
5306 \pgfusepath{stroke}
5307
5308 \pgfpathmoveto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
5309 {.8\pgf@circ@res@down}}
5310 \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
5311 {.8\pgf@circ@res@up}}
5312 \pgfsetbuttcap
5313 \pgfusepath{stroke}
5314
5315 }
5316
5317
5318 %%%---------- close: tex/pgfcircbipoles
5319 %%%%%%%%%%% Springe nach tex/pgfcirctripoles
5320 %%%---------- open: tex/pgfcirctripoles.tex
5321 % Copyright 2007-2009 by Massimo Redaelli
5322 %
5323 % This file may be distributed and/or modified
5324 %
5325 % 1. under the LaTeX Project Public License and/or
5326 % 2. under the GNU Public License.
5327 %
5328 % See the file doc/LICENSE for more details.
5329
5330 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5331 %% Tripoles
5332
5333
5334
5335 \pgfdeclareshape{spdt}
5336 {
5337 \savedanchor\northwest{%
5338 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/height}\pgf@circ@Rlen
5339 \pgf@y=.5\pgf@y
5340 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/width}\pgf@circ@Rlen
5341 \pgf@x=.5\pgf@x
5342 }
5343 \anchor{left}{%
5344 \northwest
5345 \pgf@y=0pt
5346 }
5347 \anchor{in}{
5348 \northwest
5349 \pgf@y=0pt
5350 }
5351 \anchor{out 1}{
5352 \northwest
5353 \pgf@x=-\pgf@x
5354 }
5355 \anchor{out 2}{
5356 \northwest
5357 \pgf@x=-\pgf@x
5358 \pgf@y=-\pgf@y
5359 }
5360 \anchor{center}{
5361 \pgf@y=0pt
5362 \pgf@x=0pt
5363 }
5364 \anchor{east}{
5365 \northwest
5366 \pgf@y=0pt
5367 \pgf@x=-\pgf@x
5368 }
5369 \anchor{west}{
5370 \northwest
5371 \pgf@y=0pt
5372 }
5373 \anchor{south}{
5374 \northwest
5375 \pgf@x=0pt
5376 \pgf@y=-\pgf@y
5377 }
5378 \anchor{north}{
5379 \northwest
5380 \pgf@x=0pt
5381 }
5382 \anchor{south west}{
5383 \northwest
5384 \pgf@y=-\pgf@y
5385 }
5386 \anchor{north east}{
5387 \northwest
5388 \pgf@x=-\pgf@x
5389 }
5390 \anchor{north west}{
5391 \northwest
5392 }
5393 \anchor{south east}{
5394 \northwest
5395 \pgf@x=-\pgf@x
5396 \pgf@y=-\pgf@y
5397 }
5398 \backgroundpath{
5399 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5400
5401
5402 \northwest
5403 \pgf@circ@res@up = \pgf@y
5404 \pgf@circ@res@down = -\pgf@y
5405 \pgf@circ@res@right = -\pgf@x
5406 \pgf@circ@res@left = \pgf@x
5407 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/margin}\pgf@circ@res@left
5408
5409
5410 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
5411 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5412 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
5413 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5414
5415 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5416 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}}
5417
5418 \pgfusepath{draw}
5419
5420 \pgfscope
5421 \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5422 \pgfnode{ocirc}{center}{}{spdt1}{\pgfusepath{stroke}}
5423 \endpgfscope
5424 \pgfscope
5425 \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5426 \pgfnode{ocirc}{center}{}{}{\pgfusepath{stroke}}
5427 \endpgfscope
5428 \pgfscope
5429 \pgftransformshift{\pgfpoint{\pgf@circ@res@other}{0pt}}
5430 \pgfnode{ocirc}{center}{}{spdt2}{\pgfusepath{stroke}}
5431 \endpgfscope
5432
5433
5434 \pgfscope
5435 \pgfpathmoveto{\pgfpointshapeborder{spdt2}{\pgfpointorigin}}
5436 \pgfpathlineto{
5437 \pgfpointadd{\pgfpointshapeborder{spdt1}{\pgfpoint{-\pgf@circ@res@other}{-100pt}}}
5438 {\pgfpoint{-.05\pgf@circ@res@up}{-.05\pgf@circ@res@up}}
5439 }
5440 \pgfsetlinewidth{2\pgflinewidth}
5441 \pgfusepath{draw}
5442 \endpgfscope
5443 }
5444 }
5445
5446
5447
5448 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5449 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5450 %%
5451 %% Logic ports
5452 %%
5453
5454
5455
5456
5457
5458
5459 \long\def\pgfcircdeclarelogicport#1#2{
5460 \pgfdeclareshape{american #1 port}
5461 {
5462 \savedanchor\northwest{%
5463 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@circ@Rlen
5464 \pgf@y=.5\pgf@y
5465 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@circ@Rlen
5466 \pgf@x=.5\pgf@x
5467 }
5468 \savedanchor\left{%
5469 \pgf@y=0pt
5470 }
5471 \savedanchor\inOne{%
5472 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@circ@Rlen
5473 \pgf@y=.5\pgf@y
5474 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/input height}\pgf@y
5475 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@circ@Rlen
5476 \pgf@x=.5\pgf@x
5477 }
5478 \anchor{in 1}{
5479 \inOne
5480 }
5481 \anchor{in}{
5482 \inOne
5483 }
5484 \anchor{in 2}{
5485 \inOne
5486 \pgf@y=-\pgf@y
5487 }
5488 \anchor{out}{
5489 \northwest
5490 \pgf@y=0pt
5491 \pgf@x=-\pgf@x
5492 }
5493 \anchor{center}{
5494 \northwest
5495 \pgf@y=0pt
5496 \pgf@x=-.8\pgf@x
5497 }
5498 \anchor{east}{
5499 \left
5500 \pgf@x=-.8\pgf@x
5501 }
5502 \anchor{west}{
5503 \left
5504 }
5505 \anchor{south}{
5506 \northwest
5507 \pgf@x=0pt
5508 \pgf@y=-\pgf@y
5509 }
5510 \anchor{north}{
5511 \northwest
5512 \pgf@x=0pt
5513 }
5514 \anchor{south west}{
5515 \northwest
5516 \pgf@y=-\pgf@y
5517 }
5518 \anchor{north east}{
5519 \northwest
5520 \pgf@x=-\pgf@x
5521 }
5522 \anchor{north west}{
5523 \northwest
5524 }
5525 \anchor{south east}{
5526 \northwest
5527 \pgf@x=-\pgf@x
5528 \pgf@y=-\pgf@y
5529 }
5530 \backgroundpath{
5531 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5532
5533
5534 \northwest
5535 \pgf@circ@res@up = \pgf@y
5536 \pgf@circ@res@down = -\pgf@y
5537 \pgf@circ@res@right = -\pgf@x
5538 \pgf@circ@res@left = \pgf@x
5539
5540 #2
5541
5542 }
5543 }
5544 }
5545
5546
5547 \pgfcircdeclarelogicport{and}{
5548 \pgfpathmoveto{\pgfpoint
5549 {\pgf@circ@res@left}
5550 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@up}}
5551 \pgfpathlineto{\pgfpoint
5552 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5553 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@up}}
5554
5555 \pgfpathmoveto{\pgfpoint
5556 {\pgf@circ@res@left}
5557 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@down}}
5558 \pgfpathlineto{\pgfpoint
5559 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5560 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf@circ@res@down}}
5561
5562 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5563 \pgfpathlineto{\pgfpoint
5564 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5565 {0pt}}
5566
5567 \pgfusepath{draw}
5568
5569 \pgfsetlinewidth{2\pgflinewidth}
5570 \pgfpathmoveto{\pgfpoint
5571 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5572 {\pgf@circ@res@up}}
5573 \pgfpathlineto{\pgfpoint
5574 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5575 {\pgf@circ@res@down}}
5576 \pgfpathcurveto
5577 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@down}}
5578 {\pgfpoint
5579 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5580 {.5\pgf@circ@res@down}}
5581 {\pgfpoint
5582 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5583 {0pt}}
5584 \pgfpathcurveto
5585 {\pgfpoint
5586 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right}
5587 {.5\pgf@circ@res@up}}
5588 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@up}}
5589 {\pgfpoint
5590 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left}
5591 {\pgf@circ@res@up}}
5592 \pgfusepath{draw}
5593 }
5594
5595
5596
5597 \pgfcircdeclarelogicport{nand}{
5598 \pgfpathmoveto{\pgfpoint
5599 {\pgf@circ@res@left}
5600 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@up}}
5601 \pgfpathlineto{\pgfpoint
5602 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
5603 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@up}}
5604
5605 \pgfpathmoveto{\pgfpoint
5606 {\pgf@circ@res@left}
5607 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@down}}
5608 \pgfpathlineto{\pgfpoint
5609 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
5610 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf@circ@res@down}}
5611
5612 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5613 \pgfpathlineto{\pgfpoint
5614 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right}
5615 {0pt}}
5616
5617 \pgfusepath{draw}
5618
5619 \pgfsetlinewidth{2\pgflinewidth}
5620
5621 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf@circ@res@right
5622 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right
5623
5624 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5625 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5626 \pgfpathcurveto
5627 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@down}}
5628 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{.5\pgf@circ@res@down}}
5629 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5630 \pgfpathcurveto
5631 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{.5\pgf@circ@res@up}}
5632 {\pgfpoint{.0\pgf@circ@res@left}{\pgf@circ@res@up}}
5633 {\pgfpoint
5634 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}
5635 {\pgf@circ@res@up}}
5636 \pgfpathellipse
5637 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5638 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5639 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5640
5641 \pgfusepath{draw}
5642 }
5643
5644
5645 \pgfcircdeclarelogicport{nor}{
5646 \pgfpathmoveto{\pgfpoint
5647 {\pgf@circ@res@left}
5648 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@up}}
5649 \pgfpathlineto{\pgfpoint
5650 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf@circ@res@left}
5651 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@up}}
5652
5653 \pgfpathmoveto{\pgfpoint
5654 {\pgf@circ@res@left}
5655 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@down}}
5656 \pgfpathlineto{\pgfpoint
5657 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf@circ@res@left}
5658 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf@circ@res@down}}
5659
5660 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5661 \pgfpathlineto{\pgfpoint
5662 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf@circ@res@right}
5663 {0pt}}
5664
5665 \pgfusepath{draw}
5666
5667 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf@circ@res@right
5668 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf@circ@res@right
5669
5670 \pgfsetlinewidth{2\pgflinewidth}
5671 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5672 \pgfpathcurveto
5673 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5674 {\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}}
5675 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf@circ@res@left}{0pt}}
5676 \pgfpathcurveto
5677 {\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}}
5678 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5679 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5680
5681 \pgfpathcurveto
5682 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5683 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf@circ@res@down}}
5684 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5685 \pgfpathcurveto
5686 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf@circ@res@up}}
5687 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5688 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5689
5690 \pgfpathellipse
5691 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5692 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5693 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5694
5695 \pgfusepath{draw}
5696 }
5697
5698
5699
5700
5701 \pgfcircdeclarelogicport{or}{
5702
5703
5704 \pgfpathmoveto{\pgfpoint
5705 {\pgf@circ@res@left}
5706 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@up}}
5707 \pgfpathlineto{\pgfpoint
5708 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf@circ@res@left}
5709 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@up}}
5710
5711 \pgfpathmoveto{\pgfpoint
5712 {\pgf@circ@res@left}
5713 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@down}}
5714 \pgfpathlineto{\pgfpoint
5715 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf@circ@res@left}
5716 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@down}}
5717
5718 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5719 \pgfpathlineto{\pgfpoint
5720 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right}
5721 {0pt}}
5722
5723 \pgfusepath{draw}
5724 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right
5725 \pgfsetlinewidth{2\pgflinewidth}
5726 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5727 \pgfpathcurveto
5728 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5729 {\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}}
5730 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf@circ@res@left}{0pt}}
5731 \pgfpathcurveto
5732 {\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}}
5733 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5734 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5735
5736 \pgfpathcurveto
5737 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5738 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@down}}
5739 {\pgfpoint{\pgf@circ@res@other}{0pt}}
5740 \pgfpathcurveto
5741 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@up}}
5742 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5743 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5744 \pgfusepath{draw}
5745 }
5746
5747
5748 \pgfcircdeclarelogicport{xor}{
5749
5750 \pgfpathmoveto{\pgfpoint
5751 {\pgf@circ@res@left}
5752 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@up}}
5753 \pgfpathlineto{\pgfpoint
5754 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf@circ@res@left}
5755 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@up}}
5756
5757 \pgfpathmoveto{\pgfpoint
5758 {\pgf@circ@res@left}
5759 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@down}}
5760 \pgfpathlineto{\pgfpoint
5761 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf@circ@res@left}
5762 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf@circ@res@down}}
5763
5764 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5765 \pgfpathlineto{\pgfpoint
5766 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf@circ@res@right}
5767 {0pt}}
5768
5769 \pgfusepath{draw}
5770 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf@circ@res@right
5771 \pgfsetlinewidth{2\pgflinewidth}
5772 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5773 \pgfpathcurveto
5774 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5775 {\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}}
5776 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{0pt}}
5777 \pgfpathcurveto
5778 {\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}}
5779 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5780 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5781
5782 \pgfpathcurveto
5783 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5784 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@down}}
5785 {\pgfpoint{\pgf@circ@res@other}{0pt}}
5786 \pgfpathcurveto
5787 {\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf@circ@res@up}}
5788 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5789 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5790
5791 \def\pgf@circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/distance}\pgf@circ@res@right+}
5792 \pgfpathmoveto{\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{\pgf@circ@res@up}}
5793
5794 \pgfpathcurveto
5795 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@up}}
5796 {\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}}
5797 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf@circ@res@left}{0pt}}
5798 \pgfpathcurveto
5799 {\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}}
5800 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@down}}
5801 {\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{.95*\pgf@circ@res@down}}
5802
5803 \pgfusepath{draw}
5804 }
5805
5806
5807
5808 \pgfcircdeclarelogicport{xnor}{
5809
5810 \pgfpathmoveto{\pgfpoint
5811 {\pgf@circ@res@left}
5812 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@up}}
5813 \pgfpathlineto{\pgfpoint
5814 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf@circ@res@left}
5815 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@up}}
5816
5817 \pgfpathmoveto{\pgfpoint
5818 {\pgf@circ@res@left}
5819 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@down}}
5820 \pgfpathlineto{\pgfpoint
5821 {(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf@circ@res@left}
5822 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf@circ@res@down}}
5823
5824 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5825 \pgfpathlineto{\pgfpoint
5826 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf@circ@res@right}
5827 {0pt}}
5828
5829 \pgfusepath{draw}
5830 \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf@circ@res@right
5831 \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/circle width}\pgf@circ@res@right
5832
5833 \pgfsetlinewidth{2\pgflinewidth}
5834 \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5835 \pgfpathcurveto
5836 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
5837 {\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}}
5838 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{0pt}}
5839 \pgfpathcurveto
5840 {\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}}
5841 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
5842 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
5843
5844 \pgfpathcurveto
5845 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
5846 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@down}}
5847 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{0pt}}
5848 \pgfpathcurveto
5849 {\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf@circ@res@up}}
5850 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
5851 {\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
5852
5853 \def\pgf@circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/distance}\pgf@circ@res@right+}
5854 \pgfpathmoveto{\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{\pgf@circ@res@up}}
5855
5856 \pgfpathcurveto
5857 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@up}}
5858 {\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}}
5859 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf@circ@res@left}{0pt}}
5860 \pgfpathcurveto
5861 {\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}}
5862 {\pgfpoint{\pgf@circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf@circ@res@left}{.95*\pgf@circ@res@down}}
5863 {\pgfpoint{\pgf@circ@temp-\pgf@circ@res@other}{.95*\pgf@circ@res@down}}
5864
5865
5866 \pgfpathellipse
5867 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@step}{0pt}}
5868 {\pgfpoint{.5\pgf@circ@res@step}{0pt}}
5869 {\pgfpoint{0pt}{.5\pgf@circ@res@step}}
5870
5871 \pgfusepath{draw}
5872 }
5873
5874
5875 \pgfdeclareshape{american not port}
5876 {
5877 \anchor{center}{\pgfpointorigin}
5878 \savedanchor\northwest{%
5879 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@circ@Rlen
5880 \pgf@y=.5\pgf@y
5881 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@circ@Rlen
5882 \pgf@x=.5\pgf@x
5883 }
5884 \savedanchor\left{%
5885 \pgf@y=0pt
5886 }
5887 \anchor{in}{
5888 \northwest
5889 \pgf@y=0pt
5890 }
5891 \anchor{out}{
5892 \northwest
5893 \pgf@y=0pt
5894 \pgf@x=-\pgf@x
5895 }
5896 \anchor{center}{
5897 \pgfpointorigin
5898 }
5899 \anchor{east}{
5900 \left
5901 \pgf@x=-.8\pgf@x
5902 }
5903 \anchor{west}{
5904 \left
5905 }
5906 \anchor{south}{
5907 \northwest
5908 \pgf@x=0pt
5909 \pgf@y=-\pgf@y
5910 }
5911 \anchor{north}{
5912 \northwest
5913 \pgf@x=0pt
5914 }
5915 \anchor{south west}{
5916 \northwest
5917 \pgf@y=-\pgf@y
5918 }
5919 \anchor{north east}{
5920 \northwest
5921 \pgf@x=-\pgf@x
5922 }
5923 \anchor{north west}{
5924 \northwest
5925 }
5926 \anchor{south east}{
5927 \northwest
5928 \pgf@x=-\pgf@x
5929 \pgf@y=-\pgf@y
5930 }
5931 \backgroundpath{
5932 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
5933
5934
5935 \northwest
5936 \pgf@circ@res@up = \pgf@y
5937 \pgf@circ@res@down = -\pgf@y
5938 \pgf@circ@res@right = -\pgf@x
5939 \pgf@circ@res@left = \pgf@x
5940
5941 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right
5942
5943 \pgfscope
5944 \pgfsetlinewidth{2\pgflinewidth}
5945 \pgftransformxshift{.7\pgf@circ@res@left}
5946 \pgf@circ@res@step=\pgf@circ@res@right
5947 \advance\pgf@circ@res@step by -\pgf@circ@res@left
5948 \pgf@circ@res@step=.7\pgf@circ@res@step
5949
5950 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5951 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
5952 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
5953 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
5954 \pgfusepath{draw}
5955 \pgfpathellipse
5956 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@other}{0pt}}
5957 {\pgfpoint{.5\pgf@circ@res@other}{0pt}}
5958 {\pgfpoint{0pt}{.5\pgf@circ@res@other}}
5959 \pgfusepath{draw}
5960 \endpgfscope
5961
5962 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
5963 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
5964
5965 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
5966 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
5967
5968 \pgfusepath{draw}
5969
5970 }
5971 }
5972
5973 \pgfdeclareshape{invschmitt}
5974 {
5975 \anchor{center}{\pgfpointorigin}
5976 \savedanchor\northwest{%
5977 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@circ@Rlen
5978 \pgf@y=.5\pgf@y
5979 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@circ@Rlen
5980 \pgf@x=.5\pgf@x
5981 }
5982 \savedanchor\left{%
5983 \pgf@y=0pt
5984 }
5985 \anchor{in}{
5986 \northwest
5987 \pgf@y=0pt
5988 }
5989 \anchor{out}{
5990 \northwest
5991 \pgf@y=0pt
5992 \pgf@x=-\pgf@x
5993 }
5994 \anchor{center}{
5995 \pgfpointorigin
5996 }
5997 \anchor{east}{
5998 \left
5999 \pgf@x=-.8\pgf@x
6000 }
6001 \anchor{west}{
6002 \left
6003 }
6004 \anchor{south}{
6005 \northwest
6006 \pgf@x=0pt
6007 \pgf@y=-\pgf@y
6008 }
6009 \anchor{north}{
6010 \northwest
6011 \pgf@x=0pt
6012 }
6013 \anchor{south west}{
6014 \northwest
6015 \pgf@y=-\pgf@y
6016 }
6017 \anchor{north east}{
6018 \northwest
6019 \pgf@x=-\pgf@x
6020 }
6021 \anchor{north west}{
6022 \northwest
6023 }
6024 \anchor{south east}{
6025 \northwest
6026 \pgf@x=-\pgf@x
6027 \pgf@y=-\pgf@y
6028 }
6029 \backgroundpath{
6030 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
6031
6032
6033 \northwest
6034 \pgf@circ@res@up = \pgf@y
6035 \pgf@circ@res@down = -\pgf@y
6036 \pgf@circ@res@right = -\pgf@x
6037 \pgf@circ@res@left = \pgf@x
6038
6039 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right
6040
6041 \pgfscope
6042 \pgfsetlinewidth{2\pgflinewidth}
6043 \pgftransformxshift{.7\pgf@circ@res@left}
6044 \pgf@circ@res@step=\pgf@circ@res@right
6045 \advance\pgf@circ@res@step by -\pgf@circ@res@left
6046 \pgf@circ@res@step=.7\pgf@circ@res@step
6047
6048 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
6049 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
6050 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
6051 \pgfpathclose
6052 \pgfusepath{draw}
6053 \pgfpathellipse
6054 {\pgfpoint{\pgf@circ@[email protected]\pgf@circ@res@other}{0pt}}
6055 {\pgfpoint{.5\pgf@circ@res@other}{0pt}}
6056 {\pgfpoint{0pt}{.5\pgf@circ@res@other}}
6057 \pgfsetfillcolor{white}
6058 \pgfusepath{draw,fill}
6059 \endpgfscope
6060
6061 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
6062 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
6063
6064 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6065 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
6066 \pgfusepath{draw}
6067 %draw inner shape
6068
6069 \pgfsetlinewidth{2\pgflinewidth}
6070
6071 \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{.3\pgf@circ@res@down}}
6072 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
6073 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@up}}
6074 \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@left}{.3\pgf@circ@res@up}}
6075 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
6076 \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@down}}
6077 \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@up}}
6078 \pgfusepath{draw}
6079
6080 }
6081 }
6082
6083 \pgfdeclareshape{schmitt}
6084 {
6085 \anchor{center}{\pgfpointorigin}
6086 \savedanchor\northwest{%
6087 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@circ@Rlen
6088 \pgf@y=.5\pgf@y
6089 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@circ@Rlen
6090 \pgf@x=.5\pgf@x
6091 }
6092 \savedanchor\left{%
6093 \pgf@y=0pt
6094 }
6095 \anchor{in}{
6096 \northwest
6097 \pgf@y=0pt
6098 }
6099 \anchor{out}{
6100 \northwest
6101 \pgf@y=0pt
6102 \pgf@x=-\pgf@x
6103 }
6104 \anchor{center}{
6105 \pgfpointorigin
6106 }
6107 \anchor{east}{
6108 \left
6109 \pgf@x=-.8\pgf@x
6110 }
6111 \anchor{west}{
6112 \left
6113 }
6114 \anchor{south}{
6115 \northwest
6116 \pgf@x=0pt
6117 \pgf@y=-\pgf@y
6118 }
6119 \anchor{north}{
6120 \northwest
6121 \pgf@x=0pt
6122 }
6123 \anchor{south west}{
6124 \northwest
6125 \pgf@y=-\pgf@y
6126 }
6127 \anchor{north east}{
6128 \northwest
6129 \pgf@x=-\pgf@x
6130 }
6131 \anchor{north west}{
6132 \northwest
6133 }
6134 \anchor{south east}{
6135 \northwest
6136 \pgf@x=-\pgf@x
6137 \pgf@y=-\pgf@y
6138 }
6139 \backgroundpath{
6140 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
6141
6142
6143 \northwest
6144 \pgf@circ@res@up = \pgf@y
6145 \pgf@circ@res@down = -\pgf@y
6146 \pgf@circ@res@right = -\pgf@x
6147 \pgf@circ@res@left = \pgf@x
6148
6149 \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right
6150
6151 \pgfscope
6152 \pgfsetlinewidth{2\pgflinewidth}
6153 \pgftransformxshift{.7\pgf@circ@res@left}
6154 \pgf@circ@res@step=\pgf@circ@res@right
6155 \advance\pgf@circ@res@step by -\pgf@circ@res@left
6156 \pgf@circ@res@step=.7\pgf@circ@res@step
6157
6158 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
6159 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
6160 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
6161 \pgfpathclose
6162 \pgfusepath{draw}
6163 \endpgfscope
6164
6165 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
6166 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
6167
6168 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6169 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right-\pgf@circ@res@other}{0pt}}
6170 \pgfusepath{draw}
6171 %draw inner shape
6172
6173 \pgfsetlinewidth{2\pgflinewidth}
6174
6175 \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{.3\pgf@circ@res@down}}
6176 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
6177 \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@up}}
6178 \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@left}{.3\pgf@circ@res@up}}
6179 \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
6180 \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@down}}
6181 \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@up}}
6182 \pgfusepath{draw}
6183
6184 }
6185 }
6186
6187
6188
6189 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6190
6191 % #1 - name
6192 % #2 - text inside
6193 % #3 - number of inputs
6194 % #4 - is it a not
6195
6196 \long\def\pgfcircdeclareeurologicport#1#2#3#4{
6197 \pgfdeclareshape{european #1 port}
6198 {
6199 \savedanchor\northwest{%
6200 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@circ@Rlen
6201 \pgf@y=.5\pgf@y
6202 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@circ@Rlen
6203 \pgf@x=.5\pgf@x
6204 }
6205 \savedanchor\left{%
6206 \pgf@y=0pt
6207 }
6208 \savedanchor\inOne{%
6209 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@circ@Rlen
6210 \pgf@y=.5\pgf@y
6211 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@y
6212 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@circ@Rlen
6213 \pgf@x=.5\pgf@x
6214 }
6215 \anchor{in}{
6216 \inOne
6217 }
6218 \anchor{in 1}{
6219 \inOne
6220 }
6221 \anchor{in 2}{
6222 \inOne
6223 \pgf@y=-\pgf@y
6224 }
6225 \anchor{out}{
6226 \northwest
6227 \pgf@y=0pt
6228 \pgf@x=-\pgf@x
6229 }
6230 \anchor{center}{
6231 \northwest
6232 \pgf@y=0pt
6233 \pgf@x=-.8\pgf@x
6234 }
6235 \anchor{east}{
6236 \left
6237 \pgf@x=-.8\pgf@x
6238 }
6239 \anchor{west}{
6240 \left
6241 }
6242 \anchor{south}{
6243 \northwest
6244 \pgf@x=0pt
6245 \pgf@y=-\pgf@y
6246 }
6247 \anchor{north}{
6248 \northwest
6249 \pgf@x=0pt
6250 }
6251 \anchor{south west}{
6252 \northwest
6253 \pgf@y=-\pgf@y
6254 }
6255 \anchor{north east}{
6256 \northwest
6257 \pgf@x=-\pgf@x
6258 }
6259 \anchor{north west}{
6260 \northwest
6261 }
6262 \anchor{south east}{
6263 \northwest
6264 \pgf@x=-\pgf@x
6265 \pgf@y=-\pgf@y
6266 }
6267 \backgroundpath{
6268 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
6269 \northwest
6270 \pgf@circ@res@up = \pgf@y
6271 \pgf@circ@res@down = -\pgf@y
6272 \pgf@circ@res@right = -\pgf@x
6273 \pgf@circ@res@left = \pgf@x
6274 \def\pgf@temp{1}
6275 \def\pgf@circ@temp{#3}
6276 \ifx\pgftemp\pgf@circ@temp % one input
6277 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
6278 \pgfpathlineto{
6279 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}{0pt}}
6280 \else % two inputs
6281 \pgfpathmoveto{
6282 \pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@up}}
6283 \pgfpathlineto{
6284 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}
6285 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@up}}
6286 %
6287 \pgfpathmoveto{
6288 \pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@down}}
6289 \pgfpathlineto{
6290 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}
6291 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@circ@res@down}}
6292 \fi%
6293 %
6294 %
6295 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6296 \pgfpathlineto{
6297 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{0pt}}
6298 %
6299 \edef\pgf@temp{not}
6300 \edef\pgf@circ@temp{#4}
6301 \ifx\pgf@temp\pgf@circ@temp % is a not
6302 \pgfpathmoveto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not width}\pgf@circ@res@right}{0pt}}
6303 \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}}
6304 \fi
6305 %
6306 \pgfusepath{draw}
6307 %
6308 \pgfpathmoveto{\pgfpointorigin}
6309 \pgftext{#2}
6310 %
6311 %
6312 %
6313 \pgfsetlinewidth{2\pgflinewidth}
6314 \pgfpathrectanglecorners
6315 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}{\pgf@circ@res@up}}
6316 {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{\pgf@circ@res@down}}
6317 \pgfusepath{draw}
6318 %
6319 %
6320 }
6321 }
6322 }
6323
6324
6325
6326 \pgfcircdeclareeurologicport{and}{$\&$}{2}{}
6327 \pgfcircdeclareeurologicport{or}{$\ge 1$}{2}{}
6328 \pgfcircdeclareeurologicport{xor}{$=1$}{2}{}
6329 \pgfcircdeclareeurologicport{not}{$1$}{1}{not}
6330 \pgfcircdeclareeurologicport{nand}{$\&$}{2}{not}
6331 \pgfcircdeclareeurologicport{nor}{$\ge 1$}{2}{not}
6332 \pgfcircdeclareeurologicport{xnor}{$=1$}{2}{not}
6333
6334 \long\def\pgfcircdeclaretransistor#1#2#3{
6335 \pgfdeclareshape{#1}
6336 {
6337 \anchor{center}{
6338 \pgfpointorigin
6339 }
6340 \savedanchor\northeast{% upper right
6341 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@circ@Rlen
6342 \pgf@y=.5\pgf@y
6343 \pgf@x=0pt
6344 }
6345 \savedanchor\left{%center left
6346 \pgf@y=0pt
6347 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@circ@Rlen
6348 }
6349 \anchor{text}{
6350 \northeast
6351 \pgf@y=.7\pgf@y
6352 \pgf@x= \pgf@circ@Rlen
6353 \pgf@x=0.1\pgf@x
6354 }
6355 \anchor{pathstart}{ % south
6356 \northeast
6357 \pgf@y=-\pgf@y
6358 }
6359 \anchor{pathend}{
6360 \northeast
6361 }
6362 \anchor{north}{
6363 \northeast
6364 \pgf@circ@res@step=\pgf@y
6365 \left
6366 \pgf@y=\pgf@circ@res@step
6367 \pgf@x=.5\pgf@x
6368 }
6369 \anchor{west}{
6370 \left
6371 }
6372 \anchor{east}{
6373 \northeast
6374 \pgf@y=0pt
6375 }
6376 \anchor{south}{
6377 \northeast
6378 \pgf@circ@res@step=\pgf@y
6379 \left
6380 \pgf@y=-\pgf@circ@res@step
6381 \pgf@x=.5\pgf@x
6382 }
6383 \anchor{south west}{
6384 \northeast
6385 \pgf@circ@res@step=\pgf@y
6386 \left
6387 \pgf@y=-\pgf@circ@res@step
6388 }
6389 \anchor{north east}{
6390 \northeast
6391 }
6392 \anchor{north west}{
6393 \northeast
6394 \pgf@circ@res@step=\pgf@y
6395 \left
6396 \pgf@y=\pgf@circ@res@step
6397 }
6398 \anchor{south east}{
6399 \northeast
6400 \pgf@y=-\pgf@y
6401 }
6402 \anchor{B}{
6403 \northeast
6404 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6405 \left
6406 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6407 }
6408 \anchor{base}{
6409 \northeast
6410 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6411 \left
6412 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6413 }
6414 \anchor{G}{
6415 \northeast
6416 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6417 \left
6418 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6419 }
6420 \anchor{gate}{
6421 \northeast
6422 \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
6423 \left
6424 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
6425 }
6426 \anchor{nobase}{
6427 \left
6428 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@x
6429 }
6430 \anchor{nogate}{
6431 \left
6432 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@x
6433 }
6434 \anchor{E}{
6435 \northeast
6436 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6437 }
6438 \anchor{emitter}{
6439 \northeast
6440 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6441 }
6442 \anchor{C}{
6443 \northeast
6444 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6445 }
6446 \anchor{collector}{
6447 \northeast
6448 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6449 }
6450 \anchor{S}{
6451 \northeast
6452 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6453 }
6454 \anchor{source}{
6455 \northeast
6456 \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6457 }
6458 \anchor{D}{
6459 \northeast
6460 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6461 }
6462 \anchor{drain}{
6463 \northeast
6464 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
6465 }
6466 #2
6467 \backgroundpath{
6468 \pgftransformationadjustments
6469 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
6470 %
6471 \ifnum \pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction} > 0
6472 \pgf@circuit@trans@ntypetrue
6473 \else
6474 \pgf@circuit@trans@ntypefalse
6475 \fi
6476 \northeast
6477 \pgf@circ@res@up = \pgf@y
6478 \pgf@circ@res@down = -\pgf@y
6479 \pgf@circ@res@right = \pgf@x
6480 \left
6481 \pgf@circ@res@left = \pgf@x
6482 %
6483 #3
6484 % BODY DIODE
6485 \ifpgf@circuit@fet@bodydiode
6486 \drawbodydiode{#1}
6487 \fi
6488 %
6489 }
6490 }
6491 }
6492
6493 \long\def\drawbodydiode#1{
6494 \pgfscope
6495 \pgftransformshift{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
6496 \pgftransformrotate{90}
6497 \pgftransformscale{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode scale}}
6498 \ifpgf@circuit@fulldiode
6499 \pgfnode{fulldiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
6500 \else
6501 \pgfnode{emptydiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
6502 \fi
6503 \endpgfscope
6504 %Draw upper connection to body diode
6505 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}
6506 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
6507 \pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}
6508 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
6509 \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{east}}
6510 \pgfusepath{draw}
6511 \pgfscope
6512 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}
6513 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
6514 \pgftransformscale{0.5}
6515 \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
6516 \endpgfscope{}
6517 %Draw lower connection to body diode
6518 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}
6519 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
6520 \pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
6521 \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{west}}
6522 \pgfusepath{draw}
6523 \pgfscope
6524 \pgftransformshift{\pgfpoint{\pgf@circ@res@right} {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
6525 \pgftransformscale{0.5}
6526 \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
6527 \endpgfscope
6528 }
6529
6530 \long\def\declarebpt#1{
6531 \pgfcircdeclaretransistor{#1}{}{
6532 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6533 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6534 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
6535 \pgfpathlineto{\pgfpoint
6536 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6537 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@up}}
6538 \pgfusepath{draw}
6539
6540 \pgfscope
6541 \pgfpathmoveto{\pgfpoint
6542 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6543 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
6544 \pgfpathlineto{\pgfpoint
6545 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6546 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6547 \pgfsetlinewidth{2\pgflinewidth}
6548 \pgfusepath{draw}
6549 \endpgfscope
6550
6551 \pgfpathmoveto{\pgfpoint
6552 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6553 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@down}}
6554 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6555 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6556 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6557 \pgfusepath{draw}
6558 %draw arrow depending on type of transiytor
6559 \pgfscope
6560 \pgfslopedattimetrue
6561 \pgfallowupsidedownattimetrue
6562 \pgfresetnontranslationattimefalse
6563 \ifpgf@circuit@trans@ntype
6564 \pgftransformlineattime{.5}{%
6565 \pgfpoint%
6566 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6567 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@down}%
6568 }{%
6569 \pgfpoint{\pgf@circ@res@right}%
6570 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}%
6571 }
6572 \else
6573 \pgftransformlineattime{.5}{%
6574 \pgfpoint{\pgf@circ@res@right}%
6575 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}%
6576 }{%
6577 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6578 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@up}%
6579 }
6580 \fi
6581 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6582 \endpgfscope
6583
6584 \ifpgf@circuit@bpt@drawphoto
6585 \pgfscope
6586 \pgfsetarrowsstart{latex'}
6587 \pgfpathmoveto{\pgfpointadd{\pgfpoint
6588 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6589 {\pgf@circ@res@up+\pgf@circ@res@down}}
6590 {\pgfpoint{0.05\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
6591 \pgfpathlineto{\pgfpointadd{\pgfpoint
6592 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6593 {\pgf@circ@res@up+\pgf@circ@res@down}}
6594 {\pgfpoint{0.5\pgf@circ@res@left}{0.3\pgf@circ@res@up}}}
6595 \pgfusepath{draw}
6596 \pgfpathmoveto{\pgfpointadd{\pgfpoint
6597 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6598 {\pgf@circ@res@up+\pgf@circ@res@down}}
6599 {\pgfpoint{0.05\pgf@circ@res@left}{-0.1\pgf@circ@res@up}}}
6600 \pgfpathlineto{\pgfpointadd{\pgfpoint
6601 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6602 {\pgf@circ@res@up+\pgf@circ@res@down}}
6603 {\pgfpoint{0.5\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
6604 \pgfusepath{draw}
6605 \endpgfscope
6606 \else
6607 \ifpgf@circuit@bpt@drawbase
6608 \pgfpathmoveto{\pgfpoint
6609 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6610 {\pgf@circ@res@up+\pgf@circ@res@down}}
6611 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
6612 \pgfusepath{draw}
6613 \fi
6614 \fi
6615 }
6616 }
6617
6618 \declarebpt{npn}
6619 \declarebpt{pnp}
6620
6621 \long\def\declareigbt#1{
6622 \pgfcircdeclaretransistor{#1}{}
6623 {
6624 %draw upper connection
6625 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6626 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6627 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
6628 \pgfpathlineto{\pgfpoint
6629 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6630 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@up}}
6631 \pgfusepath{draw}
6632
6633 %draw thicker gate lines
6634 \pgfscope
6635 \pgfpathmoveto{\pgfpoint
6636 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6637 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6638 \pgfpathlineto{\pgfpoint
6639 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6640 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6641 \pgfpathmoveto{\pgfpoint
6642 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6643 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6644 \pgfpathlineto{\pgfpoint
6645 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6646 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
6647 \pgfsetlinewidth{2\pgflinewidth}
6648 \pgfusepath{draw}
6649 \endpgfscope
6650 %draw lower connection
6651 \pgfpathmoveto{\pgfpoint
6652 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6653 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@down}}
6654 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6655 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
6656 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6657 \pgfusepath{draw}
6658 %draw arrow depending on type of transiytor
6659 \pgfscope
6660 \pgfslopedattimetrue
6661 \pgfallowupsidedownattimetrue
6662 \pgfresetnontranslationattimefalse
6663 \ifpgf@circuit@trans@ntype
6664 \pgftransformlineattime{.5}{%
6665 \pgfpoint%
6666 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6667 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@down}%
6668 }{%
6669 \pgfpoint{\pgf@circ@res@right}%
6670 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}%
6671 }
6672 \else
6673 \pgftransformlineattime{.5}{%
6674 \pgfpoint{\pgf@circ@res@right}%
6675 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}%
6676 }{%
6677 \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6678 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@up}%
6679 }
6680 \fi
6681 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6682 \endpgfscope
6683 %draw gate
6684 \ifpgf@circuit@trans@ntype
6685 \pgfpathmoveto{\pgfpoint
6686 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6687 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6688 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
6689 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6690 \else
6691 \pgfpathmoveto{\pgfpoint
6692 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6693 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@up}}
6694 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
6695 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@up}}
6696 \fi
6697 \pgfusepath{draw}
6698 }
6699 }
6700
6701 \declareigbt{pigbt}
6702 \declareigbt{nigbt}
6703 \declareigbt{Lnigbt}
6704 \declareigbt{Lpigbt}
6705
6706
6707 \pgfcircdeclaretransistor{nmos}{}{%
6708 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6709 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6710 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
6711 \pgfpathlineto{\pgfpoint
6712 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6713 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
6714
6715 \pgfpathmoveto{\pgfpoint
6716 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6717 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
6718 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6719 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
6720 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6721 \pgfusepath{draw}
6722
6723 \pgfscope
6724 \pgfpathmoveto{\pgfpoint
6725 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6726 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@up}}
6727 \pgfpathlineto{\pgfpoint
6728 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
6729 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@down}}
6730 \pgfpathmoveto{\pgfpoint
6731 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
6732 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
6733 \pgfpathlineto{\pgfpoint
6734 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
6735 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
6736 \pgfsetlinewidth{2\pgflinewidth}
6737 \pgfusepath{draw}
6738 \endpgfscope
6739 \ifpgf@circuit@mos@arrows
6740 \pgfscope
6741 \pgfslopedattimetrue
6742 \pgfallowupsidedownattimetrue
6743 \pgfresetnontranslationattimefalse
6744 \pgftransformlineattime{.6}{%
6745 \pgfpoint%
6746 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}%
6747 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
6748 }{%
6749 \pgfpoint
6750 {\pgf@circ@res@right}%
6751 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
6752 }
6753 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6754 \endpgfscope
6755 \fi
6756
6757 \ifpgf@circuit@bpt@drawgate
6758 \pgfpathmoveto{\pgfpoint
6759 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
6760 {\pgf@circ@res@up+\pgf@circ@res@down}}
6761 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
6762 \pgfusepath{draw}
6763 \fi
6764 }
6765
6766
6767 \pgfcircdeclaretransistor{pmos}{}{%
6768 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6769 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6770 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
6771 \pgfpathlineto{\pgfpoint
6772 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6773 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
6774 \pgfusepath{draw}
6775
6776 \ifpgf@circuit@mos@arrows
6777 \pgfscope
6778 \pgfslopedattimetrue
6779 \pgfallowupsidedownattimetrue
6780 \pgfresetnontranslationattimefalse
6781 \pgftransformlineattime{.4}{%
6782 \pgfpoint%
6783 {\pgf@circ@res@right}%
6784 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
6785 }{%
6786 \pgfpoint
6787 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}%
6788 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
6789 }
6790 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6791 \endpgfscope
6792 \fi
6793
6794 \pgfscope
6795 \pgfpathmoveto{\pgfpoint
6796 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6797 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@up}}
6798 \pgfpathlineto{\pgfpoint
6799 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6800 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@down}}
6801 \pgfpathmoveto{\pgfpoint
6802 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
6803 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
6804 \pgfpathlineto{\pgfpoint
6805 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
6806 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
6807 \pgfsetlinewidth{2\pgflinewidth}
6808 \pgfusepath{draw}
6809 \endpgfscope
6810
6811 \pgfpathmoveto{\pgfpoint
6812 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
6813 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
6814 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6815 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
6816 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6817
6818
6819 \pgfusepath{draw}
6820 \ifpgf@circuit@bpt@drawgate
6821 \pgfpathmoveto{\pgfpoint
6822 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
6823 {\pgf@circ@res@up+\pgf@circ@res@down}}
6824 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
6825 \pgfusepath{draw}
6826 \fi
6827 \pgfpathcircle{\pgfpoint
6828 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
6829 {\pgf@circ@res@up+\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
6830 \ifpgf@circuit@pmos@emptycircle
6831 \pgfsetfillcolor{white}
6832 \fi
6833 \pgfusepath{draw,fill}
6834 }
6835
6836 \long\def\drawfetcore#1{
6837 \pgftransformationadjustments
6838 %top connection
6839 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6840 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6841 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
6842 \pgfpathlineto{\pgfpoint
6843 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6844 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
6845 \pgfusepath{draw}
6846 \pgfscope
6847 \pgfpathmoveto{\pgfpoint
6848 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6849 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
6850 \ifpgf@circuit@trans@depletiontype
6851 \pgfpathlineto{\pgfpoint
6852 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6853 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6854 \else
6855
6856 \pgfpathlineto{\pgfpoint
6857 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6858 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up*0.45}}
6859 \pgfpathmoveto{\pgfpoint
6860 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6861 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up*0.25}}
6862 \pgfpathlineto{\pgfpoint
6863 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6864 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down*0.25}}
6865 \pgfpathmoveto{\pgfpoint
6866 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6867 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@down*0.45}}
6868 \pgfpathlineto{\pgfpoint
6869 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6870 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
6871 \fi
6872 \pgfsetlinewidth{2\pgflinewidth}
6873 \pgfusepath{draw}
6874 \endpgfscope
6875 %Bulk connection line
6876 \pgfpathmoveto{\pgfpoint
6877 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6878 {\pgf@circ@res@up+\pgf@circ@res@down}}
6879 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
6880 {\pgf@circ@res@up+\pgf@circ@res@down}}
6881
6882 %bottom connection
6883 \pgfpathmoveto{\pgfpoint
6884 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
6885 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
6886 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
6887 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
6888 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6889 \pgfusepath{draw}
6890
6891 %draw thick gate line
6892 \pgfscope
6893 \pgfpathmoveto{\pgfpoint
6894 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6895 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6896 \pgfpathlineto{\pgfpoint
6897 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6898 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
6899 \pgfsetlinewidth{2\pgflinewidth}
6900 \pgfusepath{draw}
6901 \endpgfscope
6902
6903 \pgfscope
6904 \pgfslopedattimetrue
6905 \pgfallowupsidedownattimetrue
6906 \pgfresetnontranslationattimefalse
6907
6908 \pgftransformlineattime{.6}{%
6909 \pgfpoint
6910 {\pgf@circ@res@right}%
6911 {\pgf@circ@res@up+\pgf@circ@res@down}%
6912 }{%
6913 \pgfpoint%
6914 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
6915 {\pgf@circ@res@up+\pgf@circ@res@down}%
6916 }
6917 \ifpgf@circuit@trans@ntype
6918 \else
6919 \pgftransformrotate{180}
6920 \fi
6921 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
6922 \endpgfscope
6923
6924 % GATE CONNECTION
6925 \ifpgf@circuit@bpt@drawgate
6926 \ifpgf@circuit@trans@ntype
6927 \pgfpathmoveto{\pgfpoint
6928 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6929 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6930 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6931 \else
6932 \pgfpathmoveto{\pgfpoint
6933 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
6934 {-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6935 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
6936 \fi
6937 \pgfusepath{draw}
6938 \fi
6939
6940 }
6941
6942 \long\def\pgfdeclaretransistorwrapperaddbulk#1#2#3
6943 {\pgfcircdeclaretransistor{#1}{
6944 \anchor{bulk}{\left\pgf@x=0pt}
6945 \anchor{B}{\left\pgf@x=0pt}%override Base anchor from npn&igbt
6946 #2
6947 }
6948 {#3}
6949 }
6950
6951
6952 \pgfdeclaretransistorwrapperaddbulk{nfet}{}{%
6953 \pgf@circuit@trans@depletiontypefalse
6954 \drawfetcore{nfet}
6955 }
6956
6957
6958 \pgfdeclaretransistorwrapperaddbulk{pfet}{}{%
6959 \pgf@circuit@trans@depletiontypefalse
6960 \drawfetcore{pfet}
6961 }
6962
6963 % N-CHANNEL IGFET ENHANCEMENT TYPE
6964 \pgfdeclaretransistorwrapperaddbulk{nigfete}{}{%
6965 \pgf@circuit@trans@depletiontypefalse
6966 \drawfetcore{nigfete}
6967
6968 % SOURCE CONNECTION
6969 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
6970 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
6971 \pgfusepath{draw}
6972
6973 % SOLDER DOT at source-bulk connection
6974 \ifpgf@circuit@fet@solderdot
6975 \pgfscope
6976 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6977 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
6978 \pgfnode{circ}{center}{}{}{}
6979 \endpgfscope{}
6980 \fi
6981 }
6982
6983
6984
6985
6986 % N-CHANNEL IGFET ENHANCEMENT TYPE with Bulk connector
6987 \pgfdeclaretransistorwrapperaddbulk{nigfetebulk}{}{%
6988 \pgf@circuit@trans@depletiontypefalse
6989 \drawfetcore{nigfetebulk}
6990 % SOLDER DOT at source-bulk connection
6991 \ifpgf@circuit@fet@solderdot
6992 \pgfscope
6993 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
6994 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}}
6995 \pgfnode{circ}{center}{}{}{}
6996 \endpgfscope{}
6997 \fi
6998 }
6999
7000
7001
7002 % N-CHANNEL IGFET DEPLETION TYPE
7003 \pgfdeclaretransistorwrapperaddbulk{nigfetd}{}{%
7004 \pgf@circuit@trans@depletiontypetrue
7005 \drawfetcore{nigfetd}
7006
7007 % SOURCE CONNECTION
7008 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7009 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
7010 \pgfusepath{draw}
7011
7012 % SOLDER DOT at source-bulk connection
7013 \ifpgf@circuit@fet@solderdot
7014 \pgfscope
7015 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
7016 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
7017 \pgfnode{circ}{center}{}{}{}
7018 \endpgfscope{}
7019 \fi
7020 }
7021
7022 % P-CHANNEL IGFET ENHANCEMENT TYPE
7023 \pgfdeclaretransistorwrapperaddbulk{pigfete}{}{%
7024 \pgf@circuit@trans@depletiontypefalse
7025 \drawfetcore{pigfete}
7026 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
7027
7028 % SOURCE CONNECTION
7029 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7030 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
7031 \pgfusepath{draw}
7032
7033
7034 % SOLDER DOT at source-bulk connection
7035 \ifpgf@circuit@fet@solderdot
7036 \pgfscope
7037 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
7038 \pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@up}}
7039 \pgfnode{circ}{center}{}{}{}
7040 \endpgfscope
7041 \fi
7042 }
7043
7044 % P-CHANNEL IGFET ENHANCEMENT TYPE with bulk connector
7045 \pgfdeclaretransistorwrapperaddbulk{pigfetebulk}{}{%
7046 \pgf@circuit@trans@depletiontypefalse
7047 \drawfetcore{pigfetebulk}
7048 }
7049
7050
7051 % P-CHANNEL IGFET DEPLETION TYPE
7052 \pgfdeclaretransistorwrapperaddbulk{pigfetd}{}{%
7053 \pgf@circuit@trans@depletiontypetrue
7054 \drawfetcore{pigfetd}
7055
7056 % SOURCE CONNECTION
7057 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7058 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
7059 \pgfusepath{draw}
7060
7061
7062 % SOLDER DOT at source-bulk connection
7063 \ifpgf@circuit@fet@solderdot
7064 \pgfscope
7065 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
7066 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@up}}
7067 \pgfnode{circ}{center}{}{}{}
7068 \endpgfscope{}
7069 \fi
7070 }
7071
7072 \pgfcircdeclaretransistor{njfet}{}{%
7073 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
7074 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
7075 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}}
7076 \pgfpathlineto{\pgfpoint
7077 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
7078 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}}
7079
7080 \pgfpathmoveto{\pgfpoint
7081 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
7082 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
7083 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
7084 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
7085 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
7086 \pgfusepath{draw}
7087
7088 \pgfscope
7089 \pgfpathmoveto{\pgfpoint
7090 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
7091 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf@circ@res@up}}
7092 \pgfpathlineto{\pgfpoint
7093 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
7094 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf@circ@res@down}}
7095 \pgfsetlinewidth{2\pgflinewidth}
7096 \pgfusepath{draw}
7097 \endpgfscope
7098
7099 \pgfscope
7100 \pgfslopedattimetrue
7101 \pgfallowupsidedownattimetrue
7102 \pgfresetnontranslationattimefalse
7103 \pgftransformlineattime{.6}{%
7104 \pgfpoint{\pgf@circ@res@left}%
7105 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}%
7106 }{%
7107 \pgfpoint
7108 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}%
7109 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}%
7110 }
7111 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
7112 \endpgfscope
7113
7114 \pgfpathmoveto{\pgfpoint
7115 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
7116 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
7117 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
7118 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
7119 \pgfusepath{draw}
7120 }
7121
7122
7123 \pgfcircdeclaretransistor{pjfet}{}{%
7124 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
7125 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
7126 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
7127 \pgfpathlineto{\pgfpoint
7128 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
7129 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
7130
7131 \pgfpathmoveto{\pgfpoint
7132 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
7133 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}}
7134 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
7135 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}}
7136 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
7137 \pgfusepath{draw}
7138
7139 \pgfscope
7140 \pgfpathmoveto{\pgfpoint
7141 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
7142 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf@circ@res@up}}
7143 \pgfpathlineto{\pgfpoint
7144 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
7145 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf@circ@res@down}}
7146 \pgfsetlinewidth{2\pgflinewidth}
7147 \pgfusepath{draw}
7148 \endpgfscope
7149
7150 \pgfscope
7151 \pgfslopedattimetrue
7152 \pgfallowupsidedownattimetrue
7153 \pgfresetnontranslationattimefalse
7154 \pgftransformlineattime{.4}{%
7155 \pgfpoint%
7156 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}%
7157 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}%
7158 }{%
7159 \pgfpoint{\pgf@circ@res@left}%
7160 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}%
7161 }
7162 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
7163 \endpgfscope
7164
7165
7166 \pgfpathmoveto{\pgfpoint
7167 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
7168 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
7169 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
7170 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
7171 \pgfusepath{draw}
7172 }
7173
7174
7175 \pgfdeclaretransistorwrapperaddbulk{isfet}{}{%
7176 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
7177 % DRAIN CONNECTION
7178 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
7179 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
7180 % DRAIN
7181 \pgfpathlineto{\pgfpoint
7182 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7183 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
7184 \pgfusepath{draw}
7185
7186 % GATE, DEPLETION TYPE
7187 \pgfscope %% added
7188 \pgfpathmoveto{\pgfpoint
7189 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7190 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@up}}
7191 \pgfpathlineto{\pgfpoint
7192 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7193 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@down}}
7194 \pgfsetlinewidth{2\pgflinewidth} %% added
7195 \pgfusepath{draw} %% added
7196 \endpgfscope %% added
7197
7198 % BULK
7199 \pgfpathmoveto{\pgfpoint
7200 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7201 {\pgf@circ@res@up+\pgf@circ@res@down}}
7202 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+.5\pgflinewidth}
7203 {\pgf@circ@res@up+\pgf@circ@res@down}}
7204
7205 % SOURCE
7206 \pgfpathmoveto{\pgfpoint
7207 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
7208 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
7209 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
7210 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
7211 % SOURCE CONNECTION
7212 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7213 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
7214 \pgfusepath{draw}
7215
7216 % GATE
7217 %\pgfscope
7218 %\pgfpathmoveto{\pgfpoint
7219 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf@circ@res@left}
7220 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
7221 %\pgfpathlineto{\pgfpoint
7222 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf@circ@res@left}
7223 % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
7224 %\pgfsetlinewidth{2\pgflinewidth}
7225 %\pgfusepath{draw}
7226 %\endpgfscope
7227
7228
7229 % SOLDER DOT at source-bulk connection
7230 \ifpgf@circuit@fet@solderdot
7231 \pgfscope
7232 \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
7233 \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
7234 \pgfnode{circ}{center}{}{}{}
7235 \endpgfscope{}
7236 \fi
7237 % ARROW
7238 \pgfscope
7239 \pgfslopedattimetrue
7240 \pgfallowupsidedownattimetrue
7241 \pgfresetnontranslationattimefalse
7242 \pgftransformlineattime{.6}{%
7243 \pgfpoint
7244 {\pgf@circ@res@right}%
7245 {\pgf@circ@res@up+\pgf@circ@res@down}%
7246 }{%
7247 \pgfpoint%
7248 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}%
7249 {\pgf@circ@res@up+\pgf@circ@res@down}%
7250 }
7251 \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
7252 \endpgfscope
7253 \pgfusepath{draw}
7254
7255 % Wavy lines
7256 \pgfscope
7257 \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}}
7258 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7259 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7260 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7261 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7262 \pgfusepath{draw}
7263
7264 \pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf@circ@res@up}{0cm}}
7265 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7266 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7267 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7268 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7269 \pgfusepath{draw}
7270
7271 \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}}
7272 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7273 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7274 \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7275 \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}}
7276 \pgfusepath{draw}
7277 \endpgfscope
7278
7279 }
7280
7281
7282 %% Black thyristor
7283
7284 \pgfcircdeclarebipole{
7285 \anchor{gate}{
7286 \northeast
7287 }
7288 \anchor{anode}{
7289 \southwest
7290 \pgf@y=0cm
7291 }
7292 \anchor{G}{
7293 \northeast
7294 }
7295 \anchor{cathode}{
7296 \northeast
7297 \pgf@y=0cm
7298 }
7299 }{\ctikzvalof{tripoles/thyristor/height 2}}{fullthyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
7300
7301 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7302
7303 \pgf@circ@res@other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf@circ@res@left
7304 \pgf@circ@res@step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf@circ@res@right
7305
7306 \pgfscope
7307 \pgftransformxshift{\pgf@circ@res@other}
7308 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7309
7310 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7311 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7312 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7313 \pgfusepath{draw,fill}
7314
7315 \pgfsetlinewidth{\pgfstartlinewidth}
7316
7317 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7318 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf@circ@res@up}}
7319 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\pgf@circ@res@up}}
7320 \pgfusepath{draw}
7321 \endpgfscope
7322
7323 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
7324 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@down}}
7325
7326 \pgfusepath{draw}
7327
7328 \pgfsetlinewidth{\pgfstartlinewidth}
7329
7330 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7331 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7332
7333 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7334 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7335
7336 \pgfusepath{draw}
7337
7338 }
7339
7340 %% Empty thyristor
7341
7342 \pgfcircdeclarebipole{
7343 \anchor{gate}{
7344 \northeast
7345 }
7346 \anchor{anode}{
7347 \southwest
7348 \pgf@y=0cm
7349 }
7350 \anchor{G}{
7351 \northeast
7352 }
7353 \anchor{cathode}{
7354 \northeast
7355 \pgf@y=0cm
7356 }
7357 }{\ctikzvalof{tripoles/thyristor/height 2}}{emptythyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
7358
7359 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7360
7361 \pgf@circ@res@other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf@circ@res@left
7362 \pgf@circ@res@step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf@circ@res@right
7363
7364 \pgfscope
7365 \pgftransformxshift{\pgf@circ@res@other}
7366 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7367
7368 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7369 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7370 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7371 \pgfusepath{draw}
7372
7373 \pgfsetlinewidth{\pgfstartlinewidth}
7374
7375 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
7376 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf@circ@res@up}}
7377 \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\pgf@circ@res@up}}
7378 \pgfusepath{draw}
7379 \endpgfscope
7380
7381 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
7382 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@down}}
7383
7384 \pgfusepath{draw}
7385
7386 \pgfsetlinewidth{\pgfstartlinewidth}
7387
7388 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7389 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7390
7391 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7392 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7393
7394 \pgfusepath{draw}
7395
7396 }
7397
7398 %% Empty triac
7399
7400 \pgfcircdeclarebipole{
7401 \anchor{gate}{
7402 \northeast
7403 }
7404 \anchor{G}{
7405 \northeast
7406 }
7407 \anchor{anode}{
7408 \southwest
7409 \pgf@y=0cm
7410 }
7411 \anchor{cathode}{
7412 \northeast
7413 \pgf@y=0cm
7414 }
7415 }{\ctikzvalof{tripoles/triac/height}}{emptytriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
7416
7417 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7418
7419 \pgf@circ@res@other = \ctikzvalof{tripoles/triac/diode width left}\pgf@circ@res@left
7420 \pgf@circ@res@step = \ctikzvalof{tripoles/triac/diode width right}\pgf@circ@res@right
7421
7422 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7423 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7424 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7425 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7426
7427 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7428 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7429 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7430 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7431
7432 \pgfusepath{draw}
7433
7434 \pgfsetlinewidth{\pgfstartlinewidth}
7435
7436 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7437 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7438 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % sqrt(1/2)
7439
7440 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7441 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7442
7443 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7444 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7445
7446 \pgfusepath{draw}
7447
7448 }
7449
7450 %% Empty triac
7451
7452 \pgfcircdeclarebipole{
7453 \anchor{gate}{
7454 \northeast
7455 }
7456 \anchor{G}{
7457 \northeast
7458 }
7459 \anchor{anode}{
7460 \southwest
7461 \pgf@y=0cm
7462 }
7463 \anchor{cathode}{
7464 \northeast
7465 \pgf@y=0cm
7466 }
7467 }{\ctikzvalof{tripoles/triac/height}}{fulltriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
7468
7469 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7470
7471 \pgf@circ@res@other = \ctikzvalof{tripoles/triac/diode width left}\pgf@circ@res@left
7472 \pgf@circ@res@step = \ctikzvalof{tripoles/triac/diode width right}\pgf@circ@res@right
7473
7474 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7475 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7476 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7477 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7478
7479 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7480 \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7481 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7482 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
7483
7484 \pgfusepath{draw,fill}
7485
7486 \pgfsetlinewidth{\pgfstartlinewidth}
7487
7488 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7489 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
7490 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % sqrt(1/2)
7491
7492 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
7493 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7494
7495 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7496 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7497
7498 \pgfusepath{draw}
7499
7500 }
7501
7502
7503
7504
7505
7506
7507
7508 \pgfcircdeclarebipole{
7509 \anchor{out 1}{
7510 \northeast
7511 \pgf@y=0cm
7512 }
7513 \anchor{out 2}{
7514 \northeast
7515 \pgf@y=.8\pgf@y
7516 }
7517 }{\ctikzvalof{tripoles/toggleswitch/height 2}}{toggleswitch}{\ctikzvalof{tripoles/toggleswitch/height}}{\ctikzvalof{tripoles/toggleswitch/width}}{
7518
7519 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
7520 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@left}{0pt}}
7521 \pgfusepath{draw}
7522 \pgfscope
7523 \pgfpathmoveto{\pgfpoint{.3\pgf@circ@res@left}{0pt}}
7524 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7525 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{.5\pgf@circ@res@up}}
7526 \pgfusepath{draw}
7527 \endpgfscope
7528
7529 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7530 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{0}}
7531
7532 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{.8\pgf@circ@res@up}}
7533 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.8\pgf@circ@res@up}}
7534 \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.15\pgf@circ@res@up}}
7535 \pgfusepath{draw}
7536
7537
7538 \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@left}{\pgf@circ@res@up}}
7539 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{\pgf@circ@res@up}}
7540 \pgfusepath{draw}
7541
7542 \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}
7543 \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@up}}
7544 \pgfpathlineto{\pgfpoint{0}{.8\pgf@circ@res@up}}
7545 \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@left}{.6\pgf@circ@res@up}}
7546 \pgfpathlineto{\pgfpoint{0}{.4\pgf@circ@res@up}}
7547 \pgfpathlineto{\pgfpoint{0}{.2\pgf@circ@res@up}}
7548 \pgfusepath{draw}
7549 \pgfsetdash{}{0cm}
7550 }
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561 \pgfdeclareshape{op amp}
7562 {
7563 \anchor{center}{\pgfpointorigin}
7564 \savedanchor\northwest{%
7565 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
7566 \pgf@y=.5\pgf@y
7567 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
7568 \pgf@x=.5\pgf@x
7569 }
7570 \anchor{south}{
7571 \northwest
7572 \pgf@y=-\pgf@y
7573 \pgf@x=0pt
7574 }
7575 \anchor{north}{
7576 \northwest
7577 \pgf@x=0pt
7578 }
7579 \savedanchor\left{%
7580 \pgf@y=0pt
7581 }
7582 \anchor{leftedge}
7583 {\left
7584 \pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x
7585 }
7586 \savedanchor\inOne{%
7587 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
7588 \pgf@y=.5\pgf@y
7589 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
7590 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
7591 \pgf@x=.5\pgf@x
7592 }
7593 \anchor{-}{
7594 \inOne
7595 }
7596 \anchor{+}{
7597 \inOne
7598 \pgf@y=-\pgf@y
7599 }
7600 \savedanchor\up{%
7601 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
7602 \pgf@y=.5\pgf@y
7603 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
7604 \pgf@x=.5\pgf@x
7605 \pgf@circ@res@up = \pgf@y
7606 \pgf@circ@res@right = -\pgf@x
7607 \pgf@circ@res@left = \pgf@x
7608 \pgfpointlineattime{
7609 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
7610 \pgfpoint{
7611 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7612 {\pgf@circ@res@up}}
7613 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7614 }
7615 \anchor{up}{
7616 \up
7617 }
7618 \anchor{down}{
7619 \up
7620 \pgf@y=-\pgf@y
7621 }
7622 \anchor{out}{
7623 \northwest
7624 \pgf@y=0pt
7625 \pgf@x=-\pgf@x
7626 }
7627 \anchor{west}{
7628 \left
7629 }
7630 \anchor{east}{
7631 \left
7632 \pgf@x=-\pgf@x
7633 }
7634
7635 \backgroundpath{
7636 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7637
7638
7639 \northwest
7640 \pgf@circ@res@up = \pgf@y
7641 \pgf@circ@res@down = -\pgf@y
7642 \pgf@circ@res@right = -\pgf@x
7643 \pgf@circ@res@left = \pgf@x
7644
7645 \pgfpathmoveto{\pgfpoint
7646 {\pgf@circ@res@left}
7647 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
7648 \pgfpathlineto{\pgfpoint
7649 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7650 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
7651 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
7652
7653
7654 \pgfpathmoveto{\pgfpoint
7655 {\pgf@circ@res@left}
7656 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
7657 \pgfpathlineto{\pgfpoint
7658 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
7659 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
7660 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
7661
7662 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7663 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7664 \pgfsetrectcap
7665 \pgfusepath{draw}
7666
7667
7668 \pgfscope
7669 \pgfsetlinewidth{2\pgflinewidth}
7670 \pgftransformxshift{.7\pgf@circ@res@left}
7671 \pgf@circ@res@step=\pgf@circ@res@right
7672 \advance\pgf@circ@res@step by -\pgf@circ@res@left
7673 \pgf@circ@res@step=.7\pgf@circ@res@step
7674
7675 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
7676 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7677 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
7678 \pgfpathclose
7679 \pgfusepath{draw}
7680 \endpgfscope
7681
7682
7683
7684 }
7685 }
7686
7687 %op amp shape as in european standard en 60617
7688 \pgfdeclareshape{en amp}
7689 {
7690 \anchor{center}{\pgfpointorigin}
7691 \savedanchor\northwest{%
7692 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/height}\pgf@circ@Rlen
7693 \pgf@y=.5\pgf@y
7694 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/width}\pgf@circ@Rlen
7695 \pgf@x=.5\pgf@x
7696 }
7697 \anchor{south}{
7698 \northwest
7699 \pgf@y=-\pgf@y
7700 \pgf@x=0pt
7701 }
7702 \anchor{north}{
7703 \northwest
7704 \pgf@x=0pt
7705 }
7706 \savedanchor\left{%
7707 \pgf@y=0pt
7708 }
7709 \anchor{leftedge}
7710 {
7711 \left
7712 \pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/port width}\pgf@x
7713 }
7714 \savedanchor\inOne{%
7715 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/height}\pgf@circ@Rlen
7716 \pgf@y=.5\pgf@y
7717 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@y
7718 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/width}\pgf@circ@Rlen
7719 \pgf@x=.5\pgf@x
7720 }
7721 \anchor{-}{
7722 \inOne
7723 }
7724 \anchor{+}{
7725 \inOne
7726 \pgf@y=-\pgf@y
7727 }
7728 \anchor{up}{
7729 \northwest
7730 \pgf@x=0pt
7731 }
7732 \anchor{down}{
7733 \northwest
7734 \pgf@x=0pt
7735 \pgf@y=-\pgf@y
7736 }
7737 \anchor{out}{
7738 \northwest
7739 \pgf@y=0pt
7740 \pgf@x=-\pgf@x
7741 }
7742 \anchor{west}{
7743 \left
7744 }
7745 \anchor{east}{
7746 \left
7747 \pgf@x=-\pgf@x
7748 }
7749 \backgroundpath{
7750 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7751 \northwest
7752 \pgf@circ@res@up = \pgf@y
7753 \pgf@circ@res@down = -\pgf@y
7754 \pgf@circ@res@right = -\pgf@x
7755 \pgf@circ@res@left = \pgf@x
7756
7757 \pgfpathmoveto{\pgfpoint
7758 {\pgf@circ@res@left}
7759 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@circ@res@up}}
7760 \pgfpathlineto{\pgfpoint
7761 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/port width}\pgf@circ@res@left}
7762 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@circ@res@up}}
7763 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/font} $-$}
7764
7765 \pgfpathmoveto{\pgfpoint
7766 {\pgf@circ@res@left}
7767 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@circ@res@down}}
7768 \pgfpathlineto{\pgfpoint
7769 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/port width}\pgf@circ@res@left}
7770 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@circ@res@down}}
7771 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/font} $+$}
7772
7773 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7774 \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7775 \pgfsetrectcap
7776 \pgfusepath{draw}
7777
7778 \pgfscope
7779 \pgfsetlinewidth{2\pgflinewidth}
7780 \pgfpathmoveto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}{\pgf@circ@res@down}}
7781 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left}{\pgf@circ@res@up}}
7782 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right}{\pgf@circ@res@up}}
7783 \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right}{\pgf@circ@res@down}}
7784 \pgfpathclose
7785 \pgfusepath{draw}
7786 \endpgfscope
7787
7788 \pgftext[base,y=-3ex,at=\pgfpoint{.3\pgf@circ@res@left}{\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/font2} $\triangleright$}
7789 \pgftext[base,y=-3ex,at=\pgfpoint{.3\pgf@circ@res@right}{\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/font2} $\infty$}
7790 }
7791 }
7792
7793 %%Transkonduktanzverstärker
7794 \pgfdeclareshape{gm amp}
7795 {
7796 \anchor{center}{\pgfpointorigin}
7797 \savedanchor\northwest{%
7798 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@circ@Rlen
7799 \pgf@y=.5\pgf@y
7800 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@circ@Rlen
7801 \pgf@x=.5\pgf@x
7802 }
7803 \anchor{south}{
7804 \northwest
7805 \pgf@y=-\pgf@y
7806 }
7807 \anchor{north}{
7808 \northwest
7809 }
7810 \savedanchor\left{%
7811 \pgf@y=0pt
7812 }
7813 \anchor{leftedge}
7814 {\left
7815 \pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x
7816 }
7817 \savedanchor\inOne{%
7818 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@circ@Rlen
7819 \pgf@y=.5\pgf@y
7820 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@y
7821 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@circ@Rlen
7822 \pgf@x=.5\pgf@x
7823 }
7824 \anchor{-}{
7825 \inOne
7826 }
7827 \anchor{+}{
7828 \inOne
7829 \pgf@y=-\pgf@y
7830 }
7831 \savedanchor\up{%
7832 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@circ@Rlen
7833 \pgf@y=.5\pgf@y
7834 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@circ@Rlen
7835 \pgf@x=.5\pgf@x
7836 \pgf@circ@res@up = \pgf@y
7837 \pgf@circ@res@right = -\pgf@x
7838 \pgf@circ@res@left = \pgf@x
7839 \pgfpointlineattime{
7840 \pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/up pos}}{
7841 \pgfpoint{
7842 \pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}
7843 {\pgf@circ@res@up}}
7844 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
7845 }
7846 \anchor{up}{
7847 \up
7848 }
7849 \anchor{down}{
7850 \up
7851 \pgf@y=-\pgf@y
7852 }
7853 \anchor{out}{
7854 \northwest
7855 \pgf@y=0pt
7856 \pgf@x=-\pgf@x
7857 }
7858 \anchor{west}{
7859 \left
7860 }
7861 \anchor{east}{
7862 \left
7863 \pgf@x=-\pgf@x
7864 }
7865
7866 \backgroundpath{
7867 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
7868
7869 \northwest
7870 \pgf@circ@res@up = \pgf@y
7871 \pgf@circ@res@down = -\pgf@y
7872 \pgf@circ@res@right = -\pgf@x
7873 \pgf@circ@res@left = \pgf@x
7874
7875 \pgfpathmoveto{\pgfpoint
7876 {\pgf@circ@res@left}
7877 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}}
7878 \pgfpathlineto{\pgfpoint
7879 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}
7880 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}}
7881 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
7882
7883
7884 \pgfpathmoveto{\pgfpoint
7885 {\pgf@circ@res@left}
7886 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}}
7887 \pgfpathlineto{\pgfpoint
7888 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}
7889 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}}
7890 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
7891
7892 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
7893 \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{0pt}} %
7894 \pgfsetrectcap
7895 \pgfusepath{draw}
7896
7897 \pgfscope
7898 \pgfsetlinewidth{2\pgflinewidth}
7899 \pgftransformxshift{.7\pgf@circ@res@left}
7900 \pgf@circ@res@step=\pgf@circ@res@right
7901 \advance\pgf@circ@res@step by -\pgf@circ@res@left
7902 \pgf@circ@res@step=.7\pgf@circ@res@step
7903 %Umrandung:
7904 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}} %geändert startpunkt neu am ausgangsstrich
7905 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}%vom Ausgang nach oben
7906 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} %neu ecke links oben nach rechts oben
7907 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} %bei deneigängen runter
7908 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}%ecke links unten nach rechts unten
7909 \pgfpathclose
7910 \pgfusepath{draw}
7911 \endpgfscope
7912
7913 }
7914 }
7915
7916
7917
7918 %% Potentiometer
7919 \pgfcircdeclarebipole{
7920 \anchor{wiper}{
7921 \northeast
7922 \pgfpoint{0pt}{\pgf@y}
7923 }
7924 \anchor{W}{
7925 \northeast
7926 \pgfpoint{0pt}{\pgf@y}
7927 }
7928 }{\ctikzvalof{bipoles/potentiometer/height 2}}{potentiometer}{\ctikzvalof{bipoles/potentiometer/height}}{\ctikzvalof{bipoles/potentiometer/width}}{
7929 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7930 \pgftransformationadjustments
7931 \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
7932 \divide \pgf@circ@res@step by 12
7933
7934 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
7935
7936 \pgf@circ@res@other = \pgf@circ@res@left
7937 \advance\pgf@circ@res@other by \pgf@circ@res@step
7938 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7939 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7940 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7941 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7942 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7943 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7944 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7945 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7946 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
7947 \advance\pgf@circ@res@other by 2\pgf@circ@res@step
7948 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
7949 \advance\pgf@circ@res@other by \pgf@circ@res@step
7950 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
7951 \pgfsetbeveljoin
7952 \pgfusepath{draw}
7953
7954 \pgfscope
7955 %\pgfsetlinewidth{\pgfstartlinewidth}
7956 \pgfsetarrowsend{latex'}
7957 \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7958 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7959 \pgfusepath{draw}
7960 \endpgfscope
7961 }
7962
7963
7964
7965
7966
7967 %% Generic tunable
7968
7969 \pgfcircdeclarebipole{
7970 \anchor{wiper}{
7971 \northeast
7972 \pgfpoint{0pt}{\pgf@y}
7973 }
7974 }{\ctikzvalof{bipoles/generic potentiometer/height 2}}{genericpotentiometer}{\ctikzvalof{bipoles/generic potentiometer/height}}{\ctikzvalof{bipoles/generic potentiometer/width}}{
7975
7976 \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
7977 \divide \pgf@circ@res@step by 14
7978
7979 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
7980 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
7981
7982 \pgfusepath{draw}
7983
7984 \pgfscope
7985 %\pgfsetlinewidth{\pgfstartlinewidth}
7986 \pgfsetarrowsend{latex'}
7987 \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
7988 \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
7989 \pgfusepath{draw}
7990 \endpgfscope
7991 }
7992
7993
7994 \pgfdeclareshape{mixer}
7995 {
7996 \savedanchor\northwest{
7997 \ifpgf@circuit@boxed
7998 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
7999 \pgf@y=.5\pgf@y
8000 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
8001 \pgf@x=.5\pgf@x
8002 \else
8003 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@circ@Rlen
8004 \pgf@y=.5\pgf@y
8005 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@circ@Rlen
8006 \pgf@x=.5\pgf@x
8007 \fi
8008 }
8009 \anchor{center}{
8010 \pgfpointorigin
8011 }
8012 \anchor{left}{%
8013 \northwest
8014 \pgf@y=0pt
8015 }
8016 \anchor{1}{
8017 \northwest
8018 \pgf@y=0pt
8019 }
8020 \anchor{2}{
8021 \northwest
8022 \pgf@y=-\pgf@y
8023 \pgf@x=0pt
8024 }
8025 \anchor{3}{
8026 \northwest
8027 \pgf@y=0pt
8028 \pgf@x=-\pgf@x
8029 }
8030 \anchor{4}{
8031 \northwest
8032 \pgf@y=\pgf@y
8033 \pgf@x=0pt
8034 }
8035 \anchor{in 1}{
8036 \northwest
8037 \pgf@y=0pt
8038 }
8039 \anchor{in1}{
8040 \northwest
8041 \pgf@y=0pt
8042 }
8043 \anchor{in}{
8044 \northwest
8045 \pgf@y=0pt
8046 }
8047 \anchor{in 2}{
8048 \northwest
8049 \pgf@y=-\pgf@y
8050 \pgf@x=0pt
8051 }
8052 \anchor{in2}{
8053 \northwest
8054 \pgf@y=-\pgf@y
8055 \pgf@x=0pt
8056 }
8057 \anchor{out}{
8058 \northwest
8059 \pgf@y=0pt
8060 \pgf@x=-\pgf@x
8061 }
8062 \anchor{center}{
8063 \pgf@y=0pt
8064 \pgf@x=0pt
8065 }
8066 \anchor{east}{
8067 \northwest
8068 \pgf@y=0pt
8069 \pgf@x=-\pgf@x
8070 }
8071 \anchor{west}{
8072 \northwest
8073 \pgf@y=0pt
8074 }
8075 \anchor{south}{
8076 \northwest
8077 \pgf@x=0pt
8078 \pgf@y=-\pgf@y
8079 }
8080 \anchor{north}{
8081 \northwest
8082 \pgf@x=0pt
8083 }
8084 \anchor{south west}{
8085 \northwest
8086 \pgf@y=-\pgf@y
8087 }
8088 \anchor{north east}{
8089 \northwest
8090 \pgf@x=-\pgf@x
8091 }
8092 \anchor{north west}{
8093 \northwest
8094 }
8095 \anchor{south east}{
8096 \northwest
8097 \pgf@x=-\pgf@x
8098 \pgf@y=-\pgf@y
8099 }
8100 \backgroundpath{
8101 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8102
8103 \pgf@circ@res@step=\ctikzvalof{tripoles/mixer/width}\pgf@circ@Rlen
8104
8105 \pgfscope
8106 \pgfstartlinewidth=\pgflinewidth
8107
8108 % draw outer box
8109 \ifpgf@circuit@boxed
8110 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8111 \fi
8112
8113 % draw outer circle
8114 \ifpgf@circuit@boxed
8115 \pgf@circ@res@step=.7\pgf@circ@res@step
8116 \pgfsetdash{}{0pt} % draw solid circle if boxed
8117 \else
8118 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8119 \fi
8120 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
8121 \pgfusepath{draw}
8122
8123 % draw inner stuff
8124 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8125 \pgfsetlinewidth{\pgfstartlinewidth}
8126 \pgfpathmoveto{\pgfpointorigin}
8127 \pgfpathmoveto{\pgfpointpolar{135}{0.5\pgf@circ@res@step}}
8128 \pgfpathlineto{\pgfpointpolar{-45}{0.5\pgf@circ@res@step}}
8129 \pgfpathmoveto{\pgfpointorigin}
8130 \pgfpathmoveto{\pgfpointpolar{45}{0.5\pgf@circ@res@step}}
8131 \pgfpathlineto{\pgfpointpolar{-135}{0.5\pgf@circ@res@step}}
8132 \pgfusepath{draw}
8133
8134 \endpgfscope
8135 }
8136 }
8137
8138 \pgfdeclareshape{adder}
8139 {
8140 \savedanchor\northwest{
8141 \ifpgf@circuit@boxed
8142 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
8143 \pgf@y=.5\pgf@y
8144 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
8145 \pgf@x=.5\pgf@x
8146 \else
8147 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@circ@Rlen
8148 \pgf@y=.5\pgf@y
8149 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@circ@Rlen
8150 \pgf@x=.5\pgf@x
8151 \fi
8152 }
8153 \anchor{center}{
8154 \pgfpointorigin
8155 }
8156 \anchor{left}{%
8157 \northwest
8158 \pgf@y=0pt
8159 }
8160 \anchor{1}{
8161 \northwest
8162 \pgf@y=0pt
8163 }
8164 \anchor{2}{
8165 \northwest
8166 \pgf@y=-\pgf@y
8167 \pgf@x=0pt
8168 }
8169 \anchor{3}{
8170 \northwest
8171 \pgf@y=0pt
8172 \pgf@x=-\pgf@x
8173 }
8174 \anchor{4}{
8175 \northwest
8176 \pgf@y=\pgf@y
8177 \pgf@x=0pt
8178 }
8179 \anchor{in 1}{
8180 \northwest
8181 \pgf@y=0pt
8182 }
8183 \anchor{in1}{
8184 \northwest
8185 \pgf@y=0pt
8186 }
8187 \anchor{in}{
8188 \northwest
8189 \pgf@y=0pt
8190 }
8191 \anchor{in 2}{
8192 \northwest
8193 \pgf@y=-\pgf@y
8194 \pgf@x=0pt
8195 }
8196 \anchor{in2}{
8197 \northwest
8198 \pgf@y=-\pgf@y
8199 \pgf@x=0pt
8200 }
8201 \anchor{out}{
8202 \northwest
8203 \pgf@y=0pt
8204 \pgf@x=-\pgf@x
8205 }
8206 \anchor{center}{
8207 \pgf@y=0pt
8208 \pgf@x=0pt
8209 }
8210 \anchor{east}{
8211 \northwest
8212 \pgf@y=0pt
8213 \pgf@x=-\pgf@x
8214 }
8215 \anchor{west}{
8216 \northwest
8217 \pgf@y=0pt
8218 }
8219 \anchor{south}{
8220 \northwest
8221 \pgf@x=0pt
8222 \pgf@y=-\pgf@y
8223 }
8224 \anchor{north}{
8225 \northwest
8226 \pgf@x=0pt
8227 }
8228 \anchor{south west}{
8229 \northwest
8230 \pgf@y=-\pgf@y
8231 }
8232 \anchor{north east}{
8233 \northwest
8234 \pgf@x=-\pgf@x
8235 }
8236 \anchor{north west}{
8237 \northwest
8238 }
8239 \anchor{south east}{
8240 \northwest
8241 \pgf@x=-\pgf@x
8242 \pgf@y=-\pgf@y
8243 }
8244 \backgroundpath{
8245 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8246
8247 \pgf@circ@res@step=\ctikzvalof{tripoles/adder/width}\pgf@circ@Rlen
8248
8249 \pgfscope
8250 \pgfstartlinewidth=\pgflinewidth
8251
8252 % draw outer box
8253 \ifpgf@circuit@boxed
8254 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8255 \fi
8256
8257 % draw outer circle
8258 \ifpgf@circuit@boxed
8259 \pgf@circ@res@step=.7\pgf@circ@res@step{}
8260 \pgfsetdash{}{0pt} % draw solid circle if boxed
8261 \else
8262 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8263 \fi
8264 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
8265 \pgfusepath{draw}
8266
8267 % draw inner stuff
8268 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8269 \pgfsetlinewidth{\pgfstartlinewidth}
8270
8271 \pgfpathmoveto{\pgfpointorigin}
8272 \pgfpathmoveto{\pgfpointpolar{0}{0.3\pgf@circ@res@step}}
8273 \pgfpathlineto{\pgfpointpolar{180}{0.3\pgf@circ@res@step}}
8274 \pgfpathmoveto{\pgfpointorigin}
8275 \pgfpathmoveto{\pgfpointpolar{90}{0.3\pgf@circ@res@step}}
8276 \pgfpathlineto{\pgfpointpolar{270}{0.3\pgf@circ@res@step}}
8277 \pgfsetlinewidth{2\pgflinewidth}
8278 \pgfusepath{draw}
8279
8280 \endpgfscope
8281 }
8282 }
8283
8284 \pgfdeclareshape{oscillator}
8285 {
8286 \savedanchor\northwest{
8287 \ifpgf@circuit@boxed
8288 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
8289 \pgf@y=.5\pgf@y
8290 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
8291 \else
8292 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@circ@Rlen
8293 \pgf@y=.5\pgf@y
8294 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@circ@Rlen
8295 \fi
8296 }
8297 \anchor{center}{
8298 \pgfpointorigin
8299 }
8300 \anchor{north}{
8301 \northwest
8302 \pgf@x=.5\pgf@x
8303 }
8304 \anchor{south}{
8305 \northwest
8306 \pgf@x=.5\pgf@x
8307 \pgf@y=-\pgf@y
8308 }
8309 \anchor{east}{
8310 \northwest
8311 \pgf@y=0pt
8312 \pgf@x=0pt
8313 }
8314 \anchor{west}{
8315 \northwest
8316 \pgf@y=0pt
8317 }
8318 \anchor{text}{
8319 \pgf@x=-2\pgf@x
8320 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
8321 \advance \pgf@y by -1.5\ht\pgfnodeparttextbox
8322 }
8323 \backgroundpath{
8324 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8325
8326 \pgf@circ@res@step=\ctikzvalof{tripoles/oscillator/width}\pgf@circ@Rlen{}
8327
8328 \pgfscope
8329 \pgfstartlinewidth=\pgflinewidth
8330
8331 \pgftransformxshift{-0.5\pgf@circ@res@step} % The oscillator is shifted to the left, so a connection comes out of the anchor "east"
8332
8333 % draw outer box
8334 \ifpgf@circuit@boxed{}
8335 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8336 \fi
8337
8338 % draw outer circle
8339 \ifpgf@circuit@boxed
8340 \pgf@circ@res@step=.7\pgf@circ@res@step{}
8341 \pgfsetdash{}{0pt} % draw solid circle if boxed
8342 \else
8343 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8344 \fi
8345 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
8346 \pgfusepath{draw}
8347
8348 % draw inner sine waves
8349 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8350 \pgfsetlinewidth{\pgfstartlinewidth}
8351 \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
8352 \pgfpathmoveto{\pgfpoint{-0.3\pgf@circ@res@step}{0\pgf@circ@res@step}}
8353 \pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}}
8354 \pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}}
8355 \pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}}
8356 \pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}}
8357
8358 \pgfusepath{draw}
8359
8360 \endpgfscope
8361 }
8362 }
8363
8364 \pgfdeclareshape{circulator}
8365 {
8366 \savedanchor\northwest{
8367 \ifpgf@circuit@boxed
8368 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
8369 \pgf@y=.5\pgf@y
8370 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
8371 \pgf@x=.5\pgf@x
8372 \else
8373 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@circ@Rlen
8374 \pgf@y=.5\pgf@y
8375 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@circ@Rlen
8376 \pgf@x=.5\pgf@x
8377 \fi
8378 }
8379 \anchor{center}{
8380 \pgfpointorigin
8381 }
8382 \anchor{left}{%
8383 \northwest
8384 \pgf@y=0pt
8385 }
8386 \anchor{1}{
8387 \northwest
8388 \pgf@y=0pt
8389 }
8390 \anchor{2}{
8391 \northwest
8392 \pgf@y=0pt
8393 \pgf@x=-\pgf@x
8394 }
8395 \anchor{3}{
8396 \northwest
8397 \pgf@y=-\pgf@y
8398 \pgf@x=0pt
8399 }
8400 \anchor{east}{
8401 \northwest
8402 \pgf@y=0pt
8403 \pgf@x=-\pgf@x
8404 }
8405 \anchor{west}{
8406 \northwest
8407 \pgf@y=0pt
8408 }
8409 \anchor{south}{
8410 \northwest
8411 \pgf@x=0pt
8412 \pgf@y=-\pgf@y
8413 }
8414 \anchor{north}{
8415 \northwest
8416 \pgf@x=0pt
8417 }
8418 \anchor{south west}{
8419 \northwest
8420 \pgf@y=-\pgf@y
8421 }
8422 \anchor{north east}{
8423 \northwest
8424 \pgf@x=-\pgf@x
8425 }
8426 \anchor{north west}{
8427 \northwest
8428 }
8429 \anchor{south east}{
8430 \northwest
8431 \pgf@x=-\pgf@x
8432 \pgf@y=-\pgf@y
8433 }
8434 \backgroundpath{
8435 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8436
8437 \pgf@circ@res@step=\ctikzvalof{tripoles/circulator/width}\pgf@circ@Rlen
8438
8439 \pgfscope
8440 \pgfstartlinewidth=\pgflinewidth
8441
8442 % draw outer box
8443 \ifpgf@circuit@boxed
8444 \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8445 \fi
8446
8447 % draw outer circle
8448 \ifpgf@circuit@boxed{}
8449 \pgf@circ@res@step=.7\pgf@circ@res@step{}
8450 \pgfsetdash{}{0pt} % draw solid circle if boxed
8451 \else
8452 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8453 \fi
8454 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
8455 \pgfusepath{draw}
8456
8457 % inner arrow
8458 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8459 \pgfsetlinewidth{\pgfstartlinewidth}
8460
8461 \pgfsetarrowsend{latex}
8462 \pgfpathmoveto{\pgfpoint{-0.25\pgf@circ@res@step}{0}}
8463 \pgfpatharc{180}{-90} {0.25\pgf@circ@res@step}
8464 \pgfpathlineto{\pgfpoint{-5pt}{-0.2\pgf@circ@res@step}}
8465 \pgfusepath{draw}
8466
8467 \endpgfscope
8468 }
8469 }
8470
8471
8472 % Wilkinson divider
8473 \pgfdeclareshape{wilkinson}{
8474 \anchor{center}{
8475 \northwest
8476 \pgf@x=0pt
8477 \pgf@y=0pt
8478 }
8479 \savedanchor\northwest{%
8480 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/height}\pgf@circ@Rlen
8481 \pgf@y=.5\pgf@y
8482 \pgf@x= \pgf@circ@Rlen
8483 \pgf@x=.5\pgf@x
8484 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/width}\pgf@x
8485 }
8486 \anchor{north}{
8487 \northwest
8488 \pgf@x=0pt
8489 }
8490 \anchor{south}{
8491 \northwest
8492 \pgf@x=0pt
8493 \pgf@y=-\pgf@y
8494 }
8495 \anchor{west}{
8496 \northwest
8497 \pgf@y=0pt
8498 }
8499 \anchor{east}{
8500 \northwest
8501 \pgf@y=0pt
8502 \pgf@x=-\pgf@x
8503 }
8504 \anchor{south west}{
8505 \northwest
8506 \pgf@y=-\pgf@y
8507 }
8508 \anchor{north east}{
8509 \northwest
8510 \pgf@x=-\pgf@x
8511 }
8512 \anchor{north west}{
8513 \northwest
8514 }
8515 \anchor{south east}{
8516 \northwest
8517 \pgf@x=-\pgf@x
8518 \pgf@y=-\pgf@y
8519 }
8520 \anchor{in}{
8521 \northwest
8522 \pgf@y=0pt
8523 }
8524 \anchor{out1}{
8525 \northwest
8526 \pgf@x=-\pgf@x
8527 \pgf@y=-0.5\pgf@y
8528 }
8529 \anchor{out2}{
8530 \northwest
8531 \pgf@x=-\pgf@x
8532 \pgf@y=0.5\pgf@y
8533 }
8534 \anchor{text}{
8535 \northwest
8536 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
8537 \pgf@x=-.5\wd\pgfnodeparttextbox
8538 }
8539 \backgroundpath{
8540 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8541
8542 \northwest
8543 \pgf@circ@res@up = \pgf@y
8544 \pgf@circ@res@down = -\pgf@y
8545 \pgf@circ@res@right = -\pgf@x
8546 \pgf@circ@res@left = \pgf@x
8547
8548 \pgfstartlinewidth=\pgflinewidth
8549
8550 % draw outer box
8551 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8552 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
8553 \pgfusepath{draw}
8554
8555 % draw inner stuff
8556 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8557 \pgfsetarrows{-} %never draw arrows
8558 \pgfsetlinewidth{\pgfstartlinewidth}
8559 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
8560 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
8561 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8562 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8563 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
8564 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8565 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8566
8567 \pgfusepath{draw}
8568
8569 \pgfsetdash{}{0pt} % always draw solid line for inner symbol
8570 % draw inner resisitor - european or american style is recognised
8571 {
8572 \pgftransformshift{\pgfpoint{0.5\pgf@circ@res@right}{0pt}}
8573 \pgftransformrotate{90}
8574
8575 % calculate size of resistor
8576 \ifpgf@circuit@europeanresistor
8577 \pgfmathparse{\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/generic/width} / 2}
8578 \pgftransformscale{\pgfmathresult}
8579 \pgfnode{genericshape}{center}{}{pgf@generic}{\pgfusepath{fill}}
8580 \else
8581 \pgfmathparse{\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/resistor/width} / 2}
8582 \pgftransformscale{\pgfmathresult}
8583 \pgfnode{resistorshape}{center}{}{pgf@resistor}{\pgfusepath{fill}}
8584 \fi
8585 }
8586
8587 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
8588 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}}
8589
8590 \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}}
8591 \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
8592 \pgfusepath{draw}
8593
8594 }
8595 }
8596
8597 % electromechanical device (motor/generator)
8598 \pgfdeclareshape{elmech}
8599 {
8600 \savedanchor\northwest{
8601 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/height}\pgf@circ@Rlen
8602 \pgf@y=.5\pgf@y
8603 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/width}\pgf@circ@Rlen
8604 \pgf@x=.5\pgf@x
8605 }
8606 \anchor{center}{
8607 \pgfpointorigin
8608 }
8609 \anchor{text}{
8610 \pgfpointorigin
8611 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
8612 \advance \pgf@y by -.5\ht\pgfnodeparttextbox
8613 }
8614 \anchor{left}{%
8615 \northwest
8616 \pgf@y=0pt
8617 }
8618 \anchor{right}{%
8619 \northwest
8620 \pgf@y=0pt
8621 \pgf@x=-\pgf@x
8622 }
8623 \anchor{top}{
8624 \northwest
8625 \pgf@x=0pt
8626 }
8627 \anchor{pathstart}{
8628 \northwest
8629 \pgf@x=0pt
8630 }
8631 \anchor{pathend}{
8632 \northwest
8633 \pgf@x=0pt
8634 \pgf@y=-\pgf@y
8635 }
8636 \anchor{bottom}{
8637 \northwest
8638 \pgf@x=0pt
8639 \pgf@y=-\pgf@y
8640 }
8641 \anchor{center}{
8642 \pgf@y=0pt
8643 \pgf@x=0pt
8644 }
8645 \anchor{east}{
8646 \northwest
8647 \pgf@y=0pt
8648 \pgf@x=-\pgf@x
8649 }
8650 \anchor{west}{
8651 \northwest
8652 \pgf@y=0pt
8653 }
8654 \anchor{south}{
8655 \northwest
8656 \pgf@x=0pt
8657 \pgf@y=-\pgf@y
8658 }
8659 \anchor{north}{
8660 \northwest
8661 \pgf@x=0pt
8662 }
8663 \backgroundpath{
8664 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8665 \pgf@circ@res@step=\ctikzvalof{tripoles/elmech/width}\pgf@circ@Rlen
8666 \pgf@circ@res@up=\ctikzvalof{tripoles/elmech/height}\pgf@circ@Rlen
8667 \pgfscope
8668 \pgfstartlinewidth=\pgflinewidth
8669 % draw outer box
8670 % \ifpgf@circuit@boxed
8671 % \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8672 % \fi
8673 % draw outer circle
8674 %\ifpgf@circuit@boxed
8675 % \pgf@circ@res@step=.7\pgf@circ@res@step
8676 % \pgfsetdash{}{0pt} % draw solid circle if boxed
8677 %\else
8678 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8679 %\fi
8680 \pgfpathrectangle{\pgfpoint{-.25\pgf@circ@res@step}{-.5\pgf@circ@res@up}}{\pgfpoint{.5\pgf@circ@res@step}{\pgf@circ@res@up}}
8681 \pgfsetfillcolor{black}
8682 \pgfusepath{draw,fill}
8683 \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
8684 \pgfsetfillcolor{white}
8685 \pgfusepath{draw,fill}
8686 \endpgfscope
8687 }
8688 }
8689
8690 \pgfdeclareshape{magnetron}
8691 {
8692 \savedanchor\northwest{
8693 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf@circ@Rlen
8694 \pgf@y=.5\pgf@y
8695 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf@circ@Rlen
8696 \pgf@x=.5\pgf@x
8697 }
8698 \anchor{center}{
8699 \pgfpointorigin
8700 }
8701 \anchor{anode}{
8702 \northwest
8703 \pgf@x=0pt
8704 \pgf@y=-\pgf@y
8705 }
8706 \anchor{cathode1}{
8707 \northwest
8708 \pgf@circ@res@step=\pgf@y
8709 \pgfmathparse{cos(105)}
8710 \pgf@x=\pgfmathresult\pgf@circ@res@step
8711 \pgfmathparse{sin(105)}
8712 \pgf@y=\pgfmathresult\pgf@circ@res@step
8713 %\pgfpointorigin
8714 %\pgfpathmoveto{\pgfpointpolar{105}{\pgf@circ@res@step}}%not working in a scaled tikzpicture
8715 }
8716 \anchor{cathode2}{
8717 \northwest
8718 \pgf@circ@res@step=\pgf@y
8719 \pgfmathparse{cos(75)}
8720 \pgf@x=\pgfmathresult\pgf@circ@res@step
8721 \pgfmathparse{sin(75)}
8722 \pgf@y=\pgfmathresult\pgf@circ@res@step
8723 %\pgfpointorigin
8724 %\pgfpathmoveto{\pgfpointpolar{75}{\pgf@circ@res@step}}%not working in a scaled tikzpicture
8725 }
8726 \anchor{text}{
8727 \pgfpointorigin
8728 \advance \pgf@x by -.5\wd\pgfnodeparttextbox
8729 \advance \pgf@y by -.5\ht\pgfnodeparttextbox
8730 }
8731 \anchor{left}{%
8732 \northwest
8733 \pgf@y=0pt
8734 }
8735 \anchor{right}{%
8736 \northwest
8737 \pgf@y=0pt
8738 \pgf@x=-\pgf@x
8739 }
8740 \anchor{top}{
8741 \northwest
8742 \pgf@x=0pt
8743 }
8744 \anchor{pathstart}{
8745 \northwest
8746 \pgf@x=0pt
8747 }
8748 \anchor{pathend}{
8749 \northwest
8750 \pgf@x=0pt
8751 \pgf@y=-\pgf@y
8752 }
8753 \anchor{bottom}{
8754 \northwest
8755 \pgf@x=0pt
8756 \pgf@y=-\pgf@y
8757 }
8758 \anchor{center}{
8759 \pgf@y=0pt
8760 \pgf@x=0pt
8761 }
8762 \anchor{east}{
8763 \northwest
8764 \pgf@y=0pt
8765 \pgf@x=-\pgf@x
8766 }
8767 \anchor{west}{
8768 \northwest
8769 \pgf@y=0pt
8770 }
8771 \anchor{south}{
8772 \northwest
8773 \pgf@x=0pt
8774 \pgf@y=-\pgf@y
8775 }
8776 \anchor{north}{
8777 \northwest
8778 \pgf@x=0pt
8779 }
8780 \backgroundpath{
8781 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8782 \pgf@circ@res@step=\ctikzvalof{tripoles/magnetron/width}\pgf@circ@Rlen
8783 \northwest
8784 \pgf@circ@res@up = \pgf@y
8785 \pgf@circ@res@down = -\pgf@y
8786 \pgf@circ@res@right = -\pgf@x
8787 \pgf@circ@res@left = \pgf@x
8788 \pgfmathsetlength{\pgf@circ@res@other}{sin(15)*\pgf@circ@res@up}
8789
8790 \pgfscope
8791 \pgfstartlinewidth=\pgflinewidth
8792 % draw outer box
8793 % \ifpgf@circuit@boxed
8794 % \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
8795 % \fi
8796 % draw outer circle
8797 %\ifpgf@circuit@boxed
8798 % \pgf@circ@res@step=.7\pgf@circ@res@step
8799 % \pgfsetdash{}{0pt} % draw solid circle if boxed
8800 %\else
8801 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
8802 %\fi
8803 %create outer circle
8804 \pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@right}
8805 \pgfsetfillcolor{white}
8806 \pgfusepath{draw}
8807 %create chambers
8808 \foreach \angle in {45,135,225,315}{
8809 \pgfpathmoveto{ \pgfpointpolar{\angle}{0.6\pgf@circ@res@right}}
8810 \pgfpathlineto{ \pgfpointpolar{\angle}{\pgf@circ@res@right}}
8811 }
8812 \pgfsetroundcap
8813 \pgfusepath{draw}
8814 \pgfscope
8815 %draw connection from outside
8816 %anode
8817 \pgfsetlinewidth{\pgfstartlinewidth}
8818 \pgfpathmoveto{\pgfpoint{0\pgf@circ@res@left}{\pgf@circ@res@down}}
8819 \pgfpathlineto{\pgfpoint{0\pgf@circ@res@right}{.5\pgf@circ@res@down}}
8820 %cathodes
8821 \pgfpathmoveto{\pgfpointpolar{105}{\pgf@circ@res@up}}
8822 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{.5\pgf@circ@res@up}}
8823 \pgfpathmoveto{\pgfpointpolar{75}{\pgf@circ@res@up}}
8824 \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
8825 \pgfsetbuttcap
8826 \pgfusepath{draw}
8827 \endpgfscope
8828 %create cathode
8829 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
8830 \pgfpathlineto{\pgfpoint{0}{.15\pgf@circ@res@up}}
8831 \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{.5\pgf@circ@res@up}}
8832 \pgfusepath{draw}
8833 %create anode
8834 \pgfpathmoveto{\pgfpoint{0.3\pgf@circ@res@left}{.5\pgf@circ@res@down}}
8835 \pgfpathlineto{\pgfpoint{0.3\pgf@circ@res@right}{.5\pgf@circ@res@down}}
8836
8837 \pgfsetbuttcap
8838 \pgfusepath{draw}
8839 \endpgfscope
8840 }
8841 }
8842
8843 %%%---------- close: tex/pgfcirctripoles
8844 %%%%%%%%%%% Springe nach tex/pgfcircquadpoles
8845 %%%---------- open: tex/pgfcircquadpoles.tex
8846 % Copyright 2007-2009 by Massimo Redaelli
8847 %
8848 % This file may be distributed and/or modified
8849 %
8850 % 1. under the LaTeX Project Public License and/or
8851 % 2. under the GNU Public License.
8852 %
8853 % See the file doc/LICENSE for more details.
8854
8855 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8856 %% Quadripoles
8857
8858 \long\def\pgfcircdeclarequadpole#1#2#3{
8859 \pgfdeclareshape{#1}
8860 {
8861 \anchor{center}{
8862 \northwest
8863 \pgf@x=0pt
8864 }
8865 \savedanchor\northwest{%
8866 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@circ@Rlen
8867 \pgf@y=.5\pgf@y
8868 \pgf@x=.5\pgf@circ@Rlen
8869 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x
8870 }
8871 \anchor{A2}{
8872 \northwest
8873 \pgf@y=-\pgf@y
8874 }
8875 \anchor{B1}{
8876 \northwest
8877 \pgf@x=-\pgf@x
8878 }
8879 \anchor{A1}{
8880 \northwest
8881 }
8882 \anchor{B2}{
8883 \northwest
8884 \pgf@x=-\pgf@x
8885 \pgf@y=-\pgf@y
8886 }
8887 \anchor{north}{
8888 \northwest
8889 \pgf@x=0pt
8890 }
8891 \anchor{south}{
8892 \northwest
8893 \pgf@x=0pt
8894 \pgf@y=-\pgf@y
8895 }
8896 \anchor{west}{
8897 \northwest
8898 \pgf@y=0pt
8899 }
8900 \anchor{east}{
8901 \northwest
8902 \pgf@y=0pt
8903 \pgf@x=-\pgf@x
8904 }
8905 \anchor{south west}{
8906 \northwest
8907 \pgf@y=-\pgf@y
8908 }
8909 \anchor{north east}{
8910 \northwest
8911 \pgf@x=-\pgf@x
8912 }
8913 \anchor{north west}{
8914 \northwest
8915 }
8916 \anchor{south east}{
8917 \northwest
8918 \pgf@x=-\pgf@x
8919 \pgf@y=-\pgf@y
8920 }
8921 \anchor{base}{
8922 \northwest
8923 \pgf@x=0pt
8924 }
8925 #3
8926 \backgroundpath{
8927 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
8928
8929 \northwest
8930 \pgf@circ@res@up = \pgf@y
8931 \pgf@circ@res@down = -\pgf@y
8932 \pgf@circ@res@right = -\pgf@x
8933 \pgf@circ@res@left = \pgf@x
8934
8935 #2
8936
8937 }
8938 }
8939 }
8940
8941
8942
8943 \def\pgf@circ@drawtransformerbasicanchor{
8944 \pgfkeysvalueof{/tikz/circuitikz/quadpoles/trans/height}
8945 \anchor{AA2}{
8946 \northwest
8947 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8948 \pgf@x=.7\pgf@x
8949 \pgf@y=-\pgf@y
8950 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8951 }
8952 \anchor{BB1}{
8953 \northwest
8954 \pgf@x=-\pgf@x
8955 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8956 \pgf@x=.7\pgf@x
8957 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8958 }
8959 \anchor{AA1}{
8960 \northwest
8961 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8962 \pgf@x=.7\pgf@x
8963 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8964 }
8965 \anchor{BB2}{
8966 \northwest
8967 \pgf@x=-\pgf@x
8968 \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
8969 \pgf@x=.7\pgf@x
8970 \pgf@y=-\pgf@y
8971 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
8972 }
8973 }
8974
8975 \def\pgf@circ@drawtransformerbasicbody{
8976 \def\stretto{.4}
8977 \pgfscope
8978 \pgfslopedattimetrue
8979 \pgfallowupsidedownattimetrue
8980 \pgftransformlineattime{.5}{%
8981 \pgfpoint%
8982 {\stretto\pgf@circ@res@left}%
8983 {\pgf@circ@res@up}%
8984 }{%
8985 \pgfpoint
8986 {\stretto\pgf@circ@res@left}%
8987 {\pgf@circ@res@down}%
8988 }
8989
8990 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
8991 \def\pgf@temp{european}%
8992 \ifx\pgf@temp\pgf@circ@temp%
8993 \pgfnode{fullgenericshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8994 \else%
8995 \def\pgf@temp{cute}
8996 \ifx\pgf@temp\pgf@circ@temp%
8997 \pgfnode{cuteinductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
8998 \else%
8999 \pgfnode{americaninductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}}
9000 \fi%
9001 \fi%
9002
9003
9004 \endpgfscope
9005 \pgfscope
9006 \pgfslopedattimetrue
9007 \pgfallowupsidedownattimetrue
9008 \pgftransformlineattime{.5}{%
9009 \pgfpoint%
9010 {\stretto\pgf@circ@res@right}%
9011 {\pgf@circ@res@down}%
9012 }{%
9013 \pgfpoint
9014 {\stretto\pgf@circ@res@right}%
9015 {\pgf@circ@res@up}%
9016 }
9017
9018 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
9019 \def\pgf@temp{european}%
9020 \ifx\pgf@temp\pgf@circ@temp%
9021 \pgfnode{fullgenericshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
9022 \else%
9023 \def\pgf@temp{cute}
9024 \ifx\pgf@temp\pgf@circ@temp%
9025 \pgfnode{cuteinductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
9026 \else%
9027 \pgfnode{americaninductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}}
9028 \fi%
9029 \fi%
9030
9031 \endpgfscope
9032
9033 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
9034 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
9035 \pgfpathlineto{\pgfpointanchor{pgf@inductor1}{b}}
9036
9037 \pgfpathmoveto{\pgfpointanchor{pgf@inductor1}{a}}
9038 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
9039 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
9040
9041 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
9042 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
9043 \pgfpathlineto{\pgfpointanchor{pgf@inductor2}{a}}
9044
9045 \pgfpathmoveto{\pgfpointanchor{pgf@inductor2}{b}}
9046 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
9047 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
9048
9049 \pgfusepath{draw}
9050
9051 }
9052
9053
9054
9055 % contrib Kristofer M. Monisit
9056
9057 \pgfdeclareshape{fd op amp}
9058 {
9059 \anchor{center}{\pgfpointorigin}
9060 \savedanchor\northwest{%
9061 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
9062 \pgf@y=.5\pgf@y
9063 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
9064 \pgf@x=.5\pgf@x
9065 }
9066 \anchor{south}{
9067 \northwest
9068 \pgf@y=-\pgf@y
9069 }
9070 \anchor{north}{
9071 \northwest
9072 }
9073 \savedanchor\left{%
9074 \pgf@y=0pt
9075 }
9076 \savedanchor\inOne{%
9077 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
9078 \pgf@y=.5\pgf@y
9079 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
9080 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
9081 \pgf@x=.5\pgf@x
9082 }
9083 \anchor{-}{
9084 \inOne
9085 }
9086 \anchor{+}{
9087 \inOne
9088 \pgf@y=-\pgf@y
9089 }
9090 \savedanchor\up{%
9091 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
9092 \pgf@y=.5\pgf@y
9093 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
9094 \pgf@x=.5\pgf@x
9095 \pgf@circ@res@up = \pgf@y
9096 \pgf@circ@res@right = -\pgf@x
9097 \pgf@circ@res@left = \pgf@x
9098 \pgfpointlineattime{
9099 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
9100 \pgfpoint{
9101 \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
9102 {\pgf@circ@res@up}}
9103 {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
9104 }
9105 \anchor{up}{
9106 \up
9107 }
9108 \anchor{down}{
9109 \up
9110 \pgf@y=-\pgf@y
9111 }
9112 \anchor{out +}{
9113 \northwest
9114 \pgf@y=.5\pgf@y
9115 \pgf@x=-.7\pgf@x
9116 }
9117 \anchor{out -}{
9118 \northwest
9119 \pgf@y=-.5\pgf@y
9120 \pgf@x=-.7\pgf@x
9121 }
9122 \anchor{west}{
9123 \left
9124 }
9125 \anchor{east}{
9126 \left
9127 \pgf@x=-\pgf@x
9128 }
9129
9130 \backgroundpath{
9131 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
9132
9133 \northwest
9134 \pgf@circ@res@up = \pgf@y
9135 \pgf@circ@res@down = -\pgf@y
9136 \pgf@circ@res@right = -\pgf@x
9137 \pgf@circ@res@left = \pgf@x
9138
9139 % Negative input terminal
9140 \pgfpathmoveto{\pgfpoint
9141 {\pgf@circ@res@left}
9142 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
9143 \pgfpathlineto{\pgfpoint
9144 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
9145 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
9146 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
9147
9148
9149 % Positive input terminal
9150 \pgfpathmoveto{\pgfpoint
9151 {\pgf@circ@res@left}
9152 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
9153 \pgfpathlineto{\pgfpoint
9154 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
9155 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
9156 \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
9157
9158
9159 % Negative output terminal
9160 \pgfpathmoveto{\pgfpoint
9161 {0.7\pgf@circ@res@right}
9162 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
9163 \pgfpathlineto{\pgfpoint
9164 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
9165 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
9166 \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
9167
9168
9169 % Positive output terminal
9170 \pgfpathmoveto{\pgfpoint
9171 {0.7\pgf@circ@res@right}
9172 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
9173 \pgfpathlineto{\pgfpoint
9174 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
9175 {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
9176 \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
9177
9178 \pgfsetrectcap
9179 % Draw them all!
9180 \pgfusepath{draw}
9181
9182 % Triangle
9183 \pgfscope
9184 \pgfsetlinewidth{2\pgflinewidth}
9185 \pgftransformxshift{.7\pgf@circ@res@left}
9186 \pgf@circ@res@step=\pgf@circ@res@right
9187 \advance\pgf@circ@res@step by -\pgf@circ@res@left
9188 \pgf@circ@res@step=.7\pgf@circ@res@step
9189 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
9190 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
9191 \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
9192 \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
9193 \pgfpathclose
9194 \pgfusepath{draw}
9195 \endpgfscope
9196 }
9197 }
9198
9199
9200
9201
9202 \pgfcircdeclarequadpole{transformer}{
9203
9204 \pgf@circ@drawtransformerbasicbody
9205
9206 }{\pgf@circ@drawtransformerbasicanchor}
9207
9208 \pgfcircdeclarequadpole{transformer core}{
9209
9210 \pgf@circ@drawtransformerbasicbody
9211
9212 \pgfmoveto{\pgfpoint%
9213 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
9214 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
9215 }
9216 \pgflineto{
9217 \pgfpoint
9218 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
9219 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
9220 }
9221
9222 \pgfmoveto{\pgfpoint%
9223 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
9224 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
9225 }
9226 \pgflineto{
9227 \pgfpoint
9228 {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
9229 {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
9230 }
9231
9232 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth}
9233 \pgfusepath{draw}
9234 }{\pgf@circ@drawtransformerbasicanchor}
9235
9236
9237 \pgfcircdeclarequadpole{gyrator}{
9238
9239 \def\stretto{.4}
9240
9241 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
9242 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
9243 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
9244 \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
9245
9246 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
9247 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
9248 \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
9249 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
9250
9251 \pgfusepath{draw}
9252
9253 \pgfsetlinewidth{2\pgflinewidth}
9254 \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@left}{.7*\stretto\pgf@circ@res@down}}
9255 \pgfpatharc{90}{270}{.7*\stretto\pgf@circ@res@down}
9256
9257 \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@right}{.7*\stretto\pgf@circ@res@up}}
9258 \pgfpatharc{-90}{90}{.7*\stretto\pgf@circ@res@down}
9259 \pgfusepath{draw}
9260
9261 }{}
9262
9263 %% four-port
9264 % defines a general outer box for four-ports
9265 % TikZ usage:
9266 % \draw (0,0) node[coupler](coup){\SI{-3}{dB}}
9267 % (coup.port1) to[short,-o] ++(-1,0)
9268 %
9269
9270 \long\def\pgfcircdeclarefourport#1#2{
9271 \pgfdeclareshape{#1}{
9272 \anchor{center}{
9273 \northwest
9274 \pgf@x=0pt
9275 \pgf@y=0pt
9276 }
9277 \savedanchor\northwest{%
9278 \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@circ@Rlen
9279 \pgf@y=.5\pgf@y
9280 \pgf@x=.5\pgf@circ@Rlen
9281 \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x
9282 }
9283 \anchor{north}{
9284 \northwest
9285 \pgf@x=0pt
9286 }
9287 \anchor{south}{
9288 \northwest
9289 \pgf@x=0pt
9290 \pgf@y=-\pgf@y
9291 }
9292 \anchor{west}{
9293 \northwest
9294 \pgf@y=0pt
9295 }
9296 \anchor{east}{
9297 \northwest
9298 \pgf@y=0pt
9299 \pgf@x=-\pgf@x
9300 }
9301 \anchor{south west}{
9302 \northwest
9303 \pgf@y=-\pgf@y
9304 }
9305 \anchor{north east}{
9306 \northwest
9307 \pgf@x=-\pgf@x
9308 }
9309 \anchor{north west}{
9310 \northwest
9311 }
9312 \anchor{south east}{
9313 \northwest
9314 \pgf@x=-\pgf@x
9315 \pgf@y=-\pgf@y
9316 }
9317 \anchor{port1}{
9318 \northwest
9319 \pgf@y=-0.5\pgf@y
9320 }
9321 \anchor{port2}{
9322 \northwest
9323 \pgf@x=-\pgf@x
9324 \pgf@y=-0.5\pgf@y
9325 }
9326 \anchor{port3}{
9327 \northwest
9328 \pgf@x=-\pgf@x
9329 \pgf@y=0.5\pgf@y
9330 }
9331 \anchor{port4}{
9332 \northwest
9333 \pgf@y=0.5\pgf@y
9334 }
9335 \anchor{1}{
9336 \northwest
9337 \pgf@y=-0.5\pgf@y
9338 }
9339 \anchor{2}{
9340 \northwest
9341 \pgf@x=-\pgf@x
9342 \pgf@y=-0.5\pgf@y
9343 }
9344 \anchor{3}{
9345 \northwest
9346 \pgf@x=-\pgf@x
9347 \pgf@y=0.5\pgf@y
9348 }
9349 \anchor{4}{
9350 \northwest
9351 \pgf@y=0.5\pgf@y
9352 }
9353
9354 \anchor{text}{
9355 \northwest
9356 \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
9357 \pgf@x=-.5\wd\pgfnodeparttextbox
9358 }
9359 \backgroundpath{
9360 \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
9361
9362 \northwest
9363 \pgf@circ@res@up = \pgf@y
9364 \pgf@circ@res@down = -\pgf@y
9365 \pgf@circ@res@right = -\pgf@x
9366 \pgf@circ@res@left = \pgf@x
9367
9368 \pgfstartlinewidth=\pgflinewidth
9369
9370 % draw outer box
9371 \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
9372 \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
9373 \pgfusepath{draw}
9374
9375 % draw inner stuff
9376 #2
9377
9378 % draw inner text
9379 \pgftext[center,x=-0.15\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
9380 }
9381 }
9382 }
9383
9384 % four-port
9385 \pgfcircdeclarefourport{fourport}{}
9386
9387
9388 % straight coupler
9389 \pgfcircdeclarefourport{coupler}{
9390 \pgfsetlinewidth{\pgfstartlinewidth}
9391 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}}
9392 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
9393 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
9394 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
9395 \pgfusepath{draw}
9396
9397 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
9398 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@up}}
9399 \pgfsetarrows{latex-latex}
9400 \pgfusepath{draw}
9401 \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
9402 \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@down}}
9403 \pgfsetarrows{latex-latex}
9404 \pgfusepath{draw}
9405 }
9406
9407 % "bended" coupler
9408 \pgfcircdeclarefourport{coupler2}{
9409 \pgfsetlinewidth{\pgfstartlinewidth}
9410 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}}
9411 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
9412 \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
9413 \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
9414 \pgfusepath{draw}
9415
9416 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
9417 \pgfpatharc{0}{90} {0.4\pgf@circ@res@up}
9418 \pgfsetarrowsend{latex}
9419 \pgfusepath{draw}
9420 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
9421 \pgfpatharc{0}{-90} {0.4\pgf@circ@res@up}
9422 \pgfsetarrowsend{latex}
9423 \pgfusepath{draw}
9424
9425 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
9426 \pgfpatharc{180}{90} {0.4\pgf@circ@res@up}
9427 \pgfsetarrowsend{latex}
9428 \pgfusepath{draw}
9429 \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
9430 \pgfpatharc{-180}{-90} {0.4\pgf@circ@res@up}
9431 \pgfsetarrowsend{latex}
9432 \pgfusepath{draw}
9433
9434
9435 }
9436 %%%---------- close: tex/pgfcircquadpoles
9437
9438 %%%%%%%%%%% Springe nach tex/pgfcirclabel
9439 %%%---------- open: tex/pgfcirclabel.tex
9440 % Copyright 2007-2009 by Massimo Redaelli
9441 %
9442 % This file may be distributed and/or modified
9443 %
9444 % 1. under the LaTeX Project Public License and/or
9445 % 2. under the GNU Public License.
9446 %
9447 % See the file doc/LICENSE for more details.
9448
9449 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9450 %% Bipole label positioning
9451
9452 %% Options
9453 \ctikzset{label/.style = { l=#1 } }
9454 \ctikzset{l/.code = {
9455 \pgfkeys{/tikz/circuitikz/bipole/label/name=#1}
9456 \ctikzsetvalof{bipole/label/unit}{}
9457 \ifpgf@circ@siunitx
9458 \pgf@circ@handleSI{#1}
9459 \ifpgf@circ@siunitx@res
9460 \edef\pgf@temp{\pgf@circ@handleSI@val}
9461 \pgfkeyslet{/tikz/circuitikz/bipole/label/name}{\pgf@temp}
9462 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9463 \pgfkeyslet{/tikz/circuitikz/bipole/label/unit}{\pgf@temp}
9464 \else
9465 \fi
9466 \else
9467 \fi
9468 }}
9469
9470 \ctikzset{label above/.code = {
9471 l=#1,
9472 \circuitikzbasekey/bipole/label/position=90 }
9473 }
9474
9475 \ctikzset{l^/.style = {
9476 l=#1,
9477 \circuitikzbasekey/bipole/label/position=90 }
9478 }
9479
9480 \ctikzset{label below/.code = {
9481 l=#1,
9482 \circuitikzbasekey/bipole/label/position=-90 }
9483 }
9484
9485 \ctikzset{l_/.style = {
9486 l=#1,
9487 \circuitikzbasekey/bipole/label/position=-90 }
9488 }
9489
9490 \ctikzset{annotation/.style = { a=#1 } }
9491 \ctikzset{a/.code = {
9492 \pgfkeys{/tikz/circuitikz/bipole/annotation/name=#1}
9493 \ctikzsetvalof{bipole/annotation/unit}{}
9494 \ifpgf@circ@siunitx
9495 \pgf@circ@handleSI{#1}
9496 \ifpgf@circ@siunitx@res
9497 \edef\pgf@temp{\pgf@circ@handleSI@val}
9498 \pgfkeyslet{/tikz/circuitikz/bipole/annotation/name}{\pgf@temp}
9499 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9500 \pgfkeyslet{/tikz/circuitikz/bipole/annotation/unit}{\pgf@temp}
9501 \else
9502 \fi
9503 \else
9504 \fi
9505 }}
9506
9507 \ctikzset{annotation above/.code = {
9508 a=#1,
9509 \circuitikzbasekey/bipole/annotation/position=90 }
9510 }
9511
9512 \ctikzset{a^/.style = {
9513 a=#1,
9514 \circuitikzbasekey/bipole/annotation/position=90 }
9515 }
9516
9517 \ctikzset{annotation below/.code = {
9518 a=#1,
9519 \circuitikzbasekey/bipole/annotation/position=-90 }
9520 }
9521 \ctikzset{a_/.style = {
9522 a=#1,
9523 \circuitikzbasekey/bipole/annotation/position=-90 }
9524 }
9525
9526
9527
9528 \def\pgf@circ@drawlabels#1{
9529 \pgfextra{
9530 \pgfmathsubtract{\pgf@circ@direction}{90}
9531 \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9532
9533 \edef\pgf@circ@temp{\ctikzvalof{bipole/#1/position}}
9534 \ifnum \pgf@circ@temp < 0
9535 \pgfmathadd{\pgf@circ@labanc}{180}
9536 \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9537 \fi
9538 \ifpgf@circuit@bipole@inverted
9539 \pgfmathadd{\pgf@circ@temp}{180} %If shape is inverted, use opposite anchor
9540 \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9541 \fi
9542
9543 \ifnum \ctikzvalof{mirror value} = -1
9544 \pgfmathadd{\pgf@circ@temp}{180} %If shape is mirrored, use opposite anchor
9545 \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9546 \fi
9547 }
9548 %Firstly, place a coodinate directly at the edge of the shape
9549 (\ctikzvalof{bipole/name}.\pgf@circ@temp) coordinate (labelcoor)
9550 %now decide, which labels should be drawn
9551 \pgfextra{
9552 \edef\pgf@temp{\ctikzvalof{label/align}}
9553 \def\pgf@circ@temp{straight}
9554 }
9555 \ifx\pgf@temp\pgf@circ@temp %straight
9556 \pgf@circ@drawreglabels{#1}
9557 \else
9558 \pgfextra{\def\pgf@circ@temp{rotate}}
9559 \ifx\pgf@temp\pgf@circ@temp %rotate
9560 \pgf@circ@drawrotlabels{#1}
9561 \else% smart
9562 \pgf@circ@drawsmartlabels{#1}
9563 \fi
9564 \fi
9565 }
9566
9567
9568 \def\pgf@circ@drawsmartlabels#1{
9569 \pgfextra{
9570 \pgfmathmod{\pgf@circ@direction}{90}
9571 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9572 }
9573 \ifnum \pgfcircmathresult > 20
9574 \ifnum \pgfcircmathresult < 70
9575 \pgf@circ@drawrotlabels{#1}
9576 \else
9577 \pgf@circ@drawreglabels{#1}
9578 \fi
9579 \else
9580 \pgf@circ@drawreglabels{#1}
9581 \fi
9582 }
9583
9584
9585 \def\pgf@circ@drawrotlabels#1{
9586 \pgfextra{
9587 \ifnum \ctikzvalof{bipole/#1/position}>0
9588 %we need some more space for placement below, due to mid-anchor
9589 \def\pgf@circ@labposdistance{1.5ex}
9590 \else
9591 \def\pgf@circ@labposdistance{2ex}
9592 \fi
9593 %Calculate rotation of the label from direction and strip decimals
9594 \edef\pgfcirclabrot{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
9595 % rotate the label at second or third quadrant:
9596 \ifnum \pgfcirclabrot > 90 \ifnum \pgfcirclabrot < 270
9597 \pgfmathsubtract{\pgf@circ@direction}{180}
9598 \edef\pgfcirclabrot{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9599 %invert the space relationships due to rotatet strings
9600 \ifnum \ctikzvalof{bipole/#1/position}>0
9601 \def\pgf@circ@labposdistance{2ex}
9602 \else
9603 \def\pgf@circ@labposdistance{1.5ex}
9604 \fi
9605 \fi\fi
9606 \pgfmathparse{\ctikzvalof{bipole/#1/position}>0?\pgf@circ@direction+90:\pgf@circ@direction-90}
9607 \edef\pgf@circ@labposangle{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9608 }
9609 (labelcoor)++(\pgf@circ@labposangle:\pgf@circ@labposdistance) coordinate(labelcoor)
9610 node[anchor=mid,rotate=\pgfcirclabrot](\ctikzvalof{bipole/name}#1){\pgf@circ@finallabels{#1}}
9611 }
9612
9613 \def\pgf@circ@drawreglabels#1{
9614
9615 %Now calculate all shape positions
9616 %Use mid-anchor at x-axis and base-anchor at y-axis, respectively.
9617 %All points between will be addressed by angled-anchors:
9618 \pgfextra{
9619 \pgfmathadd{\pgf@circ@labanc}{90}
9620 \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9621 \pgfmathparse{mod(\pgf@circ@temp,180)>135?mod(\pgf@circ@temp,180)-180:mod(\pgf@circ@temp,180)}
9622 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
9623 }
9624 %Values between -5 and 5 are at pos /neg x-axis, values around 90 are at both y-axis
9625 \ifnum \pgfcircmathresult > 84 \ifnum \pgfcircmathresult< 96
9626 \pgfextra{\edef\pgf@circ@labpos{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}}
9627 \ifnum \pgf@circ@labpos > 180
9628 \ifnum \ctikzvalof{bipole/#1/position} > 0
9629 \pgfextra{\def\pgf@circ@labanc{mid west}}
9630 \else
9631 \pgfextra{\def\pgf@circ@labanc{mid east}}
9632 \fi
9633 \else
9634 \ifnum \ctikzvalof{bipole/#1/position} > 0
9635 \pgfextra{\def\pgf@circ@labanc{mid east}}
9636 \else
9637 \pgfextra{\def\pgf@circ@labanc{mid west}}
9638 \fi
9639 \fi
9640 \fi\fi
9641 \ifnum \pgfcircmathresult <6
9642 \ifnum \ctikzvalof{bipole/#1/position} < 0
9643 %we need some more space for placement below, due to mid-anchor
9644 (labelcoor)++(-\pgf@circ@labanc:2ex) coordinate(labelcoor)
9645 \else
9646 (labelcoor)++(-\pgf@circ@labanc:1.5ex) coordinate(labelcoor)
9647 \fi
9648 \pgfextra{\def\pgf@circ@labanc{mid}}
9649 \fi
9650 (labelcoor) node[anchor=\pgf@circ@labanc](\ctikzvalof{bipole/name}#1){\pgf@circ@finallabels{#1}}
9651 }
9652
9653 \def\pgf@circ@finallabels#1{%
9654 \edef\pgf@temp{}%
9655 \edef\pgf@circ@temp{\ctikzvalof{bipole/#1/unit}}%
9656 \ifx\pgf@temp\pgf@circ@temp%
9657 \ctikzvalof{bipole/#1/name}%
9658 \else%
9659 $\SI{\ctikzvalof{bipole/#1/name}}{\ctikzvalof{bipole/#1/unit}}$%
9660 \fi%
9661 }
9662
9663 \ctikzset{text/.style = { t=#1 } }
9664 \ctikzset{t/.code = {
9665 \ctikzsetvalof{bipoles/twoport/text}{#1}
9666 }}
9667 %%%---------- close: tex/pgfcirclabel
9668 %%%%%%%%%%% Springe nach tex/pgfcircvoltage
9669 %%%---------- open: tex/pgfcircvoltage.tex
9670 % Copyright 2007-2009 by Massimo Redaelli
9671 %
9672 % This file may be distributed and/or modified
9673 %
9674 % 1. under the LaTeX Project Public License and/or
9675 % 2. under the GNU Public License.
9676 %
9677 % See the file doc/LICENSE for more details.
9678
9679 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9680 %% Voltage management
9681
9682
9683 \ctikzset{v^>/.style = {
9684 v = #1,
9685 \circuitikzbasekey/bipole/voltage/direction = forward,
9686 \circuitikzbasekey/bipole/voltage/position = above
9687 }
9688 }
9689
9690 \ctikzset{v^</.style = {
9691 v = #1,
9692 \circuitikzbasekey/bipole/voltage/direction = backward,
9693 \circuitikzbasekey/bipole/voltage/position = above
9694 }
9695 }
9696
9697 \ctikzset{v_>/.style = {
9698 v = #1,
9699 \circuitikzbasekey/bipole/voltage/direction = forward,
9700 \circuitikzbasekey/bipole/voltage/position = below
9701 }
9702 }
9703
9704 \ctikzset{v_</.style = {
9705 v = #1,
9706 \circuitikzbasekey/bipole/voltage/direction = backward,
9707 \circuitikzbasekey/bipole/voltage/position = below
9708 }
9709 }
9710
9711 \ctikzset{v_/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = below} }
9712 \ctikzset{v^/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = above} }
9713 \ctikzset{v>/.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = forward} }
9714 \ctikzset{v</.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = backward} }
9715
9716 % Default position varies whether the component is a voltage source
9717 % or not
9718 \ctikzset{v/.code = {
9719 \ifpgf@circuit@bipole@isvoltage
9720 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=above,
9721 \circuitikzbasekey/bipole/voltage/direction=forward}
9722 \else
9723 \ifpgf@circ@oldvoltagedirection
9724 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9725 \circuitikzbasekey/bipole/voltage/direction=backward}
9726 \else
9727 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9728 \circuitikzbasekey/bipole/voltage/direction=forward}
9729 \fi
9730 \fi
9731 \ifpgf@circ@oldvoltagedirection\else
9732 \ifpgf@circuit@bipole@iscurrent
9733 \ifpgf@circuit@bipole@current@backward
9734 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9735 \circuitikzbasekey/bipole/voltage/direction=forward}
9736 \else
9737 \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
9738 \circuitikzbasekey/bipole/voltage/direction=backward}
9739 \fi\fi\fi
9740 \pgfkeys{/tikz/circuitikz/bipole/voltage/label/name=#1}
9741 \ctikzsetvalof{bipole/voltage/label/unit}{}
9742 \ifpgf@circ@siunitx
9743 \pgf@circ@handleSI{#1}
9744 \ifpgf@circ@siunitx@res
9745 \edef\pgf@temp{\pgf@circ@handleSI@val}
9746 \pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/name}{\pgf@temp}
9747 \edef\pgf@temp{\pgf@circ@handleSI@unit}
9748 \pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/unit}{\pgf@temp}
9749 \else
9750 \fi
9751 \else
9752 \fi
9753 }
9754 }
9755
9756
9757
9758
9759 %% Output routine for generic bipoles
9760
9761 \def\pgf@circ@drawvoltagegeneric{
9762 \pgfextra{
9763 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/straight label distance}
9764 \pgfkeysifdefined{\pgf@temp}
9765 {
9766 \edef\partheight{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/straight label distance}}
9767 \edef\tmpdistfromline{(\partheight\pgf@circ@Rlen)}
9768 }
9769 {
9770 \pgfkeysifdefined{/tikz/circuitikz/bipoles/voltage/straight label distance}
9771 {
9772 \edef\partheight{\ctikzvalof{bipoles/voltage/straight label distance}}
9773 \edef\tmpdistfromline{(\partheight\pgf@circ@Rlen)}
9774 }
9775 {%calculate default value from part height
9776 \edef\partheight{0.5*\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/height}}
9777 \edef\tmpdistfromline{(\partheight\pgf@circ@Rlen+0.2\pgf@circ@Rlen)}
9778 }
9779 }
9780 \ifnum \ctikzvalof{mirror value}=-1
9781 \ifpgf@circuit@bipole@inverted
9782 \ifpgf@circuit@bipole@voltage@straight
9783 \def\distfromline{\tmpdistfromline}
9784 \else
9785 \def\distfromline{\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
9786 \fi
9787 \else
9788 \ifpgf@circuit@bipole@voltage@straight
9789 \def\distfromline{-\tmpdistfromline}
9790 \else
9791 \def\distfromline{-\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
9792 \fi
9793 \fi
9794 \else
9795 \ifpgf@circuit@bipole@inverted
9796 \ifpgf@circuit@bipole@voltage@straight
9797 \def\distfromline{-\tmpdistfromline}
9798 \else
9799 \def\distfromline{-\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
9800 \fi
9801 \else
9802 \ifpgf@circuit@bipole@voltage@straight
9803 \def\distfromline{\tmpdistfromline}
9804 \else
9805 \def\distfromline{\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
9806 \fi
9807 \fi
9808 \fi
9809 \ifpgf@circuit@bipole@voltage@below
9810 \def\pgf@circ@voltage@angle{90}
9811 \else
9812 \def\pgf@circ@voltage@angle{-90}
9813 \fi
9814 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}
9815 \pgfkeysifdefined{\pgf@temp}
9816 { \edef\distacefromnode{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}} }
9817 { \edef\distacefromnode{\ctikzvalof{voltage/distance from node}} }
9818 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}
9819 \pgfkeysifdefined{\pgf@temp}
9820 { \edef\bumpb{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}} }
9821 { \edef\bumpb{\ctikzvalof{voltage/bump b}} }
9822 }
9823 % %\pgf@circ@Rlen/16 is equal to the length of the currarrow
9824 coordinate (pgfcirc@midtmp) at ($(\tikztostart) ! \pgf@circ@Rlen/16 ! (anchorstartnode)$) %absolute move, minimum space is length of arrowhead
9825 coordinate (pgfcirc@midtmp) at ($(pgfcirc@midtmp) ! \distacefromnode ! (anchorstartnode)$)
9826
9827 coordinate (pgfcirc@Vfrom) at ($(pgfcirc@midtmp) ! -\distfromline ! \pgf@circ@voltage@angle:(anchorstartnode)$)
9828 coordinate (pgfcirc@midtmp) at ($(\tikztotarget) ! \pgf@circ@Rlen/16 ! (anchorendnode)$)%absolute move, minimum space is length of arrowhead
9829 coordinate (pgfcirc@midtmp) at ($(pgfcirc@midtmp) ! \distacefromnode ! (anchorendnode)$)
9830
9831 coordinate (pgfcirc@Vto) at ($(pgfcirc@midtmp) ! \distfromline ! \pgf@circ@voltage@angle : (anchorendnode)$)
9832
9833 \ifpgf@circuit@bipole@voltage@below
9834 coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-110)$)
9835 coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-70)$)
9836 \else
9837 coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.110)$)
9838 coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.70)$)
9839 \fi
9840
9841 \ifpgf@circuit@europeanvoltage
9842 \ifpgf@circuit@bipole@voltage@straight
9843 \ifpgf@circuit@bipole@voltage@backward
9844 (pgfcirc@Vto) --(pgfcirc@Vfrom) node[currarrow, sloped, allow upside down, pos=1,anchor=tip] {}
9845 \else
9846 (pgfcirc@Vfrom) --(pgfcirc@Vto) node[currarrow, sloped, allow upside down, pos=1,anchor=tip] {}
9847 \fi
9848 \else
9849 \ifpgf@circuit@bipole@voltage@backward
9850 (pgfcirc@Vto) .. controls (pgfcirc@Vcont2) and (pgfcirc@Vcont1) ..
9851 node[currarrow, sloped, allow upside down, pos=1] {}
9852 (pgfcirc@Vfrom)
9853 \else
9854 (pgfcirc@Vfrom) .. controls (pgfcirc@Vcont1) and (pgfcirc@Vcont2) ..
9855 node[currarrow, sloped, allow upside down, pos=1] {}
9856 (pgfcirc@Vto)
9857 \fi
9858 \fi
9859 \else
9860 \ifpgf@circuit@bipole@voltage@backward
9861 \ifpgf@circ@oldvoltagedirection
9862 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$}
9863 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$-$}
9864 \else
9865 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$}
9866 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$+$}
9867 \fi
9868 \else
9869 \ifpgf@circ@oldvoltagedirection
9870 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$}
9871 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$+$}
9872 \else
9873 (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$}
9874 (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$-$}
9875 \fi
9876 \fi
9877 \fi
9878 }
9879
9880 %% Output routine for voltage sources
9881 \def\pgf@circ@drawvoltagegenerator{
9882 \ifpgf@circuit@bipole@voltage@below
9883 coordinate (pgfcirc@Vfrom) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-120)$)
9884 coordinate (pgfcirc@Vto) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-60)$)
9885 \else
9886 coordinate (pgfcirc@Vfrom) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.120)$)
9887 coordinate (pgfcirc@Vto) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.60)$)
9888 \fi
9889 \ifpgf@circuit@europeanvoltage
9890 \ifpgf@circuit@bipole@voltage@backward
9891 (pgfcirc@Vto) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vfrom)
9892 \else
9893 (pgfcirc@Vfrom) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vto)
9894 \fi
9895 \else% american voltage
9896 \ifpgf@circuit@bipole@voltageoutsideofsymbol
9897 % if it is a battery, must put + and -
9898 \ifpgf@circuit@bipole@voltage@backward
9899 (pgfcirc@Vfrom) node {$-$} (pgfcirc@Vto) node {$+$}
9900 \else
9901 (pgfcirc@Vfrom) node {$+$} (pgfcirc@Vto) node {$-$}
9902 \fi
9903 \fi
9904 \fi
9905 }
9906
9907 %% Output routine
9908 \def\pgf@circ@drawvoltage{% node name
9909 %\pgf@circ@direction
9910 \pgfextra{
9911 \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
9912 \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
9913 \ifpgf@circuit@bipole@voltage@below
9914 \def\pgf@circ@bipole@voltage@label@anchor{north west}
9915 \else \def\pgf@circ@bipole@voltage@label@anchor{south east}
9916 \fi
9917 \fi\fi
9918 \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
9919 \ifpgf@circuit@bipole@voltage@below
9920 \def\pgf@circ@bipole@voltage@label@anchor{west}
9921 \else \def\pgf@circ@bipole@voltage@label@anchor{east}
9922 \fi
9923 \fi\fi
9924 \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
9925 \ifpgf@circuit@bipole@voltage@below
9926 \def\pgf@circ@bipole@voltage@label@anchor{south west}
9927 \else \def\pgf@circ@bipole@voltage@label@anchor{north east}
9928 \fi
9929 \fi\fi
9930 \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
9931 \ifpgf@circuit@bipole@voltage@below
9932 \def\pgf@circ@bipole@voltage@label@anchor{south}
9933 \else\def\pgf@circ@bipole@voltage@label@anchor{north}
9934 \fi
9935 \fi\fi
9936 \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
9937 \ifpgf@circuit@bipole@voltage@below
9938 \def\pgf@circ@bipole@voltage@label@anchor{south east}
9939 \else\def\pgf@circ@bipole@voltage@label@anchor{north west}
9940 \fi
9941 \fi\fi
9942 \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
9943 \ifpgf@circuit@bipole@voltage@below
9944 \def\pgf@circ@bipole@voltage@label@anchor{east}
9945 \else \def\pgf@circ@bipole@voltage@label@anchor{west}
9946 \fi
9947 \fi\fi
9948 \ifnum\pgfcircmathresult >274 \ifnum\pgfcircmathresult <356
9949 \ifpgf@circuit@bipole@voltage@below
9950 \def\pgf@circ@bipole@voltage@label@anchor{north east}
9951 \else\def\pgf@circ@bipole@voltage@label@anchor{south west}
9952 \fi
9953 \fi\fi
9954 \ifnum\pgfcircmathresult >-1 \ifnum\pgfcircmathresult <5
9955 \ifpgf@circuit@bipole@voltage@below
9956 \def\pgf@circ@bipole@voltage@label@anchor{north}
9957 \else\def\pgf@circ@bipole@voltage@label@anchor{south}
9958 \fi
9959 \fi\fi
9960 \ifnum\pgfcircmathresult >355 \ifnum\pgfcircmathresult <361
9961 \ifpgf@circuit@bipole@voltage@below
9962 \def\pgf@circ@bipole@voltage@label@anchor{north}
9963 \else\def\pgf@circ@bipole@voltage@label@anchor{south}
9964 \fi
9965 \fi\fi
9966
9967 \ifnum \ctikzvalof{mirror value}=-1
9968 \ifpgf@circuit@bipole@voltage@below
9969 \pgf@circuit@bipole@voltage@belowfalse
9970 \else
9971 \pgf@circuit@bipole@voltage@belowtrue
9972 \fi
9973 \fi
9974
9975 \ifpgf@circuit@bipole@inverted
9976 \ifpgf@circuit@bipole@voltage@below
9977 \pgf@circuit@bipole@voltage@belowfalse
9978 \else
9979 \pgf@circuit@bipole@voltage@belowtrue
9980 \fi
9981 \fi
9982
9983 \ifpgf@circuit@bipole@voltage@below
9984 \def\pgf@circ@bipole@voltage@label@where{-90}
9985 \else
9986 \def\pgf@circ@bipole@voltage@label@where{90}
9987 \fi
9988
9989
9990 \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}
9991 \pgfkeysifdefined{\pgf@temp}
9992 { \edef\eudist{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}} }
9993 { \edef\eudist{\ctikzvalof{voltage/european label distance}} }
9994
9995 \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
9996 }%end pgfextra
9997
9998 \ifpgf@circuit@bipole@isvoltage
9999 \pgf@circ@drawvoltagegenerator
10000 \else
10001 \pgf@circ@drawvoltagegeneric
10002 \fi
10003
10004 % (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where) %Zeile sinnlos!?
10005 \ifpgf@circuit@bipole@voltage@straight
10006 coordinate (Vlab) at ($(pgfcirc@Vto)!0.5!(pgfcirc@Vfrom) $)
10007 node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=2pt]
10008 at (Vlab) { \pgf@circ@finallabels{voltage/label} }
10009 \else
10010 coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) !
10011 \ifpgf@circuit@europeanvoltage
10012 \eudist
10013 \else
10014 \ctikzvalof{voltage/american label distance}
10015 \fi !
10016 (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where)$)
10017 node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=2pt] at (Vlab) { \pgf@circ@finallabels{voltage/label} }
10018 \fi
10019 }%end drawvoltages
10020 %%%---------- close: tex/pgfcircvoltage
10021 %%%%%%%%%%% Springe nach tex/pgfcirccurrent
10022 %%%---------- open: tex/pgfcirccurrent.tex
10023 % Copyright 2007-2009 by Massimo Redaelli
10024 %
10025 % This file may be distributed and/or modified
10026 %
10027 % 1. under the LaTeX Project Public License and/or
10028 % 2. under the GNU Public License.
10029 %
10030 % See the file doc/LICENSE for more details.
10031
10032 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10033 %% Current handling
10034
10035 %% Options
10036 \ctikzset{i^>/.style = {
10037 i = #1,
10038 \circuitikzbasekey/bipole/current/direction = forward,
10039 \circuitikzbasekey/bipole/current/x position = after,
10040 \circuitikzbasekey/bipole/current/y position = above
10041 }
10042 }
10043
10044 \ctikzset{i_>/.style = {
10045 i = #1,
10046 \circuitikzbasekey/bipole/current/direction = forward,
10047 \circuitikzbasekey/bipole/current/x position = after,
10048 \circuitikzbasekey/bipole/current/y position = below
10049 }
10050 }
10051
10052 \ctikzset{i>^/.style = {
10053 i = #1,
10054 \circuitikzbasekey/bipole/current/direction = forward,
10055 \circuitikzbasekey/bipole/current/x position = before,
10056 \circuitikzbasekey/bipole/current/y position = above
10057 }
10058 }
10059
10060 \ctikzset{i>_/.style = {
10061 i = #1,
10062 \circuitikzbasekey/bipole/current/direction = forward,
10063 \circuitikzbasekey/bipole/current/x position = before,
10064 \circuitikzbasekey/bipole/current/y position = below
10065 }
10066 }
10067
10068 \ctikzset{i^</.style = {
10069 i = #1,
10070 \circuitikzbasekey/bipole/current/direction = backward,
10071 \circuitikzbasekey/bipole/current/x position = after,
10072 \circuitikzbasekey/bipole/current/y position = above
10073 }
10074 }
10075
10076 \ctikzset{i_</.style = {
10077 i = #1,
10078 \circuitikzbasekey/bipole/current/direction = backward,
10079 \circuitikzbasekey/bipole/current/x position = after,
10080 \circuitikzbasekey/bipole/current/y position = below
10081 }
10082 }
10083
10084 \ctikzset{i<^/.style = {
10085 i = #1,
10086 \circuitikzbasekey/bipole/current/direction = backward,
10087 \circuitikzbasekey/bipole/current/x position = before,
10088 \circuitikzbasekey/bipole/current/y position = above
10089 }
10090 }
10091
10092 \ctikzset{i<_/.style = {
10093 i = #1,
10094 \circuitikzbasekey/bipole/current/direction = backward,
10095 \circuitikzbasekey/bipole/current/x position = before,
10096 \circuitikzbasekey/bipole/current/y position = below
10097 }
10098 }
10099
10100 \ctikzset{i/.code = {
10101 \pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
10102 \circuitikzbasekey/bipole/current/x position = after,
10103 \circuitikzbasekey/bipole/current/y position = above }
10104 \pgfkeys{/tikz/circuitikz/bipole/current/label/name=#1}
10105 \ctikzsetvalof{bipole/current/label/unit}{}
10106 \ifpgf@circ@siunitx
10107 \pgf@circ@handleSI{#1}
10108 \ifpgf@circ@siunitx@res
10109 \edef\pgf@temp{\pgf@circ@handleSI@val}
10110 \pgfkeyslet{/tikz/circuitikz/bipole/current/label/name}{\pgf@temp}
10111 \edef\pgf@temp{\pgf@circ@handleSI@unit}
10112 \pgfkeyslet{/tikz/circuitikz/bipole/current/label/unit}{\pgf@temp}
10113 \else
10114 \fi
10115 \else
10116 \fi
10117 %reverse current direction for voltage sources
10118 \ifpgf@circ@oldvoltagedirection\else
10119 \ifpgf@circuit@bipole@isvoltage
10120 \ifpgf@circuit@bipole@voltage@backward
10121 \pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
10122 \circuitikzbasekey/bipole/current/x position = after,
10123 \circuitikzbasekey/bipole/current/y position = below }
10124 \else
10125 \pgfkeys{\circuitikzbasekey/bipole/current/direction = backward,
10126 \circuitikzbasekey/bipole/current/x position = before,
10127 \circuitikzbasekey/bipole/current/y position = above }
10128 \fi\fi\fi
10129 }
10130 }
10131
10132
10133 \ifpgf@circ@oldvoltagedirection
10134 \ctikzset{i</.style = { i = #1, \circuitikzbasekey/bipole/current/direction = backward } }
10135 \else
10136 \ctikzset{i</.style = { i = #1, \circuitikzbasekey/bipole/current/direction = backward, \circuitikzbasekey/bipole/current/x position = before } }
10137 \fi
10138 \ctikzset{i_/.style = { i = #1, \circuitikzbasekey/bipole/current/y position = below } }
10139 \ctikzset{i>/.style = {i = #1, \circuitikzbasekey/bipole/current/direction = forward } }
10140 \ctikzset{i^/.style = { i= #1, \circuitikzbasekey/bipole/current/y position = above } }
10141
10142 %% Output routine
10143 \def\pgf@circ@drawcurrent{
10144 \pgfextra{
10145 \edef\pgf@circ@ffffff{\pgf@circ@direction}
10146 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@ffffff\pgf@nil}
10147
10148 \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
10149 \ifpgf@circuit@bipole@current@below
10150 \def\pgf@circ@dir{north west} \else \def\pgf@circ@dir{south east}
10151 \fi
10152 \fi\fi
10153 \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
10154 \ifpgf@circuit@bipole@current@below
10155 \def\pgf@circ@dir{west} \else \def\pgf@circ@dir{east}
10156 \fi
10157 \fi\fi
10158 \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
10159 \ifpgf@circuit@bipole@current@below
10160 \def\pgf@circ@dir{south west}\else \def\pgf@circ@dir{north east}
10161 \fi
10162 \fi\fi
10163 \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
10164 \ifpgf@circuit@bipole@current@below
10165 \def\pgf@circ@dir{south}\else\def\pgf@circ@dir{north}
10166 \fi
10167 \fi\fi
10168 \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
10169 \ifpgf@circuit@bipole@current@below
10170 \def\pgf@circ@dir{south east}\else\def\pgf@circ@dir{north west}
10171 \fi
10172 \fi\fi
10173 \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
10174 \ifpgf@circuit@bipole@current@below
10175 \def\pgf@circ@dir{east}\else \def\pgf@circ@dir{west}
10176 \fi
10177 \fi\fi
10178 \ifnum\pgfcircmathresult >274 \ifnum\pgfcircmathresult <356
10179 \ifpgf@circuit@bipole@current@below
10180 \def\pgf@circ@dir{north east}\else\def\pgf@circ@dir{south west}
10181 \fi
10182 \fi\fi
10183 \ifnum\pgfcircmathresult <5
10184 \ifpgf@circuit@bipole@current@below
10185 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
10186 \fi
10187 \fi
10188 \ifnum\pgfcircmathresult >355
10189 \ifpgf@circuit@bipole@current@below
10190 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
10191 \fi
10192 \fi
10193
10194 \ifpgf@circuit@bipole@current@below
10195 \def\pgf@circ@bipole@current@label@where{-90}
10196 \else
10197 \def\pgf@circ@bipole@current@label@where{+90}
10198 \fi
10199 }
10200
10201 \pgfextra{\def\pgf@temp{short}\edef\pgf@circ@temp{\ctikzvalof{bipole/kind}}}
10202 \ifx\pgf@circ@temp\pgf@temp%draw current at a short at middle of the line
10203 (\tikztostart)--(\tikztotarget)
10204 \else% normal bipole or source
10205 \ifpgf@circuit@bipole@current@before
10206 (\tikztostart)--(anchorstartnode)
10207 \else
10208 (anchorendnode)--(\tikztotarget)
10209 \fi
10210 \fi
10211 \ifpgf@circuit@bipole@current@backward
10212 \pgfextra{
10213 \pgfmathsubtract{\pgf@circ@ffffff}{180}
10214 \edef\pgf@circ@ffffff{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
10215 }
10216 \fi
10217 coordinate[currarrow,pos=\ctikzvalof{current/distance},rotate=\pgf@circ@ffffff](Iarrow)
10218 (Iarrow.\pgf@circ@bipole@current@label@where) node[anchor=\pgf@circ@dir]{\pgf@circ@finallabels{current/label}}
10219 }
10220
10221 %%%---------- close: tex/pgfcirccurrent
10222 %%%%%%%%%%% Springe nach tex/pgfcircflow
10223 %%%---------- open: tex/pgfcircflow.tex
10224 % Copyright 2007-2009 by Massimo Redaelli
10225 %
10226 % This file may be distributed and/or modified
10227 %
10228 % 1. under the LaTeX Project Public License and/or
10229 % 2. under the GNU Public License.
10230 %
10231 % See the file doc/LICENSE for more details.
10232
10233 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10234 %% flow handling
10235
10236 %% Options
10237 \ctikzset{f^>/.style = {
10238 f = #1,
10239 \circuitikzbasekey/bipole/flow/direction = forward,
10240 \circuitikzbasekey/bipole/flow/x position = after,
10241 \circuitikzbasekey/bipole/curflowrent/y position = above
10242 }
10243 }
10244
10245 \ctikzset{f_>/.style = {
10246 f = #1,
10247 \circuitikzbasekey/bipole/flow/direction = forward,
10248 \circuitikzbasekey/bipole/flow/x position = after,
10249 \circuitikzbasekey/bipole/flow/y position = below
10250 }
10251 }
10252
10253 \ctikzset{f>^/.style = {
10254 f = #1,
10255 \circuitikzbasekey/bipole/flow/direction = forward,
10256 \circuitikzbasekey/bipole/flow/x position = before,
10257 \circuitikzbasekey/bipole/flow/y position = above
10258 }
10259 }
10260
10261 \ctikzset{f>_/.style = {
10262 f = #1,
10263 \circuitikzbasekey/bipole/flow/direction = forward,
10264 \circuitikzbasekey/bipole/flow/x position = before,
10265 \circuitikzbasekey/bipole/flow/y position = below
10266 }
10267 }
10268
10269 \ctikzset{f^</.style = {
10270 f = #1,
10271 \circuitikzbasekey/bipole/flow/direction = backward,
10272 \circuitikzbasekey/bipole/flow/x position = after,
10273 \circuitikzbasekey/bipole/flow/y position = above
10274 }
10275 }
10276
10277 \ctikzset{f_</.style = {
10278 f = #1,
10279 \circuitikzbasekey/bipole/flow/direction = backward,
10280 \circuitikzbasekey/bipole/flow/x position = after,
10281 \circuitikzbasekey/bipole/flow/y position = below
10282 }
10283 }
10284
10285 \ctikzset{f<^/.style = {
10286 f = #1,
10287 \circuitikzbasekey/bipole/flow/direction = backward,
10288 \circuitikzbasekey/bipole/flow/x position = before,
10289 \circuitikzbasekey/bipole/flow/y position = above
10290 }
10291 }
10292
10293 \ctikzset{f<_/.style = {
10294 f = #1,
10295 \circuitikzbasekey/bipole/flow/direction = backward,
10296 \circuitikzbasekey/bipole/flow/x position = before,
10297 \circuitikzbasekey/bipole/flow/y position = below
10298 }
10299 }
10300
10301 \ctikzset{f</.style = { f = #1, \circuitikzbasekey/bipole/flow/direction = backward} }
10302 \ctikzset{f_/.style = { f = #1, \circuitikzbasekey/bipole/flow/y position = below } }
10303 \ctikzset{f>/.style = { f = #1, \circuitikzbasekey/bipole/flow/direction = forward } }
10304 \ctikzset{f^/.style = { f = #1, \circuitikzbasekey/bipole/flow/y position = above } }
10305
10306 \ctikzset{f/.code = {
10307 \pgfkeys{\circuitikzbasekey/bipole/flow/direction = forward,
10308 \circuitikzbasekey/bipole/flow/x position = after,
10309 \circuitikzbasekey/bipole/flow/y position = above }
10310 \pgfkeys{/tikz/circuitikz/bipole/flow/label/name=#1}
10311 \ctikzsetvalof{bipole/flow/label/unit}{}
10312 \ifpgf@circ@siunitx
10313 \pgf@circ@handleSI{#1}
10314 \ifpgf@circ@siunitx@res
10315 \edef\pgf@temp{\pgf@circ@handleSI@val}
10316 \pgfkeyslet{/tikz/circuitikz/bipole/flow/label/name}{\pgf@temp}
10317 \edef\pgf@temp{\pgf@circ@handleSI@unit}
10318 \pgfkeyslet{/tikz/circuitikz/bipole/flow/label/unit}{\pgf@temp}
10319 \else
10320 \fi
10321 \else
10322 \fi
10323 }
10324 }
10325
10326 %% Output routine
10327 \def\pgf@circ@drawflow{
10328 \pgfextra{
10329 \edef\pgf@circ@ffffff{\pgf@circ@direction}
10330 \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@ffffff\pgf@nil}
10331
10332 \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
10333 \ifpgf@circuit@bipole@flow@below
10334 \def\pgf@circ@dir{north west} \else \def\pgf@circ@dir{south east}
10335 \fi
10336 \fi\fi
10337 \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
10338 \ifpgf@circuit@bipole@flow@below
10339 \def\pgf@circ@dir{west} \else \def\pgf@circ@dir{east}
10340 \fi
10341 \fi\fi
10342 \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
10343 \ifpgf@circuit@bipole@flow@below
10344 \def\pgf@circ@dir{south west}\else \def\pgf@circ@dir{north east}
10345 \fi
10346 \fi\fi
10347 \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
10348 \ifpgf@circuit@bipole@flow@below
10349 \def\pgf@circ@dir{south}\else\def\pgf@circ@dir{north}
10350 \fi
10351 \fi\fi
10352 \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
10353 \ifpgf@circuit@bipole@flow@below
10354 \def\pgf@circ@dir{south east}\else\def\pgf@circ@dir{north west}
10355 \fi
10356 \fi\fi
10357 \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
10358 \ifpgf@circuit@bipole@flow@below
10359 \def\pgf@circ@dir{east}\else \def\pgf@circ@dir{west}
10360 \fi
10361 \fi\fi
10362 \ifnum\pgfcircmathresult >274 \ifnum\pgfcircmathresult <356
10363 \ifpgf@circuit@bipole@flow@below
10364 \def\pgf@circ@dir{north east}\else\def\pgf@circ@dir{south west}
10365 \fi
10366 \fi\fi
10367 \ifnum\pgfcircmathresult <5
10368 \ifpgf@circuit@bipole@flow@below
10369 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
10370 \fi
10371 \fi
10372 \ifnum\pgfcircmathresult >355
10373 \ifpgf@circuit@bipole@flow@below
10374 \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
10375 \fi
10376 \fi
10377
10378 \ifpgf@circuit@bipole@flow@below
10379 \def\pgf@circ@bipole@flow@label@where{-90}
10380 \else
10381 \def\pgf@circ@bipole@flow@label@where{+90}
10382 \fi
10383 }
10384
10385 \pgfextra{\def\pgf@temp{short}\edef\pgf@circ@temp{\ctikzvalof{bipole/kind}}}
10386 \ifx\pgf@circ@temp\pgf@temp%draw flow at a short at middle of the line
10387 (\tikztostart)--(\tikztotarget)
10388 \else% normal bipole or source
10389 \ifpgf@circuit@bipole@flow@before
10390 (\tikztostart)--(anchorstartnode)
10391 \else
10392 (anchorendnode)--(\tikztotarget)
10393 \fi
10394 \fi
10395 \pgfextra{
10396 \ifpgf@circuit@bipole@flow@backward
10397 \ifpgf@circuit@bipole@flow@below
10398 \def\flow@offset{\ctikzvalof{flow/offset}\pgf@circ@Rlen}
10399 \else
10400 \def\flow@offset{-\ctikzvalof{flow/offset}\pgf@circ@Rlen}
10401 \fi
10402 \pgfmathsubtract{\pgf@circ@ffffff}{180}
10403 \edef\pgf@circ@ffffff{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
10404 \else
10405 \ifpgf@circuit@bipole@flow@below
10406 \def\flow@offset{-\ctikzvalof{flow/offset}\pgf@circ@Rlen}
10407 \else
10408 \def\flow@offset{\ctikzvalof{flow/offset}\pgf@circ@Rlen}
10409 \fi
10410 \fi
10411 }
10412 coordinate[flowarrow,pos=\ctikzvalof{flow/distance},rotate=\pgf@circ@ffffff,yshift=\flow@offset](Farrowpos)
10413 (Farrowpos.\pgf@circ@bipole@flow@label@where) node[anchor=\pgf@circ@dir]{ \pgf@circ@finallabels{flow/label}}
10414 }
10415
10416 %%%---------- close: tex/pgfcircflow
10417
10418 \ExecuteOptions{nofetbodydiode,nofetsolderdot,nooldvoltagedirection,europeancurrents,europeanvoltages,americanports,americanresistors,cuteinductors,europeangfsurgearrester,nosiunitx,noarrowmos,smartlabels,nocompatibility}
10419
10420 \ProcessOptions\relax
10421
10422 %%%%%%%%%%% Springe nach tex/pgfcircpath
10423 %%%---------- open: tex/pgfcircpath.tex
10424
10425 \def\pgf@circ@direction{0.0}
10426
10427 % Names
10428 \ctikzset{name/.style = { n=#1 } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@
10429 \ctikzset{n/.code = {
10430 \pgfkeys{/tikz/circuitikz/bipole/name=#1}
10431 }}
10432
10433 % Reflect the node along
10434 \ctikzset{mirrored/.is choice}
10435 \ctikzset{mirror value/.initial=1}
10436 \ctikzset{mirrored/true/.code = {\ctikzsetvalof{mirror value}{-1}} }
10437 \ctikzset{mirrored/false/.code = {\ctikzsetvalof{mirror value}{1}} }
10438 \ctikzset{mirror/.style = {/tikz/circuitikz/mirrored=true}}
10439
10440 % Invert node along path
10441 \ctikzset{inverted/.is choice}
10442 \ctikzset{invert value/.initial=1}
10443 \ctikzset{inverted/true/.code = {\ctikzsetvalof{invert value}{-1}\pgf@circuit@bipole@invertedtrue}}
10444 \ctikzset{inverted/false/.code = {\ctikzsetvalof{invert value}{1}\pgf@circuit@bipole@invertedfalse}}
10445 \ctikzset{invert/.style = {/tikz/circuitikz/inverted=true}}
10446 \newif\ifpgf@circuit@bipole@inverted
10447 \ctikzset{bipole/inverted/.is if=pgf@circuit@bipole@inverted}
10448
10449
10450 \newif\ifpgf@circuit@bipole@voltage@backward
10451 \ctikzset{bipole/voltage/direction/.is choice}
10452 \ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}}
10453 \ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}}
10454
10455
10456
10457 % Initialize paths
10458 \def\pgfcircresetpath{
10459 \ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90, ,bipole/annotation/name=, bipole/annotation/position=-90,
10460 bipole/inverted=false, bipole/kind=,
10461 bipole/voltage/direction=backward, bipole/voltage/label/name=, bipole/voltage/position=below,
10462 bipole/nodes/left=none, bipole/nodes/right=none, bipole/is voltage=false,bipole/is voltageoutsideofsymbol=false,bipole/is strokedsymbol=false,
10463 bipole/is current=false, bipole/current/label/name=, bipole/current/x position=after,
10464 bipole/current/y position=above, bipole/current/direction=forward,
10465 mirrored=false
10466 }
10467 }
10468
10469 %% Helper function for path-function to ensure using anchors between nodes
10470 \def\set@explicit@center@anchor#1{
10471 \pgfutil@ifundefined{pgf@sh@ns@#1}
10472 {
10473 %This coordinate is no node(but a relative position or a coordinate), no further handling needed
10474 }{
10475 \pgfutil@in@.{#1}
10476 \ifpgfutil@in@
10477 % Anchor is used, do nothing!
10478 \else%
10479 \let\tikz@moveto@waiting=\relax
10480 \pgfpathmoveto{\tikz@last@position}%force movement, because tikz@moveto@waiting
10481 \edef#1{#1.center}%ensure using center anchor
10482 \fi
10483 }
10484 }
10485
10486
10487 %% Generic bipole path
10488 \def\pgf@circ@bipole@path#1#2{
10489
10490 \pgfextra{
10491 \set@explicit@center@anchor{\tikztostart}
10492 \set@explicit@center@anchor{\tikztotarget}
10493 \pgfsyssoftpath@getcurrentpath{\myp@th}%% save current path to extend after calculation of correct start/end coordinates
10494 \ctikzset{bipole/kind = #1}
10495 \edef\pgf@temp{\ctikzvalof{bipole/name}}
10496 \def\pgf@circ@temp{}
10497 \ifx\pgf@temp\pgf@circ@temp % if it has not a name
10498 \pgfmathrandominteger{\pgf@circ@rand}{1000}{9999}
10499 \ctikzset{bipole/name = #2\pgf@circ@rand} % create it
10500 \fi
10501 }
10502
10503 (\tikztostart) coordinate (\ctikzvalof{bipole/name}start)%necessary to get correct coordinates in the case of relativ start/end or constructions like ((node1)-|(node2))
10504 (\tikztotarget) coordinate (\ctikzvalof{bipole/name}end)
10505 \pgfextra{
10506 \pgfmathanglebetweenpoints{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
10507 {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
10508 \edef\pgf@circ@direction{\pgfmathresult}%Calculate direction(angle) of path
10509 \pgfsyssoftpath@setcurrentpath{\myp@th}
10510 }
10511 \pgfextra{\def\pgf@temp{open}\def\pgf@circ@temp{#1}}
10512 \ifx\pgf@temp\pgf@circ@temp % if it is an open
10513 \else
10514 --($(\ctikzvalof{bipole/name}start) ! .5\pgflinewidth ! (\ctikzvalof{bipole/name}end)$) %ugly workaround to get correct linejoins(node breaks path?)
10515 \fi
10516 ($(\tikztostart) ! .5 ! (\tikztotarget)$)%%positio of middle node
10517 node[#1shape, rotate=\pgf@circ@direction, yscale=\ctikzvalof{mirror value}, xscale=\ctikzvalof{invert value}]
10518 (\ctikzvalof{bipole/name}) {}
10519 \ifpgf@circuit@bipole@inverted
10520 \ifcsname pgf@anchor@#1shape@pathstart\endcsname%if special path-anchors are defined, use them!
10521 coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.pathend)
10522 coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.pathstart)
10523 \else
10524 coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.right)
10525 coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.left)
10526 \fi
10527 \else
10528 \ifcsname pgf@anchor@#1shape@pathstart\endcsname%if special path-anchors are defined, use them!
10529 coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.pathstart)
10530 coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.pathend)
10531 \else
10532 coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.left)
10533 coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.right)
10534 \fi
10535 \fi
10536 \pgfextra{\def\pgf@temp{open}\def\pgf@circ@temp{#1}}
10537 \ifx\pgf@temp\pgf@circ@temp % if it is an open
10538 \else
10539 \ifpgf@circuit@bipole@strokedsymbol%draw line thrue symbol(e.g. diodes)
10540 \ifcsname pgf@anchor@#1shape@strokepathstart\endcsname%if special path-anchors are defined, use them!
10541 (\ctikzvalof{bipole/name}start.center) -- (\ctikzvalof{bipole/name}.strokepathstart)
10542 (\ctikzvalof{bipole/name}.strokepathend) -- (\ctikzvalof{bipole/name}end.center)
10543 \else
10544 (\ctikzvalof{bipole/name}start.center) -- (\ctikzvalof{bipole/name}end.center)
10545 \fi
10546 \else
10547 (\ctikzvalof{bipole/name}start.center) -- (anchorstartnode)
10548 (anchorendnode) -- (\ctikzvalof{bipole/name}end.center)
10549 \fi
10550 \fi
10551
10552 \drawpoles
10553 \pgf@circ@ifkeyempty{bipole/label/name}\else\pgf@circ@drawlabels{label}\fi
10554 \pgf@circ@ifkeyempty{bipole/annotation/name}\else\pgf@circ@drawlabels{annotation}\fi
10555 \pgf@circ@ifkeyempty{bipole/voltage/label/name}\else\pgf@circ@drawvoltage\fi
10556 \pgf@circ@ifkeyempty{bipole/current/label/name}\else\pgf@circ@drawcurrent\fi
10557 \pgf@circ@ifkeyempty{bipole/flow/label/name}\else\pgf@circ@drawflow\fi
10558 \pgfextra{\def\pgf@temp{open}\def\pgf@circ@temp{#1}}
10559 \ifx\pgf@temp\pgf@circ@temp % if it is an open
10560 (\ctikzvalof{bipole/name}end)%Move to end of path
10561 \else
10562 ($(\ctikzvalof{bipole/name}end) ! .5\pgflinewidth ! (\ctikzvalof{bipole/name}start)$) -- (\ctikzvalof{bipole/name}end)%ugly workaround to get correct linejoins(node breaks path?)
10563 %tikztostart and tikztotarget could not be used, because it would break if target coordinate is something like (node1-|node2)
10564
10565 \fi
10566 % reset
10567 \pgfextra{
10568 \pgfcircresetpath
10569 }
10570 \tikztonodes%draw pending nodes an path
10571 }
10572
10573
10574 %% Path definitions
10575 \def\pgf@circ@resistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{generic}{#1}\else\pgf@circ@bipole@path{resistor}{#1}\fi}
10576 \def\pgf@circ@vresistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{tgeneric}{#1}\else\pgf@circ@bipole@path{vresistor}{#1}\fi}
10577 \def\pgf@circ@potentiometer@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{genericpotentiometer}{#1}\else\pgf@circ@bipole@path{potentiometer}{#1}\fi}
10578 \def\pgf@circ@thermistor@path#1{\pgf@circ@bipole@path{thermistor}{#1}}
10579 \def\pgf@circ@thermistorptc@path#1{\pgf@circ@bipole@path{thermistorptc}{#1}}
10580 \def\pgf@circ@thermistorntc@path#1{\pgf@circ@bipole@path{thermistorntc}{#1}}
10581 \def\pgf@circ@varistor@path#1{\pgf@circ@bipole@path{varistor}{#1}}
10582 \def\pgf@circ@capacitor@path#1{\pgf@circ@bipole@path{capacitor}{#1}}
10583 \def\pgf@circ@ecapacitor@path#1{\pgf@circ@bipole@path{ecapacitor}{#1}}
10584 \def\pgf@circ@polarcapacitor@path#1{\pgf@circ@bipole@path{polarcapacitor}{#1}}
10585 \def\pgf@circ@vcapacitor@path#1{\pgf@circ@bipole@path{vcapacitor}{#1}}
10586 \def\pgf@circ@piezoelectric@path#1{\pgf@circ@bipole@path{piezoelectric}{#1}}
10587 \def\pgf@circ@battery@path#1{\pgf@circ@bipole@path{battery}{#1}}
10588 \def\pgf@circ@batteryone@path#1{\pgf@circ@bipole@path{battery1}{#1}}
10589 \def\pgf@circ@batterytwo@path#1{\pgf@circ@bipole@path{battery2}{#1}}
10590 \def\pgf@circ@europeaninductor@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}}
10591 \def\pgf@circ@americaninductor@path#1{\pgf@circ@bipole@path{americaninductor}{#1}}
10592 \def\pgf@circ@cuteinductor@path#1{\pgf@circ@bipole@path{cuteinductor}{#1}}
10593 \def\pgf@circ@inductor@path#1{%
10594 \pgfextra{
10595 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
10596 \def\pgf@temp{european}%
10597 }
10598 \ifx\pgf@temp\pgf@circ@temp%
10599 \pgf@circ@europeaninductor@path{#1}%
10600 \else%
10601 \pgfextra{ \def\pgf@temp{cute} }%
10602 \ifx\pgf@temp\pgf@circ@temp%
10603 \pgf@circ@cuteinductor@path{#1}%
10604 \else%
10605 \pgf@circ@americaninductor@path{#1}%
10606 \fi%
10607 \fi%
10608 }
10609 \def\pgf@circ@vinductor@path#1{
10610 \pgfextra{
10611 \edef\pgf@circ@temp{\ctikzvalof{inductor}}%
10612 \def\pgf@temp{european}%
10613 }
10614 \ifx\pgf@temp\pgf@circ@temp%
10615 \pgf@circ@veuropeaninductor@path{#1}%
10616 \else%
10617 \pgfextra{ \def\pgf@temp{cute} }%
10618 \ifx\pgf@temp\pgf@circ@temp%
10619 \pgf@circ@vcuteinductor@path{#1}%
10620 \else%
10621 \pgf@circ@vamericaninductor@path{#1}%
10622 \fi%
10623 \fi%
10624 }
10625 \def\pgf@circ@veuropeaninductor@path#1{\pgf@circ@bipole@path{tfullgeneric}{#1}}
10626 \def\pgf@circ@vamericaninductor@path#1{\pgf@circ@bipole@path{vamericaninductor}{#1}}
10627 \def\pgf@circ@vcuteinductor@path#1{\pgf@circ@bipole@path{vcuteinductor}{#1}}
10628 \def\pgf@circ@lamp@path#1{\pgf@circ@bipole@path{lamp}{#1}}
10629 \def\pgf@circ@esource@path#1{\pgf@circ@bipole@path{esource}{#1}}
10630 \def\pgf@circ@pvsource@path#1{\pgf@circ@bipole@path{pvsource}{#1}}
10631 \def\pgf@circ@vsource@path#1{\pgf@circ@bipole@path{vsource}{#1}}
10632 \def\pgf@circ@dcvsource@path#1{\pgf@circ@bipole@path{dcvsource}{#1}}
10633 \def\pgf@circ@vsourceam@path#1{\pgf@circ@bipole@path{vsourceAM}{#1}}
10634 \def\pgf@circ@vsourcesin@path#1{\pgf@circ@bipole@path{vsourcesin}{#1}}
10635 \def\pgf@circ@isource@path#1{\pgf@circ@bipole@path{isource}{#1}}
10636 \def\pgf@circ@oosource@path#1{\pgf@circ@bipole@path{oosource}{#1}}
10637 \def\pgf@circ@dcisource@path#1{\pgf@circ@bipole@path{dcisource}{#1}}
10638 \def\pgf@circ@isourcesin@path#1{\pgf@circ@bipole@path{isourcesin}{#1}}
10639 \def\pgf@circ@vsourcesquare@path#1{\pgf@circ@bipole@path{vsourcesquare}{#1}}
10640 \def\pgf@circ@vsourcetri@path#1{\pgf@circ@bipole@path{vsourcetri}{#1}}
10641 \def\pgf@circ@isourceam@path#1{\pgf@circ@bipole@path{isourceAM}{#1}}
10642 \def\pgf@circ@cvsource@path#1{\pgf@circ@bipole@path{cvsource}{#1}}
10643 \def\pgf@circ@cvsourceam@path#1{\pgf@circ@bipole@path{cvsourceAM}{#1}}
10644 \def\pgf@circ@cvsourcesin@path#1{\pgf@circ@bipole@path{cvsourcesin}{#1}}
10645 \def\pgf@circ@cisource@path#1{\pgf@circ@bipole@path{cisource}{#1}}
10646 \def\pgf@circ@cisourceam@path#1{\pgf@circ@bipole@path{cisourceAM}{#1}}
10647 \def\pgf@circ@cisourcesin@path#1{\pgf@circ@bipole@path{cisourcesin}{#1}}
10648 \def\pgf@circ@short@path#1{\pgf@circ@bipole@path{short}{#1}}
10649 \def\pgf@circ@cspst@path#1{\pgf@circ@bipole@path{cspst}{#1}}
10650 \def\pgf@circ@ospst@path#1{\pgf@circ@bipole@path{ospst}{#1}}
10651 \def\pgf@circ@nos@path#1{\pgf@circ@bipole@path{nos}{#1}}
10652 \def\pgf@circ@ncs@path#1{\pgf@circ@bipole@path{ncs}{#1}}
10653 \def\pgf@circ@pushbutton@path#1{\pgf@circ@bipole@path{pushbutton}{#1}}
10654 \def\pgf@circ@open@path#1{\pgf@circ@bipole@path{open}{#1}}
10655 \def\pgf@circ@generic@path#1{\pgf@circ@bipole@path{generic}{#1}}
10656 \def\pgf@circ@ageneric@path#1{\pgf@circ@bipole@path{ageneric}{#1}}
10657 \def\pgf@circ@tgeneric@path#1{\pgf@circ@bipole@path{tgeneric}{#1}}
10658 \def\pgf@circ@fullgeneric@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}}
10659 \def\pgf@circ@tfullgeneric@path#1{\pgf@circ@bipole@path{tfullgeneric}{#1}}
10660 \def\pgf@circ@ammeter@path#1{\pgf@circ@bipole@path{ammeter}{#1}}
10661 \def\pgf@circ@ohmmeter@path#1{\pgf@circ@bipole@path{ohmmeter}{#1}}
10662 \def\pgf@circ@voltmeter@path#1{\pgf@circ@bipole@path{voltmeter}{#1}}
10663 \def\pgf@circ@empty@path#1{}
10664 \def\pgf@circ@photoresistor@path#1{\pgf@circ@bipole@path{photoresistor}{#1}}
10665 \def\pgf@circ@emptythyristor@path#1{\pgf@circ@bipole@path{emptythyristor}{#1}}
10666 \def\pgf@circ@fullthyristor@path#1{\pgf@circ@bipole@path{fullthyristor}{#1}}
10667 \def\pgf@circ@toggleswitch@path#1{\pgf@circ@bipole@path{toggleswitch}{#1}}
10668 \def\pgf@circ@memristor@path#1{\pgf@circ@bipole@path{memristor}{#1}}
10669 \def\pgf@circ@emptytriac@path#1{\pgf@circ@bipole@path{emptytriac}{#1}}
10670 \def\pgf@circ@fulltriac@path#1{\pgf@circ@bipole@path{fulltriac}{#1}}
10671 \def\pgf@circ@tline@path#1{\pgf@circ@bipole@path{tline}{#1}}
10672 \def\pgf@circ@squid@path#1{\pgf@circ@bipole@path{squid}{#1}}
10673 \def\pgf@circ@barrier@path#1{\pgf@circ@bipole@path{barrier}{#1}}
10674 \def\pgf@circ@thermocouple@path#1{\pgf@circ@bipole@path{thermocouple}{#1}}
10675 \def\pgf@circ@fuse@path#1{\pgf@circ@bipole@path{fuse}{#1}}
10676 \def\pgf@circ@afuse@path#1{\pgf@circ@bipole@path{afuse}{#1}}
10677
10678 \def\pgf@circ@gfsurgearrester@path#1{\ifpgf@circuit@europeangfsurgearrester\pgf@circ@europeangfsurgearrester@path{#1}\else\pgf@circ@americangfsurgearrester@path{#1}\fi}
10679 \def\pgf@circ@europeangfsurgearrester@path#1{\pgf@circ@bipole@path{european gas filled surge arrester}{#1}}
10680 \def\pgf@circ@americangfsurgearrester@path#1{\pgf@circ@bipole@path{american gas filled surge arrester}{#1}}
10681
10682 \def\pgf@circ@twoport@path#1{\pgf@circ@bipole@path{twoport}{#1}}
10683 \def\pgf@circ@vco@path#1{\pgf@circ@bipole@path{vco}{#1}}
10684 \def\pgf@circ@bandpass@path#1{\pgf@circ@bipole@path{bandpass}{#1}}
10685 \def\pgf@circ@bandstop@path#1{\pgf@circ@bipole@path{bandstop}{#1}}
10686 \def\pgf@circ@highpass@path#1{\pgf@circ@bipole@path{highpass}{#1}}
10687 \def\pgf@circ@lowpass@path#1{\pgf@circ@bipole@path{lowpass}{#1}}
10688 \def\pgf@circ@adc@path#1{\pgf@circ@bipole@path{adc}{#1}}
10689 \def\pgf@circ@dac@path#1{\pgf@circ@bipole@path{dac}{#1}}
10690 \def\pgf@circ@dsp@path#1{\pgf@circ@bipole@path{dsp}{#1}}
10691 \def\pgf@circ@fft@path#1{\pgf@circ@bipole@path{fft}{#1}}
10692 \def\pgf@circ@amp@path#1{\pgf@circ@bipole@path{amp}{#1}}
10693 \def\pgf@circ@vamp@path#1{\pgf@circ@bipole@path{vamp}{#1}}
10694 \def\pgf@circ@piattenuator@path#1{\pgf@circ@bipole@path{piattenuator}{#1}}
10695 \def\pgf@circ@vpiattenuator@path#1{\pgf@circ@bipole@path{vpiattenuator}{#1}}
10696 \def\pgf@circ@tattenuator@path#1{\pgf@circ@bipole@path{tattenuator}{#1}}
10697 \def\pgf@circ@vtattenuator@path#1{\pgf@circ@bipole@path{vtattenuator}{#1}}
10698 \def\pgf@circ@phaseshifter@path#1{\pgf@circ@bipole@path{phaseshifter}{#1}}
10699 \def\pgf@circ@vphaseshifter@path#1{\pgf@circ@bipole@path{vphaseshifter}{#1}}
10700 \def\pgf@circ@detector@path#1{\pgf@circ@bipole@path{detector}{#1}}
10701
10702 %%Mechanical
10703 \def\pgf@circ@spring@path#1{\pgf@circ@bipole@path{spring}{#1}}
10704 \def\pgf@circ@mass@path#1{\pgf@circ@bipole@path{mass}{#1}}
10705 \def\pgf@circ@damper@path#1{\pgf@circ@bipole@path{damper}{#1}}
10706
10707
10708
10709
10710 %% Styles
10711
10712 \def\comnpatname{\ifpgf@circuit@compat *\else\fi}
10713 \def\compattikzset#1{\tikzset{\comnpatname#1}}
10714
10715 %\def\ctikzsetbipole#1#2{%
10716 % \tikzset{#1/.style= {to path=#2, \circuitikzbasekey, l=##1}}%
10717 %}
10718
10719 \compattikzset{spring/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@spring@path, l=#1}}
10720 \compattikzset{mass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@mass@path, l=#1}}
10721 \compattikzset{damper/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@damper@path, l=#1}}
10722 \compattikzset{resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@resistor@path, l=#1}}
10723 \compattikzset{american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{resistor}{#1}, l=#1}}
10724 \compattikzset{european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{generic}{#1}, l=#1}}
10725 \compattikzset{potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@potentiometer@path, l=#1}}
10726 \compattikzset{varistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@varistor@path, l=#1}}
10727 \compattikzset{photoresistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@photoresistor@path, l=#1}}
10728 \compattikzset{thermistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistor@path, l=#1}}
10729 \compattikzset{thermistor ptc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorptc@path, l=#1}}
10730 \compattikzset{thermistor ntc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorntc@path, l=#1}}
10731 \compattikzset{american potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{potentiometer}{#1}, l=#1}}
10732 \compattikzset{european potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{genericpotentiometer}{#1}, l=#1}}
10733 \compattikzset{variable resistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vresistor@path, l=#1}}
10734 \compattikzset{variable american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{vresistor}{#1}, l=#1}}
10735 \compattikzset{variable european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{tgeneric}{#1}, l=#1}}
10736 \compattikzset{capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@capacitor@path, l=#1}}
10737 \compattikzset{elko/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ecapacitor@path, l=#1}}
10738 \compattikzset{ecapacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ecapacitor@path, l=#1}}
10739 \compattikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@polarcapacitor@path, l=#1}}
10740 \compattikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcapacitor@path, l=#1}}
10741 \compattikzset{piezoelectric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@piezoelectric@path, l=#1}}
10742 \compattikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10743 \compattikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@batteryone@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10744 \compattikzset{battery2/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@batterytwo@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10745 \compattikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@inductor@path, l=#1}}
10746 \compattikzset{gf surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@gfsurgearrester@path, l=#1}}
10747 \compattikzset{american gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americangfsurgearrester@path, l=#1}}
10748 \compattikzset{european gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@europeangfsurgearrester@path, l=#1}}
10749 \compattikzset{gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@gfsurgearrester@path, l=#1}}
10750 \compattikzset{american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americaninductor@path, l=#1}}
10751 \compattikzset{cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cuteinductor@path, l=#1}}
10752 \compattikzset{european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@europeaninductor@path, l=#1}}
10753 \compattikzset{variable inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vinductor@path, l=#1}}
10754 \compattikzset{variable european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@veuropeaninductor@path, l=#1}}
10755 \compattikzset{variable american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vamericaninductor@path, l=#1}}
10756 \compattikzset{variable cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcuteinductor@path, l=#1}}
10757 \compattikzset{tline/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tline@path, l=#1}}
10758 \compattikzset{transmission line/.style = {tline = #1}}
10759 \compattikzset{TL/.style = {tline = #1}}
10760 \compattikzset{european voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsource@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10761 \compattikzset{american voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
10762 \compattikzset{european current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10763 \compattikzset{american current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10764 \compattikzset{european controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsource@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10765 \compattikzset{american controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
10766 \compattikzset{european controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10767 \compattikzset{american controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10768 \compattikzset{sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcesin@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
10769 \compattikzset{square voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcesquare@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
10770 \compattikzset{triangle voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcetri@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
10771 \compattikzset{sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10772 \compattikzset{controlled sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourcesin@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10773 \compattikzset{controlled sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
10774
10775 \compattikzset{voltage source/.style = {\comnpatname \ifpgf@circuit@europeanvoltage european \else american \fi voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
10776 \compattikzset{current source/.style = {\comnpatname \ifpgf@circuit@europeancurrent european \else american \fi current source = #1, \circuitikzbasekey/bipole/is current=true}}
10777 \compattikzset{controlled voltage source/.style = {\comnpatname \ifpgf@circuit@europeanvoltage european \else american \fi controlled voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
10778 \compattikzset{controlled current source/.style = {\comnpatname \ifpgf@circuit@europeancurrent european \else american \fi controlled current source = #1, \circuitikzbasekey/bipole/is current=true}}
10779
10780
10781 \compattikzset{generic/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@generic@path, l=#1}}
10782 \compattikzset{ageneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ageneric@path, l=#1}}
10783 \compattikzset{tgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tgeneric@path, l=#1}}
10784 \compattikzset{fullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullgeneric@path, l=#1}}
10785 \compattikzset{tfullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tfullgeneric@path, l=#1}}
10786 \compattikzset{short/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@short@path}}
10787 \compattikzset{open/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@open@path}}
10788
10789 \compattikzset{lamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lamp@path}}
10790
10791 \compattikzset{squid/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@squid@path}}
10792 \compattikzset{barrier/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@barrier@path}}
10793 \compattikzset{thermocouple/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermocouple@path}}
10794 \compattikzset{fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fuse@path}}
10795 \compattikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@afuse@path}}
10796
10797 \compattikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@twoport@path}}
10798 \compattikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vco@path}}
10799 \compattikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandpass@path}}
10800 \compattikzset{bandstop/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandstop@path}}
10801 \compattikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@highpass@path}}
10802 \compattikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lowpass@path}}
10803 \compattikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@adc@path}}
10804 \compattikzset{dac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dac@path}}
10805 \compattikzset{dsp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dsp@path}}
10806 \compattikzset{fft/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fft@path}}
10807 \compattikzset{amp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@amp@path}}
10808 \compattikzset{vamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vamp@path}}
10809 \compattikzset{piattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@piattenuator@path}}
10810 \compattikzset{vpiattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vpiattenuator@path}}
10811 \compattikzset{tattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tattenuator@path}}
10812 \compattikzset{vtattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vtattenuator@path}}
10813 \compattikzset{phaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@phaseshifter@path}}
10814 \compattikzset{vphaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vphaseshifter@path}}
10815 \compattikzset{detector/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@detector@path}}
10816
10817 % % % % % %
10818 % % Beginn of Diodes
10819 % % % % % %
10820
10821 \def\pgf@circ@fulldiode@path#1{\pgf@circ@bipole@path{fulldiode}{#1}}
10822 \def\pgf@circ@fullzdiode@path#1{\pgf@circ@bipole@path{fullzdiode}{#1}}
10823 \def\pgf@circ@fullzzdiode@path#1{\pgf@circ@bipole@path{fullzzdiode}{#1}}
10824 \def\pgf@circ@fullsdiode@path#1{\pgf@circ@bipole@path{fullsdiode}{#1}}
10825 \def\pgf@circ@fulltdiode@path#1{\pgf@circ@bipole@path{fulltdiode}{#1}}
10826 \def\pgf@circ@fulllediode@path#1{\pgf@circ@bipole@path{fulllediode}{#1}}
10827 \def\pgf@circ@fullpdiode@path#1{\pgf@circ@bipole@path{fullpdiode}{#1}}
10828 \def\pgf@circ@fullvarcap@path#1{\pgf@circ@bipole@path{fullvarcap}{#1}}
10829 \def\pgf@circ@emptydiode@path#1{\pgf@circ@bipole@path{emptydiode}{#1}}
10830 \def\pgf@circ@emptyzdiode@path#1{\pgf@circ@bipole@path{emptyzdiode}{#1}}
10831 \def\pgf@circ@emptyzzdiode@path#1{\pgf@circ@bipole@path{emptyzzdiode}{#1}}
10832 \def\pgf@circ@emptysdiode@path#1{\pgf@circ@bipole@path{emptysdiode}{#1}}
10833 \def\pgf@circ@emptytdiode@path#1{\pgf@circ@bipole@path{emptytdiode}{#1}}
10834 \def\pgf@circ@emptylediode@path#1{\pgf@circ@bipole@path{emptylediode}{#1}}
10835 \def\pgf@circ@emptypdiode@path#1{\pgf@circ@bipole@path{emptypdiode}{#1}}
10836 \def\pgf@circ@emptyvarcap@path#1{\pgf@circ@bipole@path{emptyvarcap}{#1}}
10837
10838 \compattikzset{full diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulldiode@path}}
10839 \compattikzset{full Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullsdiode@path}}
10840 \compattikzset{full Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullzdiode@path}}
10841 \compattikzset{full ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullzzdiode@path}}
10842 \compattikzset{full tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulltdiode@path}}
10843 \compattikzset{full photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullpdiode@path}}
10844 \compattikzset{full led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulllediode@path}}
10845 \compattikzset{full varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullvarcap@path}}
10846 \compattikzset{full thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullthyristor@path}}
10847 \compattikzset{full triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulltriac@path}}
10848
10849 \compattikzset{empty diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptydiode@path}}
10850 \compattikzset{empty Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptysdiode@path}}
10851 \compattikzset{empty Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyzdiode@path}}
10852 \compattikzset{empty ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyzzdiode@path}}
10853 \compattikzset{empty tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptytdiode@path}}
10854 \compattikzset{empty photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptypdiode@path}}
10855 \compattikzset{empty led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptylediode@path}}
10856 \compattikzset{empty varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyvarcap@path}}
10857 \compattikzset{empty thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptythyristor@path}}
10858 \compattikzset{empty triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptytriac@path}}
10859
10860 \compattikzset{stroke diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptydiode@path}}
10861 \compattikzset{stroke Schottky diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptysdiode@path}}
10862 \compattikzset{stroke Zener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyzdiode@path}}
10863 \compattikzset{stroke ZZener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyzzdiode@path}}
10864 \compattikzset{stroke tunnel diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptytdiode@path}}
10865 \compattikzset{stroke photodiode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptypdiode@path}}
10866 \compattikzset{stroke led/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptylediode@path}}
10867 \compattikzset{stroke varcap/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyvarcap@path}}
10868 \compattikzset{stroke thyristor/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptythyristor@path}}
10869 %\compattikzset{stroke triac/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptytriac@path}}
10870
10871 \def\pgfcircdiodestylemacro{\ifpgf@circuit@strokediode stroke \else\ifpgf@circuit@fulldiode full \else empty \fi\fi}
10872
10873 \compattikzset{Schottky diode/.style = {\comnpatname \pgfcircdiodestylemacro Schottky diode}}
10874 \compattikzset{Zener diode/.style = {\comnpatname \pgfcircdiodestylemacro Zener diode}}
10875 \compattikzset{ZZener diode/.style = {\comnpatname \pgfcircdiodestylemacro ZZener diode}}
10876 \compattikzset{tunnel diode/.style = {\comnpatname \pgfcircdiodestylemacro tunnel diode}}
10877 \compattikzset{photodiode/.style = {\comnpatname \pgfcircdiodestylemacro photodiode}}
10878 \compattikzset{led/.style = {\comnpatname \pgfcircdiodestylemacro led}}
10879 \compattikzset{varcap/.style = {\comnpatname \pgfcircdiodestylemacro varcap}}
10880 \compattikzset{diode/.style = {\comnpatname \pgfcircdiodestylemacro diode}}
10881 \compattikzset{thyristor/.style = {\comnpatname \pgfcircdiodestylemacro thyristor}}
10882 \compattikzset{triac/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi triac}}%no stroke triac!
10883
10884 %% Define Shortcuts
10885 \compattikzset{Do/.style = {\comnpatname empty diode}}
10886 \compattikzset{tDo/.style = {\comnpatname empty tunnel diode}}
10887 \compattikzset{zDo/.style = {\comnpatname empty Zener diode}}
10888 \compattikzset{zzDo/.style = {\comnpatname empty ZZener diode}}
10889 \compattikzset{sDo/.style = {\comnpatname empty Schottky diode}}
10890 \compattikzset{pDo/.style = {\comnpatname empty photodiode}}
10891 \compattikzset{leDo/.style = {\comnpatname empty led}}
10892 \compattikzset{VCo/.style = {\comnpatname empty varcap}}
10893 \compattikzset{Tyo/.style = {\comnpatname empty thyristor}}
10894 \compattikzset{Tro/.style = {\comnpatname empty triac}}
10895
10896 \compattikzset{D*/.style = {\comnpatname full diode}}
10897 \compattikzset{tD*/.style = {\comnpatname full tunnel diode}}
10898 \compattikzset{zD*/.style = {\comnpatname full Zener diode}}
10899 \compattikzset{zzD*/.style = {\comnpatname full ZZener diode}}
10900 \compattikzset{sD*/.style = {\comnpatname full Schottky diode}}
10901 \compattikzset{pD*/.style = {\comnpatname full photodiode}}
10902 \compattikzset{leD*/.style = {\comnpatname full led}}
10903 \compattikzset{VC*/.style = {\comnpatname full varcap}}
10904 \compattikzset{Ty*/.style = {\comnpatname full thyristor}}
10905 \compattikzset{Tr*/.style = {\comnpatname full triac}}
10906
10907 \compattikzset{D/.style = {\comnpatname diode}}
10908 \compattikzset{tD/.style = {\comnpatname tunnel diode}}
10909 \compattikzset{zD/.style = {\comnpatname Zener diode}}
10910 \compattikzset{zzD/.style = {\comnpatname ZZener diode}}
10911 \compattikzset{sD/.style = {\comnpatname Schottky diode}}
10912 \compattikzset{pD/.style = {\comnpatname photodiode}}
10913 \compattikzset{leD/.style = {\comnpatname led}}
10914 \compattikzset{VC/.style = {\comnpatname varcap}}
10915 \compattikzset{Ty/.style = {\comnpatname thyristor}}
10916 \compattikzset{Tr/.style = {\comnpatname triac}}
10917
10918 \compattikzset{D-/.style = {\comnpatname stroke diode}}
10919 \compattikzset{tD-/.style = {\comnpatname stroke tunnel diode}}
10920 \compattikzset{zD-/.style = {\comnpatname stroke Zener diode}}
10921 \compattikzset{zzD-/.style = {\comnpatname stroke ZZener diode}}
10922 \compattikzset{sD-/.style = {\comnpatname stroke Schottky diode}}
10923 \compattikzset{pD-/.style = {\comnpatname stroke photodiode}}
10924 \compattikzset{leD-/.style = {\comnpatname stroke led}}
10925 \compattikzset{VC-/.style = {\comnpatname stroke varcap}}
10926 \compattikzset{Ty-/.style = {\comnpatname stroke thyristor}}
10927 \compattikzset{Tr-/.style = {\comnpatname empty triac}}%no stroke triac!
10928
10929 % % % % % %
10930 % % End of Diodes
10931 % % % % % %
10932
10933
10934 \compattikzset{memristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@memristor@path}}
10935 \compattikzset{closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cspst@path, l=#1}}
10936 \compattikzset{opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ospst@path, l=#1}}
10937 \compattikzset{ncs/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ncs@path, l=#1}}
10938 \compattikzset{nos/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@nos@path, l=#1}}
10939 \compattikzset{normal closed switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ncs@path, l=#1}}
10940 \compattikzset{normal open switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@nos@path, l=#1}}
10941 \compattikzset{switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cspst@path, l=#1}}
10942 \compattikzset{push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pushbutton@path, l=#1}}
10943 \compattikzset{toggle switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@toggleswitch@path}}
10944
10945 \compattikzset{ammeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ammeter@path}}
10946 \compattikzset{voltmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@voltmeter@path}}
10947 \compattikzset{ohmmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ohmmeter@path}}
10948
10949 % short forms
10950 \compattikzset{esource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@esource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10951 \compattikzset{pvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pvsource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10952 \compattikzset{dcvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dcvsource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
10953 \compattikzset{dcisource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dcisource@path, \circuitikzbasekey/bipole/is current=true, l=#1}}
10954
10955 \compattikzset{ioosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is current=true,/tikz/to path=\pgf@circ@oosource@path, i=#1}}
10956 \compattikzset{voosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is voltage=true,/tikz/to path=\pgf@circ@oosource@path, v=#1}}
10957
10958 \compattikzset{vsource/.style = {\comnpatname voltage source = #1}}
10959 \compattikzset{isource/.style = {\comnpatname current source = #1}}
10960 \compattikzset{cisource/.style = {\comnpatname controlled current source = #1}}
10961 \compattikzset{cvsource/.style = {\comnpatname controlled voltage source = #1}}
10962 \compattikzset{vsourcesin/.style = {\comnpatname sinusoidal voltage source = #1}}
10963 \compattikzset{vsourcesquare/.style = {\comnpatname square voltage source = #1}}
10964 \compattikzset{vsourcetri/.style = {triangle voltage source = #1}}
10965 \compattikzset{isourcesin/.style = {\comnpatname sinusoidal current source = #1}}
10966 \compattikzset{cisourcesin/.style = {\comnpatname controlled sinusoidal current source = #1}}
10967 \compattikzset{cvsourcesin/.style = {\comnpatname controlled sinusoidal voltage source = #1}}
10968
10969 \compattikzset{controlled vsource/.style = {\comnpatname controlled voltage source = #1}}
10970 \compattikzset{controlled isource/.style = {\comnpatname controlled current source = #1}}
10971 \compattikzset{controlled vsourcesin/.style = {\comnpatname controlled sinusoidal voltage source = #1}}
10972 \compattikzset{controlled isourcesin/.style = {\comnpatname controlled sinusoidal current source = #1}}
10973
10974 \compattikzset{R/.style= {\comnpatname resistor = #1}}
10975 %\ifpgf@circuit@compat\else\compattikzset{R/.style= {resistor = #1}}\fi
10976 \compattikzset{vR/.style= {\comnpatname variable resistor = #1}}
10977 \compattikzset{phR/.style= {\comnpatname photoresistor = #1}}
10978 \compattikzset{thR/.style= {\comnpatname thermistor = #1}}
10979 \compattikzset{thRp/.style= {\comnpatname thermistor ptc= #1}}
10980 \compattikzset{thRn/.style= {\comnpatname thermistor ntc= #1}}
10981 \compattikzset{pR/.style= {\comnpatname potentiometer = #1}}
10982 \compattikzset{C/.style = {\comnpatname capacitor = #1}}
10983 \compattikzset{eC/.style = {\comnpatname ecapacitor = #1}}
10984 \compattikzset{pC/.style = {\comnpatname polar capacitor = #1}}
10985 \compattikzset{vC/.style = {\comnpatname variable capacitor = #1}}
10986 \compattikzset{PZ/.style = {\comnpatname piezoelectric = #1}}
10987 \compattikzset{L/.style = {\comnpatname inductor = #1}}
10988 \compattikzset{vL/.style = {\comnpatname variable inductor = #1}}
10989 \compattikzset{V/.style = {\comnpatname voltage source = #1}}
10990 \compattikzset{cV/.style = {\comnpatname controlled voltage source = #1}}
10991 \compattikzset{sV/.style = {\comnpatname sinusoidal voltage source = #1}}
10992 \compattikzset{sqV/.style = {\comnpatname square voltage source = #1}}
10993 \compattikzset{tV/.style = {\comnpatname triangle voltage source = #1}}
10994 \compattikzset{csV/.style = {\comnpatname controlled sinusoidal voltage source = #1}}
10995 \def\pgf@temp#1{
10996 \compattikzset{V#1/.style = {\comnpatname voltage source, v#1=##1} }
10997 \compattikzset{cV#1/.style = {\comnpatname controlled voltage source, v#1=##1} }
10998 \compattikzset{sV#1/.style = {\comnpatname sinusoidal voltage source, v#1=##1} }
10999 \compattikzset{csV#1/.style = {\comnpatname controlled sinusoidal voltage source, v#1=##1} }
11000 }
11001 \pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<}
11002 \pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_}
11003
11004 %current sources
11005 \compattikzset{I/.style = {\comnpatname current source = #1}}
11006 \compattikzset{cI/.style = {\comnpatname controlled current source = #1}}
11007 \compattikzset{sI/.style = {\comnpatname sinusoidal current source = #1}}
11008 \compattikzset{csI/.style = {\comnpatname controlled sinusoidal current source = #1}}
11009 \def\pgf@temp#1{
11010 \compattikzset{I#1/.style = {\comnpatname current source, i#1=##1} }
11011 \compattikzset{cI#1/.style = {\comnpatname controlled current source, i#1=##1} }
11012 \compattikzset{sI#1/.style = {\comnpatname sinusoidal current source, i#1=##1} }
11013 \compattikzset{csI#1/.style = {\comnpatname controlled sinusoidal current source, i#1=##1} }
11014 }
11015 \pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<}
11016 \pgf@temp{>_} \pgf@temp{<_} \pgf@temp{>^} \pgf@temp{<^}
11017 \pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_}
11018
11019
11020
11021 \compattikzset{Mr/.style = {\comnpatname memristor}}
11022
11023 \compattikzset{cspst/.style = {\comnpatname closing switch = #1}}
11024 \compattikzset{ospst/.style = {\comnpatname opening switch = #1}}
11025 \compattikzset{spst/.style = {\comnpatname switch = #1}}
11026
11027 \compattikzset{afuse/.style = {\comnpatname asymmetric fuse=#1}}
11028
11029 \compattikzset{vdd/.style = {\comnpatname vcc = #1}}
11030 \compattikzset{vss/.style = {\comnpatname vee = #1}}
11031
11032 \def\inheritlogicport#1#2{
11033 \pgfdeclareshape{#2 port}{
11034 \inheritsavedanchors[from=#1 #2 port]
11035 \inheritbackgroundpath[from=#1 #2 port]
11036 \inheritanchor[from=#1 #2 port]{in}
11037 \inheritanchor[from=#1 #2 port]{in 1}
11038 \inheritanchor[from=#1 #2 port]{in 2}
11039 \inheritanchor[from=#1 #2 port]{out}
11040 \inheritanchor[from=#1 #2 port]{center}
11041 \inheritanchor[from=#1 #2 port]{left}
11042 }
11043 }
11044
11045 \ifpgf@circuit@europeanlogicport
11046 \inheritlogicport{european}{and}
11047 \inheritlogicport{european}{or}
11048 \inheritlogicport{european}{xor}
11049 \inheritlogicport{european}{not}
11050 \inheritlogicport{european}{nand}
11051 \inheritlogicport{european}{nor}
11052 \inheritlogicport{european}{xnor}
11053 \else
11054 \inheritlogicport{american}{and}
11055 \inheritlogicport{american}{or}
11056 \inheritlogicport{american}{xor}
11057 \inheritlogicport{american}{not}
11058 \inheritlogicport{american}{nand}
11059 \inheritlogicport{american}{nor}
11060 \inheritlogicport{american}{xnor}
11061 \fi
11062
11063 % Transistor like bipoles
11064
11065 \def\pgf@circ@trans@path#1#2{
11066 \pgfextra{
11067 \edef\pgf@temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
11068 \def\pgf@circ@temp{#2}
11069 \ifx\pgf@temp\pgf@circ@temp % if it has not a name
11070 \pgfmathrandominteger{\pgf@circ@rand}{1000}{9999}
11071 \ctikzset{bipole/name = trans\pgf@circ@rand} % create it
11072 \fi
11073 }
11074 \ifpgf@circuit@bipole@inverted
11075 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
11076 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {}
11077 \else
11078 (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
11079 (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {}
11080 \fi
11081 \pgfextra{
11082 \pgfmathanglebetweenpoints{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
11083 {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
11084 \pgfmathadd{\pgfmathresult}{-90}
11085 \edef\pgf@circ@direction{\pgfmathresult}
11086 }
11087 ($(\tikztostart) ! .5 ! (\tikztotarget)$)
11088 node[#1, /tikz/rotate=\pgf@circ@direction, xscale=\ctikzvalof{mirror value}]
11089 (\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}}
11090 \ifcsname pgf@anchor@#1@pathstart\endcsname%if special path-anchors are defined, use them!
11091 (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.pathstart)
11092 (\ctikzvalof{bipole/name}.pathend) -- (\ctikzvalof{bipole/name}end.center)
11093 \else
11094 (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.left)
11095 (\ctikzvalof{bipole/name}.right) -- (\ctikzvalof{bipole/name}end.center)
11096 \fi
11097 \pgfextra{
11098 \pgfcircresetpath
11099 }
11100 (\tikztotarget) \tikztonodes % e si continua
11101 }
11102
11103
11104 \def\pgf@circ@definetranspath#1{
11105 \compattikzset{T#1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@trans@path{#1}{}, l=##1}}
11106 }
11107
11108 \pgf@circ@definetranspath{elmech}
11109 \pgf@circ@definetranspath{nmos}
11110 \pgf@circ@definetranspath{pmos}
11111 \pgf@circ@definetranspath{npn}
11112 \pgf@circ@definetranspath{pnp}
11113 \pgf@circ@definetranspath{nfet}
11114 \pgf@circ@definetranspath{nigfete}
11115 \pgf@circ@definetranspath{nigfetd}
11116 \pgf@circ@definetranspath{nigfetebulk}
11117 \pgf@circ@definetranspath{pfet}
11118 \pgf@circ@definetranspath{pigfete}
11119 \pgf@circ@definetranspath{pigfetd}
11120 \pgf@circ@definetranspath{pigfetebulk}
11121 \pgf@circ@definetranspath{njfet}
11122 \pgf@circ@definetranspath{pjfet}
11123 \pgf@circ@definetranspath{pigbt}
11124 \pgf@circ@definetranspath{nigbt}
11125 \pgf@circ@definetranspath{Lpigbt}
11126 \pgf@circ@definetranspath{Lnigbt}
11127 %%%---------- close: tex/pgfcircpath
11128
11129 \ifpgf@circ@siunitx
11130 \RequirePackage{xstring}[2009/03/13]
11131 %\expandafter\let\csname angstrom\endcsname\relax
11132 \RequirePackage{siunitx}
11133 \fi
11134
11135
11136
11137 \newenvironment{circuitikz}{\begin{tikzpicture}}{\end{tikzpicture}}
11138 %override (unused) circuitikz environment for compability to externalization)
11139 \let\circuitikz\tikzpicture
11140 \let\endcircuitikz\endtikzpicture
11141
11142 \endinput