It would be nice to be able to load an existing image into the canvas by providing a URL. Currently I have to do it in my controller using something like this:
var imageObj = new Image();
imageObj.onload = function () {
var context = $('#pwCanvasMain').get(0).getContext('2d');
context.drawImage(this, 0, 0);
};
imageObj.src = 'http://example.org/image.png';
It would be nice to be able to load an existing image into the canvas by providing a URL. Currently I have to do it in my controller using something like this: