Hi Paolo,

But the alpha channel is ignored...
Is there a way to fix this?

AFAIK LilyPond cannot deal with alpha transparency at all. The impression of transparency is only achieved by placing the boxes in a layer behind the staff.

I therefore replaced (see the attached file):

       (if filled
          (ly:make-stencil (list 'color fill-color
                             (list 'round-filled-box
                               (- (- (car xext) thick)) (+ (cdr xext) thick)
                               (- (car yext)) (cdr yext)
                               0.0)
                             xext yext))
          empty-stencil)

with:

      (if filled
          (stencil-with-color
            (ly:round-filled-box xext yext 0)
            fill-color)
          empty-stencil)

At least, "xext" should be widened by "thick":

%%%%%%
      (if filled
          (stencil-with-color
            (ly:round-filled-box (cons (- (car xext) thick) (+ (cdr xext) thick)) yext 0)
            fill-color)
          empty-stencil)
%%%%%%

This fixes the boundaries of boxes separated by a line break, see bar 8 in the example.


Cheers,
Klaus


Reply via email to