xref: /aosp_15_r20/external/libchrome/ui/gfx/geometry/dip_util.h (revision 635a864187cb8b6c713ff48b7e790a6b21769273)
1*635a8641SAndroid Build Coastguard Worker // Copyright 2014 The Chromium Authors. All rights reserved.
2*635a8641SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
3*635a8641SAndroid Build Coastguard Worker // found in the LICENSE file.
4*635a8641SAndroid Build Coastguard Worker 
5*635a8641SAndroid Build Coastguard Worker #ifndef UI_GFX_GEOMETRY_DIP_UTIL_H_
6*635a8641SAndroid Build Coastguard Worker #define UI_GFX_GEOMETRY_DIP_UTIL_H_
7*635a8641SAndroid Build Coastguard Worker 
8*635a8641SAndroid Build Coastguard Worker #include "ui/gfx/gfx_export.h"
9*635a8641SAndroid Build Coastguard Worker 
10*635a8641SAndroid Build Coastguard Worker namespace gfx {
11*635a8641SAndroid Build Coastguard Worker 
12*635a8641SAndroid Build Coastguard Worker class Insets;
13*635a8641SAndroid Build Coastguard Worker class Point;
14*635a8641SAndroid Build Coastguard Worker class PointF;
15*635a8641SAndroid Build Coastguard Worker class Rect;
16*635a8641SAndroid Build Coastguard Worker class Size;
17*635a8641SAndroid Build Coastguard Worker 
18*635a8641SAndroid Build Coastguard Worker GFX_EXPORT gfx::Insets ConvertInsetsToDIP(float scale_factor,
19*635a8641SAndroid Build Coastguard Worker                                           const gfx::Insets& insets_in_pixel);
20*635a8641SAndroid Build Coastguard Worker GFX_EXPORT gfx::Point ConvertPointToDIP(float scale_factor,
21*635a8641SAndroid Build Coastguard Worker                                         const gfx::Point& point_in_pixel);
22*635a8641SAndroid Build Coastguard Worker GFX_EXPORT gfx::PointF ConvertPointToDIP(float scale_factor,
23*635a8641SAndroid Build Coastguard Worker                                          const gfx::PointF& point_in_pixel);
24*635a8641SAndroid Build Coastguard Worker GFX_EXPORT gfx::Size ConvertSizeToDIP(float scale_factor,
25*635a8641SAndroid Build Coastguard Worker                                       const gfx::Size& size_in_pixel);
26*635a8641SAndroid Build Coastguard Worker GFX_EXPORT gfx::Rect ConvertRectToDIP(float scale_factor,
27*635a8641SAndroid Build Coastguard Worker                                       const gfx::Rect& rect_in_pixel);
28*635a8641SAndroid Build Coastguard Worker 
29*635a8641SAndroid Build Coastguard Worker GFX_EXPORT gfx::Insets ConvertInsetsToPixel(float scale_factor,
30*635a8641SAndroid Build Coastguard Worker                                             const gfx::Insets& insets_in_dip);
31*635a8641SAndroid Build Coastguard Worker GFX_EXPORT gfx::Point ConvertPointToPixel(float scale_factor,
32*635a8641SAndroid Build Coastguard Worker                                           const gfx::Point& point_in_dip);
33*635a8641SAndroid Build Coastguard Worker GFX_EXPORT gfx::PointF ConvertPointToPixel(float scale_factor,
34*635a8641SAndroid Build Coastguard Worker                                            const gfx::PointF& point_in_dip);
35*635a8641SAndroid Build Coastguard Worker GFX_EXPORT gfx::Size ConvertSizeToPixel(float scale_factor,
36*635a8641SAndroid Build Coastguard Worker                                         const gfx::Size& size_in_dip);
37*635a8641SAndroid Build Coastguard Worker GFX_EXPORT gfx::Rect ConvertRectToPixel(float scale_factor,
38*635a8641SAndroid Build Coastguard Worker                                         const gfx::Rect& rect_in_dip);
39*635a8641SAndroid Build Coastguard Worker }  // gfx
40*635a8641SAndroid Build Coastguard Worker 
41*635a8641SAndroid Build Coastguard Worker #endif  // UI_GFX_GEOMETRY_DIP_UTIL_H_
42