Struct gust_render::text::Text

source ·
pub struct Text { /* private fields */ }
Expand description

Text struct

Text is a drawable entity that can be used to display text. The text need a MutResource because the text mut the internal texture of his font.

Implementations

Dump the font texture to a file

Create a new text from a font previously created

Create a text from it’s content and a font

Set the content of the text

Get the content of the text as &String

Get the content of the text as &mut String

Set the local font size

Get the local font size

Trait Implementations

Formats the value using the given formatter. Read more
Update the openGL state of the drawable entity Should be call often so be carefull when implementing. Read more
Draw the drawable structure, you need a Drawer(Where the struct will be draw)
Draw with a particular context
Setup the draw for the final system you don’t have to implement it in a normal drawable
Mutable version of draw function.
Mutable draw context function.
Move the sprite off the offset
Set position of the sprite
Get current position
Rotate from the actual angle with the angle given in argument.
Set the rotation of the Rotable struct.
Return the rotation of the struct.
Scale the sprite from a factor
Set the scale of the sprite
Get the current scale
Move the sprite off the offset.
Set the origin of the object.
Get the origin of the transformable.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
Sets value as a parameter of self.
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.