SFML community forums

Help => Graphics => Topic started by: Ockonal on January 30, 2012, 10:11:54 pm

Title: Line shape
Post by: Ockonal on January 30, 2012, 10:11:54 pm
Hello, after new upgrade in sfml api I founded that sf::Shape::Line, for example was removed. So now the only way to do is to create polygon with 2 points?
Title: Line shape
Post by: Laurent on January 30, 2012, 10:15:19 pm
It was already discussed, in both the task tracker and the forum. Use the "search" button ;)
Title: Line shape
Post by: Ockonal on January 30, 2012, 10:41:54 pm
Okay, sorry. I've tried to search it at forum but failed :) At bug tracker there is an answer, thanks.
Title: Line shape
Post by: texus on January 30, 2012, 11:22:13 pm
After searching a few minutes (it was harder to find than I thought) I found it here: http://www.sfml-dev.org/forum/viewtopic.php?p=42814&highlight=rectangleshape#42814

Quote
Quick question: now that sf::Shape::Line is gone, how can I easily draw a line from point A to point B ?

Quote
If your line has a thickness, it's a rectangle and you can use sf::RectangleShape.

If it has no thickness, you can draw two vertices in sf::Lines mode.