Struct lux::graphics::Ellipse
[−]
[src]
#[must_use = "Ellipses only contain context, and must be drawn with `fill()`, `stroke()`, or `fill_stroke()`"]
pub struct Ellipse<'a, C: 'a> {
// some fields omitted
}An ellipse that can be drawn to the screen.
Methods
impl<'a, C> Ellipse<'a, C>
fn spokes(&mut self, spokes: u16) -> &mut Self
Sets the number of segments that are used to approximate a circle.
### Example ```rust,no_run
extern crate lux;
use lux::prelude::*; use lux::graphics::ColorVertex;
fn main() {
let mut window = Window::new().unwrap(); let mut frame = window.frame(); let (x, y, size) = (10.0, 10.0, 50.0); // draw a pentagon frame.circle(x, y, size).spokes(5).draw();
}
impl<'a, C> Ellipse<'a, C> where C: Canvas + 'a
fn fill(&mut self)
Fills in the ellipse with a solid color.