PlatformCanvas
Defined in: platform/types.ts:279
The offscreen 2D canvas surface. HTMLCanvasElement and OffscreenCanvas are
structurally assignable: their overloaded getContext matches this '2d'
overload, whose real return is assignable to PlatformCanvas2DContext.
Properties
Section titled “Properties”height
Section titled “height”height:
number
Defined in: platform/types.ts:281
width:
number
Defined in: platform/types.ts:280
Methods
Section titled “Methods”getContext()
Section titled “getContext()”getContext(
contextId,options?):PlatformCanvas2DContext|null
Defined in: platform/types.ts:282
Parameters
Section titled “Parameters”contextId
Section titled “contextId”"2d"
options?
Section titled “options?”PlatformCanvasContextAttributes
Returns
Section titled “Returns”PlatformCanvas2DContext | null