X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=ps%2Fmusic-drawing-routines.ps;h=9ca584665709ecfc7cdb7085be8eb9ed3a153ab8;hb=2fb24c4ce7c20463fd2f3ee46227eea30631762b;hp=a4c83114657fef3a603c0d53be2981c1b0a50466;hpb=be6b7669873b8b227c224e9ff1e1e101c43426df;p=lilypond.git diff --git a/ps/music-drawing-routines.ps b/ps/music-drawing-routines.ps index a4c8311465..9ca5846657 100644 --- a/ps/music-drawing-routines.ps +++ b/ps/music-drawing-routines.ps @@ -7,7 +7,6 @@ % fucking redhat xdvi patch. /skeel { scale } bind def - /set_tex_dimen { cvr def } bind def @@ -17,7 +16,6 @@ 1 copy mul exch 1 copy mul add sqrt } bind def -/skeel { scale } bind def % FIXME. translate to middle of box. % Nice rectangle with rounded corners /draw_box % breapth width depth height @@ -52,6 +50,33 @@ } ifelse } bind def +/draw_round_box % breapth width depth height blot +{ + /blot exch def + + 0 setlinecap + blot setlinewidth + 1 setlinejoin + + blot 2 div sub /h exch def + blot 2 div sub /d exch def + blot 2 div sub /w exch def + blot 2 div sub /b exch def + + b neg d neg moveto + b w add 0 rlineto + 0 d h add rlineto + b w add neg 0 rlineto + 0 d h add neg rlineto + + currentdict /testing known { + %% outline only, for testing: + stroke + }{ + closepath gsave stroke grestore fill + } ifelse +} bind def + % Nice beam with rounded corners /draw_beam % slope width thick { @@ -102,47 +127,6 @@ closepath fill } bind def -/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 /draw_ez_ball % ch letter_col ball_col font { @@ -196,28 +180,6 @@ show } bind def -/draw_volta % h w thick vert_start vert_end -{ - 1 setlinecap - 1 setlinejoin - - /vert_end exch def - /vert_start exch def - setlinewidth - /volta_w exch def - /volta_h exch def - vert_start 0 eq { - 0 0 moveto - 0 volta_h lineto - } if - 0 volta_h moveto - volta_w volta_h lineto - vert_end 0 eq { - volta_w 0 lineto - } if - stroke -} bind def - % this is for drawing slurs. /draw_bezier_sandwich % thickness controls { @@ -232,6 +194,12 @@ stroke } bind def +/draw_dot % x1 y2 R +{ +% 0 360 arc fill stroke + 0 360 arc closepath fill stroke +} bind def + /draw_dashed_line % dash thickness dx dy { 1 setlinecap