|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--canvas.BaseColor
|
+--canvas.AnyColor
Will hold and return any 24-bit RGB color. You should use this if you are not concerned about displaying your colors on an 8-bit display.
| Field Summary |
| Fields inherited from class canvas.BaseColor |
color |
| Constructor Summary | |
AnyColor(canvas.AnyColor ac)
Extracts the color from the AnyColor object. |
|
AnyColor(Color c)
Takes the color to be held as the argument. |
|
AnyColor(int n)
Takes the single integer that gets piped into the Color() constructor. |
|
AnyColor(int r,
int g,
int b)
Takes the red, green,and blue components. |
|
AnyColor(canvas.WebSafeColor wsc)
Extracts the color from the WebSafeColor object. |
|
| Method Summary | |
Color |
brighter()
Returns a brighter version of the held color. |
Color |
darker()
Returns a darker version ofthe held color. |
Color |
desaturate()
Returns a less saturated version of the color. |
Color |
hueshift(int degrees)
Returns a color with a different hue than the one held. |
Color |
saturate()
Returns a more saturated version of the color. |
static void |
SelfTest()
This method demonstrates the supported methods. |
| Methods inherited from class canvas.BaseColor |
getColor, in_range, in_range, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AnyColor(int r,
int g,
int b)
r - Red component, 0-255g - Green component, 0-255b - Bluecomponent, 0-255public AnyColor(int n)
public AnyColor(Color c)
public AnyColor(canvas.AnyColor ac)
public AnyColor(canvas.WebSafeColor wsc)
| Method Detail |
public Color brighter()
brighter in class BaseColorpublic Color darker()
darker in class BaseColorpublic Color saturate()
saturate in class BaseColorpublic Color desaturate()
desaturate in class BaseColorpublic Color hueshift(int degrees)
hueshift in class BaseColordegrees - The number of degrees out of 360
to shift the color.public static void SelfTest()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||