But to add a rectangle and swap the top upside down, the code would look like this: Circle.prototype.move_to = function(x,y) { if (this.context === null){ throw "Circle doesn't have any context to move"; } this.x = x; this.y = y; this.context.translate(x, y); this.centext.beginPath(); this.centext.arc(this.x,this.y,this.r,0,Math.PI*2); this.centext.closePath(); this.centext.fill(); }