X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fgrob-scheme.cc;h=572a49ac84afcf788be814ce2a00c2e6c0fde05f;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=b6d07cb8c4dcbc8d939984d82cc550d30e330a2a;hpb=0c14539bc83d6bb405141b6f21430b33d1e8fcf0;p=lilypond.git diff --git a/lily/grob-scheme.cc b/lily/grob-scheme.cc index b6d07cb8c4..572a49ac84 100644 --- a/lily/grob-scheme.cc +++ b/lily/grob-scheme.cc @@ -23,7 +23,6 @@ #include "item.hh" #include "output-def.hh" #include "paper-score.hh" -#include "simple-closure.hh" #include "system.hh" #include "unpure-pure-container.hh" #include "warn.hh" // error () @@ -51,7 +50,6 @@ LY_DEFINE (ly_grob_set_property_x, "ly:grob-set-property!", LY_ASSERT_TYPE (ly_is_symbol, sym, 2); if (!ly_is_procedure (val) - && !unsmob (val) && !type_check_assignment (sym, val, ly_symbol2scm ("backend-type?"))) error ("typecheck failed"); @@ -120,7 +118,7 @@ LY_DEFINE (ly_grob_pure_height, "ly:grob-pure-height", if (SCM_UNBNDP (val)) val = SCM_EOL; - Interval retval = sc->pure_height (ref, scm_to_int (beg), scm_to_int (end)); + Interval retval = sc->pure_y_extent (ref, scm_to_int (beg), scm_to_int (end)); return ly_interval2scm (retval); } @@ -482,3 +480,18 @@ LY_DEFINE (ly_grob_get_vertical_axis_group_index, "ly:grob-get-vertical-axis-gro return scm_from_int (Grob::get_vertical_axis_group_index (gr)); } + +LY_DEFINE (ly_grob_spanned_rank_interval, "ly:grob-spanned-rank-interval", + 1, 0, 0, (SCM grob), + "Returns a pair with the @code{rank} of the furthest left" + " column and the @code{rank} of the furthest right column" + " spanned by @code{grob}.") +{ + Grob *gr = unsmob (grob); + + LY_ASSERT_SMOB (Grob, grob, 1); + + Interval_t iv = gr->spanned_rank_interval (); + + return scm_cons (scm_from_int(iv[LEFT]), scm_from_int(iv[RIGHT])); +}