|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sdljava.video.SDLColor
public class SDLColor
SDLColor describes a color in a format independent way. You can convert a SDLColor to a pixel value for a certain pixel format using Video.mapRGB
Note: On the java side alpha was added to this class so that the return value from SDL_MapRGBA can be easily accommodated. Otherwise the value is meaningless and can safely be ignore
Also see the documentation here: SDL_Color
Field Summary | |
---|---|
(package private) int |
alpha
|
(package private) int |
blue
|
(package private) int |
green
|
(package private) int |
red
|
Constructor Summary | |
---|---|
SDLColor()
|
|
SDLColor(int red,
int green,
int blue)
|
|
SDLColor(int red,
int green,
int blue,
int alpha)
|
Method Summary | |
---|---|
int |
getAlpha()
Gets the value of alpha |
int |
getBlue()
Gets the value of blue |
int |
getGreen()
Gets the value of green |
int |
getRed()
Gets the value of red |
void |
setAlpha(int argAlpha)
Sets the value of alpha |
void |
setBlue(int argBlue)
Sets the value of blue |
void |
setGreen(int argGreen)
Sets the value of green |
void |
setRed(int argRed)
Sets the value of red |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
int red
int green
int blue
int alpha
Constructor Detail |
---|
public SDLColor()
public SDLColor(int red, int green, int blue)
public SDLColor(int red, int green, int blue, int alpha)
Method Detail |
---|
public int getRed()
public void setRed(int argRed)
argRed
- Value to assign to this.redpublic int getGreen()
public void setGreen(int argGreen)
argGreen
- Value to assign to this.greenpublic int getBlue()
public void setBlue(int argBlue)
argBlue
- Value to assign to this.bluepublic int getAlpha()
public void setAlpha(int argAlpha)
argAlpha
- Value to assign to this.alphapublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |