View Single Post
Old 11-12-2012, 06:06 PM   PM User | #3
Ben Stuijts
New to the CF scene

 
Join Date: Nov 2012
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Ben Stuijts is an unknown quantity at this point
There is only one but... I'm drawing the picture of the object on my canvas. I should have told this:

object.prototype.draw = function(xpos, ypos) {
ctx.drawImage(this.picture,sx, sy, swidth, sheight,xpos,ypos, width, height);
}

NB: the vars sx, sy, swidth, sheight, width and height are optional; I would like to use them , so i can define my picture from a tilesheet.
Ben Stuijts is offline   Reply With Quote