2023-06-08 06:25:43 +00:00
|
|
|
/*
|
2024-04-09 01:51:18 +00:00
|
|
|
* Copyright (c) 2023-2024 Huawei Device Co., Ltd.
|
2023-06-08 06:25:43 +00:00
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2023-12-11 09:08:03 +00:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @kit ArkUI
|
|
|
|
*/
|
|
|
|
|
2023-06-08 06:25:43 +00:00
|
|
|
/**
|
|
|
|
* This module provides functionality for component coordinates and sizes.
|
|
|
|
* @namespace componentUtils
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* This module provides functionality for component coordinates and sizes.
|
|
|
|
* @namespace componentUtils
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-05-14 12:43:57 +00:00
|
|
|
/**
|
|
|
|
* This module provides functionality for component coordinates and sizes.
|
|
|
|
* @namespace componentUtils
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
declare namespace componentUtils {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Component information.
|
|
|
|
* @typedef ComponentInfo
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Component information.
|
|
|
|
* @typedef ComponentInfo
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-05-14 12:43:57 +00:00
|
|
|
/**
|
|
|
|
* Component information.
|
|
|
|
* @typedef ComponentInfo
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
interface ComponentInfo {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* component size.
|
|
|
|
* @type {Size}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* component size.
|
|
|
|
* @type {Size}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* component size.
|
|
|
|
* @type {Size}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
size: Size
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Obtain attribute information relative to the local.
|
|
|
|
* @type {Offset}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information relative to the local.
|
|
|
|
* @type {Offset}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information relative to the local.
|
|
|
|
* @type {Offset}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
localOffset: Offset
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Obtain attribute information relative to the window.
|
|
|
|
* @type {Offset}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information relative to the window.
|
|
|
|
* @type {Offset}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information relative to the window.
|
|
|
|
* @type {Offset}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
windowOffset: Offset
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Obtain attribute information relative to the screen.
|
|
|
|
* @type {Offset}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information relative to the screen.
|
|
|
|
* @type {Offset}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information relative to the screen.
|
|
|
|
* @type {Offset}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
screenOffset: Offset
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Obtain attribute information for translation.
|
|
|
|
* @type {TranslateResult}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information for translation.
|
|
|
|
* @type {TranslateResult}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information for translation.
|
|
|
|
* @type {TranslateResult}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
translate: TranslateResult
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Obtain attribute information for scale.
|
|
|
|
* @type {ScaleResult}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information for scale.
|
|
|
|
* @type {ScaleResult}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information for scale.
|
|
|
|
* @type {ScaleResult}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
scale: ScaleResult
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Obtain attribute information for rotate.
|
|
|
|
* @type {RotateResult}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information for rotate.
|
|
|
|
* @type {RotateResult}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information for rotate.
|
|
|
|
* @type {RotateResult}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
rotate: RotateResult
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Obtain attribute information of the transformation matrix.
|
|
|
|
* @type {Matrix4Result}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information of the transformation matrix.
|
|
|
|
* @type {Matrix4Result}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Obtain attribute information of the transformation matrix.
|
|
|
|
* @type {Matrix4Result}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
transform: Matrix4Result
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines the size property.
|
|
|
|
* @typedef Size
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Defines the size property.
|
|
|
|
* @typedef Size
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-05-14 12:43:57 +00:00
|
|
|
/**
|
|
|
|
* Defines the size property.
|
|
|
|
* @typedef Size
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
interface Size {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines the width property.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Defines the width property.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Defines the width property.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
width: number
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines the height property.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Defines the height property.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Defines the height property.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
height: number
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines the offset property.
|
|
|
|
* @typedef Offset
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Defines the offset property.
|
|
|
|
* @typedef Offset
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Defines the offset property.
|
|
|
|
* @typedef Offset
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
interface Offset {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Coordinate x of the Position.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Coordinate x of the Position.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Coordinate x of the Position.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
x: number
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Coordinate y of the Position.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Coordinate y of the Position.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Coordinate y of the Position.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
y: number
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Translation Result
|
|
|
|
* @typedef TranslateResult
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Translation Result
|
|
|
|
* @typedef TranslateResult
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-05-14 12:43:57 +00:00
|
|
|
/**
|
|
|
|
* Translation Result
|
|
|
|
* @typedef TranslateResult
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
interface TranslateResult {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates the translation distance of the x-axis, in vp.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Indicates the translation distance of the x-axis, in vp.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Indicates the translation distance of the x-axis, in vp.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
x: number
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates the translation distance of the y-axis, in vp.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Indicates the translation distance of the y-axis, in vp.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Indicates the translation distance of the y-axis, in vp.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
y: number
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates the translation distance of the z-axis, in vp.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Indicates the translation distance of the z-axis, in vp.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Indicates the translation distance of the z-axis, in vp.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
z: number
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Scale Result
|
|
|
|
* @typedef ScaleResult
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Scale Result
|
|
|
|
* @typedef ScaleResult
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-05-14 12:43:57 +00:00
|
|
|
/**
|
|
|
|
* Scale Result
|
|
|
|
* @typedef ScaleResult
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
interface ScaleResult {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Zoom factor of the x-axis.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Zoom factor of the x-axis.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Zoom factor of the x-axis.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
x: number
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Zoom factor of the y-axis.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Zoom factor of the y-axis.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Zoom factor of the y-axis.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
y: number
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Zoom factor of the z-axis.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Zoom factor of the z-axis.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Zoom factor of the z-axis.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
z: number
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Transform the x-axis coordinate of the center point.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Transform the x-axis coordinate of the center point.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Transform the x-axis coordinate of the center point.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
centerX: number
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Transform the y-axis coordinate of the center point.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Transform the y-axis coordinate of the center point.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Transform the y-axis coordinate of the center point.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
centerY: number
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Rotation Result.
|
|
|
|
* @typedef RotateResult
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Rotation Result.
|
|
|
|
* @typedef RotateResult
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-05-14 12:43:57 +00:00
|
|
|
/**
|
|
|
|
* Rotation Result.
|
|
|
|
* @typedef RotateResult
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
interface RotateResult {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Axis of rotation vector x coordinate.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Axis of rotation vector x coordinate.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Axis of rotation vector x coordinate.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
x: number
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Axis of rotation vector y coordinate.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Axis of rotation vector y coordinate.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Axis of rotation vector y coordinate.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
y: number
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Axis of rotation vector z coordinate.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Axis of rotation vector z coordinate.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Axis of rotation vector z coordinate.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
z: number
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Transform the x-axis coordinate of the center point.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Transform the x-axis coordinate of the center point.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Transform the x-axis coordinate of the center point.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
centerX: number
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Transform the y-axis coordinate of the center point.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Transform the y-axis coordinate of the center point.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Transform the y-axis coordinate of the center point.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
centerY: number
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Rotation angle.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Rotation angle.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* Rotation angle.
|
|
|
|
* @type {number}
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
angle: number
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The matrix is column-first fourth-order matrix.
|
2024-07-19 07:24:41 +00:00
|
|
|
* @typedef { [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] } Matrix4Result
|
2023-06-08 06:25:43 +00:00
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* The matrix is column-first fourth-order matrix.
|
2024-07-19 07:24:41 +00:00
|
|
|
* @typedef { [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] } Matrix4Result
|
2023-11-13 07:27:29 +00:00
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-04-09 01:51:18 +00:00
|
|
|
/**
|
|
|
|
* The matrix is column-first fourth-order matrix.
|
2024-07-19 07:24:41 +00:00
|
|
|
* @typedef { [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] } Matrix4Result
|
2024-04-09 01:51:18 +00:00
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
type Matrix4Result = [
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
number,
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Provide the ability to obtain the coordinates and size of component drawing areas.
|
|
|
|
* @param {string} id - component id.
|
|
|
|
* @returns {ComponentInfo} the object of ComponentInfo.
|
2024-08-19 06:20:00 +00:00
|
|
|
* @throws { BusinessError } 100001 - UI execution context not found.
|
2023-06-08 06:25:43 +00:00
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-11-13 07:27:29 +00:00
|
|
|
/**
|
|
|
|
* Provide the ability to obtain the coordinates and size of component drawing areas.
|
|
|
|
* @param {string} id - component id.
|
|
|
|
* @returns {ComponentInfo} the object of ComponentInfo.
|
2024-08-19 06:20:00 +00:00
|
|
|
* @throws { BusinessError } 100001 - UI execution context not found.
|
2023-11-13 07:27:29 +00:00
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 11
|
|
|
|
*/
|
2023-06-08 06:25:43 +00:00
|
|
|
function getRectangleById(id: string): ComponentInfo;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default componentUtils;
|