TextRendererComponent
Declaration
public class Strawberry.Graphics.Text.TextRendererComponent
A component that renders text through a SpriteLayer.
Inherits: Strawberry.Core.BaseComponent
Properties
Layer
Gets or sets the sprite layer used for rendering the text.
SpriteLayer Layer { get set }
Font
Gets or sets the font used to draw the text.
Font Font { get set }
Position
Gets or sets the position of the rendered text.
Vector2 Position { get set }
Text
Gets or sets the text string to render.
string Text { get set }
Color
Gets or sets the text color.
Color Color { get set }
Size
Gets or sets the font size used for rendering.
float Size { get set }
TextAlign
Gets or sets the alignment of the text.
TextAlign TextAlign { get set }
TextDirection
Gets or sets the direction in which text is rendered. Default is right-to-left.
TextDirection TextDirection { get set }
Methods
OnRender override
Called when the component should render its content.
void OnRender()