Index: ppapi/cpp/touch_point.h |
diff --git a/ppapi/cpp/touch_point.h b/ppapi/cpp/touch_point.h |
index 66c512ba7d56c4e9841229d620eee2ee482d4327..2dc8951563aff52dc5e5adc30c318a7111074bdb 100644 |
--- a/ppapi/cpp/touch_point.h |
+++ b/ppapi/cpp/touch_point.h |
@@ -18,7 +18,11 @@ 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_(PP_MakeFloatPoint(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 +51,14 @@ class TouchPoint { |
/// the value is not guaranteed to stay within that range. |
float pressure() const { return touch_point_.pressure; } |
+ /// @return The tilt of this touchpoint. This is a float point. Values of x |
+ /// and y are between 0 and 90, with 0 indicating 0 degrees and 90 indicating |
+ // 90 degrees. |
+ PP_FloatPoint tilt() const { return tilt_; } |
+ |
private: |
PP_TouchPoint touch_point_; |
+ PP_FloatPoint tilt_; |
}; |
} // namespace pp |