From 3bec9ff1bcb7fb8b93693c0c93b8d42797f95e1c Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sat, 11 Mar 2023 20:02:17 +0100 Subject: add reference to small PNG crafting --- src/renderer/tilehunt.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/renderer') diff --git a/src/renderer/tilehunt.rs b/src/renderer/tilehunt.rs index f44644b..55b30af 100644 --- a/src/renderer/tilehunt.rs +++ b/src/renderer/tilehunt.rs @@ -1,4 +1,9 @@ //! Actual rendering functions for tile hunts. +//! +//! This renders a tile as "transparent green" if any track passes through it. +//! +//! Note that is version of "tile hunt" is a bit silly, as the tile size changes with the zoom +//! level. For a better version, the "tile hunt size" should be fixed to a given zoom. use color_eyre::eyre::Result; use crossbeam_channel::Sender; use fnv::FnvHashSet; @@ -35,6 +40,9 @@ impl super::Renderer for Renderer { } fn colorize(layer: Self::Prepared, tx: Sender) -> Result<()> { + // The tile is hand-crafted to be very small. See + // for a reference, and of course the actual + // PNG specification . static IMAGE_DATA: &[u8] = include_bytes!("tile-marked.png"); for (tile_x, tile_y) in layer { tx.send(RenderedTile { -- cgit v1.2.3