Gary Simon
Gary Simon

Reputation: 373

Exporting Vector Graphics from HTML5 Canvas

I'm curious if that's possible? I'm interested in building a vector drawing app within HTML5 that has the ability to save as vector, and not just JPG/PNG/BMP.

Thanks.

Upvotes: 3

Views: 8326

Answers (2)

Bee San
Bee San

Reputation: 2665

Try fabric.js.

It draws stuff on Canvas, and has SVG import/export.
It handles 'objects', common SVG shapes and paths. The full SVG standard (fonts, for example) isn't supported, but maybe you only need to use a subset of it.

Upvotes: 2

robertc
robertc

Reputation: 75707

No, it's not possible. After the drawing operations are complete all you're left with on the canvas are a bunch of pixels. You'd have to retain all the drawing options and then use them to create a separate vector drawing. If you want to save as a vector, why not create as a vector?

Upvotes: 4

Related Questions