5#ifndef UI_GFX_GEOMETRY_POINT_F_H_
6#define UI_GFX_GEOMETRY_POINT_F_H_
21 constexpr PointF() : x_(0.f), y_(0.f) {}
27 constexpr float x()
const {
return x_; }
28 constexpr float y()
const {
return y_; }
37 void Offset(
float delta_x,
float delta_y) {
52 void SetToMin(
const PointF& other);
53 void SetToMax(
const PointF& other);
55 bool IsOrigin()
const {
return x_ == 0 && y_ == 0; }
66 return std::tie(y_, x_) < std::tie(rhs.y_, rhs.x_);
71 void Scale(
float x_scale,
float y_scale) {
72 SetPoint(
x() * x_scale,
y() * y_scale);
84 return lhs.
x() == rhs.
x() && lhs.
y() == rhs.
y();
108 return PointF(offset_from_origin.
x(), offset_from_origin.
y());
120void PrintTo(
const PointF& point, ::std::ostream* os);
constexpr PointF(float x, float y)
void Offset(float delta_x, float delta_y)
bool operator<(const PointF &rhs) const
constexpr float x() const
void SetPoint(float x, float y)
void operator-=(const Vector2dF &vector)
void Scale(float x_scale, float y_scale)
constexpr float y() const
Vector2dF OffsetFromOrigin() const
void operator+=(const Vector2dF &vector)
constexpr PointF(const Point &p)
constexpr float y() const
constexpr float x() const
Point PointAtOffsetFromOrigin(const Vector2d &offset_from_origin)
Insets operator+(Insets lhs, const Insets &rhs)
void PrintTo(const Point &point, ::std::ostream *os)
PointF ScalePoint(const PointF &p, float x_scale, float y_scale)
Insets operator-(Insets lhs, const Insets &rhs)
bool operator==(const Point &lhs, const Point &rhs)
bool operator!=(const Point &lhs, const Point &rhs)
static std::string ToString(CompilerBackend::Type type)