Jonathan Puckey
c6bcd7d97a
Improve Size documentation.
2013-03-16 13:04:33 +01:00
Jürg Lehni
1d1e6425fa
Remove all left-overs of call chaining, except for where it's in use.
2013-03-05 20:39:07 -08:00
Jürg Lehni
7782116e06
Fix issues with Rectangle constructor.
...
Reading from { from: , to: } now works as expected.
2013-03-03 15:24:30 -08:00
Jonathan Puckey
91dfc9b1ea
Rectangle constructor docs: rename arguments from 'point1, point2' to 'from, to'.
2013-03-03 14:18:11 +01:00
Jürg Lehni
3f5d0a6925
Merge constructor._name with _type and use CamelCase for Item types.
2013-03-01 17:13:22 -08:00
Jürg Lehni
3f85dcdb77
Use #_set() in Rectangle#initialize() to simplify code and increase flexibility.
2013-03-01 14:37:27 -08:00
Jürg Lehni
9d8cddbe42
Implement new private Format object that handles formatting of number, point, size and rectangle.
2013-02-28 19:14:05 -08:00
Jürg Lehni
6b7c6b6c4c
Implement Item#bounds.selected to control drawing of selected item bounds.
2013-02-24 15:41:31 -08:00
Jürg Lehni
fdd15e675f
Add options argument to #toJson() methods, and use to implement optional fractional digit precision control.
2013-02-12 14:57:54 -08:00
Jürg Lehni
b10454a83c
Rename Matrix#createInverse() to #inverted() and #createShiftless() to #shiftless().
2013-02-09 12:18:40 -08:00
Jürg Lehni
be3b257175
Restructure Matrix code sequence.
2013-02-09 12:11:19 -08:00
Jürg Lehni
0cf290ff2d
More work on Matrix decomposition.
...
Have Matrix#decompose() return null if decomposition is not possible, separate Matrix#translation from decomposition code as it's always defined, and document methods and properties.
2013-02-09 12:09:55 -08:00
Jürg Lehni
2bb9153810
Fix TODO in Matrix#scale().
2013-02-09 11:52:31 -08:00
Jürg Lehni
cd9fc39f54
Rename Matrix#setIdentity() to #reset() and document it.
2013-02-09 11:45:33 -08:00
Jürg Lehni
9aaa864f81
Streamline Matrix by removing unnecessary Matrix#setTo*() and Matrix.get*Instance() methods.
...
Use (new Matrix().*()) instead.
2013-02-09 11:42:55 -08:00
Jürg Lehni
3930a40c7e
Implement Matrix#rotate() without relying on Matrix#getRotateInstance().
2013-02-09 11:40:49 -08:00
Jürg Lehni
53474aa5c0
Put decomposed matrix values in sequence in which they would have to be applied again.
2013-02-09 11:21:16 -08:00
Jürg Lehni
aec13ffd43
Fix all tests for Matrix decomposition.
2013-02-08 23:25:10 -08:00
Jürg Lehni
e438ac8223
Implement proper matrix decomposition and use it in SvgExport.
2013-02-08 23:02:20 -08:00
Jürg Lehni
aec87f4ed1
Fix issues with matrix decomposition.
...
Work in progress...
2013-02-08 22:17:32 -08:00
Jürg Lehni
d793d8a43d
Clean up code.
2013-02-08 18:17:51 -08:00
Jürg Lehni
6c9c16ad3d
Update copyright information comments, and year.
2013-01-28 18:03:27 -08:00
Jürg Lehni
3319488f5a
Fix reading of center point in Rectangle constructor.
2012-12-30 18:26:53 +01:00
Jürg Lehni
d0fff09bb0
Allow creation of rectangles from {point, size} and {center, size} object literals.
2012-12-30 18:17:09 +01:00
Jürg Lehni
2abefee336
Merge Base.readValue() with Base.read() and rename Base.peekValue() to Base.peek().
...
When called directly on Base, read() reads values, otherwise the specific type of the subclass it is called on.
2012-12-30 16:07:20 +01:00
Jürg Lehni
fdb4bab479
Improve arguments reading in Line constructors.
...
Avoid parameter overriding.
2012-12-27 19:12:30 +01:00
Jürg Lehni
57a9f4fc91
Use constant substitution for Numerical constants as well.
2012-12-27 18:36:59 +01:00
Jürg Lehni
8c33e5be88
Fix null exception in Matrix#equals().
2012-12-27 13:04:21 +01:00
Jürg Lehni
4f83e0eee6
Commit first version of serialization / deserialization mechanism.
...
It appears to work fine already for Paths and Groups.
2012-12-27 12:45:55 +01:00
Jürg Lehni
734cc1cc61
Undo commit 4445376c0204cb5a2e408c64b77a5b6fa09305ba since it clashes with magnification.
2012-12-21 16:41:57 +01:00
Jürg Lehni
b535d9f843
Implement new Bootstrap feature that allows hiding of getter parameters to make sure beans are produced, and use it across the library.
2012-12-15 19:51:31 +01:00
Jürg Lehni
07688a685e
Switch back from using 'x' in obj to obj.x != null in basic type constructors, since 'x' in <primitive type value> would throw an exception.
2012-11-28 22:09:09 -08:00
Jürg Lehni
d671a08205
Introduce Base.toFloat() and rename Base.formatNumber() to Base.formatFloat()
2012-11-14 01:31:08 -08:00
Jürg Lehni
f871430018
Use 'in' operator instead of typeof checks in basic type constructors.
2012-11-10 16:32:37 -08:00
Jürg Lehni
86609103fc
Allow rectangles to be created from arrays too.
2012-11-10 15:45:23 -08:00
Jürg Lehni
53a8099403
Avoid division with almost zero.
2012-11-06 14:02:07 -08:00
Jürg Lehni
d9bfc2fa35
Implement Matrix support in SvgExporter.
2012-11-06 10:04:04 -08:00
Jürg Lehni
4c51544b6e
Implement correct checks for primitives (rect, ellipse, circle).
2012-11-06 01:22:16 -08:00
Jürg Lehni
a5cdb5492c
Optimise Point#rotate(0)
2012-11-05 23:23:25 -08:00
Jürg Lehni
400b454177
Introduce Numerical.isZero(), for comparisons against 0 with a tolerance.
2012-11-05 21:06:13 -08:00
Jürg Lehni
6ed1d67ada
Modernize Bootstrap.js, introduce Base.create() and use it instead of the Constructor.dont hack for object creation without the calling of initialize.
2012-11-03 21:49:37 -07:00
Jürg Lehni
88dff19f73
Define squared parameter in Point#getDistance() as optional.
2012-11-02 16:45:46 -07:00
Jürg Lehni
30374ae3b4
Implement proper index independent argument list reading of basic types.
...
Implemented for Point, Size, Rectangle and Color.
2012-10-18 14:24:15 -07:00
Jürg Lehni
6f2ff18fa1
Bring back fallback scenario in Point#initialize().
2012-10-15 17:13:20 -07:00
Jürg Lehni
db93544e8c
Restructure Point#initialize() to reflect new findings regarding typeof performance.
...
typeof val === 'undefined' is way faster than val === undefined.
2012-10-15 17:11:11 -07:00
Jürg Lehni
199d19a237
Minor code clean-up.
2012-09-30 14:09:59 -07:00
Jürg Lehni
59a55f7574
Merge branch 'master' of github.com:paperjs/paper.js
2012-09-30 14:08:44 -07:00
Jürg Lehni
2c5c4ae423
Improve documentation of Rectangle#intersects.
2012-09-30 14:08:02 -07:00
Jonathan Puckey
2a0f322c22
Point#getLength: access to out of bounds index in arguments array prevented function from being optimized.
2012-07-25 20:02:04 +02:00
Jürg Lehni
a21d180150
Use faster Point.create().
2011-12-20 23:32:53 +01:00