SVGTextPathBox.h 877 B

123456789101112131415161718192021222324252627282930
  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. public:
  13. SVGTextPathBox(DOM::Document&, SVG::SVGTextPathElement&, NonnullRefPtr<CSS::StyleProperties>);
  14. virtual ~SVGTextPathBox() override = default;
  15. SVG::SVGTextPathElement& dom_node() { return static_cast<SVG::SVGTextPathElement&>(SVGGraphicsBox::dom_node()); }
  16. SVG::SVGTextPathElement const& dom_node() const { return static_cast<SVG::SVGTextPathElement const&>(SVGGraphicsBox::dom_node()); }
  17. virtual JS::GCPtr<Painting::Paintable> create_paintable() const override;
  18. private:
  19. CSSPixelPoint viewbox_origin() const;
  20. };
  21. }