TermOx
|
Holds a matrix of Glyphs, provides simple access by indices. More...
#include <glyph_matrix.hpp>
Public Member Functions | |
Glyph_matrix (Area area) | |
Construct with a set width and height, or defaults to 0 for each. More... | |
void | resize (Area area) |
Resize the width and height of the matrix. More... | |
void | clear () |
Remove all Glyphs from the matrix and set width/height to 0. | |
auto | width () const -> int |
Return the width of the matrix. | |
auto | height () const -> int |
Return the height of the matrix. | |
auto | operator() (Point p) -> Glyph & |
Glyph access operator. {0, 0} is top left. x grows south and y east. More... | |
auto | operator() (Point p) const -> Glyph |
Glyph access operator. {0, 0} is top left. x grows south and y east. More... | |
auto | at (Point p) -> Glyph & |
Glyph access operator. {0, 0} is top left. x grows south and y east. More... | |
auto | at (Point p) const -> Glyph |
Glyph access operator. {0, 0} is top left. x grows south and y east. More... | |
Holds a matrix of Glyphs, provides simple access by indices.
|
explicit |
Construct with a set width and height, or defaults to 0 for each.
Glyphs default constructed(space char with no colors or traits).
auto ox::Glyph_matrix::at | ( | Point | p | ) | -> Glyph& |
Glyph access operator. {0, 0} is top left. x grows south and y east.
Has bounds checking and throws std::out_of_range if not within range.
auto ox::Glyph_matrix::at | ( | Point | p | ) | const -> Glyph |
Glyph access operator. {0, 0} is top left. x grows south and y east.
Has bounds checking and throws std::out_of_range if not within range.
auto ox::Glyph_matrix::operator() | ( | Point | p | ) | -> Glyph& |
Glyph access operator. {0, 0} is top left. x grows south and y east.
Provides no bounds checking.
auto ox::Glyph_matrix::operator() | ( | Point | p | ) | const -> Glyph |
Glyph access operator. {0, 0} is top left. x grows south and y east.
Provides no bounds checking.
void ox::Glyph_matrix::resize | ( | Area | area | ) |
Resize the width and height of the matrix.
New Glyphs will be default constructed, Glyphs no longer within the bounds of the matrix will be destructed.