[gimp/goat-invasion: 337/412] app: fix buffer copying offsets in gimp_clone_motion()



commit 3dcacdd3cb9873b32cc7dd9100a049a07fc0d7ca
Author: Michael Natterer <mitch gimp org>
Date:   Fri Mar 30 23:42:23 2012 +0200

    app: fix buffer copying offsets in gimp_clone_motion()
    
    so it works again at the image's borders.

 app/paint/gimpclone.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/app/paint/gimpclone.c b/app/paint/gimpclone.c
index efbe8d2..4abe8da 100644
--- a/app/paint/gimpclone.c
+++ b/app/paint/gimpclone.c
@@ -175,17 +175,21 @@ gimp_clone_motion (GimpSourceCore   *source_core,
         dest_buffer =
           gegl_buffer_linear_new_from_data (temp_buf_get_data (paint_area),
                                             gimp_drawable_get_format_with_alpha (drawable),
-                                            GIMP_GEGL_RECT (paint_area_offset_x, paint_area_offset_y,
-                                                            paint_area_width, paint_area_height),
+                                            GIMP_GEGL_RECT (0, 0,
+                                                            paint_area->width,
+                                                            paint_area->height),
                                             paint_area->width *
                                             paint_area->bytes,
                                             NULL, NULL);
 
         gegl_buffer_copy (src_buffer,
                           GIMP_GEGL_RECT (0, 0,
-                                          paint_area_width, paint_area_height),
+                                          paint_area_width,
+                                          paint_area_height),
                           dest_buffer,
-                          NULL);
+                          GIMP_GEGL_RECT (paint_area_offset_x,
+                                          paint_area_offset_y,
+                                          0, 0));
 
         g_object_unref (dest_buffer);
       }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]