Open GoogleCodeExporter opened 9 years ago
I have added this.x and this.y to function A() so that it will work within a
browser
-----------------------
var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");
var y = 10;
var x = 50;
function A() {
this.x=10;
this.y=50;
this.text = "Hello";
this.drawText = function() {
context.fillStyle='black';
context.translate(this.x+5,this.y+15);
context.mozTextStyle="9pt bold Verdana";
context.mozDrawText(this.text);
context.translate(-1 * (this.x+5),-1 * (this.y+15));
}
}
function B() {
}
B.prototype = new A();
b = new B();
b.drawText();
Original comment by Heinie.B...@gmail.com
on 6 Sep 2009 at 6:24
Original issue reported on code.google.com by
Heinie.B...@gmail.com
on 6 Sep 2009 at 5:35