]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
Doc: CG Remove section Building Ubuntu Distro
[lilypond.git] / lily / grob.cc
index 83b78edac4c7db74e6f8ca5a0aaaebedfc600aa0..2f1bd8aa9f52c463c274fa28ab6fe2fc60227d03 100644 (file)
@@ -157,10 +157,14 @@ Grob::get_print_stencil () const
         }
 
       /* Calls the scheme procedure stencil-whiteout-box in scm/stencils.scm */
-      if (!transparent && to_boolean (get_property ("whiteout-box")))
+      if (!transparent && (scm_is_number (get_property("whiteout-box"))
+                           || to_boolean (get_property ("whiteout-box"))))
         {
+          Real thickness = robust_scm2double (get_property("whiteout-box"), 0.0)
+               * layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
           retval = *unsmob<Stencil>
-            (Lily::stencil_whiteout_box (retval.smobbed_copy ()));
+            (Lily::stencil_whiteout_box (retval.smobbed_copy (),
+                                     scm_from_double (thickness)));
         }
 
       if (transparent)
@@ -391,7 +395,7 @@ Grob::pure_relative_y_coordinate (Grob const *refp, int start, int end)
   if (Grob *p = get_parent (Y_AXIS))
     {
       Real trans = 0;
-      if (Align_interface::has_interface (p) && !dim_cache_[Y_AXIS].offset_)
+      if (has_interface<Align_interface> (p) && !dim_cache_[Y_AXIS].offset_)
         trans = Align_interface::get_pure_child_y_translation (p, this, start, end);
 
       return off + trans + p->pure_relative_y_coordinate (refp, start, end);
@@ -638,7 +642,7 @@ get_maybe_root_vertical_alignment (Grob *g, Grob *maybe)
 {
   if (!g)
     return maybe;
-  if (Align_interface::has_interface (g))
+  if (has_interface<Align_interface> (g))
     return get_maybe_root_vertical_alignment (g->get_parent (Y_AXIS), g);
   return get_maybe_root_vertical_alignment (g->get_parent (Y_AXIS), maybe);
 
@@ -657,8 +661,8 @@ Grob::get_vertical_axis_group (Grob *g)
     return 0;
   if (!g->get_parent (Y_AXIS))
     return 0;
-  if (Axis_group_interface::has_interface (g)
-      && Align_interface::has_interface (g->get_parent (Y_AXIS)))
+  if (has_interface<Axis_group_interface> (g)
+      && has_interface<Align_interface> (g->get_parent (Y_AXIS)))
     return g;
   return get_vertical_axis_group (g->get_parent (Y_AXIS));
 
@@ -965,11 +969,11 @@ robust_relative_extent (Grob *me, Grob *refpoint, Axis a)
 bool
 Grob::check_cross_staff (Grob *commony)
 {
-  if (Align_interface::has_interface (commony))
+  if (has_interface<Align_interface> (commony))
     return true;
 
   for (Grob *g = this; g && g != commony; g = g->get_parent (Y_AXIS))
-    if (Align_interface::has_interface (g))
+    if (has_interface<Align_interface> (g))
       return true;
 
   return false;