diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md b/zh-cn/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md index c0b297e0fd526f06e43498f03b71ac6d6db91409..066afa49f580423a4be055f6e2e90115736fdf0a 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md @@ -10,7 +10,7 @@ ## 接口 -CanvasRenderingContext2D(setting: RenderingContextSetting) +CanvasRenderingContext2D(settings?: RenderingContextSettings) 从API version 9开始,该接口支持在ArkTS卡片中使用。 @@ -18,7 +18,7 @@ CanvasRenderingContext2D(setting: RenderingContextSetting) | 参数名 | 参数类型 | 必填 | 参数描述 | | ------- | ---------------------------------------- | ---- | ---------------------------------------- | -| setting | [RenderingContextSettings](#renderingcontextsettings) | 是 | 见[RenderingContextSettings](#renderingcontextsettings)。 | +| setting | [RenderingContextSettings](#renderingcontextsettings) | 否 | 见[RenderingContextSettings](#renderingcontextsettings)。 | ### RenderingContextSettings diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md b/zh-cn/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md index e5f0a624f2ee40635fbdd0d08e655ea0aa3b74c7..cbbaf7779415b66b877fed36035580a3b75f1720 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md @@ -10,7 +10,7 @@ ## 接口 -OffscreenCanvasRenderingContext2D(width: number, height: number, setting: RenderingContextSettings) +OffscreenCanvasRenderingContext2D(width: number, height: number, settings?: RenderingContextSettings) 从API version 9开始,该接口支持在ArkTS卡片中使用。 @@ -20,7 +20,7 @@ OffscreenCanvasRenderingContext2D(width: number, height: number, setting: Render | ------- | ------------------------------------------------------------ | ---- | ------------------------------------ | | width | number | 是 | 离屏画布的宽度 | | height | number | 是 | 离屏画布的高度 | -| setting | [RenderingContextSettings](ts-canvasrenderingcontext2d.md#renderingcontextsettings) | 是 | 见RenderingContextSettings接口描述。 | +| setting | [RenderingContextSettings](ts-canvasrenderingcontext2d.md#renderingcontextsettings) | 否 | 见RenderingContextSettings接口描述。 | ## 属性