ladybird/Userland/Libraries/LibWeb/HTML/Canvas/CanvasRect.h
Sam Atkins c0494988ed LibWeb: Extract CanvasRect class from CRC2D
This one requires drawing to the canvas, so it doesn't make so much
sense to move the implementation over.
2022-08-14 11:30:40 +02:00

25 lines
559 B
C++

/*
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/canvas.html#canvasrect
class CanvasRect {
public:
virtual ~CanvasRect() = default;
virtual void fill_rect(float x, float y, float width, float height) = 0;
virtual void stroke_rect(float x, float y, float width, float height) = 0;
virtual void clear_rect(float x, float y, float width, float height) = 0;
protected:
CanvasRect() = default;
};
}