-/draw_hairpin % width start_h end_h thick
-{
- 1 setlinecap
- 1 setlinejoin
-
- setlinewidth
- /end_h exch def
- /start_h exch def
- /wid exch def
- 0 start_h moveto
- wid end_h lineto
- stroke
- 0 start_h neg moveto
- wid end_h neg lineto
- stroke
-} bind def
-
-/draw_tuplet % height gap dx dy thick dir
-{
- 1 setlinecap
- 1 setlinejoin
-
- /dir exch def
- setlinewidth
- /tuplet_dy exch def
- /tuplet_dx exch def
- /tuplet_gapx exch def
- /tuplet_h exch def
- tuplet_dy tuplet_dx div tuplet_gapx mul /tuplet_gapy exch def
-
-
- 0 tuplet_h neg dir mul moveto
- 0 0 lineto
- tuplet_dx tuplet_gapx sub 2 div
- tuplet_dy tuplet_gapy sub 2 div lineto
- tuplet_dx tuplet_gapx add 2 div
- tuplet_dy tuplet_gapy add 2 div moveto
- tuplet_dx tuplet_dy lineto
- tuplet_dx tuplet_dy tuplet_h dir neg mul add lineto
- stroke
-} bind def