[][src]Struct nannou::ui::widget::Oval

pub struct Oval<S> {
    pub common: CommonBuilder,
    pub style: Style,
    pub resolution: usize,
    pub section: S,
}

A simple, non-interactive widget for drawing a single Oval.

Fields

common: CommonBuilder

Data necessary and common for all widget builder types.

style: Style

Unique styling.

resolution: usize

The number of lines used to draw the edge.

section: S

A type describing the section of the Oval that is to be drawn.

Methods

impl Oval<Full>[src]

pub fn styled(dim: [f64; 2], style: Style) -> Oval<Full>[src]

Build an Oval with the given dimensions and style.

pub fn fill(dim: [f64; 2]) -> Oval<Full>[src]

Build a new Filled Oval.

pub fn fill_with(dim: [f64; 2], color: Color) -> Oval<Full>[src]

Build a new Oval Filled with the given color.

pub fn outline(dim: [f64; 2]) -> Oval<Full>[src]

Build a new Outlined Oval widget.

pub fn outline_styled(dim: [f64; 2], line_style: Style) -> Oval<Full>[src]

Build a new Oval Outlined with the given style.

impl<S> Oval<S>[src]

pub fn resolution(self, resolution: usize) -> Oval<S>[src]

The number of lines used to draw the edge.

By default, DEFAULT_RESOLUTION is used.

pub fn section(self, radians: f64) -> Oval<Section>[src]

Produces an Oval where only a section is drawn.

The given radians describes the angle occuppied by the section's circumference.

impl Oval<Section>[src]

pub fn offset_radians(self, offset_radians: f64) -> Oval<Section>[src]

The radians at which the section will begin.

A value of 0.0 will begin at the rightmost point of the oval.

Trait Implementations

impl<S> Clone for Oval<S> where
    S: Clone
[src]

impl<S> Colorable for Oval<S>[src]

impl<S> Common for Oval<S>[src]

impl<S> Copy for Oval<S> where
    S: Copy
[src]

impl<S> Debug for Oval<S> where
    S: Debug
[src]

impl<S> Widget for Oval<S> where
    S: OvalSection
[src]

type State = State<S>

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

Auto Trait Implementations

impl<S> RefUnwindSafe for Oval<S> where
    S: RefUnwindSafe

impl<S> Send for Oval<S> where
    S: Send

impl<S> Sync for Oval<S> where
    S: Sync

impl<S> Unpin for Oval<S> where
    S: Unpin

impl<S> UnwindSafe for Oval<S> where
    S: UnwindSafe

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

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, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[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<T> SetParameter for T

impl<T> SetParameter for T

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

fn get_x_dimension(&self, ui: &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: &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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,