From 23eff30d1b38a4c4494fddb2801154f086cdf9bc Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Fri, 26 Jun 2015 11:47:04 +0200 Subject: [PATCH] Update text.class.js --- src/shapes/text.class.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/shapes/text.class.js b/src/shapes/text.class.js index 66a9164fcea..4d758805c0b 100644 --- a/src/shapes/text.class.js +++ b/src/shapes/text.class.js @@ -352,13 +352,15 @@ * @param {CanvasRenderingContext2D} ctx Context to render on */ _render: function(ctx) { - this.clipTo && fabric.util.clipContext(this, ctx); - + ctx.save(); + this._setOpacity(ctx); + this._setShadow(ctx); + this._setupCompositeOperation(ctx); this._renderTextBackground(ctx); this._renderText(ctx); - this._renderTextDecoration(ctx); + ctx.restore(); this.clipTo && ctx.restore(); }, @@ -367,14 +369,11 @@ * @param {CanvasRenderingContext2D} ctx Context to render on */ _renderText: function(ctx) { - ctx.save(); + this._translateForTextAlign(ctx); - this._setOpacity(ctx); - this._setShadow(ctx); - this._setupCompositeOperation(ctx); this._renderTextFill(ctx); this._renderTextStroke(ctx); - ctx.restore(); + }, /**