Home
last modified time | relevance | path

Searched refs:SizeF (Results 1 – 14 of 14) sorted by relevance

/external/libchrome/ui/gfx/geometry/
Dsize_unittest.cc14 int TestSizeF(const SizeF& s) { in TestSizeF()
23 float width = TestSizeF(gfx::SizeF(a)); in TEST()
26 SizeF b(10, 20); in TEST()
28 EXPECT_EQ(b, gfx::SizeF(a)); in TEST()
32 EXPECT_EQ(Size(0, 0), ToFlooredSize(SizeF(0, 0))); in TEST()
33 EXPECT_EQ(Size(0, 0), ToFlooredSize(SizeF(0.0001f, 0.0001f))); in TEST()
34 EXPECT_EQ(Size(0, 0), ToFlooredSize(SizeF(0.4999f, 0.4999f))); in TEST()
35 EXPECT_EQ(Size(0, 0), ToFlooredSize(SizeF(0.5f, 0.5f))); in TEST()
36 EXPECT_EQ(Size(0, 0), ToFlooredSize(SizeF(0.9999f, 0.9999f))); in TEST()
38 EXPECT_EQ(Size(10, 10), ToFlooredSize(SizeF(10, 10))); in TEST()
[all …]
Dsize_f.h23 class GFX_EXPORT SizeF {
25 constexpr SizeF() : width_(0.f), height_(0.f) {} in SizeF() function
26 constexpr SizeF(float width, float height) in SizeF() function
29 constexpr explicit SizeF(const Size& size) in SizeF() function
30 : SizeF(static_cast<float>(size.width()), in SizeF()
48 void SetToMin(const SizeF& other);
49 void SetToMax(const SizeF& other);
76 inline bool operator==(const SizeF& lhs, const SizeF& rhs) {
80 inline bool operator!=(const SizeF& lhs, const SizeF& rhs) {
84 GFX_EXPORT SizeF ScaleSize(const SizeF& p, float x_scale, float y_scale);
[all …]
Dsize_f.cc11 float SizeF::GetArea() const { in GetArea()
15 void SizeF::Enlarge(float grow_width, float grow_height) { in Enlarge()
19 void SizeF::SetToMin(const SizeF& other) { in SetToMin()
24 void SizeF::SetToMax(const SizeF& other) { in SetToMax()
29 std::string SizeF::ToString() const { in ToString()
33 SizeF ScaleSize(const SizeF& s, float x_scale, float y_scale) { in ScaleSize()
34 SizeF scaled_s(s); in ScaleSize()
Dsize.cc82 return ToCeiledSize(ScaleSize(gfx::SizeF(size), x_scale, y_scale)); in ScaleToCeiledSize()
88 return ToCeiledSize(ScaleSize(gfx::SizeF(size), scale, scale)); in ScaleToCeiledSize()
94 return ToFlooredSize(ScaleSize(gfx::SizeF(size), x_scale, y_scale)); in ScaleToFlooredSize()
100 return ToFlooredSize(ScaleSize(gfx::SizeF(size), scale, scale)); in ScaleToFlooredSize()
106 return ToRoundedSize(ScaleSize(gfx::SizeF(size), x_scale, y_scale)); in ScaleToRoundedSize()
112 return ToRoundedSize(ScaleSize(gfx::SizeF(size), scale, scale)); in ScaleToRoundedSize()
Dsize_conversions.h14 GFX_EXPORT Size ToFlooredSize(const SizeF& size);
17 GFX_EXPORT Size ToCeiledSize(const SizeF& size);
20 GFX_EXPORT Size ToRoundedSize(const SizeF& size);
Dsize_conversions.cc11 Size ToFlooredSize(const SizeF& size) { in ToFlooredSize()
17 Size ToCeiledSize(const SizeF& size) { in ToCeiledSize()
23 Size ToRoundedSize(const SizeF& size) { in ToRoundedSize()
Drect_f.h32 constexpr explicit RectF(const SizeF& size) : size_(size) {} in RectF()
33 constexpr RectF(const PointF& origin, const SizeF& size) in RectF()
63 constexpr const SizeF& size() const { return size_; } in size()
64 void set_size(const SizeF& size) { size_ = size; } in set_size()
150 void ClampToCenteredSize(const SizeF& size);
189 SizeF size_;
Ddip_util.cc85 ScaleSize(gfx::SizeF(rect_in_dip.size()), scale_factor))); in ConvertRectToPixel()
Drect_f.cc178 void RectF::ClampToCenteredSize(const SizeF& size) { in ClampToCenteredSize()
/external/libchrome/ui/gfx/geometry/mojo/
Dgeometry_struct_traits.h111 struct StructTraits<gfx::mojom::SizeFDataView, gfx::SizeF> {
112 static float width(const gfx::SizeF& p) { return p.width(); }
113 static float height(const gfx::SizeF& p) { return p.height(); }
114 static bool Read(gfx::mojom::SizeFDataView data, gfx::SizeF* out) {
Dgeometry_traits_test_service.mojom22 EchoSizeF(SizeF s) => (SizeF pass);
Dgeometry_struct_traits_unittest.cc43 void EchoSizeF(const SizeF& s, EchoSizeFCallback callback) override { in EchoSizeF()
113 TEST_F(GeometryStructTraitsTest, SizeF) { in TEST_F() argument
116 gfx::SizeF input(width, height); in TEST_F()
118 gfx::SizeF output; in TEST_F()
Dgeometry.typemap26 "gfx.mojom.SizeF=gfx::SizeF",
Dgeometry.mojom29 struct SizeF {