[][src]Trait iced_audio::native::knob::Renderer

pub trait Renderer: Renderer {
    type Style: Default;
    fn diameter(&self, style_sheet: &Self::Style) -> u16;
fn draw(
        &mut self,
        bounds: Rectangle,
        cursor_position: Point,
        normal: Normal,
        is_dragging: bool,
        style: &Self::Style
    ) -> Self::Output; }

The renderer of a Knob.

Your renderer will need to implement this trait before being able to use a Knob in your user interface.

Associated Types

type Style: Default

The style supported by this renderer.

Loading content...

Required methods

fn diameter(&self, style_sheet: &Self::Style) -> u16

returns the diameter of the Knob

fn draw(
    &mut self,
    bounds: Rectangle,
    cursor_position: Point,
    normal: Normal,
    is_dragging: bool,
    style: &Self::Style
) -> Self::Output

Draws a Knob.

It receives:

  • the bounds of the Knob
  • the current cursor position
  • the current normal of the Knob
  • the local state of the Knob
  • the style of the Knob
Loading content...

Implementations on Foreign Types

impl Renderer for Renderer[src]

type Style = Box<dyn StyleSheet>

Loading content...

Implementors

Loading content...