Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
888 B
5
Indexable
Never
#include <iostream>
#include <SFML/Graphics.hpp>
using namespace std;

int main() {
	setlocale(LC_ALL, "Russian");
	int w, h;
	w = 700;
	h = 700;
	sf::RenderWindow window(sf::VideoMode(w, h), "Ilya loh");
	while (window.isOpen()) {
		sf::ConvexShape convex;
		convex.setFillColor(sf::Color(255, 0, 255));
		convex.setPointCount(10);
		convex.setPoint(0, sf::Vector2f{ 300, 50 });
		convex.setPoint(1, sf::Vector2f{ 225, 200 });
		convex.setPoint(2, sf::Vector2f{ 50, 200 });
		convex.setPoint(3, sf::Vector2f{ 200, 300 });
		convex.setPoint(4, sf::Vector2f{ 150, 500 });
		convex.setPoint(5, sf::Vector2f{ 300, 350 });
		convex.setPoint(6, sf::Vector2f{ 450, 500 });
		convex.setPoint(7, sf::Vector2f{ 400, 300 });
		convex.setPoint(8, sf::Vector2f{ 550, 200 });
		convex.setPoint(9, sf::Vector2f{ 375, 200 });

		window.draw(convex);
		window.display();
	}	
}
Leave a Comment