lilypond-devel
[Top][All Lists]
Advanced

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

Re: new markup-comand `draw-dashed-line´ was: lilyp ond-user Digest, Vol


From: Thomas Morley
Subject: Re: new markup-comand `draw-dashed-line´ was: lilyp ond-user Digest, Vol 119, Issue 90
Date: Thu, 1 Nov 2012 15:57:22 +0100

2012/10/30 Thomas Morley <address@hidden>:
> 2012/10/27 David Nalesnik <address@hidden>:
>> On Fri, Oct 26, 2012 at 6:13 PM, Thomas Morley
>> <address@hidden> wrote:
>>
>>>> Also: rather than simply translating the dashed-line stencil command,
>>>> it might be nice to ensure that you can't get that ugly dot at the end
>>>> of the line or having it end with a space.when you haven't guessed the
>>>> right on/off combination,
>>>
>>> Well, perhaps I'm lazy, but I'd let it to the user finding appropriate 
>>> values.
>>
>> Really :(   I have terrible memories of making scores with Finale.
>> According to the screen, the line ending would be perfect.  On the
>> printout, there would be that snipped-off line.
>
>
> Hi David (N),
>
> (switching to devel)
>
> I did some research about draw-line and dashed-line.
>
> draw-line and dashed-line are very deep nested in the source-code:
>
> a)
> The markup-command `draw-line´ uses `make-line-stencil´
>
> `make-line-stencil´ is defined in stencil.scm via
>   (ly:make-stencil
>       (list 'draw-line width startx starty endx endy)
>       ...
>
> `draw-line´ is defined in output-ps.scm and output-svg.scm
>   (define (draw-line thick x1 y1 x2 y2) ...
>
> Down too C++ (but here I have to drop the ball), draw-line is mentioned in:
>
> line-interface.cc
>   Stencil
>   Line_interface::make_line (Real th, Offset from, Offset to)
>
> line-interface.hh
>   static Stencil make_line (Real th, Offset from, Offset to);
>
> b)
> dashed-line very similiar in:
>
> line-interface.hh
> line-interface.cc
> output-ps.scm and output-svg.scm
>
> but no occurence in stencil.scm
>
> For the sake of consistency to Glissando- and Textspanners 'style
> 'dashed-line I'd prefer to use said dashed-line in the new definition,
> too.
> But it is not that easy to deal with it, if you want to avoid small
> tips or space at line-end.
>
> Currently I've no success.
>
> Maybe one could construct a dashed-line by adding 'round-filled-boxes,
> as it is done for the dashed-bar-line.
>
> Thoughts?
>
> Best,
>   Harm

Hi David (N),

attached my first try.

If the markup-property full-length is set #t, some calculations ensure
that no space occurs at line-end/begin. Some dashes will only be
partly visible, but I think its ok.
In addition I wrote a top-level-testing-function to minimize typing.

Some comments are added.
But I have no clue why I need 13 as a factor in a specific calculation.

What do you think?

-Harm

Attachment: draw-dashed-line-rev-01.ly
Description: Binary data


reply via email to

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