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, ...).

Constructors

this
this(Vector2f theSize)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

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]

The size of the rectangle.

size
Vector2f size [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From Shape

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

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

textureRect
IntRect textureRect [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
fillColor
Color fillColor [@property setter]

The fill color of the shape.

fillColor
Color fillColor [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
outlineColor
Color outlineColor [@property setter]

The outline color of the shape.

outlineColor
Color outlineColor [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
outlineThickness
float outlineThickness [@property setter]

The thickness of the shape's outline.

outlineThickness
float outlineThickness [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
pointCount
uint pointCount [@property getter]

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

See Also

Meta

Authors

Laurent Gomila, Jeremy DeHaan