Jonathan Puckey
|
9e6fd5a7e7
|
Speed up CanvasProvider.
|
2011-02-26 15:29:51 +01:00 |
|
Jonathan Puckey
|
1a6c5c8c6f
|
Doc: Change comment about using canvas.width = canvas.width instead of context.clearRect.
|
2011-02-26 14:38:50 +01:00 |
|
Jonathan Puckey
|
422b8911b8
|
Fix PlacedSymbol#transformContent.
|
2011-02-26 13:33:13 +01:00 |
|
Jonathan Puckey
|
22bccf3a31
|
Tool: Fix issue with onMouseMove being called while the user is dragging the mouse.
|
2011-02-26 13:00:55 +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
|
71bf8dba88
|
Item: remove logging statement.
|
2011-02-26 02:04:18 +01:00 |
|
Jonathan Puckey
|
8828ed7e25
|
CompoundPath - check for this.blendMode != 'normal'.
|
2011-02-26 01:02:17 +01:00 |
|
Jonathan Puckey
|
bebc8bc8cc
|
Another attempt at fixing Item#transformContent. The bounds are correctly calculated now, but Item#rotate rotates the items in the wrong direction and rotating by a point doesn't work well.
|
2011-02-26 00:58:54 +01:00 |
|
Jonathan Puckey
|
f79e6a0454
|
PlacedSymbol & Raster: fix transformContent and support BlendMode.
|
2011-02-25 19:38:55 +01:00 |
|
Jonathan Puckey
|
049504a67a
|
Changed BlendMode library from code ported from Pixastic to code ported from Gavin Kistner's Context Blender Javascript Library.
|
2011-02-25 18:37:46 +01:00 |
|
Jonathan Puckey
|
c47a18ea58
|
BlendMode: add todo about using Item#strokeBounds instead of Item#bounds.
|
2011-02-25 13:57:01 +01:00 |
|
Jonathan Puckey
|
1c364601b4
|
Added todo about supporting BlendMode for PlacedSymbols.
|
2011-02-25 13:28:35 +01:00 |
|
Jonathan Puckey
|
ec0b1dec1d
|
PlacedSymbol: add missing param object to PlacedSymbol#definition#draw call.
|
2011-02-25 13:13:46 +01:00 |
|
Jonathan Puckey
|
c9d04d33f8
|
Implement BlendMode class.
|
2011-02-25 12:47:52 +01:00 |
|
Jonathan Puckey
|
d9b75a7232
|
Implement Item#reverseChildren() and add tests for it.
|
2011-02-24 19:31:07 +01:00 |
|
Jonathan Puckey
|
d77741db4f
|
Implement item#rasterize(resolution).
|
2011-02-24 19:22:19 +01:00 |
|
Jonathan Puckey
|
014d1053a7
|
Fix Item#isDescendant / Item#isAncestor, implement Item#isGroupedWith and add tests.
|
2011-02-24 18:09:48 +01:00 |
|
Jonathan Puckey
|
6cea290dd8
|
Item: add todo's for missing functionalities.
|
2011-02-24 17:42:32 +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 |
|
Jonathan Puckey
|
95f9028091
|
Add Point#clone docs to Point.js.
|
2011-02-24 14:31:32 +01:00 |
|
Jonathan Puckey
|
ebbf8cf039
|
Add missing introduction to Point.js
|
2011-02-24 14:30:06 +01:00 |
|
Jonathan Puckey
|
a3ec524722
|
Add documentation from Point.java to Point.js, remove TODO about adding back center support to Scriptographer for Point#rotate, since it is already there.
|
2011-02-24 14:28:44 +01:00 |
|
Jonathan Puckey
|
d37a794b64
|
Simplify Raster#initialize, set _size in Raster#setCanvas and add todo.
|
2011-02-24 14:15:30 +01:00 |
|
Jonathan Puckey
|
ff2ac484da
|
Raster: add todo and perform small cleanup.
|
2011-02-24 13:56:27 +01:00 |
|
Jonathan Puckey
|
d564be8a7e
|
Implement new Raster(canvas) / Raster#getSubImage / Raster.drawImage / Raster.ppi.
|
2011-02-24 13:52:27 +01:00 |
|
Jonathan Puckey
|
f88fcd3049
|
Implement Point#transform(matrix).
|
2011-02-24 13:48:24 +01:00 |
|
Jonathan Puckey
|
73df06150a
|
Fix RGBColor#setGray.
|
2011-02-24 12:58:16 +01:00 |
|
Jonathan Puckey
|
2712bd0419
|
Fix mistake in Raster.
|
2011-02-24 02:39:33 +01:00 |
|
Jonathan Puckey
|
41f3f47dd3
|
Fix small mistakes in Raster.
|
2011-02-24 01:51:49 +01:00 |
|
Jonathan Puckey
|
83b8a3e815
|
Optimize CanvasProvider to only expect a Size object.
|
2011-02-24 01:36:38 +01:00 |
|
Jonathan Puckey
|
c929bacde8
|
Clean up Group#draw and save/restore context state when drawing group with opacity.
|
2011-02-24 01:33:36 +01:00 |
|
Jonathan Puckey
|
dc51384a1a
|
Allow CanvasProvider to receive sizes too.
|
2011-02-24 01:29:51 +01:00 |
|
Jonathan Puckey
|
f1cd24eef8
|
More work on Raster, including getAverageColor, get/setPixel, get/setSize.
|
2011-02-24 01:28:11 +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 |
|
Jürg Lehni
|
e1bcd70059
|
Simplify Raster#draw().
|
2011-02-22 02:27:40 +01:00 |
|
Jonathan Puckey
|
689ddf7555
|
Raster: implement getPixel and create beans for Raster#canvas and Raster#context that create a canvas object / context when called for the first time.
|
2011-02-21 19:52:41 +01:00 |
|
Jonathan Puckey
|
cd5b2a7198
|
PlacedSymbol/ Raster: Use Matrix#applyToContext in draw functions. Also clean up Raster a bit.
|
2011-02-21 19:04:51 +01:00 |
|
Jonathan Puckey
|
5a786c300b
|
Implement Matrix#applyToContext.
|
2011-02-21 19:03:57 +01:00 |
|
Jonathan Puckey
|
53b0f8a329
|
Update comments about implementing getAverageColor(path).
|
2011-02-21 18:49:44 +01:00 |
|
Jonathan Puckey
|
9324b9918d
|
Implement part of Raster.js
|
2011-02-21 18:43:56 +01:00 |
|
Jonathan Puckey
|
d0c2c5dd1d
|
Add todo about speeding up canvas clearing.
|
2011-02-21 03:52:28 +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
|
4c84379b5b
|
Remove unused variable.
|
2011-02-21 03:26:46 +01:00 |
|
Jonathan Puckey
|
514fe1f0e6
|
Implement group opacity by drawing onto a second canvas first.
|
2011-02-21 03:22:42 +01:00 |
|
Jonathan Puckey
|
6fcdb86e1c
|
Implement CanvasProvider that provides reusable canvas elements.
|
2011-02-21 03:17:09 +01:00 |
|
Jonathan Puckey
|
3cd680c5f0
|
Merge remote branch 'origin/master'
|
2011-02-21 01:17:26 +01:00 |
|
Jonathan Puckey
|
5e271359b9
|
Add todo.
|
2011-02-21 01:16:53 +01:00 |
|
Jürg Lehni
|
77f1e22727
|
Merge remote-tracking branch 'origin/master'
|
2011-02-21 00:28:48 +01:00 |
|
Jürg Lehni
|
8cdd7fe2b2
|
Remove unnecessary call of new Point().
|
2011-02-21 00:28:36 +01:00 |
|
Jürg Lehni
|
dc410b6894
|
Merge rotateAround() and rotate().
|
2011-02-21 00:28:13 +01:00 |
|
Jonathan Puckey
|
14943f428f
|
Remove logging statement.
|
2011-02-21 00:27:02 +01:00 |
|
Jonathan Puckey
|
5dcf416a7a
|
Merge remote branch 'origin/master'
|
2011-02-21 00:26:03 +01:00 |
|
Jonathan Puckey
|
0458e3d916
|
Check for null in Color#read.
|
2011-02-21 00:25:45 +01:00 |
|
Jürg Lehni
|
2ebe4a18da
|
Add Point#isInside().
|
2011-02-21 00:24:17 +01:00 |
|
Jürg Lehni
|
04d2ed29c6
|
Move private createPoint() to Point.create().
|
2011-02-21 00:23:36 +01:00 |
|
Jonathan Puckey
|
245c1e9b90
|
Merge remote branch 'origin/master'
|
2011-02-20 23:51:56 +01:00 |
|
Jürg Lehni
|
9aabf30800
|
Optimise Point code more by using an internal createPoint method that bypasses initialize completely.
|
2011-02-20 23:41:39 +01:00 |
|
Jonathan Puckey
|
4c4b8246ee
|
Make sure the whole canvas is cleared.
|
2011-02-20 23:31:33 +01:00 |
|
Jonathan Puckey
|
51ab66b0f8
|
Remove trailing comma in ToolEvent.
|
2011-02-20 21:22:31 +01:00 |
|
Jonathan Puckey
|
f83309d6b7
|
Optimize Path#draw.
|
2011-02-20 20:47:13 +01:00 |
|
Jonathan Puckey
|
cb40d3f6f4
|
Implement Symbol and PlacedSymbol. Add Document#symbols array.
|
2011-02-20 18:34:38 +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
|
c0a93a8b66
|
Setters already handle point conversion.
|
2011-02-19 22:52:00 +01:00 |
|
Jonathan Puckey
|
10623ddb62
|
Implement Gradient, GradientColor, GradientStop.
|
2011-02-19 22:50:37 +01:00 |
|
Jonathan Puckey
|
95fa61f1ba
|
Group: remove unneeded ctx commands.
|
2011-02-19 18:10:26 +01:00 |
|
Jonathan Puckey
|
a1bec86333
|
Have Layer extend Group.
|
2011-02-19 18:09:14 +01:00 |
|
Jonathan Puckey
|
57b7b364bc
|
Nullify cssString cache when color/alpha values change.
|
2011-02-19 18:01:08 +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
|
c386f38b86
|
GrayColor: fix comment.
|
2011-02-19 17:22:20 +01:00 |
|
Jonathan Puckey
|
068c4dc1ca
|
Add missing Color.js.
|
2011-02-19 17:10:26 +01:00 |
|
Jonathan Puckey
|
b944b82abe
|
GrayColor: fix comments.
|
2011-02-19 17:08:08 +01:00 |
|
Jonathan Puckey
|
66105dd4ac
|
Implement Color, RGBColor & GrayColor.
|
2011-02-19 17:05:39 +01:00 |
|
Jonathan Puckey
|
bd5c906047
|
Fix error in CompoundPath.
|
2011-02-19 14:12:05 +01:00 |
|
Jonathan Puckey
|
8af671bb41
|
Merge remote branch 'origin/master'
|
2011-02-19 14:07:26 +01:00 |
|
Jürg Lehni
|
451eaaa3c6
|
Add a TODO comment.
|
2011-02-19 13:07:24 +01:00 |
|
Jürg Lehni
|
6093151a3b
|
Make sure that setting styles explicitely to null works.
|
2011-02-18 08:04:20 +00:00 |
|
Jürg Lehni
|
d02b5cd56a
|
Yet another optimisation, by using the Base.each() sidecar (bind object) to fill Item fields, and inject it straight away upon returning from it.
|
2011-02-18 07:58:59 +00:00 |
|
Jürg Lehni
|
31b595fa9e
|
Rename itemProps to itemFields, for more consistency.
|
2011-02-17 23:47:04 +00:00 |
|
Jürg Lehni
|
2c06ec965c
|
Simplify PathStyle further, by removing the _get/_setChildrenStyle methods and moving their functionality into the closure injection code.
|
2011-02-17 23:37:21 +00:00 |
|
Jürg Lehni
|
4e05faaa11
|
Use the same simplifications in PathStyle as in CompoundPath, and rely on Base.each as well to provide the scope for closure injection.
|
2011-02-17 23:34:45 +00: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
|
637e85b31b
|
Group: fix clipping.
|
2011-02-17 16:50:06 +01:00 |
|
Jonathan Puckey
|
2a1e00d127
|
Group: Implement clipping support.
|
2011-02-17 16:37:29 +01:00 |
|
Jonathan Puckey
|
deb1699f13
|
Tidy up code.
|
2011-02-17 16:00:03 +01:00 |
|