X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ps%2Fmusic-drawing-routines.ps;h=7ee1498305514a3c91fb72cc3fe783d1eac16a97;hb=9427d5505851c50c836e2747fea09140cb763889;hp=75d7bbaa424de3195e07ffe6af41550aa31acf75;hpb=a0a40c02de757661518577105dbb644a6ecdbc4d;p=lilypond.git diff --git a/ps/music-drawing-routines.ps b/ps/music-drawing-routines.ps index 75d7bbaa42..7ee1498305 100644 --- a/ps/music-drawing-routines.ps +++ b/ps/music-drawing-routines.ps @@ -2,12 +2,13 @@ % % Functions for direct and embedded PostScript -/blot-diameter { lilypondpaperblotdiameter } bind def /set_tex_dimen { cvr def } bind def + + /euclidean_length { 1 copy mul exch 1 copy mul add sqrt @@ -17,12 +18,12 @@ % Nice rectangle with rounded corners /draw_box % breapth width depth height { - currentdict /testing known { +% currentdict /testing known { %% real thin lines for testing /blot 0.005 def - }{ - /blot blot-diameter def - } ifelse +% }{ +% /blot blot-diameter def +% } ifelse 0 setlinecap blot setlinewidth @@ -87,14 +88,9 @@ } bind def % Nice beam with rounded corners -/draw_beam % slope width thick +/draw_beam % slope width thick blot { - currentdict /testing known { - %% real thin lines for testing - /blot 0.005 def - }{ - /blot blot-diameter def - } ifelse + /blot exch def blot setlinewidth 0 setlinecap @@ -157,6 +153,19 @@ } 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 @@ -211,12 +220,15 @@ % this is for drawing slurs. /draw_bezier_sandwich % thickness controls -{ +{ + % round ending and round beginning + 1 setlinejoin 1 setlinecap setlinewidth moveto curveto lineto - curveto + curveto + closepath gsave fill grestore @@ -229,6 +241,17 @@ 0 360 arc closepath fill stroke } bind def +/draw_white_dot % x1 y2 R +{ +% 0 360 arc fill stroke + 0 360 arc closepath % fill stroke +gsave + 1 setgray fill +grestore +% 0 360 arc closepath % fill stroke + 0.05 setlinewidth 0 setgray stroke +} bind def + /draw_dashed_line % dash thickness dx dy { 1 setlinecap @@ -375,3 +398,4 @@ stroke } bind def +%end music-drawing-routines.ps