[gimp] Bug 787663 - Cage tool creates artifacts with multi-threading



commit f727e885cdb76f0fda24f2f38f1373f37adc8eec
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Wed Dec 6 19:39:41 2017 +0100

    Bug 787663 - Cage tool creates artifacts with multi-threading
    
    Stop recursion only when all 3 vertices of the triangle are outside the
    roi (left/right or above/below).

 app/operations/gimpoperationcagetransform.c |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/app/operations/gimpoperationcagetransform.c b/app/operations/gimpoperationcagetransform.c
index e951984..a94e553 100644
--- a/app/operations/gimpoperationcagetransform.c
+++ b/app/operations/gimpoperationcagetransform.c
@@ -383,19 +383,19 @@ gimp_operation_cage_transform_interpolate_source_coords_recurs (GimpOperationCag
   GeglRectangle rect = { 0, 0, 1, 1 };
   gint          xmin, xmax, ymin, ymax;
 
-  if (p1_d.x > roi->x + roi->width) return;
-  if (p2_d.x > roi->x + roi->width) return;
-  if (p3_d.x > roi->x + roi->width) return;
-  if (p1_d.y > roi->y + roi->height) return;
-  if (p2_d.y > roi->y + roi->height) return;
-  if (p3_d.y > roi->y + roi->height) return;
-
-  if (p1_d.x <= roi->x) return;
-  if (p2_d.x <= roi->x) return;
-  if (p3_d.x <= roi->x) return;
-  if (p1_d.y <= roi->y) return;
-  if (p2_d.y <= roi->y) return;
-  if (p3_d.y <= roi->y) return;
+  if (p1_d.x >= roi->x + roi->width &&
+      p2_d.x >= roi->x + roi->width &&
+      p3_d.x >= roi->x + roi->width) return;
+  if (p1_d.y >= roi->y + roi->height &&
+      p2_d.y >= roi->y + roi->height &&
+      p3_d.y >= roi->y + roi->height) return;
+
+  if (p1_d.x < roi->x &&
+      p2_d.x < roi->x &&
+      p3_d.x < roi->x) return;
+  if (p1_d.y < roi->y &&
+      p2_d.y < roi->y &&
+      p3_d.y < roi->y) return;
 
   xmin = xmax = p1_d.x;
   ymin = ymax = p1_d.y;


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