SVGAnimatedNumber.cpp 856 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2023, MacDue <macdue@dueutil.tech>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Bindings/Intrinsics.h>
  7. #include <LibWeb/Bindings/SVGAnimatedNumberPrototype.h>
  8. #include <LibWeb/SVG/SVGAnimatedNumber.h>
  9. namespace Web::SVG {
  10. GC_DEFINE_ALLOCATOR(SVGAnimatedNumber);
  11. GC::Ref<SVGAnimatedNumber> SVGAnimatedNumber::create(JS::Realm& realm, float base_val, float anim_val)
  12. {
  13. return realm.create<SVGAnimatedNumber>(realm, base_val, anim_val);
  14. }
  15. SVGAnimatedNumber::SVGAnimatedNumber(JS::Realm& realm, float base_val, float anim_val)
  16. : PlatformObject(realm)
  17. , m_base_val(base_val)
  18. , m_anim_val(anim_val)
  19. {
  20. }
  21. SVGAnimatedNumber::~SVGAnimatedNumber() = default;
  22. void SVGAnimatedNumber::initialize(JS::Realm& realm)
  23. {
  24. Base::initialize(realm);
  25. WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGAnimatedNumber);
  26. }
  27. }