sdl.video
Class SDLColor

java.lang.Object
  |
  +--sdl.video.SDLColor

public class SDLColor
extends java.lang.Object

A class to conveniently hold a color :)


Field Summary
 byte m_Blue
          Blue component
 byte m_Green
          Green component
 byte m_Red
          Red component
 byte m_Unused
          Unused, sometimes Alpha component?
 
Constructor Summary
SDLColor()
          Defaults to black.
SDLColor(int color)
          Creates a color from a 32bit representation (0x--RRGGBB).
 
Method Summary
 void freeColor()
          Frees the low level color buffer.
 int toInt()
          Converts this color to a 32bit integer representation (0x--RRGGBB).
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_Red

public byte m_Red
Red component


m_Green

public byte m_Green
Green component


m_Blue

public byte m_Blue
Blue component


m_Unused

public byte m_Unused
Unused, sometimes Alpha component?

Constructor Detail

SDLColor

public SDLColor()
Defaults to black.


SDLColor

public SDLColor(int color)
Creates a color from a 32bit representation (0x--RRGGBB).

Method Detail

freeColor

public void freeColor()
Frees the low level color buffer. Call before losing track of the SDLColor. Java doesn't have destructors, does it...


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toInt

public int toInt()
Converts this color to a 32bit integer representation (0x--RRGGBB).