2022-02-11 16:14:58 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-03-22 16:37:16 +00:00
|
|
|
#include <LibWeb/SVG/SVGAnimatedLength.h>
|
2022-02-11 16:14:58 +00:00
|
|
|
#include <LibWeb/SVG/SVGGeometryElement.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::SVG {
|
|
|
|
|
|
|
|
|
|
class SVGCircleElement final : public SVGGeometryElement {
|
2023-01-09 21:51:45 -05:00
|
|
|
WEB_PLATFORM_OBJECT(SVGCircleElement, SVGGeometryElement);
|
2022-02-11 16:14:58 +00:00
|
|
|
|
2022-08-28 13:42:07 +02:00
|
|
|
public:
|
2022-02-11 16:14:58 +00:00
|
|
|
virtual ~SVGCircleElement() override = default;
|
|
|
|
|
|
2023-01-08 19:23:00 -05:00
|
|
|
virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
|
2022-02-11 16:14:58 +00:00
|
|
|
|
|
|
|
|
virtual Gfx::Path& get_path() override;
|
|
|
|
|
|
2022-09-02 14:04:59 +02:00
|
|
|
JS::NonnullGCPtr<SVGAnimatedLength> cx() const;
|
|
|
|
|
JS::NonnullGCPtr<SVGAnimatedLength> cy() const;
|
|
|
|
|
JS::NonnullGCPtr<SVGAnimatedLength> r() const;
|
2022-03-22 16:37:16 +00:00
|
|
|
|
2022-02-11 16:14:58 +00:00
|
|
|
private:
|
2022-08-28 13:42:07 +02:00
|
|
|
SVGCircleElement(DOM::Document&, DOM::QualifiedName);
|
|
|
|
|
|
2023-01-28 12:33:35 -05:00
|
|
|
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
2023-01-10 06:28:20 -05:00
|
|
|
|
2022-02-11 16:14:58 +00:00
|
|
|
Optional<Gfx::Path> m_path;
|
|
|
|
|
|
|
|
|
|
Optional<float> m_center_x;
|
|
|
|
|
Optional<float> m_center_y;
|
|
|
|
|
Optional<float> m_radius;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|