summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/SVG/SVGAnimatedLength.h
blob: 2d92ef6f965a79c73712b11f0c36ad4f62b7facb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * Copyright (c) 2022, Tim Flynn <trflynn89@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <LibWeb/Bindings/PlatformObject.h>
#include <LibWeb/SVG/SVGLength.h>

namespace Web::SVG {

// https://www.w3.org/TR/SVG11/types.html#InterfaceSVGAnimatedLength
class SVGAnimatedLength final : public Bindings::PlatformObject {
    WEB_PLATFORM_OBJECT(SVGAnimatedLength, Bindings::PlatformObject);

public:
    static JS::NonnullGCPtr<SVGAnimatedLength> create(HTML::Window&, JS::NonnullGCPtr<SVGLength> base_val, JS::NonnullGCPtr<SVGLength> anim_val);
    virtual ~SVGAnimatedLength() override;

    JS::NonnullGCPtr<SVGLength> base_val() const { return m_base_val; }
    JS::NonnullGCPtr<SVGLength> anim_val() const { return m_anim_val; }

private:
    SVGAnimatedLength(HTML::Window&, JS::NonnullGCPtr<SVGLength> base_val, JS::NonnullGCPtr<SVGLength> anim_val);

    virtual void visit_edges(Cell::Visitor&) override;

    JS::NonnullGCPtr<SVGLength> m_base_val;
    JS::NonnullGCPtr<SVGLength> m_anim_val;
};

}

WRAPPER_HACK(SVGAnimatedLength, Web::SVG)