mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-01 10:21:54 +02:00
Add configuration to shape extractor.
This commit is contained in:
parent
a8da4fce0a
commit
d73e2b6a53
5 changed files with 24 additions and 10 deletions
|
@ -4,6 +4,7 @@ Test icon generation for nodes.
|
|||
Author: Sergey Vartanov (me@enzet.ru).
|
||||
"""
|
||||
from os import makedirs
|
||||
from pathlib import Path
|
||||
from typing import Dict
|
||||
|
||||
from roentgen.grid import draw_all_icons
|
||||
|
@ -19,7 +20,9 @@ def test_icons() -> None:
|
|||
|
||||
def get_icon(tags: Dict[str, str]):
|
||||
scheme = Scheme("scheme/default.yml")
|
||||
icon_extractor = ShapeExtractor("icons/icons.svg")
|
||||
icon_extractor = ShapeExtractor(
|
||||
"icons/icons.svg", Path("icons/config.json")
|
||||
)
|
||||
icon, _ = scheme.get_icon(icon_extractor, tags)
|
||||
return icon
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue