1
Answer

Canvas image-rendering feature in HTML5

Mercy  Decosta

Mercy Decosta

13y
2.4k
1
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)