Jürg Lehni
6ad5bfafee
Implement unit test for #1073
...
Closes #1073 , closes #1074
2017-01-25 07:55:37 -05:00
Jürg Lehni
cf2ebbaaf8
Partly revert 09785a504b
...
To make the edge-case in #1239 work again. Also add unit tests for edge-case.
2017-01-15 11:34:02 +01:00
Jürg Lehni
e7b53c8a22
Implement Curve#classify() based on Loop and Blinn.
...
And use it to simplify curve self-intersection handling.
Relates to #773 , #1074 , Closes #1235
2017-01-11 15:01:10 +01:00
Jürg Lehni
2145efb29b
Implement more unit tests for #1109
...
Closes #1109
2017-01-08 15:14:47 +01:00
Jürg Lehni
673d157f31
Implement unit tests for #1116
...
Closes #1116
2017-01-08 15:07:40 +01:00
Jürg Lehni
0ae2ded9cc
Fix handling of hit-test tolerance on scaled items with #applyMatrix = false
...
Closes #1195
2017-01-08 14:34:58 +01:00
Jürg Lehni
46fce16bff
Fix handling of overlapping paths for subtract and exclude operations.
...
Closes #1139
2017-01-03 00:50:22 +01:00
Jürg Lehni
c21e19b303
Fix overlap sequence handling in Path#compare()
...
Closes #1223
2016-12-31 06:49:57 +01:00
Jürg Lehni
7d3d7351ab
Implement more PathItem#compare() tests.
...
Two failing for now.
2016-12-31 01:07:50 +01:00
Jürg Lehni
d405f45d38
Correctly handle offset in Curve#divideAt(offset)
...
Closes #1230
2016-12-31 00:34:37 +01:00
Jürg Lehni
771bb61038
Fix matrix cloning for groups with #applyMatrix = false
...
Closes #1225
2016-12-30 13:25:08 +01:00
Jürg Lehni
c12f7c4a64
Start implementing unit tests for PathItem#compare()
2016-12-29 10:56:06 +01:00
Jürg Lehni
97abd80bab
Replace all occurences of Math.sqrt(2) with Math.SQRT2
2016-12-29 10:56:06 +01:00
Jürg Lehni
41f7e58ca9
Include issue number forgotten in previous commit.
2016-12-23 23:13:18 +01:00
Jürg Lehni
b59baeb9aa
Fix stroke hit-testing for rounded shape items.
...
Closes #1207
2016-12-23 23:11:17 +01:00
Jürg Lehni
3c43a78c53
Properly handle generated IDs in SVG export.
...
Closes #1138
2016-11-20 20:53:41 -05:00
Jürg Lehni
8946f44ed9
Fix curve-bounds check in getIntersections()
...
Closes #1197
2016-11-20 20:19:38 -05:00
Jürg Lehni
6dd7cc5b6a
Fix imprecision in Numerical.findRoot()
...
Results can be slightly outside of the range.
Close #1149
2016-09-24 15:39:09 -04:00
Jürg Lehni
80f6dbb5e3
Implement unit test for #1091
...
Closes #1091
2016-09-24 14:53:36 -04:00
Jürg Lehni
287f48a0db
Implement unit test for #1165
...
Closes #1165
2016-09-24 14:34:46 -04:00
Jürg Lehni
b37b8cc495
Improve reliability of Curve.getIntersection()
...
Reduce epsilon when checking against curve end points from GEOMETRIC_EPSILON to EPSILON.
Coses #1174
2016-09-24 14:28:43 -04:00
Jürg Lehni
b4f6cde203
Tests: Handle null values when comparing items.
2016-09-20 18:43:02 -04:00
Jürg Lehni
3a49ac4015
Handle paths with only one segment in #resolveCrossings()
...
Closes #1167
2016-09-20 18:13:47 -04:00
Jürg Lehni
6e7fe67a8d
Implement unit tests for #1109 .
2016-08-09 10:01:35 +02:00
Jürg Lehni
7a63afc769
Clean up Layer unit tests a bit.
2016-08-07 15:58:54 +02:00
sapics
31690cb6b6
Fix to remove named layer
2016-08-06 11:00:29 +09:00
Jürg Lehni
bcd02129a3
Implement additional unit test for #1054 .
2016-07-27 20:12:29 +02:00
Jürg Lehni
14b2d76450
Boolean: Improve handling of visited segments in intersect() operations.
...
Closes #1123
2016-07-27 19:35:19 +02:00
Jürg Lehni
e643338422
Add options object to boolean operations and improve handling of open paths.
...
This closes #1036 , closes #1072 , closes #1089 and closes #1121
2016-07-27 17:09:52 +02:00
Jürg Lehni
3f76bd99ef
Implement an efficient mechanism to prioritize key in Item#set()
...
Closes #1096
2016-07-25 23:17:45 +02:00
Jürg Lehni
4954f5d6ab
Improve Style#equals() to correctly handle default values.
...
Closes #1084
2016-07-25 21:42:06 +02:00
Jürg Lehni
29768c8228
Take Color#alpha default into account in Color#equals()
...
Relates to #1084
2016-07-25 21:09:53 +02:00
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