2022-03-10 14:02:25 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibWeb/Layout/SVGGeometryBox.h>
|
|
|
|
#include <LibWeb/Painting/SVGGraphicsPaintable.h>
|
|
|
|
|
|
|
|
namespace Web::Painting {
|
|
|
|
|
2023-01-11 14:02:53 +01:00
|
|
|
class SVGGeometryPaintable final : public SVGGraphicsPaintable {
|
2023-01-11 12:51:49 +01:00
|
|
|
JS_CELL(SVGGeometryPaintable, SVGGraphicsPaintable);
|
|
|
|
|
2022-03-10 14:02:25 +01:00
|
|
|
public:
|
2023-01-11 12:51:49 +01:00
|
|
|
static JS::NonnullGCPtr<SVGGeometryPaintable> create(Layout::SVGGeometryBox const&);
|
2022-03-10 14:02:25 +01:00
|
|
|
|
2023-04-10 12:35:33 +01:00
|
|
|
virtual Optional<HitTestResult> hit_test(CSSPixelPoint, HitTestType) const override;
|
|
|
|
|
2022-03-10 14:02:25 +01:00
|
|
|
virtual void paint(PaintContext&, PaintPhase) const override;
|
|
|
|
|
|
|
|
Layout::SVGGeometryBox const& layout_box() const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
SVGGeometryPaintable(Layout::SVGGeometryBox const&);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|