]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
Doc-de: updating running manual
[lilypond.git] / lily / grob.cc
index 57d06515eed6032d1a08cd3c6d3445167ac8e008..828ae7f07b40687457f8031475f0a42d9992dc67 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1997--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -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 "