From: hanwen Date: Thu, 3 Jul 2003 16:50:35 +0000 (+0000) Subject: * make/lilypond.redhat.spec.in: require GUILE >= 1.6.4-7 X-Git-Tag: release/1.7.25~55 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1b5f177d8c6fbfc4600aa797fb7d10aec3578b57;p=lilypond.git * make/lilypond.redhat.spec.in: require GUILE >= 1.6.4-7 * scm/new-markup.scm (box-markup): new function. (box-markup): new function. Contributed by Dick Schoeller * scm/lily.scm: remove reduce-no-unit (list-insert-separator): use fold-right --- diff --git a/ChangeLog b/ChangeLog index 7174edb19e..276799af6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2003-07-03 Han-Wen Nienhuys + * make/lilypond.redhat.spec.in: require GUILE >= 1.6.4-7 + + * scm/new-markup.scm (box-markup): new function. + (box-markup): new function. Contributed by Dick Schoeller + + * scm/lily.scm: remove reduce-no-unit (list-insert-separator): use fold-right @@ -33,8 +39,8 @@ 2003-07-02 Han-Wen Nienhuys - * lily/parser.yy (Repeated_music): bug fix beam multiplicity was - completely borked + * lily/parser.yy (Repeated_music): bug fix, beam multiplicity was + completely borked * lily/chord-tremolo-engraver.cc (try_music): warnings for user-errors. (try_music): bug fix: beam multiplicity was completely borked. diff --git a/make/lilypond.redhat.spec.in b/make/lilypond.redhat.spec.in index 27895eb854..9b18151465 100644 --- a/make/lilypond.redhat.spec.in +++ b/make/lilypond.redhat.spec.in @@ -16,6 +16,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root Buildrequires: t1utils bison flex mftrace texinfo Requires: tetex tetex-latex libstdc++ python +Requires: guile >= 1.6.4-7 %description LilyPond lets you create music notation. It produces diff --git a/scm/lily.scm b/scm/lily.scm index aa6856af3a..0ed4c0e6ce 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -227,8 +227,7 @@ L1 is copied, L2 not. (list x) (cons x (cons between y)) )) - (fold-right conc #f lst) - ) + (fold-right conc #f lst)) ;;;;;;;;;;;;;;;; ; other diff --git a/scm/molecule.scm b/scm/molecule.scm index 605cccb515..cc199b4192 100644 --- a/scm/molecule.scm +++ b/scm/molecule.scm @@ -54,6 +54,7 @@ xext yext) ) + (define-public (box-grob-molecule grob) "Make a box of exactly the extents of the grob. The box precisely encloses the contents. @@ -66,3 +67,21 @@ encloses the contents. (box-molecule xext (cons (cdr yext) (+ (cdr yext) thick) )) (box-molecule (cons (cdr xext) (+ (cdr xext) thick)) yext) (box-molecule (cons (- (car xext) thick) (car xext)) yext)))) + + +;; TODO merge this and prev function. +(define-public (box-molecule mol thick padding) + "Add a box around MOL, producing a new molecule." + (let* ( + (x-ext (widen-interval (ly:molecule-get-extent mol 0) padding)) + (y-ext (widen-interval (ly:molecule-get-extent mol 1) padding)) + (x-rule (box-molecule (widen-interval x-ext thick) + (cons 0 thick))) + (y-rule (box-molecule (cons 0 thick) y-ext))) + + (set! mol (ly:molecule-combine-at-edge mol 0 1 y-rule (* 0.5 padding))) + (set! mol (ly:molecule-combine-at-edge mol 0 -1 y-rule (* 0.5 padding))) + (set! mol (ly:molecule-combine-at-edge mol 1 1 x-rule 0.0)) + (set! mol (ly:molecule-combine-at-edge mol 1 -1 x-rule 0.0)) + + mol)) diff --git a/scm/new-markup.scm b/scm/new-markup.scm index a29b9027a8..5e91cdd043 100644 --- a/scm/new-markup.scm +++ b/scm/new-markup.scm @@ -371,6 +371,17 @@ for the reader. (car rest)) )) +(define-public (box-markup grob props . rest) + "Syntax: \\box MARKUP" + (let* + ( + (th 0.1) + (pad 0.2) + (m (interpret-markup grob props (car rest))) + ) + (box-molecule m th pad) + )) + (define (markup-signature-to-keyword sig) " (A B C) -> a0-b1-c2 " @@ -529,6 +540,8 @@ for the reader. (cons raise-markup (list number? markup?)) (cons magnify-markup (list number? markup?)) (cons fontsize-markup (list number? markup?)) + + (cons box-markup (list markup?)) ) )