java.lang.Object
technology.sola.engine.graphics.renderer.Layer
Layers contain a queue of
DrawItem to ensure a particular draw order.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default order for aDrawItemthat is added to this Layer. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT_ORDER
public static final int DEFAULT_ORDERThe default order for aDrawItemthat is added to this Layer.- See Also:
-
-
Constructor Details
-
Layer
Creates a Layer with an identifier name.- Parameters:
name- the name of the layer
-
-
Method Details
-
add
- Parameters:
drawItem- theDrawItemto be drawn
-
add
- Parameters:
drawItem- theDrawItemto be drawnorder- higher numbers will be drawn later
-
draw
Draw this Layer to aRenderer.- Parameters:
renderer- theRendererto draw to
-
isActive
public boolean isActive()Return if this layer is active or not. A layer that is not active will not render any of itsDrawItems.- Returns:
- true if active
-
setActive
public void setActive(boolean isActive) Sets the active state of this layer.- Parameters:
isActive- the new active state
-
getName
- Returns:
- the identifier name of this layer
-