rectangle

fun rectangle(position: Vec2f, width: Float, height: Float, rotation: Angle = 0.radians, thickness: Int = this.thickness, joinType: JoinType = JoinType.POINTY, color: Float = colorBits)

Draws a rectangle.

Parameters

position

the position of the bottom left corner of the rectangle

width

the width of the rectangle

height

the height of the rectangle

rotation

rotation of the rectangle

thickness

the thickness of the line in world units

joinType

the type of join, see JoinType

color

the packed color to draw the outline. See Color.toFloatBits.


fun rectangle(rect: Rect, rotation: Angle = 0.radians, thickness: Int = this.thickness, joinType: JoinType = JoinType.POINTY, color: Float = colorBits)

Draws a rectangle.

Parameters

rect

the rectangle info

rotation

rotation of the rectangle

thickness

the thickness of the line in world units

joinType

the type of join, see JoinType

color

the packed color to draw the outline. See Color.toFloatBits.


fun rectangle(x: Float, y: Float, width: Float, height: Float, rotation: Angle = 0.radians, thickness: Int = this.thickness, joinType: JoinType = JoinType.POINTY, color: Float = colorBits)

Draws a rectangle.

Parameters

x

x-coord of the bottom left corner of the rectangle

y

y-coord of the bottom left corner of the rectangle

width

the width of the rectangle

height

the height of the rectangle

rotation

rotation of the rectangle

thickness

the thickness of the line in world units

joinType

the type of join, see JoinType

color

the packed color to draw the outline. See Color.toFloatBits.