Struct nannou::ui::prelude::widget::primitive::point_path::PointPath[][src]

pub struct PointPath<I> {
    pub points: I,
    pub common: CommonBuilder,
    pub style: Style,
    pub maybe_shift_to_centre_from: Option<[f64; 2]>,
}

A simple, non-interactive widget for drawing a series of lines and/or points.

Fields

Some iterator yielding a series of Points.

Data necessary and common for all widget builder types.

Unique styling for the PointPath.

Whether or not the points should be automatically centred to the widget position.

Methods

impl<I> PointPath<I>
[src]

The same as PointPath::new but with th given style.

Build a new default PointPath widget.

Note that this does not automatically set the position of the bounding box for the widget. It is recommended that you also see the abs and centred constructors for smart positioning and layout that automatically infer the position and size of the bounding box. This method should only be preferred if the user can also specify the correct bounding box position and size as this will be more efficient than the abs or centred methods.

Build a new PointPath whose bounding box is fit to the absolute co-ordinates of the points.

This requires that the points iterator is Clone so that we may iterate through and determine the bounding box of the points.

If you would rather centre the points to the middle of the bounding box, use PointPath::centred instead.

The same as PointPath::abs but constructs the PointPath with the given style.

Build a new PointPath and shift the location of the points so that the centre of their bounding rectangle lies at the position determined for the PointPath widget.

This is useful if your points simply describe a shape and you want to position them using conrod's auto-layout or Positionable methods.

If you would rather centre the bounding box to the points, use PointPath::abs instead.

The same as PointPath::centred but constructs the PointPath with the given style.

The thickness or width of the PointPath's lines.

Use this instead of Positionable::width for the thickness of the Line, as width and height refer to the dimensions of the bounding rectangle.

Make a Solid line.

Make a line with a Dashed pattern.

Make a line with a Dotted pattern.

Trait Implementations

impl<I> Widget for PointPath<I> where
    I: IntoIterator<Item = [f64; 2]>, 
[src]

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

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

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

Return the initial State of the Widget. Read more

Return the styling of the widget. Read more

Returns either of the following: Read more

Update the state of the Line.

The default Position for the widget along the x axis. Read more

The default Position for the widget along the y axis. Read more

The default width for the Widget. Read more

The default height of the widget. Read more

If the widget is draggable, implement this method and return the position and dimensions of the draggable space. The position should be relative to the center of the widget. Read more

The area on which child widgets will be placed when using the Place Position methods.

Set the parent widget for this Widget by passing the WidgetId of the parent. Read more

Specify that this widget has no parent widgets.

Set whether or not the Widget should be placed on the kid_area. Read more

Indicates that the Widget is used as a non-interactive graphical element for some other widget. Read more

Set whether or not the widget is floating (the default is false). A typical example of a floating widget would be a pop-up or alert window. Read more

Indicates that all widgets who are children of this widget should be cropped to the kid_area of this widget. Read more

Makes the widget's KidArea scrollable. Read more

Makes the widget's KidArea scrollable. Read more

Set whether or not the widget's KidArea is scrollable (the default is false). Read more

A builder method that "lifts" the Widget through the given build function. Read more

A builder method that mutates the Widget with the given mutate function. Read more

A method that conditionally builds the Widget with the given build function. Read more

A method that optionally builds the Widget with the given build function. Read more

Note: There should be no need to override this method. Read more

impl<I> Common for PointPath<I>
[src]

Borrows the CommonBuilder field.

Mutably borrows the CommonBuilder field.

impl<I> Clone for PointPath<I> where
    I: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<I> Colorable for PointPath<I>
[src]

Set the color of the widget.

Set the color of the widget from rgba values.

Set the color of the widget from rgb values.

Set the color of the widget from hsla values.

Set the color of the widget from hsl values.

impl<I> Debug for PointPath<I> where
    I: Debug
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<I> Send for PointPath<I> where
    I: Send

impl<I> Sync for PointPath<I> where
    I: Sync