use super::*;
#[derive(Clone, Debug, Default)]
pub enum DrawCmd {
Fill {
path: Path,
paint: Fill,
opacity: f64,
},
Stroke {
path: Path,
paint: Stroke,
style: LineStyle,
opacity: f64,
},
Text {
text: String,
x: f64,
y: f64,
style: TextStyle,
},
Image {
image: HtmlImageElement,
x: f64,
y: f64,
width: f64,
height: f64,
},
Clip {
path: Path,
},
#[default]
PopClip,
Strip {
points: Vec<Point>,
baseline: f32,
paint: Fill,
opacity: f64,
},
}
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub enum DrawKind {
#[default]
Fill,
Stroke,
Text,
Image,
Clip,
PopClip,
Strip,
}