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

Side by Side Diff: ui/compositor/dip_util.h

Issue 11316014: Full Screen Magnifier: (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « ash/magnifier/magnification_controller.cc ('k') | ui/compositor/dip_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_COMPOSITOR_DIP_UTIL_H_ 5 #ifndef UI_COMPOSITOR_DIP_UTIL_H_
6 #define UI_COMPOSITOR_DIP_UTIL_H_ 6 #define UI_COMPOSITOR_DIP_UTIL_H_
7 7
8 #include "ui/compositor/compositor_export.h" 8 #include "ui/compositor/compositor_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "ui/gfx/point_f.h"
10 11
11 namespace gfx { 12 namespace gfx {
12 class Point; 13 class Point;
13 class Size; 14 class Size;
14 class Rect; 15 class Rect;
15 } // namespace gfx 16 } // namespace gfx
16 17
17 namespace ui { 18 namespace ui {
18 class Layer; 19 class Layer;
19 20
20 COMPOSITOR_EXPORT float GetDeviceScaleFactor(const Layer* layer); 21 COMPOSITOR_EXPORT float GetDeviceScaleFactor(const Layer* layer);
21 22
22 // Utility functions that convert point/size/rect between 23 // Utility functions that convert point/size/rect between
23 // DIP and pixel coordinates system. 24 // DIP and pixel coordinates system.
24 COMPOSITOR_EXPORT gfx::Point ConvertPointToDIP( 25 COMPOSITOR_EXPORT gfx::Point ConvertPointToDIP(
25 const Layer* layer, 26 const Layer* layer,
26 const gfx::Point& point_in_pixel); 27 const gfx::Point& point_in_pixel);
28 COMPOSITOR_EXPORT gfx::PointF ConvertPointToDIP(
29 const Layer* layer,
30 const gfx::PointF& point_in_pixel);
27 COMPOSITOR_EXPORT gfx::Size ConvertSizeToDIP( 31 COMPOSITOR_EXPORT gfx::Size ConvertSizeToDIP(
28 const Layer* layer, 32 const Layer* layer,
29 const gfx::Size& size_in_pixel); 33 const gfx::Size& size_in_pixel);
30 COMPOSITOR_EXPORT gfx::Rect ConvertRectToDIP( 34 COMPOSITOR_EXPORT gfx::Rect ConvertRectToDIP(
31 const Layer* layer, 35 const Layer* layer,
32 const gfx::Rect& rect_in_pixel); 36 const gfx::Rect& rect_in_pixel);
33 COMPOSITOR_EXPORT gfx::Point ConvertPointToPixel( 37 COMPOSITOR_EXPORT gfx::Point ConvertPointToPixel(
34 const Layer* layer, 38 const Layer* layer,
35 const gfx::Point& point_in_dip); 39 const gfx::Point& point_in_dip);
36 COMPOSITOR_EXPORT gfx::Size ConvertSizeToPixel( 40 COMPOSITOR_EXPORT gfx::Size ConvertSizeToPixel(
37 const Layer* layer, 41 const Layer* layer,
38 const gfx::Size& size_in_dip); 42 const gfx::Size& size_in_dip);
39 COMPOSITOR_EXPORT gfx::Rect ConvertRectToPixel( 43 COMPOSITOR_EXPORT gfx::Rect ConvertRectToPixel(
40 const Layer* layer, 44 const Layer* layer,
41 const gfx::Rect& rect_in_dip); 45 const gfx::Rect& rect_in_dip);
42 46
43 } // namespace ui 47 } // namespace ui
44 48
45 #endif // UI_COMPOSITOR_DIP_UTIL_H_ 49 #endif // UI_COMPOSITOR_DIP_UTIL_H_
OLDNEW
« no previous file with comments | « ash/magnifier/magnification_controller.cc ('k') | ui/compositor/dip_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698