2

Possible Duplicate:
How can I convert an HTML element to a canvas element?

I know it is pretty simple to convert an image into a canvas, but how do I convert a DIV to a canvas? I'm hoping to avoid a huge script like http://html2canvas.hertzen.com/

Community
  • 1
  • 1
iwek
  • 1,608
  • 5
  • 16
  • 31
  • Out of curiosity, why on earth do you want this functionality? – Phrogz Jan 23 '12 at 20:10
  • perhaps duplicate but no good answers. I am trying to save some text on the image, I already did in php, but would prefer a js solution. – iwek Jan 23 '12 at 20:21
  • What's wrong with using `ctx.drawText` for that purpose? – Simon Sarris Jan 23 '12 at 21:21
  • Nothing, I will have to code this up myself and use ctx.drawText but I will have to add a lot of code to make sure embedded fonts, colors, paddings, and everything else gets rendered correctly. I was hoping someone has already done some of this work – iwek Jan 23 '12 at 21:41

0 Answers0