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

Adding transform attribute to svg rendering #62

Closed
gnhamity opened this issue May 4, 2018 · 1 comment
Closed

Adding transform attribute to svg rendering #62

gnhamity opened this issue May 4, 2018 · 1 comment

Comments

@gnhamity
Copy link

gnhamity commented May 4, 2018

Thanks for this, really great resource.

Wanting to use for my physics svg files which make use of transform attribute:
<path d="M 0,0 A 11.25 9 0 0 0 11.25,-9 A 3.75 6 0 1 0 3.75,-9 A 11.25 9 0 0 0 15,0 A 11.25 9 0 0 0 26.25,-9 A 3.75 6 0 1 0 18.75,-9 A 11.25 9 0 0 0 30,0 A 11.25 9 0 0 0 41.25,-9 A 3.75 6 0 1 0 33.75,-9 A 11.25 9 0 0 0 45,0 A 11.25 9 0 0 0 56.25,-9 A 3.75 6 0 1 0 48.75,-9 A 11.25 9 0 0 0 60,0" transform="translate(100,90) rotate(153.435)"></path>
Is there functionality available to do the translation/rotations, etc?

@gnhamity gnhamity changed the title Adding transform atribute Adding transform attribute May 8, 2018
@gnhamity gnhamity changed the title Adding transform attribute Adding transform attribute to svg rendering May 8, 2018
@pshihn
Copy link
Collaborator

pshihn commented May 12, 2018

If you're using Rough SVG, it is very easy. draw commands return a node and you can apply the transform attribute to the node

Here's an example: https://jsfiddle.net/8n2Lrqj2/

Hope that solves your problem

@pshihn pshihn closed this as completed Jun 19, 2018
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

No branches or pull requests

2 participants