pub struct Texture {
pub version: u64,
pub width: usize,
pub height: usize,
pub pixels: Vec<u8>,
}
Expand description
An 8-bit texture containing font data.
e.g. a hash of the data. Use this to detect changes!
If the texture changes, this too will change.
White color with the given alpha (linear space 0-255).
Returns the textures as sRGBA
premultiplied pixels, row by row, top to bottom.
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
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
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
)
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.