From: Han-Wen Nienhuys Date: Mon, 15 Nov 2004 23:33:17 +0000 (+0000) Subject: (beam): add function. X-Git-Tag: release/2.5.14~547 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7c6313e6fa012a6bc6bbb6aefa0354e96f5ad7fe;p=lilypond.git (beam): add function. (draw-line): new routine. (dashed-line): stub; call draw-line --- diff --git a/ChangeLog b/ChangeLog index 604bea1851..ce3c6361cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-11-16 Han-Wen Nienhuys + + * scm/output-gnome.scm (beam): add function. + (draw-line): new routine. + (dashed-line): stub; call draw-line + 2004-11-15 Werner Lemberg * Documentation/user/lilypond-book.itely: Revise section on diff --git a/lily/lookup.cc b/lily/lookup.cc index 801ead5801..ad082dc806 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -653,7 +653,7 @@ Lookup::repeat_slash (Real w, Real s, Real t) SCM sl = scm_make_real (s); SCM thick = scm_make_real (t); SCM slashnodot = scm_list_n (ly_symbol2scm ("repeat-slash"), - wid, sl, thick, SCM_UNDEFINED); + wid, sl, thick, SCM_UNDEFINED); Box b (Interval (0, w + sqrt (sqr (t/s) + sqr (t))), Interval (0, w * s)); diff --git a/scm/lily.scm b/scm/lily.scm index 1fc5afbe89..b3d4b01271 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -134,7 +134,6 @@ predicates. Print a message at LOCATION if any predicate failed." repeat-slash round-filled-box text - tuplet white-dot white-text zigzag-line diff --git a/scm/output-gnome.scm b/scm/output-gnome.scm index 5bfc43d5fe..2d137c2775 100644 --- a/scm/output-gnome.scm +++ b/scm/output-gnome.scm @@ -261,6 +261,25 @@ lilypond -fgnome input/simple-song.ly props)) +(define (dashed-line thick on off dx dy) + (draw-line thick 0 0 dx dy)) + +(define (draw-line thick fx fy tx ty) + (let* + ((def (make )) + (props (make + #:parent (canvas-root) + #:fill-color "black" + #:outline-color "black" + #:width-units thick))) + + (reset def) + (moveto def fx (- fy)) + (lineto def tx (- ty)) + (set-path-def props def) + props)) + + (define (round-filled-box breapth width depth height blot-diameter) ;; FIXME: no rounded corners on rectangle... ;; FIXME: blot? diff --git a/scm/output-ps.scm b/scm/output-ps.scm index edc25b84e7..ae0d93e306 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -40,7 +40,6 @@ round-filled-box text white-text - tuplet polygon draw-line no-origin diff --git a/scm/output-tex.scm b/scm/output-tex.scm index 70da599df2..c8ac8ec04e 100644 --- a/scm/output-tex.scm +++ b/scm/output-tex.scm @@ -42,7 +42,6 @@ round-filled-box text white-text - tuplet polygon draw-line no-origin @@ -172,9 +171,6 @@ (define (white-text scale s) (embedded-ps (list 'white-text scale s))) -(define (tuplet ht gapx dx dy thick dir) - (embedded-ps (list 'tuplet ht gapx dx dy thick dir))) - (define (polygon points blotdiameter) (embedded-ps (list 'polygon `(quote ,points) blotdiameter)))