Struct prototty_elements::elements::Canvas
[−]
[src]
pub struct Canvas { /* fields omitted */ }
A rectangular drawing element.
Methods
impl Canvas
[src]
fn new<D: Into<Vector2<u16>>>(size: D) -> Self
[src]
fn get_mut(&mut self, coord: Vector2<i16>) -> Option<&mut CanvasCell>
[src]
Returns a mutable reference to a cell at the given coordinate.
fn get(&self, coord: Vector2<i16>) -> Option<&CanvasCell>
[src]
Returns a reference to a cell at the given coordinate.
fn coords(&self) -> CoordIter
[src]
Returns an iterator over the coordinates of the canvas.
fn iter(&self) -> Iter
[src]
Returns an iterator over the cells in the canvas.
fn iter_mut(&mut self) -> IterMut
[src]
Returns a iterator that allows modifying each cell.
fn enumerate(&self) -> CoordEnumerate<CanvasCell>
[src]
Returns an iterator over pairs of coordinates and cells.
fn enumerate_mut(&mut self) -> CoordEnumerateMut<CanvasCell>
[src]
Returns an iterator over pairs of coordinates and cells allowing modification of the cells.
Trait Implementations
impl Debug for Canvas
[src]
impl Clone for Canvas
[src]
fn clone(&self) -> Canvas
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl View for Canvas
[src]
fn view<G: ViewGrid>(&self, offset: Vector2<i16>, depth: i16, grid: &mut G)
[src]
Update the cells in grid
to describe how a type should be rendered. Implementations of view
for low level ui components will typically involve updating cells directly. Implementations for higer level components, such as an entire application's ui, will typically call the view
methed of lower level components which make up the ui. Read more