Revert "app: Remove obsolete way of keeping track of last painted dab"

This reverts commit 1b62a7bff3.
This commit is contained in:
Alexia Death 2011-09-11 22:31:59 +03:00
parent 8beec385ee
commit 79dfee2c9e
2 changed files with 10 additions and 2 deletions

View file

@ -665,8 +665,8 @@ gimp_brush_core_interpolate (GimpPaintCore *paint_core,
*/
s0 += direction;
}
else if (x == (gint) floor (last_coords.y) &&
y == (gint) floor (last_coords.y))
else if (x == (gint) floor (paint_core->last_paint.x) &&
y == (gint) floor (paint_core->last_paint.y))
{
/* Exception B: If first stripe's brush position is within the
* same pixel square as the last plot of the previous line,
@ -774,6 +774,7 @@ gimp_brush_core_interpolate (GimpPaintCore *paint_core,
current_coords.velocity = last_coords.velocity + delta_velocity;
gimp_paint_core_set_current_coords (paint_core, &current_coords);
gimp_paint_core_set_last_coords (paint_core, &current_coords);
paint_core->distance = total;
paint_core->pixel_dist = pixel_initial + pixel_dist;

View file

@ -322,6 +322,13 @@ gimp_paint_core_paint (GimpPaintCore *core,
paint_state, time))
{
if (paint_state == GIMP_PAINT_STATE_MOTION)
{
/* Save coordinates for gimp_paint_core_interpolate() */
core->last_paint.x = core->cur_coords.x;
core->last_paint.y = core->cur_coords.y;
}
core_class->paint (core, drawable,
paint_options,
&core->cur_coords,