/
RGBPlane.h
41 lines (33 loc) · 937 Bytes
/
RGBPlane.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* The RGBPlane class represents an XY plane of RGB values for a pixel plane.
*
* @author Sasha Ouellet - spaouellet@me.com - www.sashaouellet.com
* @version 1.0 - 02/25/17
*/
#ifndef WANGTILE_RGBPLANE_H
#define WANGTILE_RGBPLANE_H
#include <vector>
using namespace std;
class RGBPlane
{
private:
unsigned char* m_pixelData;
int m_width;
int m_height;
int getIndexFromPoint(int, int);
public:
RGBPlane(int, int);
RGBPlane(const RGBPlane&);
vector<unsigned char> getPixelValueAt(int, int, bool);
unsigned char getValueAt(int);
void setPixelValueAt(int, int, unsigned char, unsigned char, unsigned char, bool);
RGBPlane* getRegion(int, int, int, int, bool);
void flipRBValues();
void setDimensions(int, int);
int getWidth() const;
int getHeight() const;
unsigned char* getRawData();
RGBPlane* rotate();
virtual ~RGBPlane();
};
#endif //WANGTILE_RGBPLANE_H