lilypond-user
[Top][All Lists]
Advanced

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

Re: Keyboard chord figure in scheme


From: address@hidden
Subject: Re: Keyboard chord figure in scheme
Date: Wed, 18 Jan 2012 09:28:02 +0100

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


reply via email to

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