lilypond-user
[Top][All Lists]
Advanced

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

Re: Arrowlines patch version 2


From: Jonatan Liljedahl
Subject: Re: Arrowlines patch version 2
Date: Mon, 18 Apr 2005 13:13:34 -0300

On Mon, 18 Apr 2005 01:50:56 +0200
Han-Wen Nienhuys <address@hidden> wrote:

>  > > >+     (arrow ,integer? "Add an arrow to the line at 1: end, 2:
>  > > >start,
>  > > 3: both.")
>  > > 
>  > > This is not done. We do not have magical number constants in
>  > > lilypond.
>  > 
>  > I see. What about symbols: 'head-arrow 'tail-arrow 'both-arrow
>  > 'no-arrow?
>  > Or perhaps just a pair of booleans?
> 
>  like I said earlier, I'd prefer the property to be boolean and be
>  read by Text_spanner code. The arrow routines are called from C++
>  only.  

I made it a boolean pair. Your preference would need that every thing
that could have an arrow (every function that calls the line making
routines) should be modified to read the arrow properties and pass them
on.

Anyhow, here is version 3 of my patch. I cleaned up the code,
reformatted it according to your standards, and
used a boolean pair instead of a magic integer. Demonstration:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.5.18"

%% demonstration of line arrows
%% By Jonatan Liljedahl <http://kymatica.com>

\relative c'' {
    %% Arrow between two texts    
    \override TextSpanner #'edge-text = #'("foo" . "bar")
    \override TextSpanner #'dash-fraction = #'()
    \override TextSpanner #'style = #'line
    \override TextSpanner #'arrow = #'(#f . #t)
    
    %% Default arrow size
%    \override TextSpanner #'arrow-length = #1.3
%    \override TextSpanner #'arrow-width = #0.5

    %% We can put arrows to a glissando line
    \override Glissando #'arrow = #'(#t . #t)
    
    a8\startTextSpan gis8\< a2 b4\glissando
    c,4 g'\! c\stopTextSpan c
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/Jonatan    -=( http://kymatica.com )=-

Attachment: 2.5.18-arrow3-lijon.patch.gz
Description: Binary data


reply via email to

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