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));
300 std::vector<Point> myPoints;
302 bool myIsFillEnabled;
303 bool myIsOutlineEnabled;
Color is an utility class for manipulating 32-bits RGBA colors.
Abstract base class for every object that can be drawn into a render window.
friend class RenderTarget
void AddPoint(const Vector2f &Position, const Color &Col=Color(255, 255, 255), const Color &OutlineCol=Color(0, 0, 0))
Add a point to the shape.
static Shape Circle(const Vector2f &Center, float Radius, const Color &Col, float Outline=0.f, const Color &OutlineCol=sf::Color(0, 0, 0))
Create a shape made of a single circle (use vectors).
unsigned int GetNbPoints() const
Get the number of points composing the shape.
Shape()
Default constructor.
const Vector2f & GetPointPosition(unsigned int Index) const
Get the position of a point.
static Shape Line(const Vector2f &P1, const Vector2f &P2, float Thickness, const Color &Col, float Outline=0.f, const Color &OutlineCol=sf::Color(0, 0, 0))
Create a shape made of a single line (use vectors).
void EnableFill(bool Enable)
Enable or disable filling the shape.
float GetOutlineWidth() const
Get the width of the shape outline.
void SetOutlineWidth(float Width)
Change the width of the shape outline.
virtual void Render(RenderTarget &Target) const
/see Drawable::Render
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))
Create a shape made of a single rectangle (use floats).
void AddPoint(float X, float Y, const Color &Col=Color(255, 255, 255), const Color &OutlineCol=Color(0, 0, 0))
Add a point to the shape.
static Shape Circle(float X, float Y, float Radius, const Color &Col, float Outline=0.f, const Color &OutlineCol=sf::Color(0, 0, 0))
Create a shape made of a single circle (use floats).
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))
Create a shape made of a single line (use floats).
void SetPointOutlineColor(unsigned int Index, const Color &OutlineCol)
Set the outline color of a point.
void SetPointColor(unsigned int Index, const Color &Col)
Set the color of a point.
static Shape Rectangle(const Vector2f &P1, const Vector2f &P2, const Color &Col, float Outline=0.f, const Color &OutlineCol=sf::Color(0, 0, 0))
Create a shape made of a single rectangle (use vectors).
const Color & GetPointColor(unsigned int Index) const
Get the color of a point.
void SetPointPosition(unsigned int Index, float X, float Y)
Set the position of a point.
void SetPointPosition(unsigned int Index, const Vector2f &Position)
Set the position of a point.
void EnableOutline(bool Enable)
Enable or disable drawing the shape outline.
const Color & GetPointOutlineColor(unsigned int Index) const
Get the outline color of a point.
Vector2< float > Vector2f