| Index: Source/platform/geometry/DoubleSize.h
|
| diff --git a/Source/platform/geometry/DoubleSize.h b/Source/platform/geometry/DoubleSize.h
|
| index ec03eee75645e368be354d3b0b5585c73b9f1ac9..52ee7a907e0f089058f458e896055350e2944f43 100644
|
| --- a/Source/platform/geometry/DoubleSize.h
|
| +++ b/Source/platform/geometry/DoubleSize.h
|
| @@ -15,6 +15,7 @@ class PLATFORM_EXPORT DoubleSize {
|
| public:
|
| DoubleSize() : m_width(0), m_height(0) { }
|
| DoubleSize(double width, double height) : m_width(width), m_height(height) { }
|
| + DoubleSize(const IntSize& p) : m_width(p.width()), m_height(p.height()) { }
|
|
|
| double width() const { return m_width; }
|
| double height() const { return m_height; }
|
| @@ -37,6 +38,11 @@ inline DoubleSize& operator+=(DoubleSize& a, const DoubleSize& b)
|
| return a;
|
| }
|
|
|
| +inline DoubleSize operator+(const DoubleSize& a, const DoubleSize& b)
|
| +{
|
| + return DoubleSize(a.width() + b.width(), a.height() + b.height());
|
| +}
|
| +
|
| inline DoubleSize operator-(const DoubleSize& a, const DoubleSize& b)
|
| {
|
| return DoubleSize(a.width() - b.width(), a.height() - b.height());
|
| @@ -47,6 +53,11 @@ inline bool operator==(const DoubleSize& a, const DoubleSize& b)
|
| return a.width() == b.width() && a.height() == b.height();
|
| }
|
|
|
| +inline bool operator!=(const DoubleSize& a, const DoubleSize& b)
|
| +{
|
| + return a.width() != b.width() || a.height() != b.height();
|
| +}
|
| +
|
| inline IntSize flooredIntSize(const DoubleSize& p)
|
| {
|
| return IntSize(clampTo<int>(floor(p.width())), clampTo<int>(floor(p.height())));
|
|
|