Fix some warnings

This commit is contained in:
Olivier Goffart 2021-01-06 10:23:16 +01:00 committed by Simon Hausmann
parent c7ff67d0fc
commit e4900f52b8

View file

@ -96,8 +96,12 @@ pub(crate) fn free_item_rendering_data<'a, Backend: GraphicsBackend>(
}
}
/// Trait used to render each items.
///
/// The item needs to be rendered relative to its (x,y) position. For example,
/// draw_rectangle should draw a rectangle in `(pos.x + rect.x, pos.y + rect.y)`
#[allow(missing_docs)]
pub trait ItemRenderer {
/// will draw a rectangle in (pos.x + rect.x)
fn draw_rectangle(&mut self, pos: Point, rect: Pin<&Rectangle>);
fn draw_border_rectangle(&mut self, pos: Point, rect: Pin<&BorderRectangle>);
fn draw_image(&mut self, pos: Point, image: Pin<&Image>);