1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:27:35 +00:00

LibPDF: Add scaffolding for function objects

See PDF 1.7 Spec, "3.9 Functions".
This commit is contained in:
Nico Weber 2023-11-03 06:18:37 -04:00 committed by Andreas Kling
parent 21894f1cde
commit 9204252d02
3 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1,21 @@
/*
* Copyright (c) 2023, Nico Weber <thakis@chromium.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Forward.h>
#include <LibPDF/Value.h>
namespace PDF {
class Function : public RefCounted<Function> {
public:
static PDFErrorOr<NonnullRefPtr<Function>> create(Document*, NonnullRefPtr<Object>);
virtual ~Function() = default;
virtual PDFErrorOr<ReadonlySpan<float>> evaluate(ReadonlySpan<float>) const = 0;
};
}