pub trait Backend {
// Required methods
fn get_composition_op(&self, opts: &DrawOptions) -> CompositionOp;
fn need_to_draw_shadow(&self, color: &Color) -> bool;
fn set_shadow_color(
&mut self,
color: AbsoluteColor,
state: &mut CanvasPaintState<'_>,
);
fn set_fill_style(
&mut self,
style: FillOrStrokeStyle,
state: &mut CanvasPaintState<'_>,
drawtarget: &dyn GenericDrawTarget,
);
fn set_stroke_style(
&mut self,
style: FillOrStrokeStyle,
state: &mut CanvasPaintState<'_>,
drawtarget: &dyn GenericDrawTarget,
);
fn set_global_composition(
&mut self,
op: CompositionOrBlending,
state: &mut CanvasPaintState<'_>,
);
fn create_drawtarget(&self, size: Size2D<u64>) -> Box<dyn GenericDrawTarget>;
fn recreate_paint_state<'a>(
&self,
state: &CanvasPaintState<'a>,
) -> CanvasPaintState<'a>;
}