lilypond-user
[Top][All Lists]
Advanced

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

Re: Creating a stencil from a markup


From: Simon Albrecht
Subject: Re: Creating a stencil from a markup
Date: Thu, 15 Dec 2016 15:35:23 +0100

On 15.12.2016 09:39, Pierre Perol-Schneider wrote:
Or simply:

\version "2.19"

{
  1
  \once\override Staff.BarLine.stencil =
    #(lambda (grob)
       (ly:stencil-combine-at-edge
         (ly:bar-line::print grob)
         1 ; y-axis
         1 ; on top
         (ly:stencil-aligned-to
           (grob-interpret-markup
             grob
             #{
               \markup
               \box % \box only for checking
               \with-dimensions #'(0 . 1.24) #'(-0.75 . 1.24)
               \musicglyph #"scripts.caesura.curved"
             #})
           X
           CENTER)

There is no need to fiddle with \with-dimensions, just adjust CENTER (which evaluates to 0) to any other value between -1 and 1 (I chose -.5), and/or adjust the ‘padding’ value in the following line (I use 1).

         2))
   1
}

Best, Simon



reply via email to

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