public abstract class ColorLayer extends java.lang.Object implements IRenderable
Modifier | Constructor and Description |
---|---|
protected |
ColorLayer(Environment env,
java.awt.Color color) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
clearSection(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D section) |
java.awt.Color |
getColor() |
protected Environment |
getEnvironment() |
void |
render(java.awt.Graphics2D g)
Renders the visual contents of this instance onto the provided graphics context.
|
protected abstract void |
renderSection(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D section) |
void |
setAlpha(int ambientAlpha) |
void |
setColor(java.awt.Color color) |
void |
updateSection(java.awt.geom.Rectangle2D section) |
protected ColorLayer(Environment env, java.awt.Color color)
public void render(java.awt.Graphics2D g)
IRenderable
If an Entity
implements this interface, this method will be called right after the entity was rendered from the environment.
Allowing for a custom rendering mechanism.
This interface can be implemented in general by anything that should be rendered to the game's screen.
render
in interface IRenderable
g
- The current graphics object onto which this instance will render its visual contents.RenderEngine.renderEntity(Graphics2D, de.gurkenlabs.litiengine.entities.IEntity)
public java.awt.Color getColor()
public void setAlpha(int ambientAlpha)
public void setColor(java.awt.Color color)
public void updateSection(java.awt.geom.Rectangle2D section)
protected abstract void renderSection(java.awt.Graphics2D g, java.awt.geom.Rectangle2D section)
protected abstract void clearSection(java.awt.Graphics2D g, java.awt.geom.Rectangle2D section)
protected Environment getEnvironment()