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

Side by Side Diff: ui/gfx/point_conversions.h

Issue 22891016: Add support for rect-based event targeting in views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: WIP Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_GFX_POINT_CONVERSIONS_H_ 5 #ifndef UI_GFX_POINT_CONVERSIONS_H_
6 #define UI_GFX_POINT_CONVERSIONS_H_ 6 #define UI_GFX_POINT_CONVERSIONS_H_
7 7
8 #include "ui/gfx/point.h" 8 #include "ui/gfx/point.h"
9 #include "ui/gfx/point_f.h" 9 #include "ui/gfx/point_f.h"
10 #include "ui/gfx/rect.h"
11 #include "ui/gfx/rect_f.h"
10 12
11 namespace gfx { 13 namespace gfx {
12 14
13 // Returns a Point with each component from the input PointF floored. 15 // Returns a Point with each component from the input PointF floored.
14 UI_EXPORT Point ToFlooredPoint(const PointF& point); 16 UI_EXPORT Point ToFlooredPoint(const PointF& point);
15 17
18 // Returns a Rect with each component from the input RectF floored.
19 UI_EXPORT Rect ToFlooredRect(const RectF& rect);
danakj 2013/09/05 19:10:07 not lgtm on this. See rect_conversions for the var
tdanderson 2013/09/09 22:15:39 Done.
20
16 // Returns a Point with each component from the input PointF ceiled. 21 // Returns a Point with each component from the input PointF ceiled.
17 UI_EXPORT Point ToCeiledPoint(const PointF& point); 22 UI_EXPORT Point ToCeiledPoint(const PointF& point);
18 23
19 // Returns a Point with each component from the input PointF rounded. 24 // Returns a Point with each component from the input PointF rounded.
20 UI_EXPORT Point ToRoundedPoint(const PointF& point); 25 UI_EXPORT Point ToRoundedPoint(const PointF& point);
21 26
22 } // namespace gfx 27 } // namespace gfx
23 28
24 #endif // UI_GFX_POINT_CONVERSIONS_H_ 29 #endif // UI_GFX_POINT_CONVERSIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698