Issue #886 - Artifacts symmetry painting with big brushes

In GimpClone and GimpHeal, use gimp_gegl_apply_operation(), instead
of gegl_node_process(), to apply the symmetry transform, which both
performs chunking and avoids aliasing problems.
This commit is contained in:
Ell
2019-05-27 11:07:20 -04:00
parent 1e07f00a95
commit 024bc4cd3f
2 changed files with 7 additions and 34 deletions

View File

@ -27,6 +27,7 @@
#include "paint-types.h"
#include "gegl/gimp-gegl-apply-operation.h"
#include "gegl/gimp-gegl-loops.h"
#include "core/gimp.h"
@ -178,25 +179,11 @@ gimp_clone_motion (GimpSourceCore *source_core,
GEGL_RECTANGLE (paint_area_offset_x,
paint_area_offset_y,
0, 0));
if (op)
{
GeglNode *graph, *source, *target;
graph = gegl_node_new ();
source = gegl_node_new_child (graph,
"operation", "gegl:buffer-source",
"buffer", paint_buffer,
NULL);
gegl_node_add_child (graph, op);
target = gegl_node_new_child (graph,
"operation", "gegl:write-buffer",
"buffer", paint_buffer,
NULL);
gegl_node_link_many (source, op, target, NULL);
gegl_node_process (target);
g_object_unref (graph);
gimp_gegl_apply_operation (paint_buffer, NULL, NULL, op,
paint_buffer, NULL, FALSE);
}
}
else if (options->clone_type == GIMP_CLONE_PATTERN)

View File

@ -32,6 +32,7 @@
#include "paint-types.h"
#include "gegl/gimp-gegl-apply-operation.h"
#include "gegl/gimp-gegl-loops.h"
#include "core/gimpbrush.h"
@ -611,23 +612,8 @@ gimp_heal_motion (GimpSourceCore *source_core,
if (op)
{
GeglNode *graph, *source, *target;
graph = gegl_node_new ();
source = gegl_node_new_child (graph,
"operation", "gegl:buffer-source",
"buffer", src_copy,
NULL);
gegl_node_add_child (graph, op);
target = gegl_node_new_child (graph,
"operation", "gegl:write-buffer",
"buffer", src_copy,
NULL);
gegl_node_link_many (source, op, target, NULL);
gegl_node_process (target);
g_object_unref (graph);
gimp_gegl_apply_operation (src_copy, NULL, NULL, op,
src_copy, NULL, FALSE);
}
gimp_heal (src_copy,