summaryrefslogtreecommitdiffstats
path: root/graphics/src/layer/image.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-11-03 18:57:09 +0100
committerLibravatar GitHub <noreply@github.com>2022-11-03 18:57:09 +0100
commitd222b5c8b0befab665c20ba0112b28199df0ae44 (patch)
tree0ac3a59f04e1c1ca89ff43800efbefd825b015ea /graphics/src/layer/image.rs
parenta8f510c39917b2ac42fcc854f0a7eff13aee9838 (diff)
parentf31c8f2504ea7c004c5caed8913e5da28d2e50e2 (diff)
downloadiced-d222b5c8b0befab665c20ba0112b28199df0ae44.tar.gz
iced-d222b5c8b0befab665c20ba0112b28199df0ae44.tar.bz2
iced-d222b5c8b0befab665c20ba0112b28199df0ae44.zip
Merge pull request #1448 from bungoboingo/fear/linear-gradients
Add linear gradient support to canvas widget
Diffstat (limited to 'graphics/src/layer/image.rs')
-rw-r--r--graphics/src/layer/image.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/graphics/src/layer/image.rs b/graphics/src/layer/image.rs
new file mode 100644
index 00000000..045ec665
--- /dev/null
+++ b/graphics/src/layer/image.rs
@@ -0,0 +1,23 @@
+use crate::Rectangle;
+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 bounds of the image.
+ bounds: Rectangle,
+ },
+}