Translate matrix by 0.5 pixels, solves antialiasing issue
git-svn-id: file:///home/vcs/svn/jsweeper/trunk@19 6611ac79-6612-48ef-a1e9-b906f853523emaster
parent
0b7422085b
commit
363d5ae27c
|
@ -323,6 +323,7 @@ bool Matrix::on_expose_event(GdkEventExpose *event)
|
||||||
Cairo::RefPtr<Cairo::Context> cr = window->create_cairo_context();
|
Cairo::RefPtr<Cairo::Context> cr = window->create_cairo_context();
|
||||||
cr->set_line_width(1.0);
|
cr->set_line_width(1.0);
|
||||||
cr->set_antialias(Cairo::ANTIALIAS_NONE);
|
cr->set_antialias(Cairo::ANTIALIAS_NONE);
|
||||||
|
cr->translate(0.5, 0.5);
|
||||||
|
|
||||||
// Set clipping area
|
// Set clipping area
|
||||||
cr->rectangle(event->area.x, event->area.y, event->area.width, event->area.height);
|
cr->rectangle(event->area.x, event->area.y, event->area.width, event->area.height);
|
||||||
|
@ -509,7 +510,7 @@ bool Matrix::on_expose_event(GdkEventExpose *event)
|
||||||
// } else {
|
// } else {
|
||||||
SetColour(cr, cfg.TabPortAudio);
|
SetColour(cr, cfg.TabPortAudio);
|
||||||
// }
|
// }
|
||||||
cr->rectangle(x + 1, y + 1, m_separation - 1, m_separation - 1);
|
cr->rectangle(x + 1, y + 1, m_separation - 2, m_separation - 2);
|
||||||
cr->fill();
|
cr->fill();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue