get

operator fun RectangleGrid.get(x: Int, y: Int): Rectangle(source)

Retrieves a Rectangle from a two-dimensional list of Rectangles based on the specified x and y indices.

Return

The Rectangle at the specified indices (x, y).

Parameters

x

The column index in the two-dimensional list.

y

The row index in the two-dimensional list.


operator fun RectangleGrid.get(xRange: IntRange, y: Int): List<Rectangle>(source)

Retrieves a sublist of Rectangle objects from a two-dimensional List given a range of indices for rows and a specific column index.

Return

A sublist of Rectangle objects within the specified range of columns from the specified row.

Parameters

xRange

The range of indices specifying the columns to be sliced.

y

The index of the row from which the sublist is retrieved.


operator fun RectangleGrid.get(x: Int, yRange: IntRange): List<Rectangle>(source)

Retrieves a list of rectangles at a specific x-coordinate for a range of y-coordinates from a 2D list of rectangles.

Return

A list of rectangles corresponding to the specified x-coordinate and y-coordinate range.

Parameters

x

The x-coordinate to access within each inner list.

yRange

The range of y-coordinates (indices of the outer list) to retrieve rectangles from.


operator fun RectangleGrid.get(xRange: IntRange, yRange: IntRange): RectangleGrid(source)

Retrieves a subgrid from a 2D list of Rectangles based on the specified ranges.

Return

A 2D list containing the elements of the subgrid specified by the ranges.

Parameters

xRange

The range of x indices to include in the subgrid.

yRange

The range of y indices to include in the subgrid.