use crate::*;
pub trait Renderable {
fn draw(&self, context: &CanvasRenderingContext2d, transform: &Transform2D);
}
pub trait RenderBackend {
fn clear(&self);
fn clear_with_color(&self, color: &str);
fn save(&self);
fn restore(&self);
fn set_fill_color(&self, color: &str);
fn set_stroke_color(&self, color: &str);
fn set_line_width(&self, width: f64);
fn set_global_alpha(&self, alpha: f64);
fn set_blend_mode(&self, mode: BlendMode);
fn set_shadow(&self, config: &ShadowConfig);
fn clear_shadow(&self);
fn fill_rect(&self, position: Vector2D, width: f64, height: f64);
fn stroke_rect(&self, position: Vector2D, width: f64, height: f64);
fn fill_circle(&self, center: Vector2D, radius: f64);
fn stroke_circle(&self, center: Vector2D, radius: f64);
fn draw_line(&self, start: Vector2D, end: Vector2D);
fn fill_text(&self, text: &str, position: Vector2D);
fn set_font(&self, font: &str);
fn draw_image(&self, image: &HtmlImageElement, position: Vector2D, width: f64, height: f64);
fn set_linear_gradient_fill(&self, gradient: &LinearGradient);
fn set_radial_gradient_fill(&self, gradient: &RadialGradient);
}