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

Create SVG Renderer #41

Closed
pshihn opened this issue Mar 20, 2018 · 4 comments
Closed

Create SVG Renderer #41

pshihn opened this issue Mar 20, 2018 · 4 comments
Assignees

Comments

@pshihn
Copy link
Collaborator

pshihn commented Mar 20, 2018

Similar to RoughCanvas, RoughSVG will create an svg node

let rsvg = rough.svg(svgRoot, config);
let rect = rsvg.rectangle(10, 10, 100, 100);

// now can add custom styles to node
rect.classList.add('cool-rect');
svgRoot.appendChild(rect);
@ccjmne
Copy link

ccjmne commented Mar 22, 2018

This is great, I can't wait!

SVG would mean the possibility for CSS styling, hovering animation, clicky-clicky stuff, easy fix for the guy who wants to implement a snake game without reshaping his snake's individual chunks...

The only downside is... I actually can't wait 😂

Anything I can do to help?

@pshihn
Copy link
Collaborator Author

pshihn commented Mar 22, 2018

I'm actually, almost done.
One thing left to do is the best way to fill an arbitrary path with hachure. Should I draw them as I do with defined shapes or should I use a pattern fill. Just playing with it till I find the best fit.

@ccjmne
Copy link

ccjmne commented Mar 22, 2018

Sweet, thank you very much :)
This will make Rough immensely more practical for me (and a lot of others).

@pshihn
Copy link
Collaborator Author

pshihn commented Apr 11, 2018

SVG rendering is now part of Rough.js v.2.1 #49
See https://github.com/pshihn/rough/wiki for docs.

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