SVGAnimatedLength.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2022, Tim Flynn <trflynn89@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/RefCounted.h>
  8. #include <AK/Weakable.h>
  9. #include <LibWeb/Bindings/Wrappable.h>
  10. #include <LibWeb/SVG/SVGLength.h>
  11. namespace Web::SVG {
  12. // https://www.w3.org/TR/SVG11/types.html#InterfaceSVGAnimatedLength
  13. class SVGAnimatedLength
  14. : public RefCounted<SVGAnimatedLength>
  15. , public Bindings::Wrappable
  16. , public Weakable<SVGAnimatedLength> {
  17. public:
  18. using WrapperType = Bindings::SVGAnimatedLengthWrapper;
  19. static NonnullRefPtr<SVGAnimatedLength> create(NonnullRefPtr<SVGLength> base_val, NonnullRefPtr<SVGLength> anim_val);
  20. virtual ~SVGAnimatedLength() = default;
  21. NonnullRefPtr<SVGLength> const& base_val() const { return m_base_val; }
  22. NonnullRefPtr<SVGLength> const& anim_val() const { return m_anim_val; }
  23. private:
  24. SVGAnimatedLength(NonnullRefPtr<SVGLength> base_val, NonnullRefPtr<SVGLength> anim_val);
  25. NonnullRefPtr<SVGLength> m_base_val;
  26. NonnullRefPtr<SVGLength> m_anim_val;
  27. };
  28. }