Move cairo clipping area to before translate command.
git-svn-id: file:///home/vcs/svn/jsweeper/trunk@21 6611ac79-6612-48ef-a1e9-b906f853523emaster
parent
c422a5d50c
commit
93688e170f
|
@ -321,14 +321,15 @@ bool Matrix::on_expose_event(GdkEventExpose *event)
|
|||
const int alloc_height = allocation.get_height();
|
||||
|
||||
Cairo::RefPtr<Cairo::Context> cr = window->create_cairo_context();
|
||||
cr->set_line_width(1.0);
|
||||
cr->set_antialias(Cairo::ANTIALIAS_NONE);
|
||||
cr->translate(0.5, 0.5);
|
||||
|
||||
// Set clipping area
|
||||
cr->rectangle(event->area.x, event->area.y, event->area.width, event->area.height);
|
||||
cr->clip();
|
||||
|
||||
cr->set_line_width(1.0);
|
||||
cr->set_antialias(Cairo::ANTIALIAS_NONE);
|
||||
cr->translate(0.5, 0.5);
|
||||
|
||||
// Clear background
|
||||
SetColour(cr, cfg.Background);
|
||||
cr->rectangle(0, 0, alloc_width, alloc_height);
|
||||
|
|
Loading…
Reference in New Issue