View on GitHub


class RectangleShape:;
Specialized shape representing a rectangle.

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

Laurent Gomila, Jeremy DeHaan

See Also:


@property uint pointCount();
The point count for a rectangle is always 4.

@property Vector2f size(Vector2f theSize);
The size of the rectangle.

@property Vector2f size();
The size of the rectangle.

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

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.