/* * Copyright (c) 2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Web::Painting { class SVGGeometryPaintable final : public SVGGraphicsPaintable { JS_CELL(SVGGeometryPaintable, SVGGraphicsPaintable); public: static JS::NonnullGCPtr create(Layout::SVGGeometryBox const&); virtual Optional hit_test(CSSPixelPoint, HitTestType) const override; virtual void paint(PaintContext&, PaintPhase) const override; Layout::SVGGeometryBox const& layout_box() const; void set_computed_path(Gfx::Path path) { m_computed_path = move(path); } Optional const& computed_path() const { return m_computed_path; } protected: SVGGeometryPaintable(Layout::SVGGeometryBox const&); Optional m_computed_path = {}; }; }