X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Falign-interface.cc;h=80a9dd3c081f043713b8d8debe07482aeffe02e3;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=90db684848dbe154d775cb5d71b9874d84901954;hpb=5bbfc22fce036b9b69df5e420de93e11da23c05e;p=lilypond.git diff --git a/lily/align-interface.cc b/lily/align-interface.cc index 90db684848..80a9dd3c08 100644 --- a/lily/align-interface.cc +++ b/lily/align-interface.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2000--2014 Han-Wen Nienhuys + Copyright (C) 2000--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ MAKE_SCHEME_CALLBACK (Align_interface, align_to_minimum_distances, 1); SCM Align_interface::align_to_minimum_distances (SCM smob) { - Grob *me = Grob::unsmob (smob); + Grob *me = unsmob (smob); me->set_property ("positioning-done", SCM_BOOL_T); @@ -52,7 +52,7 @@ MAKE_SCHEME_CALLBACK (Align_interface, align_to_ideal_distances, 1); SCM Align_interface::align_to_ideal_distances (SCM smob) { - Grob *me = Grob::unsmob (smob); + Grob *me = unsmob (smob); me->set_property ("positioning-done", SCM_BOOL_T); @@ -76,7 +76,7 @@ get_skylines (Grob *g, if (!pure) { - Skyline_pair *skys = Skyline_pair::unsmob (g->get_property (a == Y_AXIS + Skyline_pair *skys = unsmob (g->get_property (a == Y_AXIS ? "vertical-skylines" : "horizontal-skylines")); if (skys) @@ -93,7 +93,7 @@ get_skylines (Grob *g, else { assert (a == Y_AXIS); - Interval extent = g->pure_height (g, start, end); + Interval extent = g->pure_y_extent (g, start, end); // This is a hack to get better accuracy on the pure-height of VerticalAlignment. // It's quite common for a treble clef to be the highest element of one system @@ -106,7 +106,7 @@ get_skylines (Grob *g, // of the system. This way, the tall treble clefs are only compared with the treble // clefs of the other staff and they will be ignored if the staff above is, for example, // lyrics. - if (Axis_group_interface::has_interface (g)) + if (has_interface (g)) { extent = Axis_group_interface::rest_of_line_pure_height (g, start, end); Interval begin_of_line_extent = Axis_group_interface::begin_of_line_pure_height (g, start); @@ -179,7 +179,7 @@ Align_interface::internal_get_minimum_translations (Grob *me, SCM fv = ly_assoc_get (scm_cons (scm_from_int (start), scm_from_int (end)), me->get_property ("minimum-translations-alist"), SCM_EOL); - if (fv != SCM_EOL) + if (!scm_is_null (fv)) return ly_scm2floatvector (fv); } @@ -353,11 +353,11 @@ void Align_interface::set_ordered (Grob *me) { SCM ga_scm = me->get_object ("elements"); - Grob_array *ga = Grob_array::unsmob (ga_scm); + Grob_array *ga = unsmob (ga_scm); if (!ga) { ga_scm = Grob_array::make_array (); - ga = Grob_array::unsmob (ga_scm); + ga = unsmob (ga_scm); me->set_object ("elements", ga_scm); }