bug-lilypond
[Top][All Lists]
Advanced

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

Re: Coloring broken in Lily 2.19.51? (PNG alpha-transparency coloring is


From: Hans Aikema
Subject: Re: Coloring broken in Lily 2.19.51? (PNG alpha-transparency coloring is broken)
Date: Sat, 3 Dec 2016 13:52:52 +0100

> On 3 Dec 2016, at 13:18, Hans Aikema <address@hidden> wrote:
> 
> Ponders,
> 
> Anyone else using coloring in scores, using lilypond unstable and spotting 
> coloring-issues when generating scores?
> 
> I spotted a horrible output for a score I created for beamer in our church 
> service and upon futher inspection it appears caused by only partial coloring 
> of the score from black to white: some barlines / stems were still in black 
> and from the looks of it the ouline of the Lyric font is consistently black 
> (filling is white; in 2.19.49 both appear to be white at first glance)
> 
> For recoloring the score I use the following LSR snippet:
> http://lsr.di.unimi.it/LSR/Item?id=443
> 
> I’ll try to compose a minimal example showing the erratice behavior, but am 
> curious if others are seeing the same.

Tracked down the issue to be related to PNG alpha-transparency… The PNG alpha 
transparency no longer uses the actual color of the grobs, but black for 
generating the partially transparent pixels

Modify the LSR snippet by adding

#(ly:set-option 'pixmap-format "pngalpha") % set PNG background to use Alpha 
transparency

and the partial transparent blue pixels will become partial transparent black 
pixels


The modified LSR snippet showing the issue, using white, which makes the 
sympoms even clearer (as there should be no hint of darkness in a partially 
transparent white line):


% PNG partially transparent pixels should be in grob-color (white)
% but in 2.19.51 they are in black
#(define (override-color-for-all-grobs color)
  (lambda (context)
   (let loop ((x all-grob-descriptions))
    (if (not (null? x))
     (let ((grob-name (caar x)))
      (ly:context-pushpop-property context grob-name 'color color)
      (loop (cdr x)))))))

#(ly:set-option 'pixmap-format "pngalpha") % set PNG background to use Alpha 
transparency

\relative c' {
  \applyContext #(override-color-for-all-grobs (x11-color ‘white))
  c4\pp\< d e f
  \grace { g16[( a g fis]) } g1\ff\!
}




reply via email to

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