Commit graph

1440 commits

Author SHA1 Message Date
Jürg Lehni
4ed9ef54f2 Fix bug in Curve.filterIntersections() and clean up code a bit. 2015-01-02 21:19:18 +01:00
Jürg Lehni
b2261fd512 Introduce Curve.filterIntersections() and use it both in PathItems#getIntersections() and Curve#getIntersections() 2015-01-02 21:00:05 +01:00
Jürg Lehni
3302a7dff5 Increase recursion threshold to 4 when checking for fatline convergence. 2015-01-02 20:49:09 +01:00
Jürg Lehni
fbd026ea0d Bring back code removed by @hkrish in commit 5fb75593c2
Relates to issue #570, still required to figure out why it is still needed.
2015-01-02 20:02:45 +01:00
Jürg Lehni
e3e3d13fa5 Add comment regarding issue #565 2015-01-02 16:33:15 +01:00
Jürg Lehni
b75def3f3a Implement optimal values in fat line clipping code for maximum recursion and curve time difference, as determined by @iconexperience.
Closes #565
2015-01-02 16:29:12 +01:00
Jürg Lehni
45c86a3035 Switch to suggested new implementation of Line.getSignedDistance() by @iconexperience
Closes #554
2015-01-02 16:17:19 +01:00
Jürg Lehni
1de750bc77 Check for Path#closed in Path#equals() 2014-12-28 18:10:14 +01:00
Jürg Lehni
28538d8a43 Clean up code from #597 a bit. 2014-12-26 06:42:46 +01:00
louisremi
a9bf0b097e Handle closed path in PathFitter 2014-12-15 14:56:25 +01:00
Jürg Lehni
318209e9e9 Replace compareNumbers() with equals() and improve numerical tolerance handling in test helpers. 2014-11-30 11:27:14 -08:00
Jürg Lehni
ebdc63fbfa Use correct formula in Curve#getTangentAt() for end-points when there is no handle.
Closes #553.
2014-11-08 17:16:22 -08:00
Jürg Lehni
782bde238c Find a more general implementation for Item#intersects(item). 2014-10-20 18:00:07 +02:00
Jürg Lehni
5ddbc5b07f Implement Item#intersects(item) 2014-10-20 17:00:18 +02:00
Jürg Lehni
b3c7be67fc Support optional hidden matrix argument in #getIntersections()
...in order to provide an alternative matrix for the passed path to check against.
2014-10-20 16:53:49 +02:00
Jürg Lehni
0894e625b0 Fix documentation issues with Path#get*At()
Closes #537.
2014-10-15 13:00:50 +02:00
Jürg Lehni
e5714584ff Fix return type of #getCurvatureAt() methods.
Closes #535 properly this time.
2014-10-15 12:02:21 +02:00
Jürg Lehni
b71e2c69d6 Fix documentation of Curve#getCurvatureAt(), as well as Path#getCurvatureAt() & co.
Closes #535
2014-10-14 13:52:57 +02:00
Jürg Lehni
6a11532322 Clean up and simplify code a bit further. 2014-09-28 11:49:46 +02:00
Jürg Lehni
7462fe0b70 Fix Curve.getParameterAt() for negative values of offset, and implement unit test.
Closes #524.
2014-09-28 11:44:38 +02:00
Jürg Lehni
2dce6c4efa Some code clean-up in Segment#_changed() 2014-09-27 22:09:25 +02:00
Jürg Lehni
cc8b23894c Some clean up related to hidden _uncached parameter. 2014-09-27 22:03:54 +02:00
Jürg Lehni
b8530935a7 Streamline CurveLocation#getTangent/Normal/Curvature getter definitions to align with definitions in Curve, Path and PathIterator. 2014-09-27 22:03:20 +02:00
Jürg Lehni
dd99db8d2d Allow 'false' as well as 'off' for hidpi attribute, since that's what's in use for other attributes as well. 2014-09-26 18:03:37 +02:00
Jürg Lehni
5046a6a64c Fix naming of PathIterator#get*At functions. 2014-09-24 12:32:07 +02:00
Jürg Lehni
4adab91a18 Remove unused argument. 2014-09-23 17:51:29 +02:00
Jürg Lehni
ee27fe820f Check for valid parameter range in Curve#getLocationAt() and delegate to it in #getLocationOf() 2014-09-20 11:09:09 +02:00
Jürg Lehni
c94fb3038f Use valid parameter range [0,1] in calls to Curve.solveCubic(). 2014-09-20 11:08:20 +02:00
Jürg Lehni
c2465b60fa Transform the correct amount of points in Curve.getValues() when a matrix is provided. 2014-09-20 11:06:25 +02:00
Jürg Lehni
52dd24097f Define PathIterator#getPoint(), #getTangent(), #getNormal() and #getCurvature(). 2014-09-11 16:06:00 +02:00
Jürg Lehni
67d30f0042 Actually use maxRecursion and tolerance arguments in PathIterator, and increase precision in #flatten() a bit. 2014-09-11 15:20:04 +02:00
Jürg Lehni
73765e6654 Produce Path#getPointAt(), #getTangentAt(), #getNormalAt() & #getCurvature() in a loop, just like for Curve. 2014-09-10 11:21:06 +02:00
Jürg Lehni
50c5c6736c Rename PathFlattener to PathIterator and include the class in exports. 2014-09-10 02:20:00 +02:00
Jürg Lehni
1db4fb4064 Refactor PathFlattener code and add maxRecursion and tolerance arguments to constructor. 2014-09-09 18:32:41 +02:00
Jürg Lehni
7d69ef1864 Fix documentation of bean properties that are not read-only.
@bean can only be used when the property is read-only or both getters and setters are present in the scope.
2014-08-26 10:01:30 +02:00
Jürg Lehni
a564480522 Forgotten in previous commit. 2014-08-25 12:53:13 +02:00
Jürg Lehni
797a393c9a Remove various double white-spaces. 2014-08-25 12:49:14 +02:00
Jürg Lehni
48cb05a181 Replace tabs with 4 white-spaces. 2014-08-16 19:24:54 +02:00
Jürg Lehni
4d4a39c752 Implement Curve#getOffsetOf(point) / Path#getOffsetOf(point)
Closes #463.
2014-07-31 19:01:37 +02:00
Jürg Lehni
da22161d28 Correctly clear Curve length cache when segments change.
Closes #497
2014-07-31 17:00:52 +02:00
Jürg Lehni
652dbe1e86 Use loop to produce CurveLocation getters, and add CurveLocation#curvature. 2014-07-25 20:05:44 +02:00
Jürg Lehni
3093a8ec43 Introduce matrix.chain(mx) as a shortcut to Matrix.clone().concatenate(mx)
Simplifies quite a few lines of code.
2014-07-08 15:43:17 +02:00
hkrish
ccbf4579fd Don't remove the only intersection.
The previous code wrongly compared an intersection with itself while checking for duplicates.
2014-06-21 10:31:07 +02:00
Jürg Lehni
9d7ec13724 Update prepro.js to version that can evaluate whole expressions, and fix a newly introduced issue with it. 2014-05-14 15:14:03 +02:00
Jürg Lehni
846c806034 Implement non-scaling strokes through Style#strokeScaling.
Closes #418.
2014-05-13 13:38:51 +02:00
Jürg Lehni
4464950301 Correctly take Item#matrix into account in #getPathData(). 2014-05-13 13:21:59 +02:00
Jürg Lehni
e1ed7f3294 Prevent drawing selected compound path children twice. 2014-05-12 18:57:09 +02:00
Jürg Lehni
ea8518c3a5 Use the correct change notification when reversing paths. 2014-05-12 16:44:48 +02:00
Jürg Lehni
8560a71312 Remove srcOffset and dstOffset parameters from Matrix#_transformCoordinates(). 2014-05-08 13:54:05 +01:00
Jürg Lehni
8317aacc1b Split Item#hitTest() into separate private function that does need to do arguments reading, for improved performance also when iterating over children. 2014-04-29 20:06:48 +02:00