graphics_types.h 905 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (c) 2015 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 CHROMECAST_PUBLIC_GRAPHICS_TYPES_H_
  5. #define CHROMECAST_PUBLIC_GRAPHICS_TYPES_H_
  6. namespace chromecast {
  7. struct Rect {
  8. Rect(int w, int h) : x(0), y(0), width(w), height(h) {}
  9. Rect(int arg_x, int arg_y, int w, int h)
  10. : x(arg_x), y(arg_y), width(w), height(h) {}
  11. int x;
  12. int y;
  13. int width;
  14. int height;
  15. };
  16. struct RectF {
  17. RectF(float w, float h) : x(0), y(0), width(w), height(h) {}
  18. RectF(float arg_x, float arg_y, float w, float h)
  19. : x(arg_x), y(arg_y), width(w), height(h) {}
  20. float x;
  21. float y;
  22. float width;
  23. float height;
  24. };
  25. struct Size {
  26. Size(int w, int h) : width(w), height(h) {}
  27. int width;
  28. int height;
  29. };
  30. } // namespace chromecast
  31. #endif // CHROMECAST_PUBLIC_GRAPHICS_TYPES_H_