lmgonzalves / brushstroke

Draw creative brushstrokes directly in the browser with a nice API. Be able to draw solid colors, images, or even HTML!
MIT License
80 stars 15 forks source link

Unable to scale the SVG #2

Open FuzzyWobble opened 5 years ago

FuzzyWobble commented 5 years ago

Hello.

How do you draw an SVG at a specific size?

Changing the width/height attributes of the SVG element does not work. There is no parameters in the javascript options to change the size of the drawing (only the canvas).

Thanks.

lmgonzalves commented 5 years ago

There is no option to do that, unfortunately. My suggestion is to scale the SVG beforehand in a vector editor. Cheers...

FuzzyWobble commented 5 years ago

That's really unfortunate. Should call them NSVG: Non Scalable Vector Graphics ? Anyways, it's a really nice library you created. Thanks!

lmgonzalves commented 5 years ago

I think it could be possible actually, but I'm afraid it would involves lot of math calculations and updates to the library, and I don't have the time to do that right now, sorry. Anyways, thanks for your words!