pub enum Primitive {
Fill {
path: BezPath,
paint: Paint,
},
Stroke {
path: BezPath,
paint: Paint,
style: StrokeStyle,
},
Image {
image: Rc<RasterImage>,
rect: Rect,
opacity: f64,
},
PushLayer(Layer),
PopLayer,
}Expand description
A drawing operation in a DrawItem.
Variants§
Fill
Non-zero winding fill.
Stroke
Stroked outline.
Fields
§
style: StrokeStyleWidth, caps, joins and dashes.
Image
A raster image.
Fields
§
image: Rc<RasterImage>Decoded pixels.
PushLayer(Layer)
Starts a layer; items until the matching PopLayer go into it.
PopLayer
Ends the innermost layer and composites it.
Trait Implementations§
Auto Trait Implementations§
impl !Send for Primitive
impl !Sync for Primitive
impl Freeze for Primitive
impl RefUnwindSafe for Primitive
impl Unpin for Primitive
impl UnsafeUnpin for Primitive
impl UnwindSafe for Primitive
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