RectangleShape

Specialized shape representing a rectangle.

Constructors

this
this(Vector2f theSize)

Default constructor.

Destructor

~this
~this()

Destructor.

Members

Functions

getPoint
Vector2f getPoint(uint index)

Get a point of the rectangle.

Properties

pointCount
uint pointCount [@property getter]

The point count for a rectangle is always 4.

size
Vector2f size [@property setter]
Vector2f size [@property getter]

The size of the rectangle.

Inherited Members

From Shape

__anonymous
mixin NormalTransformable
Undocumented in source.
textureRect
IntRect textureRect [@property setter]
IntRect textureRect [@property getter]

The sub-rectangle of the texture that the shape will display.

fillColor
Color fillColor [@property setter]
Color fillColor [@property getter]

The fill color of the shape.

outlineColor
Color outlineColor [@property setter]
Color outlineColor [@property getter]

The outline color of the shape.

outlineThickness
float outlineThickness [@property setter]
float outlineThickness [@property getter]

The thickness of the shape's outline.

pointCount
uint pointCount [@property getter]

The total number of points in the shape.

getGlobalBounds
FloatRect getGlobalBounds()

Get the global bounding rectangle of the entity.

getLocalBounds
FloatRect getLocalBounds()

Get the local bounding rectangle of the entity.

getPoint
Vector2f getPoint(uint index)

Get a point of the shape.

getTexture
const(Texture) getTexture()

Get the source texture of the shape.

setTexture
void setTexture(const(Texture) texture, bool resetRect)

Change the source texture of the shape.

draw
void draw(RenderTarget renderTarget, RenderStates renderStates)

Draw the shape to a render target.

update
void update()

Recompute the internal geometry of the shape.

Meta