#include <point_f.h>
Definition at line 19 of file point_f.h.
◆ PointF() [1/3]
constexpr gfx::PointF::PointF |
( |
| ) |
|
|
inlineconstexpr |
◆ PointF() [2/3]
constexpr gfx::PointF::PointF |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inlineconstexpr |
Definition at line 22 of file point_f.h.
constexpr float x() const
constexpr float y() const
◆ PointF() [3/3]
constexpr gfx::PointF::PointF |
( |
const Point & |
p | ) |
|
|
inlineexplicitconstexpr |
Definition at line 24 of file point_f.h.
25 :
PointF(
static_cast<float>(
p.x()),
static_cast<float>(
p.y())) {}
◆ IsOrigin()
bool gfx::PointF::IsOrigin |
( |
| ) |
const |
|
inline |
Definition at line 55 of file point_f.h.
55{ return x_ == 0 && y_ == 0; }
◆ Offset()
void gfx::PointF::Offset |
( |
float |
delta_x, |
|
|
float |
delta_y |
|
) |
| |
|
inline |
Definition at line 37 of file point_f.h.
37 {
38 x_ += delta_x;
39 y_ += delta_y;
40 }
◆ OffsetFromOrigin()
Vector2dF gfx::PointF::OffsetFromOrigin |
( |
| ) |
const |
|
inline |
Definition at line 57 of file point_f.h.
57{ return Vector2dF(x_, y_); }
◆ operator+=()
void gfx::PointF::operator+= |
( |
const Vector2dF & |
vector | ) |
|
|
inline |
Definition at line 42 of file point_f.h.
42 {
43 x_ += vector.x();
44 y_ += vector.y();
45 }
◆ operator-=()
void gfx::PointF::operator-= |
( |
const Vector2dF & |
vector | ) |
|
|
inline |
Definition at line 47 of file point_f.h.
47 {
48 x_ -= vector.x();
49 y_ -= vector.y();
50 }
◆ operator<()
bool gfx::PointF::operator< |
( |
const PointF & |
rhs | ) |
const |
|
inline |
Definition at line 65 of file point_f.h.
65 {
66 return std::tie(y_, x_) < std::tie(rhs.y_, rhs.x_);
67 }
◆ Scale() [1/2]
void gfx::PointF::Scale |
( |
float |
scale | ) |
|
|
inline |
◆ Scale() [2/2]
void gfx::PointF::Scale |
( |
float |
x_scale, |
|
|
float |
y_scale |
|
) |
| |
|
inline |
Definition at line 71 of file point_f.h.
71 {
73 }
void SetPoint(float x, float y)
◆ set_x()
void gfx::PointF::set_x |
( |
float |
x | ) |
|
|
inline |
◆ set_y()
void gfx::PointF::set_y |
( |
float |
y | ) |
|
|
inline |
◆ SetPoint()
void gfx::PointF::SetPoint |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inline |
◆ SetToMax()
void gfx::PointF::SetToMax |
( |
const PointF & |
other | ) |
|
Definition at line 16 of file point_f.cc.
16 {
17 x_ = x_ >= other.x_ ? x_ : other.x_;
18 y_ = y_ >= other.y_ ? y_ : other.y_;
19}
◆ SetToMin()
void gfx::PointF::SetToMin |
( |
const PointF & |
other | ) |
|
Definition at line 11 of file point_f.cc.
11 {
12 x_ = x_ <= other.x_ ? x_ : other.x_;
13 y_ = y_ <= other.y_ ? y_ : other.y_;
14}
◆ ToString()
std::string gfx::PointF::ToString |
( |
| ) |
const |
Definition at line 21 of file point_f.cc.
21 {
23}
std::string StringPrintf(const std::string &format, Args... args)
◆ x()
constexpr float gfx::PointF::x |
( |
| ) |
const |
|
inlineconstexpr |
◆ y()
constexpr float gfx::PointF::y |
( |
| ) |
const |
|
inlineconstexpr |
The documentation for this class was generated from the following files:
- third_party/accessibility/gfx/geometry/point_f.h
- third_party/accessibility/gfx/geometry/point_f.cc