Commit graph

5453 commits

Author SHA1 Message Date
Jürg Lehni
538eac6dc7 Use smaller tolerances in winding code, to address edge cases.
Closes #559
2015-01-02 23:47:26 +01:00
Jürg Lehni
6359738618 Do not offset bounds in cubic solver by MACHINE_EPSILON, as this is how comparisons are performed with values offset by tolerances elsewhere in the library.
Doing it differently here produced various errors in fat-line clipping and boolean code.
2015-01-02 23:14:19 +01:00
Jürg Lehni
70e34ef705 Merge remote-tracking branch 'origin/master' into boolean-operations
Conflicts:
	src/path/Curve.js
	src/util/Numerical.js
2015-01-02 22:41:38 +01:00
Jürg Lehni
f0fdb804ec Reduce value of EPSILON to the lowest amount that does not cause issues in boolean-test. 2015-01-02 22:37:36 +01:00
Jürg Lehni
477527f8ec Implement more intuitive version of clipConvexHull(), outlined in #570 by @iconexperience
Code further shortened using a sub-routine.
2015-01-02 22:36:04 +01:00
Jürg Lehni
232739fae9 Add comments to fat-line clipping code linking to issues #568 and #571. 2015-01-02 22:34:09 +01:00
Jürg Lehni
a2208f218c Merge branch 'refs/heads/master' into boolean-operations
Conflicts:
	src/util/Numerical.js
2015-01-02 21:46:28 +01:00
Jürg Lehni
cdfd21ddd3 Switch to using new cubic solver by @hkrish 2015-01-02 21:44:29 +01:00
Jürg Lehni
51739e6e27 Merge remote-tracking branch 'origin/master' into solve-cubic
Conflicts:
	src/path/PathItem.Boolean.js
2015-01-02 21:26:04 +01:00
Jürg Lehni
8ad067ec6c Use tolerance when comparing curve locations by parameter. 2015-01-02 21:20:28 +01:00
Jürg Lehni
4ed9ef54f2 Fix bug in Curve.filterIntersections() and clean up code a bit. 2015-01-02 21:19:18 +01:00
Jürg Lehni
b2261fd512 Introduce Curve.filterIntersections() and use it both in PathItems#getIntersections() and Curve#getIntersections() 2015-01-02 21:00:05 +01:00
Jürg Lehni
3302a7dff5 Increase recursion threshold to 4 when checking for fatline convergence. 2015-01-02 20:49:09 +01:00
Jürg Lehni
fbd026ea0d Bring back code removed by @hkrish in commit 5fb75593c2
Relates to issue #570, still required to figure out why it is still needed.
2015-01-02 20:02:45 +01:00
Jürg Lehni
74844d8a2b Use hullEpsilon in all comparisons of curve time values in fat-line clipping code.
Addresses first half of issue #568
2015-01-02 17:33:04 +01:00
Jürg Lehni
41c0584f35 Merge remote-tracking branch 'origin/master' into solve-cubic 2015-01-02 16:37:50 +01:00
Jürg Lehni
e3e3d13fa5 Add comment regarding issue #565 2015-01-02 16:33:15 +01:00
Jürg Lehni
b75def3f3a Implement optimal values in fat line clipping code for maximum recursion and curve time difference, as determined by @iconexperience.
Closes #565
2015-01-02 16:29:12 +01:00
Jürg Lehni
91865be8a3 Merge remote-tracking branch 'origin/master' into solve-cubic
Conflicts:
	src/basic/Line.js
	src/path/Curve.js
	src/path/PathItem.Boolean.js
	src/util/Numerical.js
2015-01-02 16:21:18 +01:00
Jürg Lehni
45c86a3035 Switch to suggested new implementation of Line.getSignedDistance() by @iconexperience
Closes #554
2015-01-02 16:17:19 +01:00
Jürg Lehni
878be7962e Merge branch 'refs/heads/master' into solve-cubic
Conflicts:
	src/path/Curve.js
	src/path/PathItem.Boolean.js
	src/util/Numerical.js
2015-01-02 15:33:23 +01:00
Jürg Lehni
8ae8855b81 Visually center JSON tiger example. 2015-01-02 14:39:13 +01:00
Jürg Lehni
95a8539045 Fix size issue on non-resizable HiDPI canvases.
Reverting back to original behavior in #586.
2015-01-02 14:38:06 +01:00
Jürg Lehni
3c31c0e482 Have SVGImport respect the current PaperScope's applyMatrix setting. 2015-01-02 14:19:17 +01:00
Jürg Lehni
54d959df1f Load CSS in all examples. 2014-12-30 00:29:20 +01:00
Jürg Lehni
a07dc98046 Clean up and simplify code from pull request #580 and fix CSS in examples accordingly. 2014-12-30 00:16:51 +01:00
Jürg Lehni
ac9c3f03c4 Merge branch 'georeith-true-resize-canvas' 2014-12-30 00:14:58 +01:00
Jürg Lehni
5b9eb4bd1a Revert unecessarily commited files in pull request #586 2014-12-30 00:14:33 +01:00
Jürg Lehni
dfda6cf7b5 Merge branch 'true-resize-canvas' of https://github.com/georeith/paper.js into georeith-true-resize-canvas 2014-12-29 23:56:57 +01:00
Jürg Lehni
66c67fbe94 Improve insertion handling for Item and Layer so insertAbove() / insertBelow() works for Layers too.
Closes #603
2014-12-29 23:16:13 +01:00
Jürg Lehni
83dd2034c3 Fix issue where cloned TextItems get always inserted into the scene graph.
Closes #606
2014-12-28 19:43:38 +01:00
Jürg Lehni
16105067bf Correctly handle Item#insertChild(null) 2014-12-28 18:29:20 +01:00
Jürg Lehni
a307bc4d14 Implement recursively parameter in Matrix#apply(), so matrices can be backed in recursively in children too. 2014-12-28 18:29:04 +01:00
Jürg Lehni
80e64ad0a9 Implement setters for Raster#width and #height, and properly handle these values being set in constructors, along with #size.
Closes #557.
2014-12-28 18:27:32 +01:00
Jürg Lehni
5890de3a80 Some more clean-up in unit test helpers code. 2014-12-28 18:23:04 +01:00
Jürg Lehni
644fb71dc1 Implement unit test comparator for Item & co + Project, and further improve new comparator code. 2014-12-28 18:10:53 +01:00
Jürg Lehni
1de750bc77 Check for Path#closed in Path#equals() 2014-12-28 18:10:14 +01:00
Jürg Lehni
7bc6da5401 Do not create entries in Style#_values for default values. 2014-12-28 18:03:41 +01:00
Jürg Lehni
fb890b2c8a Implement Symbol#equals() 2014-12-28 18:03:19 +01:00
Jürg Lehni
9adbc3774a Implement unit test comparators for many more types, and start refactoring compareItems() helper. 2014-12-28 16:41:23 +01:00
Jürg Lehni
c5a2a51f3e Implement unit test comparator for Color and improve new comparator code. 2014-12-28 15:21:38 +01:00
Jürg Lehni
b8674a3bc1 Implement unit test comparators for Point, Size and Rectangle. 2014-12-28 14:59:48 +01:00
Jürg Lehni
92521d0ac8 Check expected value first for class to be used to perform comparison, since actual value might be wrong. 2014-12-28 14:36:09 +01:00
Jürg Lehni
e95e17826e Start cleaning up unit tests by introducing new class/type-based comparators lookup table. 2014-12-28 14:33:22 +01:00
Jürg Lehni
28538d8a43 Clean up code from #597 a bit. 2014-12-26 06:42:46 +01:00
Jürg Lehni
71e2af9d70 Merge pull request #597 from byte-foundry/simplify_closed
fix #572 Handle closed path in PathFitter
2014-12-26 06:30:56 +01:00
Jürg Lehni
b816337e18 Remove legay.js since we're about to hit 2015.
Closes #592
2014-12-26 06:21:56 +01:00
Jürg Lehni
4d6f5c259c Remove non-breaking space.
Closes #602.
2014-12-17 20:07:14 -08:00
louisremi
a9bf0b097e Handle closed path in PathFitter 2014-12-15 14:56:25 +01:00
George Reith
6f1c3145bf Fixes #580 where resizable views were only taking into account their offset from the top left of the viewport. 2014-12-04 13:01:02 +00:00