Skip to content

Conversation

@vmario89
Copy link

@vmario89 vmario89 commented Apr 4, 2021

Added option in write_svg to write svg:path instead of svg:line, svg:polyline and svg:polygon. You need to set no_basic_shapes to True to write svg:path elements. Else the default behaviour writing basic elements is kept

Description

to be completed

Checklist

  • feature/fix implemented
  • code formatting ok (black and isort)
  • mypy vpype vpype_cli tests returns no error
  • tests added/updated and pytest succeeds
  • documentation added/updated
    • command docstring and option/argument help
    • README.md updated (Feature Overview)
    • CHANGELOG.md updated
    • RTD doc updated and building with no error (make clean && make html in docs/)

Added option in write_svg to write svg:path instead of svg:line, svg:polyline and svg:polygon. You need to set no_basic_shapes to True to write svg:path elements. Else the default behaviour writing basic elements is kept
Copy link
Owner

@abey79 abey79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! There are a few change that would be needed before it can merged, though:

  • The essence of this feature is to reduce inkscape loading time. This should be benchmarked, but I think a single, monolithic <path> with multiple M commands would be faster than multiple <path> commands
  • See my comments in the code.
  • Optionally, this PR would include an update to the write command to expose the single_path parameter. I can also deal with that in a separate PR too.
  • Tests should be added and obviously linting should be fixed.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 8, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

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.

2 participants