pub enum Draw {
Fill(BezPath, Paint),
Stroke(BezPath, f32, Color),
Glyphs(FontData, f32, Color, Vec<i16>, Vec<Glyph>),
PushClip(BezPath),
PushOpacity(f32, Option<BezPath>),
PushAdd(BezPath),
Pop,
}Expand description
One drawing command, in scene pixels: what both vello backends replay. Every decision about the drawing is made before a command is made; a backend only translates it into its library’s call.
Variants§
Fill(BezPath, Paint)
Stroke(BezPath, f32, Color)
Glyphs(FontData, f32, Color, Vec<i16>, Vec<Glyph>)
A glyph run: its font, size and color, its point on the font’s variation axes — empty for a static font — and its glyphs.
PushClip(BezPath)
PushOpacity(f32, Option<BezPath>)
A layer drawn at an opacity, cut to the path — or to the whole drawing.
PushAdd(BezPath)
A layer added to what is under it, color and alpha alike, so two fills in such layers that meet edge to edge sum to exactly what is in them, with no seam where an edge pixel is partly each. Nothing in it reaches the path, which bounds it.
Pop
Auto Trait Implementations§
impl !RefUnwindSafe for Draw
impl !UnwindSafe for Draw
impl Freeze for Draw
impl Send for Draw
impl Sync for Draw
impl Unpin for Draw
impl UnsafeUnpin for Draw
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