pub trait Render {
// Required method
fn render(&self, loc: Vec2, buffer: &mut Buffer) -> Vec2;
// Provided methods
fn size(&self) -> Vec2 { ... }
fn render_clipped(
&self,
loc: Vec2,
clip_size: Vec2,
buffer: &mut Buffer,
) -> Vec2 { ... }
}Expand description
The main trait that allows for rendering an element at a location to the buffer. Render’s return type is the location the render ended at.