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
Trait Implementations
sourceimpl Drawable for Text
impl Drawable for Text
sourcefn update(&mut self)
fn update(&mut self)
Update the openGL state of the drawable entity
Should be call often so be carefull when implementing. Read more
sourcefn draw<T: Drawer>(&self, target: &mut T)
fn draw<T: Drawer>(&self, target: &mut T)
Draw the drawable structure, you need a Drawer(Where the struct will be draw)
sourcefn draw_with_context(&self, context: &mut Context<'_>)
fn draw_with_context(&self, context: &mut Context<'_>)
Draw with a particular context
sourcefn setup_draw(&self, context: &mut Context<'_>)
fn setup_draw(&self, context: &mut Context<'_>)
Setup the draw for the final system you don’t have to implement it in a normal drawable
sourceimpl DrawableMut for Text
impl DrawableMut for Text
sourceimpl Rotable for Text
impl Rotable for Text
sourcefn rotate<T>(&mut self, _angle: T)where
T: Scalar + Into<f32>,
fn rotate<T>(&mut self, _angle: T)where
T: Scalar + Into<f32>,
Rotate from the actual angle with the angle given in argument.
sourcefn set_rotation<T>(&mut self, _angle: T)where
T: Scalar + Into<f32>,
fn set_rotation<T>(&mut self, _angle: T)where
T: Scalar + Into<f32>,
Set the rotation of the Rotable struct.
sourcefn get_rotation(&self) -> f32
fn get_rotation(&self) -> f32
Return the rotation of the struct.
sourceimpl Transformable for Text
impl Transformable for Text
Auto Trait Implementations
impl !RefUnwindSafe for Text
impl !Send for Text
impl !Sync for Text
impl Unpin for Text
impl !UnwindSafe for Text
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
Sets
value
as a parameter of self
.sourceimpl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
sourcefn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresourcefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).sourceunsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.sourcefn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.