lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Box around system


From: Jean Abou Samra
Subject: Re: Box around system
Date: Sun, 15 May 2022 11:09:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1



Le 15/05/2022 à 10:40, Rip _Mus a écrit :
Good morning,
I found this interesting snippet:
https://lsr.di.unimi.it/LSR/Snippet?id=257

that draws a box around systems.
According to you, is it possible to specify box line thickness ?

Thank you!

Rip_mus



It looks like box-grob-stencil does not support this. make-stencil-boxer, on
the other hand, does. It expects a callback yielding a stencil, though,
so you need to define a little function returning a stencil empty of
inking with the grob's extent.

\version "2.22.2"

#(define (empty-stencil-from-grob-extents grob)
   (ly:make-stencil
    '()
    (ly:grob-extent grob grob X)
    (ly:grob-extent grob grob Y)))

\layout {
  \context {
    \Score
    \override System.stencil =
      % adjust thickness and padding
      #(make-stencil-boxer 0.2 0.3 empty-stencil-from-grob-extents)
  }
}

{
  \slurDown c4 ( g4  c''4)
}


Best,
Jean




reply via email to

[Prev in Thread] Current Thread [Next in Thread]