Module technology.sola.engine
Class ConvexPolygonRendererComponent
java.lang.Object
technology.sola.engine.graphics.components.ConvexPolygonRendererComponent
- All Implemented Interfaces:
technology.sola.ecs.Component
@NullMarked
public class ConvexPolygonRendererComponent
extends Object
implements technology.sola.ecs.Component
ConvexPolygonRendererComponent is a
Component containing data for rendering 2d convex polygons.-
Constructor Summary
ConstructorsConstructorDescriptionConvexPolygonRendererComponent(Color color, boolean isFilled, ConvexPolygon convexPolygon) Creates a ConvexPolygonRendererComponent of desired color that is either filled or not filled. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface technology.sola.ecs.Component
afterDeserialize
-
Constructor Details
-
ConvexPolygonRendererComponent
Creates a ConvexPolygonRendererComponent of desired color that is either filled or not filled.- Parameters:
color- theColorof the convex polygonisFilled- whether the convex polygon should be filled or notconvexPolygon- the shape of the convex polygon to be rendered
-
-
Method Details
-
getColor
- Returns:
- the
Colorof the convex polygon
-
isFilled
public boolean isFilled()- Returns:
- true if the convex polygon should be filled when rendered
-
setColor
Sets theColorfor rendering.- Parameters:
color- the new color
-
setFilled
public void setFilled(boolean filled) Sets whether the convex polygon should be filled or not.- Parameters:
filled- the new filled status
-
getConvexPolygon
- Returns:
- the shape of the convex polygon to be rendered
-