pub struct Canvas { /* private fields */ }Expand description
A pixel canvas where each terminal cell holds several dots.
Implementations§
Source§impl Canvas
impl Canvas
Sourcepub fn new(w: u16, h: u16, marker: Marker) -> Self
pub fn new(w: u16, h: u16, marker: Marker) -> Self
Create a canvas covering w × h terminal cells.
Sourcepub fn set_overlap(&mut self, policy: OverlapPolicy)
pub fn set_overlap(&mut self, policy: OverlapPolicy)
Set the per-cell colour policy for overlapping dots.
Sourcepub fn with_overlap(self, v: OverlapPolicy) -> Self
pub fn with_overlap(self, v: OverlapPolicy) -> Self
Builder form of Canvas::set_overlap.
Sourcepub fn set(&mut self, px: i32, py: i32, color: Color)
pub fn set(&mut self, px: i32, py: i32, color: Color)
Set one dot. Out-of-range coordinates are ignored.
Sourcepub fn blob(&mut self, px: i32, py: i32, color: Color)
pub fn blob(&mut self, px: i32, py: i32, color: Color)
A slightly bigger point (2×2 dots on braille) for scatter plots.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Canvas
impl Freeze for Canvas
impl Move for Canvas
impl RefUnwindSafe for Canvas
impl Send for Canvas
impl Sync for Canvas
impl Unpin for Canvas
impl UnsafeUnpin for Canvas
impl UnwindSafe for Canvas
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more