Skip to content

Commit

Permalink
Issue #150: get rid of shape duplication.
Browse files Browse the repository at this point in the history
  • Loading branch information
enzet committed Aug 10, 2023
1 parent 0da966f commit 825eb34
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions map_machine/pictogram/icon.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,15 +541,16 @@ def draw_to_file(
"""
svg: Drawing = Drawing(str(file_name), (16, 16))

for shape_specification in self.shape_specifications:
if color:
shape_specification.color = color
shape_specification.draw(
svg,
np.array((8.0, 8.0)),
outline=outline,
outline_opacity=outline_opacity,
)
if outline:
for shape_specification in self.shape_specifications:
if color:
shape_specification.color = color
shape_specification.draw(
svg,
np.array((8.0, 8.0)),
outline=outline,
outline_opacity=outline_opacity,
)

for shape_specification in self.shape_specifications:
if color:
Expand Down

0 comments on commit 825eb34

Please sign in to comment.