|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReadonlyTColor
Defines an immutable API for the TColor class. This is used to define the
preset color constants in NamedColor
, but also throughout other parts
of this package wherever immutable behaviour is required or encouraged.
Method Summary | |
---|---|
float |
alpha()
|
float |
black()
|
float |
blue()
|
float |
brightness()
|
TColor |
copy()
|
float |
cyan()
|
float |
distanceToCMYK(ReadonlyTColor c)
Calculates the CMYK distance to the given color. |
float |
distanceToHSV(ReadonlyTColor c)
Calculates the HSV distance to the given color. |
float |
distanceToRGB(ReadonlyTColor c)
Calculates the RGB distance to the given color. |
TColor |
getAnalog(float theta,
float delta)
|
TColor |
getAnalog(int angle,
float delta)
|
TColor |
getBlended(ReadonlyTColor c,
float t)
|
Hue |
getClosestHue()
|
Hue |
getClosestHue(boolean primaryOnly)
|
TColor |
getComplement()
|
float |
getComponentValue(AccessCriteria criteria)
|
TColor |
getDarkened(float step)
|
TColor |
getDesaturated(float step)
|
TColor |
getInverted()
|
TColor |
getLightened(float step)
|
TColor |
getRotatedRYB(float theta)
|
TColor |
getRotatedRYB(int angle)
|
TColor |
getSaturated(float step)
|
float |
green()
|
float |
hue()
|
boolean |
isBlack()
|
boolean |
isGrey()
|
boolean |
isPrimary()
|
boolean |
isWhite()
|
float |
luminance()
Computes the color's luminance using this formula: lum=0.299*red + 0.587*green + 0.114 *blue |
float |
magenta()
|
float |
red()
|
float |
saturation()
|
int |
toARGB()
Converts the color into a packed ARGB int. |
float[] |
toCMYKAArray(float[] cmyka)
Copies the current CMYKA values into the given array (or constucts a new one with these values). |
float[] |
toHSVAArray(float[] hsva)
|
float[] |
toRGBAArray(float[] rgba)
Copies the current RGBA value into the given array (or constucts a new one with these values). |
float[] |
toRGBAArray(float[] rgba,
int offset)
Copies the current RGBA value into the given array starting the given offset. |
float |
yellow()
|
Method Detail |
---|
float alpha()
float black()
float blue()
float brightness()
TColor copy()
float cyan()
float distanceToCMYK(ReadonlyTColor c)
c
- target color
float distanceToHSV(ReadonlyTColor c)
c
- target color
float distanceToRGB(ReadonlyTColor c)
c
- target color
TColor getAnalog(float theta, float delta)
TColor getAnalog(int angle, float delta)
TColor getBlended(ReadonlyTColor c, float t)
Hue getClosestHue()
Hue getClosestHue(boolean primaryOnly)
primaryOnly
- if true, only primary color hues are considered
TColor getComplement()
float getComponentValue(AccessCriteria criteria)
TColor getDarkened(float step)
step
-
TColor getDesaturated(float step)
step
-
TColor getInverted()
TColor getLightened(float step)
step
-
TColor getRotatedRYB(float theta)
theta
- rotation angle in radians
TColor getRotatedRYB(int angle)
angle
- rotation angle in degrees
TColor getSaturated(float step)
step
-
float green()
float hue()
boolean isBlack()
TColor.BLACK_POINT
boolean isGrey()
TColor.GREY_THRESHOLD
boolean isPrimary()
boolean isWhite()
TColor.WHITE_POINT
float luminance()
float magenta()
float red()
float saturation()
int toARGB()
float[] toCMYKAArray(float[] cmyka)
cmyka
- result array (or null)
float[] toHSVAArray(float[] hsva)
hsva
- result array (or null)
float[] toRGBAArray(float[] rgba)
rgba
- result array (or null)
float[] toRGBAArray(float[] rgba, int offset)
rgba
- offset
-
float yellow()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |