java.lang.Object
org.libsdl.video.SDLRGB
org.libsdl.video.SDLRGBA
- public class SDLRGBA
- extends SDLRGB
The SDLColor class represents an RGB color. The
class encompasses a color that has red, green, and blue short
components to it.
------ EXAMPLE ------
// Creates SDLRGBA objects with 50% transparency
SDLRGBA red = new SDLRGBA(255, 0, 0, 128);
SDLRGBA green = new SDLRGBA(0, 255, 0, 128);
SDLRGBA blue = new SDLRGBA(0, 0, 255, 128);
------ EXAMPLE ------
int pixel = ... // get a 32 bit integer pixel value
SDLPixelFormat format = ... // get pixel format (from SDLSurface maybe)
SDLRGBA rgba = format.getRGBA(pixel);
- Version:
- $revision$
|
Field Summary |
private short |
a
|
| Fields inherited from class org.libsdl.video.SDLRGB |
|
|
Constructor Summary |
SDLRGBA(short r,
short g,
short b,
short a)
Constructs a new SDLRGBA with the given red, green, blue, and
alpha components. |
|
Method Summary |
short |
alpha()
Get the alpha component from this SDLRGBA object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
a
private short a
SDLRGBA
public SDLRGBA(short r,
short g,
short b,
short a)
- Constructs a new SDLRGBA with the given red, green, blue, and
alpha components.
alpha
public short alpha()
- Get the alpha component from this
SDLRGBA object.