//=============================================================================
// Bitmap&DrawTextEx.js
//=============================================================================
(function() {
Bitmap.prototype._drawTextBody = function(text, tx, ty, maxWidth) {
this.gradientFillText(text, tx, ty, maxWidth, "#fff", this.textColor)
};
Bitmap.prototype.gradientFillText = function(text, x, y, mWidth, color1,
color2) {
var context = this._context;
var grad;
grad = context.createLinearGradient(x, y-this.fontSize, x, y);
grad.addColorStop(0, color1);
grad.addColorStop(0.8, color2);
context.save();
context.fillStyle = grad;
context.fillText(text, x, y, mWidth);
context.restore();
this._setDirty();
};
var _bitmapDrawTextEx_initialize =Bitmap.prototype.initialize;
Bitmap.prototype.initialize = function(width,height) {
_bitmapDrawTextEx_initialize.call(this,width,height)
this.outlineColor = '#000';
}
})();
//=============================================================================
// Bitmap&DrawTextEx.js
//=============================================================================
(function() {
Bitmap.prototype._drawTextBody = function(text, tx, ty, maxWidth) {
this.gradientFillText(text, tx, ty, maxWidth, "#fff", this.textColor)
};
Bitmap.prototype.gradientFillText = function(text, x, y, mWidth, color1,
color2) {
var context = this._context;
var grad;
grad = context.createLinearGradient(x, y-this.fontSize, x, y);
grad.addColorStop(0, color1);
grad.addColorStop(0.8, color2);
context.save();
context.fillStyle = grad;
context.fillText(text, x, y, mWidth);
context.restore();
this._setDirty();
};
var _bitmapDrawTextEx_initialize =Bitmap.prototype.initialize;
Bitmap.prototype.initialize = function(width,height) {
_bitmapDrawTextEx_initialize.call(this,width,height)
this.outlineColor = '#000';
}
})();