summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/examples/svg/SwitchesSVG.m4
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/circuit_macros/examples/svg/SwitchesSVG.m4')
-rw-r--r--graphics/circuit_macros/examples/svg/SwitchesSVG.m4134
1 files changed, 75 insertions, 59 deletions
diff --git a/graphics/circuit_macros/examples/svg/SwitchesSVG.m4 b/graphics/circuit_macros/examples/svg/SwitchesSVG.m4
index 8808e5be27..04fc2f52c5 100644
--- a/graphics/circuit_macros/examples/svg/SwitchesSVG.m4
+++ b/graphics/circuit_macros/examples/svg/SwitchesSVG.m4
@@ -4,100 +4,116 @@ cct_init(svg_font(sans-serif,11bp__,2bp__))
textoffset = 3bp__
movewid = 0.25
-moveht = moveht*1.25
+# Row 1
right_; {
- lswitch; rlabel(,"``lswitch''")
+ lswitch; {S:"svg_tt(`lswitch')" at last [].s+(0,-10bp__)}
move right_
- lswitch(,,O); rlabel(,"`(,,O)'")
+ lswitch(,,O); {"svg_tt(`(,,O)')" at (last [],S)}
move right_
- lswitch(,,C); rlabel(,"`(,,C)'")
+ lswitch(,,C); {"svg_tt(`(,,C)')" at (last [],S)}
move right_
- lswitch(,,DA); rlabel(,"`(,,DA)'")
+ lswitch(,,DA); {"svg_tt(`(,,DA)')" at (last [],S)}
move right_
- lswitch(,,DO); rlabel(,"`(,,DO)'")
+ lswitch(,,dDO); {"svg_tt(`(,,dDO)')" at (last [],S)}
move right_
- lswitch(,,DC); rlabel(,"`(,,DC)'")
+ lswitch(,,uDC); {"svg_tt(`(,,uDC)')" at (last [],S)}
}
+# Row 2
move down; right_; {
- lswitch(,,K); rlabel(,"`(,,K)'")
+ lswitch(,,K); {S:"svg_tt(`(,,K)')" at last [].s+(0,-10bp__)}
move right_
- lswitch(,,KD); rlabel(,"`(,,KD)'")
+ lswitch(,,KD); {"svg_tt(`(,,KD)')" at (last [],S)}
move right_
- lswitch(,,KOD); rlabel(,"`(,,KOD)'")
+ lswitch(,,KOD); {"svg_tt(`(,,KOD)')" at (last [],S)}
move right_
- lswitch(,,KCD); rlabel(,"`(,,KCD)'")
+ lswitch(,,KCD); {"svg_tt(`(,,KCD)')" at (last [],S)}
move right_
- bswitch; rlabel(,"``bswitch''")
+ bswitch; {"svg_tt(``bswitch'')" at (last [],S)}
move right_
- bswitch(,,C); rlabel(,"`(,,C)'")
+ bswitch(,,C); {"svg_tt(`(,,C)')" at (last [],S)}
}
+# Row 3
move down; right_; {
- S: dswitch(,,)
- ifgpic(`{[line invis] at S.c+(0,-0.2)}')
- rlabel(,"``dswitch=''")
- { "`switch(,,,D)'" at last [].s + (0,-0.23) }
- thinlines_
- { spline <- from 0.25 along_(S) up 0.1 then up 0.05 left 0.1
- "W" wid 8bp__ at Here+(-5bp__,0)
- spline <- from S.c+(0,m4sc*2) up 0.1 then up 0.05 left 0.1
- "B" wid 5bp__ at Here+(-5bp__,0) }
- thicklines_
- move right_
- S: dswitch(,,WdBK); rlabel(,"`(,,WdBK)'")
- thinlines_
- { spline <- from tr_xy(0,-2) up 0.1 then up 0.10 left 0.1
- "dB" rjust
- spline <- from tr_xy(4,-2) right 0.1 then right 0.05 up 0.15
- "K" above }
- thicklines_
- move right_
- dswitch(,,WBuD); rlabel(,"`(,,WBuD)'")
- move right_
- dswitch(,,WdBKF); rlabel(,"`(,,WdBKF)'")
- move right_
- dswitch(,,WBL); rlabel(,"`(,,WBL)'")
- move right_
- dswitch(,,WdBKL); rlabel(,"`(,,WdBKL)'")
+ D: dswitch(,,); {S: "svg_tt(`dswitch(,,)')" at last [].s+(0,-10bp__)}
+ thinlines_
+ { spline <- from 0.25 along_(D) up 0.1 then up 0.05 left 0.1
+ {"svg_tt(`W')" rjust}
+ spline <- from D.c+(0,m4sc*2) up 0.1 then up 0.05 left 0.1
+ {"svg_tt(`B')" rjust }}
+ thicklines_
+ move right_
+ D: dswitch(,,WdBK); {"svg_tt(`(,,WdBK)')" at (last [],S)+(0,-4bp__)}
+ thinlines_
+ { spline <- from tr_xy(0,-2) up 0.1 then up 0.10 left 0.1
+ {"svg_tt(`dB')" rjust}
+ spline <- from tr_xy(4,-2) right 0.1 then right 0.05 up 0.15
+ {"svg_tt(`K')" above }}
+ thicklines_
+ move right_
+ dswitch(,,WBmdDK); {"svg_tt(`(,,WBmdDK)')" at (last [],S)}
+ move right_
+ dswitch(,,WBKTr); {"svg_tt(`(,,WBKTr)')" at (last [],S)}
+ move right_
+ dswitch(,,WdBL); {"svg_tt(`(,,WdBL)')" at (last [],S+(0,-4bp__))}
+ move right_
+ dswitch(,,WBCo); {"svg_tt(`(,,WBCo)')" at (last [],S)}
}
+# Row 4
move down; right_; {
- dswitch(,,WBT); rlabel(,"`(,,WBT)'")
+ dswitch(,,WBKCo); {S: "svg_tt(`(,,WBKCo)')" at last [].s+(0,-10bp__)}
move right_
- dswitch(,,WdBKC); rlabel(,"`(,,WdBKC)'")
+ dswitch(,,WBCb); {"svg_tt(`(,,WBCb)')" at (last [],S)}
move right_
- dswitch(,,WBM); rlabel(,"`(,,WBM)'")
+ dswitch(,,WBDI); {"svg_tt(`(,,WBDI)')" at (last [],S)}
move right_
- dswitch(,,WBCO); rlabel(,"`(,,WBCO)'")
+ dswitch(,,WBSd); {"svg_tt(`(,,WBSd)')" at (last [],S)}
move right_
- dswitch(,,WBMP); rlabel(,"`(,,WBMP)'")
+ dswitch(,,WBFDI); {"svg_tt(`(,,WBFDI)')" at (last [],S)}
move right_
- dswitch(,,WBoKCP); rlabel(,"`(,,WBoKCP)'")
+ dswitch(,,WBFSd); {"svg_tt(`(,,WBFSd)')" at (last [],S)}
}
- move down; right_; {
- dswitch(,,WBCY); rlabel(,"`(,,WBCY)'")
+# Row 5
+ move down moveht*5/4; right_; {
+ dswitch(,,WBTh); {S: "svg_tt(`(,,WBTh)')" at last [].s+(0,-10bp__)}
+ move right_
+ dswitch(,,WBKC); {"svg_tt(`(,,WBKC)')" at (last [],S)}
+ move right_
+ dswitch(,,WBM); {"svg_tt(`(,,WBM)')" at (last [],S)}
+ move right_
+ dswitch(,,WBCO); {"svg_tt(`(,,WBCO)')" at (last [],S)}
+ move right_
+ dswitch(,,WBMP); {"svg_tt(`(,,WBMP)')" at (last [],S)}
+ move right_
+ dswitch(,,WBoKCP); {"svg_tt(`(,,WBoKCP)')" at (last [],S)}
+ }
+# Row 6
+ move down moveht*5/4; right_; {
+ dswitch(,,WBCY); {S: "svg_tt(`(,,WBCY)')" at last [].s+(0,-10bp__)}
move right_
- dswitch(,,WBCZ); rlabel(,"`(,,WBCZ)'")
+ dswitch(,,WBCZ); {"svg_tt(`(,,WBCZ)')" at (last [],S)}
move right_
- dswitch(,,WBCE); rlabel(,"`(,,WBCE)'")
+ dswitch(,,WBCE); {"svg_tt(`(,,WBCE)')" at (last [],S)}
move right_
- dswitch(,,WBRH); rlabel(,"`(,,WBRH)'")
+ dswitch(,,WBRH); {"svg_tt(`(,,WBRH)')" at (last [],S)}
move right_
- dswitch(,,WBRdH); rlabel(,"`(,,WBRdH)'")
+ dswitch(,,WBRdH); {"svg_tt(`(,,WBRdH)')" at (last [],S)}
move right_
- dswitch(,,WBRHH); rlabel(,"`(,,WBRHH)'")
+ dswitch(,,WBRHH); {"svg_tt(`(,,WBRHH)')" at (last [],S)}
}
+# Row 7
move down; right_; {
- dswitch(,,WBMMR); rlabel(,"`(,,WBMMR)'")
+ dswitch(,,WBMMR); {S: "svg_tt(`(,,WBMMR)')" at last [].s+(0,-10bp__)}
move right_
- dswitch(,,WBMM); rlabel(,"`(,,WBMM)'")
+ dswitch(,,WBMM); {"svg_tt(`(,,WBMM)')" at (last [],S)}
move right_
- dswitch(,,WBMR); rlabel(,"`(,,WBMR)'")
+ dswitch(,,WBMR); {"svg_tt(`(,,WBMR)')" at (last [],S)}
move right_
- dswitch(,,WBEL); rlabel(,"`(,,WBEL)'")
+ dswitch(,,WBEL); {"svg_tt(`(,,WBEL)')" at (last [],S)}
move right_
- dswitch(,,WBLE); rlabel(,"`(,,WBLE)'")
+ dswitch(,,WBLE); {"svg_tt(`(,,WBLE)')" at (last [],S)}
move right_
- dswitch(,,WdBKEL); rlabel(,"`(,,WdBKEL)'")
+ dswitch(,,WBoKEL); {"svg_tt(`(,,WBoKEL)')" at (last [],S)}
}
- command "</g>" # end font
+ command "</g>')" # end font
.PE