Commit b9d74b9a authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

added "guint32 time" parameters to GimpPaintCore::paint() and

2004-05-26  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.[ch]: added "guint32 time" parameters
	to GimpPaintCore::paint() and ::interpolate().

	* app/paint/gimpairbrush.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimpsmudge.c: changed accordingly.

	* app/paint/gimpink.c: ditto and use the passed time instead of
	hardcoded dummy values.

	* app/paint/gimppaintcore-stroke.c: pass '0' as time.

	* app/tools/gimppainttool.c: pass the GdkEvent time.
parent 5ccd9a56
2004-05-26 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintcore.[ch]: added "guint32 time" parameters
to GimpPaintCore::paint() and ::interpolate().
* app/paint/gimpairbrush.c
* app/paint/gimpbrushcore.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimppaintbrush.c
* app/paint/gimpsmudge.c: changed accordingly.
* app/paint/gimpink.c: ditto and use the passed time instead of
hardcoded dummy values.
* app/paint/gimppaintcore-stroke.c: pass '0' as time.
* app/tools/gimppainttool.c: pass the GdkEvent time.
2004-05-26 Michael Natterer <mitch@gimp.org>
* app/paint/Makefile.am
......
......@@ -48,7 +48,8 @@ static void gimp_airbrush_finalize (GObject *object);
static void gimp_airbrush_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
static void gimp_airbrush_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options);
......@@ -133,7 +134,8 @@ static void
gimp_airbrush_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state)
GimpPaintCoreState paint_state,
guint32 time)
{
GimpAirbrush *airbrush = GIMP_AIRBRUSH (paint_core);
GimpAirbrushOptions *options = GIMP_AIRBRUSH_OPTIONS (paint_options);
......@@ -148,7 +150,8 @@ gimp_airbrush_paint (GimpPaintCore *paint_core,
}
GIMP_PAINT_CORE_CLASS (parent_class)->paint (paint_core, drawable,
paint_options, paint_state);
paint_options,
paint_state, time);
break;
case MOTION_PAINT:
......@@ -185,12 +188,14 @@ gimp_airbrush_paint (GimpPaintCore *paint_core,
}
GIMP_PAINT_CORE_CLASS (parent_class)->paint (paint_core, drawable,
paint_options, paint_state);
paint_options,
paint_state, time);
break;
default:
GIMP_PAINT_CORE_CLASS (parent_class)->paint (paint_core, drawable,
paint_options, paint_state);
paint_options,
paint_state, time);
break;
}
}
......@@ -224,7 +229,7 @@ gimp_airbrush_timeout (gpointer data)
gimp_airbrush_paint (GIMP_PAINT_CORE (airbrush),
airbrush->drawable,
airbrush->paint_options,
MOTION_PAINT);
MOTION_PAINT, 0);
gimp_image_flush (gimp_item_get_image (GIMP_ITEM (airbrush->drawable)));
......
......@@ -58,10 +58,12 @@ static gboolean gimp_brush_core_start (GimpPaintCore *core,
static gboolean gimp_brush_core_pre_paint (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
static void gimp_brush_core_interpolate (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options);
GimpPaintOptions *paint_options,
guint32 time);
static TempBuf *gimp_brush_core_get_paint_area (GimpPaintCore *paint_core,
GimpDrawable *drawable,
......@@ -268,7 +270,8 @@ static gboolean
gimp_brush_core_pre_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state)
GimpPaintCoreState paint_state,
guint32 time)
{
GimpBrushCore *core = GIMP_BRUSH_CORE (paint_core);
......@@ -378,7 +381,8 @@ gimp_avoid_exact_integer (gdouble *x)
static void
gimp_brush_core_interpolate (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options)
GimpPaintOptions *paint_options,
guint32 time)
{
GimpBrushCore *core = GIMP_BRUSH_CORE (paint_core);
GimpVector2 delta_vec;
......@@ -607,7 +611,8 @@ gimp_brush_core_interpolate (GimpPaintCore *paint_core,
/* save the current brush */
current_brush = core->brush;
gimp_paint_core_paint (paint_core, drawable, paint_options, MOTION_PAINT);
gimp_paint_core_paint (paint_core, drawable, paint_options,
MOTION_PAINT, time);
/* restore the current brush pointer */
core->brush = current_brush;
......
......@@ -47,7 +47,8 @@ static void gimp_clone_init (GimpClone *clone);
static void gimp_clone_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
static void gimp_clone_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options);
......@@ -155,7 +156,8 @@ static void
gimp_clone_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state)
GimpPaintCoreState paint_state,
guint32 time)
{
static gint orig_src_x = 0;
static gint orig_src_y = 0;
......
......@@ -61,7 +61,8 @@ static void gimp_convolve_init (GimpConvolve *convolve);
static void gimp_convolve_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
static void gimp_convolve_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options);
......@@ -170,7 +171,8 @@ static void
gimp_convolve_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state)
GimpPaintCoreState paint_state,
guint32 time)
{
switch (paint_state)
{
......
......@@ -48,7 +48,8 @@ static void gimp_dodge_burn_finalize (GObject *object);
static void gimp_dodge_burn_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
static void gimp_dodge_burn_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options);
......@@ -153,7 +154,8 @@ static void
gimp_dodge_burn_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state)
GimpPaintCoreState paint_state,
guint32 time)
{
GimpDodgeBurn *dodgeburn = GIMP_DODGE_BURN (paint_core);
GimpDodgeBurnOptions *options = GIMP_DODGE_BURN_OPTIONS (paint_options);
......
......@@ -44,7 +44,8 @@ static void gimp_eraser_init (GimpEraser *eraser);
static void gimp_eraser_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
static void gimp_eraser_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options);
......@@ -113,7 +114,8 @@ static void
gimp_eraser_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state)
GimpPaintCoreState paint_state,
guint32 time)
{
switch (paint_state)
{
......
......@@ -54,7 +54,8 @@ static void gimp_ink_finalize (GObject *object);
static void gimp_ink_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
static TempBuf * gimp_ink_get_paint_area (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options);
......@@ -165,15 +166,12 @@ static void
gimp_ink_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state)
GimpPaintCoreState paint_state,
guint32 time)
{
GimpInk *ink = GIMP_INK (paint_core);
GimpInkOptions *options = GIMP_INK_OPTIONS (paint_options);
static guint32 time = 23;
time += 42;
switch (paint_state)
{
case PRETRACE_PAINT:
......
......@@ -48,7 +48,8 @@ static void gimp_paintbrush_init (GimpPaintbrush *paintbrush);
static void gimp_paintbrush_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
static GimpPaintCoreClass *parent_class = NULL;
......@@ -114,7 +115,8 @@ static void
gimp_paintbrush_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state)
GimpPaintCoreState paint_state,
guint32 time)
{
switch (paint_state)
{
......
......@@ -60,12 +60,14 @@ gimp_paint_core_stroke (GimpPaintCore *core,
core->start_coords = strokes[0];
core->last_coords = strokes[0];
gimp_paint_core_paint (core, drawable, paint_options, INIT_PAINT);
gimp_paint_core_paint (core, drawable, paint_options,
INIT_PAINT, 0);
if (brush_core)
current_brush = brush_core->brush;
gimp_paint_core_paint (core, drawable, paint_options, MOTION_PAINT);
gimp_paint_core_paint (core, drawable, paint_options,
MOTION_PAINT, 0);
if (brush_core)
brush_core->brush = current_brush;
......@@ -74,10 +76,11 @@ gimp_paint_core_stroke (GimpPaintCore *core,
{
core->cur_coords = strokes[i];
gimp_paint_core_interpolate (core, drawable, paint_options);
gimp_paint_core_interpolate (core, drawable, paint_options, 0);
}
gimp_paint_core_paint (core, drawable, paint_options, FINISH_PAINT);
gimp_paint_core_paint (core, drawable, paint_options,
FINISH_PAINT, 0);
gimp_paint_core_finish (core, drawable);
......@@ -183,12 +186,14 @@ gimp_paint_core_stroke_boundary (GimpPaintCore *core,
core->start_coords = coords[0];
core->last_coords = coords[0];
gimp_paint_core_paint (core, drawable, paint_options, INIT_PAINT);
gimp_paint_core_paint (core, drawable, paint_options,
INIT_PAINT, 0);
if (brush_core)
current_brush = brush_core->brush;
gimp_paint_core_paint (core, drawable, paint_options, MOTION_PAINT);
gimp_paint_core_paint (core, drawable, paint_options,
MOTION_PAINT, 0);
if (brush_core)
brush_core->brush = current_brush;
......@@ -197,10 +202,11 @@ gimp_paint_core_stroke_boundary (GimpPaintCore *core,
{
core->cur_coords = coords[i];
gimp_paint_core_interpolate (core, drawable, paint_options);
gimp_paint_core_interpolate (core, drawable, paint_options, 0);
}
gimp_paint_core_paint (core, drawable, paint_options, FINISH_PAINT);
gimp_paint_core_paint (core, drawable, paint_options,
FINISH_PAINT, 0);
}
n_coords = 0;
......@@ -282,13 +288,14 @@ gimp_paint_core_stroke_vectors (GimpPaintCore *core,
core->start_coords = g_array_index (coords, GimpCoords, 0);
core->last_coords = g_array_index (coords, GimpCoords, 0);
gimp_paint_core_paint (core, drawable, paint_options, INIT_PAINT);
gimp_paint_core_paint (core, drawable, paint_options,
INIT_PAINT, 0);
if (brush_core)
current_brush = brush_core->brush;
gimp_paint_core_paint (core, drawable, paint_options,
MOTION_PAINT);
MOTION_PAINT, 0);
if (brush_core)
brush_core->brush = current_brush;
......@@ -297,11 +304,11 @@ gimp_paint_core_stroke_vectors (GimpPaintCore *core,
{
core->cur_coords = g_array_index (coords, GimpCoords, i);
gimp_paint_core_interpolate (core, drawable, paint_options);
gimp_paint_core_interpolate (core, drawable, paint_options, 0);
}
gimp_paint_core_paint (core, drawable, paint_options,
FINISH_PAINT);
FINISH_PAINT, 0);
}
}
......
......@@ -59,14 +59,17 @@ static gboolean gimp_paint_core_real_start (GimpPaintCore *core,
static gboolean gimp_paint_core_real_pre_paint (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
static void gimp_paint_core_real_paint (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
static void gimp_paint_core_real_interpolate (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *options);
GimpPaintOptions *options,
guint32 time);
static TempBuf * gimp_paint_core_real_get_paint_area (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *options);
......@@ -173,7 +176,8 @@ static gboolean
gimp_paint_core_real_pre_paint (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state)
GimpPaintCoreState paint_state,
guint32 time)
{
return TRUE;
}
......@@ -182,16 +186,19 @@ static void
gimp_paint_core_real_paint (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state)
GimpPaintCoreState paint_state,
guint32 time)
{
}
static void
gimp_paint_core_real_interpolate (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options)
GimpPaintOptions *paint_options,
guint32 time)
{
gimp_paint_core_paint (core, drawable, paint_options, MOTION_PAINT);
gimp_paint_core_paint (core, drawable, paint_options,
MOTION_PAINT, time);
core->last_coords = core->cur_coords;
}
......@@ -208,7 +215,8 @@ void
gimp_paint_core_paint (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state)
GimpPaintCoreState paint_state,
guint32 time)
{
g_return_if_fail (GIMP_IS_PAINT_CORE (core));
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
......@@ -217,7 +225,7 @@ gimp_paint_core_paint (GimpPaintCore *core,
if (GIMP_PAINT_CORE_GET_CLASS (core)->pre_paint (core, drawable,
paint_options,
paint_state))
paint_state, time))
{
if (paint_state == MOTION_PAINT)
{
......@@ -228,7 +236,7 @@ gimp_paint_core_paint (GimpPaintCore *core,
GIMP_PAINT_CORE_GET_CLASS (core)->paint (core, drawable,
paint_options,
paint_state);
paint_state, time);
}
}
......@@ -483,7 +491,8 @@ gimp_paint_core_constrain (GimpPaintCore *core)
void
gimp_paint_core_interpolate (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options)
GimpPaintOptions *paint_options,
guint32 time)
{
g_return_if_fail (GIMP_IS_PAINT_CORE (core));
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
......@@ -491,7 +500,7 @@ gimp_paint_core_interpolate (GimpPaintCore *core,
g_return_if_fail (GIMP_IS_PAINT_OPTIONS (paint_options));
GIMP_PAINT_CORE_GET_CLASS (core)->interpolate (core, drawable,
paint_options);
paint_options, time);
}
......
......@@ -111,15 +111,18 @@ struct _GimpPaintCoreClass
gboolean (* pre_paint) (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
void (* paint) (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
void (* interpolate) (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options);
GimpPaintOptions *paint_options,
guint32 time);
TempBuf * (* get_paint_area) (GimpPaintCore *core,
GimpDrawable *drawable,
......@@ -132,7 +135,8 @@ GType gimp_paint_core_get_type (void) G_GNUC_CONST;
void gimp_paint_core_paint (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState state);
GimpPaintCoreState state,
guint32 time);
gboolean gimp_paint_core_start (GimpPaintCore *core,
GimpDrawable *drawable,
......@@ -148,7 +152,8 @@ void gimp_paint_core_constrain (GimpPaintCore *core);
void gimp_paint_core_interpolate (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options);
GimpPaintOptions *paint_options,
guint32 time);
/* protected functions */
......
......@@ -48,7 +48,8 @@ static void gimp_smudge_finalize (GObject *object);
static void gimp_smudge_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
static gboolean gimp_smudge_start (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options);
......@@ -145,7 +146,8 @@ static void
gimp_smudge_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state)
GimpPaintCoreState paint_state,
guint32 time)
{
GimpSmudge *smudge = GIMP_SMUDGE (paint_core);
......
......@@ -47,7 +47,8 @@ static void gimp_clone_init (GimpClone *clone);
static void gimp_clone_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
GimpPaintCoreState paint_state,
guint32 time);
static void gimp_clone_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options);
......@@ -155,7 +156,8 @@ static void
gimp_clone_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state)
GimpPaintCoreState paint_state,
guint32 time)
{
static gint orig_src_x = 0;
static gint orig_src_y = 0;
......
......@@ -268,7 +268,7 @@ gimp_paint_tool_control (GimpTool *tool,
gimp_paint_core_paint (paint_tool->core,
drawable,
GIMP_PAINT_OPTIONS (tool->tool_info->tool_options),
FINISH_PAINT);
FINISH_PAINT, 0);
gimp_paint_core_cleanup (paint_tool->core);
#if 0
......@@ -425,29 +425,29 @@ gimp_paint_tool_button_press (GimpTool *tool,
gimp_image_selection_control (gdisp->gimage, GIMP_SELECTION_PAUSE);
/* Let the specific painting function initialize itself */
gimp_paint_core_paint (core, drawable, paint_options, INIT_PAINT);
gimp_paint_core_paint (core, drawable, paint_options, INIT_PAINT, time);
/* store the current brush pointer */
if (GIMP_IS_BRUSH_CORE (core))
current_brush = GIMP_BRUSH_CORE (core)->brush;
if (core->flags & CORE_TRACES_ON_WINDOW)
gimp_paint_core_paint (core, drawable, paint_options, PRETRACE_PAINT);
gimp_paint_core_paint (core, drawable, paint_options, PRETRACE_PAINT, time);
/* Paint to the image */
if (paint_tool->draw_line)
{
gimp_paint_core_interpolate (core, drawable, paint_options);
gimp_paint_core_interpolate (core, drawable, paint_options, time);
}
else
{
gimp_paint_core_paint (core, drawable, paint_options, MOTION_PAINT);
gimp_paint_core_paint (core, drawable, paint_options, MOTION_PAINT, time);
}
gimp_display_flush_now (gdisp);
if (core->flags & CORE_TRACES_ON_WINDOW)
gimp_paint_core_paint (core, drawable, paint_options, POSTTRACE_PAINT);
gimp_paint_core_paint (core, drawable, paint_options, POSTTRACE_PAINT, time);
/* restore the current brush pointer */
if (GIMP_IS_BRUSH_CORE (core))
......@@ -474,7 +474,7 @@ gimp_paint_tool_button_release (GimpTool *tool,
drawable = gimp_image_active_drawable (gdisp->gimage);
/* Let the specific painting function finish up */
gimp_paint_core_paint (core, drawable, paint_options, FINISH_PAINT);
gimp_paint_core_paint (core, drawable, paint_options, FINISH_PAINT, time);
/* resume the current selection */
gimp_image_selection_control (gdisp->gimage, GIMP_SELECTION_RESUME);
......@@ -523,14 +523,14 @@ gimp_paint_tool_motion (GimpTool *tool,
return;
if (core->flags & CORE_TRACES_ON_WINDOW)
gimp_paint_core_paint (core, drawable, paint_options, PRETRACE_PAINT);
gimp_paint_core_paint (core, drawable, paint_options, PRETRACE_PAINT, time);
gimp_paint_core_interpolate (core, drawable, paint_options);
gimp_paint_core_interpolate (core, drawable, paint_options, time);
gimp_display_flush_now (gdisp);
if (core->flags & CORE_TRACES_ON_WINDOW)
gimp_paint_core_paint (core, drawable, paint_options, POSTTRACE_PAINT);
gimp_paint_core_paint (core, drawable, paint_options, POSTTRACE_PAINT, time);
}
static void
......
......@@ -268,7 +268,7 @@ gimp_paint_tool_control (GimpTool *tool,
gimp_paint_core_paint (paint_tool->core,
drawable,
GIMP_PAINT_OPTIONS (tool->tool_info->tool_options),
FINISH_PAINT);
FINISH_PAINT, 0);
gimp_paint_core_cleanup (paint_tool->core);
#if 0
......@@ -425,29 +425,29 @@ gimp_paint_tool_button_press (GimpTool *tool,
gimp_image_selection_control (gdisp->gimage, GIMP_SELECTION_PAUSE);
/* Let the specific painting function initialize itself */
gimp_paint_core_paint (core, drawable, paint_options, INIT_PAINT);
gimp_paint_core_paint (core, drawable, paint_options, INIT_PAINT, time);
/* store the current brush pointer */
if (GIMP_IS_BRUSH_CORE (core))
current_brush = GIMP_BRUSH_CORE (core)->brush;
if (core->flags & CORE_TRACES_ON_WINDOW)
gimp_paint_core_paint (core, drawable, paint_options, PRETRACE_PAINT);
gimp_paint_core_paint (core, drawable, paint_options, PRETRACE_PAINT, time);
/* Paint to the image */
if (paint_tool->draw_line)
{
gimp_paint_core_interpolate (core, drawable, paint_options);
gimp_paint_core_interpolate (core, drawable, paint_options, time);
}
else
{
gimp_paint_core_paint (core, drawable, paint_options, MOTION_PAINT);
gimp_paint_core_paint (core, drawable, paint_options, MOTION_PAINT, time);
}
gimp_display_flush_now (gdisp);
if (core->flags & CORE_TRACES_ON_WINDOW)
gimp_paint_core_paint (core, drawable, paint_options, POSTTRACE_PAINT);
gimp_paint_core_paint (core, drawable, paint_options, POSTTRACE_PAINT, time);
/* restore the current brush pointer */
if (GIMP_IS_BRUSH_CORE (core))
......@@ -474,7 +474,7 @@ gimp_paint_tool_button_release (GimpTool *tool,
drawable = gimp_image_active_drawable (gdisp->gimage);
/* Let the specific painting function finish up */
gimp_paint_core_paint (core, drawable, paint_options, FINISH_PAINT);
gimp_paint_core_paint (core, drawable, paint_options, FINISH_PAINT, time);
/* resume the current selection */
gimp_image_selection_control (gdisp->gimage, GIMP_SELECTION_RESUME);
......@@ -523,14 +523,14 @@ gimp_paint_tool_motion (GimpTool *tool,
return;