From b9d74b9aa423bfb0516c42e81e4f78b406836755 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 26 May 2004 16:13:53 +0000 Subject: [PATCH] added "guint32 time" parameters to GimpPaintCore::paint() and 2004-05-26 Michael Natterer * 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. --- ChangeLog | 21 ++++++++++++++++++++ app/paint/gimpairbrush.c | 17 ++++++++++------ app/paint/gimpbrushcore.c | 15 ++++++++++----- app/paint/gimpclone.c | 6 ++++-- app/paint/gimpconvolve.c | 6 ++++-- app/paint/gimpdodgeburn.c | 6 ++++-- app/paint/gimperaser.c | 6 ++++-- app/paint/gimpink.c | 10 ++++------ app/paint/gimppaintbrush.c | 6 ++++-- app/paint/gimppaintcore-stroke.c | 31 ++++++++++++++++++------------ app/paint/gimppaintcore.c | 33 ++++++++++++++++++++------------ app/paint/gimppaintcore.h | 15 ++++++++++----- app/paint/gimpsmudge.c | 6 ++++-- app/paint/gimpsourcecore.c | 6 ++++-- app/tools/gimpbrushtool.c | 20 +++++++++---------- app/tools/gimppainttool.c | 20 +++++++++---------- 16 files changed, 144 insertions(+), 80 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51b443870d..1931bfa5eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2004-05-26 Michael Natterer + + * 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 * app/paint/Makefile.am diff --git a/app/paint/gimpairbrush.c b/app/paint/gimpairbrush.c index 2c9d70865c..d72165a11f 100644 --- a/app/paint/gimpairbrush.c +++ b/app/paint/gimpairbrush.c @@ -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))); diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c index 7c40f80c39..476bacbf91 100644 --- a/app/paint/gimpbrushcore.c +++ b/app/paint/gimpbrushcore.c @@ -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; diff --git a/app/paint/gimpclone.c b/app/paint/gimpclone.c index d0c279f5ff..7a64f26953 100644 --- a/app/paint/gimpclone.c +++ b/app/paint/gimpclone.c @@ -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; diff --git a/app/paint/gimpconvolve.c b/app/paint/gimpconvolve.c index c952c04ab3..f2f7a4729b 100644 --- a/app/paint/gimpconvolve.c +++ b/app/paint/gimpconvolve.c @@ -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) { diff --git a/app/paint/gimpdodgeburn.c b/app/paint/gimpdodgeburn.c index 93ac65634e..6c76e2d657 100644 --- a/app/paint/gimpdodgeburn.c +++ b/app/paint/gimpdodgeburn.c @@ -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); diff --git a/app/paint/gimperaser.c b/app/paint/gimperaser.c index cb2cf0562b..59d774b68c 100644 --- a/app/paint/gimperaser.c +++ b/app/paint/gimperaser.c @@ -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) { diff --git a/app/paint/gimpink.c b/app/paint/gimpink.c index ec6f9834ce..9c5c12b74f 100644 --- a/app/paint/gimpink.c +++ b/app/paint/gimpink.c @@ -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: diff --git a/app/paint/gimppaintbrush.c b/app/paint/gimppaintbrush.c index 70ddd1b93a..ba603c62b8 100644 --- a/app/paint/gimppaintbrush.c +++ b/app/paint/gimppaintbrush.c @@ -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) { diff --git a/app/paint/gimppaintcore-stroke.c b/app/paint/gimppaintcore-stroke.c index bb9347899b..a84f876211 100644 --- a/app/paint/gimppaintcore-stroke.c +++ b/app/paint/gimppaintcore-stroke.c @@ -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); } } diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c index dcdd204b00..f85b58d54b 100644 --- a/app/paint/gimppaintcore.c +++ b/app/paint/gimppaintcore.c @@ -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); } diff --git a/app/paint/gimppaintcore.h b/app/paint/gimppaintcore.h index e095f6e3ec..7ae50629b2 100644 --- a/app/paint/gimppaintcore.h +++ b/app/paint/gimppaintcore.h @@ -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 */ diff --git a/app/paint/gimpsmudge.c b/app/paint/gimpsmudge.c index 758590cdf6..3b6aaaf9db 100644 --- a/app/paint/gimpsmudge.c +++ b/app/paint/gimpsmudge.c @@ -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); diff --git a/app/paint/gimpsourcecore.c b/app/paint/gimpsourcecore.c index d0c279f5ff..7a64f26953 100644 --- a/app/paint/gimpsourcecore.c +++ b/app/paint/gimpsourcecore.c @@ -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; diff --git a/app/tools/gimpbrushtool.c b/app/tools/gimpbrushtool.c index 87cc98c3a1..8d19afa84f 100644 --- a/app/tools/gimpbrushtool.c +++ b/app/tools/gimpbrushtool.c @@ -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 diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c index 87cc98c3a1..8d19afa84f 100644 --- a/app/tools/gimppainttool.c +++ b/app/tools/gimppainttool.c @@ -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 -- GitLab