Commit graph

5579 commits

Author SHA1 Message Date
Jürg Lehni
23ec75f5d2 Read CanvasView size correctly from arguments array. 2015-02-27 18:00:36 +01:00
Jürg Lehni
47883dfa3d Merge pull request #644 from rbvea/master
Update to use jsdom v4 (document.defaultView vs. document.parentWindow).
2015-02-27 17:48:50 +01:00
Russell Vea
fcaede86b0 Freezing jsdom version at v3 until iojs gets better. 2015-02-26 17:23:40 -10:00
Russell Vea
c0c8079913 Update to use jsdom v4 (document.defaultView vs. document.parentWindow). 2015-02-26 16:56:26 -10:00
Jürg Lehni
15813107c0 Remove unused variables. 2015-02-26 13:44:09 +01:00
Jürg Lehni
7c2492ac2a Docs: Improve Item#applyMatrix. 2015-02-26 13:38:29 +01:00
Alex Burner
9e95b8788a Fixing PlacedSymbol overflow
Initial value for `overflow` of svg elements is `visible`, but for elements that establish new viewports the value is overridden to `hidden`. A hidden overflow causes clipping of thick strokes, and may have additional consequences (I'm here because I was having trouble with my strokes).

As detailed in this issue: https://github.com/paperjs/paper.js/issues/642
2015-02-24 22:15:04 -08:00
Jonathan Puckey
3b70fcd603 Fix mistake in PaperScript reference - thanks to paperjs/paperjs.github.io/pull/5 2015-02-24 18:35:28 +01:00
Peter Vanbroekhoven
d5c25dbc52 Change PathFitter to constrain newly found control points.
See https://github.com/paperjs/paper.js/issues/414 .
2015-02-22 20:05:06 +01:00
Jan
1d8c662c98 Update SVGExport.js
Check for `'null'` before setting custom paper data attribute, because `JSON.stringify()` returns `"null"` (as a String object) if the argument is null.
2015-02-13 12:10:47 +01:00
Jan
c5ced798e8 Update SVGExport.js 2015-02-13 11:59:05 +01:00
TJ
d3af8483a8
Don't try to iterate a null array
Signed-off-by: TJ <hacker@iam.tj>
2015-01-26 21:21:46 +00:00
Jonathan Puckey
809c41b1cf Merge pull request #591 from ponychicken/detectAtomShell
Browser detection: Add Atom shell
2015-01-21 14:57:15 +01:00
Jürg Lehni
55e2f6610a Rename nRoots to count. 2015-01-10 22:06:11 +01:00
Jürg Lehni
22be259167 Deal with edge cases in Curve.solveCubic() where small cubics are very close to lines.
Also reduce Numerical.EPSILON again, as required by some rare edge cases.

Relates to #541.
2015-01-10 22:05:42 +01:00
Jürg Lehni
665d154c95 Simplify control-flow in Numerical.solveCubic() a bit. 2015-01-10 17:57:37 +01:00
Jürg Lehni
814512f562 No need to check solutions for bounds again. 2015-01-05 22:01:56 +01:00
Jürg Lehni
efaae89dfc No need to add 0. 2015-01-05 21:47:15 +01:00
Jürg Lehni
8f9c19e963 Merge pull request #613 from BrownBear2/master
fixed svg path parsing for arcs with more than one definition
2015-01-05 21:44:55 +01:00
BrownBear2
4d36a2d6f4 fixed svg path parsing for arcs with more than one definition 2015-01-05 21:32:21 +01:00
Jürg Lehni
1c758a415a Switch to new and improved Line.getSignedDistance() in fat-line clipping code as well. 2015-01-05 16:20:33 +01:00
Jürg Lehni
920469426e Remove the harmony version of Number.isFinite() in favor of the generally available global isFinite() for now. 2015-01-05 16:17:11 +01:00
Jürg Lehni
2d166a3189 Remove accidental coma. 2015-01-05 16:00:14 +01:00
Jürg Lehni
cb75908dd6 Include @iconexperience in the contributors list.
Relates to #611
2015-01-05 15:59:41 +01:00
Jürg Lehni
d74d9274a1 Merge pull request #612 from iconexperience/master
Improve Line.getSignedDistance()
2015-01-05 15:43:26 +01:00
Jan
60ddc68e56 Improve Line.getSignedDistance()
Improved code is shorter, faster, and should product results with higher precision.
2015-01-05 15:16:45 +01:00
Jürg Lehni
1803cd216a Handle empty paths in Path#join()
Closes #516
2015-01-05 00:42:00 +01:00
Jürg Lehni
6562f861ab More code clean-up. 2015-01-05 00:13:30 +01:00
Jürg Lehni
9977b6ab68 Some code clean-up. 2015-01-05 00:09:34 +01:00
Jürg Lehni
6ea81e5651 Merge remote-tracking branch 'origin/boolean-operations'
Conflicts:
	src/path/PathItem.Boolean.js
2015-01-05 00:04:01 +01:00
Jürg Lehni
72bd150a34 Fix the rest of the failing tests that 6c6ad76c94 had caused.
Also closes #610.
2015-01-04 23:59:25 +01:00
Jürg Lehni
5f3df1f5a1 Fix some failing tests with PathItem#contains(), introduced by commit 6c6ad76c94 2015-01-04 23:28:39 +01:00
Jürg Lehni
18c5c3b7c4 Use the right parameter in the previous curve to determine slope change. 2015-01-04 23:02:43 +01:00
Jürg Lehni
5d875f2d83 Clean up code formatting. 2015-01-04 22:37:27 +01:00
Jürg Lehni
c20b32f748 Implement unit test for #610 2015-01-04 22:10:30 +01:00
Jürg Lehni
8928eaffd0 Merge branch 'refs/heads/master' into boolean-operations 2015-01-04 22:00:55 +01:00
Jürg Lehni
da53bfe5a0 Simplify boolean operations example code a bit. 2015-01-04 22:00:40 +01:00
Jürg Lehni
7e80e19e32 Insert results of boolean operations above the first path. 2015-01-04 21:59:31 +01:00
Jürg Lehni
d522e4aec2 Merge remote-tracking branch 'origin/master' into boolean-operations
Conflicts:
	src/path/PathItem.Boolean.js
2015-01-04 21:29:50 +01:00
Jürg Lehni
9f0a774fd0 Fix newly introduced error in clean-up. 2015-01-04 18:07:02 +01:00
Jürg Lehni
1239eb55ec Minor clean up in Curve.filterIntersections(). 2015-01-04 17:47:41 +01:00
Jürg Lehni
f0d28d7529 Implement unit test for #609 2015-01-04 17:46:59 +01:00
Jürg Lehni
77193e1465 Clean-up new splitPath() code. 2015-01-04 17:37:15 +01:00
hkrish
718af4527f Boolean: handle linear segments correctly.
Earlier implementation was unfinished and did not reset some handles to
linear, this caused the winding to be miscalculated.

Conflicts:
	src/path/PathItem.Boolean.js
2015-01-04 17:30:19 +01:00
Jürg Lehni
afc14b9634 Reduce Numerical.TOLERANCE to 1e-6, and use the same value across the boolean code.
Yields very good results now, across all tests.
2015-01-04 15:54:50 +01:00
Jürg Lehni
ac0663bdd9 Hard-code numerical tolerance in unit tests as it's used in all hard-coded values. 2015-01-04 14:07:43 +01:00
Jürg Lehni
a683493e59 Implement unit tests for path intersection.
Related: #565, #568, #570, #571
2015-01-04 14:01:32 +01:00
Jürg Lehni
3564dafa93 Do not keep iterating if the curve was reduced to a point. 2015-01-04 13:23:59 +01:00
Jürg Lehni
d33d65fcc2 Revert change in recursion threshold as the new code reaches the desired precision earlier. 2015-01-04 13:21:12 +01:00
Jürg Lehni
cca6606f72 Reduce the amount of path reversing required.
We don't need paths at clockwise / counter-clockwise orientation. We simply need them oriented the same way, or the opposite way.
2015-01-04 01:51:27 +01:00