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
Creates a new ellipse
fn new_border(color: Color, radius: Radius) -> Ellipse
Creates a new ellipse border
fn color(self, value: Color) -> Self
Sets ellipse color.
fn border(self, value: Border) -> Self
Sets ellipse border.
fn maybe_border(self, value: Option<Border>) -> Self
Sets optional ellipse border.
fn resolution(self, value: Resolution) -> Self
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
Draws the ellipse.
Trait Implementations
impl Colored for Ellipse
[src]
fn mul_rgba(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
Rotates hue by radians.
fn tint(self, f: ColorComponent) -> Self
Mixes the current color with white. Read more
fn shade(self, f: ColorComponent) -> Self
Mixes the current color with black. Read more
fn hue_deg(self, angle: ColorComponent) -> Self
Rotates hue by degrees.
impl Clone for Ellipse
[src]
fn clone(&self) -> Ellipse
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more