-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPath.h
executable file
·73 lines (59 loc) · 1.39 KB
/
Path.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
/*!
* File: Path.h
* Author: greg
*
* Created on March 3, 2012, 11:55 AM
*/
#ifndef PATH_H
#define PATH_H
#include <vector>
#include "Point.h"
#include "Color.h"
#include "defines.h"
#include "ScreenAreas.h"
#include <iostream>
class Path
{
public:
Path(Point* point, int mode, Color color, int width, int ID, bool _final=false/*, bool active = true*/);
Path(int mode, Color color, int width, int ID);//, bool active);
Path(const Path& orig);
virtual ~Path();
void addPoint(Point* point);
std::vector<Point*> getPath();
std::vector<float> getPointPath();
int getPenWidth();
Color getPenColor() const;
int getPenColorInt();
int getMode() const;
void setEraseMode();
void setWriteMode();
int getPathID() const;
void disablePath();
void enablePath();
bool isEnabled() const;
int getLength();
ScreenAreas* getArea();
void setPenColor(Color color);
int getPointsCount();
private:
int sqrt(const int x);
int WriteEraseMode;
int myPenWidth;
Color myPenColor;
std::vector<Point *> mPointsVector;
std::vector<float> pointsVector;
int ID;
bool active;
/*! Used to determine if the path is really what the user wanted to write or not*/
bool _final;
int totalLength;
int mX;
int mY;
ScreenAreas *area;
enum mode
{
WRITE, ERASE
};
};
#endif /* PATH_H */