mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Implement failing test for #437.
This commit is contained in:
parent
2b9d069864
commit
0f5e74a08e
2 changed files with 31 additions and 2 deletions
25
test/tests/CurveLocation.js
Normal file
25
test/tests/CurveLocation.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||
* http://paperjs.org/
|
||||
*
|
||||
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
|
||||
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
||||
*
|
||||
* Distributed under the MIT license. See LICENSE file for details.
|
||||
*
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
module('CurveLocation');
|
||||
|
||||
test('segment.location', function() {
|
||||
var path = new Path();
|
||||
path.add(new Point(100, 100));
|
||||
path.add(new Point(200, 100));
|
||||
path.add(new Point(300, 100));
|
||||
path.add(new Point(400, 100));
|
||||
|
||||
for (var i = 0; i < 4; i++) {
|
||||
equals(path.segments[i].location.offset, (i + 1) * 100);
|
||||
}
|
||||
});
|
|
@ -29,13 +29,17 @@
|
|||
/*#*/ include('Segment.js');
|
||||
|
||||
/*#*/ include('Path.js');
|
||||
/*#*/ include('Style.js');
|
||||
/*#*/ include('Curve.js');
|
||||
/*#*/ include('Path_Shapes.js');
|
||||
/*#*/ include('Path_Drawing_Commands.js');
|
||||
/*#*/ include('Path_Curves.js');
|
||||
/*#*/ include('Path_Bounds.js');
|
||||
/*#*/ include('Path_Length.js');
|
||||
|
||||
/*#*/ include('Curve.js');
|
||||
/*#*/ include('CurveLocation.js');
|
||||
|
||||
/*#*/ include('Style.js');
|
||||
|
||||
/*#*/ include('CompoundPath.js');
|
||||
|
||||
/*#*/ include('PathItem_Contains.js');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue