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 
    ModifierConstructorDescription
    protected ColorLayer​(Environment env, java.awt.Color color) 
  • Method Summary

    Modifier and TypeMethodDescription
    protected abstract voidclearSection​(java.awt.Graphics2D g, java.awt.geom.Rectangle2D section) 
    java.awt.ColorgetColor() 
    protected EnvironmentgetEnvironment() 
    voidrender​(java.awt.Graphics2D g)
    Renders the visual contents of this instance onto the provided graphics context.
    protected abstract voidrenderSection​(java.awt.Graphics2D g, java.awt.geom.Rectangle2D section) 
    voidsetAlpha​(int ambientAlpha) 
    voidsetColor​(java.awt.Color color) 
    voidupdateSection​(java.awt.geom.Rectangle2D section) 

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface IRenderable
      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

      protected Environment getEnvironment()