mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
parent
719392dd2c
commit
83a20b4c11
1 changed files with 24 additions and 1 deletions
|
@ -502,7 +502,7 @@ test('#958', function() {
|
||||||
'M100,220l0,-20l200,0l0,20z M140,100l20,0l0,20l-20,0z');
|
'M100,220l0,-20l200,0l0,20z M140,100l20,0l0,20l-20,0z');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('#968', function(assert) {
|
test('#968', function() {
|
||||||
var p1 = new paper.Path({
|
var p1 = new paper.Path({
|
||||||
segments: [
|
segments: [
|
||||||
[352, 280, 0, -26.5, 0, 0],
|
[352, 280, 0, -26.5, 0, 0],
|
||||||
|
@ -524,6 +524,29 @@ test('#968', function(assert) {
|
||||||
'M352,280l0,64c0,0 -13.69105,1.79261 -31.82528,4.17778c-15.66463,-26.96617 31.82528,-89.12564 31.82528,-68.17778z');
|
'M352,280l0,64c0,0 -13.69105,1.79261 -31.82528,4.17778c-15.66463,-26.96617 31.82528,-89.12564 31.82528,-68.17778z');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('#1059', function() {
|
||||||
|
var p1 = new paper.Path({
|
||||||
|
segments: [
|
||||||
|
[428.48408954611784, 189.03444010371618, 0, 0, -21.46171522996096, 0],
|
||||||
|
[369.18465116477694, 213.5984519858447, 16.376007921419017, -16.376007921419017, 0, 0],
|
||||||
|
[209.1846511647769, 213.5984519858447, 0, 0, 16.376007921419017, -16.376007921419017],
|
||||||
|
[268.48408954611784, 189.03444010371618, -21.46171522996096, 0, 0, 0]
|
||||||
|
],
|
||||||
|
closed: true
|
||||||
|
});
|
||||||
|
var p2 = new paper.Path({
|
||||||
|
segments: [
|
||||||
|
[369.18465470031083, 213.59844845031083, 0, 0, -32.75201584283798, 32.752015842838006],
|
||||||
|
[369.18465470031083, 332.1973252129927, -32.752015842838034, -32.75201584283809, 0, 0],
|
||||||
|
[209.1846547003108, 332.1973252129927, 0, 0, 0, 0],
|
||||||
|
[209.1846547003108, 213.59844845031083, -32.75201584283798, 32.752015842838006, 0, 0]
|
||||||
|
],
|
||||||
|
closed: true
|
||||||
|
});
|
||||||
|
compareBoolean(function() { return p1.unite(p2); },
|
||||||
|
'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('frame.intersect(rect);', function() {
|
test('frame.intersect(rect);', function() {
|
||||||
var frame = new CompoundPath();
|
var frame = new CompoundPath();
|
||||||
frame.addChild(new Path.Rectangle(new Point(140, 10), [100, 300]));
|
frame.addChild(new Path.Rectangle(new Point(140, 10), [100, 300]));
|
||||||
|
|
Loading…
Reference in a new issue