Jürg Lehni
|
ad8f046880
|
Expose HSB converters since they are required in BlendMode
|
2011-06-01 20:21:08 +01:00 |
|
Jürg Lehni
|
05a01604ca
|
Shorten css code.
|
2011-06-01 20:20:50 +01:00 |
|
Jürg Lehni
|
29967153c3
|
Clean up TODO comments...
|
2011-06-01 10:49:43 +01:00 |
|
Jonathan Puckey
|
2b8f1b71ec
|
Documentation: use inline code tags for boolean and number values,
|
2011-05-31 14:28:42 +02:00 |
|
Jonathan Puckey
|
6892608ecd
|
Documentation: rename 'Sample Code:' to 'Example:'
|
2011-05-30 19:55:40 +02:00 |
|
Jonathan Puckey
|
17fcb923ff
|
Documentation: rearrange @example tags, improve examples, rename boolean -> Boolean and misc smaller edits.
|
2011-05-30 19:42:17 +02:00 |
|
Jürg Lehni
|
9d00541987
|
Clean up PORT comments.
|
2011-05-29 19:20:10 +01:00 |
|
Jonathan Puckey
|
d644bbaa09
|
Documentation: Add optional alpha parameter to the different color constructors.
|
2011-05-28 02:29:08 +02:00 |
|
Jonathan Puckey
|
1520cad144
|
Documentation: capitalize basic types in @ tags.
|
2011-05-27 21:21:49 +02:00 |
|
Jonathan Puckey
|
2d5007dcd9
|
Implement Color documentation.
|
2011-05-27 21:13:39 +02:00 |
|
Jonathan Puckey
|
8e84c79aa6
|
Documentation: capitalize 'string' and 'number' types.
|
2011-05-27 20:15:15 +02:00 |
|
Jonathan Puckey
|
4015b022ad
|
Docs: use @true tag in boolean return descriptions and add Key.isDown param options.
|
2011-05-27 18:43:27 +02:00 |
|
Jürg Lehni
|
397d3676ed
|
Merge remote-tracking branch 'origin/master'
|
2011-05-26 21:00:05 +01:00 |
|
Jonathan Puckey
|
6b611add37
|
More documentation edits and function reordering.
|
2011-05-26 20:09:25 +02:00 |
|
Jürg Lehni
|
ddf3670952
|
Fix / remove some comments.
|
2011-05-26 12:04:47 +01:00 |
|
Jürg Lehni
|
d2263b26db
|
No need to check argument for _colorType since Color.read already performs an instanceof check for us.
|
2011-05-26 09:20:58 +01:00 |
|
Jürg Lehni
|
4fbc462a96
|
Shorten local 'colorType' variable to 'type'.
|
2011-05-26 08:40:07 +01:00 |
|
Jürg Lehni
|
300ea72261
|
Simplify Color#initialize() by relying on #convert() for performing _colorType check and delegate to #clone() instead of #convert() if it is the same.
|
2011-05-26 08:39:21 +01:00 |
|
Jürg Lehni
|
bfcfb23a9e
|
Shorten Color#clone() further.
|
2011-05-26 08:36:56 +01:00 |
|
Jonathan Puckey
|
020cbbcef5
|
Implement Gradient / GradientColor / GradientStop docs.
|
2011-05-26 00:55:44 +02:00 |
|
Jonathan Puckey
|
f2e01a8837
|
Color: Rename variable name due to conflict.
|
2011-05-21 17:56:54 +02:00 |
|
Jonathan Puckey
|
81558cb54f
|
Avoid double lookup of component key.
|
2011-05-21 17:49:54 +02:00 |
|
Jonathan Puckey
|
f3deed81cd
|
Optimize Color#initialize for minifying.
|
2011-05-21 17:40:29 +02:00 |
|
Jonathan Puckey
|
f83d16906c
|
Clone the color when calling Color#convert with the same color type.
|
2011-05-21 17:37:36 +02:00 |
|
Jonathan Puckey
|
e5034a5a76
|
Color#clone: don't initialize when calling 'new this.constructor'.
|
2011-05-21 17:35:37 +02:00 |
|
Jonathan Puckey
|
024e8eb19b
|
Fix Color cloning by adding clone function and using it in Color#initialize.
|
2011-05-21 17:13:25 +02:00 |
|
Jonathan Puckey
|
46b1311260
|
Gradient#equals: also check gradient type.
|
2011-05-21 12:06:37 +02:00 |
|
Jonathan Puckey
|
d8b73f3671
|
Fix GradientColor#clone().
|
2011-05-21 12:06:01 +02:00 |
|
Jürg Lehni
|
f6e827cfd1
|
Allow Color#alpha to be set to null.
|
2011-05-21 00:41:04 +01:00 |
|
Jürg Lehni
|
7e7944e6f4
|
Fix recently introduced error in Color, by setting internal properties directly.
|
2011-05-21 00:40:20 +01:00 |
|
Jürg Lehni
|
631923669a
|
Eliminate some of the TODOs.
|
2011-05-20 14:00:27 +01:00 |
|
Jürg Lehni
|
10dadb80f2
|
Move isHue check outside of setter.
|
2011-05-20 08:08:26 +01:00 |
|
Jürg Lehni
|
8a8c68b3d6
|
Define #clone() for various Gradient classes. Needs testing.
|
2011-05-19 22:02:26 +01:00 |
|
Jürg Lehni
|
38ddd34589
|
Replace beans access with internal property.
|
2011-05-19 22:00:03 +01:00 |
|
Jürg Lehni
|
6348f94362
|
Optimise Gradient constructor.
|
2011-05-19 20:54:52 +01:00 |
|
Jürg Lehni
|
8eea7e15d4
|
Give GradientStop a proper #initialize() function and use GradientStop.readAll() in Gradient#setStops() with some added magic to automatically assign rampPoints if they were not specified.
|
2011-05-19 20:51:09 +01:00 |
|
Jürg Lehni
|
6685d09801
|
Add missing semicolon.
|
2011-05-19 20:21:42 +01:00 |
|
Jürg Lehni
|
ef4e80ecef
|
Replace getter calls with direct access of internal properties.
|
2011-05-19 20:21:22 +01:00 |
|
Jürg Lehni
|
a035f645fc
|
Replace unneeded beans access with local variable.
|
2011-05-19 20:20:32 +01:00 |
|
Jürg Lehni
|
1473d82456
|
Variable chaining.
|
2011-05-19 20:20:01 +01:00 |
|
Jürg Lehni
|
32fb1b065e
|
No need to check for colorType since #convert() already performs this optimisation.
|
2011-05-19 20:19:36 +01:00 |
|
Jürg Lehni
|
3b9369fafb
|
Handle special setter for hue in Color.extend() as well, and move defintion of various Color classes to Color file since they are one-liners now.
|
2011-05-19 19:00:36 +01:00 |
|
Jürg Lehni
|
106719597b
|
Further simplify Color code by moving components definitions to one object.
|
2011-05-18 21:21:28 +01:00 |
|
Jürg Lehni
|
a17f7865a3
|
Simplify Color subclass construction by moving beans producing code into an extended Color.extend() function that handles it for us.
|
2011-05-18 21:11:59 +01:00 |
|
Jürg Lehni
|
dfc6a05969
|
Shorten some converters a bit.
|
2011-05-18 20:40:52 +01:00 |
|
Jürg Lehni
|
9b95ba095c
|
Don't capitalize twice.
|
2011-05-18 20:37:09 +01:00 |
|
Jürg Lehni
|
d643ac7626
|
Less cryptic code without Base.each() side-car makes more sense here.
|
2011-05-18 20:36:24 +01:00 |
|
Jürg Lehni
|
2367cfa6f2
|
Simplify Color code by merging all injection scopes to one.
|
2011-05-18 20:35:18 +01:00 |
|
Jürg Lehni
|
86ca1ed1e7
|
Add comment explaining color conversion code.
|
2011-05-18 15:37:01 +01:00 |
|
Jürg Lehni
|
93d3214a35
|
Fix porting error in GradientStop.
|
2011-05-18 10:04:46 +01:00 |
|
Jürg Lehni
|
db1a25933a
|
Replace accidental beans access with direct access of internal property.
|
2011-05-18 09:43:32 +01:00 |
|
Jürg Lehni
|
88332d763d
|
Simplify GradientColor#equals().
|
2011-05-18 09:42:09 +01:00 |
|
Jürg Lehni
|
57eabed874
|
Simplify GradientStop#equals().
|
2011-05-18 09:40:03 +01:00 |
|
Jürg Lehni
|
8b2709f5d8
|
Replace accidental beans access with direct access of internal property.
|
2011-05-18 09:38:45 +01:00 |
|
Jürg Lehni
|
eb6b838cf4
|
Simplify GradientStop#setRampPoint().
|
2011-05-18 09:38:20 +01:00 |
|
Jonathan Puckey
|
2be70ae73f
|
Gradient#setStops: improve checking for array.
|
2011-05-16 15:46:25 +02:00 |
|
Jürg Lehni
|
671d790068
|
Fix bug caused by recent commit.
|
2011-05-16 12:43:51 +01:00 |
|
Jürg Lehni
|
42e7fc910f
|
Simplify GradientColor#transform(), using new _transformPoint() parameters.
|
2011-05-16 11:19:40 +01:00 |
|
Jürg Lehni
|
6fc418b581
|
Fix accidentally reversed change and clean up code a bit.
|
2011-05-15 15:12:59 +01:00 |
|
Jürg Lehni
|
252a3635dc
|
Replace {@true} tags in documentation ({@true ([^}]*)} -> true $1, false otherwise.)
|
2011-05-15 15:06:10 +01:00 |
|
Jonathan Puckey
|
f8f6754068
|
Fix mistake in earlier commit.
|
2011-05-15 14:26:08 +02:00 |
|
Jonathan Puckey
|
2c36f3a62e
|
Fix bug in Color#read.
|
2011-05-15 14:11:35 +02:00 |
|
Jonathan Puckey
|
94889148a4
|
GradientColor: clone origin / destination & hilite points.
|
2011-05-08 14:29:58 +01:00 |
|
Jonathan Puckey
|
bbccb25184
|
Transform gradient when path is transformed.
|
2011-05-08 14:05:47 +01:00 |
|
Jonathan Puckey
|
6fa993a2a5
|
Implement equals function for GradientColor, Gradient & GradientStop.
|
2011-05-05 20:28:28 +01:00 |
|
Jürg Lehni
|
b50b0f9e5a
|
Fix bug in Color#equals() resulting in it always returning true.
|
2011-05-05 13:19:36 +01:00 |
|
Jürg Lehni
|
5dfec35dc1
|
Allow colors to be compare to null.
|
2011-05-05 11:20:26 +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
|
66465541c6
|
Clean up code (if() -> if ()).
|
2011-05-03 08:55:01 +01:00 |
|
Jürg Lehni
|
52a73e86ce
|
Clean up code (for() -> for ()).
|
2011-05-03 08:54:13 +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
|
26b70309a8
|
Improve various #toString() functions.
|
2011-05-02 08:57:55 +01:00 |
|
Jürg Lehni
|
4d999d57e2
|
Replace all type converting string compares with ===, !==.
|
2011-04-28 13:23:17 +01:00 |
|
Jürg Lehni
|
ac5dca4fc0
|
Update various comments about TODOs.
|
2011-04-26 17:04:15 +01:00 |
|
Jürg Lehni
|
9d2459d799
|
Rename '// Todo' to '// TODO', which is the convention.
|
2011-04-26 12:39:48 +01:00 |
|
Jonathan Puckey
|
5f05c85b42
|
Gradient: rename midPoint to rampPoint.
|
2011-04-07 17:12:00 +02:00 |
|
Jonathan Puckey
|
06df8b1288
|
Allow Gradient constructor to receive an array of colors or [color, midPoint]. Also allow the user to specify the type of the gradient in the constructor.
|
2011-04-07 17:01:49 +02:00 |
|
Jürg Lehni
|
aae88d7568
|
Optimise chained return statements.
|
2011-03-14 22:13:01 +01:00 |
|
Jürg Lehni
|
f02b7031a9
|
Reintroduce accidentally removed definition of _readNull: true.
|
2011-03-14 22:08:07 +01:00 |
|
Jürg Lehni
|
a48c130965
|
Improve comments.
|
2011-03-14 22:07:21 +01:00 |
|
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 |
|
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 |
|