RectangleShape

A resizable rectangle containing a texture.

Constructors

this
this()
Undocumented in source.

Members

Functions

draw
void draw(IRenderTarget target, ShaderProgram shader)

Sets the current transformation matrix and draws this onto the target.

setSize
void setSize(vec2 size)

Sets the new size and creates a new mesh after disposing the old mesh.

Variables

_mesh
Mesh _mesh;
Undocumented in source.

Inherited Members

From Shape

draw
void draw(IRenderTarget target, ShaderProgram shader)

Abstract draw function called from IRenderTarget.

texture
Texture texture [@property getter]

Property holding the assigned texture.

Examples

auto rect = new RectangleShape();
rect.setSize(vec2(100, 50)); // 100x50 px
window.draw(rect);

Meta