Commit graph

6999 commits

Author SHA1 Message Date
Jürg Lehni
6e96fd6be5 Replace accidental substitution of Numerical.CURVETIME_EPSILON. 2017-01-17 11:24:33 +01:00
Jürg Lehni
da52f1f685 Remove Numerical.TOLERANCE 2017-01-16 17:48:26 +01:00
Jürg Lehni
13accee9fd Some code optimizations in PathFitter. 2017-01-16 17:47:28 +01:00
Jürg Lehni
12f12da21b Minor code cleanup. 2017-01-15 18:53:23 +01:00
Jürg Lehni
77cb04154a Reduce CURVETIME_EPSILON to 1e-8. 2017-01-15 18:44:02 +01:00
Jürg Lehni
2ca34cddac Prevent rare case where we get excluded intersections without valid curves at the start. 2017-01-15 18:43:47 +01:00
Jürg Lehni
3d4430f8af Improve CurveLocation#equals() to only compare path offsets.
Relying solely on GEOMETRIC_EPSILON when comparing intersections instead of CURVETIME_EPSILON improves reliability.
2017-01-15 18:43:14 +01:00
Jürg Lehni
f996f035ca Rename local epsilon in addCurveIntersections() to fatLineEpsilon. 2017-01-15 18:41:40 +01:00
Jürg Lehni
a101183fba Remove EPSILON constants that are only used in one place in the code.
CLIPPING_EPSILON and WINDING_EPSILON are too specific to be in Numerical.
2017-01-15 11:47:23 +01: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
fa43e28b7a Slightly improve documentation for #1235 2017-01-11 15:16:22 +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
36f5b314d9 Update JSDoc and a minor documentation fix. 2017-01-11 14:45:52 +01:00
Jürg Lehni
9cb45157b9 Use the correct term for renormalization of curve-time after splitting. 2017-01-10 16:51:53 +01:00
Jürg Lehni
acd6b143db Sample winding at t = 0.5 before trying 0.25 at 0.75
This partly reverts commit 50c910b03a.
2017-01-10 13:34:50 +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
50c910b03a Switch back to sampling winding at t = 1/4, 2/4, 3/4
Due to curve-time clamping, this should now be OK.

Relates to #1073
2017-01-06 14:23:27 +01:00
Jürg Lehni
8ba6e19a2c Bring back handling of onPath edge cases in getWinding()
Relates to #1073
2017-01-06 14:22:20 +01:00
Jürg Lehni
1c7d19bba0 Improve getWinding() reliability by clamping curve-time to tMin <= t <= tMax 2017-01-06 14:17:38 +01:00
Jürg Lehni
31aa68b2d1 Some further code cleanup for 3c2588fdec 2017-01-06 14:15:32 +01:00
Jürg Lehni
d52eafc259 Merge remote-tracking branch 'iconexperience/improvedWinding2' into develop
; Conflicts:
;	src/path/PathItem.Boolean.js
;	src/path/PathItem.js
2017-01-06 12:17:33 +01:00
Jürg Lehni
7583e6ed5f Merge branch 'improved-winding-2' into develop and clean up formatting. 2017-01-06 12:12:43 +01:00
iconexperience
3c2588fdec Use quality factor for better winding calculation and propagation 2017-01-05 14:56:36 +01:00
Jürg Lehni
ed38634a80 Improve comments. 2017-01-03 13:41:26 +01:00
Jürg Lehni
4d81a292a2 Return correct values for #rotation and #scaling on items with #applyMatrix = true
While preserving caching for #applyMatrix = false

Relates to #1004, #1177
2017-01-03 13:39:35 +01:00
Jürg Lehni
aa75374406 Bring back caching of Item#rotation and #scaling
But only allow matrix decomposition based properties on items with #applyMatrix = false

Closes #1177, relates to #1004
2017-01-03 13:23:44 +01:00
Jürg Lehni
ede9ef2623 Revert 7dd0b852c8
Relates to https://github.com/paperjs/paper.js/issues/1233#issuecomment-269972157
2017-01-03 00:53:54 +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
0018b69e4d Improve handling of locations with invalid curves in divideLocations() 2017-01-03 00:20:10 +01:00
Jürg Lehni
b743f456b3 Improve handling of changing curves in CurveLocation.
Relates to #1233
2017-01-03 00:08:28 +01:00
Jürg Lehni
468bb04919 Imrpove bi-directional curve-time rescaling in divideLocations()
Closes #1191
2017-01-02 00:32:21 +01:00
Jürg Lehni
e24402542a Improve handling of SymbolItem in#hitTestAll()
Closes #1199
2017-01-01 18:32:45 +01:00
Jürg Lehni
fa4502dfe3 Include NodeJS related files in zipped distribution. 2017-01-01 14:40:58 +01:00
Jürg Lehni
eceb99ea59 Clean up comments. 2016-12-31 13:32:59 +01:00
Jürg Lehni
7651f41c14 Some code cleanup. 2016-12-31 11:33:18 +01:00
Jürg Lehni
f995216f39 Fix handling of self-intersection in PathItem#getIntersections
Closes #1194
2016-12-31 11:30:38 +01:00
Jürg Lehni
1e9b1cd7dc Include comment about Node LTS support
See https://github.com/paperjs/paper.js/pull/1210#issuecomment-269843272
2016-12-31 10:48:19 +01:00
Jürg Lehni
928a58b79a Fix accidental global leackage. 2016-12-31 06:52:56 +01:00
Jürg Lehni
87fe0dd7cd Fix typo. 2016-12-31 06:50:08 +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
88453914e5 Make sure overlaps are always returned in correct sequence.
Relates to #1223
2016-12-31 01:09:28 +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
aa2e1d753b Implement Path#divideAt(), similar to Curve#divideAt() 2016-12-31 01:07:14 +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
e810039668 Support Node.js v7, and keep testing for v5 in Travis CI. 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