blob: 1b3ff0a2aae6d93b15ec6b0a0cbcfe6359dd3719 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGfx/Bitmap.h>
#include <LibWeb/HTML/HTMLElement.h>
#include <LibWeb/SVG/AttributeParser.h>
#include <LibWeb/SVG/SVGGeometryElement.h>
namespace Web::SVG {
class SVGPathElement final : public SVGGeometryElement {
public:
using WrapperType = Bindings::SVGPathElementWrapper;
SVGPathElement(DOM::Document&, DOM::QualifiedName);
virtual ~SVGPathElement() override = default;
virtual void parse_attribute(FlyString const& name, String const& value) override;
virtual Gfx::Path& get_path() override;
private:
Vector<PathInstruction> m_instructions;
Gfx::FloatPoint m_previous_control_point = {};
Optional<Gfx::Path> m_path;
};
}
|