image

fun image(colorBuffer: ColorBuffer, source: Rectangle, target: Rectangle)(source)

Draws a source area of an image (ColorBuffer) into a target area


fun image(colorBuffer: ColorBuffer, target: Rectangle)(source)

Draws an image (ColorBuffer) into a target area


fun image(colorBuffer: ColorBuffer, x: Double, y: Double, width: Double = colorBuffer.width.toDouble(), height: Double = colorBuffer.height.toDouble())(source)

Draws an image with its top-left corner at (x, y) and dimensions (width, height)


fun image(colorBuffer: ColorBuffer, position: Vector2, width: Double = colorBuffer.width.toDouble(), height: Double = colorBuffer.height.toDouble())(source)

Draws an image with its top-left corner at (position) and dimensions (width, height)


fun image(colorBuffer: ColorBuffer)(source)

Draws an image with its top-left corner at (0,0)


fun image(colorBuffer: ColorBuffer, rectangles: List<Pair<Rectangle, Rectangle>>)(source)

Draws an image onto the specified context using the provided color buffer and rectangles.

Parameters

colorBuffer

The color buffer containing the image to be drawn.

rectangles

A list of pairs of rectangles where the first rectangle in each pair represents the source region in the color buffer, and the second rectangle represents the target region in the context where the portion of the image will be drawn.


fun image(arrayTexture: ArrayTexture, layer: Int = 0, x: Double = 0.0, y: Double = 0.0, width: Double = arrayTexture.width.toDouble(), height: Double = arrayTexture.height.toDouble())(source)

Draws an image using an ArrayTexture as source


fun image(arrayTexture: ArrayTexture, layer: Int = 0, source: Rectangle, target: Rectangle)(source)

Draws an image from a specified layer of an ArrayTexture onto a target rectangle.

Parameters

arrayTexture

the ArrayTexture that contains the image layers.

layer

the layer of the texture to use, defaults to 0 if not specified.

source

the rectangle defining the region of the texture to draw.

target

the rectangle defining the region on the target to draw the texture onto.


fun image(arrayTexture: ArrayTexture, layers: List<Int>, rectangles: List<Pair<Rectangle, Rectangle>>)(source)

Draws an image using the given array texture, layers, and mapping of rectangles.

Parameters

arrayTexture

The texture containing the image data to be drawn.

layers

The list of layer indices to be used from the array texture.

rectangles

A list of pairs where each pair maps a rectangle in the array texture to a corresponding rectangle in the target space.