lilypond-user
[Top][All Lists]
Advanced

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

Re: textspanner arrowed line


From: Han-Wen Nienhuys
Subject: Re: textspanner arrowed line
Date: Sat, 16 Apr 2005 16:05:37 +0200

Op za, 16-04-2005 te 15:12 -0300, schreef Jonatan Liljedahl:
> > This sounds like a good idea. Probably the arrow drawing should be
> > done by the line-interface code, because arrows are a generic thing to
> > have on lines.
> 
> Yes, I'll see what I can do. Is make_line() and make_dashed_line() only
> used by the Line_interface::line() function? (so that it's Ok to add an
> extra argument to make_line() to tell it about the arrow...)

I don't know - grep the source code. It might be easier to make an 
add_arrow_endings() function, which does not need to know about the line
style (dashed, etc.) or thickness.

> > > But otherwise, would it be possible to replace the whole
> > > TextSpanner::print function and do both texts and arrow? What should
> > > I do in the end of the function, just return the stencil or call
> > > something?
> > 
> > If in Scheme, simply return the stencil. For C++ examples, see any 
> > print function.
> 
> I haven't figured out how to make a simple text stencil in scheme... 

something like

  (interpret-markup (ly:grob-layout grob) (ly:grob-alist-chain grob)
                    THE-MARKUP)

eg.

  (interpret-markup (ly:grob-layout grob) (ly:grob-alist-chain grob)
                    (make-bold-markup "this is bold text"))

> > > Another solution would be to put the arrow in the end edge text, and
> > > translate it to the left a bit... Is it possible to include markup 
> > > (with
> > > \stencil code-to-draw-arrowhead) in the edge texts somehow?
> > 
> > I'm not sure it will work. There is padding (bound-padding property) 
> > between the text and the line,
> > but you could give it a try.
> 
> I tried putting markup in the edge texts but they came out verbatim. 

Try something like

\override ...  #'edge-text = #(cons (make-bold-markup "foo")  '() )


-- 
Han-Wen Nienhuys - address@hidden
LilyPond Software Design - http://www.lilypond-design.com





reply via email to

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