com.annahid.libs.artenus.entities.behavior
Renderable
Interface for all entities that support rendering of visual content.
public interface Renderable
Field Summary
| Modifier and Type | Field and Description |
|---|---|
public static final | FLAG_PRESERVE_SHADER_PROGRAMRendering flag: ignore effects, if present. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
public float | getAlpha() Gets the transparency value for this renderable. |
public RGB | getColorFilter() Gets the color filter for this entity. |
public void | render(RenderingContext rc, int flags) Renders the visual content. |
public void | setAlpha(float alpha) Sets the transparency value for this renderable. |
public void | setColorFilter(float r, float g, float b) Sets the color filter for this entity. |
public void | setColorFilter(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:
|
| 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:
|
| 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:
|
| 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:
|