!243 【UIcompare】新增rect组件UIcompare代码

Merge pull request !243 from 周旭/master
This commit is contained in:
openharmony_ci 2023-06-25 06:05:46 +00:00 committed by Gitee
commit 160f31eebe
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
75 changed files with 6067 additions and 0 deletions

View File

@ -0,0 +1,25 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"app": {
"bundleName": "com.example.recttest",
"vendor": "example",
"versionCode": 1000000,
"versionName": "1.0.0",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
}

View File

@ -0,0 +1,8 @@
{
"string": [
{
"name": "app_name",
"value": "RectTest"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1,55 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"app": {
"signingConfigs": [
{
"name": "default",
"material": {
"certpath": "C:\\Users\\xuzhouy\\.ohos\\config\\openharmony\\auto_ohos_default_RectTest_com.example.recttest.cer",
"storePassword": "0000001BE90438D1A4B104DD03B7B8F2331DDB382E7260E95D45691DC2D8193234346B42902D34A8C97180",
"keyAlias": "debugKey",
"keyPassword": "0000001BB52CA322265C9D28A9ACF80704DB8321330960A2AC7A39F6DF39490D9C4B64D37FD4BF5E7AC87B",
"profile": "C:\\Users\\xuzhouy\\.ohos\\config\\openharmony\\auto_ohos_default_RectTest_com.example.recttest.p7b",
"signAlg": "SHA256withECDSA",
"storeFile": "C:\\Users\\xuzhouy\\.ohos\\config\\openharmony\\auto_ohos_default_RectTest_com.example.recttest.p12"
}
}
],
"compileSdkVersion": 9,
"compatibleSdkVersion": 9,
"products": [
{
"name": "default",
"signingConfig": "default",
}
]
},
"modules": [
{
"name": "entry",
"srcPath": "./entry",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
}
]
}

View File

@ -0,0 +1,28 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"apiType": 'stageMode',
"buildOption": {
},
"targets": [
{
"name": "default",
},
{
"name": "ohosTest",
}
]
}

View File

@ -0,0 +1,2 @@
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
export { hapTasks } from '@ohos/hvigor-ohos-plugin';

View File

@ -0,0 +1,25 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"license": "",
"devDependencies": {},
"author": "",
"name": "entry",
"description": "Please describe the basic information.",
"main": "",
"version": "1.0.0",
"dependencies": {}
}

View File

@ -0,0 +1,41 @@
import UIAbility from '@ohos.app.ability.UIAbility';
import hilog from '@ohos.hilog';
import window from '@ohos.window';
export default class EntryAbility extends UIAbility {
onCreate(want, launchParam) {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
}
onDestroy() {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
}
onWindowStageCreate(windowStage: window.WindowStage) {
// Main window is created, set main page for this ability
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
windowStage.loadContent('pages/Index', (err, data) => {
if (err.code) {
hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
return;
}
hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? '');
});
}
onWindowStageDestroy() {
// Main window is destroyed, release UI related resources
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
}
onForeground() {
// Ability has brought to foreground
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
}
onBackground() {
// Ability has back to background
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
}
}

View File

@ -0,0 +1,32 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@Entry
@Component
struct Index {
@State message: string = 'Hello World'
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width('100%')
}
.height('100%')
}
}

View File

@ -0,0 +1,51 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"module": {
"name": "entry",
"type": "entry",
"description": "$string:module_desc",
"mainElement": "EntryAbility",
"deviceTypes": [
"default"
],
"deliveryWithInstall": true,
"installationFree": false,
"pages": "$profile:main_pages",
"abilities": [
{
"name": "EntryAbility",
"srcEntry": "./ets/entryability/EntryAbility.ts",
"description": "$string:EntryAbility_desc",
"icon": "$media:icon",
"label": "$string:EntryAbility_label",
"startWindowIcon": "$media:icon",
"startWindowBackground": "$color:start_window_background",
"exported": true,
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
]
}
]
}
}

View File

@ -0,0 +1,8 @@
{
"color": [
{
"name": "start_window_background",
"value": "#FFFFFF"
}
]
}

View File

@ -0,0 +1,16 @@
{
"string": [
{
"name": "module_desc",
"value": "module description"
},
{
"name": "EntryAbility_desc",
"value": "description"
},
{
"name": "EntryAbility_label",
"value": "label"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1,5 @@
{
"src": [
"pages/Index"
]
}

View File

@ -0,0 +1,16 @@
{
"string": [
{
"name": "module_desc",
"value": "module description"
},
{
"name": "EntryAbility_desc",
"value": "description"
},
{
"name": "EntryAbility_label",
"value": "label"
}
]
}

View File

@ -0,0 +1,16 @@
{
"string": [
{
"name": "module_desc",
"value": "模块描述"
},
{
"name": "EntryAbility_desc",
"value": "description"
},
{
"name": "EntryAbility_label",
"value": "label"
}
]
}

View File

@ -0,0 +1,50 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import hilog from '@ohos.hilog';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
export default function abilityTest() {
describe('ActsAbilityTest', function () {
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
beforeAll(function () {
// Presets an action, which is performed only once before all test cases of the test suite start.
// This API supports only one parameter: preset action function.
})
beforeEach(function () {
// Presets an action, which is performed before each unit test case starts.
// The number of execution times is the same as the number of test cases defined by **it**.
// This API supports only one parameter: preset action function.
})
afterEach(function () {
// Presets a clear action, which is performed after each unit test case ends.
// The number of execution times is the same as the number of test cases defined by **it**.
// This API supports only one parameter: clear action function.
})
afterAll(function () {
// Presets a clear action, which is performed after all test cases of the test suite end.
// This API supports only one parameter: clear action function.
})
it('assertContain',0, function () {
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
hilog.info(0x0000, 'testTag', '%{public}s', 'it begin');
let a = 'abc'
let b = 'b'
// Defines a variety of assertion methods, which are used to declare expected boolean conditions.
expect(a).assertContain(b)
expect(a).assertEqual(a)
})
})
}

View File

@ -0,0 +1,20 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import rectTest from './Rect.test'
export default function testsuite() {
rectTest()
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,64 @@
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
*/
export default class DateTimeUtil {
/**
*
*/
getTime() {
const DATETIME = new Date()
return this.concatTime(DATETIME.getHours(), DATETIME.getMinutes(),DATETIME.getSeconds())
}
/**
*
*/
getDate() {
const DATETIME = new Date()
return this.concatDate(DATETIME.getFullYear(),DATETIME.getMonth() + 1, DATETIME.getDate())
}
/**
* 0
* @param value-
*/
fill(value) {
return (value > 9 ? '' : '0') + value
}
/**
*
* @param year
* @param month
* @param date
*/
concatDate(year:number,month:number, date:number) {
return `${year}${this.fill(month)}${this.fill(date)}`
}
/**
*
* @param hours
* @param minutes
* @param seconds
*/
concatTime(hours:number, minutes:number,seconds:number) {
return `${this.fill(hours)}${this.fill(minutes)}${this.fill(seconds)}`
}
}

View File

@ -0,0 +1,44 @@
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import hilog from '@ohos.hilog';
class Logger {
private domain: number;
private prefix: string;
private format: string = "%{public}s, %{public}s";
constructor(prefix: string) {
this.prefix = prefix;
this.domain = 0xFF00;
}
debug(...args: any[]) {
hilog.debug(this.domain, this.prefix, this.format, args);
}
info(...args: any[]) {
hilog.info(this.domain, this.prefix, this.format, args);
}
warn(...args: any[]) {
hilog.warn(this.domain, this.prefix, this.format, args);
}
error(...args: any[]) {
hilog.error(this.domain, this.prefix, this.format, args);
}
}
export default new Logger('[Screenshot]');

View File

@ -0,0 +1,54 @@
/**
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface Callback {
(message:any):void
}
export class MessageManager {
callback:Callback
callbacks:Map<string,Callback> = new Map()
constructor() {
}
registerCallback(callback:Callback , type?:string) {
if (type == undefined) {
console.error('registerCallback callback set')
this.callback = callback
return
}
this.callbacks.set(type,callback)
}
notify(message:any, type?:string) {
if (type == undefined) {
this.callback(message)
return
}
let tmpCallback:Callback = this.callbacks.get(type)
if (tmpCallback === undefined) {
console.error('callbacks has no callback for type ' + type)
return
}
tmpCallback(message)
}
clear() {
this.callbacks.clear()
this.callback = null
}
}

View File

@ -0,0 +1,125 @@
// @ts-nocheck
import screen from '@ohos.screen';
import window from '@ohos.window';
import Logger from './Logger';
const TAG: string = '[Settings]';
class Settings {
sleep(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
windowClass: window.Window = null
changeWindowPosition(windowClass, X, Y) {
//为悬浮窗设置位置
windowClass.moveWindowTo(X, Y, (err) => {
if (err.code) {
Logger.error(TAG, `Failed to move the window. Cause : ${JSON.stringify(err)}`)
return;
}
})
}
changeWindowSize(windowClass, width, height) {
//为悬浮窗设置大小
windowClass.resize(width, height, (err) => {
if (err.code) {
Logger.error(TAG, `Failed to change the window size. Cause : ${JSON.stringify(err)}`)
return;
}
})
}
loadContent(windowClass, pageURI) {
//为悬浮窗加载对应的目标页面
windowClass.setUIContent(pageURI, (err) => {
if (err.code) {
Logger.error(TAG, `Failed to load the content. Cause : ${JSON.stringify(err)}`)
return;
}
Logger.info(TAG, `Succeeded in loading the content.`);
//显示悬浮窗
windowClass.showWindow((err) => {
if (err.code) {
Logger.error(TAG, `Failed to show the window. Cause : ${JSON.stringify(err)}`)
return;
}
Logger.info(TAG, `Succeeded in showing the window.`);
})
})
}
changeDpi(dpi) {
let screenClass = null;
screen.getAllScreens((err, data) => {
if (err.code) {
Logger.error(TAG, `Failed to get all screens. Cause : ${JSON.stringify(err)}`);
return;
}
Logger.info(TAG, `Succeeded in getting all screens. Data:${JSON.stringify(data)}`);
screenClass = data[0];
//设置设备dpi
screenClass.setDensityDpi(dpi, (err, data) => {
if (err.code) {
Logger.error(TAG, `Failed to set the pixel density. Code : ${JSON.stringify(err)}`)
return;
}
Logger.info(TAG, `Succeeded in setting the pixel density`);
})
})
}
destroyWindow(windowClass) {
//销毁窗口
windowClass.destroyWindow((err) => {
if (err.code) {
Logger.error(TAG, `Failed to destroy the window. Cause : ${JSON.stringify(err)}`)
return;
}
Logger.info(TAG, `Succeeded in destroy the window.`);
})
}
/*
*
* Setting.createWindow(pageURI: String, {X,Y,width,height,dpi}?:{X?:number,Y?:number,width?:number,height?:number,dpi?:number}):void
*
* pageURI
*
* X,YX=100,Y=100 px
* width,height:窗口宽高width=600,height=1250 [0,2560],vp
* dpi:像素密度dpi=33080-640
* */
createWindow(pageURI: String, {X=100,Y=100,width=600,height=1250,dpi=400}={}) {
Logger.info(TAG, `params,pageURI=${pageURI},X=${X},Y=${Y},width=${width},height=${height},dpi=${dpi}`)
this.changeDpi(dpi)
this.sleep(1000)
let windowClass = null
let config = {
name: "floatWindow",
windowType: window.WindowType.TYPE_FLOAT,
ctx: globalThis.context
};
window.createWindow(config, (err, data) => {
if (err.code) {
Logger.error(TAG, `Failed to create the floatWindow. Cause : ${JSON.stringify(err)}`)
return;
}
Logger.info(TAG, `Succeeded in creating the floatWindow. Data : ${JSON.stringify(err)}`);
windowClass = data;
this.windowClass = data;
this.changeWindowPosition(windowClass, X, Y);
this.changeWindowSize(windowClass, width, height);
this.loadContent(windowClass, pageURI)
})
}
}
export default new Settings()

View File

@ -0,0 +1,118 @@
// @ts-nocheck
/**
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default class Utils {
static rect_left;
static rect_top;
static rect_right;
static rect_bottom;
static rect_value;
static sleep(time) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve()
}, time)
}).then(() => {
console.info(`sleep ${time} over...`)
})
}
static getComponentRect(key) {
let strJson = getInspectorByKey(key);
let obj = JSON.parse(strJson);
console.info("[getInspectorByKey] current component obj is: " + JSON.stringify(obj));
let rectInfo = JSON.parse('[' + obj.$rect + ']')
console.info("[getInspectorByKey] rectInfo is: " + rectInfo);
this.rect_left = JSON.parse('[' + rectInfo[0] + ']')[0]
this.rect_top = JSON.parse('[' + rectInfo[0] + ']')[1]
this.rect_right = JSON.parse('[' + rectInfo[1] + ']')[0]
this.rect_bottom = JSON.parse('[' + rectInfo[1] + ']')[1]
return this.rect_value = {
"left": this.rect_left, "top": this.rect_top, "right": this.rect_right, "bottom": this.rect_bottom
}
}
static async swipe(downX, downY, upX, upY, steps) {
console.info('start to swipe')
this.drags(downX, downY, upX, upY, steps, false)
}
static async drag(downX, downY, upX, upY, steps) {
console.info('start to drag')
this.drags(downX, downY, upX, upY, steps, true)
}
static async drags(downX, downY, upX, upY, steps, drag) {
var xStep;
var yStep;
var swipeSteps;
var ret;
xStep = 0;
yStep = 0;
ret = false;
swipeSteps = steps;
if (swipeSteps == 0) {
swipeSteps = 1;
}
xStep = (upX - downX) / swipeSteps;
yStep = (upY - downY) / swipeSteps;
console.info('move step is: ' + 'xStep: ' + xStep + ' yStep: ' + yStep)
var downPonit: TouchObject = {
id: 1,
x: downX,
y: downY,
type: TouchType.Down,
}
console.info('down touch started: ' + JSON.stringify(downPonit))
sendTouchEvent(downPonit);
console.info('start to move')
if (drag) {
await this.sleep(500)
}
for (var i = 1;i <= swipeSteps; i++) {
var movePoint: TouchObject = {
id: 1,
x: downX + (xStep * i),
y: downY + (yStep * i),
type: TouchType.Move
}
console.info('move touch started: ' + JSON.stringify(movePoint))
ret = sendTouchEvent(movePoint)
if (ret == false) {
break;
}
await this.sleep(5)
}
console.info('start to up')
if (drag) {
await this.sleep(100)
}
var upPoint: TouchObject = {
id: 1,
x: upX,
y: upY,
type: TouchType.Up,
}
console.info('up touch started: ' + JSON.stringify(upPoint))
sendTouchEvent(upPoint)
await this.sleep(500)
}
}

View File

@ -0,0 +1,119 @@
// @ts-nocheck
import window from '@ohos.window';
import Logger from './Logger';
import image from '@ohos.multimedia.image';
import mediaLibrary from '@ohos.multimedia.mediaLibrary';
import fs from '@ohos.file.fs';
import DateTimeUtil from './DateTimeUtil';
const TAG: string = '[windowSnap]';
const INFO = {
"img": {
prefix: 'IMG_',
suffix: '.webp',
directory: mediaLibrary.DirectoryType.DIR_IMAGE,
mediaType: mediaLibrary.MediaType.IMAGE
},
"txt": {
prefix: 'TXT_',
suffix: '.txt',
directory: mediaLibrary.DirectoryType.DIR_DOCUMENTS,
mediaType: mediaLibrary.MediaType.FILE
}
}
class windowSnap {
async createAndGetFile(context: any, type) {
Logger.info(TAG, `createAndGetFile start`)
let mediaTest = mediaLibrary.getMediaLibrary(context)
let info = INFO[type]
//文件名为时间戳格式
//let dateTimeUtil=new DateTimeUtil()
//let name=`${dateTimeUtil.getDate()}_${dateTimeUtil.getTime()}`
//文件名固定用于自动化UI对比
let name = "test"
let displayName = `${info.prefix}${name}${info.suffix}`
let option = {
selections: mediaLibrary.FileKey.DISPLAY_NAME + '=?',
selectionArgs: [displayName],
}
let fetchFileResult = await mediaTest.getFileAssets(option);
if (fetchFileResult.getCount()) {
let asset = await fetchFileResult.getFirstObject();
await mediaTest.deleteAsset(asset.uri)
}
let publicPath = await mediaTest.getPublicDirectory(info.directory)
Logger.info(TAG, `publicPath=${publicPath},displayName=${displayName}`)
return await mediaTest.createAsset(info.mediaType, displayName, publicPath)
}
async savePicture(data: image.PixelMap, context: any) {
let packOpts: image.PackingOption = {
format: "image/webp", quality: 100
}
let imagePackerApi = image.createImagePacker()
let arrayBuffer = await imagePackerApi.packing(data, packOpts)
let fileAsset = await this.createAndGetFile(context, "img")
let fd = await fileAsset.open('Rw')
imagePackerApi.release()
try {
await fs.write(fd, arrayBuffer)
} catch (err) {
Logger.error(TAG, `write failed ,code is ${err.code},message is ${err.message}`)
}
await fileAsset.close(fd)
Logger.info(TAG, `write picture done`)
}
async saveTXT(data, context) {
let fileAsset = await this.createAndGetFile(context, "txt")
let fd = await fileAsset.open('Rw')
try {
await fs.write(fd, data)
} catch (err) {
Logger.error(TAG, `write failed ,code is ${err.code},message is ${err.message}`)
}
await fileAsset.close(fd)
Logger.info(TAG, `write txt done`)
}
/*
* &
* ability的context
* snapShot
* savePicture/storage/media/100/local/files/Pictures/IMG_test.webp
* saveTXT/storage/media/100/local/files/Documents/TXT_test.txt
**/
async snapShot(context) {
//获取窗口
Logger.info(TAG, 'start snapshot')
let windowClass = null;
try {
windowClass = window.findWindow('floatWindow');
Logger.info(TAG, 'find window success')
} catch (exception) {
Logger.error(TAG, 'Failed to find the window. Cause:' + JSON.stringify(exception))
}
//截屏
windowClass.snapshot((err, data) => {
if (err.code) {
console.error(TAG, 'Failed to snapshot window. Cause:' + JSON.stringify(err));
return;
}
this.savePicture(data, context)
const readBuffer = new ArrayBuffer(data.getPixelBytesNumber())
data.readPixelsToBuffer(readBuffer, () => {
//保存成像素值
this.saveTXT(readBuffer, context)
})
data.release();
});
}
}
export default new windowSnap()

View File

@ -0,0 +1,88 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// @ts-nocheck
import bundleManager from '@ohos.bundle.bundleManager';
import abilityAccessCtrl from '@ohos.abilityAccessCtrl';
import UIAbility from '@ohos.app.ability.UIAbility';
import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
import hilog from '@ohos.hilog';
import { Hypium } from '@ohos/hypium';
import testsuite from '../test/List.test';
import window from '@ohos.window';
import Logger from '../test/model/Logger'
const TAG: string = '[createWindow]'
export default class TestAbility extends UIAbility {
sleep(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
onCreate(want, launchParam) {
hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate');
hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? '');
hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? '');
var abilityDelegator: any
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var abilityDelegatorArguments: any
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!');
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
}
onDestroy() {
hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy');
}
onWindowStageCreate(windowStage: window.WindowStage) {
hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate');
globalThis.context = this.context
//系统授权,读写权限
let atManager = abilityAccessCtrl.createAtManager();
let appFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION;
let permissionFlags = 0;
bundleManager.getBundleInfoForSelf(appFlags, (err, data) => {
if (err) {
Logger.error(TAG, 'getAllApplicationInfo failed: %{public}s', err.message);
console.error("")
}
let tokenID = data.appInfo.accessTokenId; //系统应用可以通过bundleManager.getApplicationInfo获取普通应用可以通过bundleManager.getBundleInfoForSelf获取
atManager.grantUserGrantedPermission(tokenID, 'ohos.permission.READ_MEDIA', permissionFlags, (err, data) => {
if (err) {
Logger.info(TAG, `grantUserGrantedPermission fail, err->${JSON.stringify(err)}`)
}
})
atManager.grantUserGrantedPermission(tokenID, 'ohos.permission.WRITE_MEDIA', permissionFlags, (err, data) => {
if (err) {
Logger.info(TAG, `grantUserGrantedPermission fail, err->${JSON.stringify(err)}`)
}
})
})
}
onWindowStageDestroy() {
hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy');
}
onForeground() {
hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground');
}
onBackground() {
hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground');
}
}

View File

@ -0,0 +1,54 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State antiAliasValue: boolean = true
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'antiAlias') {
this.antiAliasValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制200 * 150矩形
Rect()
.width(200)
.height(150)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(8)
.antiAlias(this.antiAliasValue)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,54 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State antiAliasValue: boolean = true
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'antiAlias') {
this.antiAliasValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column({space:20}) {
// 绘制200 * 150矩形
Rect()
.width(200)
.height(150)
.fill(Color.Pink)
.backgroundColor(Color.Green)
.stroke(Color.Black)
.strokeWidth(3)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,55 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State message: string = 'Hello'
@State fillColor: Color = Color.Black
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'fill') {
this.fillColor = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 300矩形
Rect()
.width(300)
.height(300)
.fill(this.fillColor)
.stroke(Color.Black)
.strokeWidth(3)
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,55 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State fillOpacityValue: number = 1
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'fillOpacity') {
this.fillOpacityValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制'90%' * 50矩形
Rect()
.width('90%')
.height(50)
.fill(Color.Black)
.fillOpacity(this.fillOpacityValue)
.stroke(Color.Black)
.strokeWidth(3)
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,55 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State antiAliasValue: boolean = true
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'antiAlias') {
this.antiAliasValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column({space:20}) {
// 绘制200 * 150矩形
Rect()
.width(200)
.height(150)
.radius(30)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(3)
.borderRadius(0)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,48 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制200 * 150矩形
Rect()
.width(200)
.height(150)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(8)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,48 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 300矩形
Rect()
.width(300)
.height(300)
.stroke(Color.Black)
.strokeWidth(3)
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,50 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State message: string = 'Hello'
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 300矩形
Rect()
.width(300)
.height(300)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(3)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,52 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State message: string = 'Hello'
@State radiusHeightValue: number = 0
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 300矩形
Rect()
.width(300)
.height(300)
.radiusWidth(20)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(3)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,54 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State radiusWidthValue: number = 0
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'radiusWidth') {
this.radiusWidthValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 300矩形
Rect()
.width(300)
.height(300)
.radiusHeight(20)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(3)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,48 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制100 * 100矩形
Rect()
.width(100)
.height(100)
.fill(Color.Pink)
.strokeWidth(3)
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,49 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制100 * 100矩形
Rect()
.width(100)
.height(100)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(8)
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,53 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'strokeDashOffset') {
this.strokeDashOffsetValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 50矩形
Rect()
.width(300)
.height(50)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(4)
.strokeDashArray([20])
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,49 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制100 * 100矩形
Rect()
.width(100)
.height(100)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(8)
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,49 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 50矩形
Rect()
.width(300)
.height(50)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(8)
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,50 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 50矩形
Rect()
.width(300)
.height(50)
.fill(Color.Pink)
.stroke(0xEE8443)
.strokeWidth(10)
.strokeLineJoin(LineJoinStyle.Miter)
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,48 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 50矩形
Rect()
.width(300)
.height(50)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(4)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,47 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 50矩形
Rect()
.width(300)
.height(50)
.fill(Color.Pink)
.stroke(Color.Black)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,49 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
}
this.messageManager.registerCallback(callback)
}
build() {
Column({space:20}) {
// 绘制400 * 150矩形
Rect()
.width(400)
.height(150)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(3)
.position({x:200, y:100})
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,54 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State radiusValue: number = 0
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'radius') {
this.radiusValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 300矩形
Rect()
.width(300)
.height(300)
.stroke(Color.Black)
.strokeWidth(3)
.radius(this.radiusValue)
.fill(Color.Pink)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,54 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State radiusValue: number = 0
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'radius') {
this.radiusValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制100 * 100矩形
Rect()
.width(100)
.height(100)
.radius(this.radiusValue)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(3)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,54 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State radiusHeightValue: number = 0
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'radiusHeight') {
this.radiusHeightValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 300矩形
Rect()
.width(300)
.height(300)
.radiusHeight(this.radiusHeightValue)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(3)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,55 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State radiusHeightValue: number = 0
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'radiusHeight') {
this.radiusHeightValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 300矩形
Rect()
.width(300)
.height(300)
.radiusWidth(20)
.radiusHeight(this.radiusHeightValue)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(3)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,54 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State radiusWidthValue: number = 0
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'radiusWidth') {
this.radiusWidthValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 300矩形
Rect()
.width(300)
.height(300)
.radiusWidth(this.radiusWidthValue)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(3)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State radiusWidthValue: number = 0
@State radiusHeightValue: number = 0
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'radiusWidth') {
this.radiusWidthValue = message.value
}
if (message.name == 'radiusHeight') {
this.radiusHeightValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制100 * 100矩形
Rect()
.width(100)
.height(100)
.radiusWidth(this.radiusWidthValue)
.radiusHeight(this.radiusHeightValue)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(3)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,55 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State radiusWidthValue: number = 0
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'radiusWidth') {
this.radiusWidthValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 300矩形
Rect()
.width(300)
.height(300)
.radiusHeight(20)
.radiusWidth(this.radiusWidthValue)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(3)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,53 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State strokeColor: Color = Color.Black
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'stroke') {
this.strokeColor = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制100 * 100矩形
Rect()
.width(100)
.height(100)
.fill(Color.Pink)
.stroke(this.strokeColor)
.strokeWidth(3)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,55 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State strokeDashArrayValue: Array<any> = []
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'strokeDashArray') {
this.strokeDashArrayValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制100 * 100矩形
Rect()
.width(100)
.height(100)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(8)
.strokeDashArray(this.strokeDashArrayValue)
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,56 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State strokeDashOffsetValue: number = 0
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'strokeDashOffset') {
this.strokeDashOffsetValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 50矩形
Rect()
.width(300)
.height(50)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(4)
.strokeDashArray([20])
.strokeDashOffset(this.strokeDashOffsetValue)
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,55 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State strokeLineCapValue: LineCapStyle = LineCapStyle.Butt
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'strokeLineCap') {
this.strokeLineCapValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制100 * 100矩形
Rect()
.width(100)
.height(100)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(8)
.strokeLineCap(this.strokeLineCapValue)
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,55 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State strokeLineJoinValue: LineJoinStyle = LineJoinStyle.Miter
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'strokeLineJoin') {
this.strokeLineJoinValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 50矩形
Rect()
.width(300)
.height(50)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(8)
.strokeLineJoin(this.strokeLineJoinValue)
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,56 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State strokeMiterLimitValue: number = 4
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'strokeMiterLimit') {
this.strokeMiterLimitValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 50矩形
Rect()
.width(300)
.height(50)
.fill(Color.Pink)
.stroke(0xEE8443)
.strokeWidth(10)
.strokeLineJoin(LineJoinStyle.Miter)
.strokeMiterLimit(this.strokeMiterLimitValue)
.backgroundColor(Color.Yellow)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,54 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State strokeOpacityValue: number = 1
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'strokeOpacity') {
this.strokeOpacityValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 50矩形
Rect()
.width(300)
.height(50)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(4)
.strokeOpacity(this.strokeOpacityValue)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,53 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State strokeWidthValue: number = 1
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'strokeWidth') {
this.strokeWidthValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column() {
// 绘制300 * 50矩形
Rect()
.width(300)
.height(50)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(this.strokeWidthValue)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,71 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State antiAliasValue: boolean = true
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'antiAlias') {
this.antiAliasValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column({space:20}) {
// 绘制200 * 150矩形
Rect()
.width(200)
.height(150)
.fill(Color.Pink)
.stroke(Color.Black)
.strokeWidth(3)
// 绘制100 * 2000矩形
Rect()
.width(100)
.height(200)
.fill(Color.Yellow)
.stroke(Color.Green)
.strokeDashArray([20])
.strokeWidth(8)
// 绘制150 * 150矩形
Rect()
.width(150)
.height(150)
.radius(20)
.fill(Color.Green)
.stroke(Color.Blue)
.strokeWidth(6)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,58 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MessageManager, Callback } from '../../../test/model/MessageManager';
import { AxisValue } from '@ohos.multimodalInput.mouseEvent';
@Entry
@Component
struct Index {
@State widthValue: number = 150
@State heightValue: number = 150
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('NavDestination onPageShow')
globalThis.value = {
name: 'messageManager', message: this.messageManager
}
let callback: Callback = (message: any) => {
console.error('message = ' + message.name + "--" + message.value)
if (message.name == 'width') {
this.widthValue = message.value
}
if (message.name == 'height') {
this.heightValue = message.value
}
}
this.messageManager.registerCallback(callback)
}
build() {
Column({ space: 10 }) {
// 绘制150 * 150矩形
Rect()
.width(this.widthValue)
.height(this.heightValue)
.stroke(Color.Black)
.strokeWidth(3)
.backgroundColor(Color.Pink)
.fillOpacity(0)
}
.width('100%')
.margin({top:100})
}
}

View File

@ -0,0 +1,49 @@
import hilog from '@ohos.hilog';
import TestRunner from '@ohos.application.testRunner';
import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
var abilityDelegator = undefined
var abilityDelegatorArguments = undefined
async function onAbilityCreateCallback() {
hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback');
}
async function addAbilityMonitorCallback(err: any) {
hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? '');
}
export default class OpenHarmonyTestRunner implements TestRunner {
constructor() {
}
onPrepare() {
hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare ');
}
async onRun() {
hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run');
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility'
let lMonitor = {
abilityName: testAbilityName,
onAbilityCreate: onAbilityCreateCallback,
};
abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName
var debug = abilityDelegatorArguments.parameters['-D']
if (debug == 'true')
{
cmd += ' -D'
}
hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd);
abilityDelegator.executeShellCommand(cmd,
(err: any, d: any) => {
hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? '');
hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? '');
hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? '');
})
hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end');
}
}

View File

@ -0,0 +1,70 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"module": {
"name": "entry_test",
"type": "feature",
"description": "$string:module_test_desc",
"mainElement": "TestAbility",
"deviceTypes": [
"default",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
"pages": "$profile:test_pages",
"requestPermissions": [
{
"name": "ohos.permission.SYSTEM_FLOAT_WINDOW",
"usedScene": {
"abilities":[
"EntryAbility"
],
"when": "inuse"
}
},{
"name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS"
},{
"name": "ohos.permission.WRITE_MEDIA"
},
{
"name": "ohos.permission.READ_MEDIA"
}
],
"abilities": [
{
"name": "TestAbility",
"srcEntrance": "./ets/testability/TestAbility.ets",
"description": "$string:TestAbility_desc",
"icon": "$media:icon",
"label": "$string:TestAbility_label",
"visible": true,
"startWindowIcon": "$media:icon",
"startWindowBackground": "$color:start_window_background",
"skills": [
{
"actions": [
"action.system.home"
],
"entities": [
"entity.system.home"
]
}
]
}
]
}
}

View File

@ -0,0 +1,12 @@
{
"color": [
{
"name": "start_window_background",
"value": "#FFFFFF"
},
{
"name": "Yellow",
"value": "#ffff00"
}
]
}

View File

@ -0,0 +1,16 @@
{
"string": [
{
"name": "module_test_desc",
"value": "test ability description"
},
{
"name": "TestAbility_desc",
"value": "the test ability"
},
{
"name": "TestAbility_label",
"value": "test label"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1,40 @@
{
"src": [
"testability/pages/rect/widthAndHeight",
"testability/pages/rect/radius",
"testability/pages/rect/radiusCircle",
"testability/pages/rect/radiusWidth",
"testability/pages/rect/noRadius",
"testability/pages/rect/radiusWidthSpecial",
"testability/pages/rect/noRadiusWidth",
"testability/pages/rect/radiusHeight",
"testability/pages/rect/radiusHeightSpecial",
"testability/pages/rect/noRadiusHeight",
"testability/pages/rect/radiusWidthAndHeight",
"testability/pages/rect/fillColor",
"testability/pages/rect/noFillColor",
"testability/pages/rect/fillOpacity",
"testability/pages/rect/strokeColor",
"testability/pages/rect/noStrokeColor",
"testability/pages/rect/strokeDashArray",
"testability/pages/rect/noStrokeDashArray",
"testability/pages/rect/strokeDashOffset",
"testability/pages/rect/noStrokeDashOffset",
"testability/pages/rect/strokeLineCap",
"testability/pages/rect/noStrokeLineCap",
"testability/pages/rect/strokeLineJoin",
"testability/pages/rect/noStrokeLineJoin",
"testability/pages/rect/strokeMiterLimit",
"testability/pages/rect/noStrokeMiterLimit",
"testability/pages/rect/strokeOpacity",
"testability/pages/rect/noStrokeOpacity",
"testability/pages/rect/strokeWidth",
"testability/pages/rect/noStrokeWidth",
"testability/pages/rect/antiAlias",
"testability/pages/rect/noAntiAlias",
"testability/pages/rect/threeRect",
"testability/pages/rect/outsideTheScreen",
"testability/pages/rect/filletRadiusConflict",
"testability/pages/rect/colorConflict"
]
}

View File

@ -0,0 +1,21 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"hvigorVersion": "2.1.1",
"dependencies": {
"@ohos/hvigor-ohos-plugin": "2.1.1"
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
export { appTasks } from '@ohos/hvigor-ohos-plugin';

View File

@ -0,0 +1,63 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#!/bin/bash
# ----------------------------------------------------------------------------
# Hvigor startup script, version 1.0.0
#
# Required ENV vars:
# ------------------
# NODE_HOME - location of a Node home dir
# or
# Add /usr/local/nodejs/bin to the PATH environment variable
# ----------------------------------------------------------------------------
HVIGOR_APP_HOME=$(dirname $(readlink -f $0))
HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js
warn() {
echo ""
echo -e "\033[1;33m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
}
error() {
echo ""
echo -e "\033[1;31m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
}
fail() {
error "$@"
exit 1
}
# Determine node to start hvigor wrapper script
if [ -n "${NODE_HOME}" ];then
EXECUTABLE_NODE="${NODE_HOME}/bin/node"
if [ ! -x "$EXECUTABLE_NODE" ];then
fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed"
fi
else
EXECUTABLE_NODE="node"
which ${EXECUTABLE_NODE} > /dev/null 2>&1 || fail "ERROR: NODE_HOME is not set and not 'node' command found in your path"
fi
# Check hvigor wrapper script
if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ];then
fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}"
fi
# start hvigor-wrapper script
exec "${EXECUTABLE_NODE}" \
"${HVIGOR_WRAPPER_SCRIPT}" "$@"

View File

@ -0,0 +1,79 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Hvigor startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js
set NODE_EXE=node.exe
goto start
:start
@rem Find node.exe
if defined NODE_HOME goto findNodeFromNodeHome
%NODE_EXE% --version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
echo.
echo Please set the NODE_HOME variable in your environment to match the
echo location of your NodeJs installation.
goto fail
:findNodeFromNodeHome
set NODE_HOME=%NODE_HOME:"=%
set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE%
if exist "%NODE_EXE_PATH%" goto execute
echo.
echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
echo.
echo Please set the NODE_HOME variable in your environment to match the
echo location of your NodeJs installation.
goto fail
:execute
@rem Execute hvigor
"%NODE_EXE%" %WRAPPER_MODULE_PATH% %*
if "%ERRORLEVEL%" == "0" goto hvigorwEnd
:fail
exit /b 1
:hvigorwEnd
if "%OS%" == "Windows_NT" endlocal
:end

View File

@ -0,0 +1,29 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6",
"@ohos/hypium@^1.0.6": "@ohos/hypium@1.0.6"
},
"packages": {
"@ohos/hypium@1.0.6": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz",
"integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ=="
}
}
}

View File

@ -0,0 +1,27 @@
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"license": "",
"devDependencies": {
"@ohos/hypium": "1.0.6"
},
"author": "",
"name": "recttest",
"description": "Please describe the basic information.",
"main": "",
"version": "1.0.0",
"dependencies": {}
}