mirror of https://github.com/GNOME/gimp.git
app: use variable buffer length for a more stable direction
This commit is contained in:
parent
2a7dbbd438
commit
7c00dcd71d
|
@ -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)) &&
|
||||
|
|
Loading…
Reference in New Issue