-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcanvas.h
66 lines (41 loc) · 847 Bytes
/
canvas.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
#ifndef CANVAS_H
#define CANVAS_H
class Canvas
{
public:
Canvas(int w, int h, int initX, int initY);
~Canvas();
int x();
int y();
void setup();
void refresh();
Canvas *reset();
Canvas *resetX();
Canvas *resetY();
Canvas *add(int dx, int dy);
Canvas *addX(int dx);
Canvas *addY(int dx);
Canvas *set(int x, int y);
Canvas *setX(int x);
Canvas *setY(int y);
Canvas *next();
Canvas *nextX();
Canvas *nextY();
Canvas *string(const char *str);
Canvas *stringf(const char *str, ...);
Canvas *progress(int value, int max);
Canvas *cube(int opt);
private:
int _x;
int _y;
int _w;
int _h;
int _initX;
int _initY;
int _nextX;
int _nextY;
char _buf[512];
struct Internal;
Internal *_internal;
};
#endif