diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index ad6eb854e..3489f94bf 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -42,6 +42,9 @@ $Id$ Forcing it to always use white, which was the only background color in early versions of Tux Paint. + * Brushes with large spacing wouldn't be spaced properly when drawn + from bottom-to-top using the line tool. Fixed. + Pere Pujal i Carabantes 2008.February.25 (0.9.19) * New Localizations: diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 81eba072c..1387230e4 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -4090,13 +4090,14 @@ static void brush_draw(int x1, int y1, int x2, int y2, int update) if (y1 > y2) { - y = y1; - y1 = y2; - y2 = y; + for (y = y1; y >= y2; y--) + blit_brush(x1, y, direction); + } + else + { + for (y = y1; y <= y2; y++) + blit_brush(x1, y, direction); } - - for (y = y1; y <= y2; y++) - blit_brush(x1, y, direction); x1 = x1 + dx; }