OH_ArkUI_PointerEvent_GetTiltX

Function OH_ArkUI_PointerEvent_GetTiltX 

Source
pub unsafe extern "C" fn OH_ArkUI_PointerEvent_GetTiltX(
    event: *const ArkUI_UIInputEvent,
    pointerIndex: u32,
) -> f32
Available on crate feature api-12 only.
Expand description

Obtains the tilt angle relative to the YZ plane from a pointer event. The value range is [-90, 90], where positive values indicate a rightward tilt. This API is applicable only to stylus-based touch events from devices that support tilt angle reporting.

§Arguments

  • event - Pointer to the current UI input event.

  • pointerIndex - Index of the target contact point in the contact point list.

§Returns

  • Returns the angle relative to the YZ plane.

Available since API-level: 12