de.matthiasmann.twl.renderer.lwjgl
Class TintStack

java.lang.Object
  extended by de.matthiasmann.twl.renderer.lwjgl.TintStack

public class TintStack
extends java.lang.Object

A helper class to implement tinting.


Constructor Summary
TintStack()
           
 
Method Summary
 float getA()
           
 float getB()
           
 float getG()
           
 float getR()
           
 TintStack pop()
           
 TintStack push(Color color)
           
 TintStack push(float r, float g, float b, float a)
           
 TintStack pushReset()
           
 void setColor(Color color)
          GL11.glColor4f(color * tint);
 void setColor(float r, float g, float b, float a)
          GL11.glColor4f(color * tint);
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TintStack

public TintStack()
Method Detail

pushReset

public TintStack pushReset()

push

public TintStack push(float r,
                      float g,
                      float b,
                      float a)

push

public TintStack push(Color color)

pop

public TintStack pop()

getR

public float getR()

getG

public float getG()

getB

public float getB()

getA

public float getA()

setColor

public void setColor(Color color)
GL11.glColor4f(color * tint);

Parameters:
color - the desired color. Will be tinted.

setColor

public void setColor(float r,
                     float g,
                     float b,
                     float a)
GL11.glColor4f(color * tint);

Parameters:
r - the red component 0..255
g - the green component 0..255
b - the blue component 0..255
a - the alpha component 0..255