Composite

class Composite(val session: Session?) : Layer, AutoCloseable(source)

Constructors

Link copied to clipboard
constructor(session: Session?)

Properties

Link copied to clipboard
var accumulation: ColorBuffer?
Link copied to clipboard
var blendFilter: Pair<Filter, Filter.() -> Unit>?
Link copied to clipboard
Link copied to clipboard
var clearColor: ColorRGBa?
Link copied to clipboard
var colorType: ColorType
Link copied to clipboard
var drawFunc: () -> Unit
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val postFilters: MutableList<Triple<Filter, Array<out Layer>, Filter.() -> Unit>>
Link copied to clipboard
val result: ColorBuffer
Link copied to clipboard
val session: Session?
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
open override fun close()
Link copied to clipboard
fun draw(drawer: Drawer)
Link copied to clipboard
fun Layer.draw(function: () -> Unit)

set the draw contents of the layer

Link copied to clipboard
fun Drawer.image(layer: 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