OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_SERVICES_GEOMETRY_CPP_GEOMETRY_UTIL_H_ | 5 #ifndef MOJO_SERVICES_GEOMETRY_CPP_GEOMETRY_UTIL_H_ |
6 #define MOJO_SERVICES_GEOMETRY_CPP_GEOMETRY_UTIL_H_ | 6 #define MOJO_SERVICES_GEOMETRY_CPP_GEOMETRY_UTIL_H_ |
7 | 7 |
8 #include "mojo/services/geometry/interfaces/geometry.mojom.h" | 8 #include "mojo/services/geometry/interfaces/geometry.mojom.h" |
9 | 9 |
10 namespace mojo { | 10 namespace mojo { |
(...skipping 19 matching lines...) Expand all Loading... |
30 return lhs.x == rhs.x && lhs.y == rhs.y; | 30 return lhs.x == rhs.x && lhs.y == rhs.y; |
31 } | 31 } |
32 | 32 |
33 inline bool operator!=(const Point& lhs, const Point& rhs) { | 33 inline bool operator!=(const Point& lhs, const Point& rhs) { |
34 return !(lhs == rhs); | 34 return !(lhs == rhs); |
35 } | 35 } |
36 | 36 |
37 void SetIdentityTransform(Transform* transform); | 37 void SetIdentityTransform(Transform* transform); |
38 void SetTranslationTransform(Transform* transform, float x, float y, float z); | 38 void SetTranslationTransform(Transform* transform, float x, float y, float z); |
39 | 39 |
| 40 Point TransformPoint(const Transform& transform, const Point& point); |
| 41 |
40 } // namespace mojo | 42 } // namespace mojo |
41 | 43 |
42 #endif // MOJO_SERVICES_GEOMETRY_CPP_GEOMETRY_UTIL_H_ | 44 #endif // MOJO_SERVICES_GEOMETRY_CPP_GEOMETRY_UTIL_H_ |
OLD | NEW |