CanvasPaintable.h 597 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/Layout/CanvasBox.h>
  8. #include <LibWeb/Painting/PaintableBox.h>
  9. namespace Web::Painting {
  10. class CanvasPaintable final : public PaintableBox {
  11. JS_CELL(CanvasPaintable, PaintableBox);
  12. public:
  13. static JS::NonnullGCPtr<CanvasPaintable> create(Layout::CanvasBox const&);
  14. virtual void paint(PaintContext&, PaintPhase) const override;
  15. Layout::CanvasBox const& layout_box() const;
  16. private:
  17. CanvasPaintable(Layout::CanvasBox const&);
  18. };
  19. }