]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
extract new Audio_note::tie_head() method
[lilypond.git] / lily / grob.cc
index 9edf8a2f8a88ff4da6a7c1f260ee947ce7e44453..4c54cbc508a318938b50ef5258ce012ff2f381f2 100644 (file)
@@ -81,9 +81,9 @@ Grob::Grob (SCM basicprops)
   if (get_property_data ("Y-extent") == SCM_EOL)
     set_property ("Y-extent", Grob::stencil_height_proc);
   if (get_property_data ("vertical-skylines") == SCM_EOL)
-    set_property ("vertical-skylines", Grob::simple_vertical_skylines_from_stencil_proc);
+    set_property ("vertical-skylines", Grob::simple_vertical_skylines_from_extents_proc);
   if (get_property_data ("horizontal-skylines") == SCM_EOL)
-    set_property ("horizontal-skylines", Grob::simple_horizontal_skylines_from_stencil_proc);
+    set_property ("horizontal-skylines", Grob::simple_horizontal_skylines_from_extents_proc);
 }
 
 Grob::Grob (Grob const &s)
@@ -472,9 +472,11 @@ Grob::extent (Grob *refp, Axis a) const
     }
 
   // We never want nan, so we avoid shifting infinite values.
-  for (LEFT_and_RIGHT (d))
-    if (!isinf (real_ext[d]))
-      real_ext[d] += offset;
+    if(!isinf (offset))
+      real_ext.translate(offset);
+    else
+      this->warning(_f ("ignored infinite %s-offset",
+                        a == X_AXIS ? "X" : "Y"));
 
   return real_ext;
 }
@@ -483,6 +485,9 @@ Interval
 Grob::pure_height (Grob *refp, int start, int end)
 {
   SCM iv_scm = get_pure_property ("Y-extent", start, end);
+  // TODO: Why is this Interval (0,0)
+  // Shouldn't it just be an empty interval?
+  // 0,0 puts an arbitrary point at 0,0 which will influence spacing
   Interval iv = robust_scm2interval (iv_scm, Interval (0, 0));
   Real offset = pure_relative_y_coordinate (refp, start, end);
 
@@ -804,8 +809,6 @@ ADD_INTERFACE (Grob,
                "color "
                "cross-staff "
                "id "
-               "extra-X-extent "
-               "extra-Y-extent "
                "extra-offset "
                "footnote-music "
                "forced-spacing "