Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1865)

Issue 330300043: Add alpha transparency to SVG backend

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 7 months ago by Ebe123
Modified:
6 years, 7 months ago
Reviewers:
dak, Knut_Petersen
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Update documentation for alpha channel This change adds documentation about the new alpha channel parameter when using `rgb-color`. It also renames the sections and the uses of the function, while keeping "RGB" in the index in addition to "RGBA". Add alpha transparency to SVG backend Adding the alpha channel to the color commands allows for objects to be of different opacities, leaving more flexibility in coloring. This is only available with the SVG backend as PostScript has poor support. The `rgb-color` command has been renamed to fit the alpha channel as `rgba-color`, with a convert-ly rule associated. By default, the channel is set at 100% opacity. The built-in colors have also been updated. In addition, setcolor now outputs values from the 0-255 int range, and not a percentage in the SVG backend.

Patch Set 1 #

Patch Set 2 : Add to regression tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+735 lines, -729 lines) Patch
M Documentation/changes.tely View 1 chunk +5 lines, -0 lines 0 comments Download
M Documentation/learning/tweaks.itely View 3 chunks +10 lines, -13 lines 0 comments Download
M Documentation/notation/editorial.itely View 2 chunks +9 lines, -9 lines 0 comments Download
M input/regression/alter-broken.ly View 1 1 chunk +1 line, -1 line 0 comments Download
M input/regression/display-lily-tests.ly View 1 3 chunks +4 lines, -4 lines 0 comments Download
M lily/axis-group-interface.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M lily/include/stencil.hh View 1 chunk +1 line, -1 line 0 comments Download
M lily/lyric-hyphen.cc View 1 chunk +1 line, -1 line 0 comments Download
M lily/paper-column.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M lily/separation-item.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M lily/stencil.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M lily/stencil-interpret.cc View 1 chunk +2 lines, -1 line 0 comments Download
M lily/stencil-scheme.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M lily/system.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M lily/tie.cc View 1 chunk +1 line, -1 line 0 comments Download
M python/convertrules.py View 3 chunks +3 lines, -2 lines 0 comments Download
M python/musicexp.py View 3 chunks +3 lines, -3 lines 0 comments Download
M scm/output-lib.scm View 2 chunks +19 lines, -18 lines 0 comments Download
M scm/output-ps.scm View 1 chunk +1 line, -1 line 0 comments Download
M scm/output-svg.scm View 1 chunk +3 lines, -3 lines 0 comments Download
M scm/x11-color.scm View 1 chunk +657 lines, -657 lines 0 comments Download
M scripts/musicxml2ly.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6
Ebe123
Adds more flexibility to the coloring of elements in SVG files. It is disappointing how ...
6 years, 7 months ago (2017-09-21 00:28:23 UTC) #1
Knut_Petersen_t-online.de
> Message: > Adds more flexibility to the coloring of elements in SVG files. It ...
6 years, 7 months ago (2017-09-21 10:04:53 UTC) #2
Ebe123
On 2017/09/21 10:04:53, Knut_Petersen_t-online.de wrote: > > Message: > > Adds more flexibility to the ...
6 years, 7 months ago (2017-09-22 00:37:31 UTC) #3
Ebe123
Add to regression tests
6 years, 7 months ago (2017-09-22 11:19:08 UTC) #4
dak
On 2017/09/22 11:19:08, Ebe123 wrote: > Add to regression tests I think it is a ...
6 years, 7 months ago (2017-09-22 11:34:30 UTC) #5
Ebe123
6 years, 7 months ago (2017-09-22 12:01:54 UTC) #6
On 2017/09/22 11:34:30, dak wrote:
> On 2017/09/22 11:19:08, Ebe123 wrote:
> > Add to regression tests
> 
> I think it is a bad idea to change rgb-color here: this is a recipe for
> wide-reaching incompatibilities for the sake of limited applications.  It
would
> make more sense to meddle with the type of the "transparent" property, making
it
> a boolean-or-number? for example.
> 
> If transparency is supposed to be made into a part of color, I think it should
> rather be optional: see
> <https://sourceforge.net/p/testlilyissues/issues/5162/#bd3f> for a proposal in
> that regard.
> 
> However, I think that transparency is really something that tends to have
> considerably different scope and application as color and is more often than
not
> applied in manners orthogonal to color, so keeping it in a separate property
> might make for a lot less conflicts of use cases in the long run.

So [#5189] would be preferable to this. There would be way more work if done
that way. Alpha transparency is integrated with color in some formats, such as
SVG. Here, if using rgb-color, the opacity is optional as it defaults to 1,0.
There is also a convert-ly rule for changing rgb- to rgba-.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b