#[non_exhaustive]pub enum Layer {
Shape(Shape),
Gradient {
path: Vec<PathSegment>,
top: (f32, Color),
bottom: (f32, Color),
},
Dashed {
path: Vec<PathSegment>,
width: f32,
dash: f32,
color: Color,
},
Clipped {
rect: Rect,
layer: Box<Layer>,
},
}Expand description
What a picture is made of, for rasterize_layers: Shapes, plus what only
a picture can show.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Shape(Shape)
A filled and/or outlined shape.
Gradient
An outline filled from one color at the top to another at the bottom.
Fields
§
path: Vec<PathSegment>Its outline.
Dashed
An outline drawn in dashes.
Fields
§
path: Vec<PathSegment>Its outline.
Clipped
Another layer, seen only inside a rectangle. Outputs that only write shapes write it whole.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Layer
Auto Trait Implementations§
impl Freeze for Layer
impl RefUnwindSafe for Layer
impl Send for Layer
impl Sync for Layer
impl Unpin for Layer
impl UnsafeUnpin for Layer
impl UnwindSafe for Layer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more