Jonathan Puckey
|
46ee4c517d
|
Optimize nameToRGBColor to also handle strings like rgb(0, 0, 0).
|
2011-03-14 13:54:57 +01:00 |
|
Jürg Lehni
|
bfd43b27fa
|
Improve commens and get rid of for loop to in nameToRGBColor().
|
2011-03-13 23:00:01 +01:00 |
|
Jürg Lehni
|
1c8c64c473
|
One more nameToRGBColor() simplification, by reversing return logic.
|
2011-03-13 22:57:01 +01:00 |
|
Jürg Lehni
|
a842b5faa6
|
Simplify nameToRGBColor() further: No need to create function in its own scope, simply use the inject scope to contain cache and context variables.
|
2011-03-13 22:55:20 +01:00 |
|
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 |
|
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 |
|
Jonathan Puckey
|
5079259a8e
|
Small change to Color.
|
2011-03-12 15:16:17 +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
|
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 |
|
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
|
62db3e56dd
|
Implement HSBColor, introduce Color#convert(type) and refactor color classes.
|
2011-03-09 02:23:39 +01:00 |
|
Jürg Lehni
|
6a67052090
|
Update copyright / licensing comments.
|
2011-03-08 01:41:50 +00:00 |
|
Jürg Lehni
|
6db184341a
|
Fix a small syntax error.
|
2011-03-07 18:36:13 +00:00 |
|
Jürg Lehni
|
2a0c393b85
|
Simplify HSB code a little.
|
2011-03-07 16:51:00 +00:00 |
|
Jonathan Puckey
|
d713102734
|
Implement Color#saturation / Color#hue / Color#brightness and allow chaining of color channel setters.
|
2011-03-07 15:59:35 +01:00 |
|
Jürg Lehni
|
e1a7aff2f0
|
Add copyright notice and license file.
|
2011-03-07 00:50:44 +00:00 |
|
Jürg Lehni
|
1d866ecb6c
|
Clean up internal properties and beans in Color related classes.
|
2011-03-05 00:16:26 +00:00 |
|
Jonathan Puckey
|
acb6e850a0
|
Use toCssString() in Color#getCanvasStyle.
|
2011-03-04 18:14:24 +01:00 |
|
Jonathan Puckey
|
ff5ee13ba0
|
Fix Color#getCanvasStyle.
|
2011-03-04 17:54:36 +01: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 |
|
Jürg Lehni
|
2b6dede883
|
Clean up white-spaces and line lengths.
|
2011-03-03 22:45:17 +00:00 |
|
Jürg Lehni
|
5ed30d7089
|
Make sure all files end on empty line.
|
2011-03-03 16:32:55 +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
|
3a46ac3b54
|
Allow read() methods to receive an optional length parameter.
|
2011-03-03 13:15:55 +00:00 |
|
Jonathan Puckey
|
14943f428f
|
Remove logging statement.
|
2011-02-21 00:27:02 +01:00 |
|
Jonathan Puckey
|
0458e3d916
|
Check for null in Color#read.
|
2011-02-21 00:25:45 +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
|
57b7b364bc
|
Nullify cssString cache when color/alpha values change.
|
2011-02-19 18:01:08 +01:00 |
|
Jonathan Puckey
|
068c4dc1ca
|
Add missing Color.js.
|
2011-02-19 17:10:26 +01:00 |
|