-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImpressionistDoc.h
79 lines (56 loc) · 1.77 KB
/
ImpressionistDoc.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
// impressionistDoc.h
//
// header file for Doc
//
#ifndef ImpressionistDoc_h
#define ImpressionistDoc_h
#include "impressionist.h"
#include "bitmap.h"
class ImpressionistUI;
class ImpressionistDoc
{
public:
ImpressionistDoc();
void setUI(ImpressionistUI* ui); // Assign the UI to use
int loadImage(char *iname); // called by the UI to load image
int saveImage(char *iname); // called by the UI to save image
int clearCanvas(); // called by the UI to clear the drawing canvas
void setBrushType(int type); // called by the UI to set the brushType
int getSize(); // get the UI size
void setSize(int size); // set the UI size
char* getImageName(); // get the current image name
int getThickness(); // get the UI thickness
void setThickness(int size); // set the UI thickness
int getAngle(); // get the UI angle
void setAngle(int size); // set the UI angle
double getAlpha();
void setAlpha(double alpha);
void gaussianBlur(char *iname); // called by the UI to save image
// Attributes
public:
// Dimensions of original window.
int m_nWidth,
m_nHeight;
// Dimensions of the paint window.
int m_nPaintWidth,
m_nPaintHeight;
// Bitmaps for original image and painting.
unsigned char* m_ucBitmap;
unsigned char* m_ucPainting;
// The current active brush.
ImpBrush* m_pCurrentBrush;
// Size of the brush.
int m_nSize;
ImpressionistUI* m_pUI;
// Operations
public:
// Get the color of the original picture at the specified coord
GLubyte* GetOriginalPixel( int x, int y );
// Get the color of the original picture at the specified point
GLubyte* GetOriginalPixel( const Point p );
private:
char m_imageName[256];
};
extern void MessageBox(char *message);
#endif