public class DVBColor extends AlphaColor
black, BLACK, blue, BLUE, cyan, CYAN, DARK_GRAY, darkGray, gray, GRAY, green, GREEN, LIGHT_GRAY, lightGray, magenta, MAGENTA, orange, ORANGE, pink, PINK, red, RED, white, WHITE, yellow, YELLOWBITMASK, OPAQUE, TRANSLUCENT| Constructor and Description |
|---|
DVBColor(Color c)
Constructs a new DVBColor using the specified color.
|
DVBColor(float r,
float g,
float b,
float a)
Creates an sRGB color with the specified red, green, blue, and
alpha values in the range (0,0 to 1,0).
|
DVBColor(int rgba,
boolean hasalpha)
Creates an sRGB color with the specified combined RGBA value consisting
of the alpha component in bits 24 to 31, the red component in bits 16 to 23,
the green component in bits 8 to 15, and the blue component in bits 0 to 7.
|
DVBColor(int r,
int g,
int b,
int a)
Creates an sRGB color with the specified red, green, blue, and alpha
values in the range (0 to 255).
|
| Modifier and Type | Method and Description |
|---|---|
Color |
brighter()
Creates a brighter version of this color.
|
Color |
darker()
Creates a darker version of this color.
|
boolean |
equals(Object obj)
Determines whether another object is equal to this color.
|
int |
getAlpha()
Returns the alpha component.
|
int |
getRGB()
Returns the RGB value representing the color in the default sRGB
ColorModel.
|
String |
toString()
Creates a string that represents this color and indicates the
values of its ARGB components.
|
hashCodecreateContext, decode, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGBColorComponents, getRGBComponents, getTransparency, HSBtoRGB, RGBtoHSBpublic DVBColor(float r,
float g,
float b,
float a)
r - the red componentg - the green componentb - the blue componenta - the alpha componentColor.getRed(),
Color.getGreen(),
Color.getBlue(),
getAlpha(),
getRGB()public DVBColor(int r,
int g,
int b,
int a)
r - the red componentg - the green componentb - the blue componenta - the alpha componentColor.getRed(),
Color.getGreen(),
Color.getBlue(),
getAlpha(),
getRGB()public DVBColor(int rgba,
boolean hasalpha)
rgba - the combined RGBA componentshasalpha - true if the alpha bits are valid, false otherwiseColor.getRed(),
Color.getGreen(),
Color.getBlue(),
getAlpha(),
getRGB()public DVBColor(Color c)
c - the java.awt.Color used to create a new DVBColorpublic Color brighter()
brighter in class AlphaColorColor.brighter()public Color darker()
darker in class AlphaColorColor.darker()public boolean equals(Object obj)
equals in class AlphaColorobj - - the object to compare with.public int getAlpha()
getAlpha in class AlphaColorgetRGB()public int getRGB()
getRGB in class AlphaColorColor.getRed(),
Color.getGreen(),
Color.getBlue(),
getAlpha()public String toString()
toString in class AlphaColorCopyright © 2012 code4tv.com. All Rights Reserved.