Struct sb_rust_library::plotter::Circle[][src]

pub struct Circle {
    pub color: Color,
    pub radius: i64,
    // some fields omitted
}

Circle shape used to plot data.

A single instance of Circle is reused to plot multiple data points.

Currently it only allows integer radii, meaning that it cant plot shapes of even width. So you can plot a dot or a 3x3 "circle" or a 5x5 circle, but not a 2x2 circle.

Fields

color: Color

Color of plotted circle.

radius: i64

The radius (almost) of the drawn circle.

The true radius is actually radius - 0.5 (e.g. radius 1 = single pixel). TODO: Allow half-integer radii

Implementations

impl Circle[src]

pub fn new(color: Color, radius: i64) -> Circle[src]

Creates a new plottable circle with given color and radius.

pub fn draw(&self, plot: &mut Plot, pt: Point)[src]

Draws a circle with the given logical coordinates.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.