Merge pull request #1914 from TomKaltz/master

Allow the use of lineDashArray with the free drawing tool.
This commit is contained in:
Juriy Zaytsev 2015-01-15 23:24:54 +01:00
commit a0e13b36b7
2 changed files with 9 additions and 0 deletions

View file

@ -42,6 +42,13 @@ fabric.BaseBrush = fabric.util.createClass(/** @lends fabric.BaseBrush.prototype
*/
strokeLineJoin: 'round',
/**
* Stroke Dash Array.
* @type Array
* @default
*/
strokeDashArray: null,
/**
* Sets shadow of an object
* @param {Object|String} [options] Options object or string (e.g. "2px 2px 10px rgba(0,0,0,0.2)")
@ -64,6 +71,7 @@ fabric.BaseBrush = fabric.util.createClass(/** @lends fabric.BaseBrush.prototype
ctx.lineWidth = this.width;
ctx.lineCap = this.strokeLineCap;
ctx.lineJoin = this.strokeLineJoin;
ctx.setLineDash(this.strokeDashArray);
},
/**

View file

@ -171,6 +171,7 @@
strokeWidth: this.width,
strokeLineCap: this.strokeLineCap,
strokeLineJoin: this.strokeLineJoin,
strokeDashArray: this.strokeDashArray,
originX: 'center',
originY: 'center'
});