/* * Copyright (c) 2025, Tim Ledbetter * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "SVGAnimatedNumber.h" #include #include #include namespace Web::SVG { class SVGFECompositeElement final : public SVGElement , public SVGFilterPrimitiveStandardAttributes { WEB_PLATFORM_OBJECT(SVGFECompositeElement, SVGElement); GC_DECLARE_ALLOCATOR(SVGFECompositeElement); public: virtual ~SVGFECompositeElement() override = default; GC::Ref in1(); GC::Ref in2(); GC::Ref k1(); GC::Ref k2(); GC::Ref k3(); GC::Ref k4(); enum class CompositingOperator : u8 { Unknown = 0, Over = 1, In = 2, Out = 3, Atop = 4, Xor = 5, Arithmetic = 6, Lighter = 7, }; SVGFECompositeElement::CompositingOperator operator_() const; GC::Ref operator_for_bindings() const; private: SVGFECompositeElement(DOM::Document&, DOM::QualifiedName); virtual void initialize(JS::Realm&) override; virtual void visit_edges(Cell::Visitor&) override; virtual void attribute_changed(FlyString const& name, Optional const& old_value, Optional const& new_value, Optional const& namespace_) override; GC::Ptr m_in1; GC::Ptr m_in2; GC::Ptr m_k1; GC::Ptr m_k2; GC::Ptr m_k3; GC::Ptr m_k4; Optional m_operator; }; }