| Index: Source/platform/geometry/DoublePoint.h
|
| diff --git a/Source/platform/geometry/DoublePoint.h b/Source/platform/geometry/DoublePoint.h
|
| index 7757161248067de85aa79b62eb6d6d1420b8fec7..f7f79736d38a153ced68640a76b04f31f3c4b15d 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(clampToInteger(floor(p.x())), clampToInteger(floor(p.y())));
|
|
|