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 3 // found in the LICENSE file. 4 5 #ifndef UI_GFX_GEOMETRY_DIP_UTIL_H_ 6 #define UI_GFX_GEOMETRY_DIP_UTIL_H_ 7 8 #include "ui/gfx/gfx_export.h" 9 10 namespace gfx { 11 12 class Insets; 13 class Point; 14 class PointF; 15 class Rect; 16 class Size; 17 18 GFX_EXPORT gfx::Insets ConvertInsetsToDIP(float scale_factor, 19 const gfx::Insets& insets_in_pixel); 20 GFX_EXPORT gfx::Point ConvertPointToDIP(float scale_factor, 21 const gfx::Point& point_in_pixel); 22 GFX_EXPORT gfx::PointF ConvertPointToDIP(float scale_factor, 23 const gfx::PointF& point_in_pixel); 24 GFX_EXPORT gfx::Size ConvertSizeToDIP(float scale_factor, 25 const gfx::Size& size_in_pixel); 26 GFX_EXPORT gfx::Rect ConvertRectToDIP(float scale_factor, 27 const gfx::Rect& rect_in_pixel); 28 29 GFX_EXPORT gfx::Insets ConvertInsetsToPixel(float scale_factor, 30 const gfx::Insets& insets_in_dip); 31 GFX_EXPORT gfx::Point ConvertPointToPixel(float scale_factor, 32 const gfx::Point& point_in_dip); 33 GFX_EXPORT gfx::PointF ConvertPointToPixel(float scale_factor, 34 const gfx::PointF& point_in_dip); 35 GFX_EXPORT gfx::Size ConvertSizeToPixel(float scale_factor, 36 const gfx::Size& size_in_dip); 37 GFX_EXPORT gfx::Rect ConvertRectToPixel(float scale_factor, 38 const gfx::Rect& rect_in_dip); 39 } // gfx 40 41 #endif // UI_GFX_GEOMETRY_DIP_UTIL_H_ 42