pub trait Renderer: Rendererwhere
Self::Theme: StyleSheet,{
// Required method
fn draw(
&mut self,
bounds: Rectangle,
cursor_position: Point,
normal: Normal,
dragging_status: bool,
style_sheet: &dyn StyleSheet<Style = <Self::Theme as StyleSheet>::Style>,
style: &<Self::Theme as StyleSheet>::Style,
direction: RampDirection
);
}
Expand description
The renderer of a Ramp
.
Your renderer will need to implement this trait before being
able to use a Ramp
in your user interface.
Draws a Ramp
.
It receives:
- the bounds of the
Ramp
- the current cursor position
- the current normal of the
Ramp
- whether the ramp is currently being dragged
- the style of the
Ramp
- the direction of the ramp line of the
Ramp