GesturePoint表示手势触摸点,是构成手势路径GesturePath的基本单元。
本模块用于创建手势路径的触摸点信息,供辅助功能注入手势使用。
表示手势触摸点,是构成GesturePath路径节点的基本单元,用于定义辅助功能注入手势轨迹中的触摸位置。详细使用方式请参见GesturePath。
系统能力: SystemCapability.BarrierFree.Accessibility.Core
constructor(positionX: number, positionY: number)
根据传入的X坐标和Y坐标创建GesturePoint实例。
从API version 9开始支持,从API version 12开始废弃。
系统能力: SystemCapability.BarrierFree.Accessibility.Core
参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| positionX | number | 是 | 触摸点X坐标,单位为像素(px)。 |
| positionY | number | 是 | 触摸点Y坐标,单位为像素(px)。 |
示例:
import { GesturePoint } from '@kit.AccessibilityKit';
let gesturePoint = new GesturePoint(1, 2);