5 #ifndef FLUTTER_SHELL_PLATFORM_COMMON_GEOMETRY_H_
6 #define FLUTTER_SHELL_PLATFORM_COMMON_GEOMETRY_H_
22 double x()
const {
return x_; }
23 double y()
const {
return y_; }
26 return x_ == other.x_ && y_ == other.y_;
39 : width_(std::fmax(0.0,
width)), height_(std::fmax(0.0,
height)) {}
44 double width()
const {
return width_; }
45 double height()
const {
return height_; }
48 return width_ == other.width_ && height_ == other.height_;
66 double left()
const {
return origin_.
x(); }
67 double top()
const {
return origin_.
y(); }
76 return origin_ == other.origin_ && size_ == other.size_;
90 const std::optional<Size>&
biggest)
93 biggest.value_or(
Size(std::numeric_limits<double>::infinity(),
94 std::numeric_limits<double>::infinity()))) {}
101 Size biggest_ =
Size(std::numeric_limits<double>::infinity(),
102 std::numeric_limits<double>::infinity());
BoxConstraints(const BoxConstraints &other)=default
BoxConstraints(const std::optional< Size > &smallest, const std::optional< Size > &biggest)
bool operator==(const Point &other) const
Point & operator=(const Point &other)=default
Point(double x, double y)
Point(const Point &point)=default
Rect(const Point &origin, const Size &size)
Rect & operator=(const Rect &other)=default
Rect(const Rect &rect)=default
bool operator==(const Rect &other) const
Size(const Size &size)=default
bool operator!=(const Size &other) const
Size(double width, double height)
bool operator==(const Size &other) const
Size & operator=(const Size &other)=default