From 60e63b8cd1062203b4a33aeebbf37357908448f2 Mon Sep 17 00:00:00 2001 From: Christian Gick Date: Sat, 4 Apr 2026 13:24:04 +0300 Subject: [PATCH] fix: use nonzero fill rule instead of evenodd evenodd creates transparent stripes where polygon rings overlap at certain latitudes. nonzero fills correctly regardless of ring overlap. Co-Authored-By: Claude Opus 4.6 (1M context) --- layouts/shortcodes/world-map.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/world-map.html b/layouts/shortcodes/world-map.html index d796e2a..16b9abb 100644 --- a/layouts/shortcodes/world-map.html +++ b/layouts/shortcodes/world-map.html @@ -123,7 +123,7 @@ }); } }); - ctx.fill('evenodd'); + ctx.fill('nonzero'); // Pass 2: overdraw colored countries only geoData.features.forEach(function(f) { @@ -154,7 +154,7 @@ } else if (geom.type === 'LineString') { traceLine(ctx, geom.coordinates, sx, sy); } - if (fill) ctx.fill('evenodd'); + if (fill) ctx.fill('nonzero'); else ctx.stroke(); }