filledRectangle

fun filledRectangle(position: Vec2f, width: Float, height: Float, rotation: Angle = 0.radians, color: Float = colorBits, color2: Float = color, color3: Float = color2, color4: Float = color3)

Draws a filled 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

color

the packed color of top right vertex. If no subsequent colors are set then the remaining vertices as well.

color2

the packed color of top left vertex. If no subsequent colors are set then the remaining vertices as well.

color3

the packed color of bottom left vertex. If no subsequent colors are set then the remaining vertices as well.

color4

the packed color of bottom right vertex.


fun filledRectangle(rect: Rect, rotation: Angle = 0.radians, color: Float = colorBits, color2: Float = color, color3: Float = color2, color4: Float = color3)

Draws a filled rectangle.

Parameters

rect

the rectangle info

color

the packed color of top right vertex. If no subsequent colors are set then the remaining vertices as well.

color2

the packed color of top left vertex. If no subsequent colors are set then the remaining vertices as well.

color3

the packed color of bottom left vertex. If no subsequent colors are set then the remaining vertices as well.

color4

the packed color of bottom right vertex.


fun filledRectangle(x: Float, y: Float, width: Float, height: Float, rotation: Angle = 0.radians, color: Float = colorBits, color2: Float = color, color3: Float = color2, color4: Float = color3)

Draws a filled 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

color

the packed color of top right vertex. If no subsequent colors are set then the remaining vertices as well.

color2

the packed color of top left vertex. If no subsequent colors are set then the remaining vertices as well.

color3

the packed color of bottom left vertex. If no subsequent colors are set then the remaining vertices as well.

color4

the packed color of bottom right vertex.