mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
core: Add alpha channel for certain transforms
In 756fed0c
, we removed code that automatically added an
alpha channel for transformed layers, as it relied on the user
setting interpolation to anything other than NONE.
This patch attempts to restore this behavior with a different
check. If gimp_matrix_is_simple () returns FALSE, it means that
the transformation requires some form of interpolation, and thus
requires an alpha channel. Flipping and translating do not trigger
a change in the alpha channel, but rotation, shearing, and perspective
transforms do (even if the tool's interpolation is set to NONE).
This commit is contained in:
parent
4ba74177ea
commit
4e1967bf70
1 changed files with 4 additions and 0 deletions
|
@ -1745,6 +1745,10 @@ gimp_layer_real_transform (GimpLayer *layer,
|
||||||
GimpTransformResize clip_result,
|
GimpTransformResize clip_result,
|
||||||
GimpProgress *progress)
|
GimpProgress *progress)
|
||||||
{
|
{
|
||||||
|
if (! gimp_matrix3_is_simple (matrix) &&
|
||||||
|
! gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)))
|
||||||
|
gimp_layer_add_alpha (GIMP_LAYER (layer));
|
||||||
|
|
||||||
GIMP_ITEM_CLASS (parent_class)->transform (GIMP_ITEM (layer),
|
GIMP_ITEM_CLASS (parent_class)->transform (GIMP_ITEM (layer),
|
||||||
context, matrix, direction,
|
context, matrix, direction,
|
||||||
interpolation_type,
|
interpolation_type,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue