aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2023-04-20 19:41:46 +0100
committerSimon Tatham <anakin@pobox.com>2023-04-20 19:41:46 +0100
commitce203c12efe0e10445a3be56c4308db42d9086c8 (patch)
treeb4b94fb5ef2059c03d5e436c614ea028f8f38d6a
parent777dbffd4219be87190803be876ec3924aa92aee (diff)
downloadpuzzles-ce203c12efe0e10445a3be56c4308db42d9086c8.zip
puzzles-ce203c12efe0e10445a3be56c4308db42d9086c8.tar.gz
puzzles-ce203c12efe0e10445a3be56c4308db42d9086c8.tar.bz2
puzzles-ce203c12efe0e10445a3be56c4308db42d9086c8.tar.xz
Loopy: draw even faint lines using draw_thick_line.
When playing on a high-DPI screen and running Loopy at a large tile size to compensate, the faint lines along grid edges in LINE_NO state are exceptionally hard to see, because they're still only one pixel wide even when everything else has been expanded. This has been true for ages, but it's more significant now, because the new Hats tiling mode needs a lot of counting of edges in all states (since the hats have 14 edges in total!), and it's awkward not to be able to see exactly where the LINE_NO edges are, or where an edge between two other tiles meets this hat's outline.
-rw-r--r--loopy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/loopy.c b/loopy.c
index 8e9af19..b0f4280 100644
--- a/loopy.c
+++ b/loopy.c
@@ -3291,7 +3291,10 @@ static void game_redraw_line(drawing *dr, game_drawstate *ds,
if (draw_faint_lines < 0)
draw_faint_lines = getenv_bool("LOOPY_FAINT_LINES", true);
if (draw_faint_lines)
- draw_line(dr, x1, y1, x2, y2, line_colour);
+ draw_thick_line(dr, ds->tilesize/24.0,
+ x1 + 0.5, y1 + 0.5,
+ x2 + 0.5, y2 + 0.5,
+ line_colour);
} else {
draw_thick_line(dr, ds->tilesize*3/32.0,
x1 + 0.5, y1 + 0.5,