SVGTextPathElement.h 921 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2023, MacDue <macdue@dueutil.tech>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/SVG/SVGGeometryElement.h>
  8. #include <LibWeb/SVG/SVGTextContentElement.h>
  9. #include <LibWeb/SVG/SVGURIReference.h>
  10. namespace Web::SVG {
  11. // https://svgwg.org/svg2-draft/text.html#TextPathElement
  12. class SVGTextPathElement
  13. : public SVGTextContentElement
  14. , public SVGURIReferenceMixin<SupportsXLinkHref::Yes> {
  15. WEB_PLATFORM_OBJECT(SVGTextPathElement, SVGTextContentElement);
  16. JS_DECLARE_ALLOCATOR(SVGTextPathElement);
  17. public:
  18. virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
  19. JS::GCPtr<SVGGeometryElement const> path_or_shape() const;
  20. protected:
  21. SVGTextPathElement(DOM::Document&, DOM::QualifiedName);
  22. virtual void initialize(JS::Realm&) override;
  23. virtual void visit_edges(Cell::Visitor&) override;
  24. };
  25. }