/* * Copyright (c) 2022, Sam Atkins * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace Web::HTML { // https://html.spec.whatwg.org/multipage/canvas.html#canvastext class CanvasText { public: virtual ~CanvasText() = default; virtual void fill_text(StringView, float x, float y, Optional max_width) = 0; virtual void stroke_text(StringView, float x, float y, Optional max_width) = 0; virtual GC::Ref measure_text(StringView text) = 0; protected: CanvasText() = default; }; }