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 the ellipse.