From 8c2a3efc04b17ffe84d2e3483567323eb3033aef Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 9 Mar 2004 13:12:17 +0000 Subject: [PATCH] * lily/system.cc (get_line): * lily/paper-outputter.cc (output_line): Fix `between-system-string'. --- ChangeLog | 3 ++- lily/include/system.hh | 2 +- lily/system.cc | 54 +++++++++++++++++------------------------- 3 files changed, 25 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index a9bee9d47b..f9dbe2cd37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2004-03-09 Jan Nieuwenhuizen - * lily/system.cc (get_line): Fix between-systems (NOT). + * lily/system.cc (get_line): + * lily/paper-outputter.cc (output_line): Fix `between-system-string'. 2004-03-09 Han-Wen Nienhuys diff --git a/lily/include/system.hh b/lily/include/system.hh index 515c9e1b1e..911aa0b792 100644 --- a/lily/include/system.hh +++ b/lily/include/system.hh @@ -24,7 +24,7 @@ class System : public Spanner public: int rank_; void post_processing (); - SCM get_line (bool); + SCM get_line (); SCM get_lines (); System (SCM); diff --git a/lily/system.cc b/lily/system.cc index 7ec636b7b5..ac6fc06702 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -183,22 +183,15 @@ System::get_lines () for (int i = 0; i < line_count; i++) { - System *system = dynamic_cast (broken_intos_[i]); - if (verbose_global_b) progress_indication ("["); - // urg between-systems hack - bool last = (i + 1 == line_count); - + System *system = dynamic_cast (broken_intos_[i]); system->post_processing (); - scm_vector_set_x (lines, scm_int2num (i), system->get_line (last)); + scm_vector_set_x (lines, scm_int2num (i), system->get_line ()); if (verbose_global_b) - { - progress_indication (to_string (i)); - progress_indication ("]"); - } + progress_indication (to_string (i) + "]"); } return lines; } @@ -392,11 +385,15 @@ System::post_processing () } /* Return line: - ((HEIGHT . WIDTH) LINE) + ((HEIGHT . WIDTH) . LINE) LINE: list of ((OFFSET-X . OFFSET-Y) . STENCIL) + + or (!PAGE_LAYOUT): + ('between-system-string . STENCIL) + Maybe make clas/smob? */ SCM -System::get_line (bool is_last) +System::get_line () { static int const LAYER_COUNT = 3; SCM line = SCM_EOL; @@ -404,26 +401,6 @@ System::get_line (bool is_last) line = scm_cons (scm_cons (ly_offset2scm (Offset (0, 0)), me->smobbed_copy ()), line); - -#ifndef PAGE_LAYOUT - // does not work: (\\par error) - do we really need this at all? - if (false && !is_last) - { - SCM lastcol = ly_car (get_property ("columns")); - Grob *g = unsmob_grob (lastcol); - - SCM between = ly_symbol2scm ("between-system-string"); - SCM inter = g->internal_get_property (between); - if (gh_string_p (inter)) - { - Stencil *stil = new Stencil (Box (), scm_list_2 (between, inter)); - line = scm_cons (scm_cons (ly_offset2scm (Offset (0, 0)), - stil->smobbed_copy ()), - line); - } - } -#endif - /* Output stencils in three layers: 0, 1, 2. The default layer is 1. */ for (int i = 0; i < LAYER_COUNT; i++) @@ -447,6 +424,19 @@ System::get_line (bool is_last) stil->smobbed_copy ()), line); } +#ifndef PAGE_LAYOUT + SCM lastcol = ly_car (get_property ("columns")); + Grob *g = unsmob_grob (lastcol); + + SCM between = ly_symbol2scm ("between-system-string"); + SCM inter = g->internal_get_property (between); + if (gh_string_p (inter)) + { + Stencil *stil = new Stencil (Box (), scm_list_2 (between, inter)); + line = scm_cons (scm_cons (between, stil->smobbed_copy ()), line); + } +#endif + Interval x (extent (this, X_AXIS)); Interval y (extent (this, Y_AXIS)); return scm_cons (ly_offset2scm (Offset (x.length (), y.length ())), line); -- 2.39.2