Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SVGPathData.from{shape} methods #25

Open
nfroidure opened this issue Jul 15, 2017 · 3 comments
Open

Add SVGPathData.from{shape} methods #25

nfroidure opened this issue Jul 15, 2017 · 3 comments

Comments

@nfroidure
Copy link
Owner

Those methods are implemented here but I think would better sit in this module.

https://github.com/nfroidure/svgicons2svgfont/blob/master/src/svgshapes2svgpath.js

By example:

SVGPathData.fromRect(0, 0, 40, 30)
@NaridaL
Copy link
Collaborator

NaridaL commented Aug 13, 2017

Do you just want to copy those methods? The fromRect syntax you're proposing isn't entirely compatible with reading creating paths from svg shape elements. fromRect({x: 0, y: 0, width: 40, height: 30}) would work for both.

Also why is the circleToPath method using 4 C commands instead of As ?!

@nfroidure
Copy link
Owner Author

Tbh I dropped it there without actually thinking on the implementation, you're the best suitable to choose it.

For the circleToPath method, it was just quick and dirty design, was need to SVG at that moment ;).

@NaridaL
Copy link
Collaborator

NaridaL commented Aug 23, 2017

Thinking about it, I'm not entirely sure this makes sense. The functions in svgicons2svgfont are pretty focused on converting from svg ellipse etc tag attributes (including parsing numbers), as such doesn't necessarily fit here, which is exclusively focused on the path part of SVG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants