[−]Struct piston_window::ellipse::Ellipse
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]>,
&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]>,
&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 Copy for Ellipse
impl Colored for Ellipse
fn mul_rgba(self, r: f32, g: f32, b: f32, a: f32) -> Ellipse
fn hue_rad(self, angle: f32) -> 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
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.