SVGTextPathBox.h 904 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2023, MacDue <macdue@dueutil.tech>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/Layout/SVGGraphicsBox.h>
  8. #include <LibWeb/SVG/SVGTextPathElement.h>
  9. namespace Web::Layout {
  10. class SVGTextPathBox final : public SVGGraphicsBox {
  11. JS_CELL(SVGTextPathBox, SVGGraphicsBox);
  12. JS_DECLARE_ALLOCATOR(SVGTextPathBox);
  13. public:
  14. SVGTextPathBox(DOM::Document&, SVG::SVGTextPathElement&, CSS::StyleProperties);
  15. virtual ~SVGTextPathBox() override = default;
  16. SVG::SVGTextPathElement& dom_node() { return static_cast<SVG::SVGTextPathElement&>(SVGGraphicsBox::dom_node()); }
  17. SVG::SVGTextPathElement const& dom_node() const { return static_cast<SVG::SVGTextPathElement const&>(SVGGraphicsBox::dom_node()); }
  18. virtual JS::GCPtr<Painting::Paintable> create_paintable() const override;
  19. private:
  20. CSSPixelPoint viewbox_origin() const;
  21. };
  22. }