/* * Copyright (c) 2022, Sam Atkins * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Web::HTML { // https://html.spec.whatwg.org/multipage/canvas.html#path2d class Path2D : public RefCounted , public Bindings::Wrappable , public CanvasPath { AK_MAKE_NONCOPYABLE(Path2D); AK_MAKE_NONMOVABLE(Path2D); public: using WrapperType = Bindings::Path2DWrapper; static NonnullRefPtr create_with_global_object(HTML::Window&, Optional, String>> const& path) { return adopt_ref(*new Path2D(path)); } static NonnullRefPtr create(Optional, String>> const& path) { return adopt_ref(*new Path2D(path)); } ~Path2D() = default; private: Path2D(Optional, String>> const&); }; }