From 5d48513f8ac5a1fd8b9f3a9c268a493f053c54d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 13 Jun 2013 11:07:43 -0700 Subject: [PATCH] Define failing test for hit-testing miter strokes. --- test/tests/HitResult.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/tests/HitResult.js b/test/tests/HitResult.js index 6065c6d2..f62b13cb 100644 --- a/test/tests/HitResult.js +++ b/test/tests/HitResult.js @@ -527,4 +527,18 @@ test('Check hit testing of placed symbols.', function() { }, true, 'hitResult.item should be placedItem'); }); + +test('Hit testing the corner of a rectangle with miter stroke.', function() { + var rect = new Path.Rectangle({ + rectangle: [100, 100, 300, 200], + fillColor: '#f00', + strokeColor: 'blue', + strokeJoin: 'miter', + strokeWidth: 20 + }); + equals(function() { + return rect.hitTest(rect.strokeBounds.topRight) != null; + }, true); +}); + // TODO: project.hitTest(point, {type: AnItemType}); \ No newline at end of file