Struct egui::Texture[][src]

pub struct Texture {
    pub version: u64,
    pub width: usize,
    pub height: usize,
    pub pixels: Vec<u8, Global>,
}
Expand description

An 8-bit texture containing font data.

Fields

version: u64

e.g. a hash of the data. Use this to detect changes! If the texture changes, this too will change.

width: usizeheight: usizepixels: Vec<u8, Global>

White color with the given alpha (linear space 0-255).

Implementations

Returns the textures as sRGBA premultiplied pixels, row by row, top to bottom.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

Allocate space, interact, paint, and return a Response. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.