Jürg Lehni
eab0b9db5e
Correctly handle path.replaceWith(path) calls.
...
Closes #1118
2016-07-22 23:29:33 +02:00
Jürg Lehni
cbe41c536e
Boolean: Return the full winding object from _getWinding() and use it to improve PathItem#contains() with even-odd full-rule.
...
Also store the full winding object on the processed segments, to have more information available in boolean operations.
2016-07-22 15:46:42 +02:00
Jürg Lehni
23f3097f84
Facilitate code minification in PathIterator.
2016-07-22 14:21:35 +02:00
Jürg Lehni
becac4c921
Use shorter zero checks for array indices and length.
...
Keeping === 0 for mathematical algorithms seems clearer.
2016-07-22 13:46:24 +02:00
Jürg Lehni
3d57216ffe
Update test for #944 to work with new way of handling compound-paths.
...
But keep deactivated as it is currently failing, see #1116
2016-07-22 13:15:05 +02:00
Jürg Lehni
a0417040f8
Improve handling of sub-path orientation in CompoundPath.
...
Remove automatic orientation on insertion, as it caused more troubles than solved problems, in favor of the new PathItem#reorient() method, or the even-odd fill-rule.
Closes #590 , #1029
2016-07-21 15:21:45 +02:00
Jürg Lehni
16e53cc1ad
Minor reformatting and changes.
...
no need for paper namespace in unit test code
2016-07-20 17:58:47 +02:00
Jürg Lehni
58991a569e
Merge pull request #1115 from iconexperience/addCurveIntersections-patch
...
Improve fat line clipping to fix #1088
2016-07-20 17:56:04 +02:00
Jan
381e92501a
Add test for #1088
2016-07-20 16:33:13 +02:00
Jürg Lehni
a683486ff5
Some code cleanup for previous commits, and shorten boolean tests a bit.
2016-07-20 16:32:21 +02:00
Jürg Lehni
f988445dad
Boolean: Implement optimization for operands without crossings.
...
Closes #1113
2016-07-20 16:15:10 +02:00
Jan
46d0bf2d7d
Add tests from W3C SVG Test Suite
2016-07-20 15:29:19 +02:00
Jürg Lehni
c338e9a6ec
Tests: Add another SVG path data test.
2016-07-20 15:10:23 +02:00
Jürg Lehni
0b672cfb62
Merge branch 'new-winding' into develop
2016-07-19 14:27:45 +02:00
Jürg Lehni
e539633852
Implement new and shorter segments array notation.
...
Supporting:
- Closing paths by including `true` as the last entry
- Nested segment arrays that can be passed to PathItem.create() and the CompoundPath constructor to create all sub-paths
2016-07-19 13:08:21 +02:00
Jürg Lehni
13a68cec46
Fix failing unit test, and some code cleanup.
2016-07-19 10:24:37 +02:00
Jürg Lehni
288c3d4012
Fix issue in setPathData(), horizontal or vertical lineto and relative moveto commands.
...
Relates to #1101
2016-07-19 10:09:55 +02:00
Jürg Lehni
32d8c969fb
Clean up handling of #_set(), #set() and #initialize()
...
Convention:
- #_set() is for actually setting properties, e.g. on Point, Size, so that derived classes can reuse other parts (e.g. SegmentPoint)
- #set() is a shortcut to #initialize() on all basic types, to offer the same amount of flexibility when setting values.
2016-07-18 20:11:01 +02:00
Jürg Lehni
2e054ecf47
Deactivate unit test for #944 edge case for now…
2016-07-18 16:13:33 +02:00
Jürg Lehni
e7c53b904c
Implement unit test for #973 .
2016-07-18 14:11:34 +02:00
Jürg Lehni
a1666a9b82
Implement additional unit tests for path#getInteriorPoint()
2016-07-17 23:10:47 +02:00
Jürg Lehni
ac97b9d9d7
Implement unit test for #1075
2016-07-17 21:16:52 +02:00
Jürg Lehni
38e5fc1488
Tests: Reference GitHub issues where they're knonw in PathItem#contains() tests.
2016-07-14 09:32:29 +02:00
Jürg Lehni
8a45c5dff9
Fix Node.js unit-tests, and add CHANGELOG entry for #1103
2016-07-12 19:27:35 +02:00
Jürg Lehni
89c60b1a05
Loosely couple Node.js code to canvas module.
...
Treat absence of canvas module like a web worker context.
Relates to #1103
2016-07-12 19:11:09 +02:00
Jürg Lehni
02658c9e74
Clean-up code from PR #1087
...
Closes #1085
2016-07-09 01:01:19 +02:00
Jürg Lehni
1914e64e4b
Fix boolean tests to compare with improved results.
...
Disovered thanks to @sapics' improved solveCubic() in #1087
2016-07-08 23:05:50 +02:00
Jürg Lehni
45ffc6fb88
Improve Segment constructor to correctly handle undefined values.
...
Closes #1095
2016-07-03 13:30:56 +02:00
Jürg Lehni
0cb9c50e8f
Implement unit test for #1054
...
Closes #1054
2016-06-13 14:54:13 +02:00
Jürg Lehni
ea5a635edf
Implement unit tests for #964
...
Closes #964 .
2016-06-13 14:51:38 +02:00
Jürg Lehni
742401a0e1
Fix Item#insertChildren() error when passing null for some children.
...
Relates to #1036
2016-06-13 14:16:25 +02:00
Jürg Lehni
4966f6250f
Implement better calculation of tangential angles in CurveLocation#isCrossing()
...
Relates to #1074
2016-06-12 18:53:14 +02:00
Jürg Lehni
5854c25dd5
Implement Curve#getOffsetAtTime()
2016-06-12 18:32:05 +02:00
Jürg Lehni
b0d0e41ddc
Allow negative offsets in all Curve#get*At() methods.
...
To search from the end of the curve instead of the beginning.
2016-06-12 18:21:37 +02:00
Jürg Lehni
614c781f29
Put the recursion cap back into fat-line clipping code.
...
But use a higher value, and have it work in conjunction with call-count cap.
Relates to #1074
2016-06-12 17:07:43 +02:00
Jürg Lehni
452bbfdaa4
Add unit tests and change-log entry for #904
...
Closes #904
2016-06-11 13:13:08 +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
715025725d
Improve handling of SymbolItem bounds with #applyMatrix = false.
...
Closes #1070
2016-06-10 21:32:22 +02:00
Jürg Lehni
ed3e283802
Fix Item#importJSON() to preserve #parent on existing, already inserted items.
...
Closes #1041
2016-06-10 17:45:02 +02:00
Jürg Lehni
803dfb6bb1
Improve reliability of Curve#isStraight()
...
Closes #1066
2016-06-10 12:33:44 +02:00
Jürg Lehni
83a20b4c11
Implement unit test for #1059 .
...
Closes #1059 .
2016-06-10 12:04:08 +02:00
Jürg Lehni
e1961c2b91
Implement unit test and changelog entry for #1064
...
Closes #1064 .
2016-06-10 10:29:38 +02:00
Jürg Lehni
f19d0c8134
Rename GradientStop#rampPoint to #offset
2016-05-31 12:35:44 +02:00
Jürg Lehni
9017bf1767
Unit test: Fix PaperScript left-over in SVG Export.
2016-05-27 11:37:59 +02:00
Jürg Lehni
9aa29e0afc
Add support for construction from strings to Point and Size.
2016-05-27 11:37:19 +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
cb0810d18a
QUnit: Fix tests on Node v6.
2016-05-22 15:59:05 +02:00
Jürg Lehni
eceb133686
Tests: Second attempt to find fitting tolerance for failing gradient SVG export.
2016-04-13 14:37:13 -07:00
Jürg Lehni
6f4738f8b2
Tests: Increate tolerance for gradient SVG export.
2016-04-13 14:08:52 -07:00
Jürg Lehni
d8d61ff160
Fix #1015 : Improve handling of already inserted children in#insertChildren()
2016-04-13 13:36:26 -07:00