"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "app/paint/gimpclone.c" between
gimp-2.10.10.tar.bz2 and gimp-2.10.12.tar.bz2

About: GIMP - The GNU Image Manipulation Program.

gimpclone.c  (gimp-2.10.10.tar.bz2):gimpclone.c  (gimp-2.10.12.tar.bz2)
skipping to change at line 30 skipping to change at line 30
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <gdk-pixbuf/gdk-pixbuf.h> #include <gdk-pixbuf/gdk-pixbuf.h>
#include <gegl.h> #include <gegl.h>
#include "libgimpbase/gimpbase.h" #include "libgimpbase/gimpbase.h"
#include "paint-types.h" #include "paint-types.h"
#include "gegl/gimp-gegl-apply-operation.h"
#include "gegl/gimp-gegl-loops.h" #include "gegl/gimp-gegl-loops.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpdrawable.h" #include "core/gimpdrawable.h"
#include "core/gimpdynamics.h" #include "core/gimpdynamics.h"
#include "core/gimperror.h" #include "core/gimperror.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimppattern.h" #include "core/gimppattern.h"
#include "core/gimppickable.h" #include "core/gimppickable.h"
#include "core/gimpsymmetry.h" #include "core/gimpsymmetry.h"
skipping to change at line 168 skipping to change at line 169
GimpCloneOptions *options = GIMP_CLONE_OPTIONS (paint_options); GimpCloneOptions *options = GIMP_CLONE_OPTIONS (paint_options);
GimpSourceOptions *source_options = GIMP_SOURCE_OPTIONS (paint_options); GimpSourceOptions *source_options = GIMP_SOURCE_OPTIONS (paint_options);
GimpContext *context = GIMP_CONTEXT (paint_options); GimpContext *context = GIMP_CONTEXT (paint_options);
GimpDynamics *dynamics = brush_core->dynamics; GimpDynamics *dynamics = brush_core->dynamics;
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable)) ; GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable)) ;
gdouble fade_point; gdouble fade_point;
gdouble force; gdouble force;
if (gimp_source_core_use_source (source_core, source_options)) if (gimp_source_core_use_source (source_core, source_options))
{ {
gimp_gegl_buffer_copy (src_buffer, if (! op)
GEGL_RECTANGLE (src_rect->x,
src_rect->y,
paint_area_width,
paint_area_height),
GEGL_ABYSS_NONE,
paint_buffer,
GEGL_RECTANGLE (paint_area_offset_x,
paint_area_offset_y,
0, 0));
if (op)
{ {
GeglNode *graph, *source, *target; gimp_gegl_buffer_copy (src_buffer,
GEGL_RECTANGLE (src_rect->x,
graph = gegl_node_new (); src_rect->y,
source = gegl_node_new_child (graph, paint_area_width,
"operation", "gegl:buffer-source", paint_area_height),
"buffer", paint_buffer, GEGL_ABYSS_NONE,
NULL); paint_buffer,
gegl_node_add_child (graph, op); GEGL_RECTANGLE (paint_area_offset_x,
target = gegl_node_new_child (graph, paint_area_offset_y,
"operation", "gegl:write-buffer", 0, 0));
"buffer", paint_buffer, }
NULL); else
{
gegl_node_link_many (source, op, target, NULL); gimp_gegl_apply_operation (src_buffer, NULL, NULL, op,
gegl_node_process (target); paint_buffer,
GEGL_RECTANGLE (paint_area_offset_x,
g_object_unref (graph); paint_area_offset_y,
paint_area_width,
paint_area_height),
FALSE);
} }
} }
else if (options->clone_type == GIMP_CLONE_PATTERN) else if (options->clone_type == GIMP_CLONE_PATTERN)
{ {
GimpPattern *pattern = gimp_context_get_pattern (context); GimpPattern *pattern = gimp_context_get_pattern (context);
GeglBuffer *src_buffer = gimp_pattern_create_buffer (pattern); GeglBuffer *src_buffer = gimp_pattern_create_buffer (pattern);
src_offset_x += gegl_buffer_get_width (src_buffer) / 2; src_offset_x += gegl_buffer_get_width (src_buffer) / 2;
src_offset_y += gegl_buffer_get_height (src_buffer) / 2; src_offset_y += gegl_buffer_get_height (src_buffer) / 2;
skipping to change at line 251 skipping to change at line 245
force, force,
/* In fixed mode, paint incremental so the /* In fixed mode, paint incremental so the
* individual brushes are properly applied * individual brushes are properly applied
* on top of each other. * on top of each other.
* Otherwise the stuff we paint is seamless * Otherwise the stuff we paint is seamless
* and we don't need intermediate masking. * and we don't need intermediate masking.
*/ */
source_options->align_mode == source_options->align_mode ==
GIMP_SOURCE_ALIGN_FIXED ? GIMP_SOURCE_ALIGN_FIXED ?
GIMP_PAINT_INCREMENTAL : GIMP_PAINT_CONSTANT, GIMP_PAINT_INCREMENTAL : GIMP_PAINT_CONSTANT);
NULL);
} }
static gboolean static gboolean
gimp_clone_use_source (GimpSourceCore *source_core, gimp_clone_use_source (GimpSourceCore *source_core,
GimpSourceOptions *options) GimpSourceOptions *options)
{ {
return GIMP_CLONE_OPTIONS (options)->clone_type == GIMP_CLONE_IMAGE; return GIMP_CLONE_OPTIONS (options)->clone_type == GIMP_CLONE_IMAGE;
} }
 End of changes. 4 change blocks. 
30 lines changed or deleted 23 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)