mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
parent
9f249101f0
commit
8d67d14e98
2 changed files with 23 additions and 10 deletions
|
@ -2793,16 +2793,19 @@ statics: {
|
||||||
}
|
}
|
||||||
|
|
||||||
var length = segments.length - (closed ? 0 : 1);
|
var length = segments.length - (closed ? 0 : 1);
|
||||||
for (var i = 1; i < length; i++)
|
if (length > 0) {
|
||||||
|
for (var i = 1; i < length; i++) {
|
||||||
addJoin(segments[i], join);
|
addJoin(segments[i], join);
|
||||||
|
}
|
||||||
if (closed) {
|
if (closed) {
|
||||||
// Go back to the beginning
|
// Go back to the beginning
|
||||||
addJoin(segments[0], join);
|
addJoin(segments[0], join);
|
||||||
} else if (length > 0) {
|
} else {
|
||||||
// Handle caps on open paths
|
// Handle caps on open paths
|
||||||
addCap(segments[0], cap);
|
addCap(segments[0], cap);
|
||||||
addCap(segments[segments.length - 1], cap);
|
addCap(segments[segments.length - 1], cap);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return bounds;
|
return bounds;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -653,3 +653,13 @@ test('Path#arcTo(to, radius, rotation, clockwise, large) when from and to are eq
|
||||||
path.arcTo(point, new Size(10), 0, true, true);
|
path.arcTo(point, new Size(10), 0, true, true);
|
||||||
expect(0);
|
expect(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Path#closed with blend mode', function() {
|
||||||
|
new Path({
|
||||||
|
strokeColor: 'black',
|
||||||
|
blendMode: 'negation',
|
||||||
|
closed: true
|
||||||
|
});
|
||||||
|
view.update();
|
||||||
|
expect(0);
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue