From: hanwen Date: Thu, 12 Feb 2004 00:12:45 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: release/2.1.21^2~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6cfd78bc3d16dc0ffe874441226f7bd55544fcee;p=lilypond.git *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 9e415d79be..085a51ba29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,7 +19,11 @@ 2004-02-11 Han-Wen Nienhuys - * GNUmakefile.in (README_FILES): remove TODO. + * lily/side-position-interface.cc (general_side_position): if + staff-padding is set, then include staff in support too. + + * GNUmakefile.in (README_FILES): remove TODO. Put in new CVS + module workbook * TODO: Remove. Put in new CVS module /cvsroot/lilypond/workbook/ diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index 78be35c460..a974a44958 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -69,8 +69,18 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte Real ss = Staff_symbol_referencer::staff_space (me); SCM support = me->get_grob_property ("side-support-elements"); Grob *common = common_refpoint_of_list (support, me->get_parent (a), a); - + Grob * st = Staff_symbol_referencer::get_staff_symbol (me); + bool include_staff = (st + && a == Y_AXIS + && gh_number_p (me->get_grob_property ("staff-padding"))); + Interval dim; + if (include_staff) + { + common = st->common_refpoint (common, Y_AXIS); + dim = st->extent (common, Y_AXIS); + } + for (SCM s = support; s != SCM_EOL; s = ly_cdr (s)) { Grob * e = unsmob_grob (ly_car (s)); @@ -230,7 +240,7 @@ Side_position_interface::set_axis (Grob*me, Axis a) -// ugh. doesn't cactch all variants. +// ugh. doesn't catch all variants. Axis Side_position_interface::get_axis (Grob*me) { @@ -249,8 +259,8 @@ ADD_INTERFACE (Side_position_interface,"side-position-interface", "Position a victim object (this one) next to other objects (the " "support). In this case, the property @code{direction} signifies where to put the " "victim object relative to the support (left or right, up or down?)\n\n " - "The routine puts objects at a distance of the staff if the property " - "@code{staff-padding} is defined. If undefined, the staff symbol is ignored." + "The routine also takes the size the staff into account if " + "@code{staff-padding} is set. If undefined, the staff symbol is ignored." , "staff-padding side-support-elements direction-source " "direction side-relative-direction minimum-space padding"); diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index b2de46e0e9..9a653f51b8 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -475,12 +475,8 @@ so that the line can be constructed from a whole number of squiggles.") (avoid-note-head ,boolean? "if set, the stem of a chord does not pass through all note head, but start at the last note head. Used by tablature.") (staff-padding ,ly:dimension? - "Maintain this much space to the staff. It's -effect is similar to the padding mechanism, but this will keep objects -above and below the staff in a row more often, when the heights of the -notes vary. -") - + "Maintain this much space between reference points +and the staff. Its effect is to align objects of differing sizes (like the dynamic @b{p} and @b{f}) on their baselines.") (use-breve-rest ,boolean? "boolean that tells multi-measure-rest to use a breve rest to represent the duration of 1 measure instead of whole rest. It defaults to false. It is set to true when the diff --git a/scm/part-combiner.scm b/scm/part-combiner.scm index 17b7c47be2..82aaa7672c 100644 --- a/scm/part-combiner.scm +++ b/scm/part-combiner.scm @@ -449,15 +449,20 @@ Only set if not set previously. )) (define (put-range x a b) + (display (list "put range " x a b "\n")) (do ((i a (1+ i))) ((> i b) b) (set! (configuration (vector-ref result i)) x) )) (define (put x) - (set! (configuration (vector-ref result ri)) x)) + + (display (list "putting " x "\n")) + (set! (configuration (vector-ref result ri)) x)) (define (try-solo type start-idx current-idx) + "Find a maximum stretch that can be marked as solo. Only set +the mark when there are no spanners active." (if (< current-idx (vector-length result)) (let* ((now-state (vector-ref result current-idx)) @@ -483,9 +488,7 @@ Only set if not set previously. (1- current-idx))) (define (analyse-moment ri) - "Analyse 'apart starting at RI. Return next index. -" - + "Analyse 'apart starting at RI. Return next index. " (let* ((now-state (vector-ref result ri)) (vs1 (car (voice-states now-state))) @@ -495,6 +498,11 @@ Only set if not set previously. (n1 (length notes1)) (n2 (length notes2)) ) + (display (list "analysing " (when now-state) + "\n1= " vs1 + "\n2= " vs2 + "\n")) + (cond ((and (= n1 0) (= n2 0)) (put 'apart-silence) @@ -532,10 +540,11 @@ Only set if not set previously. )) (analyse-time-step 0) - (analyse-a2 0) +; (display result) +; (analyse-a2 0) ; (display result) (analyse-solo12 0) -; (if pc-debug (display result)) + (display result) (set! result (map (lambda (x) (cons (when x) (configuration x)))