[−][src]Struct piston_window::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.
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]
&self,
from: P,
to: P,
draw_state: &DrawState,
transform: [[f64; 3]; 2],
g: &mut G
) where
P: Into<[f64; 2]>,
G: Graphics,
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]
&self,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2],
g: &mut G
) where
R: Into<[f64; 4]>,
G: Graphics,
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]
&self,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2],
g: &mut G
) where
R: Into<[f64; 4]>,
G: Graphics,
Draws ellipse using triangulation.
Trait Implementations
impl Clone for Ellipse
[src]
impl Colored for Ellipse
[src]
pub fn mul_rgba(self, r: f32, g: f32, b: f32, a: f32) -> Ellipse
[src]
pub fn hue_rad(self, angle: f32) -> Ellipse
[src]
pub fn tint(self, f: f32) -> Self
[src]
pub fn shade(self, f: f32) -> Self
[src]
pub fn hue_deg(self, angle: f32) -> Self
[src]
impl Copy for Ellipse
[src]
Auto Trait Implementations
impl RefUnwindSafe for Ellipse
[src]
impl Send for Ellipse
[src]
impl Sync for Ellipse
[src]
impl Unpin for Ellipse
[src]
impl UnwindSafe for Ellipse
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,