OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_AURA_DIP_UTIL_H_ | |
6 #define UI_AURA_DIP_UTIL_H_ | |
7 #pragma once | |
8 | |
9 #include "ui/aura/aura_export.h" | |
10 | |
11 namespace gfx { | |
12 class Point; | |
13 class Size; | |
14 class Rect; | |
15 } // namespace gfx | |
16 | |
17 namespace aura { | |
18 class Window; | |
19 | |
20 #if defined(ENABLE_DIP) | |
21 AURA_EXPORT float GetMonitorScaleFactor(const Window* window); | |
22 #endif | |
23 | |
24 // Utility functions that convert point/size/rect between | |
25 // DIP and pixel coordinates system. | |
26 AURA_EXPORT gfx::Point ConvertPointToDIP(const Window* window, | |
27 const gfx::Point& point_in_pixel); | |
28 AURA_EXPORT gfx::Size ConvertSizeToDIP(const Window* window, | |
29 const gfx::Size& size_in_pixel); | |
30 AURA_EXPORT gfx::Rect ConvertRectToDIP(const Window* window, | |
31 const gfx::Rect& rect_in_pixel); | |
32 AURA_EXPORT gfx::Point ConvertPointToPixel(const Window* window, | |
33 const gfx::Point& point_in_dip); | |
34 AURA_EXPORT gfx::Size ConvertSizeToPixel(const Window* window, | |
35 const gfx::Size& size_in_dip); | |
36 AURA_EXPORT gfx::Rect ConvertRectToPixel(const Window* window, | |
37 const gfx::Rect& rect_in_dip); | |
38 | |
39 } // namespace aura | |
40 | |
41 #endif // UI_AURA_DIP_UTIL_H_ | |
OLD | NEW |