Commit f14e42b0 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

better fix for bug #123811; patch provided by Philip Lafleur.

2004-05-21  Sven Neumann  <sven@gimp.org>

	* app/paint/gimppaintcore.c (gimp_paint_core_interpolate): better
	fix for bug #123811; patch provided by Philip Lafleur.
parent a8becd6b
2004-05-21 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintcore.c (gimp_paint_core_interpolate): better
fix for bug #123811; patch provided by Philip Lafleur.
2004-05-21 Sven Neumann <sven@gimp.org>
* app/gui/preferences-dialog.c: added some GtkSizeGroups and
......
......@@ -887,19 +887,18 @@ gimp_paint_core_interpolate (GimpPaintCore *core,
for (n = 0; n < num_points; n++)
{
GimpBrush *current_brush;
gdouble pressure;
gdouble t = t0 + n*dt;
gdouble t = t0 + n * dt;
gdouble p = (gdouble) n / num_points;
core->cur_coords.x = core->last_coords.x + t * delta_vec.x;
core->cur_coords.y = core->last_coords.y + t * delta_vec.y;
/* avoid negative pressure, see bug #123811 */
pressure = core->last_coords.pressure + t * delta_pressure;
core->cur_coords.pressure = MAX (pressure, 0.0);
core->cur_coords.xtilt = core->last_coords.xtilt + t * delta_xtilt;
core->cur_coords.ytilt = core->last_coords.ytilt + t * delta_ytilt;
core->cur_coords.wheel = core->last_coords.wheel + t * delta_wheel;
core->cur_coords.pressure = core->last_coords.pressure + p * delta_pressure;
core->cur_coords.xtilt = core->last_coords.xtilt + p * delta_xtilt;
core->cur_coords.ytilt = core->last_coords.ytilt + p * delta_ytilt;
core->cur_coords.wheel = core->last_coords.wheel + p * delta_wheel;
core->distance = initial + t * dist;
core->pixel_dist = pixel_initial + t * pixel_dist;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment