Jürg Lehni
84a75e375a
Remove unnecessary edge-case handling in CurveLocation#isCrossing()
...
Closes #951 , closes #959
2016-02-12 20:52:19 +01:00
Jürg Lehni
e2bc83af5d
Add test for #960 and improve fix a bit.
...
Closes #960
2016-02-12 20:19:40 +01:00
Jürg Lehni
7c24fc916f
Merge pull request #962 from iconexperience/fix-issue-960
...
Fix for #960 - Shortcut Curve.evaluate() for t === 1
2016-02-12 20:10:21 +01:00
Jürg Lehni
80c8aae5bc
Implement unit tests for Item#getItems() with overlapping / inside properties.
...
Relates to #961
2016-02-12 20:09:41 +01:00
Jürg Lehni
6d5d1ce077
Introduce Base.filter(), to copy and filter object properties.
2016-02-12 19:58:32 +01:00
Jürg Lehni
5ec5c265ac
Travis CI: Switch to g++ 4.8 to see if this solves strange new building issues.
2016-02-12 19:14:27 +01:00
Jürg Lehni
06d6b5195b
Do not cancel mousedrag events on stopPropagation()
...
Use preventDefault() instead.
Closes #952
2016-02-12 19:01:34 +01:00
Jürg Lehni
12f829c107
Part 2 of large refactoring of bounds handling.
2016-02-12 18:54:06 +01:00
Jürg Lehni
892e56793d
Update straps.js
2016-02-12 18:20:40 +01:00
Jürg Lehni
55c5f42716
Part 1 of large refactoring of bounds handling.
2016-02-12 17:59:37 +01:00
iconexperience
aa1f2196c9
Shortcut Curve.evaluate() for t === 1 to avoid imprecision.
2016-02-12 14:41:21 +01:00
Jürg Lehni
cb79232e12
Travis CI: Use Arial in all tests.
2016-02-11 12:58:06 +01:00
Jürg Lehni
c0b39c4b8f
Tests: Implement additional tests for SvgImport.
2016-02-11 12:51:48 +01:00
Jürg Lehni
6797d2eb11
Respect clip-items in Group#_getBounds()
...
Closes #956
2016-02-11 12:51:04 +01:00
Jürg Lehni
68c4541844
SvgImport: Always create a clip-item when viewBox is specified.
2016-02-11 12:50:08 +01:00
Jürg Lehni
e38a33fd64
SVGImport: Inherit default styles on Node.js too.
2016-02-11 11:20:32 +01:00
Jürg Lehni
df57c4adb9
SVGImport: Improve consistency of style handling.
2016-02-11 11:06:09 +01:00
Jürg Lehni
8542eb62b4
Gulp: Add test:browser task, to solve CORS issues on Chrome.
2016-02-11 10:05:21 +01:00
Jürg Lehni
d9e09b9d20
SVGImport: Further improve handling of gradients
...
- Respect radial setting when reusing graident definition
- Clean-up percentage handling
2016-02-10 18:23:56 +01:00
Jürg Lehni
c1b7366249
Improve fix for #650
...
Add support for multiple use of same gradient.
2016-02-10 18:13:13 +01:00
Jürg Lehni
fce126959d
SVGImport: Implement support for gradientUnits="objectBoundingBox"
...
Relates to #650 , but still needs unit tests.
2016-02-10 17:46:39 +01:00
Jürg Lehni
98fc51319f
Remove unnecessary double-spaces.
2016-02-10 16:15:35 +01:00
Jürg Lehni
56d5b3b323
SVGImport: Implement support for dimensions in percentage.
...
Closes #954
2016-02-10 16:14:51 +01:00
Jürg Lehni
adc5b86d2e
SVGExport: Remove unnecessary calls to Point#transform() in exportGradient()
2016-02-10 15:34:22 +01:00
Jürg Lehni
9e8fcee8cd
Change implementation of PathItem#flatten(flatness)
...
- flatness parameter specifies maximum allowed error instead of maximum allowed distance between point
- Parts that are already flat are not further flattened
- Corners are preserved
Closes #618
2016-02-10 14:58:40 +01:00
Jürg Lehni
ed4347714b
Remove duplicate unit tests.
2016-02-10 13:26:40 +01:00
Jürg Lehni
00d2e2a5bb
Some CurveLocation cleanup.
...
- Remove UID as there is no need anymore
- Rename some private properties
2016-02-10 12:36:39 +01:00
Jürg Lehni
0ae232e4ab
Implement support for clip-masks in hit-testing.
...
Closes #671
2016-02-09 17:02:03 +01:00
Jürg Lehni
740c94e367
Implement Item#_hitTestChildren()
...
As suggested by @iconexperience in #671
2016-02-09 16:52:55 +01:00
Jürg Lehni
bd7f3554d8
Fix options handling in Item#clone() to keep backward compatibility.
2016-02-09 16:11:38 +01:00
Jürg Lehni
e179b08156
Implement Item#clone(options) with support for options.deep
...
Closes #941
2016-02-09 16:01:06 +01:00
Jürg Lehni
21723ca6ca
Improve documentation of PostScript-style drawing commands.
2016-02-09 15:09:39 +01:00
Jürg Lehni
717bc4bc79
Implement PathItem#getNearestLocation() / #getNearestPoint()
...
Closes #727
2016-02-09 14:34:21 +01:00
Jürg Lehni
a48d13878a
Fix JSDoc warning on Style class.
2016-02-09 14:15:55 +01:00
Jürg Lehni
3965dd9b77
Implement CompoundPath#flatten(), #simplify(), #smooth()
...
And improve documentation for PathItem#simplify().
Closes #920
Relates to #727
2016-02-09 14:13:30 +01:00
Jürg Lehni
c793538841
No need to pass normalized tangents to PathFitter#fitCubic()
...
The get normalized and scaled anyway.
2016-02-09 14:11:23 +01:00
Jürg Lehni
e5d139ca11
Clean-up PathFitter code.
2016-02-09 14:09:53 +01:00
Jürg Lehni
d1b11c6ea9
Rearrange method sequence in Path.
2016-02-09 12:47:37 +01:00
Jürg Lehni
de9653ab45
Fix new exception in unit tests.
2016-02-09 10:07:28 +01:00
Jürg Lehni
da216aa581
Improve handling of view updates and detection of invisible documents.
...
Switch to the new HTML5 Page Visibility API.
2016-02-09 09:59:19 +01:00
Jürg Lehni
80e6246016
Include NPM and Bower badges.
2016-02-08 14:17:16 +01:00
Jürg Lehni
0371f66bda
Do not snap curve points to t = 0 / 1 with epsilon
...
Closes #936 . Also:
- Reduce CLIPPING_EPSILON to 1e-9 to fix errors that were masked by the snapping
- Implement unit tests for edge cases in #936
2016-02-06 15:12:35 +01:00
Jürg Lehni
a59a5354fb
Clean-up unit test for #943 and add edge case from #944
...
See https://github.com/paperjs/paper.js/pull/944#issuecomment-180370569
2016-02-05 21:18:16 +01:00
Jürg Lehni
ffe42a0220
Some comment cleanup.
2016-02-05 20:31:58 +01:00
Jürg Lehni
5a46620768
Merge branch 'winding-fix' into develop
...
; Conflicts:
; src/path/PathItem.Boolean.js
2016-02-05 20:25:25 +01:00
Jürg Lehni
55909b8bd5
Some code cleanup for winding-fix.
2016-02-05 19:43:48 +01:00
Jürg Lehni
23045bb0f7
Merge pull request #943 from iconexperience/replace-path-contains-test
...
Replace unit test in "PathItem_Contains"
2016-02-05 19:12:45 +01:00
Jürg Lehni
ec75985cd1
Merge pull request #944 from iconexperience/fix-getWinding
...
Change the implementation of getWinding() again to pass all unit tests.
2016-02-05 19:11:50 +01:00
iconexperience
5b31aee8bb
Change the implementation of getWinding() again, so we pass all tests. This new version does not count any intersections if the point is on a y-monotonic curve, but at the final calculation it sets the winding to at least 1 if the point is on a curve.
2016-02-05 14:48:27 +01:00
iconexperience
e03c8cd198
Replace the "straight curves with zero-winding" test with a more comprehensive one containing more special cases. Also, this test requires that all points on a curve of a path must be counted as inside the path.
2016-02-05 12:45:33 +01:00