diff options
Diffstat (limited to 'plugingui/painter.cc')
-rw-r--r-- | plugingui/painter.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugingui/painter.cc b/plugingui/painter.cc index b74952f..e5da246 100644 --- a/plugingui/painter.cc +++ b/plugingui/painter.cc @@ -191,9 +191,16 @@ void GUI::Painter::drawRectangle(int x1, int y1, int x2, int y2) void GUI::Painter::drawFilledRectangle(int x1, int y1, int x2, int y2) { - for(int x = x1; x < x2; x++) { - for(int y = y1; y < y2; y++) { - drawPoint(x, y); + for(int y = y1; y < y2; y++) { + drawLine(x1, y, x2, y); + } +} + +void GUI::Painter::clear() +{ + for(int x = 0; x < pixbuf->width; x++) { + for(int y = 0; y < pixbuf->height; y++) { + pixbuf->setPixel(x, y, 0, 0, 0, 0); } } } |