Interface IRenderable

All Known Implementing Classes:
Ability, AmbientLight, AStarGrid, CheckBox, ColorLayer, DropdownListField, Emitter, EntityEmitter, EntityNavigator, Environment, GameMetrics, GameScreen, GuiComponent, HorizontalSlider, ImageComponent, ImageComponentList, LightSource, ListField, Menu, MouseCursor, MouseDrawComponent, NumberAdjuster, Screen, Slider, SpeechBubble, StaticShadowLayer, TextFieldComponent, VerticalSlider
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface IRenderable
A functional interface which indicates that implementing instances can render some visual content onto a provided graphics context.
See Also:
Graphics2D
  • Method Summary

    Modifier and TypeMethodDescription
    voidrender​(java.awt.Graphics2D g)
    Renders the visual contents of this instance onto the provided graphics context.
  • Method Details

    • render

      void render​(java.awt.Graphics2D g)
      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.

      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)