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,
ReadFrame(Shade),
BeginEffect(Shade),
EndEffect,
}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.
ReadFrame(Shade)
A marker for a shader that reads the frame: the engine renders what comes before it, runs the shader on those pixels and draws the rest over the result. Renderers skip it.
BeginEffect(Shade)
A marker for a node whose own pixels a shader changes. Items up to
the matching Primitive::EndEffect are drawn alone, shaded, and
laid back over the frame. Renderers skip it.
EndEffect
Ends the node of the matching Primitive::BeginEffect.
Implementations§
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