bug-lilypond
[Top][All Lists]
Advanced

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

Re: make-connected-path-stencil should not hard-code the path origin at


From: Paul Morris
Subject: Re: make-connected-path-stencil should not hard-code the path origin at (0 0)
Date: Mon, 28 Oct 2013 14:48:06 -0400

> Paul Morris wrote:
> Currently the function "make-connected-path-stencil"[1] does not allow you to 
> specify the starting point (origin) of the path, but arbitrarily hard-codes 
> it 
> as (0 0).  This makes the function less flexible for no good reason. 

Hello bug squad,

I'd like to withdraw this proposal.  Having thought about it some more, I think 
it would be better to have a new function that combines the benefits of both 
(A) the make-connected-path-stencil function and (B) using ly:make-stencil with 
a path expression.  Namely:

(A)
- automatically calculate stencil extents
- allow scaling of the stencil

(B)
- allow use of all possible path commands, both relative and absolute:  
   lineto rlineto curveto rcurveto moveto rmoveto closepath
- allow "unconnected" paths with multiple segments 
  (i.e. allow (r)moveto in the middle of the path expression)
- allow use of different cap and join styles

So with some work I've written a function that can actually do all this 
(drawing on the make-connected-path-stencil code and the path code itself from 
output-svg.scm).  I would like to contribute it to LilyPond, but I suppose I 
should look at the contributors guide on how to proceed.

Maybe I will send what I've got to the developer list to see if there's even 
interest in including this.  (Although it looks like they are in the middle of 
the 2.18 release, and there's no rush on this...)

Thanks,
-Paul

P.S. Here are snippets demonstrating each of these current ways to make a path 
stencil:
http://lsr.dsi.unimi.it/LSR/Item?id=623
http://lsr.dsi.unimi.it/LSR/Item?id=891


reply via email to

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