Compare commits
No commits in common. "bb9672e1b650b5bd754201853918cf9573025e43" and "c945bec0ff2a46e7d0cda5d603f0edfcbed70bd8" have entirely different histories.
bb9672e1b6
...
c945bec0ff
@ -31,8 +31,8 @@ let
|
||||
src = fetchFromGitHub {
|
||||
owner = "lgi-devs";
|
||||
repo = "lgi";
|
||||
rev = "a412921fad445bcfc05a21148722a92ecb93ad06";
|
||||
hash = "sha256-kZBpH5gcaCNU134Wn6JXAkFELzmiphc1PeCtmN9cagc=";
|
||||
rev = "e06ad94c8a1c84e3cdb80cee293450a280dfcbc7";
|
||||
hash = "sha256-VYr/DV1FAyzPe6p6Quc1nmsHup23IAMfz532rL167Q4=";
|
||||
};
|
||||
};
|
||||
rxi-json = callPackage ../rxi-json { lua = lua5_3; };
|
||||
|
@ -155,7 +155,6 @@ label.readout {
|
||||
(* tile-size (- y bounds.min.y))
|
||||
angle)))
|
||||
|
||||
(var map-surface nil)
|
||||
|
||||
(fn cairo-the-map [window]
|
||||
(let [{ : lat : lon : zoom } app-state
|
||||
@ -174,8 +173,7 @@ label.readout {
|
||||
cairo.Content.COLOR
|
||||
(* tile-size num-tiles-x)
|
||||
(* tile-size num-tiles-y))
|
||||
g (cairo.Context.create map-surface)
|
||||
seen-roads {}]
|
||||
g (cairo.Context.create map-surface)]
|
||||
|
||||
(g:set_source_rgb 0.7 0.8 0.8)
|
||||
(g:rectangle 0 0 (* tile-size num-tiles-x) (* tile-size num-tiles-y))
|
||||
@ -189,25 +187,11 @@ label.readout {
|
||||
(cairo-roads-path g lines bounds)
|
||||
|
||||
(g:set_source_rgb 0.2 0.2 0.2)
|
||||
(g:set_font_size (+ road-width 1))
|
||||
(g:set_font_size (- road-width 3))
|
||||
(each [_ line (pairs lines)]
|
||||
(case line.name
|
||||
n (let [(x y angle) (label-coords line bounds)
|
||||
ext (g:text_extents n)
|
||||
w ext.width
|
||||
h ext.height]
|
||||
(when (and x y (not (. seen-roads n)))
|
||||
(tset seen-roads n true)
|
||||
|
||||
(g:save)
|
||||
(g:set_line_width h)
|
||||
(g:set_source_rgb 1 1 1)
|
||||
(g:move_to (- x 1) (- y 1))
|
||||
(g:rotate angle)
|
||||
(g:rel_line_to (+ w 1) 0)
|
||||
(g:stroke)
|
||||
(g:restore)
|
||||
|
||||
n (let [(x y angle) (label-coords line bounds)]
|
||||
(when (and x y)
|
||||
(g:save)
|
||||
(g:move_to x y)
|
||||
(g:rotate angle)
|
||||
|
Loading…
Reference in New Issue
Block a user