Commit graph

6133 commits

Author SHA1 Message Date
Jürg Lehni
55cf0bc1c7 Improve and simplify handling of start segments.
Removing findStartSegment() and merging functionality into findBestIntersection() leads to simpler code and solves some remaining issue, e.g. https://github.com/paperjs/paper.js/issues/784#issuecomment-153282113
2016-01-03 01:08:11 +01:00
Jürg Lehni
b9ee066610 Various fixes in the resemble.js QUnit extension. 2016-01-03 00:29:28 +01:00
Jürg Lehni
9404c5a0e3 Restructure code from #883 a bit
- Use === instead of == for strict numeric comparisons
- Merge the two return statements to one
- Address some imprecisions in previously added comments
2016-01-02 23:39:13 +01:00
Jürg Lehni
46cf517976 Merge pull request #883 from iconexperience/fix-for-issue-882
Improve fat line clipping to fix #882
2016-01-02 23:13:55 +01:00
iconexperience
ebaccf6e2d Add break condition for exactly collinear curves to prevent a very time consuming clipping process that cannot have a result. 2016-01-02 19:08:42 +01:00
Jürg Lehni
b33777274d More work on unit tests for boolean operation. 2016-01-02 18:21:53 +01:00
Jürg Lehni
957d303a0d Make sure the key identifier is always lowercase.
Relates to #881
2016-01-02 13:58:05 +01:00
Jürg Lehni
afffdfdddd Clean up comments a little. 2016-01-02 13:20:36 +01:00
Jürg Lehni
df09e14d53 Address keyIdentifier weirdness in Chrome on Ubuntu.
Closes #881
2016-01-02 13:17:24 +01:00
Jürg Lehni
ce1f04d76c Remove reliance on downKey, since it may differ between keydown and keypress events.
Relates to #881, but unfortunately does not fix it.
2016-01-02 13:02:20 +01:00
Jürg Lehni
8f4e0f16a0 Increase QUnit timeout to 10s, as Travis doesn't finish in time. 2015-12-31 18:40:17 +01:00
Jürg Lehni
3234975e46 Include comment about methods produced on the fly.
For easier searching.
2015-12-31 18:32:56 +01:00
Jürg Lehni
fa15b083b0 Go back to matching curve beginnings / ends with GEOMETRIC_EPSILON.
This is possible because we're handling the special line case separately before already.
2015-12-31 14:23:16 +01:00
Jürg Lehni
d832a1ffcb Define unit test for #784. 2015-12-31 14:17:38 +01:00
Jürg Lehni
a4fd2ef3a3 Implement a ton of unit tests for boolean operation. 2015-12-31 14:05:58 +01:00
Jürg Lehni
f8791f2be5 Perform bounding box checkes with GEOMETRIC_EPSILON
Closes #878
2015-12-31 10:21:38 +01:00
Jürg Lehni
d7cd016d9e Merge pull request #879 from sapics/fix-comment
Fix comment of rectangle.expand
2015-12-31 09:56:22 +01:00
sapics
3f50aadf3b Fix comment of rectangle.expand 2015-12-31 13:04:00 +09:00
Jürg Lehni
df24de0fdf Optimize fat-line clipping code a bit further.
We don't need to calculate v1Clip and tDiff if oldTDiff > 0.5 && tDiff > 0.5.
2015-12-30 23:19:58 +01:00
Jürg Lehni
f19bdf9834 Remove unrequired testContains parameter. 2015-12-30 21:55:22 +01:00
Jürg Lehni
92904e95c2 Address proposal by @iconexperience in #869 and shorten code.
Closes #877
2015-12-30 21:55:22 +01:00
Jürg Lehni
511fc12dd4 Implement more special key lookups in new Key handling code.
Relates to #876.
2015-12-30 21:55:22 +01:00
Jürg Lehni
943c4bba91 Improve horizontal check for sampling points in propagateWinding()
Relates to #875, needs more testing.
2015-12-30 21:55:21 +01:00
Jürg Lehni
3035e1d445 Define additional boolean tests and improve resemble.js based image diffing. 2015-12-30 21:55:21 +01:00
Jürg Lehni
a1fcaabed6 Implement item comparison through rasterization and resemble.js diffing, directly integrated into QUnit.
And start using it for boolean operation unit tests.
2015-12-30 21:55:21 +01:00
Jürg Lehni
2596b81616 Add optional insert parameter to #rasterize() 2015-12-30 21:55:21 +01:00
Jürg Lehni
62a23662fa Unify handling of insert parameters. 2015-12-30 21:55:21 +01:00
Jürg Lehni
44f98ee094 Replace all mention of DOM in the documentation with scene graph. 2015-12-30 21:55:21 +01:00
Jürg Lehni
e9d575e8b1 Switch to QUnit 1.20 (bower), and implement a workaround for hidepassed issues. 2015-12-30 21:55:21 +01:00
Jürg Lehni
7328e829b7 Update acorn.js to v0.5.0 (last small release) and stats.js to r14. 2015-12-30 21:55:21 +01:00
Jürg Lehni
c0a2e0ec63 Support insert parameter again in #toShape() / #toPath() 2015-12-30 21:55:21 +01:00
Jürg Lehni
060ab5e7f9 Only mark overlap segments as visited during #intersect(). 2015-12-30 21:55:21 +01:00
Jürg Lehni
f4f46fa985 Implement optimization suggested by @iconexperience in #869 2015-12-30 21:55:20 +01:00
Jürg Lehni
0e427c16a2 Fix some white-spaces in comments and HTML. 2015-12-30 21:55:20 +01:00
Jürg Lehni
bf65866b58 Port over boolean #intersect() fix from c6b1a8067f5045e94294735a21aa2fa222fbb2a1
Relates to #870
2015-12-30 21:55:20 +01:00
Jürg Lehni
fa9698aaaa Revert back to always call #setClockwise() in #resolveCrossings()
This solves some regressions, e.g. https://github.com/paperjs/paper.js/issues/869#issuecomment-167586249
2015-12-30 21:55:20 +01:00
Jürg Lehni
4d13f0e1e0 Simple optimization in PathItem#contains()
Perform a handle bounds check before calculating winding, as described by @iconexperience in #869
2015-12-30 21:55:20 +01:00
Jürg Lehni
5c976420f8 Further improve #resolveCrossings() based on discussion with @iconexperience.
Closes #869
2015-12-30 21:55:20 +01:00
Jürg Lehni
d6a8538674 Fix overlap handling for boolean intersection.
Closes #870
2015-12-30 21:55:20 +01:00
Jürg Lehni
b5a38ae5ec Fix orientation handling in new #resolveCrossings().
Closes #869
2015-12-30 21:55:20 +01:00
Jürg Lehni
9d4066da1c Implement unit tests for getWinding() and zero-winding curves.
Closes #819
2015-12-30 21:55:20 +01:00
Jürg Lehni
85f08825d7 Implement support for CSS blend-modes in SVGExport. 2015-12-30 21:55:20 +01:00
Jürg Lehni
ecad1c6a0d More code clean-ups and simplifications for #852 2015-12-30 21:55:20 +01:00
Jürg Lehni
973491f962 Some code-clean up for #852
Mainly to make it fit into the 80 char line lenght.
2015-12-30 21:55:20 +01:00
Jürg Lehni
f34afbc19a Clean up code from #856 a bit. 2015-12-30 21:55:19 +01:00
Jürg Lehni
d67796f655 Some more documentation work. 2015-12-30 21:55:19 +01:00
Jürg Lehni
8967193bb9 Improve SVG definition id parsing.
Closes #666
2015-12-30 21:55:19 +01:00
Jürg Lehni
cc1e58e243 Improve Chrome fix to handle wrong coordinates in both directions.
Closes #800.
2015-12-30 21:55:19 +01:00
Jürg Lehni
21f4141e4f Fix werid mouse event issue on Chrome / Windows.
Closes #800
2015-12-30 21:55:19 +01:00
Jürg Lehni
32cf1ba69e Partly revert "Treat overlaps as crossings as well."
This partly reverts commit deafacdad0 and closes #868
2015-12-30 21:55:19 +01:00