Fix: closed Path with blend mode throw error (#1763)

Closes #1755
This commit is contained in:
Samuel Asensi 2020-05-23 14:54:51 +02:00 committed by GitHub
parent 9f249101f0
commit 8d67d14e98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 10 deletions

View file

@ -625,7 +625,7 @@ test('Path#getOffsetsWithTangent()', function() {
equals(path.getOffsetsWithTangent([1, 0]), [0.25 * length, 0.75 * length], 'should not return duplicates when tangent is at segment point');
equals(path.getOffsetsWithTangent([1, 1]).length, 2, 'should return 2 values when called on a circle with a diagonal vector');
});
test('Path#add() with a lot of segments (#1493)', function() {
var segments = [];
for (var i = 0; i < 100000; i++) {
@ -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);
expect(0);
});
test('Path#closed with blend mode', function() {
new Path({
strokeColor: 'black',
blendMode: 'negation',
closed: true
});
view.update();
expect(0);
});