pub enum DrawOp {
Rect {
rect: Rect,
rounding: f32,
fill: Color,
stroke: Stroke,
},
LineSegment {
points: [Pos2; 2],
stroke: Stroke,
},
Line {
points: Vec<Pos2>,
stroke: Stroke,
},
Circle {
center: Pos2,
radius: f32,
fill: Color,
stroke: Stroke,
},
ConvexPolygon {
points: Vec<Pos2>,
fill: Color,
stroke: Stroke,
},
Text {
rect: Rect,
anchor: Align2,
text: String,
font: Font,
color: Color,
},
RotatedText {
pos: Pos2,
anchor: Align2,
text: String,
font: Font,
color: Color,
angle: Angle,
},
TextWrapped {
rect: Rect,
anchor: Align2,
text: String,
font: Font,
color: Color,
max_width: f32,
},
Image {
rect: Rect,
hash: AssetHash,
},
}Expand description
One mark in a recorded display list, in screen space with every swatch resolved and every font at the size it is drawn — the drawing as the host would receive it, not as the render path stated it.
Variants§
Rect
LineSegment
Line
Circle
ConvexPolygon
Text
RotatedText
TextWrapped
Image
Artwork by the hash of its bytes: the Recorded::assets of the
frame that first drew it carry the payload, and every replay after
that finds it in the host’s own table.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DrawOp
impl<'de> Deserialize<'de> for DrawOp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for DrawOp
Auto Trait Implementations§
impl Freeze for DrawOp
impl RefUnwindSafe for DrawOp
impl Send for DrawOp
impl Sync for DrawOp
impl Unpin for DrawOp
impl UnsafeUnpin for DrawOp
impl UnwindSafe for DrawOp
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