Struct piston_window::ellipse::Ellipse[][src]

pub struct Ellipse {
    pub color: [f32; 4],
    pub border: Option<Border>,
    pub resolution: u32,
}

An ellipse with filled color

Fields

color: [f32; 4]

The ellipse color

border: Option<Border>

The ellipse border

resolution: u32

The resolution for the shape, 360 degrees.

Implementations

impl Ellipse[src]

pub fn new(color: [f32; 4]) -> Ellipse[src]

Creates a new ellipse

pub fn new_border(color: [f32; 4], radius: f64) -> Ellipse[src]

Creates a new ellipse border

pub fn color(self, value: [f32; 4]) -> Ellipse[src]

Sets ellipse color.

pub fn border(self, value: Border) -> Ellipse[src]

Sets ellipse border.

pub fn maybe_border(self, value: Option<Border>) -> Ellipse[src]

Sets optional ellipse border.

pub fn resolution(self, value: u32) -> Ellipse[src]

Sets resolution of the ellipse smoothness.

pub fn draw_from_to<P, G>(
    &self,
    from: P,
    to: P,
    draw_state: &DrawState,
    transform: [[f64; 3]; 2],
    g: &mut G
) where
    P: Into<[f64; 2]>,
    G: Graphics
[src]

Draws ellipse by corners using default method.

pub fn draw<R, G>(
    &self,
    rectangle: R,
    draw_state: &DrawState,
    transform: [[f64; 3]; 2],
    g: &mut G
) where
    R: Into<[f64; 4]>,
    G: Graphics
[src]

Draws ellipse using default method.

pub fn draw_tri<R, G>(
    &self,
    rectangle: R,
    draw_state: &DrawState,
    transform: [[f64; 3]; 2],
    g: &mut G
) where
    R: Into<[f64; 4]>,
    G: Graphics
[src]

Draws ellipse using triangulation.

Trait Implementations

impl Clone for Ellipse[src]

impl Colored for Ellipse[src]

impl Copy for Ellipse[src]

Auto Trait Implementations

impl RefUnwindSafe for Ellipse

impl Send for Ellipse

impl Sync for Ellipse

impl Unpin for Ellipse

impl UnwindSafe for Ellipse

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<T> Pointable for T[src]

type Init = T

The type for initializers.

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.