Commit 3c0787e4 authored by Ell's avatar Ell

app: use gimp_transform_polygon() in gimp_transform_resize_boundary()

... so that the transformed boundary is properly clipped.

Adjust the boundary-size algorithms to operate on arbitrary
polygons.

Avoid using gimp_matrix3_will_explode() in
gimp_drawable_transform_buffer_affine() and falling back to
cropping the result, and avoid setting the "clip-to-input" property
of gegl:transform.  Neither of those in needed anymore.

This effectively reverts the app/ part of commit
768d0661.  The next commit revets
the libgimpmath/ part.
parent 258e60f1
This diff is collapsed.
......@@ -116,9 +116,6 @@ gimp_drawable_transform_buffer_affine (GimpDrawable *drawable,
! babl_format_has_alpha (gegl_buffer_get_format (orig_buffer)))
clip_result = GIMP_TRANSFORM_RESIZE_CLIP;
if (gimp_matrix3_will_explode (&m, u1, v1, u2, v2))
clip_result = GIMP_TRANSFORM_RESIZE_CLIP;
/* Find the bounding coordinates of target */
gimp_transform_resize_boundary (&m, clip_result,
u1, v1, u2, v2,
......@@ -136,7 +133,6 @@ gimp_drawable_transform_buffer_affine (GimpDrawable *drawable,
gimp_gegl_apply_transform (orig_buffer, progress, NULL,
new_buffer,
interpolation_type,
clip_result,
&gegl_matrix);
*new_offset_x = x1;
......
......@@ -697,22 +697,17 @@ gimp_gegl_apply_transform (GeglBuffer *src_buffer,
const gchar *undo_desc,
GeglBuffer *dest_buffer,
GimpInterpolationType interpolation_type,
GimpTransformResize clip_result,
GimpMatrix3 *transform)
{
GeglNode *node;
gboolean clip_to_input;
g_return_if_fail (GEGL_IS_BUFFER (src_buffer));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
g_return_if_fail (GEGL_IS_BUFFER (dest_buffer));
clip_to_input = (clip_result == GIMP_TRANSFORM_RESIZE_CLIP);
node = gegl_node_new_child (NULL,
"operation", "gegl:transform",
"sampler", interpolation_type,
"clip-to-input", clip_to_input,
"operation", "gegl:transform",
"sampler", interpolation_type,
NULL);
gimp_gegl_node_set_matrix (node, transform);
......
......@@ -154,7 +154,6 @@ void gimp_gegl_apply_transform (GeglBuffer *src_buffer,
const gchar *undo_desc,
GeglBuffer *dest_buffer,
GimpInterpolationType interpolation_type,
GimpTransformResize clip_result,
GimpMatrix3 *transform);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment