pub struct GlyphQuad {
pub screen: [f32; 4],
pub atlas: [f32; 4],
pub color: [f32; 4],
}Expand description
A positioned glyph to draw as a textured quad from the atlas.
The adapter draws the rectangle at screen position, sampling from
the atlas rectangle in the atlas texture, tinted with color.
Fields§
§screen: [f32; 4]Screen position and size: [x, y, width, height] in pixels.
atlas: [f32; 4]Atlas source rectangle: [x, y, width, height] in atlas pixel coordinates.
color: [f32; 4]Glyph color: [r, g, b, a], 0.0-1.0.
For normal text glyphs, this is the text color (default black).
For color emoji, this is [1, 1, 1, 1] (color is baked into the atlas).
Auto Trait Implementations§
impl Freeze for GlyphQuad
impl RefUnwindSafe for GlyphQuad
impl Send for GlyphQuad
impl Sync for GlyphQuad
impl Unpin for GlyphQuad
impl UnsafeUnpin for GlyphQuad
impl UnwindSafe for GlyphQuad
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