use crate::primitives::{Affine, Image, Paint, Path, Point, Rect, Stroke, TextStyle};
pub trait Renderer {
fn size(&self) -> (u32, u32);
fn fill_path(&mut self, path: &Path, paint: &Paint, transform: Affine);
fn stroke_path(&mut self, path: &Path, paint: &Paint, stroke: &Stroke, transform: Affine);
fn draw_text(&mut self, text: &str, pos: Point, style: &TextStyle, transform: Affine);
fn draw_image(&mut self, img: &Image, dst: Rect, transform: Affine);
fn push_clip(&mut self, path: &Path, transform: Affine);
fn pop_clip(&mut self);
fn measure_text(&self, text: &str, style: &TextStyle) -> (f64, f64);
fn finalize(self) -> Vec<u8>;
}