mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-02 10:51:57 +02:00
Add individual icon drawing; refactor.
This commit is contained in:
parent
81ab4e14c7
commit
813ad6b806
16 changed files with 181 additions and 72 deletions
|
@ -254,13 +254,15 @@ class Scheme:
|
|||
for key in element: # type: str
|
||||
if key not in [
|
||||
"tags", "no_tags", "priority", "level", "icon",
|
||||
"r", "r2"]:
|
||||
"r", "r1", "r2"]:
|
||||
value = element[key]
|
||||
if isinstance(value, str) and value.endswith("_color"):
|
||||
value = self.get_color(value)
|
||||
style[key] = value
|
||||
if "r" in element:
|
||||
style["stroke-width"] = (element["r"] * scale)
|
||||
if "r1" in element:
|
||||
style["stroke-width"] = (element["r1"] * scale + 1)
|
||||
if "r2" in element:
|
||||
style["stroke-width"] = (element["r2"] * scale + 2)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue