Commit graph

2406 commits

Author SHA1 Message Date
Jonathan Puckey
7772bfc2c9 HSLColor example: change the background color to black. 2011-07-09 16:21:02 +02:00
Jonathan Puckey
984af9c93b Use radial gradients in HSLColor example. 2011-07-09 16:19:15 +02:00
Jürg Lehni
45c7f9c4fc Port back code to prevent tangents and normals of length 0 from Scriptographer. 2011-07-09 11:20:03 +02:00
Jürg Lehni
ebd3bfc092 Introduce faster versions of Rectangle#contains() that do not perform checks. 2011-07-09 11:07:12 +02:00
Jürg Lehni
833d4968ce Change root solvers to not produce new arrays each time but fill a passed one that can be reused. Yields io impressive performance improvements. 2011-07-09 10:50:47 +02:00
Jürg Lehni
839107d341 Remove faulty code for calculation of tangents / normals. 2011-07-09 10:35:22 +02:00
Jürg Lehni
ec00150df2 Remove unused variable. 2011-07-09 10:34:18 +02:00
Jürg Lehni
4e1d613ed8 Fix Curve#getLength() again for straight lines. 2011-07-09 10:21:17 +02:00
Jürg Lehni
17b412ce6f Fix a newly introduced bug in #contains(). 2011-07-09 10:17:06 +02:00
Jürg Lehni
8a6d53766e Explain code a litter better. 2011-07-09 10:11:50 +02:00
Jürg Lehni
8928a7b057 Fix #getCrossings() where calling #getPoint() / #getTangent() was slow and also wrong when a matrix was used. 2011-07-09 10:09:41 +02:00
Jürg Lehni
8606f25542 Switch from using Function#apply() trick for passing curve values as function parameters to simply passing arrays and looking up the values on then. 2011-07-09 10:08:43 +02:00
Jürg Lehni
23f38c6e5b Fix Path#flatten(), where we don't want to add last segment again for closed paths. 2011-07-09 09:51:06 +02:00
Jürg Lehni
8e6adbc284 Fix documentation. 2011-07-09 09:28:49 +02:00
Jürg Lehni
f958b41d90 Don't filter for a type by default. 2011-07-09 09:28:36 +02:00
Jürg Lehni
74b23c1882 Use #roughBounds rather than #bounds in #contains() check. 2011-07-09 09:27:54 +02:00
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