手勢觸摸點

2024-01-23 17:15 更新

GesturePoint表示手勢觸摸點。

本模塊用于創(chuàng)建輔助功能注入手勢所需的手勢路徑的觸摸點信息。

說明

本模塊首批接口從API version 9開始支持,后續(xù)版本的新增接口,采用上角標單獨標記接口的起始版本。

導入模塊

  1. import GesturePoint from '@ohos.accessibility.GesturePoint';

GesturePoint

表示手勢觸摸點。

系統(tǒng)能力:以下各項對應的系統(tǒng)能力均為 SystemCapability.BarrierFree.Accessibility.Core

屬性

名稱類型可讀可寫說明
positionXnumber觸摸點X坐標。
positionYnumber觸摸點Y坐標。

constructor

constructor(positionX: number, positionY: number);

構造函數(shù)。

系統(tǒng)能力:SystemCapability.BarrierFree.Accessibility.Core

參數(shù):

參數(shù)名類型必填說明
positionXnumber觸摸點X坐標。
positionYnumber觸摸點Y坐標。

示例:

  1. let gesturePoint = new GesturePoint.GesturePoint(1, 2);
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號