Index: ui/events/gesture_detection/motion_event.h |
diff --git a/ui/events/gesture_detection/motion_event.h b/ui/events/gesture_detection/motion_event.h |
index 560afcbd044c20155ed281e7762f33ddbba77bb7..770a2290d0c3bd9ddaea295584e8338f62a567bb 100644 |
--- a/ui/events/gesture_detection/motion_event.h |
+++ b/ui/events/gesture_detection/motion_event.h |
@@ -60,6 +60,8 @@ class GESTURE_DETECTION_EXPORT MotionEvent { |
virtual float GetTouchMajor(size_t pointer_index) const = 0; |
virtual float GetTouchMinor(size_t pointer_index) const = 0; |
virtual float GetOrientation(size_t pointer_index) const = 0; |
+ virtual float GetTilt(size_t pointer_index) const = 0; |
+ virtual float GetTiltDirection(size_t pointer_index) const = 0; |
virtual float GetPressure(size_t pointer_index) const = 0; |
virtual ToolType GetToolType(size_t pointer_index) const = 0; |
virtual int GetButtonState() const = 0; |
@@ -94,6 +96,14 @@ class GESTURE_DETECTION_EXPORT MotionEvent { |
// radians. The return value lies in [-PI/2, PI/2]. |
float GetOrientation() const { return GetOrientation(0); } |
+ // Gets the tilt angle of the stylus away from the perpendicular to the |
+ // screen. The return value lies in [0, PI/2). Default is NaN. |
+ float GetTilt() const { return GetTilt(0); } |
+ |
+ // Gets the clockwise angle from the X axis to the XY-projection of the |
+ // stylus. The range is from -PI radians to PI radians. Default is NaN. |
+ float GetTiltDirection() const { return GetTiltDirection(0); } |
+ |
float GetPressure() const { return GetPressure(0); } |
ToolType GetToolType() const { return GetToolType(0); } |