aboutsummaryrefslogtreecommitdiff
path: root/loopy.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2023-03-28 20:48:28 +0100
committerSimon Tatham <anakin@pobox.com>2023-03-28 20:51:26 +0100
commit4720eeb1aaf2591613a17345d4e4326287c0e8bc (patch)
tree4e7cc72585928c66799ecadf1f180d8325a98e16 /loopy.c
parent827051dafea79f112e929c9cc7732183696fad72 (diff)
downloadpuzzles-4720eeb1aaf2591613a17345d4e4326287c0e8bc.zip
puzzles-4720eeb1aaf2591613a17345d4e4326287c0e8bc.tar.gz
puzzles-4720eeb1aaf2591613a17345d4e4326287c0e8bc.tar.bz2
puzzles-4720eeb1aaf2591613a17345d4e4326287c0e8bc.tar.xz
Loopy: widen clip rectangle for redrawing clues.
The new Hats tiling generates a lot of clues that are 2-digit numbers. At large puzzle sizes, the previous clip rectangle didn't quite include the ends of such a number, meaning that if the number had to be redrawn in red to highlight an error, the leftmost and rightmost parts of the text would remain black.
Diffstat (limited to 'loopy.c')
-rw-r--r--loopy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/loopy.c b/loopy.c
index 86f6d5e..fd86296 100644
--- a/loopy.c
+++ b/loopy.c
@@ -3202,9 +3202,9 @@ static void face_text_bbox(game_drawstate *ds, grid *g, grid_face *f,
/* There seems to be a certain amount of trial-and-error involved
* in working out the correct bounding-box for the text. */
- *x = xx - ds->tilesize/4 - 1;
+ *x = xx - ds->tilesize * 5 / 4 - 1;
*y = yy - ds->tilesize/4 - 3;
- *w = ds->tilesize/2 + 2;
+ *w = ds->tilesize * 5 / 2 + 2;
*h = ds->tilesize/2 + 5;
}