X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=scm%2Flayout-beam.scm;h=f950aa8cd5a1e67866ebf6efb952206539817f1e;hb=9181df064925f1de6686e9692aff5f30686b4a99;hp=9c55dbd9e37787fcc25b5b3217ab5d1ea2a08831;hpb=75c339f75315f38e85d137c8ea0693fbc4cc4028;p=lilypond.git diff --git a/scm/layout-beam.scm b/scm/layout-beam.scm index 9c55dbd9e3..f950aa8cd5 100644 --- a/scm/layout-beam.scm +++ b/scm/layout-beam.scm @@ -1,19 +1,28 @@ +;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; beam.scm -- Beam scheme stuff +;;;; Copyright (C) 2000--2009 Jan Nieuwenhuizen ;;;; -;;;; source file of the GNU LilyPond music typesetter -;;;; -;;;; (c) 2000--2005 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) "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 'linethickness)) + (lthick (ly:output-def-lookup layout 'line-thickness)) (staff-thick lthick) ; fixme. (quant->coord (lambda (p q) (if (= 2 (abs q)) @@ -28,10 +37,8 @@ (begin (ly:warning (_ "Error in beam quanting. Expected (~S,~S) found ~S.") want-l want-r posns) - (set! (ly:grob-property beam 'quant-score) - (format "(~S,~S)" want-l want-r))) - (set! (ly:grob-property beam 'quant-score) "")) - + (set! (ly:grob-property beam 'annotation) + (format "(~S,~S)" want-l want-r)))) posns )) @@ -40,33 +47,30 @@ "Check whether the slope of BEAM is correct wrt. COMPARISON." (let* ((slope-sign (- (cdr posns) (car posns))) (correct (comparison slope-sign 0))) - (if (not correct) (begin (ly:warning (_ "Error in beam quanting. Expected ~S 0, found ~S.") - (procedure-name comparison) "0" slope-sign) - (set! (ly:grob-property beam 'quant-score) + (procedure-name comparison) slope-sign) + (set! (ly:grob-property beam 'annotation) (format "~S 0" (procedure-name comparison)))) - - (set! (ly:grob-property beam 'quant-score) "")) + (set! (ly:grob-property beam 'annotation) "")) posns)) (define-public (check-quant-callbacks l r) - (list Beam::calc_least_squares_positions - Beam::slope_damping - Beam::shift_region_to_valid - Beam::quanting - Beam::set_stem_lengths + (list ly:beam::calc-least-squares-positions + ly:beam::slope-damping + ly:beam::shift-region-to-valid + ly:beam::quanting (check-beam-quant l r) )) - + (define-public (check-slope-callbacks comparison) - (list Beam::calc_least_squares_positions - Beam::slope_damping - Beam::shift_region_to_valid - Beam::quanting - Beam::set_stem_lengths + (list ly:beam::calc-least-squares-positions + ly:beam::slope-damping + ly:beam::shift-region-to-valid + ly:beam::quanting (check-beam-slope-sign comparison) )) +