Class ColorLayer
java.lang.Object
de.gurkenlabs.litiengine.graphics.ColorLayer
- All Implemented Interfaces:
IRenderable
- Direct Known Subclasses:
AmbientLight
,StaticShadowLayer
public abstract class ColorLayer
extends java.lang.Object
implements IRenderable
Constructor Summary
Constructors Modifier Constructor Description protected
ColorLayer(Environment env, java.awt.Color color)
Method Summary
Modifier and Type Method 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)
Constructor Details
Method Details
render
public void render(java.awt.Graphics2D g)Description copied from interface:IRenderable
Renders the visual contents of this instance onto the provided graphics context.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.
- Specified by:
render
in interfaceIRenderable
- Parameters:
g
- The current graphics object onto which this instance will render its visual contents.- See Also:
RenderEngine.renderEntity(Graphics2D, de.gurkenlabs.litiengine.entities.IEntity)
getColor
public java.awt.Color getColor()setAlpha
public void setAlpha(int ambientAlpha)setColor
public void setColor(java.awt.Color color)updateSection
public void updateSection(java.awt.geom.Rectangle2D section)renderSection
protected abstract void renderSection(java.awt.Graphics2D g, java.awt.geom.Rectangle2D section)clearSection
protected abstract void clearSection(java.awt.Graphics2D g, java.awt.geom.Rectangle2D section)getEnvironment