ladybird/Userland/Libraries/LibWeb/HTML/Path2D.h

33 lines
772 B
C
Raw Normal View History

2022-08-11 16:50:23 +01:00
/*
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/RefCounted.h>
#include <LibGfx/Path.h>
2022-09-02 23:35:06 +02:00
#include <LibWeb/Bindings/PlatformObject.h>
2022-08-11 16:50:23 +01:00
#include <LibWeb/HTML/Canvas/CanvasPath.h>
namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/canvas.html#path2d
2022-09-02 23:35:06 +02:00
class Path2D final
: public Bindings::PlatformObject
2022-08-11 16:50:23 +01:00
, public CanvasPath {
2022-09-02 23:35:06 +02:00
WEB_PLATFORM_OBJECT(Path2D, Bindings::PlatformObject);
2022-08-11 16:50:23 +01:00
public:
static JS::NonnullGCPtr<Path2D> construct_impl(JS::Realm&, Optional<Variant<JS::Handle<Path2D>, DeprecatedString>> const& path);
2022-08-11 16:50:23 +01:00
2022-09-02 23:35:06 +02:00
virtual ~Path2D() override;
2022-08-11 16:50:23 +01:00
private:
Path2D(JS::Realm&, Optional<Variant<JS::Handle<Path2D>, DeprecatedString>> const&);
2022-08-11 16:50:23 +01:00
};
}