2020-07-20 03:01:53 -03:00
|
|
|
/*
|
2021-04-22 20:53:07 -03:00
|
|
|
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
|
2020-07-20 03:01:53 -03:00
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-07-20 03:01:53 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2025-07-19 23:35:33 -03:00
|
|
|
#include <LibWeb/Export.h>
|
2020-11-22 11:53:01 -03:00
|
|
|
#include <LibWeb/Layout/SVGBox.h>
|
2020-10-05 20:14:36 -03:00
|
|
|
#include <LibWeb/SVG/SVGElement.h>
|
|
|
|
|
#include <LibWeb/SVG/SVGGraphicsElement.h>
|
2020-07-20 03:01:53 -03:00
|
|
|
|
2020-11-22 11:53:01 -03:00
|
|
|
namespace Web::Layout {
|
2020-07-20 03:01:53 -03:00
|
|
|
|
2025-07-19 23:35:33 -03:00
|
|
|
class WEB_API SVGGraphicsBox : public SVGBox {
|
2024-11-14 12:01:23 -03:00
|
|
|
GC_CELL(SVGGraphicsBox, SVGBox);
|
2022-10-17 09:41:50 -03:00
|
|
|
|
2020-07-20 03:01:53 -03:00
|
|
|
public:
|
2024-12-20 12:35:12 -03:00
|
|
|
SVGGraphicsBox(DOM::Document&, SVG::SVGGraphicsElement&, GC::Ref<CSS::ComputedProperties>);
|
2020-11-22 11:53:01 -03:00
|
|
|
virtual ~SVGGraphicsBox() override = default;
|
2020-07-20 03:01:53 -03:00
|
|
|
|
2025-01-21 11:12:05 -03:00
|
|
|
SVG::SVGGraphicsElement& dom_node() { return as<SVG::SVGGraphicsElement>(SVGBox::dom_node()); }
|
|
|
|
|
SVG::SVGGraphicsElement const& dom_node() const { return as<SVG::SVGGraphicsElement>(SVGBox::dom_node()); }
|
2023-04-18 13:56:06 -03:00
|
|
|
|
2024-11-14 12:01:23 -03:00
|
|
|
virtual GC::Ptr<Painting::Paintable> create_paintable() const override;
|
2025-04-18 05:28:46 -03:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
virtual bool is_svg_graphics_box() const override { return true; }
|
2020-07-20 03:01:53 -03:00
|
|
|
};
|
|
|
|
|
|
2025-04-18 05:28:46 -03:00
|
|
|
template<>
|
|
|
|
|
inline bool Node::fast_is<SVGGraphicsBox>() const { return is_svg_graphics_box(); }
|
|
|
|
|
|
2020-07-20 03:01:53 -03:00
|
|
|
}
|