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

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

Issue 494833003: Completed webkit radiusX, radiusY and rotationAngle handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
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 c2e0562a591af58f8832b5210f0171b9b3f16dbf..bb981ef45abe6edac638746f652476e10ffe0b9b 100644
--- a/ui/events/gesture_detection/motion_event.h
+++ b/ui/events/gesture_detection/motion_event.h
@@ -58,6 +58,8 @@ class GESTURE_DETECTION_EXPORT MotionEvent {
virtual float GetRawX(size_t pointer_index) const = 0;
virtual float GetRawY(size_t pointer_index) const = 0;
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 GetPressure(size_t pointer_index) const = 0;
virtual ToolType GetToolType(size_t pointer_index) const = 0;
virtual int GetButtonState() const = 0;
@@ -68,6 +70,10 @@ class GESTURE_DETECTION_EXPORT MotionEvent {
virtual base::TimeTicks GetHistoricalEventTime(size_t historical_index) const;
virtual float GetHistoricalTouchMajor(size_t pointer_index,
size_t historical_index) const;
+ virtual float GetHistoricalTouchMinor(size_t pointer_index,
+ size_t historical_index) const;
+ virtual float GetHistoricalOrientation(size_t pointer_index,
+ size_t historical_index) const;
virtual float GetHistoricalX(size_t pointer_index,
size_t historical_index) const;
virtual float GetHistoricalY(size_t pointer_index,
@@ -76,14 +82,20 @@ class GESTURE_DETECTION_EXPORT MotionEvent {
virtual scoped_ptr<MotionEvent> Clone() const = 0;
virtual scoped_ptr<MotionEvent> Cancel() const = 0;
- // Utility accessor methods for convenience.
float GetX() const { return GetX(0); }
float GetY() const { return GetY(0); }
float GetRawX() const { return GetRawX(0); }
float GetRawY() const { return GetRawY(0); }
float GetRawOffsetX() const { return GetRawX() - GetX(); }
float GetRawOffsetY() const { return GetRawY() - GetY(); }
+
float GetTouchMajor() const { return GetTouchMajor(0); }
+ float GetTouchMinor() const { return GetTouchMinor(0); }
+
+ // Returns the orientation of the major axis closkwise from vertical, in
jdduke (slow) 2014/08/28 15:31:57 clockwise
mustaq 2014/08/28 21:56:02 Done.
+ // radians. The return value lies in [-PI/2, PI/2].
+ float GetOrientation() const { return GetOrientation(0); }
+
float GetPressure() const { return GetPressure(0); }
ToolType GetToolType() const { return GetToolType(0); }

Powered by Google App Engine
This is Rietveld 408576698