Trait ascii_canvas::AsciiView [] [src]

pub trait AsciiView {
    fn columns(&self) -> usize;
    fn read_char(&mut self, row: usize, column: usize) -> char;
    fn write_char(&mut self, row: usize, column: usize, ch: char, style: Style);

AsciiView is a view onto an AsciiCanvas which potentially applies transformations along the way (e.g., shifting, adding styling information). Most of the main drawing methods for AsciiCanvas are defined as inherent methods on an AsciiView trait object.

Required Methods


impl<'a> AsciiView + 'a

Draws a line for the given range of rows at the given column.

Draws a horizontal line along a given row for the given range of columns.

Writes characters in the given style at the given position.

Creates a new view onto the same canvas, but writing at an offset.

Creates a new view onto the same canvas, but applying a style to all the characters written.