hkrish
cf9aec9233
Remove addLocation helper. We have to remove duplicates once we have all the intersections.
2014-01-25 23:50:29 +01:00
hkrish
24cbf3b079
Correct winding contribution calculation for horizontal curves
2014-01-16 20:02:26 +01:00
Jürg Lehni
706fe2c77d
Rearrange Base.read argument sequence.
...
options are used more often than length.
2014-01-05 18:31:24 +01:00
Jürg Lehni
cd6bfa0b77
Move Curve#getLength(from, to) to Curve#getPartLength(from, to).
...
Clears up the Curve#getLength() getter and removes the need for accessing arguments[]
2014-01-05 18:06:45 +01:00
Jürg Lehni
e3f3a9c9d2
Merge branch 'refs/heads/master' into v8-optimizations
2014-01-05 17:42:59 +01:00
Jürg Lehni
1ee5b2c126
Fix references to Bootstrap.js in comments.
2014-01-05 17:41:38 +01:00
Jürg Lehni
6cb25fafe3
Use changes in latest Straps.js to remove as many hidden parameters as possible.
...
Hidden parameters through arguments[] are bad news for JS optimizer engines.
2014-01-05 17:40:54 +01:00
hkrish
df7e8e43b2
More explanation and indentation fixes
2014-01-05 15:59:21 +01:00
hkrish
bcdec37b1a
Do a much simpler but thorough check for winding contribution, instead of trying to be clever :)
2014-01-05 14:38:15 +01:00
Jürg Lehni
ea63d4c288
Merge branch 'refs/heads/master' into v8-optimizations
...
Conflicts:
src/core/Base.js
src/style/Color.js
2014-01-05 05:01:13 +01:00
Jürg Lehni
e22fa3a664
Update copyright notice.
2014-01-04 01:47:16 +01:00
Jürg Lehni
6a11547942
Fix issue in Curve.getLength() for linear curves with sub-ranges.
...
Closes #376 .
2013-12-30 14:20:05 +01:00
Jürg Lehni
35890383d8
Merge branch 'refs/heads/paperscript-refactoring' into v8-optimizations
2013-12-29 15:54:54 +01:00
Jürg Lehni
8395541298
Clean up docs and fix spelling mistakes.
2013-12-29 15:44:26 +01:00
hkrish
f2168b48cb
new Boolean operator functions
2013-12-29 13:40:22 +01:00
hkrish
3b85d3d990
Remove TestOnCurve method
2013-12-29 13:38:33 +01:00
hkrish
9831720c9c
New computeBooleean method
2013-12-29 13:38:04 +01:00
hkrish
7af091ca5b
Dont alter the winding direction for paths within compoundPaths if they are not completely contained
2013-12-29 13:36:43 +01:00
hkrish
d02e0dcecf
Remove old SplitPath method
2013-12-29 13:32:12 +01:00
hkrish
3f6562d5b3
Method for tracing a set of connected segments and producing paths; used in boolean ops and path offsetting methods.
2013-12-29 13:29:54 +01:00
hkrish
7c75dcee97
New Split path method
2013-12-29 13:25:48 +01:00
hkrish
1be669396e
First cut at a new winding number calculation algorithm
2013-12-29 13:21:08 +01:00
hkrish
a88d7f5eae
Rudimentary self-intersection calculation
2013-12-29 13:06:25 +01:00
hkrish
1bacbc32e9
Link previous & next curves while returning monotone curves
2013-12-29 13:03:39 +01:00
hkrish
0b4da28c1e
Optimize handling of horizontal curves in Curve#_getWinding
2013-12-29 12:38:59 +01:00
Jürg Lehni
c0ed227cbc
Add sorted argument to PathItem#getIntersections()
2013-12-28 21:06:35 +01:00
Jürg Lehni
58bd3aa444
Sorting CurveLocation by path index produces the correct sequence in compound paths too.
2013-12-28 21:01:44 +01:00
Jürg Lehni
38d67d843d
Move Path#getStyle() to better location and simplify code.
2013-12-28 20:56:44 +01:00
Jürg Lehni
451ff4fd03
Docs: Add group title to boolean path operations.
2013-12-28 20:56:30 +01:00
hkrish
a8a4a6fd03
Return horizontal curves as well, with monotonic curves
2013-12-26 18:03:23 +01:00
hkrish
4562b104f2
Winding number calculation for a given point
2013-12-25 20:46:13 +01:00
hkrish
39c52f326e
New _getWinding method in Curve. This method return the winding contribution of this curve w.r.t. the resulting PathItem
2013-12-25 20:41:19 +01:00
hkrish
0134596f66
_getMonotoneCurves method which returns and caches curves that are monotonic in Y direction
2013-12-25 20:38:48 +01:00
hkrish
b4c7bcae5e
Indent with Tabs like rest of paperjs code.
2013-12-25 20:33:51 +01:00
hkrish
70070c14d2
Avoid creating proxy array objects
2013-12-24 19:00:33 +01:00
hkrish
f23303e371
Merge branch 'master' into bool-new
...
* master:
Share code that handles bounds in roots between solveQuadratic() and solveCubic()
Inline EPSILON and TOLERANCE for better performance in Numerical.
Clean up code a bit.
Filter out insert property in Item#set()
Typo Paelette -> Palette
Rename Item#anchor -> Item#pivot
Minor documentation fixes.
2013-12-24 00:02:15 +01:00
hkrish
3b013c0720
Add an optional ignoreLinear parameter to Curve#divide, so that new segments on linear curves will keep their correct bezier handles.
2013-12-23 23:38:12 +01:00
hkrish
20b6d699db
Consistently return curve parameter on Line intersections as well, so that sorting intersections wouldn't fail.
2013-12-23 23:34:26 +01:00
hkrish
20fbdcffda
Subdivide only if tDiff on both curves have failed to converge more than 80%
2013-12-23 23:27:23 +01:00
Jürg Lehni
81651a7379
Prevent V8 "assignment to parameter in arguments object" deoptimizations.
...
Some getter-like functions still need fixing, but this might require a fix in Straps.js first.
2013-12-17 23:28:55 +01:00
Jürg Lehni
3dbad9c477
Replace delete in favor of setting to undefined to prevent V8 deoptimization.
2013-12-17 23:27:48 +01:00
Jürg Lehni
99d7b5cfdb
Merge branch 'refs/heads/fatline'
2013-12-17 22:07:34 +01:00
Jürg Lehni
6b4917f4a8
Clean up code a bit.
2013-12-17 15:23:07 +01:00
Jürg Lehni
45ed406aa3
Remove unnecessary exports.
2013-12-16 21:58:32 +01:00
Jürg Lehni
94b27e933a
Some more variable renaming.
2013-12-16 21:56:41 +01:00
Jürg Lehni
e9d2c6cfd4
Further simplify code a bit.
2013-12-16 21:45:06 +01:00
Jürg Lehni
d984a2cd87
Use correct value for tolerance in non-fatline code again.
2013-12-16 21:41:46 +01:00
Jürg Lehni
a59a42376a
Clean up coding style a bit.
2013-12-16 21:40:40 +01:00
hkrish
5fe092672e
Fatline clipping: fix c-hull corner case.
2013-12-14 00:31:42 +01:00
hkrish
a0013da7f8
Merge branch 'master' into fatline
...
* master: (71 commits)
Define the default value for Color#alpha.
Some minor changes in Satie example.
Include point property in stroke hit-results.
Clean up code and comments in various places.
Use Point.read() for center parameter in Item#rotate
Make hit-tests work again with projects that don't have a view.
Write documentation for Item#anchor.
Keep support for Item#registration for now as well, since there are some scripts on the mailing list that use it.
Rename Item#registration to Item#anchor
No need to run Radial Rainbows in HiDPI mode.
Include Satie Sound Analysis Example.
Only start dragging if none of the mosedown events have stopped propagation.
Fix item-level mousedrag events again.
Allow layers to select children again, since it breaks examples otherwise.
Fix documentation issues in TextItem.
Make hit-test tolerance dependent of view#matrix
Implement options.selected for hit-testing segments and handles.
Fix typo in new segment / handle hit-testing code.
Use same stroke tolerance approach for hit-testing joins and caps as well.
Do not factor in view matrix into Item#globalMatrix.
...
2013-12-13 20:04:43 +01:00
hkrish
5fb75593c2
Remove enpoint fix from curve-line intersections, since it's already handled
2013-12-13 20:01:58 +01:00
Jürg Lehni
d176acfc53
Include point property in stroke hit-results.
2013-12-11 17:10:32 +01:00
hkrish
ef66b6dbe6
Fatline clipping: fix convergence check to be more strict
2013-12-10 20:45:25 +01:00
Jürg Lehni
68bce5b062
Implement options.selected for hit-testing segments and handles.
2013-12-10 19:34:25 +01:00
Jürg Lehni
52891830e4
Fix typo in new segment / handle hit-testing code.
2013-12-10 18:59:04 +01:00
Jürg Lehni
9177bac125
Use same stroke tolerance approach for hit-testing joins and caps as well.
2013-12-10 14:23:05 +01:00
Jürg Lehni
7c28c7e9e3
Do not factor in view matrix into Item#globalMatrix.
...
Instead concatenate it when drawing selections.
2013-12-10 13:18:21 +01:00
Jürg Lehni
48c8946f9e
Implement correct hit-testing tolerance using transformed 2D stroke padding rather than unscaled numerical tolerance.
...
But we still need to factor in the View zoom as well...
2013-12-10 12:52:42 +01:00
Jürg Lehni
d65ede7df8
Correctly take strokePadding and transformation matrices into account in roughBounds, through new Path._getPenPadding()
2013-12-10 11:43:05 +01:00
hkrish
ac41f0d3c1
Fatline clipping: fix issue where one of the curves has been converged completely and other hasn't.
2013-12-09 23:27:26 +01:00
hkrish
0598afd77b
Fatline clipping: remove old #curveIntersection method
2013-12-09 19:36:14 +01:00
Jürg Lehni
b7943239eb
Implement cached getInternalRoughBounds as well.
2013-12-09 19:33:34 +01:00
hkrish
2fa5e3d417
Remove debug helpers
2013-12-09 19:31:58 +01:00
hkrish
82ab532885
Fatline clipping: clipConvexHull method handles only the clipping part
2013-12-09 19:31:04 +01:00
hkrish
35acebb91d
Fatline clipping: remove old fatline code. This is handled by the CurveIntersections method now
2013-12-09 19:30:03 +01:00
hkrish
6041b2b09d
Fatline clipping: new #CurveIntersections method
2013-12-09 19:28:56 +01:00
Jürg Lehni
1e9fc61644
Fix issues with deserializing selection states.
2013-12-09 15:18:43 +01:00
Jürg Lehni
44e913201d
Switch back to instanceof checks.
...
As people are started to subclass Paper.js classes...
2013-12-09 15:04:44 +01:00
Jürg Lehni
e238d23194
Implement caching of internal, untransformed bounds.
2013-12-09 10:53:19 +01:00
hkrish
b471b90229
Fatline clipping: Iterate to find intersections
2013-12-08 23:29:38 +01:00
hkrish
68b9adac95
Modify old clipFatline code to a much cleaner version
2013-12-08 23:15:18 +01:00
hkrish
45e35aad83
New CurveCurveINtersections code; doing the fatline clip inplace.
2013-12-08 23:14:13 +01:00
Jürg Lehni
17e4078e3b
Fix a newly introduced bug in drawSegments()
2013-12-08 22:16:27 +01:00
Jürg Lehni
064d632d65
More matrix related clean-ups.
2013-12-08 22:12:36 +01:00
Jürg Lehni
8cec512cc2
Take matrices into account in PathItem#getIntersections()
2013-12-08 22:00:40 +01:00
Jürg Lehni
516b9d040f
Apply matrices before calculating boolean path operations.
2013-12-08 21:39:56 +01:00
hkrish
6c5e18ae45
New clip convex-hull routine
2013-12-08 19:09:59 +01:00
Jürg Lehni
fc4e88c039
Change the way segments, points and handles are selected and deselected.
...
There is no interdependency anymore, except for selecting a segment selects the point and both handles, and selecting a curve selects both points and handles.
Closes #355
2013-12-08 18:06:31 +01:00
Jürg Lehni
afe00add32
Implement option.type filtering in #hitTest() functions.
2013-12-08 16:32:42 +01:00
Jürg Lehni
2884894d0f
Implement hit-testing tolerance for fill tests.
...
Closes #278 .
2013-12-08 12:15:10 +01:00
hkrish
834c8d17a9
Declutter getConvexHull code.
2013-12-08 00:18:47 +01:00
hkrish
baa189bb19
getConvexHull returns upper and lower part of the c-hull seperately
2013-12-08 00:11:13 +01:00
Jürg Lehni
054356c78d
Fix drawing of closed path with only one segment.
2013-12-07 16:16:04 +01:00
Jürg Lehni
f166b08257
Simplify addCap() function.
2013-12-07 16:11:02 +01:00
Jürg Lehni
eb1f62b908
Improve strokeBounds fix for paths with only one segment.
2013-12-07 16:07:51 +01:00
msand
e431154e0e
Fix indent.
2013-12-07 16:09:50 +02:00
msand
73b1b9843a
Wrote failing test for strokeBounds on paths with a single segment and strokeColor. Implemented fix for failing test.
2013-12-07 15:59:45 +02:00
Jürg Lehni
a50adb1020
Implement constructors for Path and CompoundPath that can handle SVG-style path-data.
2013-12-06 18:09:44 +01:00
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
Jürg Lehni
b91c8f93f8
Remove Curve. _getEdgeSum() again, and inline code in Path.isClockwise()
2013-10-18 19:51:54 +02:00
Jürg Lehni
1fc9f882ca
Fix a minor bug in CompoundPath#contains(), improve comments and clean up code.
2013-10-18 19:49:05 +02:00
Jürg Lehni
304ecbc3be
Define compoundChildren hitTest option to get matching children instead of parent.
2013-10-18 15:40:41 +02:00
Jürg Lehni
f8106ae18f
Improve code handling special winding cases.
2013-10-18 15:20:32 +02:00
Jürg Lehni
75a209c002
Handle more special cases in winding algorithm.
2013-10-18 15:15:54 +02:00
Jürg Lehni
5d0fd8f970
Implement Style#windingRule and use it in Path#contains().
2013-10-18 14:54:13 +02:00
Jürg Lehni
4f27be8f12
Include new, improved point in path algorithm based on winding number.
...
It's also possible to switch to using the canvas's native isPointInPath() through options.nativeContains
2013-10-18 14:22:59 +02:00
Jürg Lehni
a07538b205
Use same tolerance in Curve.isLinear() as in Curve#isLinear().
2013-10-17 20:19:34 +02:00
Jürg Lehni
085fa3e1c6
Set named arguments at the end, since some depend on geometry to be defined (e.g. #clockwise).
2013-10-17 14:03:05 +02:00
Jürg Lehni
73d2c34088
Implement item-level #equals() method and clean up other equals methods.
2013-10-17 13:08:54 +02:00
Jürg Lehni
9976033655
Implement serialization of selection.
2013-10-17 12:04:11 +02:00
Jürg Lehni
3958d35f28
Change behavior of Path#fullySelected.
...
Setting it on empty paths does the same as Path#selected.
2013-10-17 12:03:46 +02:00
Jürg Lehni
51cf1cfec6
Clean up Path#toShape().
2013-10-16 23:35:50 +02:00
Jürg Lehni
c4c7a37993
Implement Path#toShape(), Segment#isColinear(), Segment#isOrthogonal() and Segment#isArc().
2013-10-16 23:10:03 +02:00
Jürg Lehni
b581c84d8b
Move CompoundPath#reduce() to Item#reduce().
2013-10-16 16:10:28 +02:00
Jürg Lehni
b325aebc77
Docs: More smaller fixes.
2013-10-16 15:03:29 +02:00
Jürg Lehni
543609c0c6
Have Path.Ellipse constructor support negative radius values correctly.
2013-10-16 14:25:14 +02:00
Jürg Lehni
c945bf7908
Docs: Various smaller clean ups.
2013-10-16 14:20:13 +02:00
Jürg Lehni
3af179e2cf
Docs: Improve Path constructors.
2013-10-16 14:19:25 +02:00
Jürg Lehni
41d6650666
Add support for named center & radius arguments to Path.Ellipse.
2013-10-16 13:32:40 +02:00
Jürg Lehni
4b636dd31c
Clean up Path constructors code.
2013-10-16 13:26:08 +02:00
Jürg Lehni
8fdcbce5ac
Improve argument reading in Segment.
2013-10-16 13:15:08 +02:00
Jürg Lehni
a3d0e0d462
Clean up throw statements.
...
Never throw plain strings.
2013-10-14 16:05:50 +02:00
Jürg Lehni
24e46bee60
Merge branch 'refs/heads/boolean-fix'
2013-10-08 20:50:47 +02:00
Jürg Lehni
0860cdd941
Clean up code a bit.
2013-10-08 20:49:24 +02:00
Jürg Lehni
9103c19e6f
Fix issues with #dashOffset when emulating native dashes.
...
Closes #303 .
2013-10-08 10:50:59 +02:00
Jürg Lehni
1ee6bb7e79
Use isZero() when checking for straight curves in Curve.getLength()
2013-09-23 08:13:32 -07:00
Jürg Lehni
509ac48951
Fix indentation levels.
2013-09-22 18:18:22 -07:00
Jürg Lehni
cae4520665
Simplify addCurveLineIntersections() code.
2013-09-22 18:18:03 -07:00
hkrish
8434b4bebe
Fix: Syntax error!
2013-09-22 17:49:10 +02:00
hkrish
f9b4321a56
Boolean -fix: Interpolate to find the parameter of intersection in linear curve segments
2013-09-21 17:26:14 +02:00
hkrish
0a22211393
Conform to paperjs coding style.
2013-09-21 15:26:14 +02:00
hkrish
4f54ac1f4c
Boolean -fix: Correctly perform boolean operations regardless of the input paths' winding direction
2013-09-17 19:50:13 +02:00
hkrish
669fb1638a
Boolean -fix: Preserve the order of intersections found (Curve-Line) according to the PathItem they belong to.
2013-09-13 02:44:51 +02:00
hkrish
abe0e5e059
Boolean -fix: CurveLocation now keeps track of the correct segment at intersections
2013-09-13 00:08:43 +02:00
Jürg Lehni
19c7788617
Fix documentation irregularities.
2013-08-23 19:45:28 -07:00
Jürg Lehni
6b19f25f4b
Fix typos in comments.
2013-08-08 15:21:35 -07:00
Jürg Lehni
aa4d990c90
Move and unify handling of Item#_set(props) to new Item#_initialize(), and add support for props.insert = false.
2013-07-21 15:45:22 -07:00
Jürg Lehni
93c90d0cd8
Do not insert boolean operation clones into DOM.
2013-07-19 18:46:28 -07:00
Jürg Lehni
b7aea1e527
Use insert: false option in creation of all clones.
...
Still needs implementing in Item constructor.
2013-07-19 18:42:13 -07:00
Jürg Lehni
20a17f2939
Implement insert parameter in Item#clone() to control DOM insertion.
...
Defaults to true. Also insert in the right place now, above the original.
2013-07-19 18:27:00 -07:00
Jürg Lehni
ef4eee1064
Pass true for isParameter in Curve#divide() calls.
...
Closes #252 .
2013-07-04 19:39:55 -07:00
Jürg Lehni
e8765d18d5
Make argument reading more flexible by introducing options object for readNull and clone, and passing it on to the constructor through this.__options for additional values.
2013-06-28 07:37:03 -07:00
Jürg Lehni
8f254202e8
Use new @operator tag to mark math operator methods.
2013-06-28 05:59:07 -07:00
Jürg Lehni
6833e9d8e0
Fix {@default 0.5} values in documentation.
2013-06-27 18:15:10 -07:00
Jürg Lehni
e63edba0b5
Clean up various documentations a bit.
2013-06-27 18:03:03 -07:00
Jürg Lehni
7ade053dea
Move Path.Circle constructor above Path.Rectangle.
2013-06-27 17:54:00 -07:00
Jürg Lehni
f9925a71ea
Improve documentation for Path#split(), Curve#divide() and Curve#split().
...
Closes #189 .
2013-06-27 17:18:57 -07:00
Jürg Lehni
9f5b543ab5
Fix getCurveAt() signature.
2013-06-27 17:13:00 -07:00
Jürg Lehni
38db18c2e1
Remove isParameter from Curve.evaluate()
2013-06-27 17:12:35 -07:00
Jürg Lehni
c123468d7a
Clean up Path#join() code.
2013-06-27 16:06:24 -07:00
Jürg Lehni
2b236a3da8
In Path#join, add first segment of second path again at the end after joining, if it was closed.
...
Closes #249 .
2013-06-27 15:43:26 -07:00
Jürg Lehni
6d38401f0c
Use faster direct Curve constructor instead of Base.create().
2013-06-25 09:58:18 -07:00
Jürg Lehni
52c889428b
Remove Curve.create() in favor of direct constructor.
2013-06-25 09:54:13 -07:00
Jürg Lehni
7e24de7c74
Replace SegmentPoint.create() in favor of normal constructor.
2013-06-25 09:48:51 -07:00
Jürg Lehni
1866e4ff15
Remove need for all special arguments in minification, and restructure code to avoid warnings.
2013-06-24 10:15:54 -07:00
Jürg Lehni
7975232ee7
Remove workaround for obscure WebKit bug.
...
It wasn't fully working either. Solution:
https://bugs.webkit.org/show_bug.cgi?id=109961
2013-06-24 09:37:25 -07:00
Jürg Lehni
a4535edbb9
Bring back _class names, since code minification breaks reliance on constructor.name.
...
Closes #248 .
2013-06-23 20:18:32 -07:00
Jürg Lehni
dff39dff78
Use local bounds for hit-testing.
...
Fixes issue #247 .
2013-06-23 19:49:36 -07:00
Jürg Lehni
719b9d5e24
Move logic that determines if item can be directly composited into separate per-item #_canComposite() method.
2013-06-19 08:22:08 -07:00
Jürg Lehni
258c404b98
Move curvature calculations into Curve.evaluate(), and define unit tests for it.
2013-06-18 19:00:05 -07:00
Jürg Lehni
619a8f88f8
Clean up code a bit in Curve#getCurvatureAt().
2013-06-18 18:29:44 -07:00