Struct graphics::ellipse::Ellipse
[−]
[src]
pub struct Ellipse { pub color: Color, pub border: Option<Border>, pub resolution: Resolution, }
An ellipse with filled color
Fields
color: Color
The ellipse color
border: Option<Border>
The ellipse border
resolution: Resolution
The resolution for the shape, 360 degrees.
Methods
impl Ellipse
[src]
fn new(color: Color) -> Ellipse
[src]
Creates a new ellipse
fn new_border(color: Color, radius: Radius) -> Ellipse
[src]
Creates a new ellipse border
fn color(self, value: Color) -> Self
[src]
Sets ellipse color.
fn border(self, value: Border) -> Self
[src]
Sets ellipse border.
fn maybe_border(self, value: Option<Border>) -> Self
[src]
Sets optional ellipse border.
fn resolution(self, value: Resolution) -> Self
[src]
Sets resolution of the ellipse smoothness.
fn draw<R: Into<Rectangle>, G>(
&self,
rectangle: R,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics,
[src]
&self,
rectangle: R,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics,
Draws ellipse using default method.
fn draw_tri<R: Into<Rectangle>, G>(
&self,
rectangle: R,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics,
[src]
&self,
rectangle: R,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics,
Draws ellipse using triangulation.
Trait Implementations
impl Colored for Ellipse
[src]
fn mul_rgba(
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self
[src]
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self
Multiplies with red, green, blue and alpha values.
fn hue_rad(self, angle: ColorComponent) -> Self
[src]
Rotates hue by radians.
fn tint(self, f: ColorComponent) -> Self
[src]
Mixes the current color with white. Read more
fn shade(self, f: ColorComponent) -> Self
[src]
Mixes the current color with black. Read more
fn hue_deg(self, angle: ColorComponent) -> Self
[src]
Rotates hue by degrees.