mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
25 lines
658 B
JavaScript
25 lines
658 B
JavaScript
/*
|
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
|
* http://paperjs.org/
|
|
*
|
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
|
*
|
|
* Distributed under the MIT license. See LICENSE file for details.
|
|
*
|
|
* All rights reserved.
|
|
*/
|
|
|
|
QUnit.module('CurveLocation');
|
|
|
|
test('CurveLocation#offset', 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 * 100);
|
|
}
|
|
});
|