-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexec12-3.cpp
35 lines (29 loc) · 874 Bytes
/
exec12-3.cpp
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
#include "Graph.h"
#include "Simple_window.h"
using namespace Graph_lib;
// Draw your initials 150 pixels high.
int main() {
Simple_window win(Point(100, 100), 600, 400, "Name");
Open_polyline first;
first.add(Point(50, 50));
first.add(Point(200, 50));
first.add(Point(50, 200));
first.add(Point(200, 200));
first.set_color(Color::red);
win.attach(first);
Open_polyline second;
second.add(Point(220, 50));
second.add(Point(370, 50));
second.add(Point(220, 200));
second.add(Point(370, 200));
second.set_color(Color::yellow);
win.attach(second);
Lines third;
third.add(Point(390, 50), Point(465, 125));
third.add(Point(540, 50), Point(465, 125));
third.add(Point(465, 125), Point(465, 200));
third.set_color(Color::green);
win.attach(third);
win.wait_for_button();
return 0;
}