[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Centering a stencil on another stencil
From: |
Thomas Morley |
Subject: |
Re: Centering a stencil on another stencil |
Date: |
Tue, 28 Jul 2015 00:14:54 +0200 |
2015-07-24 6:30 GMT+02:00 Paul Morris <address@hidden>:
> After I didn’t find anything for it in the LSR or mailing list, I came up
> with a scheme procedure for centering one stencil on another, on either the
> X or Y axis. I uploaded it to the LSR and I’m posting it here for future
> seekers of centered stencils.
>
> http://lsr.di.unimi.it/LSR/Item?id=1009
>
> Cheers,
> -Paul
Hi,
(back from holidays)
We've already ly:stencil-aligned-to and centered-stencil, leading to:
circle = #(make-circle-stencil 3 0.4 #f)
square =
#(stencil-with-color
(make-connected-path-stencil
'((0 0) (3 0) (3 3) (0 3) (0 0))
0.4 1 1 #f #f)
blue)
\markup \line {
\stencil #(ly:stencil-add circle square)
" "
\stencil #(ly:stencil-add circle (ly:stencil-aligned-to square X CENTER))
" "
\stencil #(ly:stencil-add circle (ly:stencil-aligned-to square Y CENTER))
" "
\stencil #(ly:stencil-add circle (centered-stencil square))
}
So I see no advantage in a new LSR-snippet.
Cheers,
Harm