diff options
Diffstat (limited to 'graphics/circuit_macros/libcct.m4')
-rw-r--r-- | graphics/circuit_macros/libcct.m4 | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/graphics/circuit_macros/libcct.m4 b/graphics/circuit_macros/libcct.m4 index cf73ba0567..fd31a76c80 100644 --- a/graphics/circuit_macros/libcct.m4 +++ b/graphics/circuit_macros/libcct.m4 @@ -1,7 +1,7 @@ divert(-1) libcct.m4 -* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * +* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * @@ -3464,6 +3464,14 @@ define(`m4pconpin',`[ifinstr(`$3',F,`lbox(`$1',`$2')', define(`m4pcrpin',`[ifinstr(`$2',F,`circle diam `$1'', `m4fshade(m4fill,circle diam `$1')')]') + `m4fshade(gray value,closed curve) internal' +ifelse(m4picprocessor,gpic, + `define`m4fshade',`shade(ifelse(`$1',,0,`$1'),`$2')')', +m4postprocessor,xfig, + `define(`m4fshade',``$2' fill ifelse(`$1',,0,`$1')')', +`define(`m4fshade',``$2' dnl + ifdef(`r_',`shaded rgbstring(r_,g_,b_)',`fill ifelse(`$1',,0,`$1')')')') + `Header(1|2,rows,wid,ht,type) arg1: number of columns arg2: pins per column @@ -3597,7 +3605,8 @@ define(`norator',`eleminit_(`$1') {[box invis ht_ m4ht wid_ m4wd] at rvec_(rp_len/2,0)} line to rvec_(rp_len,0) invis ') - `ACsymbol(at position, len, ht, [n:][A]U|D|L|R|degrees) + `ACsymbol(at position, len, ht, [n:][A]U|D|L|R|degrees, + attributes) Arg4: drawing direction (default: current direction) Arg4 contains A: use arcs instead of sinusoid A convenience for drawing a stack of n 1-cycle @@ -3619,12 +3628,13 @@ define(`ACsymbol',`[ Origin: Here { arc ccw to rvec_( m4range/2,0) \ with .c at rvec_( m4range/4, max(m4range/4-m4amp,0)) }] dnl with .Origin at Here }', - `{ S`'m4x: sinusoid(m4amp,twopi_/m4range,pi_/2,-m4range/2,m4range/2) dnl - with .Origin at Here } ')') - `$5'; resetdir_ popdef(`m4amp',`m4n',`m4ACd',`m4range')] dnl + `{ S`'m4x: sinusoid(m4amp,twopi_/m4range,pi_/2, + -m4range/2,m4range/2,`$5') with .Origin at Here } ')') + `$6'; resetdir_ popdef(`m4amp',`m4n',`m4ACd',`m4range')] dnl with .Origin ifelse(`$1',,`at Here',`$1')') - `Deltasymbol(at position, keys, U|D|L|R|degrees) + `Deltasymbol(at position, keys, U|D|L|R|degrees, + attributes) keys: size=expr; type=C|O (default C for Closed, O means open); Arg3: drawing direction (default: Up) @@ -3633,18 +3643,18 @@ define(`Deltasymbol',`[ sq3 = sqrt(3) pushkeys_(`$2',size:dimen_/10; type:C:N )dnl setdir_(`$3',U) ifinstr(m4type,C, - `line from vec_(vscal_(m4size,-sq3,0)) to \ + `line `$4' from vec_(vscal_(m4size,-sq3,0)) to \ vec_(vscal_(m4size,-sq3,1)) then to Here \ then to vec_(vscal_(m4size,-sq3,-1)) \ then to vec_(vscal_(m4size,-sq3,0))', - `line from vec_(vscal_(m4size,-sq3/2,-1/2)) \ + `line `$4' from vec_(vscal_(m4size,-sq3/2,-1/2)) \ to vec_(vscal_(m4size,-sq3,-1)) \ then to vec_(vscal_(m4size,-sq3,1)) \ then to vec_(vscal_(m4size,-sq3/2,1/2)) ') C: vec_(vscal_(m4size,-(sq3+1/sq3)/2,0)); N: C `$4'; resetdir_ popdef(`m4size',`m4type') ] ifelse(`$1',,`at Here',`$1')') - `Ysymbol(at position, keys, U|D|L|R|degrees) + `Ysymbol(at position, keys, U|D|L|R|degrees, attributes) keys: size=expr; type=G[L] (grounded, L puts the ground on the left); Arg3: drawing direction (default: Up)' @@ -3653,25 +3663,26 @@ define(`Ysymbol',`[ sq3 = sqrt(3) setdir_(`$3',U) C: Here; N: C line from vec_(vscal_(m4size,-2/sq3,0)) to C - { line from vec_(vscal_(m4size,1/sq3,1)) to C \ + { line `$4' from vec_(vscal_(m4size,1/sq3,1)) to C \ then to vec_(vscal_(m4size,1/sq3,-1)) } - ifelse(m4type,,,`line ifinstr(m4type,L,left_,right_) m4size*3/2; corner - pushdef(`dimen_',m4size*4) ground popdef(`dimen_') ') - `$4'; resetdir_ popdef(`m4size',`m4type') ] ifelse(`$1',,`at Here',`$1')') + ifelse(m4type,,,`line `$4' ifinstr(m4type,L,left_,right_) m4size*3/2 + corner(,`$4'); pushdef(`dimen_',m4size*4) ground popdef(`dimen_') ') + `$5'; resetdir_ popdef(`m4size',`m4type') ] ifelse(`$1',,`at Here',`$1')') `Wyesymbol(at position, keys, U|D|L|R|degrees) Synonym for Ysymbol' define(`Wyesymbol',`Ysymbol($@)') - `DCsymbol(at position, len, ht, U|D|L|R|degrees) + `DCsymbol(at position, len, ht, U|D|L|R|degrees, + attributes) Arg4: drawing direction (default: current direction)' define(`DCsymbol',`[ pushdef(`m4wid',`ifelse(`$2',,(dimen_/3),`($2)')')dnl pushdef(`m4ht',`ifelse(`$3',,`(m4wid/5)',`($3)')') setdir_(ifelse(`$4',,`ifdef(`m4a_',rp_ang*rtod_,0)',`$4')) Origin: rvec_(m4wid/2, m4ht/2) - {line to rvec_(m4wid,0)} - dashline(from rvec_(0, m4ht) to rvec_(m4wid, m4ht),,m4wid/4,m4wid/8) - `$5'; resetdir_ popdef(`m4ht',`m4wid') ] \ + {line `$5' to rvec_(m4wid,0)} + dashline(from rvec_(0, m4ht) to rvec_(m4wid, m4ht),`$5',m4wid/4,m4wid/8) + `$6'; resetdir_ popdef(`m4ht',`m4wid') ] \ with .Origin ifelse(`$1',,`at Here',`$1')') `n-terminal box |