LibWeb: Add SVG <circle> element and test case :^)

This commit is contained in:
Sam Atkins 2022-02-11 16:14:58 +00:00 committed by Andreas Kling
commit 21bdcee3c3
Notes: sideshowbarker 2024-07-17 19:00:36 +09:00
11 changed files with 132 additions and 0 deletions

View file

@ -0,0 +1,32 @@
/*
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/SVG/SVGGeometryElement.h>
namespace Web::SVG {
class SVGCircleElement final : public SVGGeometryElement {
public:
using WrapperType = Bindings::SVGCircleElementWrapper;
SVGCircleElement(DOM::Document&, QualifiedName);
virtual ~SVGCircleElement() override = default;
virtual void parse_attribute(FlyString const& name, String const& value) override;
virtual Gfx::Path& get_path() override;
private:
Optional<Gfx::Path> m_path;
Optional<float> m_center_x;
Optional<float> m_center_y;
Optional<float> m_radius;
};
}