Index: ui/gfx/point_f.cc |
diff --git a/ui/gfx/point_f.cc b/ui/gfx/point_f.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..061e019009c992f4838e71cb293429e14f2998eb |
--- /dev/null |
+++ b/ui/gfx/point_f.cc |
@@ -0,0 +1,26 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ui/gfx/point_f.h" |
+ |
+#include "base/stringprintf.h" |
+#include "ui/gfx/point.h" |
+ |
+namespace gfx { |
+ |
+PointF::PointF() : x_(0), y_(0) { |
+} |
+ |
+PointF::PointF(float x, float y) : x_(x), y_(y) { |
+} |
+ |
+Point PointF::ToPoint() const { |
+ return Point(static_cast<int>(x_), static_cast<int>(y_)); |
+} |
+ |
+std::string PointF::ToString() const { |
+ return base::StringPrintf("%f,%f", x_, y_); |
+} |
+ |
+} // namespace gfx |