Commit a96ef04b authored by Alexander.Trofimov's avatar Alexander.Trofimov

delete renderForPrint -> render with argument drawing context

parent aece5789
...@@ -1326,7 +1326,7 @@ ...@@ -1326,7 +1326,7 @@
} }
if (opt.fragments.length > 0) { if (opt.fragments.length > 0) {
t.textRender.render(t._getContentLeft(), dy || 0, t._getContentWidth(), opt.textColor); t.textRender.render(undefined, t._getContentLeft(), dy || 0, t._getContentWidth(), opt.textColor);
} }
}; };
......
...@@ -432,19 +432,6 @@ ...@@ -432,19 +432,6 @@
return this._doMeasure(maxWidth); return this._doMeasure(maxWidth);
}; };
/**
* Draw string that was setup by methods 'setString' or 'measureString'
* @param {Number} x Left of the text rect
* @param {Number} y Top of the text rect
* @param {Number} maxWidth Text width restriction
* @param {String} textColor Default text color for formatless string
* @return {StringRender} Returns 'this' to allow chaining
*/
StringRender.prototype.render = function(x, y, maxWidth, textColor) {
this._doRender(undefined, x, y, maxWidth, textColor);
return this;
};
/** /**
* Draw string that was setup by methods 'setString' or 'measureString' * Draw string that was setup by methods 'setString' or 'measureString'
* @param {drawingCtx} drawingCtx * @param {drawingCtx} drawingCtx
...@@ -454,7 +441,7 @@ ...@@ -454,7 +441,7 @@
* @param {String} textColor Default text color for formatless string * @param {String} textColor Default text color for formatless string
* @return {StringRender} Returns 'this' to allow chaining * @return {StringRender} Returns 'this' to allow chaining
*/ */
StringRender.prototype.renderForPrint = function(drawingCtx, x, y, maxWidth, textColor) { StringRender.prototype.render = function(drawingCtx, x, y, maxWidth, textColor) {
this._doRender(drawingCtx, x, y, maxWidth, textColor); this._doRender(drawingCtx, x, y, maxWidth, textColor);
return this; return this;
}; };
......
...@@ -2707,7 +2707,7 @@ ...@@ -2707,7 +2707,7 @@
} }
this.stringRender.rotateAtPoint( drawingCtx, ct.angle, xb1, yb1, ct.textBound.dx, ct.textBound.dy ); this.stringRender.rotateAtPoint( drawingCtx, ct.angle, xb1, yb1, ct.textBound.dx, ct.textBound.dy );
this.stringRender.restoreInternalState( ct.state ).renderForPrint( drawingCtx, 0, 0, textW, ct.color ); this.stringRender.restoreInternalState( ct.state ).render( drawingCtx, 0, 0, textW, ct.color );
textAlign = this.stringRender.flags.textAlign; textAlign = this.stringRender.flags.textAlign;
if (isWrapped) { if (isWrapped) {
...@@ -2737,7 +2737,7 @@ ...@@ -2737,7 +2737,7 @@
} }
else { else {
ctx.AddClipRect( x1, y1, w, h ); ctx.AddClipRect( x1, y1, w, h );
this.stringRender.restoreInternalState( ct.state ).renderForPrint( drawingCtx, textX, textY, textW, ct.color ); this.stringRender.restoreInternalState( ct.state ).render( drawingCtx, textX, textY, textW, ct.color );
ctx.RemoveClipRect(); ctx.RemoveClipRect();
} }
} }
...@@ -2849,7 +2849,7 @@ ...@@ -2849,7 +2849,7 @@
} }
} }
this.stringRender.render(0, 0, textW, ct.color); this.stringRender.render(drawingCtx, 0, 0, textW, ct.color);
// var color = new CColor(0, 0, 255, 0.5); // var color = new CColor(0, 0, 255, 0.5);
// //
...@@ -2875,7 +2875,7 @@ ...@@ -2875,7 +2875,7 @@
} }
else { else {
ctx.save().beginPath().rect( x1, y1, w, h ).clip(); ctx.save().beginPath().rect( x1, y1, w, h ).clip();
this.stringRender.restoreInternalState( ct.state ).render( textX, textY, textW, ct.color ); this.stringRender.restoreInternalState( ct.state ).render( drawingCtx, textX, textY, textW, ct.color );
ctx.restore(); ctx.restore();
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment