| Index: Source/platform/geometry/DoublePoint.h
|
| diff --git a/Source/platform/geometry/DoublePoint.h b/Source/platform/geometry/DoublePoint.h
|
| index 209b6d767e371b0af3d2138732c1749c9924d679..d300294c70fb28eb2d1284cf1e60b5be778d9b85 100644
|
| --- a/Source/platform/geometry/DoublePoint.h
|
| +++ b/Source/platform/geometry/DoublePoint.h
|
| @@ -23,17 +23,22 @@ public:
|
| , m_y(y)
|
| {
|
| }
|
| - explicit DoublePoint(const IntPoint& p)
|
| + DoublePoint(const IntPoint& p)
|
| : m_x(p.x())
|
| , m_y(p.y())
|
| {
|
| }
|
| - explicit DoublePoint(const FloatPoint& p)
|
| + DoublePoint(const FloatPoint& p)
|
| : m_x(p.x())
|
| , m_y(p.y())
|
| {
|
| }
|
|
|
| + explicit DoublePoint(const DoubleSize& size)
|
| + : m_x(size.width()), m_y(size.height())
|
| + {
|
| + }
|
| +
|
| DoublePoint expandedTo(int x, int y) const
|
| {
|
| return DoublePoint(m_x > x ? m_x : x, m_y > y ? m_y : y);
|
| @@ -61,11 +66,21 @@ inline bool operator!=(const DoublePoint& a, const DoublePoint& b)
|
| return a.x() != b.x() || a.y() != b.y();
|
| }
|
|
|
| +inline DoublePoint operator+(const DoublePoint& a, const DoubleSize& b)
|
| +{
|
| + return DoublePoint(a.x() + b.width(), a.y() + b.height());
|
| +}
|
| +
|
| inline DoubleSize operator-(const DoublePoint& a, const DoublePoint& b)
|
| {
|
| return DoubleSize(a.x() - b.x(), a.y() - b.y());
|
| }
|
|
|
| +inline DoublePoint operator-(const DoublePoint& a)
|
| +{
|
| + return DoublePoint(-a.x(), -a.y());
|
| +}
|
| +
|
| inline IntPoint flooredIntPoint(const DoublePoint& p)
|
| {
|
| return IntPoint(clampTo<int>(floor(p.x())), clampTo<int>(floor(p.y())));
|
|
|