| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/geometry/DoublePoint.h" | 5 #include "platform/geometry/DoublePoint.h" |
| 6 #include "platform/geometry/FloatSize.h" | 6 #include "platform/geometry/FloatSize.h" |
| 7 #include "platform/geometry/LayoutPoint.h" | 7 #include "platform/geometry/LayoutPoint.h" |
| 8 #include "wtf/text/WTFString.h" | 8 #include "platform/wtf/text/WTFString.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 DoublePoint::DoublePoint(const LayoutPoint& p) | 12 DoublePoint::DoublePoint(const LayoutPoint& p) |
| 13 : m_x(p.x().toDouble()), m_y(p.y().toDouble()) {} | 13 : m_x(p.x().toDouble()), m_y(p.y().toDouble()) {} |
| 14 | 14 |
| 15 DoublePoint::DoublePoint(const FloatSize& size) | 15 DoublePoint::DoublePoint(const FloatSize& size) |
| 16 : m_x(size.width()), m_y(size.height()) {} | 16 : m_x(size.width()), m_y(size.height()) {} |
| 17 | 17 |
| 18 String DoublePoint::toString() const { | 18 String DoublePoint::toString() const { |
| 19 return String::format("%lg,%lg", x(), y()); | 19 return String::format("%lg,%lg", x(), y()); |
| 20 } | 20 } |
| 21 | 21 |
| 22 } // namespace blink | 22 } // namespace blink |
| OLD | NEW |