PlatformCanvas
此内容尚不支持你的语言。
Defined in: platform/types.ts:273
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:275
width:
number
Defined in: platform/types.ts:274
Methods
Section titled “Methods”getContext()
Section titled “getContext()”getContext(
contextId,options?):PlatformCanvas2DContext|null
Defined in: platform/types.ts:276
Parameters
Section titled “Parameters”contextId
Section titled “contextId”"2d"
options?
Section titled “options?”PlatformCanvasContextAttributes
Returns
Section titled “Returns”PlatformCanvas2DContext | null