/* * Copyright (c) 2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Web::SVG { // https://svgwg.org/svg2-draft/text.html#InterfaceSVGTextContentElement class SVGTextContentElement : public SVGGraphicsElement { WEB_PLATFORM_OBJECT(SVGTextContentElement, SVGGraphicsElement); public: virtual JS::GCPtr create_layout_node(NonnullRefPtr) override; virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; WebIDL::ExceptionOr get_number_of_chars() const; Gfx::FloatPoint get_offset() const; protected: SVGTextContentElement(DOM::Document&, DOM::QualifiedName); virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; private: float m_x { 0 }; float m_y { 0 }; float m_dx { 0 }; float m_dy { 0 }; }; }