mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Check for gradient Colors correctly.
This commit is contained in:
parent
5550ecaf25
commit
9b50020721
1 changed files with 3 additions and 3 deletions
|
@ -313,10 +313,10 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
||||||
var style = this._style,
|
var style = this._style,
|
||||||
fillColor = style._fillColor,
|
fillColor = style._fillColor,
|
||||||
strokeColor = style._strokeColor;
|
strokeColor = style._strokeColor;
|
||||||
// Try calling transform on colors in case they are GradientColors.
|
// Try calling transform on colors in case they are gradients.
|
||||||
if (fillColor && fillColor.transform)
|
if (fillColor && fillColor._type === 'gradient')
|
||||||
fillColor.transform(matrix);
|
fillColor.transform(matrix);
|
||||||
if (strokeColor && strokeColor.transform)
|
if (strokeColor && strokeColor._type === 'gradient')
|
||||||
strokeColor.transform(matrix);
|
strokeColor.transform(matrix);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue