mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Implement unit test for #1075
This commit is contained in:
parent
9b6fdb8952
commit
ac97b9d9d7
1 changed files with 32 additions and 0 deletions
|
@ -574,6 +574,38 @@ test('#1059', function() {
|
|||
'M428.48409,189.03444c-21.46172,0 -42.92343,8.188 -59.29943,24.56401c-32.75202,32.75202 -32.75202,85.84686 0,118.59888l-160,0c0,0 -32.75202,-85.84686 0,-118.59888l0,0c16.37601,-16.37601 37.83772,-24.56401 59.29944,-24.56401z');
|
||||
});
|
||||
|
||||
test('#1075', function() {
|
||||
var p1 = new paper.Path({
|
||||
segments: [
|
||||
[150, 120],
|
||||
[150, 85],
|
||||
[178, 85],
|
||||
[178, 110],
|
||||
[315, 110],
|
||||
[315, 85],
|
||||
[342, 85],
|
||||
[342, 120],
|
||||
],
|
||||
closed: true
|
||||
});
|
||||
var p2 = new paper.Path({
|
||||
segments: [
|
||||
[350, 60],
|
||||
[350, 125],
|
||||
[315, 125],
|
||||
[315, 85],
|
||||
[178, 85],
|
||||
[178, 125],
|
||||
[140, 125],
|
||||
[140, 60]
|
||||
],
|
||||
closed: true
|
||||
});
|
||||
|
||||
compareBoolean(function() { return p1.unite(p2); },
|
||||
'M140,125l0,-65l210,0l0,65l-35,0l0,-5l-137,0l0,5z M315,85l-137,0l0,25l137,0z');
|
||||
});
|
||||
|
||||
test('frame.intersect(rect);', function() {
|
||||
var frame = new CompoundPath();
|
||||
frame.addChild(new Path.Rectangle(new Point(140, 10), [100, 300]));
|
||||
|
|
Loading…
Reference in a new issue