Commit Graph

9 Commits

Author SHA1 Message Date
Ell
05a2061776 app: in gimp:mask-components, implement GeglOperation::get_bounding_box()
... to forward the input/aux bounding box when the component mask
is fully clear/set, respectively.

(cherry picked from commit 9900fb74f2)
2019-08-02 00:40:25 +03:00
Ell
fe9c1732b9 app: add "alpha" propertry to gimp:mask-components
In gimp:mask-components, add an "alpha" property, which controls
the masked-in alpha value in case there's no aux buffer.  Set it to
0 by default, so that gimp:mask-components behaves normally in the
absence of an aux buffer (as if the aux buffer was empty).  Set it
to 1 in the image's visible-mask node, to maintain the current
alpha-component visibility behavior.

This fixes incorrect results when the output bounding box of a
drawable filter is smaller than the drawable, which can lead to a
NULL aux buffer being fed to the filter's gimp:mask-components
node.

(cherry picked from commit 6425bf820a)
2019-05-31 13:11:26 -04:00
Ell
7f6e522a35 app: in gimp:mask-components, don't forward empty aux when mask is fully set
... since the result needs to be fully opaque in this case, rather
than fully transparent.

(cherry picked from commit 371e35eeb8)
2019-03-01 14:36:25 -05:00
Ell
a3db1857fc app: small fix to last commit
(cherry picked from commit a8a29312de)
2019-03-01 14:15:25 -05:00
Ell
37797f9de4 app: fix toggling-off of alpha channel
Fix gimp:mask-components to use full-oapcity value for the alpha
component when it's masked-in and there's no "aux" input, so that
the image is rendered with full opacity when the alpha channel's
visiblity is toggled off, as per bug #143315.

(cherry picked from commit 6419ed3246)
2019-03-01 14:11:22 -05:00
Ell
1d05c286c5 app: disable spec. 8-bpp version of gimp:mask-components for non-little-endian platforms
(cherry picked from commit 6166f9ae14)
2019-03-01 14:11:21 -05:00
Ell
99130068bc app: in gimp:mask-components, handle half-precision float formats
(cherry picked from commit 7c1429d1ff)
2019-02-16 13:10:12 -05:00
Ell
02b8845a2f app: improve gimp:mask-components
Add specialized versions of gimp:mask-components for 8-, 16-, and
32-bpc formats, to improve efficiency, and to preserve the contents
of masked-out components exactly.

Provide public functions for format-selection and processing, which
we'll use in the painting code, instead of reimplementing component
masking.

(cherry picked from commit ee156b8fd6)
2019-02-16 10:00:29 -05:00
Ell
3925ae5fbb app: convert gimp:mask-components to C++
... in preperation for next commit.

(cherry picked from commit a7f7a485bd)
2019-02-16 09:59:33 -05:00