Untitled
unknown
c_cpp
2 years ago
970 B
3
Indexable
// ConsoleApplication1.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//
#include <iostream>
#include <SFML\Graphics.hpp>
#include <windows.h>
using namespace sf;
using namespace std;
int main()
{
	//int a;
	//cin >> a;
	//int b;
	//cin >> b;
	int a;
	cin >> a;
	
	int c;
	cin >> c;
	RenderWindow window(sf::VideoMode(1000, 1000), "Hello");
	ConvexShape convex(4);
	convex.setPoint(0, sf::Vector2f(c, a)); // osnova
	convex.setPoint(1, sf::Vector2f(c+80, a+80));
	convex.setPoint(2, sf::Vector2f(c-50, a-50));
	convex.setPoint(3, sf::Vector2f(a-20, c-10));
	
	
	
	window.draw(convex);
	window.display();
	while (window.isOpen())
	{
		Event event;
		while (window.pollEvent(event)) 
		{
			if (event.type == sf::Event::Closed)
			{
				window.close();
			}
		}
	}
}
Editor is loading...
Leave a Comment