pub enum ImageData {
Color(ColorImage),
Font(FontImage),
}
Expand description
An image stored in RAM.
To load an image file, see ColorImage::from_rgba_unmultiplied
.
In order to paint the image on screen, you first need to convert it to
See also: ColorImage
, FontImage
.
Variants§
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for ImageData
impl<'de> Deserialize<'de> for ImageData
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ColorImage> for ImageData
impl From<ColorImage> for ImageData
source§fn from(image: ColorImage) -> Self
fn from(image: ColorImage) -> Self
Converts to this type from the input type.