]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/using-the-whiteout-property.ly
Imported Upstream version 2.19.45
[lilypond.git] / Documentation / snippets / new / using-the-whiteout-property.ly
1 \version "2.19.32"
2
3 \header {
4   lsrtags = "editorial-annotations, expressive-marks"
5
6   texidoc = "
7 Any graphical object can be printed over a white background to mask
8 parts of objects that lie beneath.  This can be useful to improve the
9 appearance of collisions in complex situations when repositioning
10 objects is impractical.  It is necessary to explicitly set the
11 @code{layer} property to control which objects are masked by the white
12 background.
13
14 In this example the collision of the tie with the time signature is
15 improved by masking out the part of the tie that crosses the time
16 signature by setting the @code{whiteout} property of
17 @code{TimeSignature}. To do this @code{TimeSignature} is moved to a
18 layer above @code{Tie}, which is left in the default layer of 1, and
19 @code{StaffSymbol} is moved to a layer above @code{TimeSignature} so it
20 is not masked.
21
22 "
23   doctitle = "Using the whiteout property"
24 }
25
26 {
27   \override Score.StaffSymbol.layer = #4
28   \override Staff.TimeSignature.layer = #3
29   b'2 b'~
30   \once \override Staff.TimeSignature.whiteout = ##t
31   \time 3/4
32   b' r4
33 }