make road names bigger and print white behind them
This commit is contained in:
parent
84a80d7c79
commit
7195dbb2d5
@ -157,11 +157,23 @@ label.readout {
|
||||
(cairo-roads-path g lines bounds)
|
||||
|
||||
(g:set_source_rgb 0.2 0.2 0.2)
|
||||
(g:set_font_size (- road-width 3))
|
||||
(g:set_font_size (+ road-width 1))
|
||||
(each [_ line (pairs lines)]
|
||||
(case line.name
|
||||
n (let [(x y angle) (label-coords line bounds)]
|
||||
n (let [(x y angle) (label-coords line bounds)
|
||||
ext (g:text_extents n)
|
||||
w ext.width
|
||||
h ext.height]
|
||||
(when (and x y)
|
||||
(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)
|
||||
|
||||
(g:save)
|
||||
(g:move_to x y)
|
||||
(g:rotate angle)
|
||||
|
Loading…
Reference in New Issue
Block a user