mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 22:54:36 +00:00
Fix some warnings
This commit is contained in:
parent
c7ff67d0fc
commit
e4900f52b8
1 changed files with 5 additions and 1 deletions
|
@ -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>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue