diff --git a/test/tests/Item_Contains.js b/test/tests/Item_Contains.js index d419e4f2..c3f16b35 100644 --- a/test/tests/Item_Contains.js +++ b/test/tests/Item_Contains.js @@ -188,4 +188,17 @@ test('Path#contains() (touching stationary point with changing orientation)', fu }); testPoint(path, new Point(200, 200), true); -}) \ No newline at end of file +}); + +test('Path#contains() (complex shape)', function() { + var path = new Path({ + pathData: 'M301 162L307 154L315 149L325 139.5L332.5 135.5L341 128.5L357.5 117.5L364.5 114.5L368.5 110.5L380 105.5L390.5 102L404 96L410.5 96L415 97.5L421 104L425.5 113.5L428.5 126L429.5 134L429.5 141L429.5 148L425.5 161.5L425.5 169L414 184.5L409.5 191L401 201L395 209L386 214.5L378.5 217L368 220L348 219.5L338 218L323.5 212.5L312 205.5L302.5 197.5L295.5 189L291.5 171.5L294 168L298 165.5L301 162z', + fillColor: 'blue', + strokeColor: 'green', + strokeWidth: 2 + }); + + testPoint(path, new Point(360, 160), true); + testPoint(path, new Point(377, 96), false); +}); +