Canvas image-rendering feature in HTML5
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;
};