Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
0b79ec67
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
0b79ec67
编写于
10月 12, 2022
作者:
O
openharmony_ci
提交者:
Gitee
10月 12, 2022
浏览文件
操作
浏览文件
下载
差异文件
!10541 添加绘制组件示例挑单到3.1release
Merge pull request !10541 from 田雨/OpenHarmony-3.1-Release
上级
8eab425a
7b457561
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
91 addition
and
39 deletion
+91
-39
zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image1_0000001219982725.png
...erence/arkui-ts/figures/zh-cn_image1_0000001219982725.png
+0
-0
zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001219982725.png
...ference/arkui-ts/figures/zh-cn_image_0000001219982725.png
+0
-0
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-circle.md
...on-dev/reference/arkui-ts/ts-drawing-components-circle.md
+7
-7
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-ellipse.md
...n-dev/reference/arkui-ts/ts-drawing-components-ellipse.md
+7
-7
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-line.md
...tion-dev/reference/arkui-ts/ts-drawing-components-line.md
+54
-2
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-path.md
...tion-dev/reference/arkui-ts/ts-drawing-components-path.md
+1
-1
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-polygon.md
...n-dev/reference/arkui-ts/ts-drawing-components-polygon.md
+7
-7
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-polyline.md
...-dev/reference/arkui-ts/ts-drawing-components-polyline.md
+1
-1
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-rect.md
...tion-dev/reference/arkui-ts/ts-drawing-components-rect.md
+7
-7
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-shape.md
...ion-dev/reference/arkui-ts/ts-drawing-components-shape.md
+7
-7
未找到文件。
zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image1_0000001219982725.png
0 → 100644
浏览文件 @
0b79ec67
5.8 KB
zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001219982725.png
查看替换文件 @
8eab425a
浏览文件 @
0b79ec67
8.7 KB
|
W:
|
H:
24.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-circle.md
浏览文件 @
0b79ec67
...
@@ -36,14 +36,14 @@ Circle(options?: {width?: string | number, height?: string | number})
...
@@ -36,14 +36,14 @@ Circle(options?: {width?: string | number, height?: string | number})
| -------- | -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- | -------- |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置填充区域透明度。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置填充区域透明度。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
Color.Black | 否 | 设置线条颜色
。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
- | 否 | 设置边框颜色,不设置时,默认没有边框
。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置
线条
间隙。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置
边框
间隙。 |
| strokeDashOffset | number
\|
string | 0 | 否 |
线条
绘制起点的偏移量。 |
| strokeDashOffset | number
\|
string | 0 | 否 |
边框
绘制起点的偏移量。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置
线条
端点绘制样式。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置
边框
端点绘制样式。 |
| strokeLineJoin |
[
LineJoinStyle
](
ts-appendix-enums.md#linejoinstyle
)
| LineJoinStyle.Miter | 否 | 设置
线条
拐角绘制样式。 |
| strokeLineJoin |
[
LineJoinStyle
](
ts-appendix-enums.md#linejoinstyle
)
| LineJoinStyle.Miter | 否 | 设置
边框
拐角绘制样式。 |
| strokeMiterLimit | number
\|
string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeMiterLimit | number
\|
string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置
线条
透明度。 |
| strokeOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置
边框
透明度。 |
| strokeWidth | Length | 1 | 否 | 设置
线条
宽度。 |
| strokeWidth | Length | 1 | 否 | 设置
边框
宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
...
...
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-ellipse.md
浏览文件 @
0b79ec67
...
@@ -37,14 +37,14 @@ ellipse(options?: {width?: string | number, height?: string | number})
...
@@ -37,14 +37,14 @@ ellipse(options?: {width?: string | number, height?: string | number})
| -------- | -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- | -------- |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置填充区域透明度。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置填充区域透明度。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
Color.Black | 否 |设置线条颜色
。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
- | 否 |设置边框颜色,不设置时,默认没有边框
。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置
线条
间隙。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置
边框
间隙。 |
| strokeDashOffset | number
\|
string | 0 | 否 |
线条
绘制起点的偏移量。 |
| strokeDashOffset | number
\|
string | 0 | 否 |
边框
绘制起点的偏移量。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置
线条
端点绘制样式。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置
边框
端点绘制样式。 |
| strokeLineJoin |
[
LineJoinStyle
](
ts-appendix-enums.md#linejoinstyle
)
| LineJoinStyle.Miter | 否 | 设置
线条
拐角绘制样式。 |
| strokeLineJoin |
[
LineJoinStyle
](
ts-appendix-enums.md#linejoinstyle
)
| LineJoinStyle.Miter | 否 | 设置
边框
拐角绘制样式。 |
| strokeMiterLimit | number
\|
string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeMiterLimit | number
\|
string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置
线条
透明度。 |
| strokeOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置
边框
透明度。 |
| strokeWidth | Length | 1 | 否 | 设置
线条
宽度。 |
| strokeWidth | Length | 1 | 否 | 设置
边框
宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
...
...
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-line.md
浏览文件 @
0b79ec67
...
@@ -48,9 +48,10 @@ Line(options?: {width?: string | number, height?: string | number})
...
@@ -48,9 +48,10 @@ Line(options?: {width?: string | number, height?: string | number})
| strokeWidth | Length | 1 | 否 | 设置线条宽度。 |
| strokeWidth | Length | 1 | 否 | 设置线条宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
## 示例
## 示例
### 示例1
```
ts
```
ts
// xxx.ets
// xxx.ets
@
Entry
@
Entry
...
@@ -77,7 +78,15 @@ struct LineExample {
...
@@ -77,7 +78,15 @@ struct LineExample {
.
startPoint
([
0
,
0
])
.
startPoint
([
0
,
0
])
.
endPoint
([
100
,
100
])
.
endPoint
([
100
,
100
])
.
strokeWidth
(
3
)
.
strokeWidth
(
3
)
.
strokeDashArray
([
1
,
3
])
.
strokeDashArray
([
10
,
3
])
.
backgroundColor
(
'
#F5F5F5
'
)
// strokeDashOffset用于定义关联虚线strokeDashArray数组渲染时的偏移
Line
({
width
:
50
,
height
:
50
})
.
startPoint
([
0
,
0
])
.
endPoint
([
100
,
100
])
.
strokeWidth
(
3
)
.
strokeDashArray
([
10
,
3
])
.
strokeDashOffset
(
5
)
.
backgroundColor
(
'
#F5F5F5
'
)
.
backgroundColor
(
'
#F5F5F5
'
)
}
}
}
}
...
@@ -85,3 +94,46 @@ struct LineExample {
...
@@ -85,3 +94,46 @@ struct LineExample {
```
```


### 示例2
```
ts
// xxx.ets
@
Entry
@
Component
struct
LineExample1
{
build
()
{
Row
({
space
:
10
})
{
// 当LineCapStyle值为Butt时
Line
()
.
width
(
100
)
.
height
(
200
)
.
startPoint
([
50
,
50
])
.
endPoint
([
50
,
200
])
.
strokeWidth
(
20
)
.
strokeLineCap
(
LineCapStyle
.
Butt
)
.
backgroundColor
(
'
#F5F5F5
'
).
margin
(
10
)
// 当LineCapStyle值为Round时
Line
()
.
width
(
100
)
.
height
(
200
)
.
startPoint
([
50
,
50
])
.
endPoint
([
50
,
200
])
.
strokeWidth
(
20
)
.
strokeLineCap
(
LineCapStyle
.
Round
)
.
backgroundColor
(
'
#F5F5F5
'
)
// 当LineCapStyle值为Square时
Line
()
.
width
(
100
)
.
height
(
200
)
.
startPoint
([
50
,
50
])
.
endPoint
([
50
,
200
])
.
strokeWidth
(
20
)
.
strokeLineCap
(
LineCapStyle
.
Square
)
.
backgroundColor
(
'
#F5F5F5
'
)
}
}
}
```

zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-path.md
浏览文件 @
0b79ec67
...
@@ -35,7 +35,7 @@ Path(value?: { width?: number | string; height?: number | string; commands?: str
...
@@ -35,7 +35,7 @@ Path(value?: { width?: number | string; height?: number | string; commands?: str
| commands | string | '' | 否 | 路径绘制的命令字符串,单位为px。像素单位转换方法请参考
[
像素单位转换
](
../../ui/ts-pixel-units.md
)
。 |
| commands | string | '' | 否 | 路径绘制的命令字符串,单位为px。像素单位转换方法请参考
[
像素单位转换
](
../../ui/ts-pixel-units.md
)
。 |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置填充区域透明度。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置填充区域透明度。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
Color.Black
| 否 | 设置线条颜色。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
-
| 否 | 设置线条颜色。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置线条间隙。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置线条间隙。 |
| strokeDashOffset | number
\|
string | 0 | 否 | 线条绘制起点的偏移量。 |
| strokeDashOffset | number
\|
string | 0 | 否 | 线条绘制起点的偏移量。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置线条端点绘制样式。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置线条端点绘制样式。 |
...
...
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-polygon.md
浏览文件 @
0b79ec67
...
@@ -37,14 +37,14 @@ Polygon(options?: {width?: string | number, height?: string | number})
...
@@ -37,14 +37,14 @@ Polygon(options?: {width?: string | number, height?: string | number})
| points | Array
<
Point
>
| [] | 否 | 多边形的顶点坐标列表。 |
| points | Array
<
Point
>
| [] | 否 | 多边形的顶点坐标列表。 |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置填充区域透明度。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置填充区域透明度。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
Color.Black | 否 | 设置线条颜色
。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
- | 否 | 设置边框颜色,不设置时,默认没有边框线条
。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置
线条
间隙。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置
边框
间隙。 |
| strokeDashOffset | number
\|
string | 0 | 否 |
线条
绘制起点的偏移量。 |
| strokeDashOffset | number
\|
string | 0 | 否 |
边框
绘制起点的偏移量。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置
线条
端点绘制样式。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置
边框
端点绘制样式。 |
| strokeLineJoin |
[
LineJoinStyle
](
ts-appendix-enums.md#linejoinstyle
)
| LineJoinStyle.Miter | 否 | 设置
线条
拐角绘制样式。 |
| strokeLineJoin |
[
LineJoinStyle
](
ts-appendix-enums.md#linejoinstyle
)
| LineJoinStyle.Miter | 否 | 设置
边框
拐角绘制样式。 |
| strokeMiterLimit | number
\|
string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeMiterLimit | number
\|
string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置
线条
透明度。 |
| strokeOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置
边框
透明度。 |
| strokeWidth | Length | 1 | 否 | 设置
线条
宽度。 |
| strokeWidth | Length | 1 | 否 | 设置
边框
宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
## Point
## Point
...
...
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-polyline.md
浏览文件 @
0b79ec67
...
@@ -38,7 +38,7 @@ Polyline(options?: {width?: string | number, height?: string | number})
...
@@ -38,7 +38,7 @@ Polyline(options?: {width?: string | number, height?: string | number})
| points | Array
<
Point
>
| [] | 否 | 折线经过坐标点列表。 |
| points | Array
<
Point
>
| [] | 否 | 折线经过坐标点列表。 |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置填充区域透明度。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置填充区域透明度。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
Color.Black
| 否 | 设置线条颜色。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
-
| 否 | 设置线条颜色。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置线条间隙。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置线条间隙。 |
| strokeDashOffset | number
\|
string | 0 | 否 | 线条绘制起点的偏移量。 |
| strokeDashOffset | number
\|
string | 0 | 否 | 线条绘制起点的偏移量。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置线条端点绘制样式。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置线条端点绘制样式。 |
...
...
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-rect.md
浏览文件 @
0b79ec67
...
@@ -44,14 +44,14 @@ Rect(options?: {width?: string | number,height?: string | number,radius?: string
...
@@ -44,14 +44,14 @@ Rect(options?: {width?: string | number,height?: string | number,radius?: string
| radius | string
\|
number
\|
Array
<
string
\|
number
>
| 0 | 否 | 圆角半径大小。 |
| radius | string
\|
number
\|
Array
<
string
\|
number
>
| 0 | 否 | 圆角半径大小。 |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置填充区域透明度。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置填充区域透明度。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
Color.Black | 否 | 设置线条颜色
。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
- | 否 | 设置边框颜色,不设置时,默认没有边框线条
。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置
线条
间隙。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置
边框
间隙。 |
| strokeDashOffset | number
\|
string | 0 | 否 |
线条
绘制起点的偏移量。 |
| strokeDashOffset | number
\|
string | 0 | 否 |
边框
绘制起点的偏移量。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置
线条
端点绘制样式。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置
边框
端点绘制样式。 |
| strokeLineJoin |
[
LineJoinStyle
](
ts-appendix-enums.md#linejoinstyle
)
| LineJoinStyle.Miter | 否 | 设置
线条
拐角绘制样式。 |
| strokeLineJoin |
[
LineJoinStyle
](
ts-appendix-enums.md#linejoinstyle
)
| LineJoinStyle.Miter | 否 | 设置
边框
拐角绘制样式。 |
| strokeMiterLimit | number
\|
string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeMiterLimit | number
\|
string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置
线条
透明度。 |
| strokeOpacity | number
\|
string
\|
[
Resource
](
../../ui/ts-types.md#resource类型
)
| 1 | 否 | 设置
边框
透明度。 |
| strokeWidth | Length | 1 | 否 | 设置
线条
宽度。 |
| strokeWidth | Length | 1 | 否 | 设置
边框
宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
...
...
zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-shape.md
浏览文件 @
0b79ec67
...
@@ -40,14 +40,14 @@ Shape(value?: PixelMap)
...
@@ -40,14 +40,14 @@ Shape(value?: PixelMap)
| viewPort | {
<br/>
x?:
number
\|
string,
<br/>
y?:
number
\|
string,
<br/>
width?:
number
\|
string,
<br/>
height?:
number
\|
string
<br/>
} | { x:0, y:0, width:0, height:0 } | 否 | 形状的视口。 |
| viewPort | {
<br/>
x?:
number
\|
string,
<br/>
y?:
number
\|
string,
<br/>
width?:
number
\|
string,
<br/>
height?:
number
\|
string
<br/>
} | { x:0, y:0, width:0, height:0 } | 否 | 形状的视口。 |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fill |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| Color.Black | 否 | 设置填充区域颜色。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
ts-types.md#resource
)
| 1 | 否 | 设置填充区域透明度。 |
| fillOpacity | number
\|
string
\|
[
Resource
](
ts-types.md#resource
)
| 1 | 否 | 设置填充区域透明度。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
Color.Black | 否 | 设置线条颜色
。 |
| stroke |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
|
- | 否 | 设置边框颜色,不设置时,默认没有边框线条
。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置
线条
间隙。 |
| strokeDashArray | Array
<
Length
>
| [] | 否 | 设置
边框
间隙。 |
| strokeDashOffset | number
\|
string | 0 | 否 |
线条
绘制起点的偏移量。 |
| strokeDashOffset | number
\|
string | 0 | 否 |
边框
绘制起点的偏移量。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置
线条
端点绘制样式。 |
| strokeLineCap |
[
LineCapStyle
](
ts-appendix-enums.md#linecapstyle
)
| LineCapStyle.Butt | 否 | 设置
边框
端点绘制样式。 |
| strokeLineJoin |
[
LineJoinStyle
](
ts-appendix-enums.md#linejoinstyle
)
| LineJoinStyle.Miter | 否 | 设置
线条
拐角绘制样式。 |
| strokeLineJoin |
[
LineJoinStyle
](
ts-appendix-enums.md#linejoinstyle
)
| LineJoinStyle.Miter | 否 | 设置
边框
拐角绘制样式。 |
| strokeMiterLimit | number
\|
string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeMiterLimit | number
\|
string | 4 | 否 | 设置锐角绘制成斜角的极限值。 |
| strokeOpacity | number
\|
string
\|
[
Resource
](
ts-types.md#resource
)
| 1 | 否 | 设置
线条
透明度。 |
| strokeOpacity | number
\|
string
\|
[
Resource
](
ts-types.md#resource
)
| 1 | 否 | 设置
边框
透明度。 |
| strokeWidth | number
\|
string | 1 | 否 | 设置
线条
宽度。 |
| strokeWidth | number
\|
string | 1 | 否 | 设置
边框
宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿效果。 |
| mesh
<sup>
8+
</sup>
| Array
<
number
>
,number,number | [],0,0 | 否 | 设置mesh效果。第一个参数为长度(column + 1)
* (row + 1)*
2的数组,它记录了扭曲后的位图各个顶点位置,第二个参数为mesh矩阵列数column,第三个参数为mesh矩阵行数row。 |
| mesh
<sup>
8+
</sup>
| Array
<
number
>
,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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录