View on GitHub

DSFML

dsfml.graphics.rectangleshape



class RectangleShape: dsfml.graphics.shape.Shape;
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, ...).

Authors:
Laurent Gomila, Jeremy DeHaan

See Also:


http:
//www.sfml-dev.org/documentation/2.0/classsf_1_1RectangleShape.php#details

@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.

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

Returns:
Index-th point of the shape.