25 #ifndef SFML_SHAPE_HPP 26 #define SFML_SHAPE_HPP 31 #include <SFML/Graphics/Drawable.hpp> 32 #include <SFML/System/Vector2.hpp> 61 void AddPoint(
float X,
float Y,
const Color& Col =
Color(255, 255, 255),
const Color& OutlineCol =
Color(0, 0, 0));
79 unsigned int GetNbPoints()
const;
88 void EnableFill(
bool Enable);
97 void EnableOutline(
bool Enable);
106 void SetPointPosition(
unsigned int Index,
const Vector2f& Position);
116 void SetPointPosition(
unsigned int Index,
float X,
float Y);
125 void SetPointColor(
unsigned int Index,
const Color& Col);
134 void SetPointOutlineColor(
unsigned int Index,
const Color& OutlineCol);
142 void SetOutlineWidth(
float Width);
152 const Vector2f& GetPointPosition(
unsigned int Index)
const;
162 const Color& GetPointColor(
unsigned int Index)
const;
172 const Color& GetPointOutlineColor(
unsigned int Index)
const;
180 float GetOutlineWidth()
const;
193 static Shape Line(
float P1X,
float P1Y,
float P2X,
float P2Y,
float Thickness,
const Color& Col,
float Outline = 0.f,
const Color& OutlineCol =
sf::Color(0, 0, 0));
218 static Shape Rectangle(
float P1X,
float P1Y,
float P2X,
float P2Y,
const Color& Col,
float Outline = 0.f,
const Color& OutlineCol =
sf::Color(0, 0, 0));
242 static Shape Circle(
float X,
float Y,
float Radius,
const Color& Col,
float Outline = 0.f,
const Color& OutlineCol =
sf::Color(0, 0, 0));
300 std::vector<Point> myPoints;
302 bool myIsFillEnabled;
303 bool myIsOutlineEnabled;
310 #endif // SFML_SHAPE_HPP Shape defines a drawable convex shape ; it also defines helper functions to draw simple shapes like l...
Abstract base class for every object that can be drawn into a render window.
Color is an utility class for manipulating 32-bits RGBA colors.
Base class for all render targets (window, image, ...)