Home
last modified time | relevance | path

Searched refs:Vector2dF (Results 1 – 22 of 22) sorted by relevance

/external/libchrome/ui/gfx/geometry/
Dvector2d_f.h20 class GFX_EXPORT Vector2dF {
22 constexpr Vector2dF() : x_(0), y_(0) {} in Vector2dF() function
23 constexpr Vector2dF(float x, float y) : x_(x), y_(y) {} in Vector2dF() function
35 void Add(const Vector2dF& other);
37 void Subtract(const Vector2dF& other);
39 void operator+=(const Vector2dF& other) { Add(other); }
40 void operator-=(const Vector2dF& other) { Subtract(other); }
42 void SetToMin(const Vector2dF& other) { in SetToMin()
47 void SetToMax(const Vector2dF& other) { in SetToMax()
70 inline constexpr bool operator==(const Vector2dF& lhs, const Vector2dF& rhs) {
[all …]
Dvector2d_unittest.cc19 Vector2dF f = i; in TEST()
26 Vector2dF float_zero(0, 0); in TEST()
27 Vector2dF float_nonzero(0.1f, -0.1f); in TEST()
52 Vector2dF f1(3.1f, 5.1f); in TEST()
53 Vector2dF f2(4.3f, -1.3f); in TEST()
56 Vector2dF expected; in TEST()
57 Vector2dF actual; in TEST()
59 { Vector2dF(3.1F, 5.1F), f1 + Vector2d() }, in TEST()
60 { Vector2dF(3.1F, 5.1F), f1 + Vector2dF() }, in TEST()
61 { Vector2dF(3.1f + 4.3f, 5.1f - 1.3f), f1 + f2 }, in TEST()
[all …]
Dvector2d_f.cc13 std::string Vector2dF::ToString() const { in ToString()
17 bool Vector2dF::IsZero() const { in IsZero()
21 void Vector2dF::Add(const Vector2dF& other) { in Add()
26 void Vector2dF::Subtract(const Vector2dF& other) { in Subtract()
31 double Vector2dF::LengthSquared() const { in LengthSquared()
35 float Vector2dF::Length() const { in Length()
39 void Vector2dF::Scale(float x_scale, float y_scale) { in Scale()
44 double CrossProduct(const Vector2dF& lhs, const Vector2dF& rhs) { in CrossProduct()
49 double DotProduct(const Vector2dF& lhs, const Vector2dF& rhs) { in DotProduct()
54 Vector2dF ScaleVector2d(const Vector2dF& v, float x_scale, float y_scale) { in ScaleVector2d()
[all …]
Daxis_transform2d_unittest.cc14 AxisTransform2d t(1.25f, Vector2dF(3.75f, 55.f)); in TEST()
27 AxisTransform2d t(1.25f, Vector2dF(3.75f, 55.f)); in TEST()
28 EXPECT_EQ(AxisTransform2d(1.5625f, Vector2dF(3.75f, 55.f)), in TEST()
31 EXPECT_EQ(AxisTransform2d(1.5625f, Vector2dF(3.75f, 55.f)), t); in TEST()
35 AxisTransform2d t(1.25f, Vector2dF(3.75f, 55.f)); in TEST()
36 EXPECT_EQ(AxisTransform2d(1.5625f, Vector2dF(4.6875f, 68.75f)), in TEST()
39 EXPECT_EQ(AxisTransform2d(1.5625f, Vector2dF(4.6875f, 68.75f)), t); in TEST()
44 Vector2dF tr(3.f, -5.f); in TEST()
46 AxisTransform2d t(1.25f, Vector2dF(3.75f, 55.f)); in TEST()
47 EXPECT_EQ(AxisTransform2d(1.25f, Vector2dF(7.5f, 48.75f)), in TEST()
[all …]
Dpoint_f.h42 void operator+=(const Vector2dF& vector) {
47 void operator-=(const Vector2dF& vector) {
57 Vector2dF OffsetFromOrigin() const { return Vector2dF(x_, y_); } in OffsetFromOrigin()
93 inline PointF operator+(const PointF& lhs, const Vector2dF& rhs) {
99 inline PointF operator-(const PointF& lhs, const Vector2dF& rhs) {
105 inline Vector2dF operator-(const PointF& lhs, const PointF& rhs) {
106 return Vector2dF(lhs.x() - rhs.x(), lhs.y() - rhs.y());
109 inline PointF PointAtOffsetFromOrigin(const Vector2dF& offset_from_origin) { in PointAtOffsetFromOrigin()
Daxis_transform2d.h22 constexpr AxisTransform2d(float scale, const Vector2dF& translation) in AxisTransform2d()
37 void PreTranslate(const Vector2dF& translation) { in PreTranslate()
40 void PostTranslate(const Vector2dF& translation) { in PostTranslate()
76 const Vector2dF& translation() const { return translation_; } in translation()
84 Vector2dF translation_;
103 const Vector2dF& translation) { in PreTranslateAxisTransform2d()
111 const Vector2dF& translation) { in PostTranslateAxisTransform2d()
Dquad_f.cc75 Vector2dF r31 = r1 - r3; in PointIsInTriangle()
76 Vector2dF r32 = r2 - r3; in PointIsInTriangle()
77 Vector2dF r3p = point - r3; in PointIsInTriangle()
108 void QuadF::operator+=(const Vector2dF& rhs) { in operator +=()
115 void QuadF::operator-=(const Vector2dF& rhs) { in operator -=()
122 QuadF operator+(const QuadF& lhs, const Vector2dF& rhs) { in operator +()
128 QuadF operator-(const QuadF& lhs, const Vector2dF& rhs) { in operator -()
Dscroll_offset.h25 explicit ScrollOffset(const Vector2dF& v) : x_(v.x()), y_(v.y()) {} in ScrollOffset()
52 Vector2dF DeltaFrom(const ScrollOffset& v) const { in DeltaFrom()
53 return Vector2dF(x_ - v.x(), y_ - v.y()); in DeltaFrom()
112 inline Vector2dF ScrollOffsetToVector2dF(const ScrollOffset& v) { in ScrollOffsetToVector2dF()
113 return Vector2dF(v.x(), v.y()); in ScrollOffsetToVector2dF()
117 const Vector2dF& delta) { in ScrollOffsetWithDelta()
Drect_f.h73 Vector2dF OffsetFromOrigin() const { return Vector2dF(x(), y()); } in OffsetFromOrigin()
93 void Offset(const Vector2dF& distance) { Offset(distance.x(), distance.y()); } in Offset()
94 void operator+=(const Vector2dF& offset);
95 void operator-=(const Vector2dF& offset);
200 inline RectF operator+(const RectF& lhs, const Vector2dF& rhs) {
205 inline RectF operator-(const RectF& lhs, const Vector2dF& rhs) {
210 inline RectF operator+(const Vector2dF& lhs, const RectF& rhs) {
Dvector2d_conversions.h14 GFX_EXPORT Vector2d ToFlooredVector2d(const Vector2dF& vector2d);
17 GFX_EXPORT Vector2d ToCeiledVector2d(const Vector2dF& vector2d);
20 GFX_EXPORT Vector2d ToRoundedVector2d(const Vector2dF& vector2d);
Dvector2d_conversions.cc11 Vector2d ToFlooredVector2d(const Vector2dF& vector2d) { in ToFlooredVector2d()
17 Vector2d ToCeiledVector2d(const Vector2dF& vector2d) { in ToCeiledVector2d()
23 Vector2d ToRoundedVector2d(const Vector2dF& vector2d) { in ToRoundedVector2d()
Dquad_f.h86 void operator+=(const Vector2dF& rhs);
89 void operator-=(const Vector2dF& rhs);
118 GFX_EXPORT QuadF operator+(const QuadF& lhs, const Vector2dF& rhs);
121 GFX_EXPORT QuadF operator-(const QuadF& lhs, const Vector2dF& rhs);
Dvector2d.h67 operator Vector2dF() const { in Vector2dF() function
68 return Vector2dF(static_cast<float>(x()), static_cast<float>(y())); in Vector2dF()
Drect_f.cc50 origin_ += Vector2dF(left, top); in Inset()
56 origin_ += Vector2dF(horizontal, vertical); in Offset()
59 void RectF::operator+=(const Vector2dF& offset) { in operator +=()
63 void RectF::operator-=(const Vector2dF& offset) { in operator -=()
Dquad_unittest.cc61 Vector2dF v(3.5f, -2.5f); in TEST()
95 Vector2dF v(3.5f, -2.5f); in TEST()
263 Vector2dF epsilon_x(2 * std::numeric_limits<float>::epsilon(), 0); in TEST()
264 Vector2dF epsilon_y(0, 2 * std::numeric_limits<float>::epsilon()); in TEST()
266 Vector2dF ac_center = c - a; in TEST()
268 Vector2dF bd_center = d - b; in TEST()
Drect_unittest.cc848 EXPECT_EQ(RectF(2.2f, 1.1f, 3.3f, 4.4f), (f + Vector2dF(1.1f, -1.1f))); in TEST()
849 EXPECT_EQ(RectF(2.2f, 1.1f, 3.3f, 4.4f), (Vector2dF(1.1f, -1.1f) + f)); in TEST()
850 f += Vector2dF(1.1f, -1.1f); in TEST()
852 EXPECT_EQ(RectF(1.1f, 2.2f, 3.3f, 4.4f), (f - Vector2dF(1.1f, -1.1f))); in TEST()
853 f -= Vector2dF(1.1f, -1.1f); in TEST()
Dvector3d_f.h26 constexpr explicit Vector3dF(const Vector2dF& other) in Vector3dF()
/external/libchrome/ui/gfx/geometry/mojo/
Dgeometry_struct_traits.h135 struct StructTraits<gfx::mojom::Vector2dFDataView, gfx::Vector2dF> {
136 static float x(const gfx::Vector2dF& v) { return v.x(); }
137 static float y(const gfx::Vector2dF& v) { return v.y(); }
138 static bool Read(gfx::mojom::Vector2dFDataView data, gfx::Vector2dF* out) {
Dgeometry_traits_test_service.mojom40 EchoVector2dF(Vector2dF v) => (Vector2dF pass);
Dgeometry_struct_traits_unittest.cc67 void EchoVector2dF(const Vector2dF& v, in EchoVector2dF()
195 TEST_F(GeometryStructTraitsTest, Vector2dF) { in TEST_F() argument
198 gfx::Vector2dF input(x, y); in TEST_F()
200 gfx::Vector2dF output; in TEST_F()
Dgeometry.typemap32 "gfx.mojom.Vector2dF=gfx::Vector2dF",
Dgeometry.mojom67 struct Vector2dF {