X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fgrob.cc;h=828ae7f07b40687457f8031475f0a42d9992dc67;hb=2d52187d5492ce7492c78fc8f1dca4aa7b702ba0;hp=6c2eba1710fb15a283f5ecd50249f3ee7f11320f;hpb=d61cf3bbdb1c6670a127ba3baddf2f04d3e34fd3;p=lilypond.git diff --git a/lily/grob.cc b/lily/grob.cc index 6c2eba1710..828ae7f07b 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -170,6 +170,17 @@ Grob::get_print_stencil () const = *unsmob_stencil (scm_call_1 (ly_lily_module_constant ("stencil-whiteout"), retval.smobbed_copy ())); } + + SCM id = get_property ("id"); + if (scm_is_string (id)) + { + SCM expr = scm_list_3 (ly_symbol2scm ("id"), + id, + retval.expr ()); + + retval = Stencil (retval.extent_box (), expr); + } + } return retval; @@ -455,7 +466,10 @@ Grob::extent (Grob *refp, Axis a) const ((Grob *)this)->dim_cache_[a].extent_ = new Interval (real_ext); } - real_ext.translate (offset); + // We never want nan, so we avoid shifting infinite values. + for (LEFT_and_RIGHT (d)) + if (!isinf (real_ext[d])) + real_ext[d] += offset; return real_ext; } @@ -784,9 +798,11 @@ ADD_INTERFACE (Grob, "cause " "color " "cross-staff " + "id " "extra-X-extent " "extra-Y-extent " "extra-offset " + "footnote-music " "forced-spacing " "interfaces " "layer "