]> git.donarmstrong.com Git - lilypond.git/commitdiff
Dependency of 'transparent and 'whiteout
authorMarc Hohl <marc@hohlart.de>
Sat, 19 Jun 2010 09:02:24 +0000 (11:02 +0200)
committerNeil Puttock <n.puttock@gmail.com>
Sun, 20 Jun 2010 21:15:08 +0000 (22:15 +0100)
If a grob is invisible, the 'whiteout property should not
be taken into account. This will simplify the tablature
handling and doesn't affect the rest.

lily/grob.cc
scm/define-grob-properties.scm

index 2680f55b47eea839316ec9f68d0cf0fe9814446b..5047b35be0c0c337d45bddf338fdc49f7a5f0384 100644 (file)
@@ -123,7 +123,9 @@ Grob::get_print_stencil () const
   if (Stencil *m = unsmob_stencil (stil))
     {
       retval = *m;
-      if (to_boolean (get_property ("transparent")))
+      bool transparent = to_boolean (get_property ("transparent"));
+
+      if (transparent)
        retval = Stencil (m->extent_box (), SCM_EOL);
       else
        {
@@ -156,7 +158,8 @@ Grob::get_print_stencil () const
        }
 
       /* process whiteout */
-      if (to_boolean (get_property ("whiteout")))
+      /* a grob has to be visible, otherwise the whiteout property has no effect */
+      if (!transparent && to_boolean (get_property ("whiteout")))
         {
           /* Call the scheme procedure stencil-whiteout in scm/stencils.scm */
           /* to add a round-filled-box stencil to the stencil list */
index cfa8726c48079a75b4064fe2af06c720e6c18b40..1ab45629ff0ab0fa2776d7ddd5a52291be7901b4 100644 (file)
@@ -846,7 +846,8 @@ one below this grob.")
      (when ,ly:moment? "Global time step associated with this column
 happen?")
      (whiteout ,boolean? "If true, the grob is printed over a white
-background to white-out underlying material.  Usually #f by default.")
+background to white-out underlying material, if the grob is visible.
+ Usually #f by default.")
      (width ,ly:dimension? "The width of a grob measured in staff
 space.")
      (word-space ,ly:dimension? "Space to insert between words in