pub trait Renderer: Renderer {
type Handle: Clone;
// Required methods
fn measure_image(&self, handle: &Self::Handle) -> Size<u32>;
fn draw_image(
&mut self,
handle: Self::Handle,
filter_method: FilterMethod,
bounds: Rectangle,
rotation: Radians,
opacity: f32,
border_radius: [f32; 4],
);
}
Expand description
A Renderer
that can render raster graphics.
Required Associated Types§
Required Methods§
sourcefn measure_image(&self, handle: &Self::Handle) -> Size<u32>
fn measure_image(&self, handle: &Self::Handle) -> Size<u32>
Returns the dimensions of an image for the given Handle
.
sourcefn draw_image(
&mut self,
handle: Self::Handle,
filter_method: FilterMethod,
bounds: Rectangle,
rotation: Radians,
opacity: f32,
border_radius: [f32; 4],
)
fn draw_image( &mut self, handle: Self::Handle, filter_method: FilterMethod, bounds: Rectangle, rotation: Radians, opacity: f32, border_radius: [f32; 4], )
Draws an image with the given Handle
and inside the provided
bounds
.
Object Safety§
This trait is not object safe.