From da923c98ea9a26316f381ba3a7d60c9d5d9b6390 Mon Sep 17 00:00:00 2001 From: Marc Hohl Date: Sat, 19 Jun 2010 11:02:24 +0200 Subject: [PATCH] Dependency of 'transparent and 'whiteout 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 | 7 +++++-- scm/define-grob-properties.scm | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lily/grob.cc b/lily/grob.cc index 2680f55b47..5047b35be0 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -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 */ diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index cfa8726c48..1ab45629ff 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -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 -- 2.39.2