chiark / gitweb /
tracks: thicken the lines of the grid itself.
authorSimon Tatham <anakin@pobox.com>
Fri, 29 Sep 2017 16:22:56 +0000 (17:22 +0100)
committerSimon Tatham <anakin@pobox.com>
Fri, 29 Sep 2017 16:40:00 +0000 (17:40 +0100)
commit74aff6741b50c58c71527a0524e3f6b081a2da7e
treebb2ed555b38ebb0ba38c4dc812d2df081228bd74
parentc2a8a60a09165c0da6e2cd1faad2905ecff1e995
tracks: thicken the lines of the grid itself.

Since these lines are always orthogonal, it's easier to draw them
using draw_rect than draw_thick_line.

Previously, the grid lines were drawn just inside the top and left
edges of the region redrawn by draw_square(), so only the bottom and
right edges of the whole grid were not covered by any draw_square
call. To avoid having to shift the logical grid centre, I'm now
drawing parts of the grid outline on all four sides of the
draw_square() region, so that half the thickened grid edge protrudes
on every side of the grid as a whole.

In the process of splitting up the grid line width into the part on
the top and left edges and the part on the bottom and right, I've
renamed the confusingly named BORDER_WIDTH define (which wasn't used
anyway) to a set of things that make it clear that they're referring
to the grid lines as opposed to the border of the whole puzzle.
tracks.c