Commit graph

698 commits

Author SHA1 Message Date
Jürg Lehni
21aa12271e Simplify nameToRGBColor() code a little: Shorter variables names, no need to save and restore context, as all we do is fillRect(). 2011-03-13 22:53:32 +01:00
Jürg Lehni
873e715361 Merge remote-tracking branch 'origin/master' 2011-03-13 22:48:17 +01:00
Jürg Lehni
c8449162d8 Remove unnecessary checks for rect. 2011-03-13 22:48:07 +01:00
Jonathan Puckey
e0753179e3 Clean up last commit a bit. 2011-03-13 20:16:04 +01:00
Jonathan Puckey
0d173e39bf Merge remote branch 'origin/master' 2011-03-13 20:15:00 +01:00
Jonathan Puckey
b004a83361 Color: avoid huge named color lookup table by drawing the named color on a canvas and reading its components. 2011-03-13 20:14:16 +01:00
Jürg Lehni
cd80db14d8 Rearrange color converters to group by pairs. 2011-03-13 18:41:32 +01:00
Jürg Lehni
d5fa3d7ae6 Merge remote-tracking branch 'origin/master'
Conflicts:
	src/item/Raster.js
2011-03-13 18:34:05 +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
1cd6daada1 Use _item instead of item as internal reference to PathStyle's item. 2011-03-13 18:29:59 +01:00
Jonathan Puckey
38018c83f6 Lines example: use 'new Date().getTime()' instead of 'Date.now()'. 2011-03-12 15:33:09 +01:00
Jonathan Puckey
6430baa858 Some small changes to lines example. 2011-03-12 15:28:01 +01:00
Jonathan Puckey
f39895a945 Update lines.html example. 2011-03-12 15:17:08 +01:00
Jonathan Puckey
5079259a8e Small change to Color. 2011-03-12 15:16:17 +01:00
Jonathan Puckey
d7399926a0 Allow for Raster#setPixel(x, y, color). 2011-03-11 14:23:30 +01:00
Jonathan Puckey
1bb9a262d9 Add VoronoiTool to examples (work in progress). 2011-03-09 19:40:34 +01:00
Jonathan Puckey
b643fdfc1f Implement Item#removeOn and Item#getId. 2011-03-09 19:35:03 +01:00
Jonathan Puckey
fed52bd521 Paperscript#run: keep tool on global the paper object. 2011-03-09 19:33:53 +01:00
Jürg Lehni
c7cefcba3a Merge remote-tracking branch 'origin/master' 2011-03-09 18:17:50 +00:00
Jürg Lehni
427e969d3d Add data access to Raster, untested. 2011-03-09 18:17:12 +00:00
Jonathan Puckey
dae2d6acb1 Remove todo in PlacedSymbol. 2011-03-09 17:09:23 +01:00
Jonathan Puckey
1ae89049ed Make the RadialRainbows example interaction smoother. 2011-03-09 17:08:20 +01:00
Jonathan Puckey
df0c95e41f Fix bug in Tool.js. 2011-03-09 16:51:50 +01:00
Jonathan Puckey
f57a7ba0d9 Use Math.min / Math.max to clamp component values in color classes. 2011-03-09 16:48:53 +01:00
Jonathan Puckey
81f48e2168 Add SquareRounded.html example. 2011-03-09 16:15:01 +01:00
Jonathan Puckey
08d66ae231 Color: small change. 2011-03-09 15:50:32 +01:00
Jonathan Puckey
87de9f4fa8 Further refactoring in Color. 2011-03-09 15:25:41 +01:00
Jonathan Puckey
30d2f16c8c Color: save a var statement. 2011-03-09 15:00:13 +01:00
Jonathan Puckey
da92ff9773 Check for min and max values in the different color component setters. 2011-03-09 14:48:16 +01:00
Jürg Lehni
41ce6279f1 Merge remote-tracking branch 'origin/master'
Conflicts:
	src/color/Color.js
2011-03-09 13:34:13 +00:00
Jürg Lehni
9fd0381b82 Minor clean-ups. 2011-03-09 13:31:40 +00:00
Jonathan Puckey
b7902635bf Color#setAlpha: comment out code using Math.min and Math.max, which was supposed to just be there to explain what is happening. 2011-03-09 14:31:30 +01:00
Jonathan Puckey
bda24fbd54 Color: simplify stringToRGB again. 2011-03-09 14:29:19 +01:00
Jonathan Puckey
eacf346aab Color: reintroduce hexToRGB to be called from stringToRGB. 2011-03-09 14:23:18 +01:00
Jonathan Puckey
741652aa9c Color: combine stringToRgb, namedToRgb and hexToRgb and optimize a bit. 2011-03-09 14:20:09 +01:00
Jonathan Puckey
ba42884f57 Move RotationRaster.html from Animated to Scripts. 2011-03-09 13:51:54 +01:00
Jonathan Puckey
526711ffd4 Fix and improve performance of Raster#getPixel. 2011-03-09 13:38:58 +01:00
Jonathan Puckey
00c4b5ee34 Small change to HSBColor#setHue. 2011-03-09 02:30:50 +01:00
Jonathan Puckey
60c8c6ce02 Add more color tests. 2011-03-09 02:25:50 +01:00
Jonathan Puckey
ba7e2fb99b Add test helpers for HSBColor and GrayColor and fix compareNumbers function. 2011-03-09 02:25:38 +01:00
Jonathan Puckey
6a26cf3228 Add HSBColor to load.js. 2011-03-09 02:24:35 +01:00
Jonathan Puckey
62db3e56dd Implement HSBColor, introduce Color#convert(type) and refactor color classes. 2011-03-09 02:23:39 +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
72469dc65f Clean up PlacedSymbol constructor, make sure it declares parameters. 2011-03-08 17:21:05 +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
dd9340d522 Handle all the calls to Base.read() differently, by checking result for null and bailing out if it is. 2011-03-08 17:17:36 +00:00
Jürg Lehni
261fa819d7 Change Bootstrap.js to only make beans if gettes has no function parameters defined, in order to avoid beans for functions that start with get but expect arguments when called. 2011-03-08 17:09:13 +00:00
Jürg Lehni
ea9a1d2c47 Fix Base.read() to correctly read existing objects even when length > 1. 2011-03-08 17:08:30 +00:00