{
/* draws a grid starting around Nx, Ny squares starting at x,y */
int i;
+ float odd = (lineGap & 1)/2.;
cairo_t *cr;
/* get a cairo_t */
/* lines in X */
for (i = 0; i < BOARD_WIDTH + BOARD_HEIGHT + 2; i++)
{
- cairo_move_to (cr, gridSegments[i].x1, gridSegments[i].y1);
- cairo_line_to (cr, gridSegments[i].x2, gridSegments[i].y2);
+ cairo_move_to (cr, gridSegments[i].x1 + odd, gridSegments[i].y1 + odd);
+ cairo_line_to (cr, gridSegments[i].x2 + odd, gridSegments[i].y2 + odd);
cairo_stroke (cr);
}
SetPen(cr, lineGap, col, 0);
cairo_stroke(cr);
cairo_destroy(cr);
- GraphExpose(currBoard, x - lineGap/2, y - lineGap/2, squareSize+lineGap+odd, squareSize+lineGap+odd);
+ GraphExpose(currBoard, x - lineGap/2, y - lineGap/2, squareSize+2*lineGap+odd, squareSize+2*lineGap+odd);
}
static int
}
cr = cairo_create((cairo_surface_t *) graph->textValue);
cairo_set_source_surface(cr, (cairo_surface_t *) graph->choice, 0, 0);
+ cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
cairo_rectangle(cr, ((XExposeEvent*)event)->x, ((XExposeEvent*)event)->y, ((XExposeEvent*)event)->width, ((XExposeEvent*)event)->height);
cairo_fill(cr);
cairo_destroy(cr);