X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Flayout-beam.scm;h=4ef49e975989978bfdeeb1af595aa567f76fc06f;hb=refs%2Fheads%2Fdon%2Fdep5_copyright;hp=040421a98bdc90cdfa426ac38847abc61f7fbca9;hpb=a6a4b3fc2009f17a1a48cca0c11bfd3f38645937;p=lilypond.git diff --git a/scm/layout-beam.scm b/scm/layout-beam.scm index 040421a98b..4ef49e9759 100644 --- a/scm/layout-beam.scm +++ b/scm/layout-beam.scm @@ -1,17 +1,28 @@ +;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; beam.scm -- Beam scheme stuff +;;;; Copyright (C) 2000--2011 Jan Nieuwenhuizen ;;;; -;;;; source file of the GNU LilyPond music typesetter -;;;; -;;;; (c) 2000--2008 Jan Nieuwenhuizen +;;;; LilyPond is free software: you can redistribute it and/or modify +;;;; it under the terms of the GNU General Public License as published by +;;;; the Free Software Foundation, either version 3 of the License, or +;;;; (at your option) any later version. ;;;; +;;;; LilyPond is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;;; GNU General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU General Public License +;;;; along with LilyPond. If not, see . -(define ((check-beam-quant posl posr) beam posns) +(define check-beam-quant + (lambda (posl posr) + (lambda (beam posns) "Check whether BEAM has POSL and POSR quants. POSL are (POSITION . QUANT) pairs, where QUANT is -1 (hang), 0 (center), 1 (sit) or -2/ 2 (inter) " - (let* ((thick (ly:grob-property beam 'thickness)) + (let* ((thick (ly:grob-property beam 'beam-thickness)) (layout (ly:grob-layout beam)) (lthick (ly:output-def-lookup layout 'line-thickness)) (staff-thick lthick) ; fixme. @@ -30,11 +41,11 @@ want-l want-r posns) (set! (ly:grob-property beam 'annotation) (format "(~S,~S)" want-l want-r)))) - posns - )) - + posns)))) -(define ((check-beam-slope-sign comparison) beam posns) +(define check-beam-slope-sign + (lambda (comparison) + (lambda (beam posns) "Check whether the slope of BEAM is correct wrt. COMPARISON." (let* ((slope-sign (- (cdr posns) (car posns))) (correct (comparison slope-sign 0))) @@ -45,7 +56,7 @@ (set! (ly:grob-property beam 'annotation) (format "~S 0" (procedure-name comparison)))) (set! (ly:grob-property beam 'annotation) "")) - posns)) + posns)))) (define-public (check-quant-callbacks l r)