Package-level declarations

Types

Link copied to clipboard
class ColorBufferCache(val width: Int, val height: Int)
Link copied to clipboard
data class ColorBufferCacheKey(val colorType: ColorType, val contentScale: Double)
Link copied to clipboard
class Composite(val session: Session?) : Layer, AutoCloseable
Link copied to clipboard
open class Layer

A single layer representation

Link copied to clipboard

Functions

Link copied to clipboard
fun <T : Filter1to1> Layer.apply(drawer: Drawer, filter: T, source: Layer, colorType: ColorType = this.colorType, function: T.() -> Unit): Layer
fun <T : Filter2to1> Layer.apply(drawer: Drawer, filter: T, source0: Layer, source1: Layer, colorType: ColorType = this.colorType, function: T.() -> Unit): Layer
Link copied to clipboard
fun Layer.aside(colorType: ColorType = this.colorType, multisample: BufferMultisample = BufferMultisample.Disabled, function: Layer.() -> Unit): Layer

Creates a new Layer of type ASIDE as a child of the current layer, applies the specified function to configure it, and returns the created layer.

Link copied to clipboard
fun <F : Filter2to1> Layer.blend(filter: F, configure: F.() -> Unit = {}): F

add a blend filter to the layer

Link copied to clipboard
fun compose(function: Composite.() -> Unit): Composite

Creates a Composite object and allows configuration of its layers and effects within the provided function.

Link copied to clipboard
fun Layer.draw(function: () -> Unit)

set the draw contents of the layer

Link copied to clipboard
fun Layer.layer(colorType: ColorType = this.colorType, multisample: BufferMultisample = BufferMultisample.Disabled, function: Layer.() -> Unit): Layer

Creates a new layer within the current layer, allowing for hierarchical composition of drawings. The newly created layer inherits properties such as color type and multisample from the parent layer unless explicitly overridden. A custom lambda function can be applied to configure the new layer.

Link copied to clipboard
fun Layer.mask(function: () -> Unit)

the drawing acts as a mask on the layer

Link copied to clipboard
fun <F : Filter1to1> Layer.post(filter: F, configure: F.() -> Unit = {}): F

add a post-processing filter to the layer

fun <F : Filter2to1> Layer.post(filter: F, input1: Layer, configure: F.() -> Unit = {}): F
fun <F : Filter3to1> Layer.post(filter: F, input1: Layer, input2: Layer, configure: F.() -> Unit = {}): F