a slightly more conventional method of drawing the grid lines, and
thereby fix printing.
[originally from svn r7335]
+ /*
+ * Clip to the grid square.
+ */
+ clip(dr, BORDER + x*TILE_SIZE, BORDER + y*TILE_SIZE,
+ TILE_SIZE, TILE_SIZE);
+
/*
* Clear the square.
*/
draw_rect(dr,
/*
* Clear the square.
*/
draw_rect(dr,
- BORDER + x*TILE_SIZE + 1,
- BORDER + y*TILE_SIZE + 1,
- TILE_SIZE - 1,
- TILE_SIZE - 1,
+ BORDER + x*TILE_SIZE,
+ BORDER + y*TILE_SIZE,
+ TILE_SIZE,
+ TILE_SIZE,
(flags & CURSOR_BG ? COL_HIGHLIGHT :
flags & ERROR_BG ? COL_ERROR :
flags & CORRECT_BG ? COL_CORRECT : COL_BACKGROUND));
(flags & CURSOR_BG ? COL_HIGHLIGHT :
flags & ERROR_BG ? COL_ERROR :
flags & CORRECT_BG ? COL_CORRECT : COL_BACKGROUND));
+ /*
+ * Draw the grid lines.
+ */
+ draw_line(dr, BORDER + x*TILE_SIZE, BORDER + y*TILE_SIZE,
+ BORDER + (x+1)*TILE_SIZE, BORDER + y*TILE_SIZE, COL_GRID);
+ draw_line(dr, BORDER + x*TILE_SIZE, BORDER + y*TILE_SIZE,
+ BORDER + x*TILE_SIZE, BORDER + (y+1)*TILE_SIZE, COL_GRID);
+
BORDER_WIDTH,
BORDER_WIDTH,
COL_GRID);
BORDER_WIDTH,
BORDER_WIDTH,
COL_GRID);
- BORDER + x*TILE_SIZE - 1,
- BORDER + y*TILE_SIZE - 1,
- TILE_SIZE + 3,
- TILE_SIZE + 3);
+ BORDER + x*TILE_SIZE,
+ BORDER + y*TILE_SIZE,
+ TILE_SIZE,
+ TILE_SIZE);
}
static void draw_grid(drawing *dr, game_drawstate *ds, game_state *state,
}
static void draw_grid(drawing *dr, game_drawstate *ds, game_state *state,
+ print_line_width(dr, TILE_SIZE / 64);
draw_grid(dr, ds, state, NULL, FALSE, borders, FALSE);
/*
draw_grid(dr, ds, state, NULL, FALSE, borders, FALSE);
/*