iced-yoda/graphics/src/layer/image.rs

28 lines
563 B
Rust
Raw Normal View History

use crate::{Color, Rectangle};
2022-11-03 04:35:16 +01:00
use iced_native::{image, svg};
/// A raster or vector image.
#[derive(Debug, Clone)]
pub enum Image {
/// A raster image.
Raster {
/// The handle of a raster image.
handle: image::Handle,
/// The bounds of the image.
bounds: Rectangle,
},
/// A vector image.
Vector {
/// The handle of a vector image.
handle: svg::Handle,
/// The [`Color`] filter
color: Option<Color>,
/// The bounds of the image.
bounds: Rectangle,
},
}