rectangles

fun rectangles(positions: List<Vector2>, width: Double, height: Double = width)(source)

Draws a set of rectangles based on the given positions and dimensions.

Parameters

positions

A list of Vector2 objects representing the positions where rectangles will be drawn.

width

The width of each rectangle.

height

The height of each rectangle. Defaults to the value of the width parameter.


fun rectangles(positions: List<Vector2>, dimensions: List<Vector2>)(source)

Draws multiple rectangles based on the specified positions and dimensions.

Parameters

positions

A list of Vector2 representing the positions of the rectangles.

dimensions

A list of Vector2 representing the dimensions (width and height) of the rectangles.


fun rectangles(rectangles: List<Rectangle>)(source)

Draws a list of rectangles on the specified context using the given draw style.

Parameters

rectangles

A list of Rectangle objects to be drawn.


fun rectangles(batch: RectangleBatch, count: Int = batch.size)(source)

Draws a specified number of rectangles from the given rectangle batch.

Parameters

batch

The batch of rectangles to be drawn.

count

The number of rectangles to draw from the batch. Defaults to the size of the batch.


Facilitates the construction and rendering of rectangles in a batch process.

Parameters

build

A lambda function with receiver of type RectangleBatchBuilder to define the attributes and properties of the rectangles to be drawn.