Drawing boxes around grobs: Difference between revisions
m New category |
mNo edit summary |
||
| Line 1: | Line 1: | ||
The <code> | The <code>stencil</code> property can be overridden to draw a box around arbitrary grobs, either using <code>\override</code> or <code>\tweak</code>. | ||
<lilypond version="2.24"> | <lilypond version="2.24"> | ||
\relative c'' { | \relative c'' { | ||
\override TextScript.stencil = | \once \override TextScript.stencil = | ||
#(make-stencil-boxer 0.1 0.3 ly:text-interface::print) | #(make-stencil-boxer 0.1 0.3 ly:text-interface::print) | ||
c'4^"foo" | c'4^"foo" | ||
\ | \tweak Stem.stencil | ||
#(make-stencil-boxer 0.05 0.25 ly:stem::print) | #(make-stencil-boxer 0.05 0.25 ly:stem::print) | ||
b8 | |||
c4.^"bar" c4 | |||
\override Score.RehearsalMark.stencil = | \override Score.RehearsalMark.stencil = | ||
#(make-stencil-boxer 0.15 0.3 ly:text-interface::print) | #(make-stencil-boxer 0.15 0.3 ly:text-interface::print) | ||
\mark \default | \mark \default | ||
c1 | c1 | ||
| Line 22: | Line 21: | ||
[[Category:Editorial annotations]] | [[Category:Editorial annotations]] | ||
[[Category:Scheme]] | |||
[[Category:Tweaks and overrides]] | [[Category:Tweaks and overrides]] | ||
[[Category:Included in the official documentation]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | [[Category:Snippet]] | ||