Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Osman Zakir
- // 3 / 18 / 2017
- // Bjarne Stroustrup: Programming: Principles and Practice Using C++ 2nd Edition
- // Chapter 12 Section 12.3 First GUI Example
- // 12_3_first_gui_example.cpp
- #include "../../Simple_window.h"
- #include "../../Graph.h"
- int main()
- {
- using namespace Graph_lib;
- Point tl{ 100, 100 };
- Simple_window win{ tl, 600, 400, "Canvas" };
- Graph_lib::Polygon poly;
- poly.add(Point{ 300, 200 });
- poly.add(Point{ 350, 100 });
- poly.add(Point{ 400, 200 });
- poly.set_color(Color::red);
- win.attach(poly);
- win.wait_for_button();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement