mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 18:55:07 +00:00

...instead of defaulting to a PaintableBox. This way it gets the same behavior as other SVG boxes during paint.
28 lines
649 B
C++
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&);
|
|
};
|
|
|
|
}
|