Commit 82c2616f authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

Applied modified patch from Alexia Death which adds velocity support to

2008-05-10  Michael Natterer  <mitch@gimp.org>

	Applied modified patch from Alexia Death which adds velocity
	support to paint tools in the spirit of the pressure support we
	already have. Fixes bug #529431.

	* app/display/gimpdisplayshell-coords.c
	(gimp_display_shell_eval_event): tweak velocity calculation to
	work in screen coordinates.

	* app/paint/gimppaintoptions.[ch]: add velocity options in the
	same way as there are pressure options. Add utility functions
	which return dynamic opatity and dynamic rate according to the the
	option's settings and some GimpCoords' pressure and velocity.

	* app/tools/gimppaintoptions-gui.c: add GUI for the velocity
	options.

	* app/paint/gimpbrushcore.h: remove PRESSURE_SCALE define, it's
	now in gimppaintoptions.h.

	* app/paint/gimpbrushcore.c (gimp_brush_core_interpolate):
	inerpolate velocity too.

	(gimp_brush_core_calc_brush_scale): take velocity into account.

	(gimp_brush_core_get_brush_mask): always pressurize the mask in
	the GIMP_BRUSH_PRESSURE because there always is velocity (unlike
	pressure which is only there on tablets).

	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimpheal.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimpsmudge.c: get opacity and rate from the new paint
	options utility functions which take both pressure and velocity
	into account.

	* app/paint/gimppaintbrush.c: take velocity into account when
	calculating the gradient color offset.

	* app/paint/gimpairbrush.c: do some additional fiddling with
	velocity in the asynchronous airbrush timeout.

	* app/paint/gimpairbrushoptions.c: override the velocity-size
	property and have it default to FALSE.


svn path=/trunk/; revision=25604
parent d6db9d52
2008-05-10 Michael Natterer <mitch@gimp.org>
Applied modified patch from Alexia Death which adds velocity
support to paint tools in the spirit of the pressure support we
already have. Fixes bug #529431.
* app/display/gimpdisplayshell-coords.c
(gimp_display_shell_eval_event): tweak velocity calculation to
work in screen coordinates.
* app/paint/gimppaintoptions.[ch]: add velocity options in the
same way as there are pressure options. Add utility functions
which return dynamic opatity and dynamic rate according to the the
option's settings and some GimpCoords' pressure and velocity.
* app/tools/gimppaintoptions-gui.c: add GUI for the velocity
options.
* app/paint/gimpbrushcore.h: remove PRESSURE_SCALE define, it's
now in gimppaintoptions.h.
* app/paint/gimpbrushcore.c (gimp_brush_core_interpolate):
inerpolate velocity too.
(gimp_brush_core_calc_brush_scale): take velocity into account.
(gimp_brush_core_get_brush_mask): always pressurize the mask in
the GIMP_BRUSH_PRESSURE because there always is velocity (unlike
pressure which is only there on tablets).
* app/paint/gimpairbrush.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimpheal.c
* app/paint/gimppaintbrush.c
* app/paint/gimpsmudge.c: get opacity and rate from the new paint
options utility functions which take both pressure and velocity
into account.
* app/paint/gimppaintbrush.c: take velocity into account when
calculating the gradient color offset.
* app/paint/gimpairbrush.c: do some additional fiddling with
velocity in the asynchronous airbrush timeout.
* app/paint/gimpairbrushoptions.c: override the velocity-size
property and have it default to FALSE.
2008-05-10 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpcroptool.c: Add a GimpRectangleTool::cancel()
......@@ -69,8 +119,7 @@
(gimp_display_shell_canvas_tool_events): call it here instead and
add comments about how BUTTON_PRESS and FOCUS_IN interact.
Also return TRUE from BUTTON_PRESS, BUTTON_RELEASE and
MOTION_NOTIFY.
Return TRUE from BUTTON_PRESS, BUTTON_RELEASE and MOTION_NOTIFY.
2008-05-08 Sven Neumann <sven@gimp.org>
......
......@@ -27,6 +27,8 @@
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-coords.h"
/* Velocity unit is screen pixels per millisecond we pass to tools as 1. */
#define VELOCITY_UNIT 3.0
/* public functions */
......@@ -259,12 +261,22 @@ gimp_display_shell_eval_event (GimpDisplayShell *shell,
}
else
{
coords->velocity =
(coords->distance / (gdouble) coords->delta_time) / 10;
/* We need to calculate the velocity in screen coordinates
* for human interaction
*/
gdouble screen_distance = (coords->distance *
MIN (shell->scale_x, shell->scale_y));
/* Calculate raw valocity */
coords->velocity = ((screen_distance / (gdouble) coords->delta_time) /
VELOCITY_UNIT);
/* Adding velocity dependent smooth, feels better in tools this way. */
coords->velocity = (shell->last_coords.velocity *
(1 - MIN (SMOOTH_FACTOR, coords->velocity)) +
coords->velocity *
MIN (SMOOTH_FACTOR, coords->velocity));
/* A little smooth on this too, feels better in tools this way. */
coords->velocity = (shell->last_coords.velocity * (1 - SMOOTH_FACTOR)
+ coords->velocity * SMOOTH_FACTOR);
/* Speed needs upper limit */
coords->velocity = MIN (coords->velocity, 1.0);
}
......
......@@ -136,14 +136,17 @@ gimp_airbrush_paint (GimpPaintCore *paint_core,
if (options->rate != 0.0)
{
gdouble timeout;
gdouble dynamic_rate;
gint timeout;
airbrush->drawable = drawable;
airbrush->paint_options = paint_options;
timeout = (paint_options->pressure_options->rate ?
(10000 / (options->rate * PRESSURE_SCALE * paint_core->cur_coords.pressure)) :
(10000 / options->rate));
dynamic_rate = gimp_paint_options_get_dynamic_rate (paint_options,
&paint_core->cur_coords,
paint_core->use_pressure);
timeout = 10000 / (options->rate * dynamic_rate);
airbrush->timeout_id = g_timeout_add (timeout,
gimp_airbrush_timeout,
......@@ -173,17 +176,26 @@ gimp_airbrush_motion (GimpPaintCore *paint_core,
GimpAirbrushOptions *options = GIMP_AIRBRUSH_OPTIONS (paint_options);
gdouble opacity;
gboolean saved_pressure;
gboolean saved_velocity;
opacity = options->pressure / 100.0;
saved_pressure = paint_options->pressure_options->hardness;
saved_velocity = paint_options->velocity_options->hardness;
if (saved_pressure)
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
opacity *= GIMP_PAINT_PRESSURE_SCALE * paint_core->cur_coords.pressure;
if (saved_velocity)
opacity *= MAX (0.0, 1 - GIMP_PAINT_VELOCITY_SCALE * paint_core->cur_coords.velocity);
paint_options->pressure_options->hardness = FALSE;
paint_options->velocity_options->hardness = FALSE;
_gimp_paintbrush_motion (paint_core, drawable, paint_options, opacity);
paint_options->pressure_options->hardness = saved_pressure;
paint_options->velocity_options->hardness = saved_velocity;
}
static gboolean
......
......@@ -35,7 +35,8 @@ enum
{
PROP_0,
PROP_RATE,
PROP_PRESSURE
PROP_PRESSURE,
PROP_VELOCITY_SIZE
};
......@@ -69,6 +70,12 @@ gimp_airbrush_options_class_init (GimpAirbrushOptionsClass *klass)
"pressure", NULL,
0.0, 100.0, AIRBRUSH_DEFAULT_PRESSURE,
GIMP_PARAM_STATIC_STRINGS);
/* override velocity size because its unavaliable to the airbrush */
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_VELOCITY_SIZE,
"velocity-size", NULL,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
}
static void
......@@ -92,6 +99,10 @@ gimp_airbrush_options_set_property (GObject *object,
case PROP_PRESSURE:
options->pressure = g_value_get_double (value);
break;
case PROP_VELOCITY_SIZE:
GIMP_PAINT_OPTIONS (options)->velocity_options->size = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -114,6 +125,10 @@ gimp_airbrush_options_get_property (GObject *object,
case PROP_PRESSURE:
g_value_set_double (value, options->pressure);
break;
case PROP_VELOCITY_SIZE:
g_value_set_boolean (value, GIMP_PAINT_OPTIONS (options)->velocity_options->size);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......
......@@ -87,7 +87,9 @@ static void gimp_brush_core_real_set_brush (GimpBrushCore *core,
static gdouble gimp_brush_core_calc_brush_scale (GimpBrushCore *core,
GimpPaintOptions *paint_options,
gdouble pressure);
gdouble pressure,
gdouble velocity);
static inline void rotate_pointers (gulong **p,
guint32 n);
static TempBuf * gimp_brush_core_subsample_mask (GimpBrushCore *core,
......@@ -356,7 +358,8 @@ gimp_brush_core_start (GimpPaintCore *paint_core,
}
core->scale = gimp_brush_core_calc_brush_scale (core, paint_options,
coords->pressure);
coords->pressure,
coords->velocity);
core->spacing = (gdouble) gimp_brush_get_spacing (core->main_brush) / 100.0;
......@@ -406,6 +409,7 @@ gimp_brush_core_interpolate (GimpPaintCore *paint_core,
gdouble delta_pressure;
gdouble delta_xtilt, delta_ytilt;
gdouble delta_wheel;
gdouble delta_velocity;
GimpVector2 temp_vec;
gint n, num_points;
gdouble t0, dt, tn;
......@@ -431,6 +435,7 @@ gimp_brush_core_interpolate (GimpPaintCore *paint_core,
delta_xtilt = paint_core->cur_coords.xtilt - paint_core->last_coords.xtilt;
delta_ytilt = paint_core->cur_coords.ytilt - paint_core->last_coords.ytilt;
delta_wheel = paint_core->cur_coords.wheel - paint_core->last_coords.wheel;
delta_velocity = paint_core->cur_coords.velocity - paint_core->last_coords.velocity;
/* return if there has been no motion */
if (! delta_vec.x &&
......@@ -438,7 +443,8 @@ gimp_brush_core_interpolate (GimpPaintCore *paint_core,
! delta_pressure &&
! delta_xtilt &&
! delta_ytilt &&
! delta_wheel)
! delta_wheel &&
! delta_velocity)
return;
/* calculate the distance traveled in the coordinate space of the brush */
......@@ -631,6 +637,8 @@ gimp_brush_core_interpolate (GimpPaintCore *paint_core,
p * delta_ytilt);
paint_core->cur_coords.wheel = (paint_core->last_coords.wheel +
p * delta_wheel);
paint_core->cur_coords.velocity = (paint_core->last_coords.velocity +
p * delta_velocity);
if (core->jitter > 0.0)
{
......@@ -663,6 +671,7 @@ gimp_brush_core_interpolate (GimpPaintCore *paint_core,
paint_core->cur_coords.xtilt = paint_core->last_coords.xtilt + delta_xtilt;
paint_core->cur_coords.ytilt = paint_core->last_coords.ytilt + delta_ytilt;
paint_core->cur_coords.wheel = paint_core->last_coords.wheel + delta_wheel;
paint_core->cur_coords.velocity = paint_core->last_coords.velocity + delta_velocity;
paint_core->distance = total;
paint_core->pixel_dist = pixel_initial + pixel_dist;
......@@ -682,8 +691,11 @@ gimp_brush_core_get_paint_area (GimpPaintCore *paint_core,
gint brush_width, brush_height;
if (GIMP_BRUSH_CORE_GET_CLASS (core)->handles_scaling_brush)
core->scale = gimp_brush_core_calc_brush_scale (core, paint_options,
paint_core->cur_coords.pressure);
{
core->scale = gimp_brush_core_calc_brush_scale (core, paint_options,
paint_core->cur_coords.pressure,
paint_core->cur_coords.velocity);
}
/* else use scale from start(), we don't support on-the-fly scaling */
gimp_brush_scale_size (core->brush, core->scale,
......@@ -917,20 +929,41 @@ gimp_brush_core_invalidate_cache (GimpBrush *brush,
static gdouble
gimp_brush_core_calc_brush_scale (GimpBrushCore *core,
GimpPaintOptions *paint_options,
gdouble pressure)
gdouble pressure,
gdouble velocity)
{
gdouble scale = 1.0;
if (GIMP_BRUSH_CORE_GET_CLASS (core)->handles_scaling_brush &&
GIMP_PAINT_CORE (core)->use_pressure)
if (GIMP_BRUSH_CORE_GET_CLASS (core)->handles_scaling_brush)
{
if (paint_options->pressure_options->inverse_size)
scale = 1.0 - 0.9 * pressure;
else if (paint_options->pressure_options->size)
scale = pressure;
if (! (GIMP_PAINT_CORE (core)->use_pressure &&
(paint_options->pressure_options->inverse_size ||
paint_options->pressure_options->size)))
{
pressure = -1;
}
else if (paint_options->pressure_options->inverse_size)
{
pressure = 1.0 - 0.9 * pressure;
}
if (paint_options->velocity_options->size)
{
velocity = 1.0 - sqrt (velocity);
}
else if (paint_options->velocity_options->inverse_size)
{
velocity = sqrt (velocity);
}
else
{
velocity = -1;
}
scale = gimp_paint_options_get_dynamics_mix (pressure, velocity);
if (scale < 1 / 256.0)
scale = 1 / 16.0;
if (scale < 1 / 64.0)
scale = 1 / 8.0;
else
scale = sqrt (scale);
}
......@@ -1361,6 +1394,8 @@ gimp_brush_core_get_brush_mask (GimpBrushCore *core,
{
GimpPaintCore *paint_core = GIMP_PAINT_CORE (core);
TempBuf *mask;
gdouble pressure;
gdouble velocity;
mask = gimp_brush_core_scale_mask (core, core->brush);
......@@ -1382,15 +1417,17 @@ gimp_brush_core_get_brush_mask (GimpBrushCore *core,
break;
case GIMP_BRUSH_PRESSURE:
if (paint_core->use_pressure)
mask = gimp_brush_core_pressurize_mask (core, mask,
paint_core->cur_coords.x,
paint_core->cur_coords.y,
paint_core->cur_coords.pressure);
if (! paint_core->use_pressure)
pressure = -1.0;
else
mask = gimp_brush_core_subsample_mask (core, mask,
paint_core->cur_coords.x,
paint_core->cur_coords.y);
pressure = GIMP_PAINT_PRESSURE_SCALE * paint_core->cur_coords.pressure;
velocity = GIMP_PAINT_VELOCITY_SCALE * paint_core->cur_coords.velocity;
mask = gimp_brush_core_pressurize_mask (core, mask,
paint_core->cur_coords.x,
paint_core->cur_coords.y,
gimp_paint_options_get_dynamics_mix (pressure, velocity));
break;
default:
......
......@@ -27,8 +27,6 @@
#define BRUSH_CORE_SOLID_SUBSAMPLE 2
#define BRUSH_CORE_JITTER_LUTSIZE 360
#define PRESSURE_SCALE 1.5
#define GIMP_TYPE_BRUSH_CORE (gimp_brush_core_get_type ())
#define GIMP_BRUSH_CORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_BRUSH_CORE, GimpBrushCore))
......@@ -129,4 +127,5 @@ void gimp_brush_core_color_area_with_pixmap
TempBuf * gimp_brush_core_get_brush_mask (GimpBrushCore *core,
GimpBrushApplicationMode brush_hardness);
#endif /* __GIMP_BRUSH_CORE_H__ */
......@@ -235,8 +235,9 @@ gimp_clone_motion (GimpSourceCore *source_core,
}
}
if (paint_options->pressure_options->opacity)
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
opacity *= gimp_paint_options_get_dynamic_opacity (paint_options,
&paint_core->cur_coords,
paint_core->use_pressure);
gimp_brush_core_paste_canvas (GIMP_BRUSH_CORE (paint_core), drawable,
MIN (opacity, GIMP_OPACITY_OPAQUE),
......
......@@ -118,11 +118,10 @@ gimp_convolve_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options)
{
GimpConvolve *convolve = GIMP_CONVOLVE (paint_core);
GimpBrushCore *brush_core = GIMP_BRUSH_CORE (paint_core);
GimpConvolveOptions *options = GIMP_CONVOLVE_OPTIONS (paint_options);
GimpContext *context = GIMP_CONTEXT (paint_options);
GimpPressureOptions *pressure_options = paint_options->pressure_options;
GimpConvolve *convolve = GIMP_CONVOLVE (paint_core);
GimpBrushCore *brush_core = GIMP_BRUSH_CORE (paint_core);
GimpConvolveOptions *options = GIMP_CONVOLVE_OPTIONS (paint_options);
GimpContext *context = GIMP_CONTEXT (paint_options);
GimpImage *image;
TempBuf *area;
PixelRegion srcPR;
......@@ -154,8 +153,9 @@ gimp_convolve_motion (GimpPaintCore *paint_core,
rate = options->rate;
if (pressure_options->rate)
rate *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
rate *= gimp_paint_options_get_dynamic_rate (paint_options,
&paint_core->cur_coords,
paint_core->use_pressure);
gimp_convolve_calculate_matrix (convolve, options->type, rate);
......
......@@ -162,15 +162,14 @@ gimp_dodge_burn_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options)
{
GimpDodgeBurn *dodgeburn = GIMP_DODGE_BURN (paint_core);
GimpContext *context = GIMP_CONTEXT (paint_options);
GimpPressureOptions *pressure_options = paint_options->pressure_options;
GimpImage *image;
TempBuf *area;
TempBuf *orig;
PixelRegion srcPR, destPR, tempPR;
guchar *temp_data;
gdouble opacity;
GimpDodgeBurn *dodgeburn = GIMP_DODGE_BURN (paint_core);
GimpContext *context = GIMP_CONTEXT (paint_options);
GimpImage *image;
TempBuf *area;
TempBuf *orig;
PixelRegion srcPR, destPR, tempPR;
guchar *temp_data;
gdouble opacity;
image = gimp_item_get_image (GIMP_ITEM (drawable));
......@@ -236,8 +235,9 @@ gimp_dodge_burn_motion (GimpPaintCore *paint_core,
g_free (temp_data);
if (pressure_options->opacity)
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
opacity *= gimp_paint_options_get_dynamic_opacity (paint_options,
&paint_core->cur_coords,
paint_core->use_pressure);
/* Replace the newly dodgedburned area (canvas_buf) to the image */
gimp_brush_core_replace_canvas (GIMP_BRUSH_CORE (paint_core), drawable,
......
......@@ -102,13 +102,12 @@ gimp_eraser_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options)
{
GimpEraserOptions *options = GIMP_ERASER_OPTIONS (paint_options);
GimpContext *context = GIMP_CONTEXT (paint_options);
GimpPressureOptions *pressure_options = paint_options->pressure_options;
GimpImage *image;
gdouble opacity;
TempBuf *area;
guchar col[MAX_CHANNELS];
GimpEraserOptions *options = GIMP_ERASER_OPTIONS (paint_options);
GimpContext *context = GIMP_CONTEXT (paint_options);
GimpImage *image;
gdouble opacity;
TempBuf *area;
guchar col[MAX_CHANNELS];
image = gimp_item_get_image (GIMP_ITEM (drawable));
......@@ -131,8 +130,9 @@ gimp_eraser_motion (GimpPaintCore *paint_core,
color_pixels (temp_buf_data (area), col,
area->width * area->height, area->bytes);
if (pressure_options->opacity)
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
opacity *= gimp_paint_options_get_dynamic_opacity (paint_options,
&paint_core->cur_coords,
paint_core->use_pressure);
gimp_brush_core_paste_canvas (GIMP_BRUSH_CORE (paint_core), drawable,
MIN (opacity, GIMP_OPACITY_OPAQUE),
......
......@@ -540,9 +540,9 @@ gimp_heal_motion (GimpSourceCore *source_core,
temp_buf_free (temp);
/* check the brush pressure */
if (paint_options->pressure_options->opacity)
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
opacity *= gimp_paint_options_get_dynamic_opacity (paint_options,
&paint_core->cur_coords,
paint_core->use_pressure);
/* replace the canvas with our healed data */
gimp_brush_core_replace_canvas (GIMP_BRUSH_CORE (paint_core),
......
......@@ -108,11 +108,13 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
GimpBrushCore *brush_core = GIMP_BRUSH_CORE (paint_core);
GimpContext *context = GIMP_CONTEXT (paint_options);
GimpPressureOptions *pressure_options = paint_options->pressure_options;
GimpVelocityOptions *velocity_options = paint_options->velocity_options;
GimpImage *image;
GimpRGB gradient_color;
TempBuf *area;
guchar col[MAX_CHANNELS];
GimpPaintApplicationMode paint_appl_mode;
gdouble colmix = 0.0;
image = gimp_item_get_image (GIMP_ITEM (drawable));
......@@ -125,11 +127,28 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
if (! area)
return;
if (paint_core->use_pressure &&
pressure_options->color &&
velocity_options->color)
{
colmix = (paint_core->cur_coords.pressure * 0.5 +
paint_core->cur_coords.velocity * 0.5);
}
else if (paint_core->use_pressure &&
pressure_options->color)
{
colmix = paint_core->cur_coords.pressure;
}
else if (velocity_options->color)
{
colmix = paint_core->cur_coords.velocity;
}
paint_appl_mode = paint_options->application_mode;
/* optionally take the color from the current gradient */
if (gimp_paint_options_get_gradient_color (paint_options, image,
paint_core->cur_coords.pressure,
colmix,
paint_core->pixel_dist,
&gradient_color))
{
......@@ -169,8 +188,9 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
area->bytes);
}
if (paint_core->use_pressure && pressure_options->opacity)
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
opacity *= gimp_paint_options_get_dynamic_opacity (paint_options,
&paint_core->cur_coords,
paint_core->use_pressure);
/* finally, let the brush core paste the colored area on the canvas */
gimp_brush_core_paste_canvas (brush_core, drawable,
......
......@@ -46,6 +46,14 @@
#define DEFAULT_PRESSURE_INVERSE_SIZE FALSE
#define DEFAULT_PRESSURE_COLOR FALSE
#define DEFAULT_VELOCITY_EXPANDED FALSE
#define DEFAULT_VELOCITY_OPACITY FALSE
#define DEFAULT_VELOCITY_HARDNESS FALSE
#define DEFAULT_VELOCITY_RATE FALSE
#define DEFAULT_VELOCITY_SIZE TRUE
#define DEFAULT_VELOCITY_INVERSE_SIZE FALSE
#define DEFAULT_VELOCITY_COLOR FALSE
#define DEFAULT_USE_FADE FALSE
#define DEFAULT_FADE_LENGTH 100.0
#define DEFAULT_FADE_UNIT GIMP_UNIT_PIXEL
......@@ -77,6 +85,14 @@ enum
PROP_PRESSURE_INVERSE_SIZE,
PROP_PRESSURE_COLOR,
PROP_VELOCITY_EXPANDED,
PROP_VELOCITY_OPACITY,
PROP_VELOCITY_HARDNESS,
PROP_VELOCITY_RATE,
PROP_VELOCITY_SIZE,
PROP_VELOCITY_INVERSE_SIZE,
PROP_VELOCITY_COLOR,
PROP_USE_FADE,
PROP_FADE_LENGTH,
PROP_FADE_UNIT,
......@@ -177,6 +193,35 @@ gimp_paint_options_class_init (GimpPaintOptionsClass *klass)
DEFAULT_PRESSURE_INVERSE_SIZE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_VELOCITY_EXPANDED,
"velocity-expanded", NULL,
DEFAULT_VELOCITY_EXPANDED,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_VELOCITY_OPACITY,
"velocity-opacity", NULL,
DEFAULT_VELOCITY_OPACITY,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_VELOCITY_HARDNESS,
"velocity-hardness", NULL,
DEFAULT_VELOCITY_HARDNESS,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_VELOCITY_RATE,
"velocity-rate", NULL,
DEFAULT_VELOCITY_RATE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_VELOCITY_SIZE,
"velocity-size", NULL,
DEFAULT_VELOCITY_SIZE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_VELOCITY_COLOR,
"velocity-color", NULL,
DEFAULT_VELOCITY_COLOR,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_VELOCITY_INVERSE_SIZE,
"velocity-inverse-size", NULL,
DEFAULT_VELOCITY_INVERSE_SIZE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_USE_FADE,
"use-fade", NULL,
DEFAULT_USE_FADE,
......@@ -264,6 +309,7 @@ gimp_paint_options_init (GimpPaintOptions *options)
options->application_mode_save = DEFAULT_APPLICATION_MODE;
options->pressure_options = g_slice_new0 (GimpPressureOptions);
options->velocity_options = g_slice_new0 (GimpVelocityOptions);
options->fade_options = g_slice_new0 (GimpFadeOptions);