-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathexec13-3.cpp
More file actions
32 lines (27 loc) · 814 Bytes
/
exec13-3.cpp
File metadata and controls
32 lines (27 loc) · 814 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
#include "Graph.h"
#include "Simple_window.h"
#include "exec13_graph.h"
using namespace Graph_lib;
// draw lines with arrow
int main() {
Simple_window win(Point(100, 100), 600, 400, "lines with arrow");
Arrow a1(Point(50, 50), Point(100, 50));
Arrow a2(Point(70, 70), Point(70, 100));
Arrow a3(Point(200, 200), Point(300, 100));
Arrow a4(Point(200, 200), Point(100, 100));
Arrow a5(Point(200, 200), Point(100, 300));
Arrow a6(Point(200, 200), Point(300, 300));
a2.set_color(Color::cyan);
a3.set_color(Color::red);
a4.set_color(Color::yellow);
a5.set_color(Color::green);
a6.set_color(Color::blue);
win.attach(a1);
win.attach(a2);
win.attach(a3);
win.attach(a4);
win.attach(a5);
win.attach(a6);
win.wait_for_button();
return 0;
}