pub struct GlyphQuad {
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
pub u: f32,
pub v: f32,
pub u_size: f32,
pub v_size: f32,
pub color: u32,
}Expand description
One positioned glyph, ready to be drawn as a textured quad.
Fields§
§x: f32The left edge of the glyph’s bitmap, in canvas pixels.
y: f32The top edge of the glyph’s bitmap, in canvas pixels.
width: f32The width of the glyph’s bitmap, in canvas pixels.
height: f32The height of the glyph’s bitmap, in canvas pixels.
u: f32The horizontal texture coordinate of the glyph’s top-left corner.
v: f32The vertical texture coordinate of the glyph’s top-left corner.
u_size: f32The width of the glyph’s bitmap in texture coordinates.
v_size: f32The height of the glyph’s bitmap in texture coordinates.
color: u32The packed colour of the glyph, as 0xRRGGBBAA.
A rich-text run carries its own colour; a plain run leaves the colour at zero, which means “use the colour of the label”.
Trait Implementations§
impl Copy for GlyphQuad
impl StructuralPartialEq for GlyphQuad
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