#include <rect_f.h>
Public Member Functions | |
| constexpr | RectF ()=default |
| constexpr | RectF (float width, float height) |
| constexpr | RectF (float x, float y, float width, float height) |
| constexpr | RectF (const SizeF &size) |
| constexpr | RectF (const PointF &origin, const SizeF &size) |
| constexpr | RectF (const Rect &r) |
| constexpr float | x () const |
| void | set_x (float x) |
| constexpr float | y () const |
| void | set_y (float y) |
| constexpr float | width () const |
| void | set_width (float width) |
| constexpr float | height () const |
| void | set_height (float height) |
| constexpr const PointF & | origin () const |
| void | set_origin (const PointF &origin) |
| constexpr const SizeF & | size () const |
| void | set_size (const SizeF &size) |
| constexpr float | right () const |
| constexpr float | bottom () const |
| constexpr PointF | top_right () const |
| constexpr PointF | bottom_left () const |
| constexpr PointF | bottom_right () const |
| constexpr PointF | left_center () const |
| constexpr PointF | top_center () const |
| constexpr PointF | right_center () const |
| constexpr PointF | bottom_center () const |
| Vector2dF | OffsetFromOrigin () const |
| void | SetRect (float x, float y, float width, float height) |
| void | Inset (float horizontal, float vertical) |
| void | Inset (const InsetsF &insets) |
| void | Inset (float left, float top, float right, float bottom) |
| void | Offset (float horizontal, float vertical) |
| void | Offset (const Vector2dF &distance) |
| void | operator+= (const Vector2dF &offset) |
| void | operator-= (const Vector2dF &offset) |
| InsetsF | InsetsFrom (const RectF &inner) const |
| bool | IsEmpty () const |
| bool | operator< (const RectF &other) const |
| bool | Contains (float point_x, float point_y) const |
| bool | Contains (const PointF &point) const |
| bool | Contains (const RectF &rect) const |
| bool | Intersects (const RectF &rect) const |
| void | Intersect (const RectF &rect) |
| void | Union (const RectF &rect) |
| void | Subtract (const RectF &rect) |
| void | AdjustToFit (const RectF &rect) |
| PointF | CenterPoint () const |
| void | ClampToCenteredSize (const SizeF &size) |
| void | Transpose () |
| void | SplitVertically (RectF *left_half, RectF *right_half) const |
| bool | SharesEdgeWith (const RectF &rect) const |
| float | ManhattanDistanceToPoint (const PointF &point) const |
| float | ManhattanInternalDistance (const RectF &rect) const |
| void | Scale (float scale) |
| void | Scale (float x_scale, float y_scale) |
| bool | IsExpressibleAsRect () const |
| std::string | ToString () const |
|
constexprdefault |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineexplicitconstexpr |
|
inlineexplicitconstexpr |
| void gfx::RectF::AdjustToFit | ( | const RectF & | rect | ) |
Definition at line 161 of file rect_f.cc.
References gfx::AdjustAlongAxis(), height, height(), width, width(), x, x(), y, and y().
|
inlineconstexpr |
Definition at line 66 of file rect_f.h.
Referenced by Contains(), InsetsFrom(), Intersect(), Intersects(), gfx::IsNearestRectWithinDistance(), SharesEdgeWith(), Subtract(), gfx::ToEnclosedRect(), gfx::ToEnclosedRectIgnoringError(), gfx::ToEnclosingRect(), gfx::ToEnclosingRectIgnoringError(), gfx::ToNearestRect(), gfx::ToRoundedRect(), and Union().
|
inlineconstexpr |
|
inlineconstexpr |
Definition at line 69 of file rect_f.h.
References x.
Referenced by gfx::TEST(), and gfx::Transform::TransformRect().
|
inlineconstexpr |
| PointF gfx::RectF::CenterPoint | ( | ) | const |
| void gfx::RectF::ClampToCenteredSize | ( | const SizeF & | size | ) |
|
inline |
Definition at line 120 of file rect_f.h.
References Contains(), gfx::PointF::x(), and gfx::PointF::y().
Referenced by Contains().
| bool gfx::RectF::Contains | ( | const RectF & | rect | ) | const |
| bool gfx::RectF::Contains | ( | float | point_x, |
| float | point_y | ||
| ) | const |
|
inlineconstexpr |
Definition at line 56 of file rect_f.h.
Referenced by AdjustToFit(), gfx::AssertRectFloatEqual(), flutter::FlutterTextPlatformNode::GetFrame(), ManhattanInternalDistance(), gfx::operator+(), gfx::operator-(), operator<(), gfx::ScaleRect(), SharesEdgeWith(), flutter::testing::TEST(), gfx::TEST(), gfx::ToEnclosedRectIgnoringError(), gfx::ToEnclosingRect(), gfx::ToEnclosingRectIgnoringError(), gfx::ToFlooredRectDeprecated(), and ui::AXRelativeBounds::ToString().
| void gfx::RectF::Inset | ( | const InsetsF & | insets | ) |
Definition at line 44 of file rect_f.cc.
References gfx::InsetsF::bottom(), gfx::InsetsF::left(), gfx::InsetsF::right(), and gfx::InsetsF::top().
|
inline |
| void gfx::RectF::Inset | ( | float | left, |
| float | top, | ||
| float | right, | ||
| float | bottom | ||
| ) |
| void gfx::RectF::Intersect | ( | const RectF & | rect | ) |
Definition at line 95 of file rect_f.cc.
References bottom(), IsEmpty(), right(), x, x(), y, and y().
Referenced by gfx::IntersectRects().
| bool gfx::RectF::Intersects | ( | const RectF & | rect | ) | const |
|
inline |
| bool gfx::RectF::IsExpressibleAsRect | ( | ) | const |
|
inlineconstexpr |
| float gfx::RectF::ManhattanDistanceToPoint | ( | const PointF & | point | ) | const |
Definition at line 203 of file rect_f.cc.
References x, gfx::PointF::x(), y, and gfx::PointF::y().
Referenced by gfx::TEST().
| float gfx::RectF::ManhattanInternalDistance | ( | const RectF & | rect | ) | const |
|
inline |
| void gfx::RectF::Offset | ( | float | horizontal, |
| float | vertical | ||
| ) |
Definition at line 54 of file rect_f.cc.
Referenced by ui::TestAXNodeWrapper::GetBoundsRect(), ui::TestAXNodeWrapper::GetHypertextRangeBoundsRect(), and ui::TestAXNodeWrapper::GetInnerTextRangeBoundsRect().
|
inline |
| void gfx::RectF::operator+= | ( | const Vector2dF & | offset | ) |
| void gfx::RectF::operator-= | ( | const Vector2dF & | offset | ) |
| bool gfx::RectF::operator< | ( | const RectF & | other | ) | const |
|
inlineconstexpr |
Definition at line 59 of file rect_f.h.
Referenced by gfx::operator==(), gfx::TEST(), and gfx::Transform::TransformRect().
|
inlineconstexpr |
Definition at line 65 of file rect_f.h.
Referenced by Contains(), InsetsFrom(), Intersect(), Intersects(), gfx::IsNearestRectWithinDistance(), SharesEdgeWith(), SplitVertically(), Subtract(), gfx::ToEnclosedRect(), gfx::ToEnclosedRectIgnoringError(), gfx::ToEnclosingRect(), gfx::ToEnclosingRectIgnoringError(), gfx::ToNearestRect(), gfx::ToRoundedRect(), and Union().
|
inlineconstexpr |
|
inline |
|
inline |
Definition at line 177 of file rect_f.h.
References gfx::ScalePoint(), and gfx::ScaleSize().
|
inline |
Definition at line 57 of file rect_f.h.
References height.
Referenced by gfx::Transform::TransformRect().
|
inline |
Definition at line 60 of file rect_f.h.
Referenced by gfx::Transform::TransformRect().
|
inline |
|
inline |
Definition at line 54 of file rect_f.h.
References width.
Referenced by gfx::Transform::TransformRect().
|
inline |
| bool gfx::RectF::SharesEdgeWith | ( | const RectF & | rect | ) | const |
|
inlineconstexpr |
Definition at line 187 of file rect_f.cc.
References BASE_DCHECK, height, right(), SetRect(), width, width(), x, and y.
| void gfx::RectF::Subtract | ( | const RectF & | rect | ) |
Definition at line 130 of file rect_f.cc.
References bottom(), Contains(), right(), x, x(), y, and y().
Referenced by gfx::SubtractRects().
|
inlineconstexpr |
|
inlineconstexpr |
Definition at line 68 of file rect_f.h.
References y.
Referenced by gfx::TEST(), and gfx::Transform::TransformRect().
| std::string gfx::RectF::ToString | ( | ) | const |
Definition at line 231 of file rect_f.cc.
References base::StringPrintf().
Referenced by gfx::AssertRectFloatEqual(), and gfx::PrintTo().
| void gfx::RectF::Transpose | ( | ) |
| void gfx::RectF::Union | ( | const RectF & | rect | ) |
|
inlineconstexpr |
Definition at line 53 of file rect_f.h.
Referenced by AdjustToFit(), gfx::AssertRectFloatEqual(), flutter::FlutterTextPlatformNode::GetFrame(), ManhattanInternalDistance(), gfx::operator+(), gfx::operator-(), operator<(), gfx::ScaleRect(), SharesEdgeWith(), SplitVertically(), flutter::testing::TEST(), gfx::TEST(), gfx::ToEnclosedRectIgnoringError(), gfx::ToEnclosingRect(), gfx::ToEnclosingRectIgnoringError(), gfx::ToFlooredRectDeprecated(), and ui::AXRelativeBounds::ToString().
|
inlineconstexpr |
Definition at line 47 of file rect_f.h.
Referenced by AdjustToFit(), gfx::AssertRectFloatEqual(), Contains(), flutter::FlutterTextPlatformNode::GetFrame(), InsetsFrom(), Intersect(), Intersects(), gfx::IsNearestRectWithinDistance(), gfx::operator+(), gfx::operator-(), gfx::ScaleRect(), SharesEdgeWith(), Subtract(), flutter::testing::TEST(), gfx::TEST(), gfx::ToEnclosedRect(), gfx::ToEnclosedRectIgnoringError(), gfx::ToEnclosingRect(), gfx::ToEnclosingRectIgnoringError(), gfx::ToFlooredRectDeprecated(), gfx::ToNearestRect(), gfx::ToRoundedRect(), ui::AXRelativeBounds::ToString(), and Union().
|
inlineconstexpr |
Definition at line 50 of file rect_f.h.
Referenced by AdjustToFit(), gfx::AssertRectFloatEqual(), Contains(), flutter::FlutterTextPlatformNode::GetFrame(), InsetsFrom(), Intersect(), Intersects(), gfx::IsNearestRectWithinDistance(), gfx::operator+(), gfx::operator-(), gfx::ScaleRect(), SharesEdgeWith(), Subtract(), flutter::testing::TEST(), gfx::TEST(), gfx::ToEnclosedRect(), gfx::ToEnclosedRectIgnoringError(), gfx::ToEnclosingRect(), gfx::ToEnclosingRectIgnoringError(), gfx::ToFlooredRectDeprecated(), gfx::ToNearestRect(), gfx::ToRoundedRect(), ui::AXRelativeBounds::ToString(), and Union().