Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: ui/events/gesture_detection/motion_event.h

Issue 1152463004: Fix motion event orientation handling for styluses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/blink/blink_event_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a6028fbdee52c3feb6394960f08ae0b563119270..12834a793f2db1e51e2af8a621fb98c139bdb32c 100644
--- a/ui/events/gesture_detection/motion_event.h
+++ b/ui/events/gesture_detection/motion_event.h
@@ -92,8 +92,11 @@ class GESTURE_DETECTION_EXPORT MotionEvent {
float GetTouchMajor() const { return GetTouchMajor(0); }
float GetTouchMinor() const { return GetTouchMinor(0); }
- // Returns the orientation of the major axis clockwise from vertical, in
- // radians. The return value lies in [-PI/2, PI/2].
+ // Returns the orientation in radians. The meaning is overloaded:
+ // * For a touch screen or pad, it's the orientation of the major axis
+ // clockwise from vertical. The return value lies in [-PI/2, PI/2].
+ // * For a stylus, it indicates the direction in which the stylus is pointing.
+ // The return value lies in [-PI, PI].
float GetOrientation() const { return GetOrientation(0); }
float GetPressure() const { return GetPressure(0); }
« no previous file with comments | « ui/events/blink/blink_event_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698