X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=lily%2Ftie-formatting-problem.cc;h=83e5d25464a2ca4c57e05a1da121fb0a130bc471;hb=23c84a80ca6a678e9cb55c6084688f488cc92cd9;hp=f514b390957628461d0fa63940823086d09afdd8;hpb=2a4086ccaf4f434d5819b8722f941418d5c65528;p=lilypond.git diff --git a/lily/tie-formatting-problem.cc b/lily/tie-formatting-problem.cc index f514b39095..83e5d25464 100644 --- a/lily/tie-formatting-problem.cc +++ b/lily/tie-formatting-problem.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2005--2012 Han-Wen Nienhuys + Copyright (C) 2005--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify @@ -102,7 +102,7 @@ Tie_formatting_problem::set_column_chord_outline (vector bounds, continue; if (!stem) - stem = unsmob_grob (head->get_object ("stem")); + stem = unsmob (head->get_object ("stem")); Real p = Staff_symbol_referencer::get_position (head); Interval y ((p - 1) * 0.5 * staff_space, @@ -151,7 +151,7 @@ Tie_formatting_problem::set_column_chord_outline (vector bounds, stem_end_position = stem->extent (stem, Y_AXIS)[get_grob_direction (stem)]; else // May want to change this to the stem's pure height... - stem_end_position = Stem::note_head_positions (stem)[get_grob_direction (stem)] + stem_end_position = Stem::head_positions (stem)[get_grob_direction (stem)] * staff_space * .5; } @@ -211,9 +211,9 @@ Tie_formatting_problem::set_column_chord_outline (vector bounds, boxes.push_back (Box (x, y)); } - Grob *acc = unsmob_grob (heads[i]->get_object ("accidental-grob")); + Grob *acc = unsmob (heads[i]->get_object ("accidental-grob")); if (acc) - acc->get_property ("stencil"); /* trigger tie-related suicide */ + acc->get_property ("after-line-breaking"); /* trigger tie-related suicide */ if (acc && acc->is_live () && dir == RIGHT) { @@ -243,8 +243,7 @@ Tie_formatting_problem::set_column_chord_outline (vector bounds, boxes.push_back (Box (x, y)); } - /* todo: the horizon_padding is somewhat arbitrary */ - chord_outlines_[key] = Skyline (boxes, details_.skyline_padding_, Y_AXIS, -dir); + chord_outlines_[key] = Skyline (boxes, Y_AXIS, -dir).padded (details_.skyline_padding_); if (bounds[0]->break_status_dir ()) { Interval iv (Axis_group_interface::staff_extent (bounds[0], x_refpoint_, X_AXIS, y_refpoint_, Y_AXIS)); @@ -381,7 +380,7 @@ Tie_formatting_problem::from_semi_ties (vector const &semi_ties, Directi for (vsize i = 0; i < semi_ties.size (); i++) { Tie_specification spec; - Item *head = unsmob_item (semi_ties[i]->get_object ("note-head")); + Item *head = unsmob (semi_ties[i]->get_object ("note-head")); if (!head) programming_error ("LV tie without head?!"); @@ -656,7 +655,7 @@ Tie_formatting_problem::score_aptitude (Tie_configuration *conf, if (!spec.note_head_drul_[d]) continue; - Grob *stem = unsmob_grob (spec.note_head_drul_[d]->get_object ("stem")); + Grob *stem = unsmob (spec.note_head_drul_[d]->get_object ("stem")); if (stem && Stem::is_normal_stem (stem)) stems[d] = stem; @@ -1201,7 +1200,8 @@ Tie_formatting_problem::set_manual_tie_configuration (SCM manual_configs) { spec.has_manual_position_ = true; spec.manual_position_ = scm_to_double (scm_car (entry)); - spec.has_manual_delta_y_ = (scm_inexact_p (scm_car (entry)) == SCM_BOOL_T); + /* TODO: check whether inexact? is an appropriate condition here */ + spec.has_manual_delta_y_ = (scm_is_true (scm_inexact_p (scm_car (entry)))); } if (scm_is_number (scm_cdr (entry)))