lilypond-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] note-by-number - horizontal flag positioning


From: Han-Wen Nienhuys
Subject: Re: [PATCH] note-by-number - horizontal flag positioning
Date: Thu, 24 Apr 2008 15:29:43 -0300

2008/4/24 Risto Vääräniemi <address@hidden>:
> 2008/4/23 Han-Wen Nienhuys :
>
> >  The reference point is the center of the stem, and the flag attaches
>  >  to the right side of the stem.

Yes, I meant : the 0-point of the flag should be at the edge of the stem.

>  Because the flags are not aligned on their flat side corner but on the
>  other corner (please, see the image, hard to explain) the zero point
>  (not the flat side) should be aligned with the stem edge.

Correct. the flag includes a bit of stem, to prevent any white edges
appearing if the rounding goes wrong in the other way.

>  With stem up situation the horizontal zero point should be aligned to
>  the note head edge and stem down situation it should be aligned to
>  note head edge + stem thickness.
>
>  The flag positioning code should be something like this:
>  (flaggl (and (> log 2)
>     (ly:stencil-translate
>         (ly:font-get-glyph font
>             (string-append "flags."
>                 (if (> dir 0) "d" "u")
>         (number->string log)))

>     (cons (if (> dir 0) (car attach-off) (+ (car attach-off)
>  stem-thickness)) stemy)))))

little shorter

 (cons (+ (car attach-off) (if (> dir 0) stem-thickness 0))
  .. )

-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen

reply via email to

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