Package de.tum.cit.ase.editor.tools
Interface Tool
- All Known Implementing Classes:
Bucket,EditorTool,Eraser,Pen,Square
An interface representing a tool in an editor.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(com.badlogic.gdx.graphics.glutils.ShapeRenderer shapeRenderer) Draws using the provided ShapeRenderer.getInstance(Canvas canvas) Retrieves an instance of the Tool class with the provided Canvas.voidvalidate()Validates the current state of the tool.
-
Method Details
-
getInstance
Retrieves an instance of the Tool class with the provided Canvas.- Parameters:
canvas- The Canvas object to associate with the Tool instance.- Returns:
- The Tool instance with the provided Canvas.
-
draw
void draw(@WillNotClose com.badlogic.gdx.graphics.glutils.ShapeRenderer shapeRenderer) Draws using the provided ShapeRenderer.- Parameters:
shapeRenderer- the ShapeRenderer object to use for drawing
-
validate
void validate()Validates the current state of the tool. This method is called internally to ensure the tool is in a valid state. It performs necessary validations and updates to the tool's internal state.
-