aboutsummaryrefslogtreecommitdiff
path: root/src/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer')
-rw-r--r--src/renderer/tilehunt.rs8
1 files changed, 8 insertions, 0 deletions
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<RenderedTile>) -> Result<()> {
+ // The tile is hand-crafted to be very small. See
+ // <https://www.mjt.me.uk/posts/smallest-png/> for a reference, and of course the actual
+ // PNG specification <http://www.libpng.org/pub/png/spec/1.2/PNG-Contents.html>.
static IMAGE_DATA: &[u8] = include_bytes!("tile-marked.png");
for (tile_x, tile_y) in layer {
tx.send(RenderedTile {