drawImage

fun Program.drawImage(width: Int, height: Int, contentScale: Double? = null, format: ColorFormat = ColorFormat.RGBa, type: ColorType = defaultColorType(format), multisample: BufferMultisample? = null, drawFunction: Drawer.() -> Unit): ColorBuffer(source)

Create an image ColorBuffer by drawing it

Since

0.4.3

Parameters

width

the width of the created image

height

the height of the created image

format

the color format of the created image

type

the color type of the created image

contentScale

the content scale of the created image. When set to null the content scale setting is taken from RenderTarget.active.

multisample

the multisampling used for drawing the image, the resulting image has multisampling disabled. When set to null the multisampling setting is taken from RenderTarget.active.

drawFunction

the user supplied function that is used to draw on the created image