Mercy  Decosta

Mercy Decosta

  • NA
  • 389
  • 135.5k

Canvas image-rendering feature in HTML5

Jul 21 2011 12:19 AM
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)