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.
(cherry picked from commit 9fe33702fb)
This commit is contained in:
parent
67b0279091
commit
4d5ea7fd95
1 changed files with 8 additions and 3 deletions
|
|
@ -1723,7 +1723,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;
|
||||
|
|
@ -1734,7 +1735,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;
|
||||
|
|
@ -1841,7 +1843,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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue