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

The ellipse color

border

The ellipse border

resolution

The resolution for the shape, 360 degrees.

Methods

impl Ellipse

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 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

Draws ellipse using triangulation.

Trait Implementations

impl Colored for Ellipse

fn mul_rgba(self, r: ColorComponent, g: ColorComponent, b: ColorComponent, a: ColorComponent) -> Self

fn hue_rad(self, angle: ColorComponent) -> Self

fn tint(self, f: ColorComponent) -> Self

fn shade(self, f: ColorComponent) -> Self

fn hue_deg(self, angle: ColorComponent) -> Self

Derived Implementations

impl Clone for Ellipse

fn clone(&self) -> Ellipse

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

impl Copy for Ellipse