mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:17:46 +00:00
LibWeb: Add SVG <line>
element and test case :^)
This commit is contained in:
parent
3a1a35ef8f
commit
17912330c4
11 changed files with 126 additions and 0 deletions
33
Userland/Libraries/LibWeb/SVG/SVGLineElement.h
Normal file
33
Userland/Libraries/LibWeb/SVG/SVGLineElement.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* 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 SVGLineElement final : public SVGGeometryElement {
|
||||
public:
|
||||
using WrapperType = Bindings::SVGLineElementWrapper;
|
||||
|
||||
SVGLineElement(DOM::Document&, QualifiedName);
|
||||
virtual ~SVGLineElement() 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;
|
||||
|
||||
Optional<float> m_x1;
|
||||
Optional<float> m_y1;
|
||||
Optional<float> m_x2;
|
||||
Optional<float> m_y2;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue