Package dev.prozilla.pine.core.rendering
Class HeadlessRenderer
java.lang.Object
dev.prozilla.pine.core.rendering.Renderer
dev.prozilla.pine.core.rendering.HeadlessRenderer
- All Implemented Interfaces:
Destructible,Initializable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the drawing area.voiddrawDebugText(CharSequence text, float x, float y) Draw debug text at the specified position.voiddrawText(Font font, CharSequence text, float x, float y, float z) Draw text at the specified position.voiddrawTextureRegion(TextureAsset texture, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float z, float s1, float t1, float s2, float t2, Color c) Draws a texture region on specified coordinates.voidflush()Flushes the data to the GPU to let it get rendered.intCalculates total height of a debug text.intCalculates total width of a debug text.intgetTextHeight(Font font, CharSequence text) Calculates total height of a text.intgetTextWidth(Font font, CharSequence text) Calculates total width of a text.voidinit()Initializes this object to prepare its usage.voidvoidresize()Updates the projection matrix according to the window's dimensions.voidsetRegion(int x, int y, int width, int height) Limits the rendering to the given region.Methods inherited from class dev.prozilla.pine.core.rendering.Renderer
begin, destroy, drawDebugText, drawRect, drawRect, drawRotatedTexture, drawRotatedTexture, drawRotatedTextureRegion, drawRotatedTextureRegion, drawRotatedTextureRegion, drawRotatedTextureRegion, drawText, drawText, drawText, drawTexture, drawTexture, drawTextureRegion, drawTextureRegion, drawTextureRegion, drawTextureRegion, drawTriangle, drawTriangles, end, getConfig, getFallbackColor, getFrameBufferObject, getHeight, getTextHeight, getTextSize, getTextSize, getTextWidth, getViewportCenter, getWidth, initPreview, isRendering, outOfBounds, outOfBounds, outOfBounds, outOfBounds, resetMirror, resetScale, resetTransform, setMirrorHorizontally, setMirrorVertically, setRegion, setScale, setScale
-
Constructor Details
-
HeadlessRenderer
-
-
Method Details
-
init
public void init()Description copied from interface:InitializableInitializes this object to prepare its usage.- Specified by:
initin interfaceInitializable- Overrides:
initin classRenderer
-
setRegion
public void setRegion(int x, int y, int width, int height) Description copied from class:RendererLimits the rendering to the given region. -
resetRegion
public void resetRegion()- Overrides:
resetRegionin classRenderer
-
getTextHeight
Description copied from class:RendererCalculates total height of a text.- Overrides:
getTextHeightin classRenderer- Parameters:
text- The text- Returns:
- Total width of the text
-
getTextWidth
Description copied from class:RendererCalculates total width of a text.- Overrides:
getTextWidthin classRenderer- Parameters:
text- The text- Returns:
- Total width of the text
-
getDebugTextHeight
Description copied from class:RendererCalculates total height of a debug text.- Overrides:
getDebugTextHeightin classRenderer- Parameters:
text- The text- Returns:
- Total width of the text
-
getDebugTextWidth
Description copied from class:RendererCalculates total width of a debug text.- Overrides:
getDebugTextWidthin classRenderer- Parameters:
text- The text- Returns:
- Total width of the text
-
resize
public void resize()Description copied from class:RendererUpdates the projection matrix according to the window's dimensions. -
flush
public void flush()Description copied from class:RendererFlushes the data to the GPU to let it get rendered. -
clear
public void clear()Description copied from class:RendererClears the drawing area. -
drawText
Description copied from class:RendererDraw text at the specified position. -
drawDebugText
Description copied from class:RendererDraw debug text at the specified position.- Overrides:
drawDebugTextin classRenderer- Parameters:
text- TextRenderer to drawx- X coordinate of the text positiony- Y coordinate of the text position
-
drawTextureRegion
public void drawTextureRegion(TextureAsset texture, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float z, float s1, float t1, float s2, float t2, Color c) Description copied from class:RendererDraws a texture region on specified coordinates.- Overrides:
drawTextureRegionin classRenderer
-