View on GitHub


class CircleShape:;
Specialized shape representing a circle.

This class inherits all the functions of Transformable (position, rotation, scale, bounds, ...) as well as the functions of Shape (outline, color, texture, ...).

Since the graphics card can't draw perfect circles, we have to fake them with multiple triangles connected to each other. The "points count" property of CircleShape defines how many of these triangles to use, and therefore defines the quality of the circle.

Laurent Gomila, Jeremy DeHaan

See Also:


this(float radius = 0, uint pointCount = 30);
float radius Radius of the circle
uint pointCount Number of points composing the circle

@property uint pointCount(uint newPointCount);
The number of points of the circle

@property uint pointCount();
The number of points of the circle

@property float radius(float newRadius);
The radius of the circle

@property float radius();
The radius of the circle

const Vector2f getPoint(uint index);
Get a point of the shape.

The result is undefined if index is out of the valid range.

uint index Index of the point to get, in range [0 .. pointCount - 1].

Index-th point of the shape.

const @property CircleShape dup();
Clones this CircleShape