Serenity Operating System
at master 33 lines 692 B view raw
1/* 2 * Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#pragma once 8 9#include <AK/DeprecatedString.h> 10#include <LibWeb/HTML/Path2D.h> 11 12namespace Web::HTML { 13 14// https://html.spec.whatwg.org/multipage/canvas.html#canvasdrawpath 15class CanvasDrawPath { 16public: 17 virtual ~CanvasDrawPath() = default; 18 19 virtual void begin_path() = 0; 20 21 virtual void fill(DeprecatedString const& fill_rule) = 0; 22 virtual void fill(Path2D& path, DeprecatedString const& fill_rule) = 0; 23 24 virtual void stroke() = 0; 25 virtual void stroke(Path2D const& path) = 0; 26 27 virtual void clip() = 0; 28 29protected: 30 CanvasDrawPath() = default; 31}; 32 33}