pub struct TextFrame {
pub text: String,
pub font: u32,
pub size_px: f32,
pub x: f32,
pub y: f32,
pub rgba: [f32; 4],
}Expand description
One message the engine asks the renderer to draw this frame. POD —
the text/layout/font lookup all happens host-side in
TextPipeline::record.
Fields§
§text: String§font: u320 = Ubuntu-Light (default), 1 = Hack mono. Anything else
snaps to 0.
size_px: f32Body size in pixels of render height. The CPU layout step
turns this into an ab_glyph::PxScale.
x: f32Anchor centre in [0, 1] screen coords (top-left origin).
y: f32§rgba: [f32; 4]Tint colour. Alpha drives the fade phase (engine-side).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextFrame
impl RefUnwindSafe for TextFrame
impl Send for TextFrame
impl Sync for TextFrame
impl Unpin for TextFrame
impl UnwindSafe for TextFrame
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more