mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-05 09:20:27 -04:00
Actually fix handling of param.clip in Path#draw.
This commit is contained in:
parent
4c4258d2e1
commit
e5c32b9520
1 changed files with 4 additions and 3 deletions
|
@ -1840,18 +1840,19 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
|||
strokeColor = style._strokeColor,
|
||||
dashArray = style._dashArray,
|
||||
drawDash = !paper.support.nativeDash && strokeColor
|
||||
&& dashArray && dashArray.length;
|
||||
&& dashArray && dashArray.length,
|
||||
clip = param.clip || this._clipMask;
|
||||
|
||||
// Prepare the canvas path if we have any situation that requires it
|
||||
// to be defined.
|
||||
if (param.compound || this._clipMask || fillColor || strokeColor
|
||||
if (param.compound || clip || fillColor || strokeColor
|
||||
&& !drawDash)
|
||||
drawSegments(ctx, this);
|
||||
|
||||
if (this._closed)
|
||||
ctx.closePath();
|
||||
|
||||
if (param.clip || this._clipMask) {
|
||||
if (clip) {
|
||||
ctx.clip();
|
||||
} else if (!param.compound && (fillColor || strokeColor)) {
|
||||
// If the path is part of a compound path or doesn't have a fill
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue