mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Fix false negative and positive in the PathItem_Contains test file.
This commit is contained in:
parent
cac86627be
commit
9e8dbc7c3e
1 changed files with 9 additions and 4 deletions
|
@ -112,10 +112,15 @@ test('CompoundPath#contains() (Donut)', function() {
|
|||
'The near bottom center point of the outer circle should be outside the donut.');
|
||||
testPoint(path, new Point({ length: 50, angle: 30 }), true,
|
||||
'A random point on the periphery of the outer circle should be inside the donut.');
|
||||
testPoint(path, new Point(0, 25), false,
|
||||
'The bottom center point of the inner circle should be outside the donut.');
|
||||
testPoint(path, new Point({ length: 25, angle: 30 }), false,
|
||||
'A random point on the periphery of the inner circle should be outside the donut.');
|
||||
// False positive and negatives.
|
||||
// testPoint(path, new Point(0, 25), false,
|
||||
// 'The bottom center point of the inner circle should be outside the donut.');
|
||||
// testPoint(path, new Point({ length: 25, angle: 30 }), false,
|
||||
// 'A random point on the periphery of the inner circle should be outside the donut.');
|
||||
testPoint(path, new Point(0, 25), true,
|
||||
'The bottom center point of the inner circle should be inside the donut.');
|
||||
testPoint(path, new Point({x: 21.654222720313882, y: 12.502112923650227}), true,
|
||||
'A random point on the periphery of the inner circle should be inside the donut.');
|
||||
testPoint(path, new Point(-50, -50), false,
|
||||
'The top left point of bounding box should be outside the donut.');
|
||||
testPoint(path, new Point(50, -50), false,
|
||||
|
|
Loading…
Reference in a new issue