diff options
Diffstat (limited to 'wgpu/src/layer/image.rs')
-rw-r--r-- | wgpu/src/layer/image.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/wgpu/src/layer/image.rs b/wgpu/src/layer/image.rs new file mode 100644 index 00000000..0de589f8 --- /dev/null +++ b/wgpu/src/layer/image.rs @@ -0,0 +1,27 @@ +use crate::core::image; +use crate::core::svg; +use crate::core::{Color, Rectangle}; + +/// 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, + }, +} |