summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/examples/svg/SwitchesSVG.m4
blob: 8808e5be2779acf2382e1a42bf234678c7d50a3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
.PS
# SwitchesSVG.m4
cct_init(svg_font(sans-serif,11bp__,2bp__))
textoffset = 3bp__

movewid = 0.25
moveht = moveht*1.25
  right_; {
    lswitch; rlabel(,"``lswitch''")
    move right_
    lswitch(,,O); rlabel(,"`(,,O)'")
    move right_
    lswitch(,,C); rlabel(,"`(,,C)'")
    move right_
    lswitch(,,DA); rlabel(,"`(,,DA)'")
    move right_
    lswitch(,,DO); rlabel(,"`(,,DO)'")
    move right_
    lswitch(,,DC); rlabel(,"`(,,DC)'")
    }
  move down; right_; {
    lswitch(,,K); rlabel(,"`(,,K)'")
    move right_
    lswitch(,,KD); rlabel(,"`(,,KD)'")
    move right_
    lswitch(,,KOD); rlabel(,"`(,,KOD)'")
    move right_
    lswitch(,,KCD); rlabel(,"`(,,KCD)'")
    move right_
    bswitch; rlabel(,"``bswitch''")
    move right_
    bswitch(,,C); rlabel(,"`(,,C)'")
    }
  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)'")
    }
  move down; right_; {
    dswitch(,,WBT); rlabel(,"`(,,WBT)'")
    move right_
    dswitch(,,WdBKC); rlabel(,"`(,,WdBKC)'")
    move right_
    dswitch(,,WBM); rlabel(,"`(,,WBM)'")
    move right_
    dswitch(,,WBCO); rlabel(,"`(,,WBCO)'")
    move right_
    dswitch(,,WBMP); rlabel(,"`(,,WBMP)'")
    move right_
    dswitch(,,WBoKCP); rlabel(,"`(,,WBoKCP)'")
    }
  move down; right_; {
    dswitch(,,WBCY); rlabel(,"`(,,WBCY)'")
    move right_
    dswitch(,,WBCZ); rlabel(,"`(,,WBCZ)'")
    move right_
    dswitch(,,WBCE); rlabel(,"`(,,WBCE)'")
    move right_
    dswitch(,,WBRH); rlabel(,"`(,,WBRH)'")
    move right_
    dswitch(,,WBRdH); rlabel(,"`(,,WBRdH)'")
    move right_
    dswitch(,,WBRHH); rlabel(,"`(,,WBRHH)'")
    }
  move down; right_; {
    dswitch(,,WBMMR); rlabel(,"`(,,WBMMR)'")
    move right_
    dswitch(,,WBMM); rlabel(,"`(,,WBMM)'")
    move right_
    dswitch(,,WBMR); rlabel(,"`(,,WBMR)'")
    move right_
    dswitch(,,WBEL); rlabel(,"`(,,WBEL)'")
    move right_
    dswitch(,,WBLE); rlabel(,"`(,,WBLE)'")
    move right_
    dswitch(,,WdBKEL); rlabel(,"`(,,WdBKEL)'")
    }

 command "</g>" # end font
.PE