[gimp] app: use variable buffer length for a more stable direction
- From: Alexia Death <alexiade src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: use variable buffer length for a more stable direction
- Date: Mon, 17 Nov 2014 19:38:04 +0000 (UTC)
commit 7c00dcd71d5714f656a6144a7f11ed18b6edcb20
Author: Alexia Death <alexiadeath gmail com>
Date: Mon Nov 17 21:35:38 2014 +0200
app: use variable buffer length for a more stable direction
app/display/gimpmotionbuffer.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/display/gimpmotionbuffer.c b/app/display/gimpmotionbuffer.c
index f687560..ac59f5b 100644
--- a/app/display/gimpmotionbuffer.c
+++ b/app/display/gimpmotionbuffer.c
@@ -36,7 +36,7 @@
/* Velocity unit is screen pixels per millisecond we pass to tools as 1. */
#define VELOCITY_UNIT 3.0
#define EVENT_FILL_PRECISION 6.0
-#define DIRECTION_RADIUS (1.5 / MAX (scale_x, scale_y))
+#define DIRECTION_RADIUS (1.0 / MAX (scale_x, scale_y))
#define SMOOTH_FACTOR 0.3
@@ -343,7 +343,7 @@ gimp_motion_buffer_motion_event (GimpMotionBuffer *buffer,
}
else
{
- gint x = 3;
+ gint x = CLAMP ((buffer->event_history->len - 1), 3, 15);
while (((fabs (dir_delta_x) < DIRECTION_RADIUS) ||
(fabs (dir_delta_y) < DIRECTION_RADIUS)) &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]