[gimp/gimp-2-10] Issue #3949 - Image Map plug-in selects wrong areas



commit 25873aa4df38659698d8663810cd7c271bcd608e
Author: Michael Natterer <mitch gimp org>
Date:   Sat May 2 20:16:04 2020 +0200

    Issue #3949 - Image Map plug-in selects wrong areas
    
    Fix one of the issues spotted by Massimo: in right_intersect() it must
    be "dy > 0" not "dy > y".
    
    (cherry picked from commit 9adf2d19f81ea8eb48c5f40ec3cff68f54832d30)

 plug-ins/imagemap/imap_polygon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plug-ins/imagemap/imap_polygon.c b/plug-ins/imagemap/imap_polygon.c
index 97a6119b2f..6428cd3e75 100644
--- a/plug-ins/imagemap/imap_polygon.c
+++ b/plug-ins/imagemap/imap_polygon.c
@@ -205,7 +205,7 @@ right_intersect(GdkPoint *p1, GdkPoint *p2, gint x, gint y)
    gint dy = p2->y - p1->y;
 
    if ((dy > 0 && y > p1->y && y < p2->y) ||
-       (dy < y && y > p2->y && y < p1->y)) {
+       (dy < 0 && y > p2->y && y < p1->y)) {
       gint sx = p1->x + (y - p1->y) * dx / dy;
       return sx > x;
    }


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