Jürg Lehni
92590b160c
Implement Canvas Path caching again using Context#currentPath.
2013-12-06 12:49:46 +01:00
Jürg Lehni
5f24bf8da5
Implement Rectangle#getArea() and use it in reorientPath()
2013-12-03 21:54:36 +01:00
Jürg Lehni
4926e2c8da
Fix Array#sort() call in reorientPath(path) for IE.
...
IE expects integer values in the compare function, not boolean. Closes #350 again.
2013-12-03 21:49:49 +01:00
Jürg Lehni
448d8d9b99
Clean-up bool-fix code.
2013-12-01 23:48:59 +01:00
Jürg Lehni
971268cd72
Merge remote-tracking branch 'origin/master' into bool-fix
2013-12-01 23:28:29 +01:00
Jürg Lehni
6b448ad320
Fix more edge cases in #contains().
...
This should fix issue #346 for good.
2013-12-01 23:13:11 +01:00
hkrish
b625ec5b6d
Merge branch 'master' into bool-fix
...
* master: (127 commits)
Fix edge cases in Curve._getWinding()
Copy over parent style in Item#reduce().
Fire key-up events for all currently pressed keys.
Improve and streamline key-handling logic.
Use renamed __options object in build script too.
Correctly apply matrices to Raster items in #importSVG()
Support passing DOM element IDs in calls to #importSVG()
Update to latest Prepro.js and switch from global options object to __options, to avoid name clashes.
Make directly setting view.onFrame work again.
Update to latest Straps.js and remove unnecessary isArray argument in Base.each()
Add missing DOCS comments.
Fix issue where exceptions in onFrame handlers block future animations.
Fix issue with JSON import.
Add Node JSONtoPDF example.
Implement Item#data cloning.
Remove unnecessary Color#clone() since it's doing the same as Base#clone() now.
Remove Base.merge() and use a new Straps.js feature instead.
Improve build script to include dist file in paperjs.org website.
Bump version to v0.9.14
Fix setting #radius on Shape.Circle.
...
2013-11-30 14:50:18 +01:00
Jürg Lehni
dfc0886a8b
Fix edge cases in Curve._getWinding()
...
Use same rules for lines as for curves, exclude end points of lines. Closes #346 .
2013-11-30 14:21:47 +01:00
Jürg Lehni
93d10983ee
Update to latest Prepro.js and switch from global options object to __options, to avoid name clashes.
2013-11-29 20:26:38 +01:00
Jürg Lehni
1149399690
Add missing DOCS comments.
2013-11-29 18:50:04 +01:00
Jürg Lehni
593e0d8d7f
Remove Base.merge() and use a new Straps.js feature instead.
...
A more clever Base() constructor that allows merging.
2013-11-28 22:20:00 +01:00
Jürg Lehni
5beb0f17ed
Fix hit-testing on paths with a matrix that is not the identity.
2013-11-26 23:13:11 +01:00
Jürg Lehni
8e44049f42
Clean up smooth() code.
2013-11-26 17:32:52 +01:00
Jürg Lehni
d079e179ac
Fix Path#arcBy(to, boolean)
2013-11-25 01:04:51 +01:00
hkrish
274f1a4b55
Sort sub-paths before 'reorienting' during boolean calculations
2013-11-24 13:32:01 +01:00
hkrish
492e78df7d
Handle intersection special case, when two curves' start and end points overlap
2013-11-11 21:20:32 +01:00
Jürg Lehni
1049214126
Remove ctx.currentPath caching again, since it has the current affine transformation factored in and is thus useless to us.
2013-11-06 12:53:10 +01:00
Jürg Lehni
5630b7e415
Implement caching of drawn Canvas Path objects for better performance.
...
Already supported on recent Chrome and Safari.
2013-11-04 11:46:20 +01:00
Jürg Lehni
1301aea47d
Fix issues with importing Ghostscript Tiger.
2013-11-03 12:52:00 +01:00
Jürg Lehni
4f32cc2eea
No need for RegExp group in match statement.
2013-11-02 13:25:03 +01:00
Jürg Lehni
7b1f118aed
Use same command sequence as in switch statement.
2013-11-02 09:45:11 +01:00
Jürg Lehni
97a29e6ada
Improve SVG path data parser.
2013-11-02 09:30:40 +01:00
Jürg Lehni
29c00584be
Fix SVG parsing issues with multiple concatenated coordinate values
...
e.g. "1.5.5", is to be read as "1.5" and ".5"
2013-11-01 17:56:16 +01:00
Jürg Lehni
132f54d362
Define Item#clear() as an alias for Item#removeChildren(), or Path#removeSegments() for paths.
2013-11-01 17:52:27 +01:00
Jürg Lehni
0ded3ae0ba
Implement PathItem#cubicCurveBy() and #quadraticCurveBy()
...
Closes #284 .
2013-10-30 01:43:55 +01:00
Jürg Lehni
eecf68b7c3
Clear ctx.shadowColor after ctx.fill() to avoid application to both fill and stroke.
...
Closes #314 .
2013-10-30 00:00:04 +01:00
Jürg Lehni
4e34a27da4
Some more work on comments.
2013-10-29 21:20:19 +01:00
Jürg Lehni
fd96447ac1
Share ellipse reading code between Shape.Ellipse and Path.Ellipse.
2013-10-29 21:15:28 +01:00
Jürg Lehni
f8d960d834
option.tolerance should always be defined in _hitTest()
2013-10-29 21:00:17 +01:00
Jürg Lehni
c43752dc3e
Use #hasFill() and #hasStroke() more broadly and avoid drawing strokes when strokeWidth is set to 0.
2013-10-29 20:05:39 +01:00
Jürg Lehni
9d60662a28
Check for the occurrence of 'radius' rather than 'center' when deciding to read a center / radius pair for ellipses.
2013-10-29 18:53:55 +01:00
Jürg Lehni
c3aed5277d
Use center and radius in all ellipse code, rather than bounding rect.
...
Simplifies things.
2013-10-29 18:10:30 +01:00
Jürg Lehni
fc9cad009f
Implement CompoundPath#_getWindings() and move #_contains() code for both Path and CompoundPath to PathItem.
2013-10-29 17:57:25 +01:00
Jürg Lehni
d649b1bb21
Define insert argument for Path#toShape() and Shape#toPath()
2013-10-29 16:45:50 +01:00
Jürg Lehni
dc3bd30ee3
Rename some variables and clean up code a bit more.
2013-10-29 16:19:39 +01:00
Jürg Lehni
de01ef1c21
Clean up code from previous merge.
2013-10-29 16:09:35 +01:00
Jürg Lehni
ef972949c8
Merge branch 'refs/heads/intersect-fix'
...
Conflicts:
src/path/Curve.js
2013-10-29 16:06:02 +01:00
hkrish
ac04029f6e
Curve-line intersection fix
2013-10-29 15:52:46 +01:00
Jürg Lehni
63e4bd5db2
Do not use the point of the rotated curve to evaluate the parameter of the line.
...
Use the non-rotated curve instead.
2013-10-29 15:46:20 +01:00
Jürg Lehni
f20e8240cd
Use new range feature of solveCubic()
2013-10-29 15:44:42 +01:00
hkrish
bec1a91812
Calculate correct parameter for Curve-Line intersections
2013-10-29 00:10:20 +01:00
Jürg Lehni
b4850b572a
Improve variable naming.
2013-10-20 01:57:11 +02:00
Jürg Lehni
cc201655af
Fix comment.
2013-10-20 01:54:53 +02:00
Jürg Lehni
e6ef5e7e17
Fix hit-test for compound paths again.
2013-10-20 01:54:20 +02:00
Jürg Lehni
ddeacb1763
More code clean up.
2013-10-20 01:41:31 +02:00
Jürg Lehni
caa50236dd
Simplify winding algorithm by reusing orientation check.
2013-10-20 01:24:07 +02:00
Jürg Lehni
7c4518e4d0
Clean up some variable names.
2013-10-20 00:59:12 +02:00
Jürg Lehni
5db6db3b76
Improve selection serialization to JSON and fix issue in deserialization.
2013-10-18 21:12:25 +02:00
Jürg Lehni
782f5c8f7e
Fix issue with reading selected segment points from JSON when there are no handles.
...
The segment short form was misunderstood by the constructor.
2013-10-18 20:58:06 +02:00
Jürg Lehni
f7c21144a1
Improve handling of strokes in Path#hitTest().
...
Have it match stroke locations when option.stroke is set even when the path has no stroke.
2013-10-18 20:27:47 +02:00