Rerasterize SVGs when resized and refactor a bit
This commit is contained in:
parent
27717bc70c
commit
09707f29fc
8 changed files with 543 additions and 273 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue