2023-04-18 18:51:00 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2023, MacDue <macdue@dueutil.tech>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <LibWeb/Bindings/Intrinsics.h>
|
2024-04-27 12:09:58 +12:00
|
|
|
#include <LibWeb/Bindings/SVGAnimatedNumberPrototype.h>
|
2023-04-18 18:51:00 +01:00
|
|
|
#include <LibWeb/SVG/SVGAnimatedNumber.h>
|
|
|
|
|
|
|
|
namespace Web::SVG {
|
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
GC_DEFINE_ALLOCATOR(SVGAnimatedNumber);
|
2023-11-19 19:47:52 +01:00
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
GC::Ref<SVGAnimatedNumber> SVGAnimatedNumber::create(JS::Realm& realm, float base_val, float anim_val)
|
2023-04-18 18:51:00 +01:00
|
|
|
{
|
2024-11-14 05:50:17 +13:00
|
|
|
return realm.create<SVGAnimatedNumber>(realm, base_val, anim_val);
|
2023-04-18 18:51:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
SVGAnimatedNumber::SVGAnimatedNumber(JS::Realm& realm, float base_val, float anim_val)
|
|
|
|
: PlatformObject(realm)
|
|
|
|
, m_base_val(base_val)
|
|
|
|
, m_anim_val(anim_val)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
SVGAnimatedNumber::~SVGAnimatedNumber() = default;
|
|
|
|
|
2023-08-07 08:41:28 +02:00
|
|
|
void SVGAnimatedNumber::initialize(JS::Realm& realm)
|
2023-04-18 18:51:00 +01:00
|
|
|
{
|
2023-08-07 08:41:28 +02:00
|
|
|
Base::initialize(realm);
|
2024-03-16 13:13:08 +01:00
|
|
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGAnimatedNumber);
|
2023-04-18 18:51:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|