--- gimp-painter--2.6.6_old/app/core/gimpbrushgenerated.c Fri Nov 21 07:42:58 2008 +++ gimp-painter--2.6.6/app/core/gimpbrushgenerated.c Tue Mar 17 10:43:51 2009 @@ -34,8 +34,11 @@ #include "gimpbrushgenerated-save.h" -#define OVERSAMPLING 4 +#define MAX_OVERSAMPLING 32 +#define MIN_OVERSAMPLING 4 /* original value */ +#define OVERSAMPLING (_oversampling) +static gint _oversampling; enum { @@ -348,7 +351,9 @@ gdouble d; gdouble sum; gdouble exponent; - gdouble buffer[OVERSAMPLING]; + gdouble buffer[MAX_OVERSAMPLING]; + + _oversampling = MAX (MAX_OVERSAMPLING - (radius - 0.5), MIN_OVERSAMPLING); length = OVERSAMPLING * ceil (1 + sqrt (2 * SQR (ceil (radius + 1.0)))); --- gimp-painter--2.6.6_old/app/dialogs/about-dialog.c Wed Mar 18 01:41:37 2009 +++ gimp-painter--2.6.6/app/dialogs/about-dialog.c Wed Mar 18 00:25:02 2009 @@ -609,7 +609,7 @@ gtk_widget_show (label); #endif - label = gtk_label_new (_("gimp-painter- (release 20081110)")); + label = gtk_label_new (_("gimp-painter- (release 20090317)")); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_reorder_child (GTK_BOX (vbox), label, 2); gtk_widget_show (label); --- gimp-painter--2.6.6_old/app/paint/gimppaintoptions.c Wed Mar 18 01:41:37 2009 +++ gimp-painter--2.6.6/app/paint/gimppaintoptions.c Tue Mar 17 20:31:35 2009 @@ -48,6 +48,7 @@ #define DEFAULT_PRESSURE_COLOR FALSE #define DEFAULT_PRESSURE_PRESCALE 1.0 #define DEFAULT_PRESSURE_MIN_SCALE 0 +#define DEFAULT_PRESSURE_POWER_SIZE 0.5 #define DEFAULT_VELOCITY_OPACITY FALSE #define DEFAULT_VELOCITY_HARDNESS FALSE @@ -106,6 +107,7 @@ PROP_PRESSURE_COLOR, PROP_PRESSURE_PRESCALE, PROP_PRESSURE_MIN_SCALE, + PROP_PRESSURE_POWER_SIZE, PROP_VELOCITY_OPACITY, PROP_VELOCITY_HARDNESS, @@ -246,6 +248,10 @@ "pressure-min-scale", NULL, 0.0, 1.0, DEFAULT_PRESSURE_MIN_SCALE, GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_PRESSURE_POWER_SIZE, + "pressure-power-size", NULL, + 0.1, 10.0, DEFAULT_PRESSURE_POWER_SIZE, + GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_VELOCITY_OPACITY, "velocity-opacity", NULL, @@ -516,6 +522,10 @@ pressure_options->min_scale = g_value_get_double (value); break; + case PROP_PRESSURE_POWER_SIZE: + pressure_options->power_size = g_value_get_double (value); + break; + case PROP_VELOCITY_OPACITY: velocity_options->opacity = g_value_get_boolean (value); break; @@ -731,6 +741,10 @@ g_value_set_double (value, pressure_options->min_scale); break; + case PROP_PRESSURE_POWER_SIZE: + g_value_set_double (value, pressure_options->power_size); + break; + case PROP_VELOCITY_OPACITY: g_value_set_boolean (value, velocity_options->opacity); break; @@ -1225,15 +1239,17 @@ random, paint_options->random_options->prescale); - scale = sqrt (scale); + scale = pow (scale, paint_options->pressure_options->power_size); if (min_scale > 0) scale = min_scale + (1.0 - min_scale) * scale; - scale = MAX (scale, 1 / 8.0); + //scale = MAX (scale, 1 / 8.0); } scale *= paint_options->brush_scale; + + //g_printerr ("Result of modefied code: %f, pressure: %f\n",scale, coords->pressure); return scale; } --- gimp-painter--2.6.6_old/app/paint/gimppaintoptions.h Wed Mar 18 01:41:37 2009 +++ gimp-painter--2.6.6/app/paint/gimppaintoptions.h Tue Mar 17 20:25:42 2009 @@ -46,6 +46,7 @@ gboolean color; gdouble prescale; gdouble min_scale; + gdouble power_size; }; struct _GimpFadeOptions --- gimp-painter--2.6.6_old/app/tools/gimppaintoptions-gui.c Wed Mar 18 01:41:38 2009 +++ gimp-painter--2.6.6/app/tools/gimppaintoptions-gui.c Tue Mar 17 20:35:03 2009 @@ -173,6 +173,13 @@ _("Minimum scale:"), 0.01, 0.1, 2, FALSE, 0.0, 0.0); + + adj = gimp_prop_scale_entry_new (config, "pressure-power-size", + GTK_TABLE (table), 0, table_row++, + _("Power:"), + 0.01, 0.1, 2, + FALSE, 0.0, 0.0); + gimp_scale_entry_set_logarithmic (adj, TRUE); } if (tool_has_opacity_dynamics (tool_type))