mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 10:25:08 +00:00

From the spec: > Interface SVGGeometryElement represents SVG elements whose rendering > is defined by geometry with an equivalent path, and which can be > filled and stroked. This includes paths and the basic shapes. - https://svgwg.org/svg2-draft/types.html#InterfaceSVGGeometryElement Making them all create an SVGPathBox, and return a Path from get_path(), means we can implement the "basic shapes" using the path system we already have. :^)
26 lines
626 B
C++
26 lines
626 B
C++
/*
|
|
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWeb/SVG/SVGGraphicsElement.h>
|
|
|
|
namespace Web::SVG {
|
|
|
|
// https://svgwg.org/svg2-draft/types.html#InterfaceSVGGeometryElement
|
|
class SVGGeometryElement : public SVGGraphicsElement {
|
|
public:
|
|
using WrapperType = Bindings::SVGGeometryElementWrapper;
|
|
|
|
virtual RefPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
|
|
|
|
virtual Gfx::Path& get_path() = 0;
|
|
|
|
protected:
|
|
SVGGeometryElement(DOM::Document& document, QualifiedName qualified_name);
|
|
};
|
|
|
|
}
|