Artenus 2D Framework
Artenus Reference
Represents a post-processing filter that overlays the rendered frame with a colored tint.
public class TintFilter
implements PostProcessingFilter

Constructor Summary

Modifier and TypeConstructor and Description
public TintFilter()

Method Summary

Modifier and TypeMethod and Description
public voidrender(int pass, RenderingContext context, RenderTarget renderedFrame)
Renders the frame for the current pass.
public voidsetTint(float r, float g, float b, float a)
Sets the current tint.
public booleansetup(int pass, FilterPassSetup setup)
Always returns false as this filter only has one pass.

Methods inherited from java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TintFilter
public  TintFilter()

Method Detail

render
public void render(
    int pass,
    RenderingContext context,
    RenderTarget renderedFrame
)
Renders the frame for the current pass. On pass 0 the raw rendering output is given to the function, and subsequent passes receive output from their predecessor. The rendering context can be used to draw elements for the next pass (if there is one), or for the final output of this filter. Note that the result of the final pass might still be processed by other post-processing filters before actually being displayed on the screen.
Specified By:
setTint
public void setTint(
    float r,
    float g,
    float b,
    float a
)
Sets the current tint.
Parameters:
rThe red component of the tint
gThe green component of the tint
bThe blue component of the tint
aThe alpha transparency of the tint
setup
public boolean setup(
    int pass,
    FilterPassSetup setup
)
Always returns false as this filter only has one pass.
Parameters:
passCurrent pass number (starting at 0)
setupFrame setup for the previous pass
Specified By:
Returns:
A value indicating whether another pass is required to complete this filter (other than the current pass that is being set up)