X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fgrob-scheme.cc;h=572a49ac84afcf788be814ce2a00c2e6c0fde05f;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=1a316b7ae1e3a49a41e80a6bc15bc740e693c68f;hpb=c5d9f09505f28e5b44c7070fd88a841a271b8028;p=lilypond.git diff --git a/lily/grob-scheme.cc b/lily/grob-scheme.cc index 1a316b7ae1..572a49ac84 100644 --- a/lily/grob-scheme.cc +++ b/lily/grob-scheme.cc @@ -480,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])); +}