gimp r28009 - in trunk: . app/display
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r28009 - in trunk: . app/display
- Date: Tue, 10 Feb 2009 19:45:38 +0000 (UTC)
Author: neo
Date: Tue Feb 10 19:45:37 2009
New Revision: 28009
URL: http://svn.gnome.org/viewvc/gimp?rev=28009&view=rev
Log:
2009-02-10 Sven Neumann <sven gimp org>
* app/display/gimpdisplayshell-coords.c
(gimp_display_shell_eval_event): applied patch from Alexia Death
that introduces smoothing for the stroke direction (bug
#520078).
Modified:
trunk/ChangeLog
trunk/app/display/gimpdisplayshell-coords.c
Modified: trunk/app/display/gimpdisplayshell-coords.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-coords.c (original)
+++ trunk/app/display/gimpdisplayshell-coords.c Tue Feb 10 19:45:37 2009
@@ -224,7 +224,6 @@
gdouble delta_y = 0.0;
gdouble distance = 1.0;
gboolean event_fill = (inertia_factor > 0);
- gint i;
/* Smoothing causes problems with cursor tracking
* when zoomed above screen resolution so we need to supress it.
@@ -245,6 +244,7 @@
{
gdouble filter;
gdouble dist;
+ gdouble delta_dir;
delta_x = shell->last_coords.x - coords->x;
delta_y = shell->last_coords.y - coords->y;
@@ -292,7 +292,7 @@
coords->velocity = MIN (coords->velocity, 1.0);
}
- if (delta_x == 0)
+ if (delta_x == 0.0)
{
coords->direction = shell->last_coords.direction;
}
@@ -303,6 +303,14 @@
coords->direction = coords->direction + 0.5;
}
+ delta_dir = coords->direction - shell->last_coords.direction;
+ if ((fabs (delta_dir) > 0.5) && (delta_dir < 0.0))
+ coords->direction = 0.3 * coords->direction + 0.7 * (shell->last_coords.direction - 1.0);
+ else if ((fabs (delta_dir) > 0.5) && (delta_dir > 0.0))
+ coords->direction = 0.3 * coords->direction + 0.7 * (shell->last_coords.direction + 1.0);
+ else
+ coords->direction = 0.3 * coords->direction + 0.7 * shell->last_coords.direction;
+
/* High speed -> less smooth*/
inertia_factor *= (1 - coords->velocity);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]