use crate::{
BoxShadowCommand, Color, ImageCommand, RectCommand, SystemTheme, TextCommand, TextMeasurer, TriangleCommand,
};
pub trait RenderBackend {
fn text_measurer(&mut self) -> &mut dyn TextMeasurer;
fn begin_frame(&mut self, background: Color, width: u32, height: u32) -> bool;
fn draw_rects(&mut self, cmds: &[RectCommand]);
fn draw_triangles(&mut self, cmds: &[TriangleCommand]);
fn draw_images(&mut self, cmds: &[ImageCommand]);
fn draw_box_shadows(&mut self, cmds: &[BoxShadowCommand]);
fn draw_text(&mut self, theme: SystemTheme, scale_factor: f32, cmd: &TextCommand);
fn take_text_decorations(&mut self) -> Vec<RectCommand>;
fn flush_text(&mut self);
fn end_frame(&mut self);
fn resize(&mut self, width: u32, height: u32);
}