[]Struct piston_window::ellipse::Ellipse

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.

Methods

impl Ellipse

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

Creates a new ellipse

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

Creates a new ellipse border

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

Sets ellipse color.

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

Sets ellipse border.

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

Sets optional ellipse border.

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

Sets resolution of the ellipse smoothness.

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

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
    G: Graphics,
    R: Into<[f64; 4]>, 

Draws ellipse using triangulation.

Trait Implementations

impl Colored for Ellipse

fn tint(self, f: f32) -> Self

Mixes the current color with white. Read more

fn shade(self, f: f32) -> Self

Mixes the current color with black. Read more

fn hue_deg(self, angle: f32) -> Self

Rotates hue by degrees.

impl Clone for Ellipse

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Copy for Ellipse

Auto Trait Implementations

impl Send for Ellipse

impl Sync for Ellipse

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> Erased for T