SVGPaintable.h 659 B

12345678910111213141516171819202122232425262728293031
  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/SVGBox.h>
  8. #include <LibWeb/Painting/PaintableBox.h>
  9. namespace Web::Painting {
  10. class SVGPaintable : public PaintableBox {
  11. JS_CELL(SVGPaintable, PaintableBox);
  12. public:
  13. Layout::SVGBox const& layout_box() const;
  14. protected:
  15. virtual bool is_svg_paintable() const override { return true; }
  16. SVGPaintable(Layout::SVGBox const&);
  17. virtual CSSPixelRect compute_absolute_rect() const override;
  18. };
  19. template<>
  20. inline bool Paintable::fast_is<SVGPaintable>() const { return is_svg_paintable(); }
  21. }