#ifndef UI_GFX_GEOMETRY_SIZE_H_
#define UI_GFX_GEOMETRY_SIZE_H_
#include <algorithm>
#include <iosfwd>
#include <string>
#include "base/numerics/safe_math.h"
#include "build/build_config.h"
#include "ui/gfx/geometry/geometry_export.h"
#if BUILDFLAG(IS_WIN)
typedef struct tagSIZE SIZE;
#elif BUILDFLAG(IS_APPLE)
typedef struct CGSize CGSize;
#endif
namespace gfx {
class GEOMETRY_EXPORT Size { … };
inline bool operator==(const Size& lhs, const Size& rhs) { … }
inline bool operator!=(const Size& lhs, const Size& rhs) { … }
inline Size operator+(Size lhs, const Size& rhs) { … }
inline Size operator-(Size lhs, const Size& rhs) { … }
void PrintTo(const Size& size, ::std::ostream* os);
GEOMETRY_EXPORT Size ScaleToCeiledSize(const Size& size,
float x_scale,
float y_scale);
GEOMETRY_EXPORT Size ScaleToCeiledSize(const Size& size, float scale);
GEOMETRY_EXPORT Size ScaleToFlooredSize(const Size& size,
float x_scale,
float y_scale);
GEOMETRY_EXPORT Size ScaleToFlooredSize(const Size& size, float scale);
GEOMETRY_EXPORT Size ScaleToRoundedSize(const Size& size,
float x_scale,
float y_scale);
GEOMETRY_EXPORT Size ScaleToRoundedSize(const Size& size, float scale);
inline Size TransposeSize(const Size& s) { … }
}
#endif