Struct embedded_graphics::primitives::circle::Circle[][src]

pub struct Circle {
    pub center: Coord,
    pub radius: u32,
    pub color: Color,
}

Circle primitive

Fields

Center point of circle

Radius of the circle

Line colour of circle

Methods

impl Circle
[src]

Create a new circle with center point, radius and border color

Trait Implementations

impl Debug for Circle
[src]

Formats the value using the given formatter. Read more

impl Copy for Circle
[src]

impl Clone for Circle
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> IntoIterator for &'a Circle
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl Drawable for Circle
[src]

impl Transform for Circle
[src]

Translate the circle center from its current position to a new position by (x, y) pixels, returning a new Circle. For a mutating transform, see translate_mut.


let circle = Circle::new(Coord::new(5, 10), 10, 1);
let moved = circle.translate(Coord::new(10, 10));

assert_eq!(moved.center, Coord::new(15, 20));

Translate the circle center from its current position to a new position by (x, y) pixels.


let mut circle = Circle::new(Coord::new(5, 10), 10, 1);
circle.translate_mut(Coord::new(10, 10));

assert_eq!(circle.center, Coord::new(15, 20));

Auto Trait Implementations

impl Send for Circle

impl Sync for Circle