CanvasRect.h 559 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. namespace Web::HTML {
  8. // https://html.spec.whatwg.org/multipage/canvas.html#canvasrect
  9. class CanvasRect {
  10. public:
  11. virtual ~CanvasRect() = default;
  12. virtual void fill_rect(float x, float y, float width, float height) = 0;
  13. virtual void stroke_rect(float x, float y, float width, float height) = 0;
  14. virtual void clear_rect(float x, float y, float width, float height) = 0;
  15. protected:
  16. CanvasRect() = default;
  17. };
  18. }