Struct sb_rust_library::plotter::Circle [−][src]
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
impl RefUnwindSafe for Circle
[src]
impl Send for Circle
[src]
impl Sync for Circle
[src]
impl Unpin for Circle
[src]
impl UnwindSafe for Circle
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,