pass bounds to draw-onto-map-surface instead of recalculating
This commit is contained in:
parent
f275190538
commit
1ee968d3a2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user