[gimp] Bug 760658 - on rotated convas, marching ants are re-drawn incorrectly



commit 359c00a7227491e812fc4827f3361f10b4b2f26c
Author: Michael Natterer <mitch gimp org>
Date:   Sat Jan 16 01:56:57 2016 +0100

    Bug 760658 - on rotated convas, marching ants are re-drawn incorrectly
    
    selection_zoom_segs(): if the canvas is rotated, don't optimize
    segment drawing by clamping it to the canvas widget boundaries.

 app/display/gimpdisplayshell-selection.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-selection.c b/app/display/gimpdisplayshell-selection.c
index 7747581..ee517d6 100644
--- a/app/display/gimpdisplayshell-selection.c
+++ b/app/display/gimpdisplayshell-selection.c
@@ -326,11 +326,14 @@ selection_zoom_segs (Selection          *selection,
 
   for (i = 0; i < n_segs; i++)
     {
-      dest_segs[i].x1 = CLAMP (dest_segs[i].x1, -1, xclamp);
-      dest_segs[i].y1 = CLAMP (dest_segs[i].y1, -1, yclamp);
+      if (! selection->shell->rotate_transform)
+        {
+          dest_segs[i].x1 = CLAMP (dest_segs[i].x1, -1, xclamp);
+          dest_segs[i].y1 = CLAMP (dest_segs[i].y1, -1, yclamp);
 
-      dest_segs[i].x2 = CLAMP (dest_segs[i].x2, -1, xclamp);
-      dest_segs[i].y2 = CLAMP (dest_segs[i].y2, -1, yclamp);
+          dest_segs[i].x2 = CLAMP (dest_segs[i].x2, -1, xclamp);
+          dest_segs[i].y2 = CLAMP (dest_segs[i].y2, -1, yclamp);
+        }
 
       /*  If this segment is a closing segment && the segments lie inside
        *  the region, OR if this is an opening segment and the segments


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