[gimp] Issue #3949 - Image Map plug-in selects wrong areas
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Issue #3949 - Image Map plug-in selects wrong areas
- Date: Sat, 2 May 2020 18:17:33 +0000 (UTC)
commit 9adf2d19f81ea8eb48c5f40ec3cff68f54832d30
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".
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 4b7d5addd2..17b6e3ec13 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]