Use the shadow method in Fonts.ctx

This commit is contained in:
Vivien Nicolas 2011-06-29 03:00:23 +02:00
parent dd923d5aea
commit 91399b50ef

View File

@ -84,10 +84,9 @@ var Fonts = {
},
get ctx() {
delete this.ctx;
var ctx = document.createElement("canvas").getContext("2d");
ctx.scale(1 / kScalePrecision, 1);
return this.ctx = ctx;
return shadow(this, "ctx", ctx);
},
measureText: function fonts_measureText(text) {