/* * Copyright (c) 2023, MacDue * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace Web::SVG { // https://svgwg.org/svg2-draft/text.html#TextPathElement class SVGTextPathElement : public SVGTextContentElement , public SVGURIReferenceMixin { WEB_PLATFORM_OBJECT(SVGTextPathElement, SVGTextContentElement); GC_DECLARE_ALLOCATOR(SVGTextPathElement); public: virtual RefPtr create_layout_node(CSS::ComputedProperties const&) override; GC::Ptr path_or_shape() const; float start_offset_for_path_length(float path_length) const; GC::Ref start_offset() const; protected: SVGTextPathElement(DOM::Document&, DOM::QualifiedName); virtual void initialize(JS::Realm&) override; virtual void visit_edges(Cell::Visitor&) override; virtual void attribute_changed(FlyString const& name, Optional const& old_value, Optional const& value, Optional const& namespace_) override; private: Optional m_start_offset; }; }