Skip to main content

Function: drawLayers()

drawLayers(ctx, layers, override?, area?): void

Defined in: src/lib/rendering/compositing/index.ts:49

Draw layers onto a context that is already transformed to canvas coordinates, from the bottom layer to the top.

Hidden and fully transparent layers are skipped. Each layer uses its opacity and blend mode.

Parameters​

ctx​

DrawingContext

layers​

readonly DrawableLayer[]

layers from top (index 0) to bottom, as LayerStack.layers lists them

override?​

LayerOverride

draw this image instead of one layer's canvas (the stroke preview)

area?​

Rect

draw only this area of each layer (canvas pixels), in place

Returns​

void