未验证 提交 b3f4d9d6 编写于 作者: O openharmony_ci 提交者: Gitee

!9111 文档整改

Merge pull request !9111 from luoying_ace/ly0905
...@@ -46,7 +46,7 @@ Gauge(options:{value: number, min?: number, max?: number}) ...@@ -46,7 +46,7 @@ Gauge(options:{value: number, min?: number, max?: number})
| 名称 | 类型定义 | 描述 | | 名称 | 类型定义 | 描述 |
| --------- | -------------------- | ------------------------------------------------------------ | | --------- | -------------------- | ------------------------------------------------------------ |
| ColorStop | [ResourceColor](../../ui/ts-types.md#resourcecolor8), number] | 描述渐进色颜色断点类型,第一个参数为颜色值,第二个参数为0~1之间的比例值。 | | ColorStop | [[ResourceColor](../../ui/ts-types.md#resourcecolor8), number] | 描述渐进色颜色断点类型,第一个参数为颜色值,第二个参数为0~1之间的比例值。 |
## 示例 ## 示例
......
...@@ -18,26 +18,32 @@ ...@@ -18,26 +18,32 @@
## 接口 ## 接口
Circle(options?: {width: Length, height: Length}) Circle(options?: {width?: string | number, height?: string | number})
- 参数 - 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| options | Object | 否 | - | 见options参数说明。 | | width | string \| number | 否 | 0 | 宽度。 |
| height | string \| number | 否 | 0 | 高度。 |
- options参数说明
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- |
| width | Length | 是 | - | 宽度。 |
| height | Length | 是 | - | 高度。 |
## 属性 ## 属性
除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性:
| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | | 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | 否 | 圆所在矩形的宽度。 | | fill | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置填充区域颜色。 |
| height | Length | 0 | 否 | 圆所在矩形的高度。 | | fillOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置填充区域透明度。 |
| stroke | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置线条颜色。 |
| strokeDashArray | Array<Length> | [] | 否 | 设置线条间隙。 |
| strokeDashOffset | number \| string | 0 | 否 | 线条绘制起点的偏移量。 |
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 设置线条端点绘制样式。 |
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 设置线条拐角绘制样式。 |
| strokeMiterLimit | number \| string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置线条透明度。 |
| strokeWidth | Length | 1 | 否 | 设置线条宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
## 示例 ## 示例
......
...@@ -19,26 +19,32 @@ ...@@ -19,26 +19,32 @@
## 接口 ## 接口
ellipse(options?: {width: Length, height: Length}) ellipse(options?: {width?: string | number, height?: string | number})
- 参数 - 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- |
| options | Object | 否 | - | 见options参数说明。 |
- options参数说明
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 是 | - | 宽度。 | | width | string \| number | 否 | 0 | 宽度。 |
| height | Length | 是 | - | 高度。 | | height | string \| number | 否 | 0 | 高度。 |
## 属性 ## 属性
| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | 除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性:
| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | 否 | 椭圆所在矩形的宽度。 | | fill | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置填充区域颜色。 |
| height | Length | 0 | 否 | 椭圆所在矩形的高度。 | | fillOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置填充区域透明度。 |
| stroke | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 |设置线条颜色。 |
| strokeDashArray | Array<Length> | [] | 否 | 设置线条间隙。 |
| strokeDashOffset | number \| string | 0 | 否 | 线条绘制起点的偏移量。 |
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 设置线条端点绘制样式。 |
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 设置线条拐角绘制样式。 |
| strokeMiterLimit | number \| string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置线条透明度。 |
| strokeWidth | Length | 1 | 否 | 设置线条宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
## 示例 ## 示例
......
...@@ -19,28 +19,34 @@ ...@@ -19,28 +19,34 @@
## 接口 ## 接口
Line(options?: {width: Length, height: Length}) Line(options?: {width?: string | number, height?: string | number})
- 参数 - 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- |
| options | Object | 否 | - | 见options参数说明。 |
- options参数说明
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 是 | - | 宽度。 | | width | string \| number | 否 | 0 | 宽度。 |
| height | Length | 是 | - | 高度。 | | height | string \| number | 否 | 0 | 高度。 |
## 属性 ## 属性
除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性:
| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | | 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | [Length](../../ui/ts-types.md#length) | 0 | 否 | 直线所在矩形的宽度。 |
| height | [Length](../../ui/ts-types.md#length) | 0 | 否 | 直线所在矩形的高度。 |
| startPoint | Array | [0, 0] | 是 | 直线起点坐标点(相对坐标)。 | | startPoint | Array | [0, 0] | 是 | 直线起点坐标点(相对坐标)。 |
| endPoint | Array | [0, 0] | 是 | 直线终点坐标点(相对坐标)。 | | endPoint | Array | [0, 0] | 是 | 直线终点坐标点(相对坐标)。 |
| fill | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置填充区域颜色。 |
| fillOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置填充区域透明度。 |
| stroke | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置线条颜色。 |
| strokeDashArray | Array<Length> | [] | 否 | 设置线条间隙。 |
| strokeDashOffset | number \| string | 0 | 否 | 线条绘制起点的偏移量。 |
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 设置线条端点绘制样式。 |
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 设置线条拐角绘制样式。 |
| strokeMiterLimit | number \| string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置线条透明度。 |
| strokeWidth | Length | 1 | 否 | 设置线条宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
## 示例 ## 示例
......
...@@ -23,9 +23,9 @@ Path(value?: { width?: number | string; height?: number | string; commands?: str ...@@ -23,9 +23,9 @@ Path(value?: { width?: number | string; height?: number | string; commands?: str
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | ---- | ------ | -------------------- | | -------- | -------- | ---- | ------ | -------------------- |
| width | Length | 否 | 0 | 路径所在矩形的宽度 | | width | number \| string | 否 | 0 | 路径所在矩形的宽度 |
| height | Length | 否 | 0 | 路径所在矩形的高度 | | height | number \| string | 否 | 0 | 路径所在矩形的高度 |
| commands | string | 是 | ‘ ’ | 路径绘制的命令字符串 | | commands | string | 否 | '' | 路径绘制的命令字符串 |
...@@ -35,9 +35,18 @@ Path(value?: { width?: number | string; height?: number | string; commands?: str ...@@ -35,9 +35,18 @@ Path(value?: { width?: number | string; height?: number | string; commands?: str
| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | | 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 |
| -------- | ----------------------------------- | ---- | ---- | ---------------------------------------- | | -------- | ----------------------------------- | ---- | ---- | ---------------------------------------- |
| width | [Length](../../ui/ts-types.md#长度类型) | 0 | 否 | 路径所在矩形画布的宽度。 | | commands | string | '' | 否 | 路径绘制的命令字符串,单位为px。像素单位转换方法请参考[像素单位转换](../../ui/ts-pixel-units.md)。 |
| height | [Length](../../ui/ts-types.md#长度类型) | 0 | 否 | 路径所在矩形画布的高度。 | | fill | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置填充区域颜色。 |
| commands | string | '' | 是 | 路径绘制的命令字符串,单位为px。像素单位转换方法请参考[像素单位转换](../../ui/ts-pixel-units.md)。 | | fillOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置填充区域透明度。 |
| stroke | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置线条颜色。 |
| strokeDashArray | Array<Length> | [] | 否 | 设置线条间隙。 |
| strokeDashOffset | number \| string | 0 | 否 | 线条绘制起点的偏移量。 |
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 设置线条端点绘制样式。 |
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 设置线条拐角绘制样式。 |
| strokeMiterLimit | number \| string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置线条透明度。 |
| strokeWidth | Length | 1 | 否 | 设置线条宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
commands支持的绘制命令如下: commands支持的绘制命令如下:
......
...@@ -19,27 +19,41 @@ ...@@ -19,27 +19,41 @@
## 接口 ## 接口
Polygon(value:{options?: {width: Length, height: Length}}) Polygon(options?: {width?: string | number, height?: string | number})
- 参数 - 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- |
| options | Object | 否 | - | 见options参数说明。 |
- options参数说明
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 是 | - | 宽度。 | | width | string \| number | 否 | 0 | 宽度。 |
| height | Length | 是 | - | 高度。 | | height | string \| number | 否 | 0 | 高度。 |
## 属性 ## 属性
除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性:
| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | | 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | 否 | 多边形所在矩形的宽度。 | | points | Array<Point> | [] | 否 | 多边形的顶点坐标列表。 |
| height | Length | 0 | 否 | 多边形所在矩形的高度。 | | fill | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置填充区域颜色。 |
| points | Array<Point> | - | 是 | 多边形的顶点坐标列表。 | | fillOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置填充区域透明度。 |
| stroke | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置线条颜色。 |
| strokeDashArray | Array<Length> | [] | 否 | 设置线条间隙。 |
| strokeDashOffset | number \| string | 0 | 否 | 线条绘制起点的偏移量。 |
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 设置线条端点绘制样式。 |
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 设置线条拐角绘制样式。 |
| strokeMiterLimit | number \| string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置线条透明度。 |
| strokeWidth | Length | 1 | 否 | 设置线条宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
## Point
点坐标类型。
| 名称 | 类型定义 | 描述 |
| --------- | -------------------- | ------------------------------------------------------------ |
| Point | [number, number] | 第一个参数为x轴坐标,第二个参数为y轴坐标(相对坐标)。 |
## 示例 ## 示例
......
...@@ -19,28 +19,41 @@ ...@@ -19,28 +19,41 @@
## 接口 ## 接口
Polyline(options?: {width: Length, height: Length}) Polyline(options?: {width?: string | number, height?: string | number})
- 参数 - 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- |
| options | Object | 否 | - | 见options参数说明。 |
- options参数说明
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 是 | - | 宽度。 | | width | string \| number | 否 | 0 | 宽度。 |
| height | Length | 是 | - | 高度。 | | height | string \| number | 否 | 0 | 高度。 |
## 属性 ## 属性
除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性:
| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | | 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | 否 | 折线所在矩形的宽度。 | | points | Array<Point> | [] | 否 | 折线经过坐标点列表。 |
| height | Length | 0 | 否 | 折线所在矩形的高度。 | | fill | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置填充区域颜色。 |
| points | Array<Point> | - | 是 | 折线经过坐标点列表。 | | fillOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置填充区域透明度。 |
| stroke | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置线条颜色。 |
| strokeDashArray | Array<Length> | [] | 否 | 设置线条间隙。 |
| strokeDashOffset | number \| string | 0 | 否 | 线条绘制起点的偏移量。 |
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 设置线条端点绘制样式。 |
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 设置线条拐角绘制样式。 |
| strokeMiterLimit | number \| string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置线条透明度。 |
| strokeWidth | Length | 1 | 否 | 设置线条宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
## Point
点坐标类型。
| 名称 | 类型定义 | 描述 |
| --------- | -------------------- | ------------------------------------------------------------ |
| Point | [number, number] | 第一个参数为x轴坐标,第二个参数为y轴坐标(相对坐标)。 |
## 示例 ## 示例
......
...@@ -19,32 +19,39 @@ ...@@ -19,32 +19,39 @@
## 接口 ## 接口
Rect(value:{options?: {width: Length,height: Length,radius?: Length | Array<Length>} | {width: Length,height: Length,radiusWidth?: Length,radiusHeight?: Length}}) Rect(options?: {width?: string | number,height?: string | number,radius?: string | number | Array<string | number>} |
{width?: string | number,height?: string | number,radiusWidth?: string | number,radiusHeight?: string | number})
- 参数 - 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- |
| options | Object | 否 | - | 见options参数说明。 |
- options参数说明
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 是 | - | 宽度。 | | width | string \| number | 否 | 0 | 宽度。 |
| height | Length | 是 | - | 高度。 | | height | string \| number | 否 | 0 | 高度。 |
| radius | Length \| Array<Length> | 否 | 0 | 圆角半径,支持分别设置四个角的圆角度数。 | | radius | string \| number \| Array<string \| number> | 否 | 0 | 圆角半径,支持分别设置四个角的圆角度数。 |
| radiusWidth | Length | 否 | 0 | 圆角宽度。 | | radiusWidth | string \| number | 否 | 0 | 圆角宽度。 |
| radiusHeight | Length | 否 | 0 | 圆角高度。 | | radiusHeight | string \| number | 否 | 0 | 圆角高度。 |
## 属性 ## 属性
除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性:
| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | | 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | 否 | 宽度。 | | radiusWidth | string \| number | 0 | 否 | 圆角的宽度,仅设置宽时宽高一致。 |
| height | Length | 0 | 否 | 高度。 | | radiusHeight | string \| number | 0 | 否 | 圆角的高度,仅设置高时宽高一致。 |
| radiusWidth | Length | 0 | 否 | 圆角的宽度,仅设置宽时宽高一致。 | | radius | string \| number \| Array<string \| number> | 0 | 否 | 圆角半径大小。 |
| radiusHeight | Length | 0 | 否 | 圆角的高度,仅设置高时宽高一致。 | | fill | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置填充区域颜色。 |
| radius | Length \| Array<Length> | 0 | 否 | 圆角大小。 | | fillOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置填充区域透明度。 |
| stroke | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置线条颜色。 |
| strokeDashArray | Array<Length> | [] | 否 | 设置线条间隙。 |
| strokeDashOffset | number \| string | 0 | 否 | 线条绘制起点的偏移量。 |
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 设置线条端点绘制样式。 |
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 设置线条拐角绘制样式。 |
| strokeMiterLimit | number \| string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置线条透明度。 |
| strokeWidth | Length | 1 | 否 | 设置线条宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
## 示例 ## 示例
......
...@@ -25,29 +25,33 @@ ...@@ -25,29 +25,33 @@
## 接口 ## 接口
Shape(value:{target?: PixelMap}) Shape(value?: PixelMap)
- 参数 - 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| target | PixelMap | 否 | null | 绘制目标,可将图形绘制在指定的PixelMap对象中,若未设置,则在当前绘制目标中进行绘制。 | | value | PixelMap | 否 | - | 绘制目标,可将图形绘制在指定的PixelMap对象中,若未设置,则在当前绘制目标中进行绘制。 |
## 属性 ## 属性
除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性:
| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | | 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| viewPort | {<br/>x:&nbsp;Length,<br/>y:&nbsp;Length,<br/>width:&nbsp;Length,<br/>height:&nbsp;Length<br/>} | - | 是 | 形状的视口。 | | viewPort | {<br/>x?:&nbsp;number \| string,<br/>y?:&nbsp;number \| string,<br/>width?:&nbsp;number \| string,<br/>height?:&nbsp;number \| string<br/>} | { x:0, y:0, width:0, height:0 } | 否 | 形状的视口。 |
| fill | [ResourceColor](../../ui/ts-types.md) | Black | 否 | 填充颜色。 | | fill | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置填充区域颜色。 |
| stroke | [ResourceColor](../../ui/ts-types.md) | - | 否 | 边框颜色。 | | fillOpacity | number&nbsp;\|&nbsp;string&nbsp;\|&nbsp;[Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置填充区域透明度。 |
| strokeDashArray | Array&lt;Length&gt; | [] | 否 | 设置边框的间隙。 | | stroke | [ResourceColor](../../ui/ts-types.md) | Color.Black | 否 | 设置线条颜色。 |
| strokeDashOffset | Length | 0 | 否 | 边框绘制起点的偏移量。 | | strokeDashArray | Array&lt;Length&gt; | [] | 否 | 设置线条间隙。 |
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 路径端点绘制样式。 | | strokeDashOffset | number&nbsp;\|&nbsp;string | 0 | 否 | 线条绘制起点的偏移量。 |
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 边框拐角绘制样式。 | | strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 设置线条端点绘制样式。 |
| strokeMiterLimit | number&nbsp;\|&nbsp;string | 4 | 否 | 锐角绘制成斜角的极限值。 | | strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 设置线条拐角绘制样式。 |
| strokeOpacity | number&nbsp;\|&nbsp;string&nbsp;\|&nbsp;[Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置边框的不透明度。 | | strokeMiterLimit | number&nbsp;\|&nbsp;string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeWidth | Length | 1 | 否 | 设置边框的宽度。 | | strokeOpacity | number&nbsp;\|&nbsp;string&nbsp;\|&nbsp;[Resource](../../ui/ts-types.md#resource类型) | 1 | 否 | 设置线条透明度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿。 | | strokeWidth | number&nbsp;\|&nbsp;string | 1 | 否 | 设置线条宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
| mesh<sup>8+</sup> | Array&lt;number&gt;,number,number | [],0,0 | 否 | 设置mesh效果。第一个参数为长度(column + 1)* (row + 1)* 2的数组,它记录了扭曲后的位图各个顶点位置,第二个参数为mesh矩阵列数column,第三个参数为mesh矩阵行数row。 |
## 示例 ## 示例
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册