Jürg Lehni
7061bc0e0a
Simplify CurveLocation.sort() code
...
Relates to #787
2015-09-16 10:52:51 +02:00
Jürg Lehni
0980ad3fe9
Fix remaining issues with curve location sorting.
...
Relates to #787
2015-09-16 10:44:41 +02:00
Jürg Lehni
f8bd7a2005
Improve debug logging and drawing.
...
And add more descriptive comments to tracePath().
2015-09-16 09:52:41 +02:00
Jürg Lehni
197aa4b4cf
No need to wrap angles as they're always -PI < a < PI.
2015-09-16 02:56:24 +02:00
Jürg Lehni
2026e5571e
Some code cleanup and comments in isCrossing().
2015-09-16 02:54:25 +02:00
Jürg Lehni
8f9549dd12
Fix non-breaking spaces.
2015-09-16 02:29:17 +02:00
Jürg Lehni
60a725b527
Implement correct CurveLocation#isCrossing() check.
...
And improve curve caching. Still needs work.
2015-09-15 19:38:28 +02:00
Jürg Lehni
7aef20ae6b
Compare intersection points instead of curve time when deciding to merge.
...
Use same precision indepenent of curve length.
2015-09-14 15:18:44 +02:00
Jürg Lehni
d84a84c67f
Change the way winding contributions are propagated
...
The new approach preserves segment sequence.
Relates to #777
2015-09-13 13:06:01 +02:00
Jürg Lehni
d62caf6faa
Introduce CURVETIME_EPSILON, to be used when handling curve time parameters.
...
Relates to #777
2015-09-12 22:55:58 +02:00
Jürg Lehni
4770cfe2f8
Minor intersection refactoring clean up.
2015-09-10 05:18:56 +02:00
Jürg Lehni
04452730dd
Simplify CurveLocation data structures.
...
Directly creating and linking intersections simplifies things a lot.
2015-09-09 17:17:49 +02:00
Jürg Lehni
8f13fa54fc
Remove debugger statement.
2015-08-30 13:52:13 +02:00
Jürg Lehni
0e26b53053
Improve CurveLocation.sort() to handle more edge cases.
...
Relates to #648
2015-08-28 16:17:54 +02:00
Jürg Lehni
86fd33c7d5
User correct tolerance in CurveLocation sorting.
2015-08-26 17:06:02 +02:00
Jürg Lehni
a099377ac6
Remove debug logging for CurveLocation.
2015-08-26 16:58:52 +02:00
Jürg Lehni
d85b4f0c80
Fix issues with wrong sorting of CurveLocation in Curve.filterIntersections()
2015-08-26 16:56:28 +02:00
Jürg Lehni
815991d556
Some minor adjustments and fixes.
2015-08-26 11:43:39 +02:00
Jürg Lehni
85d21c84b8
Start implementing support for touching and overlapping shapes in boolean operations.
...
Relates to #449 , #450 , #648 , #719
2015-08-23 21:19:19 +02:00
Jürg Lehni
84b202fd79
Expose and reuse Curve evaluation method names.
2015-08-19 17:26:52 +02:00
Jürg Lehni
da82116501
Rework handling of weighted and normalized curve tangents and normals.
...
Relates to #563
2015-08-19 17:15:41 +02:00
Jürg Lehni
19bcd19b49
Implement path versioning for segment changes.
...
And use it to keep CurveLocation objects up to date. Closes #682
2015-06-16 19:36:22 +02:00
Jürg Lehni
dbac9c06de
Bring back private UIDs for Color.
...
SVG Export for multiple gradients was broken.
2015-06-16 18:12:40 +02:00
Jürg Lehni
27bb8a356f
Implement unique ids, and fix issue with Base.deserialize()
...
Gradient and Symbol were overriding each other in the dictionary, and dictionary entries could not contain references to other dictionary entries.
Closes #690
2015-05-11 19:39:39 +02:00
Jürg Lehni
8ad067ec6c
Use tolerance when comparing curve locations by parameter.
2015-01-02 21:20:28 +01: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
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
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
652dbe1e86
Use loop to produce CurveLocation getters, and add CurveLocation#curvature.
2014-07-25 20:05:44 +02:00
Jürg Lehni
d12607dd44
Use a Base object for PaperScope#settings and update straps.js to version that offers Base#set().
2014-04-11 13:32:06 +02:00
Jürg Lehni
fa9786b344
Switch to new simpler convention for control of beans creation in straps.js
2014-04-02 20:53:18 +02:00
Jürg Lehni
17fb1fb862
Some Straps.js related code changes.
2014-03-31 19:27:04 +02:00
Jürg Lehni
a81063a994
Replace all unsupported Curve#getLength(from, to) calls with #getPartLength(from, to)
2014-03-30 14:17:02 +02:00
Jürg Lehni
f1765d1cbf
Implement CurveLocation#equals()
2014-02-20 15:37:49 +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
Jürg Lehni
e22fa3a664
Update copyright notice.
2014-01-04 01:47:16 +01:00
Jürg Lehni
19c7788617
Fix documentation irregularities.
2013-08-23 19:45:28 -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
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
01e48b3322
Improve and clean up fat-line bug fix.
2013-06-13 15:53:28 -07:00
Jürg Lehni
7faf2a9e70
Clean-up @hkrish's changes a bit.
2013-06-09 18:37:08 -07:00
hkrish
d3405115c1
Use parameter on both curves in CurveLocation objects instead of Point in #getIntersection()
2013-06-08 21:37:43 +05:30
Jürg Lehni
10d5de3ed6
Implement a better way to name and export class constructors.
...
This change also simplified the way classes are exported to PaperScope objects.
2013-05-27 12:48:58 -07:00
Jürg Lehni
9aafb46e6c
Remove need for __segment property and further simplify computeBoolean() code.
2013-05-04 02:50:18 -07:00
Jürg Lehni
883e3ad563
Define CurveLocation#intersection as a way to retrieve the CurveLocation on the intersecting path when using Path#getIntersections().
2013-04-30 18:41:26 -07:00
Jürg Lehni
0c114883e1
Add unique ids to CurveLocation.
2013-04-22 19:11:42 -07:00
Jürg Lehni
fbe8a558bd
Refactor Format literal to Formatter class that keeps precision stored.
2013-04-09 17:32:19 -07:00
Jürg Lehni
936b1bccbb
Get curves uncached in CurveLocation#split() and #divide().
2013-03-01 20:26:03 -08:00
Jürg Lehni
9d8cddbe42
Implement new private Format object that handles formatting of number, point, size and rectangle.
2013-02-28 19:14:05 -08:00
Jürg Lehni
02ca95eb46
Avoid accidental global leakage.
2013-02-08 16:12:57 -08:00
Jürg Lehni
6c9c16ad3d
Update copyright information comments, and year.
2013-01-28 18:03:27 -08:00
Jürg Lehni
1a438b8b9b
Change Curve#[getPoint / getTangent / getNormal](t) to #[getPoint / getTangent / getNormal](offset, isParamter).
...
Keep deprecated versions around for now.
2013-01-28 16:30:28 -08:00
Jürg Lehni
f09bc84a12
Implement correct handling of Curves / Segments synchronization, improve CurveLocation linking to Curves through their linked Segments, and preserve Curves in Path#split() calls.
2013-01-22 14:46:49 -08:00
Jürg Lehni
8cea919dbd
Calculate CurveLocation#parameter uncached when dealing with dividing or splitting, since these commands alter the underlying Path.
2012-12-31 21:42:55 +01:00
Jürg Lehni
8ec8af4dc5
Define CurveLocation#divide().
2012-12-30 19:53:09 +01:00
Jürg Lehni
4185b63d99
Und recent renaming of #getNearest*() methods.
2012-12-30 19:43:35 +01:00
Jürg Lehni
1b539301ad
Find a better naming convention for the various getLocation* methods (*At for offsets / parameters, *Of for points), implement the missing methods on Curve and use them in Path.
2012-12-27 21:08:03 +01:00
Jürg Lehni
3c4978eb04
Rename Curve#getParameter(point) to Curve#getParameterOf(point), to better distinguish from Curve#getParameterAt(length).
2012-12-27 20:09:21 +01:00
Jürg Lehni
68ad4bb5ba
Implement PathItem#getIntersections(path) and Curve#getIntersections(curve) using divide-and-conquer approach, and new Curve.getBounds().
2012-12-27 19:23:03 +01:00
Jürg Lehni
d671a08205
Introduce Base.toFloat() and rename Base.formatNumber() to Base.formatFloat()
2012-11-14 01:31:08 -08:00
Jürg Lehni
55f815cb72
Remove obsolete TODOs.
2011-07-09 17:12:13 +02:00
Jürg Lehni
dfbe3135ad
Remove HitResult inheritance from CurveLocation, but have a #location property pointing to it.
2011-07-08 22:25:42 +02:00
Jonathan Puckey
a0f4371803
Fix CurveLocation#getSegment.
2011-07-08 18:39:05 +02:00
Jürg Lehni
69a7d0bfd4
Implement a first version of Item#hitTest(), so far working only for Path items. Work in progress.
2011-07-07 22:14:58 +02:00
Jürg Lehni
f15a541468
Improve documentation.
2011-07-07 16:10:27 +02:00
Jürg Lehni
b13c7622c8
Rename Curve#getParameter(length) -> Curve#getParameterAt(offset)
2011-07-06 23:13:38 +02:00
Jürg Lehni
c35133fae9
Add CurveLocation#distance, for Curve#getNearestLocation().
2011-07-06 22:19:01 +02:00
Jürg Lehni
0c0807e3e9
Streamline handling of undefined properties in CurveLocation.
2011-07-06 22:18:40 +02:00
Jürg Lehni
30e92c8a35
Simplify CurveLocation#getPoint(), as missing parameter cannot be determined if point is also undefined.
2011-07-06 22:14:44 +02:00
Jürg Lehni
79c0ad8cc5
Update copyright notices.
2011-07-01 12:17:45 +02:00
Richard D. Worth
ac39873693
Whitespace. Removed all trailing whitespace from .js files
2011-06-30 06:01:51 -04:00
Jürg Lehni
7cd749e63d
Change all documentation to new convention of defining @class outside injection scope, fix some comments and a few errors with examples.
2011-06-22 23:56:05 +01:00
Jürg Lehni
3226147e00
Use a version of Bootstrap that always produces beans and remove all beans: true instructions.
2011-06-17 18:42:29 +01:00
Jürg Lehni
401c4d5dc4
Rearrange @constructor documentation sequence.
2011-06-14 23:01:35 +01:00
Jürg Lehni
ffa79f4fd1
Clean up white spaces in comments.
2011-06-14 22:59:45 +01:00
Jonathan Puckey
1520cad144
Documentation: capitalize basic types in @ tags.
2011-05-27 21:21:49 +02:00
Jonathan Puckey
8e84c79aa6
Documentation: capitalize 'string' and 'number' types.
2011-05-27 20:15:15 +02:00
Jonathan Puckey
25c3534dc1
Documentation: remove part of the constructor explanation of CurveLocation until the mentioned functions have been added.
2011-05-27 20:06:57 +02:00
Jonathan Puckey
26aa3c00d7
Add CurveLocation documentation.
2011-05-23 17:39:26 +02:00
Jürg Lehni
bc80c58558
Add Base.formatNumber() to format numbers in the same way as Scriptographer (precision of up to 5 fractional digits) and use it in the various #toString() functions.
2011-05-04 19:42:50 +01:00
Jonathan Puckey
41120cf4d9
Various small code cleanups.
2011-05-02 12:23:42 +02:00
Jürg Lehni
0680a50fd2
Fix yet another two bugs in CurveLocation.
2011-05-01 13:18:36 +01:00
Jürg Lehni
08e779d560
Fix two bugs in CurveLocation.
2011-05-01 13:16:25 +01:00
Jürg Lehni
c2fbcbcaa8
Use Curve#getLength(from, to) rather than cloning and dividing.
2011-04-27 20:52:24 +01:00
Jürg Lehni
346493fb7c
Replace calls to getters with their internal property in all cases where getter does not perform additional magic.
2011-04-27 20:48:41 +01:00
Jürg Lehni
016f4c15aa
Rename CurveLocation#getLength() and #getCurveLength() to #getOffset() and #getCurveOffset(), and seperate Path#getLength([location]) into #getLength() and #_getOffset().
2011-04-27 20:08:57 +01:00
Jürg Lehni
c836012d3d
Add CurveLocation#getTangent() and #getNormal() and use them in Path's versions.
2011-04-27 19:26:03 +01:00
Jürg Lehni
bf0bc81892
Fix various minor bugs in CurveLocation: We cannot rely on most of its field to always be set and need to call getters instead.
2011-04-27 19:24:40 +01:00
Jürg Lehni
cc06a6f128
Remove CurveLocation#getPath() again as its functionality is provided by #getItem() already.
2011-04-27 19:22:57 +01:00
Jürg Lehni
ead1600afe
Clean-up CurveLocation code and switch from returning -1 to null for #getIndex().
2011-04-26 17:49:54 +01:00
Jonathan Puckey
594c11fedd
CurveLocation: fix mistakes.
2011-04-11 19:36:40 +02:00
Jonathan Puckey
aa043428c0
CurveLocation: add empty line to end of file.
2011-04-11 19:33:34 +02:00
Jonathan Puckey
d396f48c4b
Implement CurveLocation.
2011-04-11 19:32:04 +02:00