I'm new to Javascript but am enjoying trying it out. I'm currently using a text plugin for a game where the text shakes. It works great but all the letters are cut off slightly by a couple of pixels. I tried changing the numbers in the following line of code...
sprite.bitmap.drawText(c, 0, 0, w, h);
That worked but not entirely. It moved where the cut happens slightly but didn't fully solve the issue. I'd super appreciate any advice or solutions to this issue. I'm hoping it's a small one! Here is the rest of the code:
Window_Main.prototype.createShakingCharacter = function(textState, c, w, h) {
if (this._textShaking[0] === 'circle') {
var sprite = new Sprite_Shake(new Bitmap(w, h), 'circle', 0, 0, 0);
} else {
var sprite = new Sprite_Shake(new Bitmap(w, h), eval(this._textShaking[0]), eval(this._textShaking[1]),
eval(this._textShaking[2]), eval(this._textShaking[3]));
}
sprite.bitmap.textColor = this.contents.textColor;
sprite.bitmap.paintOpacity = this.contents.paintOpacity;
sprite.bitmap.fontSize = this.contents.fontSize;
sprite.bitmap.fontFace = this.contents.fontFace;
if (_.outline) sprite.bitmap._drawTextOutline = this.contents._drawTextOutline;
sprite.bitmap.drawText(c, 0, 0, w, h);
sprite.x = textState.x + this.standardPadding();
sprite.y = textState.y + this.standardPadding();
sprite._xBase = sprite.x;
sprite._yBase = sprite.y;
this.addChild(sprite);
this._shakingSprites.push(sprite);
if (this._showFast || this._lineShowFast) {
for (var i = 0; i < this._fastShakeInterval; i++) {
sprite.update();
}
this._fastShakeInterval += 2;
} else {
this._fastShakeInterval = 0;
}
};