diff -uNr gimp-2.2.17/app/paint/gimpink2.c gimp-2.2.17-gpen-work/app/paint/gimpink2.c
--- gimp-2.2.17/app/paint/gimpink2.c	2007-08-17 02:17:38.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/paint/gimpink2.c	2007-08-18 22:00:51.000000000 +0900
@@ -93,7 +93,7 @@
                                           PixelRegion      *dest);
 
 static void	hist_init (GimpInk2 *ink, GimpCoords* coords);
-static void     hist_add  (GimpInk2 *ink, GimpCoords* coords);
+static void     hist_add  (GimpInk2 *ink, GimpCoords* coords, gdouble speed);
 static GimpCoords     hist_result  (GimpInk2 *ink, GimpInk2Options *options);
 static GimpCoords     hist_result_velocity  (GimpInk2 *ink, GimpInk2Options *options);
 
@@ -353,11 +353,25 @@
 
       if (!at_last && options->compensation_hist_size > 1) 
         {
-          hist_add(ink, &paint_core->cur_coords);
+          hist_add(ink, &paint_core->cur_coords, velocity);
           average_hist = hist_result(ink, options);
-//        average_velocity = hist_result_velocity(ink, options);
-//        g_printf("dist_x=%f(avg=%f), dist_y=%f(avg=%f)\n", paint_core->cur_coords.x - paint_core->last_coords.x, average_hist.x, paint_core->cur_coords.y - paint_core->last_coords.y, average_hist.y);
-
+/*
+          if (options->compensation_rate_temperature > 0) 
+            {
+              gdouble rate;
+              gdouble dist2 = sqrt ( (paint_core->cur_coords.x - average_hist.x) *
+                                     (paint_core->cur_coords.x - average_hist.x) +
+                                     (paint_core->cur_coords.y - average_hist.y) *
+                                     (paint_core->cur_coords.y - average_hist.y));
+              gdouble dist3 = sqrt ( (paint_core->cur_coords.x - ink->last_point.x) *
+                                     (paint_core->cur_coords.x - ink->last_point.x) +
+                                     (paint_core->cur_coords.y - ink->last_point.y) *
+                                     (paint_core->cur_coords.y - ink->last_point.y));
+              rate = 1 / (1 + exp(-dist2 / options->compensation_rate_temperature + 0.5 * options->compensation_rate_temperature));
+              average_hist.x = paint_core->cur_coords.x * rate + average_hist.x * (1 - rate);
+              average_hist.y = paint_core->cur_coords.y * rate + average_hist.y * (1 - rate);
+           }
+*/          
           blob = ink2_pen_ellipse (options,
                                   average_hist.x,
                                   average_hist.y,
@@ -365,6 +379,7 @@
                                   paint_core->cur_coords.xtilt,
                                   paint_core->cur_coords.ytilt,
                                   velocity);
+          ink->last_point = average_hist;
         }
       else
         {
@@ -375,7 +390,7 @@
                                   paint_core->cur_coords.xtilt,
                                   paint_core->cur_coords.ytilt,
                                   velocity);
-         }
+        }
 
       blob_union = blob_convex_union (ink->last_blob, blob);
       g_free (ink->last_blob);
@@ -638,23 +653,27 @@
   ink->hist_index = 0;
   ink->hist_count = 0;
   if (coords)
-    hist_add(ink, coords);
+    hist_add(ink, coords, 0);
 }
 
 
 #define HIST_IGNORE_THRESHOULD 0.0001
 static void
-hist_add(GimpInk2 *ink, GimpCoords* coords)
+hist_add(GimpInk2 *ink, GimpCoords* coords, gdouble speed)
 {
+  gdouble dist = 0;
   if (coords) {
     if (ink->hist_count > 0) {
       gint prev_index = (ink->hist_index + INK2_HISTORY_BUFFER - 1) % INK2_HISTORY_BUFFER;
       gdouble dist_x = coords->x - ink->hist_buffer[prev_index].x;
       gdouble dist_y = coords->y - ink->hist_buffer[prev_index].y;
-      if (sqrt(dist_x * dist_x + dist_y * dist_y) < HIST_IGNORE_THRESHOULD)
+      dist = sqrt(dist_x * dist_x + dist_y * dist_y);
+      if (dist < HIST_IGNORE_THRESHOULD)
         return;
     }
-    ink->hist_buffer[ink->hist_index++] = *coords;
+    ink->hist_buffer[ink->hist_index] = *coords;
+    ink->hist_dist_buffer[ink->hist_index] = speed;
+    ink->hist_index ++;
 
     if (ink->hist_count < INK2_HISTORY_BUFFER)
       ink->hist_count ++;
@@ -672,17 +691,27 @@
   gint i;
   GimpCoords result;
   result.x = result.y = 0.0;
+  gdouble scale_sum = 0.0;
   if (ink->hist_count > 0) {
     gint max_hist_count = min(ink->hist_count , options->compensation_hist_size);
     gint cur_index = (ink->hist_index + INK2_HISTORY_BUFFER - max_hist_count) % INK2_HISTORY_BUFFER; 
     for (i = 0; i < max_hist_count; i ++, cur_index ++) {
+      gdouble rate = 0;
       if (cur_index == INK2_HISTORY_BUFFER)
         cur_index = 0;
+
+      if (options->compensation_rate_temperature != 0) 
+        rate = 1 / (1 + exp(ink->hist_dist_buffer[cur_index] / options->compensation_rate_temperature - 5));
+      scale_sum *= rate;
+      result.x *= rate;
+      result.y *= rate;
+
+      scale_sum += 1.0;
       result.x += ink->hist_buffer[cur_index].x;
       result.y += ink->hist_buffer[cur_index].y;
     }
-    result.x /= max_hist_count;
-    result.y /= max_hist_count;
+    result.x /= scale_sum;
+    result.y /= scale_sum;
   }
   return result;
 }
diff -uNr gimp-2.2.17/app/paint/gimpink2.h gimp-2.2.17-gpen-work/app/paint/gimpink2.h
--- gimp-2.2.17/app/paint/gimpink2.h	2007-08-17 02:17:38.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/paint/gimpink2.h	2007-08-18 19:06:38.000000000 +0900
@@ -58,11 +58,12 @@
   gint           ts_index;
 
   GimpCoords	hist_buffer[INK2_HISTORY_BUFFER];
+  gdouble       hist_dist_buffer[INK2_HISTORY_BUFFER];
   gint		hist_index;
   gint		hist_count;
   
   gdouble        last_time;     /*  previous time of a motion event      */
-  
+  GimpCoords     last_point;    /*  last compensated position */ 
   gboolean       init_velocity;
 };
 
diff -uNr gimp-2.2.17/app/paint/gimpink2options.c gimp-2.2.17-gpen-work/app/paint/gimpink2options.c
--- gimp-2.2.17/app/paint/gimpink2options.c	2007-08-17 02:17:38.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/paint/gimpink2options.c	2007-08-18 22:32:15.000000000 +0900
@@ -47,7 +47,8 @@
   PROP_BLOB_ASPECT,
   PROP_BLOB_ANGLE,
   PROP_COMPENSATION_HIST_SIZE,
-  PROP_COMPENSATE_AT_LAST
+  PROP_COMPENSATE_AT_LAST,
+  PROP_COMPENSATION_RATE_TEMPERATURE
 };
 
 
@@ -141,11 +142,15 @@
                                    0);
   GIMP_CONFIG_INSTALL_PROP_INT    (object_class, PROP_COMPENSATION_HIST_SIZE,
 				   "compensation-history-size", NULL,
-				   1, INK2_HISTORY_BUFFER, INK2_HISTORY_BUFFER, 0);
+				   1, INK2_HISTORY_BUFFER, MIN(15, INK2_HISTORY_BUFFER), 0);
   GIMP_CONFIG_INSTALL_PROP_BOOLEAN(object_class, PROP_COMPENSATE_AT_LAST,
 				   "compensate-at-last", NULL,
-				   TRUE, 0);
-}
+				   FALSE, 0);
+  GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_COMPENSATION_RATE_TEMPERATURE,
+                                   "compensation-rate-temperature", NULL,
+                                   0.0, 100, 2.5,
+                                   0);
+ }
 
 static void
 gimp_ink2_options_set_property (GObject      *object,
@@ -187,6 +192,9 @@
     case PROP_COMPENSATE_AT_LAST:
       options->compensate_at_last = g_value_get_boolean (value);
       break;
+    case PROP_COMPENSATION_RATE_TEMPERATURE:
+      options->compensation_rate_temperature = g_value_get_double (value);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
@@ -233,6 +241,9 @@
     case PROP_COMPENSATE_AT_LAST:
       g_value_set_boolean (value, options->compensate_at_last);
       break;
+    case PROP_COMPENSATION_RATE_TEMPERATURE:
+      g_value_set_double (value, options->compensation_rate_temperature);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
diff -uNr gimp-2.2.17/app/paint/gimpink2options.h gimp-2.2.17-gpen-work/app/paint/gimpink2options.h
--- gimp-2.2.17/app/paint/gimpink2options.h	2007-08-17 02:17:38.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/paint/gimpink2options.h	2007-08-18 16:23:37.000000000 +0900
@@ -51,6 +51,7 @@
 
   gint              compensation_hist_size;
   gboolean          compensate_at_last;
+  gdouble	    compensation_rate_temperature;
 };
 
 
バイナリー・ファイルgimp-2.2.17/app/tools/.gimpinktool2.c.swpとgimp-2.2.17-gpen-work/app/tools/.gimpinktool2.c.swpは違います
diff -uNr gimp-2.2.17/app/tools/gimpink2options-gui.c gimp-2.2.17-gpen-work/app/tools/gimpink2options-gui.c
--- gimp-2.2.17/app/tools/gimpink2options-gui.c	2007-08-17 02:17:38.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/tools/gimpink2options-gui.c	2007-08-18 21:57:45.000000000 +0900
@@ -123,18 +123,27 @@
   gtk_container_add (GTK_CONTAINER (compensate_box), compensate_vbox);
   gtk_widget_show (compensate_vbox);
 
-  table = gtk_table_new (2, 3, FALSE);
+  table = gtk_table_new (3, 3, FALSE);
   gtk_table_set_col_spacings (GTK_TABLE (table), 2);
   gtk_box_pack_start (GTK_VBOX (compensate_vbox), table, TRUE, TRUE, 0);
   gtk_widget_show (table);
+
   /* compensation history size slider */
   gimp_prop_scale_entry_new (config, "compensation-history-size",
                              GTK_TABLE (table), 0, 0,
-                             _("History:"),
+                             _("Quality:"),
                              1, 1, 0,
                              FALSE, 1.0, INK2_HISTORY_BUFFER);
 
- checkbox = 
+  /* pointer tracking rate slider */
+  adj = gimp_prop_scale_entry_new (config, "compensation-rate-temperature",
+                             GTK_TABLE (table), 0, 1,
+                             _("Rate:"),
+                             1, 10, 1,
+                             FALSE, 0, 100);
+  gimp_scale_entry_set_logarithmic (adj, TRUE);
+
+  checkbox = 
     gimp_prop_check_button_new (config, "compensate-at-last",
                                _("Draw pen line to finished point:"));
   gtk_box_pack_start (GTK_VBOX (compensate_vbox), checkbox, FALSE, FALSE, 0);
