From: Jan Nieuwenhuizen Date: Wed, 27 Jun 2001 21:12:39 +0000 (+0200) Subject: patch::: 1.4.3.jcn4 X-Git-Tag: release/1.4.4~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2162ad7db61b400e57a35625efe3fc671f72cfd0;p=lilypond.git patch::: 1.4.3.jcn4 --- diff --git a/VERSION b/VERSION index d289fc97b5..d51f18e842 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=4 PATCH_LEVEL=3 -MY_PATCH_LEVEL=jcn3 +MY_PATCH_LEVEL=jcn4 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/ps/lilyponddefs.ps b/ps/lilyponddefs.ps index 53fed1bb2c..114d0beaaa 100644 --- a/ps/lilyponddefs.ps +++ b/ps/lilyponddefs.ps @@ -46,29 +46,6 @@ grestore } bind def -% -% FIXME. translate to middle of box. -% - -/draw-box % breapth width depth height -{ - /h exch def - /d exch def - /w exch def - /b exch def - gsave - - 0 setlinewidth - b neg d neg rmoveto - b w add 0 rlineto - 0 d h add rlineto - b w add neg 0 rlineto - closepath % 0 d h add neg rlineto - fill - - grestore -} bind def - /start-line % height { dup base-line-skip gt { diff --git a/ps/music-drawing-routines.ps b/ps/music-drawing-routines.ps index 2ed8afd583..f1b9fa0fd8 100644 --- a/ps/music-drawing-routines.ps +++ b/ps/music-drawing-routines.ps @@ -10,17 +10,82 @@ 1 copy mul exch 1 copy mul add sqrt } bind def -/draw_beam % width slope thick -{ - 2 div /beam_thick exch def - /beam_slope exch def - /beam_wd exch def - beam_slope beam_wd mul /beam_ht exch def - 0 beam_thick neg moveto - beam_wd beam_ht rlineto - 0 beam_thick 2 mul rlineto - 0 beam_thick lineto - closepath fill +/simpledraw_box % breapth width depth height +{ + /h exch def + /d exch def + /w exch def + /b exch def + + 0.01 setlinewidth + 1 setlinejoin + 0 0 moveto + b neg d neg rmoveto + b w add 0 rlineto + 0 d h add rlineto + b w add neg 0 rlineto + %closepath gsave stroke grestore fill + closepath fill +} bind def + + +% FIXME. translate to middle of box. +% Nice rectangle with rounded corners +/draw_box % breapth width depth height +{ + 1 setlinejoin + /l 0.05 def + l setlinewidth + 1 setlinejoin + + l 2 div sub /h exch def + l 2 div sub /d exch def + l 2 div sub /w exch def + l 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 + closepath gsave stroke grestore fill +} bind def + +% ugh, see rectfill +/simpledraw_beam % slope width thick +{ + /t exch def + /w exch def + w mul /h exch def + 1 setlinejoin + % ugh? + 0.05 setlinewidth + + 0 t 2 div neg moveto + w h rlineto + 0 t rlineto + w neg h neg rlineto + 0 t neg rlineto + closepath gsave stroke grestore fill +} bind def + +% Nice beam with rounded corners +/draw_beam % slope width thick +{ + % ugh? + /l 0.1 def + l 2 div setlinewidth + 1 setlinejoin + l sub /t exch def + l sub /w exch def + w mul /h exch def + + l 2 div t 2 div neg moveto + w h rlineto + 0 t rlineto + w neg h neg rlineto + 0 t neg rlineto + closepath gsave stroke grestore fill } bind def /draw_repeat_slash % width slope thick diff --git a/scm/ps.scm b/scm/ps.scm index 9528079126..a288c77446 100644 --- a/scm/ps.scm +++ b/scm/ps.scm @@ -52,10 +52,9 @@ "lilypondpaperoutputscale div scalefont setfont } bind def " "\n")) - (define (beam width slope thick) (string-append - (numbers->string (list width slope thick)) " draw_beam" )) + (numbers->string (list slope width thick)) " draw_beam" )) (define (comment s) (string-append "% " s)) @@ -108,7 +107,7 @@ (define (filledbox breapth width depth height) (string-append (numbers->string (list breapth width depth height)) - " draw-box" )) + " draw_box" )) ;; obsolete? (define (font-def i s) @@ -171,7 +170,7 @@ lilypondpaperoutputscale lilypondpaperoutputscale scale (define (stem breapth width depth height) (string-append (numbers->string (list breapth width depth height)) - " draw-box" )) + " draw_box" )) (define (stop-line) "}\nstop-line\n") diff --git a/scm/tex.scm b/scm/tex.scm index 4c8904415d..3321bb9c95 100644 --- a/scm/tex.scm +++ b/scm/tex.scm @@ -164,13 +164,18 @@ "}\\vss}\\interscoreline\n") (define (stop-last-line) "}\\vss}") - (define (filledbox breapth width depth height) + (define (xfilledbox breapth width depth height) (string-append "\\kern" (number->dim (- breapth)) "\\vrule width " (number->dim (+ breapth width)) "depth " (number->dim depth) "height " (number->dim height) " ")) + (define (filledbox breapth width depth height) + (embedded-ps + (string-append (numbers->string (list breapth width depth height)) + " draw_box" ))) + (define (text s) (string-append "\\hbox{" (output-tex-string s) "}"))