shithub: puzzles

Download patch

ref: ce203c12efe0e10445a3be56c4308db42d9086c8
parent: 777dbffd4219be87190803be876ec3924aa92aee
author: Simon Tatham <anakin@pobox.com>
date: Thu Apr 20 15:41:46 EDT 2023

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.

--- a/loopy.c
+++ b/loopy.c
@@ -3291,7 +3291,10 @@
 	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,