1
Reply

Canvas image-rendering feature in HTML5

Mercy  Decosta

Mercy Decosta

Jul 21 2011 12:19 AM
2.3k
I want to know how to use canvas image-rendering feature in HTML5. I tried this:
var renderToCanvas = function (width, height, renderFunction) {
  var buffer = document.createElement('canvas');
  buffer.width = width;
  buffer.height = height;
  renderFunction(buffer.getContext('2d'));
   return buffer;
};

Answers (1)