]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
Dependency of 'transparent and 'whiteout
[lilypond.git] / lily / grob.cc
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 */