mirror of https://github.com/GNOME/gimp.git
fixed GIMP_CHANNEL_OP_INTERSECT for channels which are smaller than the
2003-08-20 Michael Natterer <mitch@gimp.org> * app/core/gimpimage-mask-select.c (gimp_image_mask_select_channel): fixed GIMP_CHANNEL_OP_INTERSECT for channels which are smaller than the selection (create a temp channel like rect and ellipse select do). Also, don't modify the input channel when feathering.
This commit is contained in:
parent
26d5bd7529
commit
58a3fb2f6a
|
@ -1,3 +1,11 @@
|
|||
2003-08-20 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/gimpimage-mask-select.c
|
||||
(gimp_image_mask_select_channel): fixed GIMP_CHANNEL_OP_INTERSECT
|
||||
for channels which are smaller than the selection (create a temp
|
||||
channel like rect and ellipse select do). Also, don't modify the
|
||||
input channel when feathering.
|
||||
|
||||
2003-08-20 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/gui/preferences-dialog.c
|
||||
|
|
|
@ -283,14 +283,28 @@ gimp_image_mask_select_channel (GimpImage *gimage,
|
|||
else
|
||||
gimp_image_mask_push_undo (gimage, undo_desc);
|
||||
|
||||
if (feather)
|
||||
gimp_channel_feather (channel,
|
||||
feather_radius_x,
|
||||
feather_radius_y,
|
||||
FALSE /* no undo */);
|
||||
if (feather || op == GIMP_CHANNEL_OP_INTERSECT)
|
||||
{
|
||||
GimpChannel *mask;
|
||||
|
||||
gimp_channel_combine_mask (gimp_image_get_mask (gimage), channel,
|
||||
op, offset_x, offset_y);
|
||||
mask = gimp_channel_new_mask (gimage, gimage->width, gimage->height);
|
||||
gimp_channel_combine_mask (mask, channel, GIMP_CHANNEL_OP_ADD,
|
||||
offset_x, offset_y);
|
||||
|
||||
if (feather)
|
||||
gimp_channel_feather (mask,
|
||||
feather_radius_x,
|
||||
feather_radius_y,
|
||||
FALSE /* no undo */);
|
||||
|
||||
gimp_channel_combine_mask (gimp_image_get_mask (gimage), mask, op, 0, 0);
|
||||
g_object_unref (mask);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_channel_combine_mask (gimp_image_get_mask (gimage), channel,
|
||||
op, offset_x, offset_y);
|
||||
}
|
||||
|
||||
gimp_image_mask_changed (gimage);
|
||||
}
|
||||
|
|
|
@ -283,14 +283,28 @@ gimp_image_mask_select_channel (GimpImage *gimage,
|
|||
else
|
||||
gimp_image_mask_push_undo (gimage, undo_desc);
|
||||
|
||||
if (feather)
|
||||
gimp_channel_feather (channel,
|
||||
feather_radius_x,
|
||||
feather_radius_y,
|
||||
FALSE /* no undo */);
|
||||
if (feather || op == GIMP_CHANNEL_OP_INTERSECT)
|
||||
{
|
||||
GimpChannel *mask;
|
||||
|
||||
gimp_channel_combine_mask (gimp_image_get_mask (gimage), channel,
|
||||
op, offset_x, offset_y);
|
||||
mask = gimp_channel_new_mask (gimage, gimage->width, gimage->height);
|
||||
gimp_channel_combine_mask (mask, channel, GIMP_CHANNEL_OP_ADD,
|
||||
offset_x, offset_y);
|
||||
|
||||
if (feather)
|
||||
gimp_channel_feather (mask,
|
||||
feather_radius_x,
|
||||
feather_radius_y,
|
||||
FALSE /* no undo */);
|
||||
|
||||
gimp_channel_combine_mask (gimp_image_get_mask (gimage), mask, op, 0, 0);
|
||||
g_object_unref (mask);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_channel_combine_mask (gimp_image_get_mask (gimage), channel,
|
||||
op, offset_x, offset_y);
|
||||
}
|
||||
|
||||
gimp_image_mask_changed (gimage);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue