Text

Draws text: handles updates, formatting and styling.

Constructors

this
this(T node, string text)
Undocumented in source.
this
this(Text text)

Copy the text, clear ownership and texture.

Destructor

~this
~this()
Undocumented in source.

Alias This

value

Members

Aliases

minSize
alias minSize = size
Undocumented in source.

Functions

backend
inout(FluidBackend) backend()
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(Style style, Vector2 position)

Draw the text.

draw
void draw(Style style, Rectangle rectangle)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
string opAssign(string text)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
string opOpAssign(string text)
Undocumented in source. Be warned that the author may not have intended to support it.
resize
void resize()

Set new bounding box for the text and redraw it.

resize
void resize(Vector2 space, bool wrap)

Set new bounding box for the text; wrap the text if it doesn't fit in boundaries. Redraw it.

size
Vector2 size()

Get the size of the text.

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

node
T node;

Node owning this text struct.

texture
Texture texture;

Texture generated by the struct. Note: Lifetime of the texture is managed by the struct. The texture will be destroyed every time the text changes.

value
string value;

Underlying text.

Meta