/* * Copyright (c) 2022, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace Web::SVG { // https://www.w3.org/TR/SVG11/types.html#InterfaceSVGLength class SVGLength : public RefCounted , public Bindings::Wrappable , public Weakable { public: using WrapperType = Bindings::SVGLengthWrapper; static NonnullRefPtr create(u8 unit_type, float value); virtual ~SVGLength() = default; u8 unit_type() const { return m_unit_type; } float value() const { return m_value; } DOM::ExceptionOr set_value(float value); private: SVGLength(u8 unit_type, float value); u8 m_unit_type { 0 }; float m_value { 0 }; }; }