Skip to main content

PlacedGlyph

Struct PlacedGlyph 

Source
pub struct PlacedGlyph {
    pub glyph: CachedGlyph,
    pub x: i32,
    pub y: i32,
    pub key: u64,
    pub color_rgba: Option<Arc<ColorGlyph>>,
}
Expand description

One glyph placed by layout_glyphs: the cached rasterization plus its top-left pixel position and a stable atlas key (D109/Phase 27 Step 4).

Fields§

§glyph: CachedGlyph§x: i32

Top-left of the glyph bitmap, physical px.

§y: i32§key: u64

Stable across frames: px_bits << 32 | char << 1 | wants_bold. Face routing is deterministic per (char, bold), so this fully identifies the rasterization without exposing FaceKey.

§color_rgba: Option<Arc<ColorGlyph>>

Some for a color-emoji glyph (Phase 32 Step 4) — glyph above is then a cheap zero-size placeholder (never read) and consumers must blit this RGBA bitmap directly instead of using glyph’s coverage mask. Reuses the same premultiplied-RGBA-quad pipeline DrawCommand::BlitRgba (the Image widget) already established in both the CPU and GPU-shapes paths, rather than adding a second coverage-atlas page — real color rendering with no new render primitive.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.