Message:
Adds more flexibility to the coloring of elements in SVG files. It is
disappointing how there is no support in PS, and thus our generation of
PNG. This is useful though in my view, and at least it's available
somewhere.
Postscript/Ghostscript allows to define transparency for a pdf target.
BUT: We build our scores from a lot of symbols and a few postscript functions. Most of the time those symbols overlap. What would be the result if we would use transparent colors for stems, noteheads, ledger lines, flags, accidentals, etc? I think the result would be pretty useless unless your
intention is to show how we construct our scores. The attached lilypond source demonstrates how to persuade lilypond to generate a pdf with transparency, and it demonstrates the problem I mentioned.
You invested a lot of work, so the probability is high that there is a real use
for the feature. Could you be so kind to give an example to a man with a lack
of imagination?
Knut
\version "2.21.0"
\paper {
#(set-paper-size "a4")
indent = 0\cm
left-margin = 2\cm
line-width = 17\cm
top-margin = 2\cm
bottom-margin = 2\cm
ragged-right = ##f
ragged-bottom = ##f
ragged-last-bottom = ##f
tagline = ##f
}
\markup { \postscript #"
<< /PageUsesTransparency true
/CompatibilityLevel 1.4
/PageSpotColors 0
>> setpagedevice
0 .pushpdf14devicefilter % depth .pushpdf14devicefilter -
/rectfill {
gsave 4 2 roll moveto 1 index 0 rlineto
0 exch rlineto neg 0 rlineto closepath fill grestore
} bind def
"}
\relative a' { \repeat unfold 12 { a1 4 4 4 4} \bar "|."} \addlyrics { foo }
\markup { \postscript #"
grestore
<< >> clippath pathbbox newpath .begintransparencygroup
1.0 .setshapealpha
1.0 .setopacityalpha 1 0 0 setrgbcolor 30 0 20 -90 rectfill
0.8 .setopacityalpha 0 1 0 setrgbcolor 40 0 20 -110 rectfill
0.6 .setopacityalpha 0 0 1 setrgbcolor 50 0 20 -130 rectfill
0.4 .setopacityalpha 1 0 0 setrgbcolor 60 0 20 -150 rectfill
0.2 .setopacityalpha 0 1 0 setrgbcolor 70 0 20 -170 rectfill
0.6 .setshapealpha
0.6 .setopacityalpha
1 0.7 0 setrgbcolor
gsave
" }
\relative a' { \repeat unfold 12 { a1 4 4 4 4} \bar "|."} \addlyrics { foo }
\markup { \postscript #"
.endtransparencygroup
.poppdf14devicefilter
" }
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel