[−][src]Struct embedded_graphics::primitives::circle::Circle
Circle primitive
Fields
center: Coord
Center point of circle
radius: u32
Radius of the circle
style: Style<C>
Style of the circle
Methods
impl<C> Circle<C> where
C: PixelColor,
[src]
C: PixelColor,
pub fn new(center: Coord, radius: u32) -> Self
[src]
Create a new circle with center point, radius and border color
Trait Implementations
impl<C> Drawable for Circle<C> where
C: PixelColor,
[src]
C: PixelColor,
impl<C> Dimensions for Circle<C> where
C: PixelColor,
[src]
C: PixelColor,
fn top_left(&self) -> Coord
[src]
fn bottom_right(&self) -> Coord
[src]
fn size(&self) -> UnsignedCoord
[src]
impl<C> Primitive for Circle<C> where
C: PixelColor,
[src]
C: PixelColor,
impl<C> WithStyle<C> for Circle<C> where
C: PixelColor,
[src]
C: PixelColor,
fn with_style(self, style: Style<C>) -> Self
[src]
fn with_stroke(self, color: Option<C>) -> Self
[src]
fn with_stroke_width(self, width: u8) -> Self
[src]
fn with_fill(self, color: Option<C>) -> Self
[src]
impl<C> Transform for Circle<C> where
C: PixelColor,
[src]
C: PixelColor,
fn translate(&self, by: Coord) -> Self
[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) let moved = circle.translate(Coord::new(10, 10)); assert_eq!(moved.center, Coord::new(15, 20));
fn translate_mut(&mut self, by: Coord) -> &mut Self
[src]
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) circle.translate_mut(Coord::new(10, 10)); assert_eq!(circle.center, Coord::new(15, 20));
impl<C: Debug + PixelColor> Debug for Circle<C>
[src]
impl<C: Copy + PixelColor> Copy for Circle<C>
[src]
impl<'a, C> IntoIterator for &'a Circle<C> where
C: PixelColor,
[src]
C: PixelColor,
type Item = Pixel<C>
The type of the elements being iterated over.
type IntoIter = CircleIterator<C>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<C: Clone + PixelColor> Clone for Circle<C>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,