Draw the shape to a render target.
Get the global bounding rectangle of the entity.
Get the local bounding rectangle of the entity.
Get a point of the shape.
Get the source texture of the shape.
Change the source texture of the shape.
Recompute the internal geometry of the shape.
The fill color of the shape.
The outline color of the shape.
The thickness of the shape's outline.
Get the total number of points in the shape.
The sub-rectangle of the texture that the shape will display.
The local origin of the object.
The position of the object. The default is (0, 0).
The orientation of the object, in degrees. The default is 0 degrees.
The scale factors of the object. The default is (1, 1).
Get the inverse of the combined transform of the object.
Get the combined transform of the object.
Move the object by a given offset.
Draw the object to a render target.
The local origin of the object.
The position of the object. The default is (0, 0).
The orientation of the object, in degrees. The default is 0 degrees.
The scale factors of the object. The default is (1, 1).
Get the inverse of the combined transform of the object.
Get the combined transform of the object.
Move the object by a given offset.
Base class for textured shapes with outline.
Shape is a drawable class that allows to define and display a custom convex shape on a render target.
It's only an abstract base, it needs to be specialized for concrete types of shapes (circle, rectangle, convex polygon, star, ...).
In addition to the attributes provided by the specialized shape classes, a shape always has the following attributes: - a texture - a texture rectangle - a fill color - an outline color - an outline thickness
Each feature is optional, and can be disabled easily: - the texture can be null - the fill/outline colors can be sf::Color::Transparent - the outline thickness can be zero
You can write your own derived shape class, there are only two virtual functions to override: - getPointCount must return the number of points of the shape - getPoint must return the points of the shape