5#ifndef UI_GFX_GEOMETRY_SIZE_H_
6#define UI_GFX_GEOMETRY_SIZE_H_
18typedef struct tagSIZE
SIZE;
19#elif defined(OS_APPLE)
20typedef struct CGSize CGSize;
28 constexpr Size() : width_(0), height_(0) {}
32 explicit Size(
const CGSize&
s);
36 Size& operator=(
const CGSize&
s);
39 void operator+=(
const Size& size);
41 void operator-=(
const Size& size);
45#elif defined(OS_APPLE)
46 CGSize ToCGSize()
const;
49 constexpr int width()
const {
return width_; }
50 constexpr int height()
const {
return height_; }
65 void Enlarge(
int grow_width,
int grow_height);
67 void SetToMin(
const Size& other);
68 void SetToMax(
const Size& other);
72 std::string ToString()
const;
void set_height(int height)
void set_width(int width)
constexpr int height() const
constexpr Size(int width, int height)
void SetSize(int width, int height)
constexpr int width() const
static float max(float r, float g, float b)
Insets operator+(Insets lhs, const Insets &rhs)
void PrintTo(const Point &point, ::std::ostream *os)
Insets operator-(Insets lhs, const Insets &rhs)
bool operator==(const Point &lhs, const Point &rhs)
Size ScaleToCeiledSize(const Size &size, float x_scale, float y_scale)
Size ScaleToFlooredSize(const Size &size, float x_scale, float y_scale)
constexpr size_t size(const T(&array)[N]) noexcept
bool operator!=(const Point &lhs, const Point &rhs)
Size ScaleToRoundedSize(const Size &size, float x_scale, float y_scale)