Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: ui/gfx/point_conversions.h

Issue 11081007: Remove implicit flooring Scale() method from Point and Size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/point_base.h ('k') | ui/gfx/point_conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/point_conversions.h
diff --git a/ui/gfx/point_conversions.h b/ui/gfx/point_conversions.h
new file mode 100644
index 0000000000000000000000000000000000000000..6fb4ca07c5c7f33249d31aceb5e09638580a9f05
--- /dev/null
+++ b/ui/gfx/point_conversions.h
@@ -0,0 +1,21 @@
+// 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.
+
+#ifndef UI_GFX_POINT_CONVERSIONS_H_
+#define UI_GFX_POINT_CONVERSIONS_H_
+
+#include "ui/gfx/point.h"
+#include "ui/gfx/point_f.h"
+
+namespace gfx {
+
+// Returns a Point with each component from the input PointF floored.
+UI_EXPORT Point ToFlooredPoint(const PointF& point);
+
+// Returns a Point with each component from the input PointF ceiled.
+UI_EXPORT Point ToCeiledPoint(const PointF& point);
+
+} // namespace gfx
+
+#endif // UI_GFX_RECT_CONVERSIONS_H_
« no previous file with comments | « ui/gfx/point_base.h ('k') | ui/gfx/point_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698