次の方法で共有


MotionEvent.GetOrientation(Int32) Method

Definition

Returns the orientation of the touch area and tool area in radians clockwise from vertical for the given pointer <em>index</em> (use #getPointerId(int) to find the pointer identifier for this index).

[Android.Runtime.Register("getOrientation", "(I)F", "")]
public float GetOrientation (int pointerIndex);
[<Android.Runtime.Register("getOrientation", "(I)F", "")>]
member this.GetOrientation : int -> single

Parameters

pointerIndex
Int32

Raw index of pointer to retrieve. Value may be from 0 (the first pointer that is down) to #getPointerCount()-1.

Returns

Attributes

Remarks

Returns the orientation of the touch area and tool area in radians clockwise from vertical for the given pointer <em>index</em> (use #getPointerId(int) to find the pointer identifier for this index). An angle of 0 radians indicates that the major axis of contact is oriented upwards, is perfectly circular or is of unknown orientation. A positive angle indicates that the major axis of contact is oriented to the right. A negative angle indicates that the major axis of contact is oriented to the left. The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians (finger pointing fully right).

Java documentation for android.view.MotionEvent.getOrientation(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to