pub struct GlyphQuad {
pub depth: u32,
pub x: u16,
pub y: u16,
pub width: u16,
pub height: u16,
pub atlas_x: u16,
pub atlas_y: u16,
}Expand description
One glyph drawn as a glyph quad: the whole-pixel rectangle its single
rect instance covers, and the atlas texel under that rectangle’s top-left
corner (see [crate::text]’s backend for when a glyph is one).
The draw it belongs to is an EngineDraw with the run’s shared record as
its paint, found by its painter-order depth, which no two draws of a frame
share. Its strip range is empty unless the glyph was drawn inside an
isolated layer, where it carries the rectangle’s own coverage so the
recorder can fold its bounds into the layer’s: the renderer draws a quad
from this alone — one rect instance, no edge coverage (the rectangle lands
on whole pixels), its payload this atlas texel — and never from strips.
Fields§
§depth: u32The depth of the draw this quad is.
x: u16Left edge in device pixels, already trimmed to the viewport and the clip stack’s scissor.
y: u16Top edge in device pixels, trimmed likewise.
width: u16Width in device pixels; never zero.
height: u16Height in device pixels; never zero.
atlas_x: u16Atlas texel column under the rectangle’s left edge.
atlas_y: u16Atlas texel row under the rectangle’s top edge.
Trait Implementations§
impl Copy for GlyphQuad
impl Eq 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.