1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 18:55:07 +00:00
serenity/Userland/Libraries/LibWeb/Painting/SVGGraphicsPaintable.h
Andreas Kling ec5d5918c4 LibWeb: Make SVG <g> elements generate a SVGGraphicsPaintable
...instead of defaulting to a PaintableBox. This way it gets the same
behavior as other SVG boxes during paint.
2023-04-19 07:52:26 +02:00

28 lines
649 B
C++

/*
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Layout/SVGGraphicsBox.h>
#include <LibWeb/Painting/SVGPaintable.h>
namespace Web::Painting {
class SVGGraphicsPaintable : public SVGPaintable {
JS_CELL(SVGGraphicsPaintable, SVGPaintable);
public:
static JS::NonnullGCPtr<SVGGraphicsPaintable> create(Layout::SVGGraphicsBox const&);
virtual void before_children_paint(PaintContext&, PaintPhase) const override;
Layout::SVGGraphicsBox const& layout_box() const;
protected:
SVGGraphicsPaintable(Layout::SVGGraphicsBox const&);
};
}