-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPolygon.h
59 lines (43 loc) · 832 Bytes
/
Polygon.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
#ifndef Polygon_h
#define Polygon_h
#include "Graphics.h"
#include "Line.h"
#include <vector>
struct DIR
{
double X;
double Y;
};
class Polygon : public Graphics
{
public:
Polygon();
//Polygon(COORD b, COORD e);
Polygon(int n, COORD c[]);
~Polygon();
COORD getVertex(int n);
void setLineWidth(float lw);
float getLineWidth() const;
COLOR getLineColor() const;
void setLineColor(float r, float g, float b);
void Draw();
void Up();
void Down();
void Left();
void Right();
void Increase();
void Decrease();
void Rotate(char c);
void Fill(float r, float g, float b);
string SaveFile();
void Disappear();
private:
vector<COORD> Vertex;
//float lineWidth;
//COLOR lineColor;
double *length;
int n;
double angle;
DIR *dir;
};
#endif