Commit 9fe33702 authored by Ell's avatar Ell

Issue #4354 - When using color to fade dynamics and gradient with transparency ...

... brush does not have transparency

In the PAINT_MASK_TO_COMP_MASK paintcore-loops algorithm, used when
painting incrementally, multiply the paint mask values by the paint
opacity.  Previously, the paint opacity was ignored, breaking
various dynamics affecting the opacity.
parent 4a59c891
Pipeline #142485 passed with stages
in 40 minutes and 51 seconds
......@@ -1725,7 +1725,8 @@ struct PaintMaskToCompMask : Base
for (x = 0; x < rect->width; x++)
{
comp_mask_pixel[0] = value_to_float (mask_pixel[0]) *
state->mask_pixel[0];
state->mask_pixel[0] *
params->paint_opacity;
comp_mask_pixel += 1;
mask_pixel += 1;
......@@ -1736,7 +1737,8 @@ struct PaintMaskToCompMask : Base
{
for (x = 0; x < rect->width; x++)
{
comp_mask_pixel[0] = value_to_float (mask_pixel[0]);
comp_mask_pixel[0] = value_to_float (mask_pixel[0]) *
params->paint_opacity;
comp_mask_pixel += 1;
mask_pixel += 1;
......@@ -1843,7 +1845,10 @@ struct DispatchPaintMaskToCompMask
{
using NewAlgorithm = typename decltype (algorithm)::type;
Dispatch<NewAlgorithm> () (visitor, params, algorithms, algorithm);
if (params->paint_opacity == GIMP_OPACITY_OPAQUE)
Dispatch<NewAlgorithm> () (visitor, params, algorithms, algorithm);
else
DispatchIndirect () (visitor, params, algorithms, algorithm);
},
params, algorithms, algorithm,
dispatch_paint_mask,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment