25 #ifndef SFML_SHAPE_HPP
26 #define SFML_SHAPE_HPP
31 #include <SFML/Graphics/Export.hpp>
32 #include <SFML/Graphics/Drawable.hpp>
33 #include <SFML/Graphics/Transformable.hpp>
34 #include <SFML/Graphics/VertexArray.hpp>
35 #include <SFML/System/Vector2.hpp>
283 void updateFillColors();
289 void updateTexCoords();
295 void updateOutline();
301 void updateOutlineColors();
311 Color m_outlineColor;
312 float m_outlineThickness;
322 #endif // SFML_SHAPE_HPP
Utility class for manipulating RGBA colors.
FloatRect getLocalBounds() const
Get the local bounding rectangle of the entity.
void setTextureRect(const IntRect &rect)
Set the sub-rectangle of the texture that the shape will display.
void update()
Recompute the internal geometry of the shape.
const IntRect & getTextureRect() const
Get the sub-rectangle of the texture displayed by the shape.
Abstract base class for objects that can be drawn to a render target.
void setFillColor(const Color &color)
Set the fill color of the shape.
Shape()
Default constructor.
const Color & getFillColor() const
Get the fill color of the shape.
Image living on the graphics card that can be used for drawing.
virtual ~Shape()
Virtual destructor.
Define the states used for drawing to a RenderTarget.
virtual std::size_t getPointCount() const =0
Get the total number of points of the shape.
virtual Vector2f getPoint(std::size_t index) const =0
Get a point of the shape.
const Texture * getTexture() const
Get the source texture of the shape.
void setTexture(const Texture *texture, bool resetRect=false)
Change the source texture of the shape.
const Color & getOutlineColor() const
Get the outline color of the shape.
void setOutlineThickness(float thickness)
Set the thickness of the shape's outline.
Base class for all render targets (window, texture, ...)
FloatRect getGlobalBounds() const
Get the global (non-minimal) bounding rectangle of the entity.
Define a set of one or more 2D primitives.
float getOutlineThickness() const
Get the outline thickness of the shape.
Base class for textured shapes with outline.
void setOutlineColor(const Color &color)
Set the outline color of the shape.