X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fsemi-tie-column.cc;h=c2910d5cd1b8772f127258dea214d338711fc979;hb=bcafa85b883969cd02a43f41ba71e1536aacec7f;hp=c0e9999159b59ad5e7a1a49d8473b7f71ceda173;hpb=a6bd229f7fe1dc4a03478e14ccc0c0c66b225061;p=lilypond.git diff --git a/lily/semi-tie-column.cc b/lily/semi-tie-column.cc index c0e9999159..c2910d5cd1 100644 --- a/lily/semi-tie-column.cc +++ b/lily/semi-tie-column.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2005--2010 Han-Wen Nienhuys + Copyright (C) 2005--2011 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify @@ -30,21 +30,18 @@ #include "tie-formatting-problem.hh" #include "tie-column-format.hh" - ADD_INTERFACE (Semi_tie_column, - "The interface for a column of l.v. (laissez vibrer) ties.", - - /* properties */ - "positioning-done " - "head-direction " - "tie-configuration " - ); - + "The interface for a column of l.v. (laissez vibrer) ties.", + /* properties */ + "positioning-done " + "head-direction " + "tie-configuration " + ); /* Cut & paste from tie-column.cc - */ + */ MAKE_SCHEME_CALLBACK (Semi_tie_column, calc_positioning_done, 1); SCM Semi_tie_column::calc_positioning_done (SCM smob) @@ -52,17 +49,16 @@ Semi_tie_column::calc_positioning_done (SCM smob) Grob *me = unsmob_grob (smob); me->set_property ("positioning-done", SCM_BOOL_T); - + extract_grob_set (me, "ties", lv_ro_ties); - vector lv_ties (lv_ro_ties); + vector lv_ties (lv_ro_ties); vector_sort (lv_ties, Semi_tie::less); Ties_configuration ties_config; - Tie_formatting_problem problem; - + problem.from_semi_ties (lv_ties, to_dir (me->get_property ("head-direction"))); SCM manual_configs = me->get_property ("tie-configuration"); @@ -72,17 +68,17 @@ Semi_tie_column::calc_positioning_done (SCM smob) for (vsize i = 0; i < lv_ties.size (); i++) { SCM cp = Tie::get_control_points (lv_ties[i], problem.common_x_refpoint (), base[i], - problem.details_); + problem.details_); lv_ties[i]->set_property ("control-points", cp); set_grob_direction (lv_ties[i], base[i].dir_); problem.set_debug_scoring (base); } - + return SCM_BOOL_T; } - + MAKE_SCHEME_CALLBACK (Semi_tie_column, calc_head_direction, 1); SCM Semi_tie_column::calc_head_direction (SCM smob) @@ -95,10 +91,10 @@ Semi_tie_column::calc_head_direction (SCM smob) { Direction this_d = to_dir (ties[i]->get_property ("head-direction")); if (i > 0 && d != this_d) - { - programming_error ("all semi-ties in a semi-tie-column should have the same head-direction"); - return scm_from_int (d); - } + { + programming_error ("all semi-ties in a semi-tie-column should have the same head-direction"); + return scm_from_int (d); + } d = this_d; } return scm_from_int (d);