-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathExample04.cpp
More file actions
52 lines (52 loc) · 1.18 KB
/
Example04.cpp
File metadata and controls
52 lines (52 loc) · 1.18 KB
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
//#include<iostream>
//#include"SFML\Graphics.hpp"
//#include"SFML\Window.hpp"
//#include"SFML\System.hpp"
//
//using namespace sf;
//
//int main()
//{
// RenderWindow window(sf::VideoMode(640, 400), "SFML works!");
// window.setFramerateLimit(60);
//
// CircleShape triangle;
// triangle.setRadius(50.f);
// triangle.setPointCount(3);
// triangle.setFillColor(Color::Red);
// triangle.setOutlineThickness(5.f);
// triangle.setOutlineColor(Color::Blue);
//
// Vertex line[] = { Vertex(Vector2f(100.f, 400.f)), Vertex(Vector2f(50.f, 100.f)) };
//
// sf::ConvexShape convex;
// convex.setPosition(Vector2f(400.f, 50.f));
//
// convex.setPointCount(5);
//
// convex.setPoint(0, sf::Vector2f(0, 0));
// convex.setPoint(1, sf::Vector2f(150, 10));
// convex.setPoint(2, sf::Vector2f(120, 90));
// convex.setPoint(3, sf::Vector2f(30, 100));
// convex.setPoint(4, sf::Vector2f(0, 50));
//
// while (window.isOpen())
// {
// sf::Event event;
// while (window.pollEvent(event))
// {
// if (event.type == sf::Event::Closed)
// window.close();
// }
//
// window.clear();
//
// window.draw(triangle);
// window.draw(line, 2, Lines);
// window.draw(convex);
//
// window.display();
// }
//
// return 0;
//}