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 |
|
Jürg Lehni
|
f98de38451
|
Correct Segment#toString()
|
2011-03-06 12:56:30 +00:00 |
|
Jürg Lehni
|
d15bf94f8f
|
Add curve evaluation methods, untested.
|
2011-03-06 12:52:13 +00:00 |
|
Jürg Lehni
|
00d58a3e61
|
Move Path#getCurveLength() to Curve#getLength() and update tests accordingly.
|
2011-03-06 12:29:17 +00:00 |
|
Jürg Lehni
|
3ca1e4a25e
|
Always update segments when index is set, as segments list might have shifted in the meantime.
|
2011-03-06 12:25:08 +00:00 |
|
Jürg Lehni
|
909b2a22ba
|
Begin implementing Path#curves list.
|
2011-03-06 12:24:15 +00:00 |
|
Jürg Lehni
|
474d79db17
|
Clean up Segment constructor and make sure internal point objects are never replaced, always updated instead.
|
2011-03-06 12:24:03 +00:00 |
|
Jürg Lehni
|
fd0d409d9e
|
More work on Path#getStrokeBounds(), unfinished.
|
2011-03-06 11:42:33 +00:00 |
|
Jürg Lehni
|
5a1d31bba7
|
Improve argument reading in PostScript drawing methods.
|
2011-03-06 11:23:21 +00:00 |
|
Jürg Lehni
|
56c10f9196
|
Fix Segment#getHandleIn/OutIfSet and a newly introduced drawing error in Path#draw.
|
2011-03-06 11:18:35 +00:00 |
|
Jürg Lehni
|
7bea7e36de
|
Make use of new Segment#getHandleIn/OutIfSet() where we can.
|
2011-03-06 11:04:41 +00:00 |
|
Jürg Lehni
|
b98abeb416
|
Declare outX, outY outside of draw loop, as it is used from previous iteration.
|
2011-03-06 11:00:25 +00:00 |
|
Jürg Lehni
|
72a1ba8e70
|
Activate beans for Segment and clean up bean / getter / setter mess for point / handleIn / handleOut.
|
2011-03-06 10:57:14 +00:00 |
|
Jürg Lehni
|
e892d4446a
|
More variable definition chaining.
|
2011-03-06 10:15:06 +00:00 |
|
Jürg Lehni
|
49e828ab9d
|
Use chained variable definitions wherever we can to save space.
|
2011-03-06 10:14:12 +00:00 |
|
Jürg Lehni
|
3a51acec88
|
Begin implementing Path#getStrokeBounds().
|
2011-03-06 10:09:37 +00:00 |
|
Jürg Lehni
|
352b3f0d40
|
More work on Bootstrap core, move Base.isArray back to Array.isArray.
|
2011-03-05 13:53:18 +00:00 |
|
Jürg Lehni
|
4908ba5edf
|
Expand shortened name.
|
2011-03-05 01:37:02 +00:00 |
|
Jürg Lehni
|
ce74516228
|
Remove more beans access, this time related to various PathStyle getters / setters.
|
2011-03-05 01:36:27 +00:00 |
|
Jürg Lehni
|
c313e702c9
|
Clean up a whole lot of beans access, and in the process of the refactoring improve canvas, context, size and bounds handling in Raster and PlacedSymbol.
|
2011-03-05 01:26:12 +00:00 |
|
Jürg Lehni
|
815e35fda6
|
Fix Segment#toString().
|
2011-03-04 23:55:49 +00:00 |
|
Jürg Lehni
|
8d5024523c
|
Add Path#first/lastSegment.
|
2011-03-04 23:33:37 +00:00 |
|
Jürg Lehni
|
7355c2d4a7
|
Switch to using Base.isArray.
|
2011-03-04 21:47:00 +00:00 |
|
Jürg Lehni
|
aa4892c0d8
|
Apply same optimisations from DOM methods in Item / Layer to Segment too.
|
2011-03-04 21:34:31 +00:00 |
|
Jürg Lehni
|
92bf51a7cc
|
Simplify the way the paper namespace is created and populated.
|
2011-03-04 13:34:31 +00:00 |
|
Jürg Lehni
|
c6d79f964c
|
Generalise all read() functions in Base.read(), fix an issue in by making sure arguments passed to initialie are never larger than length, and have Color's initialize create an RGBColor, to still be able to use Color.read().
|
2011-03-04 13:19:07 +00:00 |
|
Jonathan Puckey
|
3837ca1f14
|
Have Path#setSegments convert elements in the passed array to segments.
|
2011-03-04 13:02:11 +01:00 |
|
Jürg Lehni
|
2b6dede883
|
Clean up white-spaces and line lengths.
|
2011-03-03 22:45:17 +00:00 |
|
Jürg Lehni
|
cbe29fd02b
|
Rename Color#getCssString() to #toCssString(), to go with #toString().
|
2011-03-03 17:36:53 +00:00 |
|
Jürg Lehni
|
46a0589547
|
Use Error constructor correctly.
|
2011-03-03 17:29:40 +00:00 |
|
Jürg Lehni
|
941c3c7346
|
Declare all classes as local variables, so they can be scoped.
|
2011-03-03 13:33:41 +00:00 |
|
Jürg Lehni
|
c84df5a346
|
Use Segment.read() correctly in Path#initialize().
|
2011-03-03 13:16:14 +00:00 |
|
Jürg Lehni
|
3a46ac3b54
|
Allow read() methods to receive an optional length parameter.
|
2011-03-03 13:15:55 +00:00 |
|
Jürg Lehni
|
ecbd52cdf7
|
Fix Path.Line() constructor with 4 arguments.
|
2011-03-03 13:10:29 +00:00 |
|
Jürg Lehni
|
e089e080c2
|
Make Path#_add() handle both addition and insertion, and use it consequently so segment.path always gets correctly set.
|
2011-03-03 13:10:17 +00:00 |
|
Jürg Lehni
|
9a2462d147
|
No need to explicitely call Point#toString() in Segment#toString().
|
2011-03-03 13:03:57 +00:00 |
|
Jürg Lehni
|
d4d6d652ec
|
Rename Path#addSegment() to #_add(), to make sure it's supposed to be a private method.
|
2011-03-03 12:51:47 +00:00 |
|
Jürg Lehni
|
53b091b871
|
Rename #transformContent() to #_transform(), to make sure it's supposed to be a private method.
|
2011-03-03 12:47:55 +00:00 |
|
Jürg Lehni
|
490ef78b53
|
Fix error in CompoundPath#closePath(): Forgot to pass 'this' to getCurrentPath().
|
2011-03-03 12:26:28 +00:00 |
|
Jürg Lehni
|
1d37c7b76f
|
Use 'that' variable for private instance method.
|
2011-03-03 12:25:41 +00:00 |
|
Jürg Lehni
|
26ebe2f2c0
|
Refacture CompoundPath to only use injection scope for methods that require getCurrentPath().
|
2011-03-03 12:23:46 +00:00 |
|
Jürg Lehni
|
07fcc000cf
|
Move the new refactored CanvasDraw functionality to static Item.draw() and #draw() instance methods on each prototype.
|
2011-03-03 12:19:43 +00:00 |
|
Jürg Lehni
|
54bb4d5527
|
Merge remote-tracking branch 'origin/master'
|
2011-03-03 10:55:39 +00:00 |
|
Jürg Lehni
|
964dc462e9
|
Add comments to Path#strokeBounds and scafolding for #controlBounds too.
|
2011-03-03 10:55:35 +00:00 |
|
Jonathan Puckey
|
8ff04b6614
|
Unify canvas drawing commands in CanvasDraw.js and rework compositing code.
|
2011-03-03 02:22:21 +01:00 |
|
Jürg Lehni
|
91ec37de9c
|
Add foundations for Path#strokeBounds support.
|
2011-03-02 17:27:20 +00:00 |
|
Jürg Lehni
|
620cb2c754
|
Various clean-ups in Path.
|
2011-03-02 17:23:45 +00:00 |
|
Jürg Lehni
|
dbbefa9526
|
index on master: fd4b7b7 Include DocumentView.js in all examples and tests.
|
2011-03-02 16:22:26 +00:00 |
|
Jonathan Puckey
|
74f797a9dd
|
Clean up whitespace.
|
2011-02-28 18:30:08 +01:00 |
|
Jonathan Puckey
|
c6d606db0a
|
Path: After calling Path#add(segment), return the added segment. Add todo to Path#insert.
|
2011-02-27 15:50:41 +01:00 |
|
Jonathan Puckey
|
9496ac70bd
|
Clean up Path.RegularPolygon constructor.
|
2011-02-26 19:21:52 +01:00 |
|
Jonathan Puckey
|
eebe7e2731
|
Implement Path.RegularPolygon constructor and add tests for it.
|
2011-02-26 19:19:02 +01:00 |
|
Jürg Lehni
|
506e7c036c
|
Merge remote-tracking branch 'origin/master'
|
2011-02-26 17:27:12 +01:00 |
|
Jürg Lehni
|
6d25dbbd22
|
Add beginning of path length calculations, work in progress.
|
2011-02-26 17:26:54 +01:00 |
|
Jonathan Puckey
|
51f4ee718c
|
As in Scriptographer, we don't worry if there wasn't a moveTo before the first lineTo.
|
2011-02-26 12:44:09 +01:00 |
|
Jonathan Puckey
|
8828ed7e25
|
CompoundPath - check for this.blendMode != 'normal'.
|
2011-02-26 01:02:17 +01:00 |
|
Jonathan Puckey
|
c9d04d33f8
|
Implement BlendMode class.
|
2011-02-25 12:47:52 +01:00 |
|
Jonathan Puckey
|
4d83631230
|
Segment: remove todo.
|
2011-02-24 17:14:59 +01:00 |
|
Jonathan Puckey
|
f65625b591
|
Change CompoundPath#moveBy to be relative to the previous position in lack of an argument.
|
2011-02-24 17:13:41 +01:00 |
|
Jonathan Puckey
|
ad82be1bec
|
Add CompoundPath#bounds
|
2011-02-24 17:11:02 +01:00 |
|
Jürg Lehni
|
0d53167926
|
Simplify calculation of bezier polynomial derivative, by dividing all factors by 3.
|
2011-02-22 10:39:05 +01:00 |
|
Jürg Lehni
|
614f9998de
|
More optimisations in Path#getBounds().
|
2011-02-22 10:35:48 +01:00 |
|
Jürg Lehni
|
a08e3dc366
|
Optimise Path#getBounds() by merging internal f() and bounds() functions and thus reducing calls.
|
2011-02-22 10:33:46 +01:00 |
|
Jürg Lehni
|
452b1e2792
|
Add explanations to Path#getBounds().
|
2011-02-22 10:25:18 +01:00 |
|
Jonathan Puckey
|
b9d37e1b9b
|
Only draw a CompoundPath if it is visible.
|
2011-02-21 03:52:03 +01:00 |
|
Jonathan Puckey
|
357a8af6ec
|
Clean up white spaces.
|
2011-02-21 03:32:39 +01:00 |
|
Jonathan Puckey
|
5e271359b9
|
Add todo.
|
2011-02-21 01:16:53 +01:00 |
|
Jonathan Puckey
|
f83309d6b7
|
Optimize Path#draw.
|
2011-02-20 20:47:13 +01:00 |
|
Jürg Lehni
|
3374e50def
|
Yet another optimisation in Path#transformContent(): Only transform handles if they are not [0, 0].
|
2011-02-20 11:20:23 +01:00 |
|
Jürg Lehni
|
98837cbe98
|
Further optimise Path#transformContent() by reusing arrays and thus reducing memory footprint.
|
2011-02-20 11:15:40 +01:00 |
|
Jürg Lehni
|
c89d04dca6
|
Optimise Path#getBounds() by not relying on Point#add() but instead doing the calculations in direct math in the per-coordinate loop.
|
2011-02-20 02:05:40 +01:00 |
|
Jürg Lehni
|
6c4121db4b
|
Optimise Path#transformContent() by using Matrix#transform() version that handles arrays of multiple point values for much improved performance.
|
2011-02-20 01:55:43 +01:00 |
|
Jürg Lehni
|
ed752ed744
|
Pass ctor.dont to all constructor calls that are followed with explicit initialize() calls afterwards, to make sure it is only called once.
|
2011-02-20 01:45:53 +01:00 |
|
Jonathan Puckey
|
10623ddb62
|
Implement Gradient, GradientColor, GradientStop.
|
2011-02-19 22:50:37 +01:00 |
|
Jonathan Puckey
|
2b1dee1bd4
|
Add opacity support in Path#draw.
|
2011-02-19 17:33:23 +01:00 |
|
Jonathan Puckey
|
c2849b3692
|
Change PathStyle, CompoundPath and Path to work with new Color classes.
|
2011-02-19 17:25:16 +01:00 |
|
Jonathan Puckey
|
bd5c906047
|
Fix error in CompoundPath.
|
2011-02-19 14:12:05 +01:00 |
|
Jürg Lehni
|
b14c9ae21b
|
For the closure injection to work properly we need an iterator function that provides a scope to the referenced key value. Rely on Base.each() for this, which even in a scaled down Bootstrap will be available and not harmful, as it won't rely on modified native prototypes.
|
2011-02-17 23:34:03 +00:00 |
|
Jürg Lehni
|
bc33ae8084
|
Add missing #closePath() to both Path and CompoundPath.
|
2011-02-17 23:01:18 +00:00 |
|
Jürg Lehni
|
4c2e1ee5c9
|
Optimise and simplfy CompoundPath code, by moving scope into extend() call, and only compiling one fields object inside it that is return at the end.
|
2011-02-17 22:58:56 +00:00 |
|
Jürg Lehni
|
e6dc189310
|
Simplify injection separation by using multiple arguments to extend().
|
2011-02-17 22:46:28 +00:00 |
|
Jürg Lehni
|
5850ef3cfc
|
Seperate Path definition into two parts, one that requires scoped private functions and values, and one that does not, to keep related things closer together and save indentation space.
|
2011-02-17 20:08:37 +00:00 |
|
Jürg Lehni
|
19121c33b2
|
Simplify injection of Path constructors.
|
2011-02-17 20:04:02 +00:00 |
|
Jonathan Puckey
|
deb1699f13
|
Tidy up code.
|
2011-02-17 16:00:03 +01:00 |
|
Jonathan Puckey
|
36de01a6ae
|
Move Path Constructors into seperate file.
|
2011-02-17 15:55:26 +01:00 |
|
Jonathan Puckey
|
1953c17f41
|
CompoundPath: move getCurrentPath into the outer scope and implement smooth and simplify.
|
2011-02-17 14:33:25 +01:00 |
|
Jonathan Puckey
|
0c1f29ce29
|
Implement CompoundPath and move most of PathItem into Path.
|
2011-02-17 13:36:40 +01:00 |
|
Jürg Lehni
|
9d1458e6ae
|
Rely on new Array.isArray() now for array checks.
|
2011-02-15 23:15:13 +00:00 |
|
Jürg Lehni
|
b8816a07f5
|
Reformat to fit 80 chars boundary.
|
2011-02-15 23:10:48 +00:00 |
|
Jürg Lehni
|
3d64b017c5
|
Remove comment about having Point.read() return consumed arguments indices, as after analysing the situation it seem too complex to imeplement easly: Point.read internally relies on Point#initialize for all the heavy lifting, and this would have to report back how many indices were consumed somehow...
|
2011-02-15 22:56:53 +00:00 |
|
Jürg Lehni
|
a154819350
|
Switch to using indexOf() in Segment#index for now.
|
2011-02-14 10:35:40 +00:00 |
|
Jürg Lehni
|
91e8a3b652
|
Update Bootstrap to fix issues with beans (requiring definition of setter when getter is redefined in sub-class), and remove setBounds in PathItem that was introduced for that reason.
|
2011-02-14 10:28:27 +00:00 |
|
Jürg Lehni
|
a6e9ee56d4
|
Cleanup Path constructors by using simple constructor functions instead of Base.extend() classes, use Path.Oval for Path.Circle and optimise Path.Oval through ovalSegments array with real segments (no use to call Segment.read each time).
|
2011-02-14 02:05:54 +00:00 |
|
Jürg Lehni
|
ed55dc39fb
|
Fix PathItem constructor by no redefining arguments variable that results in arguments array changing as well on some browsers.
|
2011-02-14 01:47:56 +00:00 |
|
Jürg Lehni
|
38f4dd353d
|
Make Item#bounds setter work for PathItem, and add two TODO comments about Bootstrap shortcommings that cause it to break.
|
2011-02-14 01:24:22 +00:00 |
|
Jürg Lehni
|
3af5d549f6
|
Add comments about possible optimisations in PathItem#transformContent().
|
2011-02-14 01:14:03 +00:00 |
|
Jürg Lehni
|
ee8c30b518
|
Implement Matrix, Item#position, Item#bounds (setter too), Item#transform(), Item#scale(), Item#rotate(), Item#transalte() and Item#shear(). Some of it work in progress.
|
2011-02-14 01:05:16 +00:00 |
|
Jürg Lehni
|
420ffaa7ea
|
No need to check for existance of handleIn/Out, as they are always defined.
|
2011-02-13 18:56:06 +00:00 |
|
Jürg Lehni
|
eeb7d377e6
|
Add optional index argument to static read() functions, so points, rectangle, sizes and segments can be read from any index in the arguments array.
|
2011-02-13 18:15:55 +00:00 |
|
Jürg Lehni
|
08d4826441
|
Reformating code to follow Scriptotgrapher coding conventions.
|
2011-02-13 16:26:24 +00:00 |
|
Jürg Lehni
|
0ac19a8e82
|
Optimise read() functions to only convert if argument is not of desired type already.
|
2011-02-13 16:05:19 +00:00 |
|
Jürg Lehni
|
d67055b09b
|
Add documentation to PathItem#bounds.
|
2011-02-13 15:59:22 +00:00 |
|
Jürg Lehni
|
515439c4df
|
Optimize PathItem#bounds by using less coordinate lookups.
|
2011-02-13 15:55:43 +00:00 |
|
Jürg Lehni
|
71d1ff3cb3
|
Make PathItem#getBounds() work for closed paths too.
|
2011-02-13 15:51:54 +00:00 |
|
Jürg Lehni
|
d59d514a55
|
Fix bug in PathItem#bounds (wrongly used variable name twice), now works properly for open paths.
|
2011-02-13 15:49:36 +00:00 |
|
Jürg Lehni
|
e08359f49d
|
Beginning of PathItem#bounds and tests to go along with it, not functional yet.
|
2011-02-13 15:40:30 +00:00 |
|
Jürg Lehni
|
a30e4057e3
|
Fix PathItem constructor to support passing of segments both as array and arguments.
|
2011-02-13 15:39:24 +00:00 |
|
Jürg Lehni
|
771d9d0efe
|
Fix a couple of bugs in shape drawing code, and switch to consistently use this.currentSegment rather than this._segments[this._segments.length - 1], to use the internal check for a starting point.
|
2011-02-13 15:12:25 +00:00 |
|
Jürg Lehni
|
a579b8bd3d
|
Make sure Segment#handleIn and #handleOut are always defined, even when not provided, and change compareSegments() to also reflect this change by relying on Segment.read for conversion of comparison values.
|
2011-02-13 15:09:24 +00:00 |
|
Jürg Lehni
|
4b2341b3c2
|
Add gettter/setters for Path#segments, and fix bug in Segment#previous.
|
2011-02-13 13:52:51 +00:00 |
|
Jonathan Puckey
|
c1d2cab5d9
|
Segment.js: fix toString and remove methods. Add test for segment.remove().
|
2011-02-12 19:10:19 +01:00 |
|
Jonathan Puckey
|
9b5e18c795
|
PathItem: replace this.segments.push(segment) to this.addSegment(segment)
|
2011-02-12 19:08:34 +01:00 |
|
Jonathan Puckey
|
c0e2101c32
|
Clean up src directory and move Bootstrap.js into lib.
|
2011-02-12 17:59:39 +01:00 |
|