[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Box around system
From: |
Valentin Petzel |
Subject: |
Re: Box around system |
Date: |
Sun, 15 May 2022 21:08:26 +0200 |
Hello Jean, hello Rip.
instead of imposing this empty stencil I’d extent the original command such
that it allows for such things. The appended file does implement a way to call
(box-grob-stencil-with-thickness thickness padding) and a way to use the
original function but to be able to specify thickness and padding using
details.box-thickness and details.box-padding.
Cheers,
Valentin
Am Sonntag, 15. Mai 2022, 11:09:29 CEST schrieb Jean Abou Samra:
> 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
box-grob-with-thickness.ly
Description: Text Data
signature.asc
Description: This is a digitally signed message part.
- Box around system, Rip _Mus, 2022/05/15
- Re: Box around system, Jean Abou Samra, 2022/05/15
- Re: Box around system, Rip _Mus, 2022/05/15
- Re: Box around system,
Valentin Petzel <=
- Re: Box around system, Rip _Mus, 2022/05/16
- Re: Box around system, Rip _Mus, 2022/05/18
- Re: Box around system, Jean Abou Samra, 2022/05/18
- Re: Box around system, Jean Abou Samra, 2022/05/18
- Re: Box around system, Valentin Petzel, 2022/05/18
- Re: Box around system, Jean Abou Samra, 2022/05/18
- Re: Box around system, David Kastrup, 2022/05/18
- Re: Box around system, Jean Abou Samra, 2022/05/18
- Re: Box around system, Jean Abou Samra, 2022/05/18
- Re: Box around system, David Kastrup, 2022/05/18