#include <point.h>
Definition at line 27 of file point.h.
◆ Point() [1/2]
| constexpr gfx::Point::Point |
( |
| ) |
|
|
inlineconstexpr |
◆ Point() [2/2]
| constexpr gfx::Point::Point |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inlineconstexpr |
◆ IsOrigin()
| bool gfx::Point::IsOrigin |
( |
| ) |
const |
|
inline |
Definition at line 76 of file point.h.
76{ return x_ == 0 && y_ == 0; }
◆ Offset()
| void gfx::Point::Offset |
( |
int |
delta_x, |
|
|
int |
delta_y |
|
) |
| |
|
inline |
Definition at line 58 of file point.h.
58 {
59 x_ = base::ClampAdd(x_, delta_x);
60 y_ = base::ClampAdd(y_, delta_y);
61 }
Referenced by gfx::TEST(), and gfx::TEST().
◆ OffsetFromOrigin()
| Vector2d gfx::Point::OffsetFromOrigin |
( |
| ) |
const |
|
inline |
Definition at line 78 of file point.h.
78{ return Vector2d(x_, y_); }
◆ operator+=()
| void gfx::Point::operator+= |
( |
const Vector2d & |
vector | ) |
|
|
inline |
◆ operator-=()
| void gfx::Point::operator-= |
( |
const Vector2d & |
vector | ) |
|
|
inline |
◆ operator<()
| bool gfx::Point::operator< |
( |
const Point & |
rhs | ) |
const |
|
inline |
Definition at line 86 of file point.h.
86{ return std::tie(y_, x_) < std::tie(rhs.y_, rhs.x_); }
◆ set_x()
| void gfx::Point::set_x |
( |
int |
x | ) |
|
|
inline |
Definition at line 50 of file point.h.
References x.
◆ set_y()
| void gfx::Point::set_y |
( |
int |
y | ) |
|
|
inline |
Definition at line 51 of file point.h.
References y.
◆ SetPoint()
| void gfx::Point::SetPoint |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inline |
◆ SetToMax()
| void gfx::Point::SetToMax |
( |
const Point & |
other | ) |
|
Definition at line 58 of file point.cc.
58 {
59 x_ = x_ >= other.x_ ? x_ : other.x_;
60 y_ = y_ >= other.y_ ? y_ : other.y_;
61}
Referenced by gfx::TEST().
◆ SetToMin()
| void gfx::Point::SetToMin |
( |
const Point & |
other | ) |
|
Definition at line 53 of file point.cc.
53 {
54 x_ = x_ <= other.x_ ? x_ : other.x_;
55 y_ = y_ <= other.y_ ? y_ : other.y_;
56}
Referenced by gfx::TEST().
◆ ToString()
| std::string gfx::Point::ToString |
( |
| ) |
const |
◆ x()
| constexpr int gfx::Point::x |
( |
| ) |
const |
|
inlineconstexpr |
◆ y()
| constexpr int gfx::Point::y |
( |
| ) |
const |
|
inlineconstexpr |
The documentation for this class was generated from the following files:
- third_party/accessibility/gfx/geometry/point.h
- third_party/accessibility/gfx/geometry/point.cc