iSpike
2.1
Spike conversion library for robotics
|
#include <Bitmap.hpp>
Public Member Functions | |
Bitmap () | |
Bitmap (unsigned width, unsigned height, unsigned depth) | |
Bitmap (unsigned width, unsigned height, unsigned depth, unsigned char initVal) | |
Bitmap (const Bitmap ©_from_me) | |
~Bitmap () | |
Bitmap & | operator= (const Bitmap &rhs) |
unsigned char * | getContents () const |
unsigned char | getPixel (unsigned x, unsigned y, unsigned d) |
unsigned | getDepth () const |
unsigned | getHeight () const |
unsigned | getWidth () const |
bool | isEmpty () const |
void | reset (unsigned width, unsigned height, unsigned depth) |
unsigned | size () const |
A bitmap representation of an image, which has a height, width and depth. For example, with depth 3, each unsigned char could hold a red, green or blue value, so the contents array would be arranged as RGBRGBRGBRGB. This could be a 2x2 or a 4x1 image, depending on the width and height settings.
Definition at line 14 of file Bitmap.hpp.
Bitmap::Bitmap | ( | ) |
Empty constructor
Definition at line 7 of file Bitmap.cpp.
Bitmap::Bitmap | ( | unsigned | width, |
unsigned | height, | ||
unsigned | depth | ||
) |
Constructs bitmap with specified dimensions and junk data
Definition at line 13 of file Bitmap.cpp.
Bitmap::Bitmap | ( | unsigned | width, |
unsigned | height, | ||
unsigned | depth, | ||
unsigned char | initVal | ||
) |
Constructs bitmap with specified dimensions and initializes it with the specified value
Definition at line 19 of file Bitmap.cpp.
Bitmap::Bitmap | ( | const Bitmap & | bmp | ) |
Copy constructor
Definition at line 28 of file Bitmap.cpp.
Bitmap::~Bitmap | ( | ) |
Destructor
Definition at line 52 of file Bitmap.cpp.
unsigned char* ispike::Bitmap::getContents | ( | ) | const [inline] |
Definition at line 24 of file Bitmap.hpp.
unsigned ispike::Bitmap::getDepth | ( | ) | const [inline] |
Definition at line 26 of file Bitmap.hpp.
unsigned ispike::Bitmap::getHeight | ( | ) | const [inline] |
Definition at line 27 of file Bitmap.hpp.
unsigned char Bitmap::getPixel | ( | unsigned | x, |
unsigned | y, | ||
unsigned | d | ||
) |
Returns value of corresponding pixel in the image
Definition at line 92 of file Bitmap.cpp.
unsigned ispike::Bitmap::getWidth | ( | ) | const [inline] |
Definition at line 28 of file Bitmap.hpp.
bool ispike::Bitmap::isEmpty | ( | ) | const [inline] |
Definition at line 29 of file Bitmap.hpp.
Assignment operator
Definition at line 62 of file Bitmap.cpp.
void Bitmap::reset | ( | unsigned | width, |
unsigned | height, | ||
unsigned | depth | ||
) |
Reconstructs bitmap using the new parameters
The bitmap contents are undefined after this operation.
Definition at line 109 of file Bitmap.cpp.
unsigned Bitmap::size | ( | ) | const |
Definition at line 121 of file Bitmap.cpp.