-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLinie.cpp
More file actions
54 lines (44 loc) · 764 Bytes
/
Copy pathLinie.cpp
File metadata and controls
54 lines (44 loc) · 764 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
53
54
#include "Linie.h"
Linie::Linie() : Linie::Linie(Punkt(0, 0), Punkt(0, 0))
{
}
Linie::Linie(Punkt p1, Punkt p2, LPCWSTR name)
{
this->anz = std::make_shared<Anzeige>(Anzeige());
this->p1 = p1;
this->p2 = p2;
this->name = name;
}
Punkt Linie::GetP1()
{
return this->p1;
}
Punkt Linie::GetP2()
{
return this->p2;
}
LPCWSTR Linie::GetName()
{
return this->name;
}
void Linie::SetP1(Punkt p1)
{
this->p1 = p1;
}
void Linie::SetP2(Punkt p2)
{
this->p2 = p2;
}
void Linie::SetName(LPCWSTR name)
{
this->name = name;
}
void Linie::RufeAnzeige()
{
this->anz->Laenge(*this);
}
void Linie::Zeichne(HDC& hdc, PAINTSTRUCT& ps)
{
MoveToEx(hdc, (int)this->p1.GetX(), (int)this->p1.GetY(), NULL);
LineTo(hdc, (int)this->p2.GetX(), (int)this->p2.GetY());
}