On Jan 18, 2012, at 9:16 AM, Morten Jagd Christensen wrote:

> Now the code works, although there still are som FIXME's. For example the 
> black keys
> are generated by thick lines, but unfortunately they have rounded caps.
> 
> 

Check out make-connected-path-stencil : the swiss army knife of stencils.

A brief API :
(make-connected-path-stencil pointlist thickness x-scale y-scale connect fill)

Where pointlist is a list of lists.  Each list in the list has either 2-points 
(line) or 6 points (Bezier curve).  Since you are just working with lines, 
you'd use lists of 2.
So, if you use (make-connected-path-stencil '((3 0) (3 10) (0 10) (0 0)) 0.1 1 
1 #f #t) you'll get a black rectangle of dimensions 3 x 10.
With (make-connected-path-stencil '((3 0) (3 10) (0 10) (0 0)) 0.1 1 1 #f #f) 
you'll get a white rectangle of dimensions 3 x 10.  This avoids the rounded 
caps to which you refer.

Cheers,
MS
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to