- /beamthick exch def
- /slope exch def
- /width exch def
- beamthick beamthick slope div euclidean_length
- /xwid exch def
- 0 0 moveto
- xwid 0 rlineto
- width slope width mul rlineto
- xwid neg 0 rlineto
- % width neg width angle sin mul neg rlineto
- closepath fill
-} bind def
-
-
-/draw_white_text % text scale font
-{
- %font
- findfont
- %scale
- exch scalefont setfont
- 1 setgray
- 0 0 moveto
- %-0.05 -0.05 moveto
- % text
- show
-} bind def
-
-/draw_ez_ball % ch letter_col ball_col font
-{
- % font
- findfont 0.7 scalefont setfont
- 0.1 setlinewidth
- 0 0 moveto
- 0 setgray
- 0.5 0 0.5 0 360 arc closepath fill stroke
- % ball_col
- 1 eq {
- 0.01 setlinewidth
- 1 setgray
- 0.5 0 0.4 0 360 arc closepath
- fill stroke
- } if
- % letter_col
- setgray
- % 0.25 is empiric centering. Change to taste
- 0.25 -0.25 moveto
- % ch
- show
-} bind def
-
-% Simple, but does it work everywhere?
-% Han-Wen reports that one printer (brand?) at cs.uu.nl chokes on this,
-% reverted for now -- jcn
-%
-% The filled circles are drawn by setting the linewidth
-% to 2*radius and drawing a point.
-/simple_draw_ez_ball % ch letter_col ball_col font
-{
- % font
- findfont 0.85 scalefont setfont
- /origin { 0.45 0 } def
- 0 setgray
- 1.1 setlinewidth
- origin moveto
- origin lineto stroke
- % ball_col
- setgray
- 0.9 setlinewidth
- origin moveto
- origin lineto stroke
- % letter_col
- setgray
- % 0.25 is empiric centering. Change to taste
- origin moveto
- -0.28 -0.30 rmoveto
- % ch
- show
-} bind def
-
-% this is for drawing slurs.
-/draw_bezier_sandwich % thickness controls
-{
- % round ending and round beginning
- 1 setlinejoin 1 setlinecap
- setlinewidth
- moveto
- curveto
- lineto
- curveto