use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
pub struct Point {
pub x: f64,
pub y: f64,
}
impl Point {
pub fn new(x: f64, y: f64) -> Self {
Self { x, y }
}
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum Instruction {
MoveTo { x: f64, y: f64 },
LineTo { x: f64, y: f64 },
CubicCurveTo {
x1: f64,
y1: f64,
x2: f64,
y2: f64,
x: f64,
y: f64,
},
QuadCurveTo { x1: f64, y1: f64, x: f64, y: f64 },
ClosePath,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EvolvedPath {
pub stroke_dasharray: String,
pub stroke_dashoffset: f64,
}