drawImage

fun drawImage(drawContext: DrawContext, drawStyle: DrawStyle, colorBuffer: ColorBuffer, rectangles: List<Pair<Rectangle, Rectangle>>)(source)


fun drawImage(    drawContext: DrawContext,     drawStyle: DrawStyle,     arrayTexture: ArrayTexture,     layers: List<Int>,     rectangles: List<Pair<Rectangle, Rectangle>>)(source)

Draws an image using a supplied array texture, associated layer indices, and a list of source and target rectangles.

This method utilizes the specified drawing context and style to render the image data from the array texture to specific locations and sizes defined by the target rectangles. It assumes a one-to-one mapping between layers and the source-target rectangles to properly process each layer.

Parameters

drawContext

The drawing context containing matrices and parameters necessary for rendering.

drawStyle

The style specifications to apply during rendering, including shading and state settings.

arrayTexture

The array texture containing the image data to be drawn.

layers

A list of layer indices corresponding to the layers of the array texture to render.

rectangles

A list of pairs of source rectangles (within the array texture) and target rectangles (on the canvas) used during rendering.


fun drawImage(    drawContext: DrawContext,     drawStyle: DrawStyle,     colorBuffer: ColorBuffer,     x: Double,     y: Double,     width: Double,     height: Double)(source)

Draws an image from a ColorBuffer onto a specified rectangular area on the canvas.

Parameters

drawContext

The drawing context containing transformation matrices and rendering parameters.

drawStyle

The style settings to apply during rendering, such as shading and state configurations.

colorBuffer

The ColorBuffer that contains the image data to be drawn.

x

The x-coordinate of the top-left corner of the target rectangle on the canvas.

y

The y-coordinate of the top-left corner of the target rectangle on the canvas.

width

The width of the target rectangle where the image will be drawn.

height

The height of the target rectangle where the image will be drawn.


fun drawImage(    drawContext: DrawContext,     drawStyle: DrawStyle,     arrayTexture: ArrayTexture,     layer: Int,     x: Double,     y: Double,     width: Double,     height: Double)(source)

Draws an image from an ArrayTexture onto a specified rectangular area on the canvas.

Parameters

drawContext

The drawing context containing transformation matrices and rendering parameters.

drawStyle

The style settings to apply during rendering, such as shading and state configurations.

arrayTexture

The array texture that contains the image data to be drawn.

layer

The index of the layer in the array texture to render.

x

The x-coordinate of the top-left corner of the target rectangle on the canvas.

y

The y-coordinate of the top-left corner of the target rectangle on the canvas.

width

The width of the target rectangle where the image will be drawn.

height

The height of the target rectangle where the image will be drawn.