Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.libsdl.video
Class SDLRGBA  view SDLRGBA download SDLRGBA.java

java.lang.Object
  extended byorg.libsdl.video.SDLRGB
      extended byorg.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 org.libsdl.video.SDLRGB
blue, green, red
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

a

private short a
Constructor Detail

SDLRGBA

public SDLRGBA(short r,
               short g,
               short b,
               short a)
Constructs a new SDLRGBA with the given red, green, blue, and alpha components.

Method Detail

alpha

public short alpha()
Get the alpha component from this SDLRGBA object.