mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
app: review and fix previous commit.
* Do not force-clip effects with a mask. Otherwise when adding a filter, it initially renders fine (and can cross its input extents), but once applied, it's suddenly clipped. That's not what we want. * Fix gimp_filter_stack_get_bounding_box() computation. * Fix the crop_before area when there was a selection. We have in fact to start at 0×0 on input and only use width×height dimensions.
This commit is contained in:
parent
59b7b6a5fb
commit
d41660136e
2 changed files with 6 additions and 14 deletions
|
@ -988,14 +988,6 @@ gimp_drawable_filter_sync_clip (GimpDrawableFilter *filter,
|
|||
else
|
||||
clip = gimp_item_get_clip (GIMP_ITEM (filter->drawable), filter->clip);
|
||||
|
||||
if (! clip)
|
||||
{
|
||||
GimpChannel *mask = GIMP_CHANNEL (filter->mask);
|
||||
|
||||
if (mask && ! gimp_channel_is_empty (mask))
|
||||
clip = TRUE;
|
||||
}
|
||||
|
||||
if (! clip)
|
||||
{
|
||||
GeglRectangle bounding_box;
|
||||
|
@ -1040,8 +1032,8 @@ gimp_drawable_filter_sync_region (GimpDrawableFilter *filter)
|
|||
NULL);
|
||||
|
||||
gegl_node_set (filter->crop_before,
|
||||
"x", (gdouble) rect.x,
|
||||
"y", (gdouble) rect.y,
|
||||
"x", 0.0,
|
||||
"y", 0.0,
|
||||
"width", (gdouble) rect.width,
|
||||
"height", (gdouble) rect.height,
|
||||
NULL);
|
||||
|
|
|
@ -248,11 +248,11 @@ gimp_filter_stack_get_bounding_box (GimpFilterStack *stack,
|
|||
if (rect->y > current_rect.y)
|
||||
rect->y = current_rect.y;
|
||||
|
||||
if (rect->width < (current_rect.width - current_rect.x))
|
||||
rect->width = (current_rect.width - current_rect.x);
|
||||
if (rect->x + rect->width < current_rect.x + current_rect.width)
|
||||
rect->width = (current_rect.x + current_rect.width - rect->x);
|
||||
|
||||
if (rect->height < (current_rect.height - current_rect.y))
|
||||
rect->height = (current_rect.height - current_rect.y);
|
||||
if (rect->y + rect->height < current_rect.y + current_rect.height)
|
||||
rect->height = (current_rect.y + current_rect.height - rect->y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue