Artenus 2D Framework
Artenus Reference
Represents a post-processing filter that adds a blur effect to the rendered frame.
public class BlurFilter
implements PostProcessingFilter

Constructor Summary

Modifier and TypeConstructor and Description
public BlurFilter()

Method Summary

Modifier and TypeMethod and Description
public floatgetAmount()
Gets the current blurring amount.
public voidrender(int pass, RenderingContext context, RenderTarget renderedFrame)
Renders the frame for the current pass.
public voidsetAmount(float amount)
Sets the blurring amount.
public booleansetup(int pass, FilterPassSetup setup)
Sets up the current rendering pass for this filter.

Methods inherited from java.lang.Object

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

Constructor Detail

BlurFilter
public  BlurFilter()

Method Detail

getAmount
public float getAmount()
Gets the current blurring amount.
Returns:
Blurring amount
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:
setAmount
public void setAmount(
    float amount
)
Sets the blurring amount.
Parameters:
amountBlurring amount
setup
public boolean setup(
    int pass,
    FilterPassSetup setup
)
Sets up the current rendering pass for this filter. A filter can process the render output in several passes, and each pass will have access to the result of the previous. Pass 0 is where the raw render output is given to the filter for processing. The frame setup for the previous pass (or for the render output) is given to this function, which can be modified for the next pass. Width and height specified for the next pass cannot exceed raw output dimensions.
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)