Jürg Lehni
|
252a3635dc
|
Replace {@true} tags in documentation ({@true ([^}]*)} -> true $1, false otherwise.)
|
2011-05-15 15:06:10 +01:00 |
|
Jürg Lehni
|
c91cbe2175
|
Merge remote-tracking branch 'origin/master'
|
2011-05-15 14:37:34 +01:00 |
|
Jürg Lehni
|
057b71ff4c
|
Don't overuse variable chaining - use only were readibility does not suffer.
|
2011-05-15 14:29:00 +01:00 |
|
Jonathan Puckey
|
1a82ef4a34
|
Merge remote branch 'origin/master'
|
2011-05-15 14:09:57 +02:00 |
|
Jürg Lehni
|
51dbd85db5
|
Add experimental orientation detection for Paths.
|
2011-05-15 11:33:09 +01:00 |
|
Jonathan Puckey
|
42ae3ce42e
|
CompoundPath#draw: set param.compound to false when done drawing.
|
2011-05-14 20:36:58 +02:00 |
|
Jürg Lehni
|
0bab694a01
|
Rename Item#children to private Item#_children and add #getChildren getter.
|
2011-05-14 18:07:10 +01:00 |
|
Jonathan Puckey
|
2bfe42da05
|
Have the CompoundPath constructor reverse the segments of all paths passed to it except for the first one. Introduce 'keepDirection' option to allow importing of already existing CompoundPath items.
|
2011-05-14 13:03:18 +02:00 |
|
Jonathan Puckey
|
032d19b0d2
|
Fix bug in CompoundPath where toCssString was being called instead of getCanvasStyle, resulting in problems when gradients were used.
|
2011-05-12 15:30:56 +02:00 |
|
Jonathan Puckey
|
bbccb25184
|
Transform gradient when path is transformed.
|
2011-05-08 14:05:47 +01:00 |
|
Jürg Lehni
|
2f4f003873
|
Have Base.read() clone owned objects such as SegmentPoint or LinkedPoint.
|
2011-05-08 13:38:09 +01:00 |
|
Jürg Lehni
|
327515a9de
|
Add missing header.
|
2011-05-08 09:59:37 +01:00 |
|
Jürg Lehni
|
70d0dd9c0c
|
Move #moveTo() to the same scope as the other drawing commands, and add explaining comments.
|
2011-05-07 17:11:06 +01:00 |
|
Jürg Lehni
|
979bda52ab
|
We don't need the empty #initialize().
|
2011-05-07 17:05:42 +01:00 |
|
Jürg Lehni
|
8c7b253bc2
|
Add Base.splice() to handle lists of items with _index referneces and use it for paper.documents and Item#children.
|
2011-05-07 16:11:05 +01:00 |
|
Jürg Lehni
|
b44e796475
|
Make sure getters dont return undefined but null instead.
|
2011-05-07 16:10:38 +01:00 |
|
Jürg Lehni
|
81c1b2dcce
|
Clean up Path#_add() a bit.
|
2011-05-07 15:38:36 +01:00 |
|
Jürg Lehni
|
59e2783979
|
Use tripple equal operators for string compares now.
|
2011-05-07 14:32:27 +01:00 |
|
Jürg Lehni
|
4e6e855461
|
Change '// TODO: Port' comments to '// PORT:'.
|
2011-05-07 14:18:27 +01:00 |
|
Jürg Lehni
|
dabc2b97ed
|
Implement change-notification in a proper way, using ChangeFlags that tell it what exactly has changed, and clearing caches accordingly.
|
2011-05-07 13:39:17 +01:00 |
|
Jürg Lehni
|
53cc1cd908
|
Apply #position optimisation through caching to all items, not just PlacedSymbol.
|
2011-05-07 13:13:19 +01:00 |
|
Jürg Lehni
|
6af787e475
|
Move access to Numerical.TOLERANCE out of the injection scope into getBounds(), so util files can be included at the end of the library again.
|
2011-05-07 11:23:46 +01:00 |
|
Jürg Lehni
|
0fc7216f1c
|
Fix typos introduced in recent commit.
|
2011-05-06 13:40:43 +01:00 |
|
Jürg Lehni
|
c36db3a55c
|
Introduce private faster Matrix#_transform* methods that lack arguments checks, and use them internally.
|
2011-05-06 13:28:35 +01:00 |
|
Jürg Lehni
|
aed1bb0878
|
Use Numerical.TOLERANCE instead of hardcoded one.
|
2011-05-06 12:06:05 +01:00 |
|
Jürg Lehni
|
66602c9cec
|
Remove comment about necessity to reverse coordinate system.
|
2011-05-06 01:27:47 +01:00 |
|
Jürg Lehni
|
0b082289a6
|
Simplify Path#arcTo() a lot (get rid of necessity to reverse coordinate system in y-direction, etc).
|
2011-05-06 01:26:23 +01:00 |
|
Jürg Lehni
|
18ef19649c
|
Remove comment about unnecessary change.
|
2011-05-06 00:45:46 +01:00 |
|
Jürg Lehni
|
680ae49ec8
|
Clean up code a bit and add comment about possible further optimsiations.
|
2011-05-06 00:44:54 +01:00 |
|
Jürg Lehni
|
a3065a59d1
|
Simplify Path#arcTo().
|
2011-05-06 00:42:10 +01:00 |
|
Jürg Lehni
|
a4b37a6278
|
Simplify addJoin().
|
2011-05-06 00:39:44 +01:00 |
|
Jürg Lehni
|
a3da96e8be
|
Remove notify parameter again from _add().
|
2011-05-06 00:18:56 +01:00 |
|
Jürg Lehni
|
20cf32d599
|
Resolve question about wether last segment should be included in join or not.
|
2011-05-06 00:14:09 +01:00 |
|
Jürg Lehni
|
93fe0216d2
|
Add Path#addSegment(s) and #insertSegment(s) and define #add() and #insert() as a switch between these versions based on the amount and nature of parameters.
|
2011-05-05 12:35:14 +01:00 |
|
Jürg Lehni
|
7894a48ace
|
Add parameter to Path#_add() that controls wether path is notified of change.
|
2011-05-05 11:40:46 +01:00 |
|
Jürg Lehni
|
ee6d593620
|
Cache strokeBounds and bounds only if no transformation matrix is passed.
|
2011-05-05 11:21:09 +01:00 |
|
Jürg Lehni
|
1279e820aa
|
Use arc() instead of rect() to draw handles.
|
2011-05-05 11:01:20 +01: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 |
|
Jürg Lehni
|
a5099fd51d
|
Add support for insertion of multiple segments at once to Path#_add(), #add() and #insert(), and change code that relies on these methods.
|
2011-05-04 18:42:40 +01:00 |
|
Jürg Lehni
|
728bf0441c
|
Clean up Path#moveTo() and #lineTo() commands.
|
2011-05-03 09:12:07 +01:00 |
|
Jürg Lehni
|
52a73e86ce
|
Clean up code (for() -> for ()).
|
2011-05-03 08:54:13 +01:00 |
|
Jürg Lehni
|
3af24e6178
|
Replace hidden getter call with direct access of internal property.
|
2011-05-03 08:47:52 +01:00 |
|
Jürg Lehni
|
a0e211c691
|
Big refactoring of how curves are kept in sync with segments (direct references rather than indices), along with various tests.
|
2011-05-03 00:25:23 +01:00 |
|
Jonathan Puckey
|
2ee7081c14
|
Merge remote branch 'origin/master'
|
2011-05-02 12:25:32 +02:00 |
|
Jonathan Puckey
|
41120cf4d9
|
Various small code cleanups.
|
2011-05-02 12:23:42 +02:00 |
|
Jürg Lehni
|
98ab342235
|
Shorten #_transformCoordinates() a bit.
|
2011-05-02 08:59:51 +01:00 |
|
Jürg Lehni
|
26b70309a8
|
Improve various #toString() functions.
|
2011-05-02 08:57:55 +01:00 |
|
Jürg Lehni
|
0a4150a5c9
|
Add beginning of value caching (_length, _bounds) and change tracking to invalidate cached values.
|
2011-05-02 00:17:21 +01:00 |
|
Jürg Lehni
|
2cdb15f2d6
|
Fix recently renamed functions in commented out code.
|
2011-05-01 23:29:15 +01:00 |
|
Jürg Lehni
|
b0282b9bd4
|
Change Segment to be aware of its index in the segment list and have the curves list update automatically on each change to segments.
|
2011-05-01 13:27:53 +01: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
|
6bbfd55240
|
Clean up Path#setSegments and begin moving of logic to keep Path#curves in sync away from Path#getCurves() to Path#setClosed(). Requires more work, e.g. Path#_add().
|
2011-04-30 23:44:37 +01:00 |
|
Jürg Lehni
|
6cca355e20
|
Add Curve.create() as faster internal constructor.
|
2011-04-30 23:29:10 +01:00 |
|
Jürg Lehni
|
053fb2d955
|
Move Path#get/setSegments back to top and remove test-code for array object extension.
|
2011-04-30 23:24:39 +01:00 |
|
Jürg Lehni
|
781b315808
|
Add getter/setter for Path#closed.
|
2011-04-30 23:22:29 +01:00 |
|
Jürg Lehni
|
bf3bd13540
|
Simplify Path#cubicCurveTo().
|
2011-04-30 23:17:19 +01:00 |
|
Jürg Lehni
|
6d84dc3351
|
Segment#isSelected() only checks for selection state of point. We need to check _selectionState instead to mirror behaviour in #_setSelected().
|
2011-04-28 19:04:00 +01:00 |
|
Jürg Lehni
|
d098c6e8b2
|
Fix index issue in #removeSegments().
|
2011-04-28 19:03:05 +01:00 |
|
Jürg Lehni
|
121ec5a93f
|
Allow #removeSegments() to be called without arguments, in which case all segments are removed.
|
2011-04-28 19:02:34 +01:00 |
|
Jürg Lehni
|
ea510c2403
|
Separate Path#remove(), #remove(index) & #remove(from, to) into #removeSegment(index) and #removeSegments(from, to).
|
2011-04-28 15:42:16 +01:00 |
|
Jürg Lehni
|
4d999d57e2
|
Replace all type converting string compares with ===, !==.
|
2011-04-28 13:23:17 +01:00 |
|
Jürg Lehni
|
115ef45464
|
Remove unnecessary .0 since numbers are all the same in JavaScript.
|
2011-04-28 13:13:33 +01:00 |
|
Jürg Lehni
|
0d697403b5
|
Clean up Path#curveTo() code.
|
2011-04-28 13:12:21 +01:00 |
|
Jürg Lehni
|
f69153844b
|
Make #setContextStyles() a 'protected' function.
|
2011-04-28 13:04:12 +01:00 |
|
Jürg Lehni
|
a9ea10ca7f
|
Move version of #getBounds() that handles children to Item, to eliminate duplicated code.
|
2011-04-28 10:04:36 +01:00 |
|
Jürg Lehni
|
6a483fa8be
|
Rename CurveLocation related functions to *At(offset), and add optional isParameter argument that defines whether offset is a length or a description of curve index / curve parameter.
|
2011-04-27 21:40:52 +01:00 |
|
Jürg Lehni
|
ea6cf24aae
|
Rename length parameter to more appropriate offset, to reflect recent name changes.
|
2011-04-27 21:23:57 +01:00 |
|
Jürg Lehni
|
3501e14c51
|
Remove comment about pending port that has been backported to Scriptographer.
|
2011-04-27 21:13:32 +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
|
b0a1f4b1a9
|
Add missing Path#getPoint(length).
|
2011-04-27 19:28:39 +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
|
ebc9bc88c4
|
Use 0 instead of null for empty bit flag fields.
|
2011-04-27 19:11:22 +01:00 |
|
Jürg Lehni
|
c6d96784ba
|
Further simplify and compress code.
|
2011-04-27 18:16:32 +01:00 |
|
Jürg Lehni
|
f71967f3d3
|
Further simplify and compress code.
|
2011-04-27 17:57:56 +01:00 |
|
Jürg Lehni
|
6b6f27cb6e
|
Add TODOs about not returning -1 for undefined.
|
2011-04-27 17:53:59 +01:00 |
|
Jürg Lehni
|
4bfc56bb6d
|
Simplify and compress code a bit.
|
2011-04-27 17:53:23 +01:00 |
|
Jonathan Puckey
|
81a15379e5
|
Have Path#reverse also reverse the segment handles.
|
2011-04-27 15:49:06 +02:00 |
|
Jürg Lehni
|
ae3ec6f2d7
|
Remove comment about pending port that has been backported to Scriptographer.
|
2011-04-27 12:36:04 +01:00 |
|
Jürg Lehni
|
9671ac6dbc
|
Remove comment about pending port that has been backported to Scriptographer.
|
2011-04-27 12:30:17 +01:00 |
|
Jürg Lehni
|
e6a0f48256
|
Further clean-up code, as we only need previous / next references inside one sub-condition.
|
2011-04-27 12:26:10 +01:00 |
|
Jürg Lehni
|
138ec7d93c
|
No need to perform cyclic looping here now, since #getNext/Previous() does that for us.
|
2011-04-27 12:24:04 +01:00 |
|
Jürg Lehni
|
a251a24347
|
Add some TODOs to check.
|
2011-04-27 12:21:47 +01:00 |
|
Jürg Lehni
|
0e89466a11
|
Add cyclic looping to Segment#previous/next for closed paths.
|
2011-04-27 12:21:31 +01:00 |
|
Jürg Lehni
|
92369bf14f
|
Seperate the private Segment#is/setSelected(point) methods from the newly added getter / setter.
|
2011-04-27 12:15:51 +01:00 |
|
Jürg Lehni
|
6204eef643
|
Remove comment about pending port that has been backported to Scriptographer.
|
2011-04-27 12:08:13 +01:00 |
|
Jürg Lehni
|
776edda51d
|
Cleaned-up Segment#is/setSelected() code a bit.
|
2011-04-27 12:06:44 +01:00 |
|
Jürg Lehni
|
cd2347aa9b
|
Remove comment about pending port that has been backported to Scriptographer.
|
2011-04-27 11:24:13 +01:00 |
|
Jürg Lehni
|
41eb09f15f
|
Add forgotten brackets in Curve#isSelected() and remove comments about backporting as it is ported now.
|
2011-04-27 10:52:56 +01:00 |
|
Jürg Lehni
|
1c9cd9ace4
|
Clean up code in #setContextStyles().
|
2011-04-27 09:53:53 +01:00 |
|
Jürg Lehni
|
b7a4277143
|
Add comment about _x / _y properties and clean up code a bit.
|
2011-04-26 17:57:12 +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 |
|
Jürg Lehni
|
c4ede92e81
|
Fix error in Path#getLastCurve().
|
2011-04-26 17:48:36 +01:00 |
|
Jürg Lehni
|
77ad25ffba
|
Clean up port comments.
|
2011-04-26 17:47:30 +01:00 |
|
Jürg Lehni
|
ac5dca4fc0
|
Update various comments about TODOs.
|
2011-04-26 17:04:15 +01:00 |
|
Jürg Lehni
|
bdfe35d93a
|
Consistently name local context variables 'ctx', to save line size and acknowledge the fact that Canvas contexts have a funny API design.
|
2011-04-26 15:39:16 +01:00 |
|
Jürg Lehni
|
a20f988511
|
Minor code cleanup.
|
2011-04-26 12:55:20 +01:00 |
|
Jürg Lehni
|
9d2459d799
|
Rename '// Todo' to '// TODO', which is the convention.
|
2011-04-26 12:39:48 +01:00 |
|
Jürg Lehni
|
e8a2a786e0
|
Fix Curve#getParameter() for straight lines.
|
2011-04-26 12:30:58 +01:00 |
|
Jürg Lehni
|
6609dc2307
|
Implement new root finding algorithm, combining Newton-Raphson Method with Bisection, and update Curve#getParameter() to use it.
|
2011-04-26 12:23:09 +01:00 |
|
Jonathan Puckey
|
5e6630a1f3
|
Speed up drawHandle function.
|
2011-04-23 15:56:27 +02:00 |
|
Jonathan Puckey
|
538f360a6b
|
Fix Document#getSelectedItems & Path#setSegments.
|
2011-04-22 12:30:38 +02:00 |
|
Jonathan Puckey
|
4d89d6c235
|
Path#setSegments: reset _selectedSegmentCount when setting a new segment list.
|
2011-04-22 11:39:12 +02:00 |
|
Jonathan Puckey
|
11063af8df
|
CompoundPath cleanups.
|
2011-04-21 21:12:48 +02:00 |
|
Jonathan Puckey
|
1ea0a811b5
|
Use internal variables in CompoundPath#moveBy and Segment#isSelected.
|
2011-04-21 21:06:35 +02:00 |
|
Jonathan Puckey
|
af0543dac8
|
Some cleanups in Path.
|
2011-04-21 21:01:31 +02:00 |
|
Jonathan Puckey
|
dfb5cbc5eb
|
Fix two bugs in the selected items code.
|
2011-04-21 20:52:28 +02:00 |
|
Jonathan Puckey
|
be8ee90f75
|
Document: use a hash for Document#_selectedItems to speed up adding to and removing from it.
|
2011-04-21 20:43:42 +02:00 |
|
Jonathan Puckey
|
745f002cd3
|
Segment: add todo.
|
2011-04-21 20:00:11 +02:00 |
|
Jonathan Puckey
|
abb0878a25
|
Curve: Implement selection of curves.
|
2011-04-21 19:54:32 +02:00 |
|
Jonathan Puckey
|
cf541901dd
|
Rename getSelected methods to isSelected.
|
2011-04-21 19:51:49 +02:00 |
|
Jonathan Puckey
|
d831d66758
|
Implement SelectionState.js: bitwise flags for segment selection state.
|
2011-04-21 19:37:51 +02:00 |
|
Jonathan Puckey
|
7867a46c35
|
Path#setSelected: do XOR correctly.
|
2011-04-21 18:45:36 +02:00 |
|
Jonathan Puckey
|
cf2faa14e3
|
Path#join: use internal variables.
|
2011-04-21 18:43:22 +02:00 |
|
Jonathan Puckey
|
73b97dbfba
|
Implement segment point selection.
|
2011-04-21 18:06:06 +02:00 |
|
Jonathan Puckey
|
732caec7bf
|
Speed up drawing of selected items.
|
2011-04-21 15:48:21 +02:00 |
|
Jonathan Puckey
|
b2cd8cdec2
|
Path: use the internal SegmentPoint#_x and #_y properties where possible.
|
2011-04-21 15:25:25 +02:00 |
|
Jürg Lehni
|
985aa5aff8
|
Directly access internal _x and _y properties on internal SegmentPoints, to avoid callling getters.
|
2011-04-21 13:33:12 +01:00 |
|
Jürg Lehni
|
96f266b4d2
|
Add beginning of SegmentPoint class.
|
2011-04-21 13:21:56 +01:00 |
|
Jonathan Puckey
|
be9f312110
|
Implement a first version of drawing path selection.
|
2011-04-17 18:46:35 +02:00 |
|
Jonathan Puckey
|
74cee4abef
|
Implement Path#remove() and add tests for it.
|
2011-04-13 16:16:32 +02:00 |
|
Jonathan Puckey
|
6d4d07f2a8
|
Path.Constructors: simply Path.Star constructor.
|
2011-04-13 00:05:46 +02:00 |
|
Jonathan Puckey
|
0d4517c77f
|
Path: add todos for missing functions.
|
2011-04-12 14:36:02 +02:00 |
|
Jonathan Puckey
|
60dca8c2e8
|
Path#cubicCurveTo: convert arguments to points first.
|
2011-04-12 14:35:42 +02:00 |
|
Jonathan Puckey
|
91d8dd1187
|
Path: add todos for missing functions.
|
2011-04-12 14:28:18 +02:00 |
|
Jonathan Puckey
|
491250ef14
|
Simplify Path.Star constructor.
|
2011-04-12 14:20:56 +02:00 |
|
Jonathan Puckey
|
12de77eb42
|
Path.Constructors: implement Path.Star and add tests.
|
2011-04-12 14:18:00 +02:00 |
|
Jonathan Puckey
|
2a9bbd3dee
|
Fix Path#closePath & CompoundPath#closePath.
|
2011-04-11 23:33:08 +02:00 |
|
Jonathan Puckey
|
499c421021
|
Implement Path#join(path) and add tests for it.
|
2011-04-11 23:30:08 +02: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
|
b46c6d0a29
|
Curve: implement getLocation(length), getLength(location), getTangent(length), getNormal(length)
|
2011-04-11 19:32:19 +02:00 |
|
Jonathan Puckey
|
d396f48c4b
|
Implement CurveLocation.
|
2011-04-11 19:32:04 +02:00 |
|
Jürg Lehni
|
08d0499251
|
Change comment.
|
2011-03-25 19:58:20 +02:00 |
|
Jürg Lehni
|
e83195bb8f
|
Add #first/lastCurve getters.
|
2011-03-25 19:58:02 +02:00 |
|
Jürg Lehni
|
b5fdecf3d1
|
Rename ObservedRectangle to LinkedRectangle, ObservedPoint to LinkedPoint, and add more comments about what it is they are doing.
|
2011-03-22 17:27:46 +00:00 |
|
Jürg Lehni
|
417d015eab
|
Improve curve time parametrization precision by iteratively adding up sub-range lengths, and optimise speed by determining integration precision based on range size.
|
2011-03-20 11:38:06 +00:00 |
|
Jürg Lehni
|
11e70c5069
|
Use fast Newton-Raphson Method for now.
|
2011-03-20 02:02:02 +00:00 |
|
Jürg Lehni
|
02328287cb
|
Use n=16 evaluations in integrations for now.
|
2011-03-20 02:00:15 +00:00 |
|
Jürg Lehni
|
ad71293983
|
Remove Van Wijngaarden–Dekker–Brent method again as it led to imprecise results, and experiment with the very fast Newton-Raphson method (keeping False Position as a possible fallback for now).
|
2011-03-20 00:04:33 +00:00 |
|
Jürg Lehni
|
2c9d168224
|
Clean up and improve Path drawing commands.
|
2011-03-19 23:09:17 +00:00 |
|
Jürg Lehni
|
1267f41559
|
Add beginning of ObservedRectangle support and test it in animatedStar example.
|
2011-03-16 23:32:46 +01:00 |
|
Jürg Lehni
|
c284b0837e
|
Fix tiny error in Path#smooth()
|
2011-03-14 16:18:12 +01:00 |
|
Jürg Lehni
|
9d4af0ce9e
|
Clean up recently caused Base.read() mess by introducing _readNull property,m setting it to true on Color and reverting to previous behavior for Point, Size and Rectangle, where dimensions of 0 are read by default if nothing is provided.
|
2011-03-13 18:31:00 +01:00 |
|
Jürg Lehni
|
526e2ea0ba
|
Hide Curve#getLength() parameters from Bootstrap so it injects bean too.
|
2011-03-08 17:31:36 +00:00 |
|
Jürg Lehni
|
195b089424
|
Clean up Path.* constructors and make sure they handle Base.read() returning null.
|
2011-03-08 17:20:30 +00:00 |
|
Jürg Lehni
|
484b2b0c94
|
Test code for Path#segments change observation.
|
2011-03-08 17:20:03 +00:00 |
|
Jürg Lehni
|
3927836441
|
Declare functions that work both as getters for beans and also as callalble functions with optional parameters differently, since they do not inject beans anymore if they declare parameters.
|
2011-03-08 17:19:02 +00:00 |
|
Jürg Lehni
|
74167ff28d
|
Add test code for segments list that detects change.
|
2011-03-08 13:19:08 +00:00 |
|
Jürg Lehni
|
fc0d3efd29
|
Simplify Path constructor further.
|
2011-03-08 13:03:57 +00:00 |
|
Jürg Lehni
|
e35fb1efb6
|
Move populating of segments list to Path#setSegments() and rely on it in constructor.
|
2011-03-08 13:03:11 +00:00 |
|
Jürg Lehni
|
848befe103
|
No need to create a new segments array in setSegments, just set length of existing one instead.
|
2011-03-08 13:00:32 +00:00 |
|
Jürg Lehni
|
6a67052090
|
Update copyright / licensing comments.
|
2011-03-08 01:41:50 +00:00 |
|
Jürg Lehni
|
c4c5b070b5
|
Minor code clean-up.
|
2011-03-07 16:51:12 +00:00 |
|
Jürg Lehni
|
59cb7e937e
|
Add control over maximum iterations to Numerical.findRoot().
|
2011-03-07 11:59:43 +00:00 |
|
Jürg Lehni
|
d9b8809f3c
|
Further clean up getParameter() code.
|
2011-03-07 11:58:41 +00:00 |
|
Jürg Lehni
|
7956b50886
|
Use === for undefined comparisons.
|
2011-03-07 11:52:04 +00:00 |
|
Jürg Lehni
|
1e8dffac08
|
Clean up getParameter() code.
|
2011-03-07 11:51:01 +00:00 |
|
Jürg Lehni
|
0ddfc9ef33
|
Add support for sub ranges and negatives lengths in Curve#getParameter(), a prerequirement for adding dash support.
|
2011-03-07 11:37:42 +00:00 |
|
Jürg Lehni
|
2ac9a13e2a
|
Give Numerical methods more meaningful names.
|
2011-03-07 11:12:00 +00:00 |
|
Jürg Lehni
|
08545983d7
|
Minor clean-ups.
|
2011-03-07 02:38:07 +00:00 |
|
Jürg Lehni
|
4dd4072f6b
|
Use push() instead fo concat() for better getParameter() performance.
|
2011-03-07 02:35:06 +00:00 |
|
Jürg Lehni
|
3d7e66053c
|
Simplify getLength() for line ranges.
|
2011-03-07 02:33:36 +00:00 |
|
Jürg Lehni
|
172212c222
|
Clean-up code and comments.
|
2011-03-07 02:28:49 +00:00 |
|
Jürg Lehni
|
add0bcf1fd
|
Yet more optimisations in getParameter(), both for straight lines and curves.
|
2011-03-07 02:26:59 +00:00 |
|
Jürg Lehni
|
0e8c346888
|
Further optimise getParameter() / getLength() code by reusing a integrand function and taking advantage of integral ranges.
|
2011-03-07 02:22:33 +00:00 |
|
Jürg Lehni
|
3447d11a6f
|
Some minor clean-ups.
|
2011-03-07 01:40:18 +00:00 |
|
Jürg Lehni
|
027a5e67b9
|
Add getLength() optimisation for straight lines.
|
2011-03-07 01:37:18 +00:00 |
|
Jürg Lehni
|
f7f5a70b1c
|
Fix recently newly introduced bug in getStrokeBounds().
|
2011-03-07 01:30:45 +00:00 |
|
Jürg Lehni
|
e1a7aff2f0
|
Add copyright notice and license file.
|
2011-03-07 00:50:44 +00:00 |
|
Jürg Lehni
|
0bfca81140
|
Clean-up getBounds() code and move to its own scope at the end of Path.
|
2011-03-07 00:36:44 +00:00 |
|
Jürg Lehni
|
9fdbd0146d
|
Rename MathUtils to Numerical.
|
2011-03-07 00:21:04 +00:00 |
|
Jürg Lehni
|
58f5c8554e
|
Add comments about initial guess.
|
2011-03-07 00:17:43 +00:00 |
|
Jürg Lehni
|
65900f8790
|
Implement Curve#getParameter() using MathUtils.brent(), with the astonishing result that performance can match the Java side on Chrome!
|
2011-03-07 00:00:45 +00:00 |
|
Jürg Lehni
|
29e57cc521
|
Replace slow simpson() method with insanely fast Gauss-Legendre Numerical Integration by Jim Armstrong which was further optimised.
|
2011-03-06 23:24:33 +00:00 |
|
Jürg Lehni
|
c4ad95b0ac
|
More variable chaining...
|
2011-03-06 22:06:24 +00:00 |
|
Jürg Lehni
|
4c13ca6961
|
Fix syntax errors (that magically work on Safari).
|
2011-03-06 22:06:06 +00:00 |
|
Jürg Lehni
|
87981efeb5
|
Massive refactoring of transform() / getBounds() code: getBounds() / getStrokeBounds() now supports an optional Matrix parameter which is used to on the fly transform all coordinates and stroke definitions before bounds are calculated. This even supports the correct determination of rotated ellipse bounds for round strokes in symbols.
|
2011-03-06 21:26:38 +00:00 |
|
Jürg Lehni
|
6def2b9d3a
|
Clean-up Path#arcTo() code.
|
2011-03-06 21:13:55 +00:00 |
|
Jürg Lehni
|
90b94a8d83
|
Various simplificiations and clean-ups in Path constructors.
|
2011-03-06 18:46:28 +00:00 |
|
Jürg Lehni
|
deb78b78cf
|
Define fast Rectangle.create() and use it internally where applicable.
|
2011-03-06 18:45:56 +00:00 |
|
Jürg Lehni
|
4070f98374
|
Clean up calculateBounds().
|
2011-03-06 18:33:52 +00:00 |
|
Jürg Lehni
|
836da3ce47
|
Make getCurrentSegment() a real private.
|
2011-03-06 15:21:12 +00:00 |
|
Jürg Lehni
|
dfb11610e7
|
Define getCurrentSegment() as private and make sure it's not used as a bean.
|
2011-03-06 15:17:06 +00:00 |
|
Jürg Lehni
|
e533b4edbb
|
Move PostScript commands to the end of Path definition in its own injection block.
|
2011-03-06 15:15:13 +00:00 |
|
Jürg Lehni
|
f803e1ad1d
|
Remove obsolete comment.
|
2011-03-06 15:14:57 +00:00 |
|
Jürg Lehni
|
501e42fb9d
|
Add Path#getLength().
|
2011-03-06 14:58:10 +00:00 |
|
Jürg Lehni
|
8b32aa9f09
|
Reactivate commented out code in addBevelJoin(), since it is required in some situations.
|
2011-03-06 14:51:46 +00:00 |
|
Jürg Lehni
|
2df6dc989a
|
Add comments about changes that need backporting to Scriptographer.
|
2011-03-06 14:45:44 +00:00 |
|
Jürg Lehni
|
f6a8de8cc6
|
Finish work on miter caps for Path#getStrokeBounds.
|
2011-03-06 14:45:32 +00:00 |
|
Jürg Lehni
|
5507482d8f
|
Add support for bevel joins to Path#getStrokeBounds, miter still pending.
|
2011-03-06 13:26:36 +00:00 |
|
Jürg Lehni
|
407b6d8d33
|
Add Curve#getPrevious / Next.
|
2011-03-06 13:26:09 +00:00 |
|
Jürg Lehni
|
de9a406dc0
|
Add support for all strokeCaps in getStrokeBounds, joins are still pending.
|
2011-03-06 13:11:25 +00:00 |
|
Jürg Lehni
|
15f124bd9c
|
Link segments to their curves through Segment#getCurve().
|
2011-03-06 13:11:04 +00:00 |
|
Jürg Lehni
|
eb09ec2442
|
Fix error in Curve evaluation.
|
2011-03-06 13:07:49 +00:00 |
|
Jürg Lehni
|
e19c3bf3c2
|
Define Curve#toString() and Curve#clone()
|
2011-03-06 12:56:47 +00:00 |
|