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

Side by Side Diff: ui/gfx/geometry/dip_util.h

Issue 2447303002: Scale client area, hit test mask and bounds by device_scale_factor. (Closed)
Patch Set: rebase Created 4 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 | « ui/aura/mus/window_tree_client.cc ('k') | ui/gfx/geometry/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 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 #ifndef UI_GFX_GEOMETRY_DIP_UTIL_H_ 5 #ifndef UI_GFX_GEOMETRY_DIP_UTIL_H_
6 #define UI_GFX_GEOMETRY_DIP_UTIL_H_ 6 #define UI_GFX_GEOMETRY_DIP_UTIL_H_
7 7
8 #include "ui/gfx/gfx_export.h" 8 #include "ui/gfx/gfx_export.h"
9 9
10 namespace gfx { 10 namespace gfx {
11 11
12 class Insets;
12 class Point; 13 class Point;
13 class PointF; 14 class PointF;
14 class Rect; 15 class Rect;
15 class Size; 16 class Size;
16 17
18 GFX_EXPORT gfx::Insets ConvertInsetsToDIP(float scale_factor,
19 const gfx::Insets& insets_in_pixel);
17 GFX_EXPORT gfx::Point ConvertPointToDIP(float scale_factor, 20 GFX_EXPORT gfx::Point ConvertPointToDIP(float scale_factor,
18 const gfx::Point& point_in_pixel); 21 const gfx::Point& point_in_pixel);
19 GFX_EXPORT gfx::PointF ConvertPointToDIP(float scale_factor, 22 GFX_EXPORT gfx::PointF ConvertPointToDIP(float scale_factor,
20 const gfx::PointF& point_in_pixel); 23 const gfx::PointF& point_in_pixel);
21 GFX_EXPORT gfx::Size ConvertSizeToDIP(float scale_factor, 24 GFX_EXPORT gfx::Size ConvertSizeToDIP(float scale_factor,
22 const gfx::Size& size_in_pixel); 25 const gfx::Size& size_in_pixel);
23 GFX_EXPORT gfx::Rect ConvertRectToDIP(float scale_factor, 26 GFX_EXPORT gfx::Rect ConvertRectToDIP(float scale_factor,
24 const gfx::Rect& rect_in_pixel); 27 const gfx::Rect& rect_in_pixel);
25 28
29 GFX_EXPORT gfx::Insets ConvertInsetsToPixel(float scale_factor,
30 const gfx::Insets& insets_in_dip);
26 GFX_EXPORT gfx::Point ConvertPointToPixel(float scale_factor, 31 GFX_EXPORT gfx::Point ConvertPointToPixel(float scale_factor,
27 const gfx::Point& point_in_pixel); 32 const gfx::Point& point_in_dip);
28 GFX_EXPORT gfx::Size ConvertSizeToPixel(float scale_factor, 33 GFX_EXPORT gfx::Size ConvertSizeToPixel(float scale_factor,
29 const gfx::Size& size_in_pixel); 34 const gfx::Size& size_in_dip);
30 GFX_EXPORT gfx::Rect ConvertRectToPixel(float scale_factor, 35 GFX_EXPORT gfx::Rect ConvertRectToPixel(float scale_factor,
31 const gfx::Rect& rect_in_dip); 36 const gfx::Rect& rect_in_dip);
32 } // gfx 37 } // gfx
33 38
34 #endif // UI_GFX_GEOMETRY_DIP_UTIL_H_ 39 #endif // UI_GFX_GEOMETRY_DIP_UTIL_H_
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client.cc ('k') | ui/gfx/geometry/dip_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698