Reputation: 235
I got some graphic design that was made using JavaScript / Html5 Canvas.
Take a look here: http://yeda.us/js/logos.js
now, i need to give this graphic element to a graphic designer in some format he can work with: in either photoshop or Illustrator friendly formats.
Now, of course i can take a screenshot and start working my way from there, but i do need this graphic in a vector format i could use later more robustly.
Is there a way to convert the above mentioned code into graphics? perhaps convert it to SVG somehow?
Upvotes: 4
Views: 1499
Reputation: 60976
Check out SVGCanvas which defines an API compatible with HTML5 canvas that creates SVG output from the drawing commands. It probably doesn't handle everything, but your simple example should hopefully work just fine.
Just paste the relevant bits of your code into one of the left textareas and click "do it", then copy the svg output from the textarea on the right.
Upvotes: 5
Reputation: 13549
Like others commented, there's no tool that would help you make a Canvas -> SVG conversion. However, the code isn't too different. Since the sample you gave is rather small, you could use Raphael.js to generate SVG and convert the code you posted to Raphael.js:
UPDATE
A little more detail
Upvotes: 2