pub struct PreloadedImageData {
    pub data: Vec<u8>,
    pub width: u32,
    pub height: u32,
    pub mime: String,
}
Expand description

Use this struct to preload, decode and cache images for the upcoming rendering.

Fields

data: Vec<u8>

The decoded image data. Make sure that if you submit the data directly it must be blended for semi transparent colors.

width: u32

The width of image in pixels

height: u32

The height of image in pixels

mime: String

The image mime type (png/jpg)

Implementations

Creates a new PreloadedImageData from the given rgba8 buffer and blends all the semi transparent colors.

Trait Implementations

Formats the value using the given formatter. 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

Returns the argument unchanged.

Calls U::from(self).

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

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.