From 363d5ae27c256d99dd706bc7c4f63095eb2238a1 Mon Sep 17 00:00:00 2001 From: petern Date: Mon, 30 Nov 2009 18:09:46 +0000 Subject: [PATCH] Translate matrix by 0.5 pixels, solves antialiasing issue git-svn-id: file:///home/vcs/svn/jsweeper/trunk@19 6611ac79-6612-48ef-a1e9-b906f853523e --- src/matrix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/matrix.cpp b/src/matrix.cpp index 2d66643..5dfe4d3 100644 --- a/src/matrix.cpp +++ b/src/matrix.cpp @@ -323,6 +323,7 @@ bool Matrix::on_expose_event(GdkEventExpose *event) Cairo::RefPtr 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); @@ -509,7 +510,7 @@ bool Matrix::on_expose_event(GdkEventExpose *event) // } else { 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(); }