Package com.xebisco.yield.manager
Interface GraphicsManager
- All Superinterfaces:
AutoCloseable,Closeable,Renderer
The
GraphicsManager interface is a wrapper around the platform's graphics API. It's a simple class that provides a
few functions for drawing to the screen-
Method Summary
Modifier and TypeMethodDescriptionvoidfinish()voidinit(PlatformInit platformInit) Initializes the platform graphicsvoidsetCamera(Transform2D camera) The function sets the position of the camera in a 2D space.booleanReturns true if the user has requested that the application close.voidvoidupdateWindowIcon(Texture icon, FileIOManager ioManager) This function updates the icon the window using a texture.
-
Method Details
-
init
Initializes the platform graphics- Parameters:
platformInit- This is a struct that contains the parameters that will be used to init the graphics.
-
updateWindowIcon
This function updates the icon the window using a texture.- Parameters:
icon- The "icon" parameter is a Texture object that represents the image that will be used as the icon for the window. This function updates the icon of the window to the specified texture.ioManager- The ioManager used to load the window icon file.
-
shouldClose
boolean shouldClose()Returns true if the user has requested that the application close.- Returns:
- A boolean value.
-
start
-
finish
void finish() -
setCamera
The function sets the position of the camera in a 2D space.- Parameters:
camera- The parameter "camera" is a Vector2D object that represents the position of the camera in a 2D space.
-