|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlegacy.video.RGB
public class RGB
RGB.class is a container for RGBA color composites with values ranging from 0 to 255 for each. Warning access to componets r,g,b,a are public but may not effect the value used by any rendition service or class, these feild are availble for optimiziation considerations only. modify at your own risk. Reccomend read only.
Field Summary | |
---|---|
int |
a
alpha component ranging from 0 to 255 where 0 is considered to be fully translucent Recommend read only. |
int |
b
blue component ranging from 0 to 255 where 255 is considered to be at it's higest luminace. |
int |
g
green component ranging from 0 to 255 where 255 is considered to be at it's higest luminace. |
int |
r
red component ranging from 0 to 255 where 255 is considered to be at it's higest luminace. |
int |
value
alpha, red, green and blue components packed as a single int for use with display adaptor Recommend read only. |
Constructor Summary | |
---|---|
RGB(int rgb)
RGB(int rgb) creates a a record of all three components plus alpha extracted from 0xAARRGGBB |
|
RGB(int r,
int g,
int b)
RGB(int r, int g, int b) creates a a record of all three components plus alpha by default set to 255 and it's real value calulated as 0xAARRGGBB |
|
RGB(int r,
int g,
int b,
int a)
RGB(int r, int g, int b, int a) creates a a record of all three components plus alpha and it's real value calulated as 0xAARRGGBB |
Method Summary | |
---|---|
static int |
blendColor(int baseRGB,
int colorRGB)
blendColor blends to colors togeather using the second colors alpha value as the quantity to blend. |
static int |
blendColor(RGB baseRGB,
RGB colorRGB)
blendColor blends to colors togeather using the second colors alpha value as the quantity to blend. |
int |
getA()
getter for alpha component |
int |
getB()
getter for blue component |
int |
getColor()
getter for alpha, red, green and blue components packed as a single int for use with display adaptor Warningmay be inacurate if any component has been directly altered. |
static int |
getColor(int r,
int g,
int b,
int a)
getColor(int r, int g, int b, int a) packs the RGBA components into a single int for use with the display adaptor |
int |
getG()
getter for green component |
int |
getR()
getter for red component |
void |
setA(int a)
safe setter for the alpha component, will adjust value; |
void |
setB(int b)
safe setter for the blue component, will adjust value; |
void |
setG(int g)
safe setter for the green component, will adjust value; |
void |
setR(int r)
safe setter for the red component, will adjust value; |
void |
setValue(int value)
safe setter for the alpha, red, greed and blue components by packed value, will adjust components.; |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int r
public int g
public int b
public int a
public int value
Constructor Detail |
---|
public RGB(int rgb)
rgb
- red green blue and alpha component ranging from 0 to 255 where 255 is
considered to be at it's higest luminace for red green and blue and the alpha
range from 0 to 255 where 0 is considered to be fully translucentpublic RGB(int r, int g, int b)
r
- red component ranging from 0 to 255 where 255 is considered to be at it's higest luminace.g
- green component ranging from 0 to 255 where 255 is considered to be at it's higest luminace.b
- blue component ranging from 0 to 255 where 255 is considered to be at it's higest luminace.public RGB(int r, int g, int b, int a)
r
- red component ranging from 0 to 255 where 255 is considered to be at it's higest luminace.g
- green component ranging from 0 to 255 where 255 is considered to be at it's higest luminace.b
- blue component ranging from 0 to 255 where 255 is considered to be at it's higest luminace.a
- alpha component ranging from 0 to 255 where 0 is considered to be fully translucentMethod Detail |
---|
public int getR()
public void setR(int r)
r
- red component ranging from 0 to 255 where 255 is considered to be at it's higest luminace.public int getG()
public void setG(int g)
g
- green component ranging from 0 to 255 where 255 is considered to be at it's higest luminace.public int getB()
public void setB(int b)
b
- blue component ranging from 0 to 255 where 255 is considered to be at it's higest luminace.public int getA()
public void setA(int a)
a
- blue component ranging from 0 to 255 where 0 is considered to be fully translucent.public int getColor()
public void setValue(int value)
value
- in the rgba format as 0xAARRGGBBpublic static final int getColor(int r, int g, int b, int a)
r
- red component ranging from 0 to 255 where 255 is considered to be at it's higest luminace.g
- green component ranging from 0 to 255 where 255 is considered to be at it's higest luminace.b
- blue component ranging from 0 to 255 where 255 is considered to be at it's higest luminace.a
- alpha component ranging from 0 to 255 where 0 is considered to be fully translucent
public static final int blendColor(RGB baseRGB, RGB colorRGB)
baseRGB
- the RGB triplet to blendcolorRGB
- the RGB quad to blend
public static final int blendColor(int baseRGB, int colorRGB)
baseRGB
- the packed RGB triplet to blendcolorRGB
- the packed RGB quad to blend
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |