page_orientation.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 PDF_PAGE_ORIENTATION_H_
  5. #define PDF_PAGE_ORIENTATION_H_
  6. #include <cstdint>
  7. namespace chrome_pdf {
  8. // Enumeration of allowed page orientations. Assigned values permit simple
  9. // modular arithmetic on orientations.
  10. enum class PageOrientation : uint8_t {
  11. // Original orientation.
  12. kOriginal = 0,
  13. // Rotated clockwise 90 degrees.
  14. kClockwise90 = 1,
  15. // Rotated (clockwise) 180 degrees.
  16. kClockwise180 = 2,
  17. // Rotated clockwise 270 degrees (counterclockwise 90 degrees).
  18. kClockwise270 = 3,
  19. // Last enumeration value.
  20. kLast = kClockwise270
  21. };
  22. // Rotates a page orientation clockwise by one step (90 degrees).
  23. PageOrientation RotateClockwise(PageOrientation orientation);
  24. // Rotates a page orientation counterclockwise by one step (90 degrees).
  25. PageOrientation RotateCounterclockwise(PageOrientation orientation);
  26. } // namespace chrome_pdf
  27. #endif // PDF_PAGE_ORIENTATION_H_