codecamp

手势触摸点

GesturePoint表示手势触摸点。

本模块用于创建辅助功能注入手势所需的手势路径的触摸点信息。

说明

本模块首批接口从API version 9开始支持,后续版本的新增接口,采用上角标单独标记接口的起始版本。

导入模块

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

GesturePoint

表示手势触摸点。

系统能力:以下各项对应的系统能力均为 SystemCapability.BarrierFree.Accessibility.Core

属性

名称类型可读可写说明
positionXnumber触摸点X坐标。
positionYnumber触摸点Y坐标。

constructor

constructor(positionX: number, positionY: number);

构造函数。

系统能力:SystemCapability.BarrierFree.Accessibility.Core

参数:

参数名类型必填说明
positionXnumber触摸点X坐标。
positionYnumber触摸点Y坐标。

示例:

  1. let gesturePoint = new GesturePoint.GesturePoint(1, 2);
手势路径
辅助功能扩展能力
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

媒体组件

像素

枚举

类型

接口

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }