summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-02-23 03:01:01 +0000
committerNorbert Preining <norbert@preining.info>2020-02-23 03:01:01 +0000
commit0908ef0004729f1b45b8d9687656f2f92fc122ae (patch)
treeaa4649a4452d4556370dc1d72c01f5d872a7c159 /graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
parent3549e67b13c8460a73d122fbc2eef8badd816636 (diff)
CTAN sync 202002230301
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex')
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex130
1 files changed, 97 insertions, 33 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
index cd4b14fcab..a315f97806 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
@@ -278,6 +278,27 @@
\pgf@circ@draworfill
}
+%
+% generic crossed, suggested by Radványi Patrik Tamás <patrikradvanyi@gmail.com>
+% inherit "generic" properties
+%
+\pgfcircdeclarebipolescaled{resistors}
+{}
+{\ctikzvalof{bipoles/generic/height}}
+{xgeneric}
+{\ctikzvalof{bipoles/generic/height}}
+{\ctikzvalof{bipoles/generic/width}}
+{
+ \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgf@circ@draworfill
+ % cross it
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
+}
%% Generic empty tunable
\pgfcircdeclarebipolescaled{resistors}
{}
@@ -2128,6 +2149,50 @@
\endpgfscope
}
+%
+% draw LED arrows
+%
+\def\pgf@circ@draw@ledarrows{%
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfsetarrowsend{latexslim}
+ \ifpgf@led@fliparrows
+ \pgfpathmoveto{\pgfpoint{0pt}{0.8\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{-0.6\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@right}{0.6\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{1.6\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \else
+ \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \fi
+}
+%
+% ---and photodiode arrows
+%
+\def\pgf@circ@draw@pdarrows{%
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfsetarrowsstart{latexslim}
+ \ifpgf@pd@fliparrows
+ \pgfpathmoveto{\pgfpoint{0pt}{0.8\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{-0.6\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@right}{0.6\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{1.6\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \else
+ \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \fi
+}
%% Black light emitting diode
\pgfcircdeclarebipolescaled{diodes}
{}
@@ -2150,15 +2215,7 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfusepath{draw}
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfsetarrowsend{latexslim}
- \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
- \pgfusepath{draw}
-
+ \pgf@circ@draw@ledarrows
}
%% Black photodiode
@@ -2183,14 +2240,7 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfusepath{draw}
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfsetarrowsstart{latexslim}
- \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
- \pgfusepath{draw}
+ \pgf@circ@draw@pdarrows
}
%% Black varcap
@@ -2355,14 +2405,7 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfusepath{draw}
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfsetarrowsend{latexslim}
- \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
- \pgfusepath{draw}
+ \pgf@circ@draw@ledarrows
}
%% Empty photodiode
@@ -2382,14 +2425,7 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfusepath{draw}
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfsetarrowsstart{latexslim}
- \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
- \pgfusepath{draw}
+ \pgf@circ@draw@pdarrows
}
%% Empty varcap
@@ -5059,6 +5095,34 @@
\pgfusepath{draw}
}
+%
+% open version of the barrier symbol
+% suggested by Radványi Patrik Tamás <patrikradvanyi@gmail.com>
+%
+\pgfcircdeclarebipolescaled{misc}
+{}
+{\ctikzvalof{bipoles/barrier/height}}
+{openbarrier}
+{\ctikzvalof{bipoles/barrier/height}}
+{\ctikzvalof{bipoles/barrier/width}}
+{
+ % this is set with normal wire linewidth
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/openbarrier/gap}*\pgf@circ@res@left}{0pt}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/openbarrier/gap}*\pgf@circ@res@right}{0pt}}
+ \pgfusepath{draw}
+
+ % do the cross part
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+
+ \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@up}}
+
+ \pgfusepath{draw}
+}
%% Lamp
\pgfcircdeclarebipolescaled{misc}
{}