mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibWeb: Add SVG <polygon>
element and test case :^)
This commit is contained in:
parent
116a1f485c
commit
2fad940b0b
10 changed files with 114 additions and 1 deletions
30
Userland/Libraries/LibWeb/SVG/SVGPolygonElement.h
Normal file
30
Userland/Libraries/LibWeb/SVG/SVGPolygonElement.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/SVG/SVGGeometryElement.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
class SVGPolygonElement final : public SVGGeometryElement {
|
||||
public:
|
||||
using WrapperType = Bindings::SVGPolygonElementWrapper;
|
||||
|
||||
SVGPolygonElement(DOM::Document&, QualifiedName);
|
||||
virtual ~SVGPolygonElement() override = default;
|
||||
|
||||
virtual void parse_attribute(FlyString const& name, String const& value) override;
|
||||
|
||||
virtual Gfx::Path& get_path() override;
|
||||
|
||||
private:
|
||||
Optional<Gfx::Path> m_path;
|
||||
|
||||
Vector<Gfx::FloatPoint> m_points;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue