aboutsummaryrefslogtreecommitdiff
path: root/html/pattern.html
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2022-01-27 18:25:14 +0000
committerSimon Tatham <anakin@pobox.com>2022-01-27 18:25:14 +0000
commit534384e5de95e8d4d0f60277befc922b6796b705 (patch)
treed772d727e9fd5125accc710388638bc6671f638c /html/pattern.html
parent229d062d6ce63f0a5e00d2de62ee0fb389ccfdb6 (diff)
downloadpuzzles-534384e5de95e8d4d0f60277befc922b6796b705.zip
puzzles-534384e5de95e8d4d0f60277befc922b6796b705.tar.gz
puzzles-534384e5de95e8d4d0f60277befc922b6796b705.tar.bz2
puzzles-534384e5de95e8d4d0f60277befc922b6796b705.tar.xz
Mosaic: fix inconsistently drawn keyboard cursor.
Every call to draw_cell() was drawing a region including the whole border of the cell, so that the calls overlapped. So if the cursor moved left or up, then a COL_CURSOR outline would be drawn around the new cell, and then a COL_GRID outline would be drawn around the old cell, overwriting part of the cursor border. I've fixed this in the rigorous way, by making draw_cell() calls cover disjoint areas of the puzzle canvas, and using clip() to enforce that. So now the single DRAWFLAG_CURSOR is replaced by a system of four flags, indicating that the cell being drawn is the actual cursor position, or the cell below it (hence containing the cursor's bottom border), or to its right (needing the left border), or below _and_ to the right (you still need the single pixel at the cursor's bottom right corner!). Also, to ensure the cursor edges are drawn even on the bottom or right grid boundaries, draw_cell() is called for a set of virtual cells beyond the actual grid bounds, with additional flags telling it not to draw an actual puzzle cell there, just the relevant pieces of border.
Diffstat (limited to 'html/pattern.html')
0 files changed, 0 insertions, 0 deletions