Comment 3 for bug 1028505

Revision history for this message
su_v (suv-lp) wrote : Re: Fill/Stroke Opacity is incorrectly showing a selected gradient stop's alpha value

John Smith wrote:
> It should probably show the "master" opacity of the selected object - just as blur does.

Continuing from bug #1028425 here:
John Smith wrote:
> I think the Fill/Stroke "master" opacity should show the opacity of
> the selected object (line, rect etc), and the color alpha should show
> the opacity of the selected gradient stop in this case. Otherwise
> there is no way to independently control both the object opacity and
> the gradient stops opacity.

The problem as I understand it is that in SVG, there's a third level of opacity in-between, stored as independent property in the 'style' attribute, which is currently inaccessible (not represented in the GUI) in stable and trunk when using a paint server like gradient (or pattern): fill-opacity, stroke-opacity. These two values are represented in Inkscape for selected objects in the flat color chooser of fill / stroke as 'Alpha' values.
Neither of these two are (or could be) represented by the 'stop-opacity' for the gradient stop (stored in the gradient definition, not per object), or the global (aka object aka master) opacity. They may or may not be present in the style attribute of any object using a gradient. Inkscape takes them correctly into account when rendering the gradient -> this may result in unexpected differences between the rendered results and the gradient stop alpha values as shown in the GUI.

Even when making the 'Alpha' slider represent the 'stop-opacity' for selected gradient stops (bug #1028425), and - in the next step (bug #1028505) - unlinking the master opacity from the gradient's 'stop-opacity' and link it again to the object (aka master) opacity, inconsistencies remain because a basic attribute affecting the opacity of the gradient rendered on-canvas can't be accessed and changed via GUI (see attached sample file).

Maybe the opacity slider of a selected gradient stop should represent and edit the 'fill-opacity' (or 'stroke-opacity' respectively) of the parent property the gradient is applied to (fill, stroke), and only edit the object (aka master) opacity if no gradient stop is selected?