diff --git a/map_machine/pictogram/icon_collection.py b/map_machine/pictogram/icon_collection.py index 5e4644a..1f30f6a 100644 --- a/map_machine/pictogram/icon_collection.py +++ b/map_machine/pictogram/icon_collection.py @@ -108,15 +108,15 @@ class IconCollection: shape: Shape = extractor.get_shape(shape_id) if shape.is_part: continue - icon: Icon = Icon([ShapeSpecification(shape)]) - icon.recolor(color) + icon: Icon = Icon([ShapeSpecification(shape, color)]) + icon.recolor(color, white=background_color) icons.append(icon) if add_all: for shape_id in extractor.shapes.keys(): shape: Shape = extractor.get_shape(shape_id) - icon: Icon = Icon([ShapeSpecification(shape)]) - icon.recolor(color) + icon: Icon = Icon([ShapeSpecification(shape, color)]) + icon.recolor(color, white=background_color) icons.append(icon) return cls(icons) diff --git a/map_machine/workspace.py b/map_machine/workspace.py index bd4e27b..99dd7b3 100644 --- a/map_machine/workspace.py +++ b/map_machine/workspace.py @@ -34,8 +34,7 @@ class Workspace: MAPCSS_ICONS_DIRECTORY_NAME: str = "icons" def __init__(self, output_path: Path) -> None: - self.output_path: Path = output_path - check_and_create(output_path) + self.output_path: Path = check_and_create(output_path) self._icons_by_id_path: Path = output_path / "icons_by_id" self._icons_by_name_path: Path = output_path / "icons_by_name"