-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShape.h
More file actions
53 lines (43 loc) · 874 Bytes
/
Shape.h
File metadata and controls
53 lines (43 loc) · 874 Bytes
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
#pragma once
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
using namespace std;
class Shape
{
protected:
CPoint start, end;
CRect rect;
string name;
public:
int lineType;
int lineThickness;
int lineColor;
CString text;
public:
Shape();
~Shape(void);
string ltos(long l)
{
ostringstream s;
s << l;
return s.str();
};
virtual void DrawShape(CDC *pdc, CPoint start, CPoint end);
virtual void DrawShape(CDC *pdc);
virtual void DrawAuxiliary(CDC *pdc, CPoint start, CPoint end);
virtual string ToString();
CRect GetRect() { return rect; };
bool IsOn(CPoint point);
void SetLineWidth(int width);
int GetLineWidth();
CString GetText();
void SetText(CString text);
CPen* CreatePen();
vector<CPoint> points;
void PaintText(CDC *pdc);
string GetName();
virtual void IsSelected(CDC *pdc);
};