Skip to content

SVG export: add 'Z' close-path command for closed contours#1737

Open
AnibalPinto wants to merge 1 commit into
solvespace:masterfrom
AnibalPinto:master-issue1368
Open

SVG export: add 'Z' close-path command for closed contours#1737
AnibalPinto wants to merge 1 commit into
solvespace:masterfrom
AnibalPinto:master-issue1368

Conversation

@AnibalPinto

Copy link
Copy Markdown
Contributor

Fixes #1368.

For closed paths (loops), the SVG path definition now ends with 'Z' to explicitly close the path, rather than relying on the last point being equal to the first point.

  • Add virtual ClosePath() method to VectorFileWriter base class
  • Override ClosePath() in SvgFileWriter to emit ' Z'
  • Call ClosePath() in OutputLinesAndMesh when SBezierLoop::IsClosed()
  • Add export/svg/closed_path_has_z test case

Fixes solvespace#1368.

For closed paths (loops), the SVG path definition now ends with 'Z'
to explicitly close the path, rather than relying on the last point
being equal to the first point.

- Add virtual ClosePath() method to VectorFileWriter base class
- Override ClosePath() in SvgFileWriter to emit ' Z'
- Call ClosePath() in OutputLinesAndMesh when SBezierLoop::IsClosed()
- Add export/svg/closed_path_has_z test case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SVG export: for closed paths, svg path definition should contain a final "Z"

1 participant