/* * Copyright (c) 2022, Sam Atkins * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Web::SVG { class SVGLineElement final : public SVGGeometryElement { WEB_PLATFORM_OBJECT(SVGLineElement, SVGGeometryElement); public: virtual ~SVGLineElement() override = default; virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual Gfx::Path& get_path() override; JS::NonnullGCPtr x1() const; JS::NonnullGCPtr y1() const; JS::NonnullGCPtr x2() const; JS::NonnullGCPtr y2() const; private: SVGLineElement(DOM::Document&, DOM::QualifiedName); virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; Optional m_path; Optional m_x1; Optional m_y1; Optional m_x2; Optional m_y2; }; }