mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-22 20:25:49 +00:00
move the pathCommands out of render
makes easier to override, extend the class.
This commit is contained in:
parent
f9782cf788
commit
9980c83fb9
1 changed files with 9 additions and 1 deletions
|
|
@ -141,7 +141,7 @@
|
|||
* @private
|
||||
* @param {CanvasRenderingContext2D} ctx context to render path on
|
||||
*/
|
||||
_render: function(ctx) {
|
||||
_renderPathCommands: function(ctx) {
|
||||
var current, // current instruction
|
||||
previous = null,
|
||||
subpathStartX = 0,
|
||||
|
|
@ -446,6 +446,14 @@
|
|||
}
|
||||
previous = current;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {CanvasRenderingContext2D} ctx context to render path on
|
||||
*/
|
||||
_render: function(ctx) {
|
||||
this._renderPathCommands(ctx);
|
||||
this._renderFill(ctx);
|
||||
this._renderStroke(ctx);
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue