[][src]Struct conrod_core::widget::plot_path::PlotPath

pub struct PlotPath<X, Y, F> { /* fields omitted */ }

A widget that plots a series of lines using the given function x -> y.

The function is sampled once per pixel and the result is mapped to the widget's height.

The resulting "path" is drawn using conrod's PointPath primitive widget.

Implementations

impl<X, Y, F> PlotPath<X, Y, F>[src]

pub fn new(min_x: X, max_x: X, min_y: Y, max_y: Y, f: F) -> Self[src]

Begin building a new PlotPath widget instance.

pub fn thickness(self, thickness: Scalar) -> Self[src]

The thickness of the point path used to draw the plot.

Trait Implementations

impl<X, Y, F> Colorable for PlotPath<X, Y, F>[src]

fn color(self, color: Color) -> Self[src]

Build the type's self.$($assignee).+ with the given $Type.

impl<X, Y, F> Common for PlotPath<X, Y, F>[src]

impl<X, Y, F> Widget for PlotPath<X, Y, F> where
    X: NumCast + Clone,
    Y: NumCast + Clone,
    F: FnMut(X) -> Y, 
[src]

type State = State

State to be stored within the Uis widget cache. Read more

type Style = Style

Every widget is required to have its own associated Style type. This type is intended to contain high-level styling information for the widget that can be optionally specified by a user of the widget. Read more

type Event = ()

The type of event yielded by the widget, returned via the Widget::set function. Read more

fn update(self, args: UpdateArgs<'_, '_, '_, '_, Self>) -> Self::Event[src]

Update the state of the PlotPath.

Auto Trait Implementations

impl<X, Y, F> RefUnwindSafe for PlotPath<X, Y, F> where
    F: RefUnwindSafe,
    X: RefUnwindSafe,
    Y: RefUnwindSafe

impl<X, Y, F> Send for PlotPath<X, Y, F> where
    F: Send,
    X: Send,
    Y: Send

impl<X, Y, F> Sync for PlotPath<X, Y, F> where
    F: Sync,
    X: Sync,
    Y: Sync

impl<X, Y, F> Unpin for PlotPath<X, Y, F> where
    F: Unpin,
    X: Unpin,
    Y: Unpin

impl<X, Y, F> UnwindSafe for PlotPath<X, Y, F> where
    F: UnwindSafe,
    X: UnwindSafe,
    Y: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<W> Positionable for W where
    W: Widget
[src]

impl<W> Sizeable for W where
    W: Widget
[src]

fn get_x_dimension(&Self, &Ui) -> Dimension[src]

We attempt to retrieve the x Dimension for the widget via the following:

  • Check for specified value at maybe_x_dimension
  • Otherwise, use the default returned by Widget::default_x_dimension.

fn get_y_dimension(&Self, &Ui) -> Dimension[src]

We attempt to retrieve the y Dimension for the widget via the following:

  • Check for specified value at maybe_y_dimension
  • Otherwise, use the default returned by Widget::default_y_dimension.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.