mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Define more tests for Path#contains().
This commit is contained in:
parent
085fa3e1c6
commit
2a3ede67bb
1 changed files with 13 additions and 0 deletions
|
@ -39,6 +39,19 @@ test('Path#contains() (Regular Polygon)', function() {
|
||||||
testPoint(path, new Point(10, 20), false);
|
testPoint(path, new Point(10, 20), false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Path#contains() (Circle Contours)', function() {
|
||||||
|
var path = new Path.Circle({
|
||||||
|
center: [100, 100],
|
||||||
|
radius: 50,
|
||||||
|
fillColor: 'blue',
|
||||||
|
});
|
||||||
|
|
||||||
|
testPoint(path, path.bounds.topCenter, true);
|
||||||
|
testPoint(path, path.bounds.leftCenter, true);
|
||||||
|
testPoint(path, path.bounds.rightCenter, true);
|
||||||
|
testPoint(path, path.bounds.bottomCenter, true);
|
||||||
|
});
|
||||||
|
|
||||||
test('Path#contains() (Round Rectangle)', function() {
|
test('Path#contains() (Round Rectangle)', function() {
|
||||||
var rectangle = new Rectangle({
|
var rectangle = new Rectangle({
|
||||||
point: new Point(0, 0),
|
point: new Point(0, 0),
|
||||||
|
|
Loading…
Reference in a new issue