[]Struct piston_window::circle_arc::CircleArc

pub struct CircleArc {
    pub color: [f32; 4],
    pub radius: f64,
    pub start: f64,
    pub end: f64,
    pub resolution: u32,
}

A curved line

Fields

color: [f32; 4]

The arcs color

radius: f64

The radius of the arc (Thickness of the drawing, not the radius of the circle)

start: f64

The start of the arc in radians

end: f64

The end of the arc in radians

resolution: u32

The resolution for the arc.

Methods

impl CircleArc

pub fn new(color: [f32; 4], radius: f64, start: f64, end: f64) -> CircleArc

Creates a new arc

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

Sets the arcs color.

pub fn radius(self, value: f64) -> CircleArc

Sets the radius of the arc (Thickness of the arc, not the radius of the circle it wraps)

pub fn start(self, value: f64) -> CircleArc

Sets the start of the arc (in radians).

pub fn end(self, value: f64) -> CircleArc

Sets the end of the arc (in radians).

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

Sets the resolution of the arcs 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 circle arc 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 circle arc using triangulation.

Trait Implementations

impl Clone for CircleArc

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

Performs copy-assignment from source. Read more

impl Copy for CircleArc

Auto Trait Implementations

impl Send for CircleArc

impl Sync for CircleArc

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