From 4afcd3c629334a0c8699801f93cd67d96f9db13b Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 20 Mar 2000 12:03:46 +0100 Subject: [PATCH] patch::: 1.3.36.jcn3 1.3.36.jcn3 =========== * Fixed vertical dimensions of elements in dynamic line spanner by adding axis-group to dynamic line spanner. * Bugfix: line-spanner lasts always full duration of (de)crescendi. --- CHANGES | 8 ++++++++ VERSION | 2 +- lily/dynamic-engraver.cc | 43 ++++++++++++++-------------------------- 3 files changed, 24 insertions(+), 29 deletions(-) diff --git a/CHANGES b/CHANGES index df1d574cf1..742c642d8c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,11 @@ +1.3.36.jcn3 +=========== + +* Fixed vertical dimensions of elements in dynamic line spanner by adding + axis-group to dynamic line spanner. + +* Bugfix: line-spanner lasts always full duration of (de)crescendi. + 1.3.36.jcn2 =========== diff --git a/VERSION b/VERSION index f77757c131..28ca8c0fa9 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=36 -MY_PATCH_LEVEL=jcn2 +MY_PATCH_LEVEL=jcn3 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 2c11a70504..ad4796c4ce 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -24,6 +24,7 @@ #include "directional-element-interface.hh" #include "staff-symbol-referencer.hh" #include "translator-group.hh" +#include "axis-group-interface.hh" /* @@ -38,20 +39,20 @@ class Dynamic_line_spanner : public Spanner public: Dynamic_line_spanner (); VIRTUAL_COPY_CONS(Score_element); - void add_column (Item*); - -protected: - virtual void after_line_breaking (); + void add_column (Note_column*); + void add_element (Score_element*); }; Dynamic_line_spanner::Dynamic_line_spanner () { set_elt_property ("transparent", SCM_BOOL_T); side_position (this).set_axis (Y_AXIS); + axis_group (this).set_interface (); + axis_group (this).set_axes (X_AXIS, Y_AXIS); } void -Dynamic_line_spanner::add_column (Item* n) +Dynamic_line_spanner::add_column (Note_column* n) { if (!get_bound (LEFT)) set_bound (LEFT, n); @@ -61,29 +62,12 @@ Dynamic_line_spanner::add_column (Item* n) add_dependency (n); } + void -Dynamic_line_spanner::after_line_breaking () +Dynamic_line_spanner::add_element (Score_element* e) { -#if 0 - - /* - We hebben hier een probleempje: er is een verschil tussen - dynamics zonder en met line-spanner. - Allen zijn gecentreerd (aligned-on-self), wat okee is, - maar de losse hebben zelf een padding tov de staff. - - Deze padding werkt niet op items die in line-spanner zitten: - de padding werkt op line-spanner zelf. - De line-spanner moet dus eigenlijk zoveel naar beneden of boven - als er items uitsteken, maar Hmm. - */ -#endif - Direction dir = directional_element (this).get (); - if (!dir) - dir = DOWN; - //Hmm. inf - //translate_axis (extent (Y_AXIS)[dir], Y_AXIS); - translate_axis (staff_symbol_referencer (this).staff_space () * dir, Y_AXIS); + e->set_parent (this, Y_AXIS); + axis_group (this).add_element (e); } /** @@ -205,7 +189,7 @@ Dynamic_engraver::do_process_music () if (line_spanner_ && pending_element_arr_.size ()) { for (int i = 0; i < pending_element_arr_.size (); i++) - pending_element_arr_[i]->set_parent (line_spanner_, Y_AXIS); + line_spanner_->add_element (pending_element_arr_[i]); pending_element_arr_.clear (); } @@ -214,7 +198,7 @@ Dynamic_engraver::do_process_music () else { -#if 1 +#if 0 /* Maybe always creating a line-spanner for a (de)crescendo (see below) is not a good idea: @@ -224,6 +208,9 @@ Dynamic_engraver::do_process_music () the \p will be centred on the line-spanner, and thus clash with the hairpin. When axis-group code is in place, the \p should move below the hairpin, which is probably better? + + Urg, but line-spanner must always have at least same duration + as (de)crecsendo, b.o. line-breaking. */ if (now_mom () > last_request_mom_) #else -- 2.39.2