display_transform.h 876 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2019 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_DISPLAY_DISPLAY_TRANSFORM_H_
  5. #define UI_DISPLAY_DISPLAY_TRANSFORM_H_
  6. #include "ui/display/display.h"
  7. #include "ui/display/display_export.h"
  8. #include "ui/gfx/overlay_transform.h"
  9. namespace gfx {
  10. class SizeF;
  11. class Transform;
  12. } // namespace gfx
  13. namespace display {
  14. // Creates an exact gfx::Transform for a rotation.
  15. DISPLAY_EXPORT gfx::Transform CreateRotationTransform(
  16. display::Display::Rotation rotation,
  17. const gfx::SizeF& size_to_rotate);
  18. // Maps display::Display::Rotation to gfx::OverlayTransform.
  19. DISPLAY_EXPORT gfx::OverlayTransform DisplayRotationToOverlayTransform(
  20. display::Display::Rotation rotation);
  21. } // namespace display
  22. #endif // UI_DISPLAY_DISPLAY_TRANSFORM_H_