mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Implement <feOffset> SVG filter
This commit is contained in:
parent
89b59cb5c3
commit
1377dba7af
Notes:
github-actions[bot]
2025-08-07 14:43:35 +00:00
Author: https://github.com/gmta
Commit: 1377dba7af
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5742
11 changed files with 141 additions and 0 deletions
41
Libraries/LibWeb/SVG/SVGFEOffsetElement.h
Normal file
41
Libraries/LibWeb/SVG/SVGFEOffsetElement.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/SVG/SVGAnimatedNumber.h>
|
||||
#include <LibWeb/SVG/SVGAnimatedString.h>
|
||||
#include <LibWeb/SVG/SVGElement.h>
|
||||
#include <LibWeb/SVG/SVGFilterPrimitiveStandardAttributes.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
// https://www.w3.org/TR/filter-effects-1/#svgfeoffsetelement
|
||||
class SVGFEOffsetElement final
|
||||
: public SVGElement
|
||||
, public SVGFilterPrimitiveStandardAttributes<SVGFEOffsetElement> {
|
||||
WEB_PLATFORM_OBJECT(SVGFEOffsetElement, SVGElement);
|
||||
GC_DECLARE_ALLOCATOR(SVGFEOffsetElement);
|
||||
|
||||
public:
|
||||
virtual ~SVGFEOffsetElement() override = default;
|
||||
|
||||
GC::Ref<SVGAnimatedString> in1();
|
||||
GC::Ref<SVGAnimatedNumber> dx();
|
||||
GC::Ref<SVGAnimatedNumber> dy();
|
||||
|
||||
private:
|
||||
SVGFEOffsetElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
GC::Ptr<SVGAnimatedString> m_in1;
|
||||
GC::Ptr<SVGAnimatedNumber> m_dx;
|
||||
GC::Ptr<SVGAnimatedNumber> m_dy;
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue