mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Fix tests using applyMatrix() calls after bounds are changed.
To be decided if changing bounds should implicitly apply matrices?
This commit is contained in:
parent
e1c8c48f11
commit
3e87eed416
1 changed files with 2 additions and 0 deletions
|
@ -54,6 +54,7 @@ test('path.bounds', function() {
|
|||
|
||||
// Set new bounds and check segment list as result of resizing / positioning
|
||||
path.bounds = { x: 100, y: 100, width: 200, height: 200 };
|
||||
path.applyMatrix();
|
||||
equals(path.segments.toString(),
|
||||
'{ point: { x: 107.93077, y: 179.56917 }, handleIn: { x: -24.41127, y: 51.30707 }, handleOut: { x: 39.52904, y: -83.08194 } },{ point: { x: 271.10084, y: 160.66656 }, handleIn: { x: -53.96176, y: -99.91377 }, handleOut: { x: 53.96176, y: 99.91377 } },{ point: { x: 215.85428, y: 296.96086 }, handleIn: { x: 85.81084, y: -17.18521 }, handleOut: { x: -101.49949, y: 20.32729 } }',
|
||||
'resized path.segments');
|
||||
|
@ -64,6 +65,7 @@ test('path.bounds', function() {
|
|||
{ x: 92.38109, y: 106.78957, width: 191.4803, height: 203.66878 },
|
||||
'rotated path.bounds');
|
||||
|
||||
path.applyMatrix();
|
||||
equals(path.segments.toString(),
|
||||
'{ point: { x: 142.60356, y: 125.16811 }, handleIn: { x: -51.67967, y: 23.61224 }, handleOut: { x: 83.68504, y: -38.23568 } },{ point: { x: 279.74945, y: 215.57158 }, handleIn: { x: 22.88623, y: -111.22434 }, handleOut: { x: -22.88623, y: 111.22434 } },{ point: { x: 149.81984, y: 284.46726 }, handleIn: { x: 76.78135, y: 41.99351 }, handleOut: { x: -90.81925, y: -49.67101 } }',
|
||||
'roated path.segments');
|
||||
|
|
Loading…
Reference in a new issue