[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using path expressions to override stencils
From: |
Paul Booker |
Subject: |
Re: Using path expressions to override stencils |
Date: |
Tue, 16 Feb 2016 18:40:02 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Paul Morris <paul <at> paulwmorris.com> writes:
>
> > On Feb 16, 2016, at 8:35 AM, Paul Booker <Paul <at> homebass.net> wrote:
> >
> > I've only narrowed the problem down to the function
>
> Hi Paul, Can you send a full but tiny example that we can run/test with
LilyPond? See:
>
> http://lilypond.org/tiny-examples.html
>
> That will make it easier to see what’s going on.
>
> -Paul
> _______________________________________________
Thanks Paul
Good point. I should also offer the full path of the error message:
/home/gub/NewGub/gub/target/mingw/src/lilypond-git.sv.gnu.or
g--lilypond.git-release-unstable/lily/grob-property.cc,
Line 243
Expression:scm_is_null (value) || scm_is_eq (value, marker)
The tiny example here is taken from LSR 623, and you can uncomment the line
in the "music" variable which switches between overrides to invoke the error.
I've included (commented out) the original scaled staves which demonstrate
the capacity of the function:
\version "2.19.36"
customClefStencil =
#(ly:make-stencil
`(path 0.1
`(moveto 0 0
curveto 0 1 0.7 2.5 1.5 1.5
lineto 1.5 -3
closepath)
'round
'round
#t)
(cons 0 1.5)
(cons -3 2))
scaleCustomClefStencil =
#(lambda (grob)
(let* ((sz (ly:grob-property grob 'font-size 0.0))
(mult (magstep sz)))
(set! (ly:grob-property grob 'stencil)
(ly:stencil-scale
customClefStencil
mult mult))))
music =
\relative c' {
\override Staff.Clef.stencil = \customClefStencil
%\override Staff.Clef.stencil = \scaleCustomClefStencil
c1 g1
}
\new Staff
\music
%{
<<
\new Staff \with {
fontSize = #-3
\override StaffSymbol.staff-space = #(magstep -3)
\override StaffSymbol.thickness = #(magstep -3)
}
\music
\new Staff
\music
\new Staff \with {
fontSize = #2
\override StaffSymbol.staff-space = #(magstep 2)
\override StaffSymbol.thickness = #(magstep 2)
}
\music
>>
%}
- Using path expressions to override stencils, Paul Booker, 2016/02/16
- Re: Using path expressions to override stencils, Paul Morris, 2016/02/16
- Re: Using path expressions to override stencils,
Paul Booker <=
- Re: Using path expressions to override stencils, Thomas Morley, 2016/02/16
- Re: Using path expressions to override stencils, Thomas Morley, 2016/02/16
- Re: Using path expressions to override stencils, Paul Booker, 2016/02/16
- Re: Using path expressions to override stencils, Paul Morris, 2016/02/16
- Re: Using path expressions to override stencils, Paul Booker, 2016/02/17