[][src]Struct conrod_core::widget::rounded_rectangle::RoundedRectangle

pub struct RoundedRectangle {
    pub common: CommonBuilder,
    pub style: Style,
    pub radius: Scalar,
    pub corner_resolution: usize,
}

Draws a rectangle with corners rounded via the given radius.

Fields

common: CommonBuilder

Data necessary and common for all widget builder types.

style: Style

Unique styling for the RoundedRectangle.

radius: Scalar

The radius of the circle used to round each corner of the rectangle.

corner_resolution: usize

The number of points in each corner of the circle used to draw the rounded corners.

Implementations

impl RoundedRectangle[src]

pub fn styled(dim: Dimensions, radius: Scalar, style: Style) -> Self[src]

Build a rounded rectangle with the given dimensions and style.

pub fn fill(dim: Dimensions, radius: Scalar) -> Self[src]

Build a new filled rounded rectangle.

pub fn fill_with(dim: Dimensions, radius: Scalar, color: Color) -> Self[src]

Build a new filled rounded rectangle widget filled with the given color.

pub fn outline(dim: Dimensions, radius: Scalar) -> Self[src]

Build a new outlined rounded rectangle widget.

pub fn outline_styled(
    dim: Dimensions,
    radius: Scalar,
    line_style: Style
) -> Self
[src]

Build an outlined rounded rectangle rather than a filled one.

pub fn corner_resolution(self, res: usize) -> Self[src]

The number of points in each corner of the circle used to draw the rounded corners.

Trait Implementations

impl Clone for RoundedRectangle[src]

impl Colorable for RoundedRectangle[src]

impl Common for RoundedRectangle[src]

impl Copy for RoundedRectangle[src]

impl Debug for RoundedRectangle[src]

impl Widget for RoundedRectangle[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 Rectangle.

Auto Trait Implementations

impl RefUnwindSafe for RoundedRectangle

impl Send for RoundedRectangle

impl Sync for RoundedRectangle

impl Unpin for RoundedRectangle

impl UnwindSafe for RoundedRectangle

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.