Make sure that we clear the cairo context before we begin drawing to it.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5417 4a71c877-e1ca-e34f-864e-861f7616d084
master
Freddie Witherden 2008-07-08 10:15:52 +00:00
parent f2b30f27c8
commit 0160a3e859
1 changed files with 8 additions and 0 deletions

View File

@ -230,6 +230,14 @@ void widgetDraw(widget *self)
{
self->needsRedraw = false;
// Clear the current context
cairo_set_operator(self->cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_rgba(self->cr, 0.0, 0.0, 0.0, 0.0);
cairo_paint(self->cr);
// Restore the compositing operator back to the default
cairo_set_operator(self->cr, CAIRO_OPERATOR_OVER);
// Redaw ourself
widgetDoDraw(self);
}