X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ps%2Fmusic-drawing-routines.ps;h=fa1b4d996dfb2fa2fb26ee903450d16ce1a7e437;hb=5eb6a4c109b5cff50fb2ac0a267865586dfc3943;hp=d04d52aeef5f82188b4ead75375711eb185b7396;hpb=2ede344c657093401c088232860f19367368b04f;p=lilypond.git diff --git a/ps/music-drawing-routines.ps b/ps/music-drawing-routines.ps index d04d52aeef..fa1b4d996d 100644 --- a/ps/music-drawing-routines.ps +++ b/ps/music-drawing-routines.ps @@ -72,11 +72,17 @@ bind def b4_Inc_state restore } bind def -/stroke_and_fill { +/stroke_and_fill? { + { gsave stroke grestore fill + } + { + stroke + } + ifelse } bind def /vector_add { % x1 y1 x2 y2 vector_add x1+x2 y1+y2 @@ -131,11 +137,7 @@ bind def rmoveto % x(0) y(0) { polygon_x polygon_y vector_add lineto } repeat % n times closepath - { %fill? - stroke_and_fill - }{ - stroke - } ifelse + stroke_and_fill? } bind def /draw_circle % filled? radius thickness draw_circle @@ -145,9 +147,7 @@ bind def 3 2 roll % f? x0 y0 r dup 0 rmoveto 0 360 arc closepath - { stroke_and_fill } - { stroke } - ifelse + stroke_and_fill? } bind def /draw_ellipse % filled? x-radius y-radius thickness draw_ellipse @@ -159,9 +159,7 @@ bind def 1 0 rmoveto 1 0 360 arc closepath savematrix setmatrix - { stroke_and_fill} - { stroke } - ifelse + stroke_and_fill? } bind def /draw_partial_ellipse % filled connect x-radius y-radius startangle endangle thickness draw_partial_ellipse @@ -200,7 +198,7 @@ bind def connect { startangle cos startangle sin moveto endangle cos endangle sin lineto } if - savematrix setmatrix filled { stroke_and_fill } { stroke } ifelse + savematrix setmatrix filled stroke_and_fill? grestore } bind def