biscuit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 1ee968d3a2f1582faad42a8a3498a27ab69ec1eb
parent f275190538cbe49fda48e07bf3da78fa0cfd2f0a
Author: Daniel Barlow <dan@telent.net>
Date:   Sat,  7 Jun 2025 11:50:17 +0100

pass bounds to draw-onto-map-surface instead of recalculating

Diffstat:
Mpkgs/maps/main.fnl | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/maps/main.fnl b/pkgs/maps/main.fnl @@ -180,8 +180,8 @@ label.readout { (var map-surface nil) -(fn draw-onto-map-surface [surface lat lon zoom] - (let [{ : num-tiles-x : num-tiles-y &as bounds } (map-bounds lat lon zoom) +(fn draw-onto-map-surface [surface bounds zoom] + (let [{ : num-tiles-x : num-tiles-y } bounds road-width 14 lines []] @@ -244,7 +244,7 @@ label.readout { cairo.Content.COLOR (* tile-size bounds.num-tiles-x) (* tile-size bounds.num-tiles-y)) - (draw-onto-map-surface lat lon zoom))))) + (draw-onto-map-surface bounds zoom))))) (g:set_source_surface map-surface (- offset-x) (- offset-y)) (g:set_operator cairo.Operator.SOURCE)