Commit graph

52 commits

Author SHA1 Message Date
Jürg Lehni
23f3097f84 Facilitate code minification in PathIterator. 2016-07-22 14:21:35 +02:00
Jürg Lehni
de8b626033 Add tolerance argument to Path#join(path, tolerance) 2016-06-11 12:41:23 +02:00
Jürg Lehni
948a8af9a8 Fix Item#strokeBounds with #strokeScaling and #applyMatrix
Closes #1014
2016-05-22 21:17:24 +02:00
Jürg Lehni
da7d0d8f75 Implement Path#splitAt(offset)
Also make sure the deprecated Path#split(offset) works as it used to. Relates to #563
2016-03-14 18:59:09 +01:00
Jürg Lehni
69c34707e7 fix #994: Revert commit b5af47a7b1
Revert back to correct implementation of Path#getArea() and implement unit tests for it.
2016-02-26 12:58:50 +01:00
Jürg Lehni
9e8fcee8cd Change implementation of PathItem#flatten(flatness)
- flatness parameter specifies maximum allowed error instead of maximum allowed distance between point
- Parts that are already flat are not further flattened
- Corners are preserved

Closes #618
2016-02-10 14:58:40 +01:00
Jürg Lehni
ed4347714b Remove duplicate unit tests. 2016-02-10 13:26:40 +01:00
Jürg Lehni
922a502ee2 Add #interpolate() method to Segment, Path and CompoundPath
Closes #624
2016-02-02 22:11:06 +01:00
Jürg Lehni
a02d7248c0 Move Path_Bounds tests to Item_Bounds.
And add a test for shape.strokeBounds without strokeScaling.
2016-02-02 13:55:36 +01:00
Jürg Lehni
4c84c3dad5 Tests: Start getting QUnit tests to work on Node.js
Work in progress…
2016-01-31 12:43:20 +01:00
Jürg Lehni
a7a07fb6d5 Update JSDoc and do some documentation spring-cleaning.
- Convert from {@code ...} to shorter `...`
- Reformat some documentation comment blocks
- Update copyright notices
2015-12-30 21:55:19 +01:00
Jürg Lehni
48cb05a181 Replace tabs with 4 white-spaces. 2014-08-16 19:24:54 +02:00
Jürg Lehni
e22fa3a664 Update copyright notice. 2014-01-04 01:47:16 +01:00
Jürg Lehni
3958d35f28 Change behavior of Path#fullySelected.
Setting it on empty paths does the same as Path#selected.
2013-10-17 12:03:46 +02:00
Jürg Lehni
7a3448712b Remove duplicate test and clean up code. 2013-10-17 11:32:11 +02:00
Jürg Lehni
3a043e0023 Fix empty tests. 2013-06-11 13:40:50 -07:00
Jonathan Puckey
d3435ec803 Add failing test where calling Path#simplify on a path with three identical segments throws an error. 2013-02-27 17:34:28 +01:00
Jürg Lehni
6c9c16ad3d Update copyright information comments, and year. 2013-01-28 18:03:27 -08:00
Jonathan Puckey
7093b73d31 Cleanup last merged pull request. 2012-03-01 17:06:39 +01:00
Alex Buchanan
f1a6357a05 Path.reverse() should adjust segment indices 2012-02-18 15:13:23 -08:00
Jürg Lehni
5655981f6d Clean up white spaces. 2011-07-07 16:09:02 +02:00
Jürg Lehni
79c0ad8cc5 Update copyright notices. 2011-07-01 12:17:45 +02:00
Jonathan Puckey
4c306b9997 Add failing test where after cloning a selected item, it isn't added to the Project#selectedItems array. 2011-06-21 01:31:07 +02:00
Jürg Lehni
2f2b3ed7e0 Fix selection behavior when segment lists are cleared, in which case we expect the path to remain selected. 2011-06-20 19:08:34 +01:00
Jonathan Puckey
a2a8939d5d Path# rename #pointsToCurves to #simplify and #curvesToPoints to #flatten. 2011-06-20 19:17:07 +02:00
Jonathan Puckey
5e495a3a6e Add tests for selection state after removing all segments of a path. 2011-06-20 17:00:41 +02:00
Jonathan Puckey
1ae2a4ba4b Fix bug in Path#selected test. 2011-06-20 16:59:51 +02:00
Jonathan Puckey
00476c327e Add tests for Path selection after calling Path#curvesToPoints() and Path#smooth(). 2011-06-20 16:51:13 +02:00
Jonathan Puckey
9f7b4b7480 Add failing test: After selecting a segment, Path#selected should return true 2011-06-17 14:10:10 +02:00
Jürg Lehni
658fc4b2ff Fix Path#selected tests. 2011-06-14 15:37:46 +01:00
Jonathan Puckey
e69395ced0 Add failing test. 2011-06-14 12:19:54 +02:00
Jonathan Puckey
71c5902112 Path tests: Change expected values in failing test, as the tested behaviour is correct. 2011-06-13 20:08:09 +02:00
Jonathan Puckey
9c88c00360 Add failing test for Path#fullySelected. 2011-06-05 20:08:46 +02:00
Jonathan Puckey
af5aa67c36 Change Path#removeSegments(from, to) test to fail and add a todo questioning if its behaviour is correct. Also add a failing Path#removeSegments() test. 2011-06-05 19:54:11 +02:00
Jürg Lehni
cfe968d30e Rename Document -> Project, DocumentView -> ProjectView, paper.document -> paper.project and paper.documents -> paper.projects, to avoid name clashing with window.document. 2011-05-16 13:33:15 +01:00
Jürg Lehni
2a24ec66ac Have test() method automatically create and remove a Document for reach test. 2011-05-14 18:59:04 +01:00
Jürg Lehni
520f5054e5 Update tests to use new function() {} notation for automatic rendering of messages. 2011-05-07 17:46:06 +01:00
Jürg Lehni
fc57fd2136 Go back to previous notation that works again. 2011-05-05 12:35:38 +01:00
Jürg Lehni
fb6955e509 Replace compareSegments() / compareSegmentLists() calls with straight toString() compares. 2011-05-04 19:40:52 +01:00
Jürg Lehni
a5099fd51d Add support for insertion of multiple segments at once to Path#_add(), #add() and #insert(), and change code that relies on these methods. 2011-05-04 18:42:40 +01:00
Jürg Lehni
b0282b9bd4 Change Segment to be aware of its index in the segment list and have the curves list update automatically on each change to segments. 2011-05-01 13:27:53 +01:00
Jürg Lehni
ea510c2403 Separate Path#remove(), #remove(index) & #remove(from, to) into #removeSegment(index) and #removeSegments(from, to). 2011-04-28 15:42:16 +01:00
Jonathan Puckey
30307a0341 Add failing test for Path#reverse. 2011-04-27 12:13:28 +02:00
Jonathan Puckey
578269d0c1 Add failing path selection test. 2011-04-22 11:52:24 +02:00
Jonathan Puckey
c9898ef3b0 Path tests: rename test. 2011-04-22 11:40:54 +02:00
Jonathan Puckey
4d89d6c235 Path#setSegments: reset _selectedSegmentCount when setting a new segment list. 2011-04-22 11:39:12 +02:00
Jonathan Puckey
74cee4abef Implement Path#remove() and add tests for it. 2011-04-13 16:16:32 +02:00
Jonathan Puckey
499c421021 Implement Path#join(path) and add tests for it. 2011-04-11 23:30:08 +02:00
Jürg Lehni
dfb11610e7 Define getCurrentSegment() as private and make sure it's not used as a bean. 2011-03-06 15:17:06 +00:00
Jürg Lehni
7e52355f93 Rename Doc -> Document since paper code is namespaced now and does not clash with global Document prototype. 2011-03-03 17:23:27 +00:00