[gegl] warp: fix the behaviour for selections.



commit 9a70958839e641845c868a577ccac745db934027
Author: Simon Budig <simon budig de>
Date:   Fri Sep 30 11:14:49 2016 +0200

    warp: fix the behaviour for selections.
    
    Thanks to Massimo for pointing this out. Fixes bug #772163

 operations/common/warp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/operations/common/warp.c b/operations/common/warp.c
index b6dad10..a165ffd 100644
--- a/operations/common/warp.c
+++ b/operations/common/warp.c
@@ -353,8 +353,8 @@ stamp (GeglProperties          *o,
               continue;
             }
 
-          srcptr = srcbuf + (area.y + y_iter + dy) * buf_rowstride +
-                            (area.x + x_iter + dx) * 2;
+          srcptr = srcbuf + (area.y - src_extent->y + y_iter + dy) * buf_rowstride +
+                            (area.x - src_extent->x + x_iter + dx) * 2;
 
           if (o->behavior == GEGL_WARP_BEHAVIOR_ERASE)
             {


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