2014-03-30 07:53:35 -04:00
|
|
|
/*
|
|
|
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
|
|
|
* http://paperjs.org/
|
|
|
|
*
|
2020-05-23 16:24:42 -04:00
|
|
|
* Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
|
|
|
|
* http://juerglehni.com/ & https://puckey.studio/
|
2014-03-30 07:53:35 -04:00
|
|
|
*
|
|
|
|
* Distributed under the MIT license. See LICENSE file for details.
|
|
|
|
*
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2016-01-27 13:57:07 -05:00
|
|
|
QUnit.module('CurveLocation');
|
2014-03-30 07:53:35 -04:00
|
|
|
|
2014-03-30 08:22:40 -04:00
|
|
|
test('CurveLocation#offset', function() {
|
2014-08-16 13:24:54 -04:00
|
|
|
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));
|
2014-03-30 07:53:35 -04:00
|
|
|
|
2014-08-16 13:24:54 -04:00
|
|
|
for (var i = 0; i < 4; i++) {
|
|
|
|
equals(path.segments[i].location.offset, i * 100);
|
|
|
|
}
|
2014-03-30 07:53:35 -04:00
|
|
|
});
|