Commit graph

2340 commits

Author SHA1 Message Date
Jürg Lehni
5e70b106c9 Use only one new-line per top-level code lines. 2011-07-09 09:27:07 +02:00
Jürg Lehni
6694d08d0f Fix PaperScript code generation to wrap on new-lines, so missing colons will not cause errors. 2011-07-09 09:20:13 +02:00
Jürg Lehni
b5d3cf2ad0 Add comment about missing documentation. 2011-07-08 23:32:50 +02:00
Jürg Lehni
2dfe4dfa19 Remove invalid comments. 2011-07-08 23:32:38 +02:00
Jürg Lehni
0a7f5a12a5 Fix bug in 'stroke' hit-results. 2011-07-08 23:32:29 +02:00
Jürg Lehni
b1a2a626ad Separate type from name for 'bounds' hit-results. 2011-07-08 23:29:55 +02:00
Jürg Lehni
62ba983432 Implement hit-test options: center and bounds. 2011-07-08 23:26:50 +02:00
Jürg Lehni
c033a5a7bc Implement hit-test options: segments, handles and ends. 2011-07-08 23:26:21 +02:00
Jürg Lehni
9db96ae898 Perform point conversion along with HitResult.getOptions(). 2011-07-08 23:25:27 +02:00
Jürg Lehni
cc00f40532 Have Base.hyphenate() convert the result to lowercase. 2011-07-08 23:09:51 +02:00
Jürg Lehni
bb4e71da81 Clean up isFlatEnough() code. 2011-07-08 22:26:22 +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
Jürg Lehni
a580b23f2a Reverse direction of child-looping in hit-tests, so items that get drawn last are tested first. 2011-07-08 21:15:16 +02:00
Jürg Lehni
48d61b46bf Merge remote-tracking branch 'origin/master' 2011-07-08 21:01:47 +02:00
Jürg Lehni
1b3d4773a3 Optimise hit-testing by checking point to lie within #roughBounds + tolerance first. 2011-07-08 21:01:34 +02:00
Jonathan Puckey
36be78c671 Fix small problem in Item#_hitTest. 2011-07-08 18:41:29 +02:00
Jonathan Puckey
a0f4371803 Fix CurveLocation#getSegment. 2011-07-08 18:39:05 +02:00
Jonathan Puckey
b667a04cb6 Improve and simplify HSLColor example. 2011-07-08 14:47:34 +02:00
Jürg Lehni
fe37ce6bcb Clean up comments. 2011-07-07 23:02:26 +02:00
Jürg Lehni
23c4499d15 Add comments about how to potentially improve getBounds() accuracy. 2011-07-07 23:00:40 +02:00
Jürg Lehni
ca50461fd1 Implement new Curve.isFlatEnough(). 2011-07-07 23:00:16 +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
de87c1f97a Define a bit of code that names all our class constructors based on the property name under which they were stored, and use that in Item#toString(). 2011-07-07 22:14:09 +02:00
Jürg Lehni
3bd6122e82 Begin adding support for guides. 2011-07-07 21:02:52 +02:00
Jürg Lehni
133e0fc5cf Document ToolEvent#type. 2011-07-07 20:52:55 +02:00
Jürg Lehni
ced45c4e8f Add HSLColor to documentation. 2011-07-07 20:51:23 +02:00
Jürg Lehni
f15a541468 Improve documentation. 2011-07-07 16:10:27 +02:00
Jürg Lehni
64ae48af0b Remove solved TODO. 2011-07-07 16:10:06 +02:00
Jürg Lehni
5655981f6d Clean up white spaces. 2011-07-07 16:09:02 +02:00
Jürg Lehni
e573fe5dcd Do not pass prevSlope to Curve#getCrossings(), rely on #getPrevious() instead. 2011-07-07 16:08:10 +02:00
Jürg Lehni
4a53503130 Add support for optional matrix in Path#contains(), Path#getNearestLocation(), Curve#getValues(), Curve#getCrossings(), Curve#getNearestLocation() 2011-07-07 16:07:29 +02:00
Jürg Lehni
2851d8e403 Define Base#toString() as a mean to render Base objects as object literals, and use it for Key.modifier and onFrame() event objects, through Base.merge() conversion. 2011-07-07 14:10:02 +02:00
Jürg Lehni
baf7136ef7 Compress HSL and HSB converters even more. 2011-07-07 00:19:13 +02:00
Jürg Lehni
adff506751 Rearrange converter sequence. 2011-07-07 00:19:01 +02:00
Jürg Lehni
41e25dc5f7 Remove converters that simply pass through other rgb converters and have Color#convert() handle that for us. 2011-07-07 00:02:38 +02:00
Jürg Lehni
16c31fc683 No need to initialize with 0 since we're always setting them again. 2011-07-06 23:54:34 +02:00
Jürg Lehni
769ae05ad8 Clean up HSB code a bit too. 2011-07-06 23:51:46 +02:00
Jürg Lehni
dfef99aa92 Clean up and further simplify HSL code. 2011-07-06 23:51:30 +02:00
Jürg Lehni
f357eb4a21 Merge pull request #20 from gka/hsl-color
added support for HSL colors
2011-07-06 14:37:19 -07:00
Jürg Lehni
9d2148245a Implement Curve#getParameter(point), untested. 2011-07-06 23:15:32 +02:00
Jürg Lehni
56d62108cf Rename PathFlattener#getParameter(offset) -> #getParameterAt(offset) 2011-07-06 23:14:18 +02:00
Jürg Lehni
b13c7622c8 Rename Curve#getParameter(length) -> Curve#getParameterAt(offset) 2011-07-06 23:13:38 +02:00
Jürg Lehni
778a161ba0 Rename Curve.solve() -> Curve.solveCubic() 2011-07-06 23:10:16 +02:00
Jürg Lehni
d6b666024b Define #getNearestLocation() / #getNearestPoint() for Path. 2011-07-06 22:25:20 +02:00
Jürg Lehni
fadf6e98b5 Pass on minDistance to CurveLocation. 2011-07-06 22:21:49 +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
17bdaf6fe4 Use CurveLocation for Curve#getNearest*() methods. 2011-07-06 22:08:10 +02:00
Jürg Lehni
8b6d9746ce Rename Curve#getCrossingsFor() -> #getCrossings() 2011-07-06 22:07:34 +02:00