summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex')
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex138
1 files changed, 125 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
index 255aa335f0e..b98af8b9123 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
@@ -738,13 +738,14 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
+ \pgfpathclose
\pgfusepath{draw}
\pgfpathellipse
{\pgfpoint{\pgf@circ@res@step-.5\pgf@circ@res@other}{0pt}}
{\pgfpoint{.5\pgf@circ@res@other}{0pt}}
{\pgfpoint{0pt}{.5\pgf@circ@res@other}}
- \pgfusepath{draw}
+ \pgfsetfillcolor{white}
+ \pgfusepath{draw,fill}
\endpgfscope
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
@@ -769,7 +770,111 @@
}
}
-
+\pgfdeclareshape{schmitt}
+ {
+ \anchor{center}{\pgfpointorigin}
+ \savedanchor\northwest{%
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@x
+ \pgf@x=.5\pgf@x
+ }
+ \savedanchor\left{%
+ \pgf@y=0pt
+ }
+ \anchor{in}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{out}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \anchor{east}{
+ \left
+ \pgf@x=-.8\pgf@x
+ }
+ \anchor{west}{
+ \left
+ }
+ \anchor{south}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{north}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{south west}{
+ \northwest
+ \pgf@y=-\pgf@y
+ }
+ \anchor{north east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ }
+ \anchor{north west}{
+ \northwest
+ }
+ \anchor{south east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \backgroundpath{
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+
+
+ \northwest
+ \pgf@circ@res@up = \pgf@y
+ \pgf@circ@res@down = -\pgf@y
+ \pgf@circ@res@right = -\pgf@x
+ \pgf@circ@res@left = \pgf@x
+
+ \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right
+
+ \pgfscope
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgftransformxshift{.7\pgf@circ@res@left}
+ \pgf@circ@res@step=\pgf@circ@res@right
+ \advance\pgf@circ@res@step by -\pgf@circ@res@left
+ \pgf@circ@res@step=.7\pgf@circ@res@step
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
+ \pgfpathclose
+ \pgfusepath{draw}
+ \endpgfscope
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right-\pgf@circ@res@other}{0pt}}
+ \pgfusepath{draw}
+ %draw inner shape
+
+ \pgfsetlinewidth{2\pgflinewidth}
+
+ \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{.3\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@left}{.3\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@up}}
+ \pgfusepath{draw}
+
+ }
+ }
@@ -3235,22 +3340,29 @@
\pgfpointorigin
}
\anchor{anode}{
- \northwest
- \pgf@circ@res@step= \pgf@y
- \pgfpointorigin
- \pgfpathmoveto{ \pgfpointpolar{-90}{\pgf@circ@res@step}}
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
}
\anchor{cathode1}{
\northwest
- \pgf@circ@res@step= \pgf@y
- \pgfpointorigin
- \pgfpathmoveto{ \pgfpointpolar{105}{\pgf@circ@res@step}}
+ \pgf@circ@res@step=\pgf@y
+ \pgfmathparse{cos(105)}
+ \pgf@x=\pgfmathresult\pgf@circ@res@step
+ \pgfmathparse{sin(105)}
+ \pgf@y=\pgfmathresult\pgf@circ@res@step
+ %\pgfpointorigin
+ %\pgfpathmoveto{\pgfpointpolar{105}{\pgf@circ@res@step}}%not working in a scaled tikzpicture
}
\anchor{cathode2}{
\northwest
- \pgf@circ@res@step= \pgf@y
- \pgfpointorigin
- \pgfpathmoveto{ \pgfpointpolar{75}{\pgf@circ@res@step}}
+ \pgf@circ@res@step=\pgf@y
+ \pgfmathparse{cos(75)}
+ \pgf@x=\pgfmathresult\pgf@circ@res@step
+ \pgfmathparse{sin(75)}
+ \pgf@y=\pgfmathresult\pgf@circ@res@step
+ %\pgfpointorigin
+ %\pgfpathmoveto{\pgfpointpolar{75}{\pgf@circ@res@step}}%not working in a scaled tikzpicture
}
\anchor{text}{
\pgfpointorigin