I'm Trynig to make a Arrow Class that extends the sf::Shape, but when i draw the shape this happen:
Outline are correct, but when i set the fill color, it's fill outside the area.
unsigned int Arrow::getPointCount() const {
return 5;
}
sf::Vector2f Arrow::getPoint(unsigned int index) const {
float x = origin.x;
float y = origin.y;
if(index == 0)
return {x, y - tickness/2};
else if(index == 1)
return {x + length, y - tickness/2};
else if(index == 2)
return {x + length, y - tickness/2 - 30.f};
else if(index == 3)
return {x + length + 30.f, y};
return {x , y};
}