mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
Define failing test for hit-testing miter strokes.
This commit is contained in:
parent
ae474131cc
commit
5d48513f8a
1 changed files with 14 additions and 0 deletions
|
@ -527,4 +527,18 @@ test('Check hit testing of placed symbols.', function() {
|
||||||
}, true, 'hitResult.item should be placedItem');
|
}, 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});
|
// TODO: project.hitTest(point, {type: AnItemType});
|
Loading…
Reference in a new issue