pub struct TextStyle<'a> {
pub font: &'a str,
pub scale: f32,
pub color: Color,
pub shadow: bool,
}Expand description
2D drawing helpers, valid only within on_hud_render.
Obtain via GfxContext::draw2d.
How text is drawn: its font (empty: the default), times its size (1 =
the font’s own), its colour, whether it has a shadow.
Fields§
§font: &'a str§scale: f32§color: Color§shadow: boolTrait Implementations§
impl<'a> Copy for TextStyle<'a>
impl<'a> StructuralPartialEq for TextStyle<'a>
Auto Trait Implementations§
impl<'a> Freeze for TextStyle<'a>
impl<'a> RefUnwindSafe for TextStyle<'a>
impl<'a> Send for TextStyle<'a>
impl<'a> Sync for TextStyle<'a>
impl<'a> Unpin for TextStyle<'a>
impl<'a> UnsafeUnpin for TextStyle<'a>
impl<'a> UnwindSafe for TextStyle<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more