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 ​
| Parameter | Type | Description |
|---|---|---|
ctx | CanvasRenderingContext2D | The native context whose cached paint is released. |
Returns ​
void