insets_conversions.h 827 B

12345678910111213141516171819202122232425
  1. // Copyright 2020 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. #ifndef UI_GFX_GEOMETRY_INSETS_CONVERSIONS_H_
  5. #define UI_GFX_GEOMETRY_INSETS_CONVERSIONS_H_
  6. #include "ui/gfx/geometry/geometry_export.h"
  7. namespace gfx {
  8. class Insets;
  9. class InsetsF;
  10. // Returns an Insets with each component from the input InsetsF floored.
  11. GEOMETRY_EXPORT Insets ToFlooredInsets(const InsetsF& insets);
  12. // Returns an Insets with each component from the input InsetsF ceiled.
  13. GEOMETRY_EXPORT Insets ToCeiledInsets(const InsetsF& insets);
  14. // Returns a Point with each component from the input PointF rounded.
  15. GEOMETRY_EXPORT Insets ToRoundedInsets(const InsetsF& insets);
  16. } // namespace gfx
  17. #endif // UI_GFX_GEOMETRY_INSETS_CONVERSIONS_H_