/* * Copyright (c) 2022, Sam Atkins * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace Web::SVG { // https://www.w3.org/TR/SVG11/shapes.html#RectElement class SVGRectElement final : public SVGGeometryElement { public: using WrapperType = Bindings::SVGRectElementWrapper; SVGRectElement(DOM::Document&, DOM::QualifiedName); virtual ~SVGRectElement() override = default; virtual void parse_attribute(FlyString const& name, String const& value) override; virtual Gfx::Path& get_path() override; NonnullRefPtr x() const; NonnullRefPtr y() const; NonnullRefPtr width() const; NonnullRefPtr height() const; NonnullRefPtr rx() const; NonnullRefPtr ry() const; private: Gfx::FloatPoint calculate_used_corner_radius_values(); Optional m_path; Optional m_x; Optional m_y; Optional m_width; Optional m_height; Optional m_radius_x; Optional m_radius_y; }; }