[][src]Struct conrod_core::widget::primitive::shape::triangles::Triangles

pub struct Triangles<S, I> {
    pub common: CommonBuilder,
    pub style: S,
    pub triangles: I,
    pub maybe_shift_to_centre_from: Option<Point>,
}

A widget that allows for drawing a list of triangles.

Fields

common: CommonBuilder

Data necessary and common for all widget builder types.

style: S

Unique styling for the Triangles.

triangles: I

All the point in the triangle list.

maybe_shift_to_centre_from: Option<Point>

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

Implementations

impl<I> Triangles<SingleColor, I> where
    I: IntoIterator<Item = Triangle<<SingleColor as Style>::Vertex>>, 
[src]

pub fn single_color<C>(
    color: C,
    points: I
) -> TrianglesUnpositioned<SingleColor, I> where
    C: Into<Rgba>, 
[src]

A list of triangles described by the given points.

All triangles are colored with the given Color.

impl<I> Triangles<MultiColor, I> where
    I: IntoIterator<Item = Triangle<<MultiColor as Style>::Vertex>>, 
[src]

pub fn multi_color(points: I) -> TrianglesUnpositioned<MultiColor, I>[src]

A list of triangles described by the given points.

Every vertex specifies its own unique color.

Trait Implementations

impl<S: Clone, I: Clone> Clone for Triangles<S, I>[src]

impl<S, I> Common for Triangles<S, I>[src]

impl<S: Copy, I: Copy> Copy for Triangles<S, I>[src]

impl<S: Debug, I: Debug> Debug for Triangles<S, I>[src]

impl<S, I> Widget for Triangles<S, I> where
    S: Style,
    I: IntoIterator<Item = Triangle<S::Vertex>>, 
[src]

type State = State<Vec<Triangle<S::Vertex>>>

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

type Style = S

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

Auto Trait Implementations

impl<S, I> RefUnwindSafe for Triangles<S, I> where
    I: RefUnwindSafe,
    S: RefUnwindSafe

impl<S, I> Send for Triangles<S, I> where
    I: Send,
    S: Send

impl<S, I> Sync for Triangles<S, I> where
    I: Sync,
    S: Sync

impl<S, I> Unpin for Triangles<S, I> where
    I: Unpin,
    S: Unpin

impl<S, I> UnwindSafe for Triangles<S, I> where
    I: UnwindSafe,
    S: 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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.