Jürg Lehni
88db4473a4
Merge pull request #1114 from iconexperience/W3C-PathItem-tests
...
Add tests from W3C SVG Test Suite
2016-07-20 15:42:04 +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
cb6eab7b0e
Merge pull request #1112 from iconexperience/getWinding-patch
...
Change winding calculation if point on path
2016-07-20 10:50:33 +02:00
Jan
3f893c9fb7
Change winding calculation for points on path
...
Add a winding if the point is on the path and windings canceled each other. See discussion at #1109
2016-07-20 10:47:01 +02:00
Jürg Lehni
1264c2764c
Shorten code statement from #1111
2016-07-20 10:29:27 +02:00
Jürg Lehni
d1c8ed9203
Merge pull request #1111 from iconexperience/resolveCrossings-patch
...
Patch for resolveCrossings() to fix #1110
2016-07-20 10:27:24 +02:00
Jan
08f633e7e6
Transfer handle when removing segment
2016-07-20 10:05:03 +02:00
Jürg Lehni
f874b927bf
Reflect View#zoom through matrix decomposition, and implement additional decomposed properties.
...
Closes #1107
2016-07-20 00:04:24 +02:00
Jürg Lehni
4d9c0c9f05
Implement CompoundPath#getLength()
2016-07-19 19:09:23 +02:00
Jürg Lehni
08a23e3318
Boolean: Further improve segment sorting approach.
2016-07-19 16:14:46 +02:00
Jürg Lehni
2c8f4f9453
Boolean: Fix sort function to produce correct resutls on all browsers.
2016-07-19 14:55:57 +02:00
Jürg Lehni
0b672cfb62
Merge branch 'new-winding' into develop
2016-07-19 14:27:45 +02:00
Jürg Lehni
59d598f08e
Some documentation improvements for previous commit.
2016-07-19 13:14:26 +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
ad48e93ee9
SVG: Output 'h' and 'v' commands in #getPathData()
2016-07-18 21:07:30 +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
Jürg Lehni
2e054ecf47
Deactivate unit test for #944 edge case for now…
2016-07-18 16:13:33 +02:00
Jürg Lehni
e7c53b904c
Implement unit test for #973 .
2016-07-18 14:11:34 +02:00
Jürg Lehni
3f058e6471
Split #resolveCrossings() into #resolveCrossings() and #reorient()
...
Closes #973
2016-07-18 14:04:51 +02:00
Jürg Lehni
7acb5bee45
Boolean: More refactoring and code simplifications.
2016-07-18 14:02:20 +02:00
Jürg Lehni
a1666a9b82
Implement additional unit tests for path#getInteriorPoint()
2016-07-17 23:10:47 +02:00
Jürg Lehni
e94e872cda
Move #getInteriorPoint() to PathItem, and refactor it a bit more.
2016-07-17 23:04:42 +02:00
Jürg Lehni
ac97b9d9d7
Implement unit test for #1075
2016-07-17 21:16:52 +02:00
Jürg Lehni
9b6fdb8952
Optimize #getInteriorPoint() further.
...
No need for two separate loops as it can all be done in one pass.
2016-07-17 21:08:22 +02:00
Jürg Lehni
fc18f821b1
Implement simplification of #getInteriorPoint()
...
As suggested by @iconexperience in https://github.com/paperjs/paper.js/issues/1075#issuecomment-233196940
2016-07-17 20:51:53 +02:00
Jürg Lehni
4bb2f7a8fc
Revert a row of recent changes that break example in #1091
2016-07-17 20:35:36 +02:00
Jürg Lehni
c9100a2b61
Merge remote-tracking branch 'origin/develop' into new-winding
...
; Conflicts:
; src/path/PathItem.Boolean.js
2016-07-17 19:52:20 +02:00
Jürg Lehni
09785a504b
Boolean: Further tweak epsilons values.
...
Thanks to improved winding code, we can now reduce them to the point where the #_validOverlapsOnly hack can be removed altogether without introducing new issues.
2016-07-17 19:38:10 +02:00
Jürg Lehni
fe9acae985
Winding: More code refactoring and documentation.
2016-07-17 19:36:13 +02:00
Jürg Lehni
064cee1629
Boolean: Sort segments to give non-ambiguous segments preference when tracing.
...
Relates to #1075
2016-07-16 23:55:16 +02:00
Jürg Lehni
91e67887da
Winding: Some improvements to comments and documentation.
2016-07-16 20:17:20 +02:00
Jürg Lehni
8513144ae1
Mono-curves: No need to filter out curves with no length any more.
2016-07-16 20:05:25 +02:00
Jürg Lehni
b1037f89f1
Winding: Add back support for open paths.
...
Includes refactoring of some related code.
2016-07-16 20:01:36 +02:00
Jürg Lehni
7d675dab13
Some minor cleanups.
2016-07-14 18:58:12 +02:00
Jürg Lehni
7da70181cc
Move addWinding() into getWinding()
...
Allowing the reuse of a whole lot of shared variables and leading to some nice simplifications.
2016-07-14 18:53:23 +02:00
Jürg Lehni
cad2858070
Use same naming for prev* variables as elsewhere in boolean code.
2016-07-14 18:02:42 +02:00
Jürg Lehni
acfe6cddeb
Boolean: Improve handling of open paths.
...
Relates to #1089
2016-07-14 10:49:12 +02:00
Jürg Lehni
c2df96c440
Implement CompoundPath#closed.
2016-07-14 10:24:04 +02:00
Jürg Lehni
41dce862d4
Fix CompoundPath#getLastCurve() and improve documentation.
2016-07-14 10:21:11 +02:00
Jürg Lehni
38e5fc1488
Tests: Reference GitHub issues where they're knonw in PathItem#contains() tests.
2016-07-14 09:32:29 +02:00
Jürg Lehni
083a2c6e0d
Boolean: Prevent rare exception where an encountered segment is not part of a valid path anymore.
...
Relates to #1091
2016-07-14 09:14:11 +02:00
Jürg Lehni
80f4ba947f
First attempt at supporting JSPM.
...
Relates to #1104
2016-07-13 21:04:53 +02:00
Jürg Lehni
6ca3bb1c63
Prevent Path#getStrokeBounds() from accidentally modifying segments.
...
Closes #1102
2016-07-13 18:43:15 +02:00
iconexperience
46ea9da423
Small cleanup in getWinding()
2016-07-13 11:07:12 +02:00
Jürg Lehni
8a45c5dff9
Fix Node.js unit-tests, and add CHANGELOG entry for #1103
2016-07-12 19:27:35 +02:00
Jürg Lehni
89c60b1a05
Loosely couple Node.js code to canvas module.
...
Treat absence of canvas module like a web worker context.
Relates to #1103
2016-07-12 19:11:09 +02:00
Jürg Lehni
73fc111b50
SVG: Correctly handle relative "moveto" commands.
...
Closes #1101
2016-07-11 19:48:17 +02:00