lilypond-devel
[Top][All Lists]
Advanced

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

Re: Overriding a pure print callback


From: address@hidden
Subject: Re: Overriding a pure print callback
Date: Mon, 26 Dec 2011 10:18:14 +0100


On Dec 26, 2011, at 12:08 AM, Nicolas Sceaux wrote:

Hi,

I have in my tool box some overriden stencil functions, in particular
for bar lines (to define custom baroque repeat bars).

Now, some things seem to have changed since 2.15.20, with respect to
pure things, which show strange behavior when overriding the BarLine
stencil callback, with a function doing just the same thing:

\version "2.15.24"

#(define-public (bar-line::custom-print grob)
  (ly:bar-line::print grob))

\layout {
 \context {
   \Staff
   \override BarLine #'stencil = #bar-line::custom-print
 }
}

{ \key d \minor
 \time 3/4
 \set Score.skipBars = ##t
 R2.*8 \bar ":|" R2.*16 \bar "|." }


\version "2.15.22"

#(define-public (bar-line::custom-print grob)
  (ly:bar-line::print grob))

\layout {
 \context {
   \Staff
   \override BarLine #'stencil = #bar-line::custom-print
   \override BarLine #'Y-extent = #(ly:make-unpure-pure-container
     ly:grob::stencil-height
     (lambda (grob b e) (ly:grob::stencil-height grob)))
 }
}

{ \key d \minor
 \time 3/4
 \set Score.skipBars = ##t
 R2.*8 \bar ":|" R2.*16 \bar "|." }

Also, you can check out:


Cheers,
MS


reply via email to

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