Line Color

This commit is contained in:
Asrın Doğan 2020-05-09 12:35:23 +03:00
parent c0240e6471
commit b964978394
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ void TestWindow::Update()
sf::Vertex *array = new sf::Vertex[this -> pointCount]; sf::Vertex *array = new sf::Vertex[this -> pointCount];
for (i = 0; i < this -> pointCount; i++) for (i = 0; i < this -> pointCount; i++)
*(array + i) = sf::Vertex(sf::Vector2f((points + i) -> x, (points + i) -> y), sf::Color::White); *(array + i) = sf::Vertex(sf::Vector2f((points + i) -> x, (points + i) -> y), sf::Color(255, 255/(i+1), 255/(i+1)));
window.clear(sf::Color::Black); window.clear(sf::Color::Black);
window.draw(array, this -> pointCount, sf::PrimitiveType::LinesStrip); window.draw(array, this -> pointCount, sf::PrimitiveType::LinesStrip);