#include <ColorGrid.h>
This is a class in BRIDGES for representing an image.
- Author
- David Burlinson, Kalpathi Subramanian
There is a tutorial about ColorGrid : https://bridgesuncc.github.io/tutorials/Grid.html
|
virtual const string | getDStype () const override |
| Return the data structure type. More...
|
|
| ColorGrid () |
|
| ColorGrid (int rows, int cols) |
|
| ColorGrid (int rows, int cols, Color color) |
|
| ColorGrid (const ColorGrid &cg) |
|
ColorGrid & | operator= (const ColorGrid &cg) |
|
int | getHeight () |
|
int | getWidth () |
|
| Grid (int rows, int cols) |
| Grid constructor. More...
|
|
| Grid () |
|
| Grid (int *size) |
| Grid constructor given size. More...
|
|
| Grid (const Grid &g) |
| Grid constructor given an input grid. More...
|
|
virtual | ~Grid () |
|
Grid & | operator= (const Grid &g) |
|
void | setDimensions (int rows, int cols) |
| Construct the grid given the dimensions. More...
|
|
int const * | getDimensions () |
| Get dimenions of the grid. More...
|
|
Color const & | get (int row, int col) const |
| Get the (row, col) element in the grid. More...
|
|
void | set (int row, int col, Color val) |
| Set the grid value for the (row, col) element. More...
|
|
BracketHelperConst | operator[] (int row) const |
| provides the necessary abstraction to do something = grid[x][y]; More...
|
|
BracketHelper | operator[] (int row) |
| provides the necessary abstraction to do grid[x][y] = something; More...
|
|
virtual | ~DataStructure ()=default |
|
◆ ColorGrid() [1/4]
bridges::datastructure::ColorGrid::ColorGrid |
( |
| ) |
|
|
inline |
◆ ColorGrid() [2/4]
bridges::datastructure::ColorGrid::ColorGrid |
( |
int |
rows, |
|
|
int |
cols |
|
) |
| |
|
inline |
Grid constructor with size arguments
- Parameters
-
rows | the number of rows of the grid |
cols | the number of columns of the grid |
◆ ColorGrid() [3/4]
bridges::datastructure::ColorGrid::ColorGrid |
( |
int |
rows, |
|
|
int |
cols, |
|
|
Color |
color |
|
) |
| |
|
inline |
Grid constructor with size and color string argument
- Parameters
-
rows | - int representing the number of rows of the grid |
cols | - int representing the number of columns of the grid |
color | - Color object to use as default color |
◆ ColorGrid() [4/4]
bridges::datastructure::ColorGrid::ColorGrid |
( |
const ColorGrid & |
cg | ) |
|
|
inline |
◆ getDStype()
virtual const string bridges::datastructure::ColorGrid::getDStype |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ getHeight()
int bridges::datastructure::ColorGrid::getHeight |
( |
| ) |
|
|
inline |
Get the height of the color grid
- Returns
- the height (number of rows) of the grid
◆ getWidth()
int bridges::datastructure::ColorGrid::getWidth |
( |
| ) |
|
|
inline |
Get the width of the color grid
- Returns
- the width (number of columns) of the grid
◆ operator=()
The documentation for this class was generated from the following file: