2022-03-21 18:33:11 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, Tim Flynn <trflynn89@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-09-02 12:04:59 +00:00
|
|
|
#include <LibWeb/Bindings/PlatformObject.h>
|
2022-03-21 18:33:11 +00:00
|
|
|
#include <LibWeb/SVG/SVGLength.h>
|
|
|
|
|
|
|
|
namespace Web::SVG {
|
|
|
|
|
|
|
|
// https://www.w3.org/TR/SVG11/types.html#InterfaceSVGAnimatedLength
|
2022-09-02 12:04:59 +00:00
|
|
|
class SVGAnimatedLength final : public Bindings::PlatformObject {
|
|
|
|
WEB_PLATFORM_OBJECT(SVGAnimatedLength, Bindings::PlatformObject);
|
2024-11-14 15:01:23 +00:00
|
|
|
GC_DECLARE_ALLOCATOR(SVGAnimatedLength);
|
2022-03-21 18:33:11 +00:00
|
|
|
|
2022-09-02 12:04:59 +00:00
|
|
|
public:
|
2024-11-14 15:01:23 +00:00
|
|
|
[[nodiscard]] static GC::Ref<SVGAnimatedLength> create(JS::Realm&, GC::Ref<SVGLength> base_val, GC::Ref<SVGLength> anim_val);
|
2022-09-02 12:04:59 +00:00
|
|
|
virtual ~SVGAnimatedLength() override;
|
2022-03-21 18:33:11 +00:00
|
|
|
|
2024-11-14 15:01:23 +00:00
|
|
|
GC::Ref<SVGLength> base_val() const { return m_base_val; }
|
|
|
|
GC::Ref<SVGLength> anim_val() const { return m_anim_val; }
|
2022-03-21 18:33:11 +00:00
|
|
|
|
|
|
|
private:
|
2024-11-14 15:01:23 +00:00
|
|
|
SVGAnimatedLength(JS::Realm&, GC::Ref<SVGLength> base_val, GC::Ref<SVGLength> anim_val);
|
2022-03-21 18:33:11 +00:00
|
|
|
|
2023-08-07 06:41:28 +00:00
|
|
|
virtual void initialize(JS::Realm&) override;
|
2022-09-02 12:04:59 +00:00
|
|
|
virtual void visit_edges(Cell::Visitor&) override;
|
|
|
|
|
2024-11-14 15:01:23 +00:00
|
|
|
GC::Ref<SVGLength> m_base_val;
|
|
|
|
GC::Ref<SVGLength> m_anim_val;
|
2022-03-21 18:33:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|