lilypond-user
[Top][All Lists]
Advanced

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

Re: New "make-path-stencil" function


From: Paul Morris
Subject: Re: New "make-path-stencil" function
Date: Tue, 29 Oct 2013 13:59:23 -0700 (PDT)

Carl Sorensen-3 wrote
> Cool idea!

Thanks!


>>- allow "unconnected" paths with multiple segments. (i.e. allow (r)moveto
>>in the middle of the path expression)
> 
> Seems to allow simplification of complex stencils.

Indeed, it lets you put things where you want them in the first place, both
in relation to each other and to (0 0), while working in a single coordinate
plane.  This provides fewer moving parts to figure out and less ambiguity
about the output.

For example, currently you would have to define separate stencils that both
start at (0 0) and then combine them into a single stencil while spacing
them just right in relation to each other, etc.  It would make that kind of
thing a lot simpler.


>>- allow use of different "cap" and "join" styles, not just round.
> 
> It's part of the LilyPond engraving aesthetic to use round caps and joins.
>  Engraving on metal plates doesn't have sharp corners.  That's why we
> don't have the other styles.  If you look at all of our box stencils,
> you'll see they have rounded corners.  So I don't think we should support
> other cap and join styles.  But I could certainly be overruled here.

Hmmm...  ok, although these are just optional arguments that default to
round caps and joins, so I don't see the harm in making it possible to use
the other styles, even if the practice is not to use them in LilyPond.

My approach was to make it possible to do anything with this function that
you can do with ly:make-stencil and a path expression.


> Does it also work with output-ps.scm?

I think so.  It works the same as make-connected-path-stencil as far as that
goes.


> It seems like we would replace make-connected-path-stencil with
> make-path-stencil.

It can do everything that make-connected-path-stencil does, so that would be
possible.  


> I haven't tried to rewrite your code, but when I first learned Scheme I
> was told that anytime you saw lots of set! expressions in the code, you
> were trying to write procedural code (I.e. c) instead of functional code
> (Scheme).  Your code seems to have lots of set! expressions; it may be
> possible to rewrite it in a more functional manner.

That's a helpful tip, thanks!  


> Anyway, this is a nice contribution!

Thanks again,
-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/New-make-path-stencil-function-tp153077p153111.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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