Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9616a472
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9616a472
编写于
3月 25, 2023
作者:
T
tianwenzhe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
arkui
Signed-off-by:
N
tian-wenzhe411
<
tianwenzhe2@huawei.com
>
上级
9d562201
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
35 addition
and
8 deletion
+35
-8
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasGlobalAlpha.ets
..._validator/src/main/ets/pages/ArkUI/CanvasGlobalAlpha.ets
+8
-1
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineDashOffset.ets
...lidator/src/main/ets/pages/ArkUI/CanvasLineDashOffset.ets
+6
-2
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineWidth.ets
...ts_validator/src/main/ets/pages/ArkUI/CanvasLineWidth.ets
+4
-2
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowBlur.ets
...s_validator/src/main/ets/pages/ArkUI/CanvasShadowBlur.ets
+5
-1
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowOffsetX.ets
...alidator/src/main/ets/pages/ArkUI/CanvasShadowOffsetX.ets
+6
-1
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowOffsetY.ets
...alidator/src/main/ets/pages/ArkUI/CanvasShadowOffsetY.ets
+6
-1
未找到文件。
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasGlobalAlpha.ets
浏览文件 @
9616a472
...
...
@@ -43,6 +43,12 @@ struct SetCircle {
})
.onActionUpdate((event: GestureEvent) => {
this.X = event.offsetX;
this.context.globalAlpha = (this.X)*0.005;
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 50, 50);
this.context.globalAlpha = (this.X)*0.005;
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(200, 200, 50, 50);
})
.onActionEnd(() => {
console.info('Pan end');
...
...
@@ -59,9 +65,10 @@ struct SetCircle {
.height('100%')
.backgroundColor('#ffffffff')
.onReady(() =>{
this.context.globalAlpha = 0.05;
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 50, 50);
this.context.globalAlpha =
(this.X)*0.0
05;
this.context.globalAlpha =
0.
05;
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(200, 200, 50, 50);
})
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineDashOffset.ets
浏览文件 @
9616a472
...
...
@@ -42,6 +42,10 @@ struct SetCircle {
})
.onActionUpdate((event: GestureEvent) => {
this.X = event.offsetX;
this.context.arc(180, 150, 50, 0, 6.28);
this.context.setLineDash([20,30]);
this.context.lineDashOffset = (this.X)*0.02;
this.context.stroke();
})
.onActionEnd(() => {
console.info('Pan end');
...
...
@@ -49,7 +53,7 @@ struct SetCircle {
)
}.width('70%').height('25%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('虚线偏移量: ' + (this.X)*0.
1
)
Text('虚线偏移量: ' + (this.X)*0.
02
)
}.width('100%').height('20%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Canvas(this.context)
...
...
@@ -59,7 +63,7 @@ struct SetCircle {
.onReady(() =>{
this.context.arc(180, 150, 50, 0, 6.28);
this.context.setLineDash([20,30]);
this.context.lineDashOffset =
(this.X)*
0.1;
this.context.lineDashOffset = 0.1;
this.context.stroke();
})
}.width('100%').height('55%')
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineWidth.ets
浏览文件 @
9616a472
...
...
@@ -42,6 +42,8 @@ struct SetCircle {
})
.onActionUpdate((event: GestureEvent) => {
this.X = event.offsetX;
this.context.lineWidth = (this.X)*0.1;
this.context.strokeRect(120, 120, 120, 120);
})
.onActionEnd(() => {
console.info('Pan end');
...
...
@@ -50,7 +52,7 @@ struct SetCircle {
}.width('70%').height('30%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('边框粗细: ' + (this.X)*0.
05
)
Text('边框粗细: ' + (this.X)*0.
1
)
}.width('100%').height('20%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Canvas(this.context)
...
...
@@ -58,7 +60,7 @@ struct SetCircle {
.height('100%')
.backgroundColor('#ffffffff')
.onReady(() =>{
this.context.lineWidth =
(this.X)*0.05
;
this.context.lineWidth =
1
;
this.context.strokeRect(120, 120, 120, 120);
})
}.width('100%').height('50%')
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowBlur.ets
浏览文件 @
9616a472
...
...
@@ -44,6 +44,10 @@ struct SetCircle {
})
.onActionUpdate((event: GestureEvent) => {
this.X = event.offsetX;
this.context.shadowBlur = this.X;
this.context.shadowColor = 'rgb(0,0,0)';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
})
.onActionEnd(() => {
console.info('Pan end');
...
...
@@ -59,7 +63,7 @@ struct SetCircle {
.height('100%')
.backgroundColor('#ffffffff')
.onReady(() =>{
this.context.shadowBlur =
this.X
;
this.context.shadowBlur =
0
;
this.context.shadowColor = 'rgb(0,0,0)';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowOffsetX.ets
浏览文件 @
9616a472
...
...
@@ -45,6 +45,11 @@ struct SetCircle {
})
.onActionUpdate((event: GestureEvent) => {
this.X = event.offsetX;
this.context.shadowBlur = 10;
this.context.shadowOffsetX = (this.X)*0.05;
this.context.shadowColor = 'rgb(0,0,0)';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
})
.onActionEnd(() => {
console.info('Pan end');
...
...
@@ -62,7 +67,7 @@ struct SetCircle {
.backgroundColor('#ffffffff')
.onReady(() =>{
this.context.shadowBlur = 10;
this.context.shadowOffsetX =
(this.X)*0.05
;
this.context.shadowOffsetX =
0
;
this.context.shadowColor = 'rgb(0,0,0)';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowOffsetY.ets
浏览文件 @
9616a472
...
...
@@ -45,6 +45,11 @@ struct SetCircle {
})
.onActionUpdate((event: GestureEvent) => {
this.X = event.offsetX;
this.context.shadowBlur = 10;
this.context.shadowOffsetY = (this.X)*0.05;
this.context.shadowColor = 'rgb(0,0,0)';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
})
.onActionEnd(() => {
console.info('Pan end');
...
...
@@ -61,7 +66,7 @@ struct SetCircle {
.backgroundColor('#ffffffff')
.onReady(() =>{
this.context.shadowBlur = 10;
this.context.shadowOffsetY =
(this.X)*0.05
;
this.context.shadowOffsetY =
0
;
this.context.shadowColor = 'rgb(0,0,0)';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录