2008/4/24 Risto Vääräniemi <[EMAIL PROTECTED]>:
> 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 - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to