ladybird/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.h
Sam Atkins 784c3183f7 LibWeb: Rename SVGPathBox -> SVGGeometryBox
This fits better since it's now used by all SVGGeometryElements.
2022-02-11 21:38:27 +01:00

31 lines
951 B
C++

/*
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Layout/SVGGraphicsBox.h>
#include <LibWeb/SVG/SVGGeometryElement.h>
namespace Web::Layout {
class SVGGeometryBox final : public SVGGraphicsBox {
public:
SVGGeometryBox(DOM::Document&, SVG::SVGGeometryElement&, NonnullRefPtr<CSS::StyleProperties>);
virtual ~SVGGeometryBox() override = default;
SVG::SVGGeometryElement& dom_node() { return verify_cast<SVG::SVGGeometryElement>(SVGGraphicsBox::dom_node()); }
SVG::SVGGeometryElement const& dom_node() const { return verify_cast<SVG::SVGGeometryElement>(SVGGraphicsBox::dom_node()); }
virtual void paint(PaintContext& context, PaintPhase phase) override;
private:
virtual bool is_svg_geometry_box() const final { return true; }
};
template<>
inline bool Node::fast_is<SVGGeometryBox>() const { return is_svg_geometry_box(); }
}