Skip to content

fix: ensure Path(list_of_points) starts with 'M'

t0b3 requested to merge t0b3/extensions:fix--path-starts-with-m into 1.3.x

What does the merge request do?

backport of !590 (merged)

Fix to ensure Path(list_of_points) always starts with 'M' i.e.

p1 = Polygon.new(points=Path([(0,2), (1,1), (2,0)]))
print(p1.path)

now returns [Move(0, 2), Line(1, 1), Line(2, 0), ZoneClose()]

where it used to [Line(0, 2), Line(1, 1), Line(2, 0), ZoneClose()]

Summary for release notes

ensure Path(list_of_points) returns valid SVG path

Checklist

  • Add unit tests (if applicable)
  • Changes to inkex/ are well documented
  • Clean merge request history

Merge request reports