mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Implement test for strokeBounds of closed path with only one segment.
This commit is contained in:
parent
054356c78d
commit
8f20dabf4d
1 changed files with 10 additions and 1 deletions
|
@ -78,10 +78,19 @@ test('path.strokeBounds on path with single segment and stroke color', function(
|
|||
var path = new Path([
|
||||
new Segment(new Point(121, 334), new Point(-19, 38), new Point(30.7666015625, -61.53369140625))
|
||||
]);
|
||||
path.style.strokeColor = 'black';
|
||||
path.strokeColor = 'black';
|
||||
compareRectangles(path.strokeBounds, { x: 121, y: 334, width: 0, height: 0 });
|
||||
});
|
||||
|
||||
test('path.strokeBounds on closed path with single segment and stroke color', function() {
|
||||
var path = new Path([
|
||||
new Segment(new Point(121, 334), new Point(19, 38), new Point(30.7666015625, -61.53369140625))
|
||||
]);
|
||||
path.strokeColor = 'black';
|
||||
path.closed = true;
|
||||
compareRectangles(path.strokeBounds, { x: 120.5, y: 312.88324 , width: 19.91643, height: 30.53977 });
|
||||
});
|
||||
|
||||
test('path.bounds & path.strokeBounds with stroke styles', function() {
|
||||
function makePath() {
|
||||
var path = new Path();
|
||||
|
|
Loading…
Reference in a new issue