| 1 |
divert(-1) |
| 2 |
pdf.m4 Initialization for pdf output. |
| 3 |
|
| 4 |
* Circuit_macros Version 11.0, copyright (c) 2026 J. D. Aplevich under * |
| 5 |
* the LaTeX Project Public Licence in file Licence.txt. The files of * |
| 6 |
* this distribution may be redistributed or modified provided that this * |
| 7 |
* copyright notice is included and provided that modifications are clearly * |
| 8 |
* marked to distinguish them from this distribution. There is no warranty * |
| 9 |
* whatsoever for these files. * |
| 10 |
|
| 11 |
define(`m4picprocessor',dpic) |
| 12 |
define(`m4postprocessor',pdf) |
| 13 |
|
| 14 |
ifdef(`libgen_',,`include(libgen.m4)divert(-1)')dnl |
| 15 |
|
| 16 |
Color utilities |
| 17 |
define(`setrgb',`pushdef(`r_',`$1')pushdef(`g_',`$2')pushdef(`b_',`$3')dnl |
| 18 |
pushdef(`m4cl_',ifelse(`$4',,lcspec,`$4'))dnl |
| 19 |
command sprintf(" %7.5f %7.5f %7.5f rg",r_,g_,b_)') |
| 20 |
|
| 21 |
define(`resetrgb',`popdef(`m4cl_')popdef(`r_')popdef(`g_')popdef(`b_')dnl |
| 22 |
ifdef(`r_', |
| 23 |
`command sprintf(" %7.5f %7.5f %7.5f rg",r_,g_,b_)', |
| 24 |
`command " 0 g"') ') |
| 25 |
|
| 26 |
`rgbdraw(color triple, drawing commands)' |
| 27 |
define(`rgbdraw',`setrgb(`$1',`$2',`$3') |
| 28 |
shift(shift(shift($@))) |
| 29 |
resetrgb') |
| 30 |
xcolor predefined colors |
| 31 |
define(`defineRGBprimaries',` |
| 32 |
define(`white',`1 1 1')dnl |
| 33 |
define(`lightgrey',`0.75 0.75 0.75')dnl |
| 34 |
define(`lightgray',`0.75 0.75 0.75')dnl |
| 35 |
define(`grey',`0.5 0.5 0.5')dnl |
| 36 |
define(`gray',`0.5 0.5 0.5')dnl |
| 37 |
define(`darkgrey',`0.25 0.25 0.25')dnl |
| 38 |
define(`darkgray',`0.25 0.25 0.25')dnl |
| 39 |
define(`black',`0 0 0')dnl |
| 40 |
define(`red',`1 0 0')dnl |
| 41 |
define(`green',`0 1 0')dnl |
| 42 |
define(`blue',`0 0 1')dnl |
| 43 |
define(`cyan',`0 1 1')dnl |
| 44 |
define(`magenta',`1 0 1')dnl |
| 45 |
define(`yellow',`1 1 0')dnl |
| 46 |
define(`brown',`0.59 0.29 0')dnl |
| 47 |
define(`lime',`0.8 1 0')dnl |
| 48 |
define(`olive',`0.5 0.5 0')dnl |
| 49 |
define(`orange',`1 0.5 0')dnl |
| 50 |
define(`pink',`1 0.75 0.8')dnl |
| 51 |
define(`purple',`0.5 0 0.5')dnl |
| 52 |
define(`teal',`0 0.5 0.5')dnl |
| 53 |
define(`violet',`0.56 0 1') ') |
| 54 |
|
| 55 |
define(`thinlines_',`linethick = 0.4 |
| 56 |
arrowwid = 0.04*scale; arrowht = 0.2/3*scale;') |
| 57 |
define(`thicklines_',`linethick = 0.8 |
| 58 |
arrowwid = 0.05*scale; arrowht = 0.1*scale;') |
| 59 |
`linethick_(x) |
| 60 |
set line width to x pt (default 0.8) |
| 61 |
and scale arrowhead parameters' |
| 62 |
define(`linethick_',`linethick = ifelse(`$1',,`0.8',`$1'); dnl |
| 63 |
arrowwid = ifelse(`$1',,`0.05',linethick/16)*scale; dnl |
| 64 |
arrowht = ifelse(`$1',,`0.1',linethick/8)*scale;') |
| 65 |
|
| 66 |
divert(0)dnl |