use super::*;
#[derive(Clone, Debug, PartialEq)]
pub enum DrawCommand {
FillRect {
position: Vector2D,
width: f64,
height: f64,
color: Color,
},
StrokeRect {
position: Vector2D,
width: f64,
height: f64,
color: Color,
line_width: f64,
},
FillCircle {
center: Vector2D,
radius: f64,
color: Color,
},
StrokeCircle {
center: Vector2D,
radius: f64,
color: Color,
line_width: f64,
},
Line {
start: Vector2D,
end: Vector2D,
color: Color,
line_width: f64,
},
FillText {
text: String,
position: Vector2D,
color: Color,
font: String,
},
DrawSprite {
image: HtmlImageElement,
source: Rect,
transform: Transform2D,
},
DrawImageRect {
image: HtmlImageElement,
source: Rect,
dest_position: Vector2D,
dest_width: f64,
dest_height: f64,
},
SetGlobalAlpha {
alpha: f64,
},
SetBlendMode {
mode: BlendMode,
},
DrawNineSlice {
image: HtmlImageElement,
insets: NineSliceInsets,
dest_position: Vector2D,
dest_width: f64,
dest_height: f64,
},
DrawAtlasRegion {
image: HtmlImageElement,
source: Rect,
dest_position: Vector2D,
dest_width: f64,
dest_height: f64,
},
}