gimp r26261 - trunk/app/core



Author: simon
Date: Mon Jul 21 19:39:35 2008
New Revision: 26261
URL: http://svn.gnome.org/viewvc/gimp?rev=26261&view=rev

Log:
2008-07-21  Simon Budig  <simon gimp org>

	* app/core/gimpcoords.c: incorporate the velocity.



Modified:
   trunk/app/core/gimpcoords.c

Modified: trunk/app/core/gimpcoords.c
==============================================================================
--- trunk/app/core/gimpcoords.c	(original)
+++ trunk/app/core/gimpcoords.c	Mon Jul 21 19:39:35 2008
@@ -120,7 +120,8 @@
           a->pressure * b->pressure +
           a->xtilt    * b->xtilt    +
           a->ytilt    * b->ytilt    +
-          a->wheel    * b->wheel);
+          a->wheel    * b->wheel    +
+          a->velocity * a->velocity);
 }
 
 
@@ -141,6 +142,7 @@
   upscaled_a.xtilt    = a->xtilt    * INPUT_RESOLUTION;
   upscaled_a.ytilt    = a->ytilt    * INPUT_RESOLUTION;
   upscaled_a.wheel    = a->wheel    * INPUT_RESOLUTION;
+  upscaled_a.velocity = a->velocity * INPUT_RESOLUTION;
 
   return gimp_coords_scalarprod (&upscaled_a, &upscaled_a);
 }
@@ -167,6 +169,7 @@
   dist += ABS (a->xtilt - b->xtilt);
   dist += ABS (a->ytilt - b->ytilt);
   dist += ABS (a->wheel - b->wheel);
+  dist += ABS (a->velocity - b->velocity);
 
   dist *= INPUT_RESOLUTION;
 
@@ -185,5 +188,6 @@
           a->pressure == b->pressure &&
              a->xtilt == b->xtilt    &&
              a->ytilt == b->ytilt    &&
-             a->wheel == b->wheel);
+             a->wheel == b->wheel    &&
+          a->velocity == b->velocity);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]