Quantcast
Channel: simonsarris - Latest Comments
Viewing all articles
Browse latest Browse all 193

Re: Selectable Shapes Part 2: Resizable, Movable Shapes on HTML5 Canvas

$
0
0

Why its not possible to draw images on canvas using boxes class. I have tried but its not working. Added below code in draw method but its not showing anything. neither there are any error

var img = new Image();
img.onload = function(){
canvas.width = img.width;
canvas.height = img.height;

ctx.drawImage(img, 0, 0, 50, 50);
}
img.src = 'cottage.jpg';


Viewing all articles
Browse latest Browse all 193

Trending Articles