summaryrefslogtreecommitdiffstats
path: root/wgpu/src/primitive.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-15 06:19:07 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-15 06:19:07 +0100
commit09707f29fcf7fbd71570a43db214921043427c3f (patch)
treeb3e045a64e81f58910c976b0478e6f7f91780ad0 /wgpu/src/primitive.rs
parent27717bc70c3947f553a8b75da9789fe967994a31 (diff)
downloadiced-09707f29fcf7fbd71570a43db214921043427c3f.tar.gz
iced-09707f29fcf7fbd71570a43db214921043427c3f.tar.bz2
iced-09707f29fcf7fbd71570a43db214921043427c3f.zip
Rerasterize SVGs when resized and refactor a bit
Diffstat (limited to 'wgpu/src/primitive.rs')
-rw-r--r--wgpu/src/primitive.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/wgpu/src/primitive.rs b/wgpu/src/primitive.rs
index 04264e5d..958cc17f 100644
--- a/wgpu/src/primitive.rs
+++ b/wgpu/src/primitive.rs
@@ -1,6 +1,6 @@
use iced_native::{
- image, Background, Color, Font, HorizontalAlignment, Rectangle, Vector,
- VerticalAlignment,
+ image, svg, Background, Color, Font, HorizontalAlignment, Rectangle,
+ Vector, VerticalAlignment,
};
/// A rendering primitive.
@@ -46,6 +46,14 @@ pub enum Primitive {
/// The bounds of the image
bounds: Rectangle,
},
+ /// An SVG primitive
+ Svg {
+ /// The path of the SVG file
+ handle: svg::Handle,
+
+ /// The bounds of the viewport
+ bounds: Rectangle,
+ },
/// A clip primitive
Clip {
/// The bounds of the clip