[−][src]Struct tui::widgets::canvas::Context
Holds the state of the Canvas when painting to it.
Implementations
impl<'a> Context<'a>
[src]
pub fn new(
width: u16,
height: u16,
x_bounds: [f64; 2],
y_bounds: [f64; 2],
marker: Marker
) -> Context<'a>
[src]
width: u16,
height: u16,
x_bounds: [f64; 2],
y_bounds: [f64; 2],
marker: Marker
) -> Context<'a>
pub fn draw<S>(&mut self, shape: &S) where
S: Shape,
[src]
S: Shape,
Draw any object that may implement the Shape trait
pub fn layer(&mut self)
[src]
Go one layer above in the canvas.
pub fn print(&mut self, x: f64, y: f64, text: &'a str, color: Color)
[src]
Print a string on the canvas at the given position
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Context<'a>
impl<'a> !Send for Context<'a>
impl<'a> !Sync for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> !UnwindSafe for Context<'a>
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,
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, 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.
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>,