[gthumb] curve editor: consider only the x coordinate to select the point
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] curve editor: consider only the x coordinate to select the point
- Date: Sun, 25 Jan 2015 12:05:42 +0000 (UTC)
commit fe652c3d86eb77aad9d851d0f5c8810bcc35bb1e
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Jan 7 12:33:51 2015 +0100
curve editor: consider only the x coordinate to select the point
extensions/file_tools/gth-curve-editor.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/extensions/file_tools/gth-curve-editor.c b/extensions/file_tools/gth-curve-editor.c
index 5fffe24..a8a7d06 100644
--- a/extensions/file_tools/gth-curve-editor.c
+++ b/extensions/file_tools/gth-curve-editor.c
@@ -580,7 +580,8 @@ gth_curve_editor_get_nearest_point (GthCurveEditor *self,
GthPoint *q = &points->p[i];
double d;
- d = sqrt (SQR (q->x - p->x) + SQR (q->y - p->y));
+ d = q->x - p->x;
+ d = ABS (d);
if ((d < POINT_ATTRACTION_THRESHOLD) && ((*n == -1) || (d < min))) {
min = d;
*n = i;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]