Artenus 2D Framework
Artenus Reference
Interface for all entities that support rendering of visual content.
public interface Renderable

Field Summary

Modifier and TypeField and Description
public static final FLAG_PRESERVE_SHADER_PROGRAM
Rendering flag: ignore effects, if present.

Method Summary

Modifier and TypeMethod and Description
public floatgetAlpha()
Gets the transparency value for this renderable.
public RGBgetColorFilter()
Gets the color filter for this entity.
public voidrender(RenderingContext rc, int flags)
Renders the visual content.
public voidsetAlpha(float alpha)
Sets the transparency value for this renderable.
public voidsetColorFilter(float r, float g, float b)
Sets the color filter for this entity.
public voidsetColorFilter(RGB rgb)
Sets the color filter for this entity.

Field Detail

FLAG_PRESERVE_SHADER_PROGRAM
public static final FLAG_PRESERVE_SHADER_PROGRAM
Rendering flag: ignore effects, if present.

Method Detail

getAlpha
public float getAlpha()
Gets the transparency value for this renderable.
Returns:
The alpha value for transparency
getColorFilter
public RGB getColorFilter()
Gets the color filter for this entity. Modifying the fields in the returned value affects the color filter.
Returns:
The color filter
render
public void render(
    RenderingContext rc,
    int flags
)
Renders the visual content.
Parameters:
flagsRendering flags
setAlpha
public void setAlpha(
    float alpha
)
Sets the transparency value for this renderable. An alpha value of 1 indicates a fully opaque renderable and a value of 0 is an invisible sprite. Any value in between can be specified to achieve transparency.
Parameters:
alphaThe alpha value for transparency
setColorFilter
public void setColorFilter(
    float r,
    float g,
    float b
)
Sets the color filter for this entity. The original colors should be multiplied by this color when rendering.
Parameters:
rThe red multiplier
gThe green multiplier
bThe blue multiplier
setColorFilter
public void setColorFilter(
    RGB rgb
)
Sets the color filter for this entity. The original colors should be multiplied by this color when rendering.
Parameters:
rgbThe color multipliers