Chromium Code Reviews| Index: ppapi/cpp/touch_point.h |
| diff --git a/ppapi/cpp/touch_point.h b/ppapi/cpp/touch_point.h |
| index 66c512ba7d56c4e9841229d620eee2ee482d4327..0ca47553db23cdfc649754429befca2855c3b8bc 100644 |
| --- a/ppapi/cpp/touch_point.h |
| +++ b/ppapi/cpp/touch_point.h |
| @@ -18,7 +18,10 @@ class TouchPoint { |
| public: |
| TouchPoint() : touch_point_(PP_MakeTouchPoint()) {} |
| - TouchPoint(const PP_TouchPoint& point) : touch_point_(point) {} |
| + TouchPoint(const PP_TouchPoint& point) : touch_point_(point), tilt_{0, 0} {} |
| + |
| + TouchPoint(const PP_TouchPoint& point, const PP_FloatPoint& tilt) |
| + : touch_point_(point), tilt_(tilt) {} |
| /// @return The identifier for this TouchPoint. This corresponds to the order |
| /// in which the points were pressed. For example, the first point to be |
| @@ -47,8 +50,17 @@ class TouchPoint { |
| /// the value is not guaranteed to stay within that range. |
| float pressure() const { return touch_point_.pressure; } |
| + /// @return The tilt_x of this TouchPoint. This is typically a value between 0 |
| + /// and 90, with 0 indiciating 0 degree and 90 indicate 90 degrees. |
|
bbudge
2017/05/19 22:52:47
nit s/degree/degrees
and below
jkwang
2017/05/23 04:07:44
Done.
|
| + float tilt_x() const { return tilt_.x; } |
| + |
| + /// @return The tilt_y of this TouchPoint. This is typically a value between 0 |
| + /// and 90, with 0 indiciating 0 degree and 90 indicate 90 degrees. |
| + float tilt_y() const { return tilt_.y; } |
| + |
| private: |
| PP_TouchPoint touch_point_; |
| + PP_FloatPoint tilt_; |
| }; |
| } // namespace pp |