diff -uNr gimp-2.2.17/app/paint/Makefile.in gimp-2.2.17-gpen-work/app/paint/Makefile.in
--- gimp-2.2.17/app/paint/Makefile.in	2007-10-08 18:46:24.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/paint/Makefile.in	2007-10-08 00:26:25.000000000 +0900
@@ -64,7 +64,8 @@
 	gimppencil.$(OBJEXT) gimppenciloptions.$(OBJEXT) \
 	gimppaintbrush.$(OBJEXT) gimpsmudge.$(OBJEXT) \
 	gimpsmudgeoptions.$(OBJEXT) \
-	gimpink2.$(OBJEXT) gimpink2options.$(OBJEXT) gimpink2-undo.$(OBJEXT)
+	gimpink2.$(OBJEXT) gimpink2options.$(OBJEXT) gimpink2-undo.$(OBJEXT) \
+	gimpmixbrush.$(OBJEXT) gimpmixbrushoptions.$(OBJEXT)
 am_libapppaint_a_OBJECTS = $(am__objects_1) $(am__objects_2)
 libapppaint_a_OBJECTS = $(am_libapppaint_a_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
diff -uNr gimp-2.2.17/app/paint/gimp-paint.c gimp-2.2.17-gpen-work/app/paint/gimp-paint.c
--- gimp-2.2.17/app/paint/gimp-paint.c	2007-10-08 18:46:24.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/paint/gimp-paint.c	2007-10-08 00:53:25.000000000 +0900
@@ -38,6 +38,7 @@
 #include "gimppencil.h"
 #include "gimpsmudge.h"
 #include "gimpink2.h"
+#include "gimpmixbrush.h"
 
 
 /*  local function prototypes  */
@@ -64,7 +65,8 @@
     gimp_eraser_register,
     gimp_paintbrush_register,
     gimp_pencil_register,
-    gimp_ink2_register
+    gimp_ink2_register,
+    gimp_mixbrush_register
   };
 
   gint i;
diff -uNr gimp-2.2.17/app/paint/gimpmixbrush.c gimp-2.2.17-gpen-work/app/paint/gimpmixbrush.c
--- gimp-2.2.17/app/paint/gimpmixbrush.c	1970-01-01 09:00:00.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/paint/gimpmixbrush.c	2007-10-08 16:53:14.000000000 +0900
@@ -0,0 +1,310 @@
+/* The GIMP -- an image manipulation program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include "libgimpcolor/gimpcolor.h"
+
+#include "paint-types.h"
+
+#include "base/temp-buf.h"
+
+#include "paint-funcs/paint-funcs.h"
+
+#include "core/gimp.h"
+#include "core/gimpbrush.h"
+#include "core/gimpdrawable.h"
+#include "core/gimpgradient.h"
+#include "core/gimpimage.h"
+#include "core/gimppickable.h"
+
+#include "gimpmixbrush.h"
+#include "gimpmixbrushoptions.h"
+
+#include "gimp-intl.h"
+
+
+static void       gimp_mixbrush_class_init (GimpMixbrushClass *klass);
+static void       gimp_mixbrush_init       (GimpMixbrush      *mixbrush);
+
+static void       gimp_mixbrush_finalize   (GObject           *object);
+
+static void       gimp_mixbrush_start      (GimpPaintCore     *paint_core,
+                                            GimpDrawable      *drawable,
+                                            GimpPaintOptions  *paint_options);
+
+static void       gimp_mixbrush_paint      (GimpPaintCore     *paint_core,
+                                            GimpDrawable      *drawable,
+                                            GimpPaintOptions  *paint_options,
+                                            GimpPaintState     paint_state,
+                                            guint32            time);
+
+static void       gimp_mixbrush_motion     (GimpPaintCore     *paint_core,
+                                            GimpDrawable      *drawable,
+                                            GimpPaintOptions  *paint_options);
+static void       _gimp_mixbrush_motion    (GimpPaintCore     *paint_core,
+                                            GimpDrawable      *drawable,
+                                            GimpPaintOptions  *paint_options,
+					    gdouble           opacity);
+
+
+static GimpPaintbrushClass *parent_class = NULL;
+
+
+void
+gimp_mixbrush_register (Gimp                      *gimp,
+                        GimpPaintRegisterCallback  callback)
+{
+  (* callback) (gimp,
+                GIMP_TYPE_MIXBRUSH,
+                GIMP_TYPE_MIXBRUSH_OPTIONS,
+                _("Mixbrush"));
+}
+
+GType
+gimp_mixbrush_get_type (void)
+{
+  static GType type = 0;
+
+  if (! type)
+    {
+      static const GTypeInfo info =
+      {
+        sizeof (GimpMixbrushClass),
+        (GBaseInitFunc) NULL,
+        (GBaseFinalizeFunc) NULL,
+        (GClassInitFunc) gimp_mixbrush_class_init,
+        NULL,           /* class_finalize */
+        NULL,           /* class_data     */
+        sizeof (GimpMixbrush),
+        0,              /* n_preallocs    */
+        (GInstanceInitFunc) gimp_mixbrush_init,
+      };
+
+      type = g_type_register_static (GIMP_TYPE_PAINTBRUSH,
+                                     "GimpMixbrush",
+                                     &info, 0);
+    }
+
+  return type;
+}
+
+static void
+gimp_mixbrush_class_init (GimpMixbrushClass *klass)
+{
+  GObjectClass       *object_class     = G_OBJECT_CLASS (klass);
+  GimpPaintCoreClass *paint_core_class = GIMP_PAINT_CORE_CLASS (klass);
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  object_class->finalize  = gimp_mixbrush_finalize;
+
+  paint_core_class->paint = gimp_mixbrush_paint;
+}
+
+static void
+gimp_mixbrush_init (GimpMixbrush *mixbrush)
+{
+}
+
+static void
+gimp_mixbrush_finalize (GObject *object)
+{
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gimp_mixbrush_paint (GimpPaintCore    *paint_core,
+                     GimpDrawable     *drawable,
+                     GimpPaintOptions *paint_options,
+                     GimpPaintState    paint_state,
+                     guint32           time)
+{
+  //GimpMixbrush        *mixbrush = GIMP_MIXBRUSH (paint_core);
+  //  GimpMixbrushOptions *options  = GIMP_MIXBRUSH_OPTIONS (paint_options);
+
+  switch (paint_state)
+    {
+    case GIMP_PAINT_STATE_INIT:
+      gimp_mixbrush_start(paint_core, drawable, paint_options);
+      GIMP_PAINT_CORE_CLASS (parent_class)->paint (paint_core, drawable,
+                                                   paint_options,
+                                                   paint_state, time);
+      break;
+
+    case GIMP_PAINT_STATE_MOTION:
+
+      gimp_mixbrush_motion (paint_core, drawable, paint_options);
+
+      break;
+
+    case GIMP_PAINT_STATE_FINISH:
+
+      GIMP_PAINT_CORE_CLASS (parent_class)->paint (paint_core, drawable,
+                                                   paint_options,
+                                                   paint_state, time);
+      break;
+    }
+}
+
+
+static void
+gimp_mixbrush_start (GimpPaintCore     *paint_core,
+                      GimpDrawable     *drawable,
+                      GimpPaintOptions *paint_options)
+{
+  GimpContext              *context    = GIMP_CONTEXT (paint_options);
+  GimpImage                *gimage;
+  guchar                   *color = GIMP_MIXBRUSH(paint_core)->color;
+
+  gimage = gimp_item_get_image (GIMP_ITEM (drawable));
+  gimp_image_get_foreground (gimage, drawable, context, color);
+}
+
+
+static void
+gimp_mixbrush_motion (GimpPaintCore    *paint_core,
+                      GimpDrawable     *drawable,
+                      GimpPaintOptions *paint_options)
+{
+  _gimp_mixbrush_motion (paint_core, drawable, paint_options, GIMP_OPACITY_OPAQUE);
+}
+
+
+inline static void
+_gimp_mixbrush_motion (GimpPaintCore    *paint_core,
+                         GimpDrawable     *drawable,
+                         GimpPaintOptions *paint_options,
+                         gdouble           opacity)
+{
+  GimpBrushCore        *brush_core       = GIMP_BRUSH_CORE (paint_core);
+  GimpContext          *context          = GIMP_CONTEXT (paint_options);
+  GimpPressureOptions  *pressure_options = paint_options->pressure_options;
+  GimpImage            *gimage;
+  TempBuf              *area;
+  guchar               *color       = GIMP_MIXBRUSH (paint_core)->color;
+  GimpMixbrushOptions  *mixbrush_options = GIMP_MIXBRUSH_OPTIONS (paint_options);
+  GimpPaintApplicationMode  paint_appl_mode;
+
+  gimage = gimp_item_get_image (GIMP_ITEM (drawable));
+
+  opacity *= gimp_paint_options_get_fade (paint_options, gimage,
+                                          paint_core->pixel_dist);
+  if (opacity == 0.0)
+    return;
+
+  paint_appl_mode = paint_options->application_mode;
+
+  area = gimp_paint_core_get_paint_area (paint_core, drawable, paint_options);
+  if (! area)
+    return;
+
+  if (brush_core->brush && brush_core->brush->pixmap)
+    {
+      /* if it's a pixmap, do pixmap stuff */
+      gimp_brush_core_color_area_with_pixmap (brush_core, gimage, drawable,
+                                              area,
+                                              brush_core->scale,
+                                              gimp_paint_options_get_brush_mode (paint_options));
+
+      paint_appl_mode = GIMP_PAINT_INCREMENTAL;
+    }
+  else
+    {
+      /* Mix brush color with underlying canvas color */
+      if (mixbrush_options->canvas_color_rate > 0.0)
+	{
+	  guchar *color_at_pos;
+	  int i;
+
+	  /* Add original paint brush color */
+	  if (mixbrush_options->original_color_rate > 0.0)
+	    {
+	      guchar orig_color[MAX_CHANNELS];
+	      gdouble original_color_rate = mixbrush_options->original_color_rate;
+	      gdouble previous_color_rate;
+
+	      if (mixbrush_options->original_color_pressure_rate > 0.0)
+		{
+		  original_color_rate -= mixbrush_options->original_color_rate *
+		    (1 - paint_core->cur_coords.pressure);
+		  if (original_color_rate < 0.0)
+		    original_color_rate = 0.0;
+		  
+		}
+	      previous_color_rate = 1 - original_color_rate;
+	      
+	      gimp_image_get_foreground (gimage, drawable, context, orig_color);
+	      for (i = 0; i < MAX_CHANNELS - 1; i ++) {
+		color[i] = (guchar)(color[i] * previous_color_rate +
+				    orig_color[i] * original_color_rate);
+	      }
+	    }
+	  
+	  /* Get canvas color */
+	  color_at_pos =
+	    gimp_pickable_get_color_at (GIMP_PICKABLE (drawable),
+					CLAMP ((gint) paint_core->cur_coords.x,
+					       0, gimp_item_width (GIMP_ITEM (drawable)) - 1),
+					CLAMP ((gint) paint_core->cur_coords.y,
+					       0, gimp_item_height (GIMP_ITEM (drawable)) - 1));
+	  
+	  /* Mix current brush color with the canvas color */
+	  if (color_at_pos)
+	    {
+	      gdouble canvas_color_rate = mixbrush_options->canvas_color_rate;
+	      gdouble previous_color_rate = 1 - canvas_color_rate;
+	      
+	      if (mixbrush_options->canvas_color_pressure_rate > 0.0)
+		{
+		  previous_color_rate -=
+		    mixbrush_options->canvas_color_pressure_rate *
+		    (1 - paint_core->cur_coords.pressure);
+		  if (previous_color_rate < 0.0)
+		    previous_color_rate = 0.0;
+		  
+		  canvas_color_rate = 1 - previous_color_rate;
+		}
+	      
+	      for (i = 0; i < MAX_CHANNELS - 1; i ++) {
+		color[i] = (guchar)(color[i] * previous_color_rate +
+				    color_at_pos[i] * canvas_color_rate);
+	      }
+	      g_free (color_at_pos);
+	    }
+	}
+      paint_appl_mode = GIMP_PAINT_INCREMENTAL;
+    }
+  
+  color[ALPHA_PIX] = OPAQUE_OPACITY;
+  color_pixels (temp_buf_data (area), color,
+                  area->width * area->height,
+                  area->bytes);
+
+  if (pressure_options->opacity)
+    opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
+
+  gimp_brush_core_paste_canvas (brush_core, drawable,
+                                MIN (opacity, GIMP_OPACITY_OPAQUE),
+                                gimp_context_get_opacity (context),
+                                gimp_context_get_paint_mode (context),
+                                gimp_paint_options_get_brush_mode (paint_options),
+                                paint_appl_mode);
+}
diff -uNr gimp-2.2.17/app/paint/gimpmixbrush.h gimp-2.2.17-gpen-work/app/paint/gimpmixbrush.h
--- gimp-2.2.17/app/paint/gimpmixbrush.h	1970-01-01 09:00:00.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/paint/gimpmixbrush.h	2007-10-07 23:55:37.000000000 +0900
@@ -0,0 +1,58 @@
+/* The GIMP -- an image manipulation program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_MIXBRUSH_H__
+#define __GIMP_MIXBRUSH_H__
+
+
+#include "gimppaintbrush.h"
+
+
+#define GIMP_TYPE_MIXBRUSH            (gimp_mixbrush_get_type ())
+#define GIMP_MIXBRUSH(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_MIXBRUSH, GimpMixbrush))
+#define GIMP_MIXBRUSH_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_MIXBRUSH, GimpMixbrushClass))
+#define GIMP_IS_MIXBRUSH(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_MIXBRUSH))
+#define GIMP_IS_MIXBRUSH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_MIXBRUSH))
+#define GIMP_MIXBRUSH_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_MIXBRUSH, GimpMixbrushClass))
+
+
+typedef struct _GimpMixbrush      GimpMixbrush;
+typedef struct _GimpMixbrushClass GimpMixbrushClass;
+
+struct _GimpMixbrush
+{
+  GimpPaintbrush    parent_instance;
+
+  GimpDrawable     *drawable;
+  GimpPaintOptions *paint_options;
+  guchar            color[MAX_CHANNELS];
+};
+
+struct _GimpMixbrushClass
+{
+  GimpPaintbrushClass parent_class;
+};
+
+
+void    gimp_mixbrush_register (Gimp                      *gimp,
+                                GimpPaintRegisterCallback  callback);
+
+GType   gimp_mixbrush_get_type (void) G_GNUC_CONST;
+
+
+#endif  /*  __GIMP_MIXBRUSH_H__  */
diff -uNr gimp-2.2.17/app/paint/gimpmixbrushoptions.c gimp-2.2.17-gpen-work/app/paint/gimpmixbrushoptions.c
--- gimp-2.2.17/app/paint/gimpmixbrushoptions.c	1970-01-01 09:00:00.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/paint/gimpmixbrushoptions.c	2007-10-08 16:30:00.000000000 +0900
@@ -0,0 +1,169 @@
+/* The GIMP -- an image manipulation program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include "paint-types.h"
+
+#include "config/gimpconfig-params.h"
+
+#include "gimpmixbrushoptions.h"
+
+
+#define MIXBRUSH_DEFAULT_CANVAS_COLOR_RATE   0.8
+#define MIXBRUSH_DEFAULT_ORIGINAL_COLOR_RATE 0.5
+
+
+enum
+{
+  PROP_0,
+  PROP_CANVAS_COLOR_RATE,
+  PROP_ORIGINAL_COLOR_RATE,
+  PROP_CANVAS_COLOR_PRESSURE_RATE,
+  PROP_ORIGINAL_COLOR_PRESSURE_RATE
+};
+
+
+static void   gimp_mixbrush_options_class_init   (GimpMixbrushOptionsClass *klass);
+
+static void   gimp_mixbrush_options_set_property (GObject      *object,
+                                                  guint         property_id,
+                                                  const GValue *value,
+                                                  GParamSpec   *pspec);
+static void   gimp_mixbrush_options_get_property (GObject      *object,
+                                                  guint         property_id,
+                                                  GValue       *value,
+                                                  GParamSpec   *pspec);
+
+
+static GimpPaintOptionsClass *parent_class = NULL;
+
+
+GType
+gimp_mixbrush_options_get_type (void)
+{
+  static GType type = 0;
+
+  if (! type)
+    {
+      static const GTypeInfo info =
+      {
+        sizeof (GimpMixbrushOptionsClass),
+        (GBaseInitFunc) NULL,
+        (GBaseFinalizeFunc) NULL,
+        (GClassInitFunc) gimp_mixbrush_options_class_init,
+        NULL,           /* class_finalize */
+        NULL,           /* class_data     */
+        sizeof (GimpMixbrushOptions),
+	0,              /* n_preallocs    */
+	(GInstanceInitFunc) NULL
+      };
+
+      type = g_type_register_static (GIMP_TYPE_PAINT_OPTIONS,
+                                     "GimpMixbrushOptions",
+                                     &info, 0);
+    }
+
+  return type;
+}
+
+static void
+gimp_mixbrush_options_class_init (GimpMixbrushOptionsClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  object_class->set_property = gimp_mixbrush_options_set_property;
+  object_class->get_property = gimp_mixbrush_options_get_property;
+
+  GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_CANVAS_COLOR_RATE,
+                                   "canvas-color-rate", NULL,
+                                   0.0, 1.0, MIXBRUSH_DEFAULT_CANVAS_COLOR_RATE,
+                                   0);
+  GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_CANVAS_COLOR_PRESSURE_RATE,
+                                   "canvas-color-pressure-rate", NULL,
+                                   0.0, 1.0, MIXBRUSH_DEFAULT_CANVAS_COLOR_RATE,
+                                   0);
+  GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_ORIGINAL_COLOR_RATE,
+                                   "original-color-rate", NULL,
+                                   0.0, 1.0, MIXBRUSH_DEFAULT_ORIGINAL_COLOR_RATE,
+                                   0);
+  GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_ORIGINAL_COLOR_PRESSURE_RATE,
+                                   "original-color-pressure-rate", NULL,
+                                   0.0, 1.0, MIXBRUSH_DEFAULT_CANVAS_COLOR_RATE,
+                                   0);
+}
+
+static void
+gimp_mixbrush_options_set_property (GObject      *object,
+                                    guint         property_id,
+                                    const GValue *value,
+                                    GParamSpec   *pspec)
+{
+  GimpMixbrushOptions *options = GIMP_MIXBRUSH_OPTIONS (object);
+
+  switch (property_id)
+    {
+    case PROP_CANVAS_COLOR_RATE:
+      options->canvas_color_rate = g_value_get_double (value);
+      break;
+    case PROP_CANVAS_COLOR_PRESSURE_RATE:
+      options->canvas_color_pressure_rate = g_value_get_double (value);
+      break;
+    case PROP_ORIGINAL_COLOR_RATE:
+      options->original_color_rate = g_value_get_double (value);
+      break;
+    case PROP_ORIGINAL_COLOR_PRESSURE_RATE:
+      options->original_color_pressure_rate = g_value_get_double (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+    }
+}
+
+static void
+gimp_mixbrush_options_get_property (GObject    *object,
+                                    guint       property_id,
+                                    GValue     *value,
+                                    GParamSpec *pspec)
+{
+  GimpMixbrushOptions *options = GIMP_MIXBRUSH_OPTIONS (object);
+
+  switch (property_id)
+    {
+    case PROP_CANVAS_COLOR_RATE:
+      g_value_set_double (value, options->canvas_color_rate);
+      break;
+    case PROP_CANVAS_COLOR_PRESSURE_RATE:
+      g_value_set_double (value, options->canvas_color_pressure_rate);
+      break;
+    case PROP_ORIGINAL_COLOR_RATE:
+      g_value_set_double (value, options->original_color_rate);
+      break;
+    case PROP_ORIGINAL_COLOR_PRESSURE_RATE:
+      g_value_set_double (value, options->original_color_pressure_rate);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+    }
+}
diff -uNr gimp-2.2.17/app/paint/gimpmixbrushoptions.h gimp-2.2.17-gpen-work/app/paint/gimpmixbrushoptions.h
--- gimp-2.2.17/app/paint/gimpmixbrushoptions.h	1970-01-01 09:00:00.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/paint/gimpmixbrushoptions.h	2007-10-08 16:15:34.000000000 +0900
@@ -0,0 +1,51 @@
+/* The GIMP -- an image manipulation program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_MIXBRUSH_OPTIONS_H__
+#define __GIMP_MIXBRUSH_OPTIONS_H__
+
+
+#include "gimppaintoptions.h"
+
+
+#define GIMP_TYPE_MIXBRUSH_OPTIONS            (gimp_mixbrush_options_get_type ())
+#define GIMP_MIXBRUSH_OPTIONS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_MIXBRUSH_OPTIONS, GimpMixbrushOptions))
+#define GIMP_MIXBRUSH_OPTIONS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_MIXBRUSH_OPTIONS, GimpMixbrushOptionsClass))
+#define GIMP_IS_MIXBRUSH_OPTIONS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_MIXBRUSH_OPTIONS))
+#define GIMP_IS_MIXBRUSH_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_MIXBRUSH_OPTIONS))
+#define GIMP_MIXBRUSH_OPTIONS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_MIXBRUSH_OPTIONS, GimpMixbrushOptionsClass))
+
+
+typedef struct _GimpMixbrushOptions   GimpMixbrushOptions;
+typedef struct _GimpPaintOptionsClass GimpMixbrushOptionsClass;
+
+struct _GimpMixbrushOptions
+{
+  GimpPaintOptions  parent_instance;
+
+  gdouble           canvas_color_rate;
+  gdouble           canvas_color_pressure_rate;
+  gdouble           original_color_rate;
+  gdouble           original_color_pressure_rate;
+};
+
+
+GType   gimp_mixbrush_options_get_type (void) G_GNUC_CONST;
+
+
+#endif  /*  __GIMP_MIXBRUSH_OPTIONS_H__  */
バイナリー・ファイル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/Makefile.in gimp-2.2.17-gpen-work/app/tools/Makefile.in
--- gimp-2.2.17/app/tools/Makefile.in	2007-10-08 18:46:24.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/tools/Makefile.in	2007-10-08 00:44:26.000000000 +0900
@@ -86,7 +86,8 @@
 	gimptooloptions-gui.$(OBJEXT) gimptransformoptions.$(OBJEXT) \
 	gimptransformtool.$(OBJEXT) gimptransformtool-undo.$(OBJEXT) \
 	gimpvectoroptions.$(OBJEXT) gimpvectortool.$(OBJEXT) \
-	gimpinktool2.$(OBJEXT) gimpink2options-gui.$(OBJEXT)
+	gimpinktool2.$(OBJEXT) gimpink2options-gui.$(OBJEXT) \
+	gimpmixbrushtool.$(OBJEXT)
 am_libapptools_a_OBJECTS = $(am__objects_1) $(am__objects_2)
 libapptools_a_OBJECTS = $(am_libapptools_a_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
@@ -588,7 +589,9 @@
 	gimpinktool2.c			\
 	gimpinktool2.h			\
 	gimpink2options-gui.c		\
-	gimpink2options-gui.h
+	gimpink2options-gui.h		\
+	gimpmixbrushtool.c		\
+	gimpmixbrushtool.h
 
 libapptools_a_built_sources = tools-enums.c
 libapptools_a_SOURCES = $(libapptools_a_built_sources) $(libapptools_a_sources)
diff -uNr gimp-2.2.17/app/tools/gimp-tools.c gimp-2.2.17-gpen-work/app/tools/gimp-tools.c
--- gimp-2.2.17/app/tools/gimp-tools.c	2007-10-08 18:46:24.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/tools/gimp-tools.c	2007-10-08 01:14:19.000000000 +0900
@@ -74,6 +74,7 @@
 #include "gimptexttool.h"
 #include "gimpvectortool.h"
 #include "gimpinktool2.h"
+#include "gimpmixbrushtool.h"
 
 #include "gimp-intl.h"
 
@@ -129,6 +130,7 @@
     gimp_bucket_fill_tool_register,
     gimp_text_tool_register,
     gimp_ink2_tool_register,
+    gimp_mixbrush_tool_register,
 
     /*  transform tools  */
 
@@ -443,6 +445,10 @@
     {
       paint_core_name = "GimpInk2";
     }
+  else if (tool_type == GIMP_TYPE_MIXBRUSH_TOOL)
+    {
+      paint_core_name = "GimpMixbrush";
+    }
   else
     {
       paint_core_name = "GimpPaintbrush";
diff -uNr gimp-2.2.17/app/tools/gimpmixbrushtool.c gimp-2.2.17-gpen-work/app/tools/gimpmixbrushtool.c
--- gimp-2.2.17/app/tools/gimpmixbrushtool.c	1970-01-01 09:00:00.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/tools/gimpmixbrushtool.c	2007-10-08 16:29:47.000000000 +0900
@@ -0,0 +1,175 @@
+/* The GIMP -- an image manipulation program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+
+#include "libgimpwidgets/gimpwidgets.h"
+
+#include "tools-types.h"
+
+#include "core/gimptoolinfo.h"
+
+#include "paint/gimpmixbrushoptions.h"
+
+#include "widgets/gimphelp-ids.h"
+#include "widgets/gimppropwidgets.h"
+
+#include "gimpmixbrushtool.h"
+#include "gimppaintoptions-gui.h"
+#include "gimptoolcontrol.h"
+
+#include "gimp-intl.h"
+
+
+static void        gimp_mixbrush_tool_init   (GimpMixbrushTool *mixbrush);
+static GtkWidget * gimp_mixbrush_options_gui (GimpToolOptions  *tool_options);
+
+
+void
+gimp_mixbrush_tool_register (GimpToolRegisterCallback  callback,
+			     gpointer                  data)
+{
+  (* callback) (GIMP_TYPE_MIXBRUSH_TOOL,
+                GIMP_TYPE_MIXBRUSH_OPTIONS,
+                gimp_mixbrush_options_gui,
+                GIMP_PAINT_OPTIONS_CONTEXT_MASK |
+                GIMP_CONTEXT_GRADIENT_MASK,
+                "gimp-mixbrush-tool",
+                _("Mixbrush"),
+                _("Brush with mixing color feature"),
+                N_("_Mixbrush"), "A",
+                NULL, GIMP_HELP_TOOL_PAINTBRUSH,
+                GIMP_STOCK_TOOL_PAINTBRUSH,
+                data);
+}
+
+GType
+gimp_mixbrush_tool_get_type (void)
+{
+  static GType tool_type = 0;
+
+  if (! tool_type)
+    {
+      static const GTypeInfo tool_info =
+      {
+        sizeof (GimpMixbrushToolClass),
+        (GBaseInitFunc) NULL,
+        (GBaseFinalizeFunc) NULL,
+        NULL,           /* class_init     */
+        NULL,           /* class_finalize */
+        NULL,           /* class_data     */
+        sizeof (GimpMixbrushTool),
+        0,              /* n_preallocs    */
+        (GInstanceInitFunc) gimp_mixbrush_tool_init,
+      };
+
+      tool_type = g_type_register_static (GIMP_TYPE_PAINTBRUSH_TOOL,
+					  "GimpMixbrushTool",
+                                          &tool_info, 0);
+    }
+
+  return tool_type;
+}
+
+static void
+gimp_mixbrush_tool_init (GimpMixbrushTool *mixbrush)
+{
+  GimpTool *tool = GIMP_TOOL (mixbrush);
+
+  gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_PAINTBRUSH);
+
+  gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (mixbrush),
+                                       GIMP_COLOR_PICK_MODE_FOREGROUND);
+}
+
+
+/*  tool options stuff  */
+
+static GtkWidget *
+gimp_mixbrush_options_gui (GimpToolOptions *tool_options)
+{
+  GObject   *config;
+  GtkWidget *vbox;
+  GtkWidget *table;
+  GtkWidget *mixbrush_box;
+  GtkWidget *mixbrush_vbox;
+  
+
+  config = G_OBJECT (tool_options);
+
+  vbox = gimp_paint_options_gui (tool_options);
+
+  table = gtk_table_new (2, 3, FALSE);
+  gtk_table_set_col_spacing (GTK_TABLE (table), 0, 2);
+  gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
+  gtk_widget_show (table);
+
+  /* Canvas Color Picking Configurations */
+  mixbrush_box = gtk_frame_new (_("Canvas Color"));
+  gtk_box_pack_start (GTK_BOX (vbox), mixbrush_box, FALSE, TRUE, 0);
+  gtk_widget_show(mixbrush_box);
+  mixbrush_vbox = gtk_vbox_new (FALSE, 2);
+  gtk_container_add (GTK_CONTAINER (mixbrush_box), mixbrush_vbox);
+  gtk_widget_show (mixbrush_vbox);
+
+  table = gtk_table_new (3, 3, FALSE);
+  gtk_table_set_col_spacings (GTK_TABLE (table), 2);
+  gtk_box_pack_start (GTK_VBOX (mixbrush_vbox), table, TRUE, TRUE, 0);
+  gtk_widget_show (table);
+  
+  gimp_prop_scale_entry_new (config, "canvas-color-rate",
+                             GTK_TABLE (table), 0, 0,
+                             _("Rate:"),
+                             0.01, 0.1, 2,
+                             FALSE, 0.0, 1.0);
+
+  gimp_prop_scale_entry_new (config, "canvas-color-pressure-rate",
+                             GTK_TABLE (table), 0, 1,
+                             _("Pressure:"),
+                             0.01, 0.1, 2,
+                             FALSE, 0.0, 1.0);
+
+  /* Original Color Picking Configurations */
+  mixbrush_box = gtk_frame_new (_("Original Color"));
+  gtk_box_pack_start (GTK_BOX (vbox), mixbrush_box, FALSE, TRUE, 0);
+  gtk_widget_show(mixbrush_box);
+  mixbrush_vbox = gtk_vbox_new (FALSE, 2);
+  gtk_container_add (GTK_CONTAINER (mixbrush_box), mixbrush_vbox);
+  gtk_widget_show (mixbrush_vbox);
+
+  table = gtk_table_new (3, 3, FALSE);
+  gtk_table_set_col_spacings (GTK_TABLE (table), 2);
+  gtk_box_pack_start (GTK_VBOX (mixbrush_vbox), table, TRUE, TRUE, 0);
+  gtk_widget_show (table);
+  
+  gimp_prop_scale_entry_new (config, "original-color-rate",
+                             GTK_TABLE (table), 0, 0,
+                             _("Rate:"),
+                             0.01, 0.1, 2,
+                             FALSE, 0.0, 1.0);
+  
+  gimp_prop_scale_entry_new (config, "original-color-pressure-rate",
+                             GTK_TABLE (table), 0, 1,
+                             _("Pressure:"),
+                             0.01, 0.1, 2,
+                             FALSE, 0.0, 1.0);
+
+  return vbox;
+}
diff -uNr gimp-2.2.17/app/tools/gimpmixbrushtool.h gimp-2.2.17-gpen-work/app/tools/gimpmixbrushtool.h
--- gimp-2.2.17/app/tools/gimpmixbrushtool.h	1970-01-01 09:00:00.000000000 +0900
+++ gimp-2.2.17-gpen-work/app/tools/gimpmixbrushtool.h	2007-10-08 00:44:59.000000000 +0900
@@ -0,0 +1,54 @@
+/* The GIMP -- an image manipulation program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_MIXBRUSH_TOOL_H__
+#define __GIMP_MIXBRUSH_TOOL_H__
+
+
+#include "gimppaintbrushtool.h"
+
+
+#define GIMP_TYPE_MIXBRUSH_TOOL            (gimp_mixbrush_tool_get_type ())
+#define GIMP_MIXBRUSH_TOOL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_MIXBRUSH_TOOL, GimpMixbrushTool))
+#define GIMP_MIXBRUSH_TOOL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_MIXBRUSH_TOOL, GimpMixbrushToolClass))
+#define GIMP_IS_MIXBRUSH_TOOL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_MIXBRUSH_TOOL))
+#define GIMP_IS_MIXBRUSH_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_MIXBRUSH_TOOL))
+#define GIMP_MIXBRUSH_TOOL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_MIXBRUSH_TOOL, GimpMixbrushToolClass))
+
+
+typedef struct _GimpMixbrushTool      GimpMixbrushTool;
+typedef struct _GimpMixbrushToolClass GimpMixbrushToolClass;
+
+struct _GimpMixbrushTool
+{
+  GimpPaintbrushTool parent_instance;
+};
+
+struct _GimpMixbrushToolClass
+{
+  GimpPaintbrushToolClass parent_class;
+};
+
+
+void       gimp_mixbrush_tool_register (GimpToolRegisterCallback  callback,
+                                        gpointer                  data);
+
+GType      gimp_mixbrush_tool_get_type (void) G_GNUC_CONST;
+
+
+#endif  /*  __GIMP_MIXBRUSH_TOOL_H__  */
