mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
a7a07fb6d5
- Convert from {@code ...} to shorter `...` - Reformat some documentation comment blocks - Update copyright notices
37 lines
1 KiB
JavaScript
37 lines
1 KiB
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.
|
|
*/
|
|
|
|
module('Size');
|
|
test('new Size(10, 20)', function() {
|
|
var size = new Size(10, 20);
|
|
equals(size.toString(), '{ width: 10, height: 20 }');
|
|
});
|
|
|
|
test('new Size([10, 20])', function() {
|
|
var size = new Size([10, 20]);
|
|
equals(size.toString(), '{ width: 10, height: 20 }');
|
|
});
|
|
|
|
test('new Size({width: 10, height: 20})', function() {
|
|
var size = new Size({width: 10, height: 20});
|
|
equals(size.toString(), '{ width: 10, height: 20 }');
|
|
});
|
|
|
|
test('new Size(new Point(10, 20))', function() {
|
|
var size = new Size(new Point(10, 20));
|
|
equals(size.toString(), '{ width: 10, height: 20 }');
|
|
});
|
|
|
|
test('new Size({ x: 10, y: 20})', function() {
|
|
var size = new Size({x: 10, y: 20});
|
|
equals(size.toString(), '{ width: 10, height: 20 }');
|
|
});
|