/* * 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 { WEB_PLATFORM_OBJECT(SVGRectElement, SVGGeometryElement); public: virtual ~SVGRectElement() override = default; virtual void parse_attribute(FlyString const& name, DeprecatedString const& value) override; virtual Gfx::Path& get_path() override; JS::NonnullGCPtr x() const; JS::NonnullGCPtr y() const; JS::NonnullGCPtr width() const; JS::NonnullGCPtr height() const; JS::NonnullGCPtr rx() const; JS::NonnullGCPtr ry() const; private: SVGRectElement(DOM::Document&, DOM::QualifiedName); 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; }; }