use crate::{Angle, Length, Point, PreserveAspectRatio, Rgba, Transform};
pub trait Renderer {
type Error;
fn clear(&mut self);
fn pop(&mut self, n: usize);
fn push_entity(&mut self, id: &str);
fn push_canvas(&mut self, width: Length, height: Length);
fn push_viewbox(&mut self, width: Length, height: Length);
fn push_preserve_aspect_ratio(&mut self, ratio: PreserveAspectRatio);
fn push_transform(&mut self, transform: Transform);
fn push_fill(&mut self, color: Rgba);
fn push_stroke(&mut self, color: Rgba, width: Length);
fn push_label(&mut self, label: &str);
fn entity_ref(&mut self, id: &str);
fn line(&mut self, from: Point, to: Point);
fn quadratic_bezier(&mut self, from: Point, ctrl: Point, to: Point);
fn cubic_bezier(&mut self, from: Point, ctrl1: Point, ctrl2: Point, to: Point);
fn arc(
&mut self,
center: Point,
raddii: (Length, Length),
start_angle: Angle,
sweep_angle: Angle,
x_rotation: Angle,
);
fn submit(&mut self) -> Result<(), Self::Error>;
}