|
MP6
Photomosaic
|
This is the actual mosaic data-structure which will hold the matrix of sub-images to be written. More...
#include <mosaiccanvas.h>
Public Member Functions | |
| MosaicCanvas (int theRows, int theColumns) | |
| Default constructor. More... | |
| MosaicCanvas (const MosaicCanvas &source) | |
| Copy constructor. More... | |
| int | getRows () const |
| Retrieve the number of rows of images. More... | |
| int | getColumns () const |
| Retrieve the number of columns of images. More... | |
| void | setTile (int row, int column, const TileImage &img) |
| Set the TiledImage for a particular region. More... | |
| const TileImage & | getTile (int row, int column) const |
| Retrieve the current TileImage for a particular row and column. More... | |
| PNG | drawMosaic (int pixelsPerTile) const |
| Save the current MosaicCanvas as a file with the following pixels per tile. More... | |
Private Attributes | |
| int | rows |
| Number of image rows in the Mosaic. | |
| int | columns |
| Number of image columns in the Mosaic. | |
| vector< TileImage > | myImages |
| The actual matrix of Image data. | |
This is the actual mosaic data-structure which will hold the matrix of sub-images to be written.
This is effectively just a 2-D array of TileImage objects which can be accessed via convenience methods.
| MosaicCanvas::MosaicCanvas | ( | int | theRows, |
| int | theColumns | ||
| ) |
Default constructor.
Constructor.
| theRows | Number of rows to divide the canvas into |
| theColumns | Number of columns to divide the canvas into |
| MosaicCanvas::MosaicCanvas | ( | const MosaicCanvas & | source | ) |
Copy constructor.
| source | The MosaicCanvas object to copy |
| int MosaicCanvas::getRows | ( | ) | const |
Retrieve the number of rows of images.
| int MosaicCanvas::getColumns | ( | ) | const |
Retrieve the number of columns of images.
| void MosaicCanvas::setTile | ( | int | row, |
| int | column, | ||
| const TileImage & | img | ||
| ) |
Set the TiledImage for a particular region.
Note that row and tile indices should be zero-based.
| row | The row |
| column | The column |
| img | The TileImage to set |
| const TileImage & MosaicCanvas::getTile | ( | int | row, |
| int | column | ||
| ) | const |
| PNG MosaicCanvas::drawMosaic | ( | int | pixelsPerTile | ) | const |
Save the current MosaicCanvas as a file with the following pixels per tile.
| pixelsPerTile | pixels per Photomosaic tile |
1.8.9.1