Geometry.h 768 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include "../../Include/RmlUi/Core/Types.h"
  3. namespace Rml {
  4. class Context;
  5. namespace Debugger {
  6. /**
  7. Helper class for generating geometry for the debugger.
  8. */
  9. class Geometry {
  10. public:
  11. // Set the context to render through.
  12. static void SetContext(Context* context);
  13. // Renders a one-pixel rectangular outline.
  14. static void RenderOutline(Vector2f origin, Vector2f dimensions, Colourb colour, float width);
  15. // Renders a box.
  16. static void RenderBox(Vector2f origin, Vector2f dimensions, Colourb colour);
  17. // Renders a box with a hole in the middle.
  18. static void RenderBox(Vector2f origin, Vector2f dimensions, Vector2f hole_origin, Vector2f hole_dimensions, Colourb colour);
  19. private:
  20. Geometry();
  21. };
  22. } // namespace Debugger
  23. } // namespace Rml