TextRenderer

Renders multiline text in RareEngine2 with full font customization support

Overview

The TextRenderer class extends Renderer and is used to draw text onto the canvas. It supports custom fonts, alignment, color, and text styling.

Field Summary

Enum: FontFrom

Method Summary

void render(Canvas canvas, GameObject object, Paint p, GameView gv)
Draws the text to the canvas based on alignment, font, size, and styling.
FontFrom getFontFrom() / void setFontFrom(FontFrom fontfrom)
Gets or sets the source from which the font is loaded.
float getFontSize() / void setFontSize(float fontSize)
Gets or sets the font size in pixels.
String getText() / void setText(String text)
Gets or sets the text to render.
String getFontPath() / void setFontPath(String fontpath)
Gets or sets the path to the font file.
int getTextcolor() / void setTextcolor(int textcolor)
Gets or sets the text color.
int getFontResourceId() / void setFontResourceId(int fontResourceId)
Gets or sets the font resource ID for loading fonts from Android resources.
boolean isCentered() / void setCentered(boolean centered)
Checks or sets whether the text is horizontally centered.
boolean isBold() / void setBold(boolean isBold)
Checks or sets whether the text should be bold.