Struct tui::widgets::canvas::Context [−][src]
pub struct Context<'a> { /* fields omitted */ }
Holds the state of the Canvas when painting to it.
Implementations
impl<'a> Context<'a>
[src]
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> !RefUnwindSafe for Context<'a>
impl<'a> !UnwindSafe for Context<'a>
impl<'a> !UnwindSafe for Context<'a>