Skip to content

Documentation / @ripl/canvas / releaseCanvasPaintCache

Function: releaseCanvasPaintCache() ​

releaseCanvasPaintCache(ctx): void

Defined in: canvas/src/utilities.ts:190

Drops every CanvasGradient and CanvasPattern cached against a context, together with the offscreen tile canvases the patterns hold. Call it when the context is torn down.

Parameters ​

ParameterTypeDescription
ctxCanvasRenderingContext2DThe native context whose cached paint is released.

Returns ​

void