2015-07-24 6:30 GMT+02:00 Paul Morris <[email protected]>:
> 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

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to