ladybird/Userland/Libraries/LibPDF/Function.h
Nico Weber 9204252d02 LibPDF: Add scaffolding for function objects
See PDF 1.7 Spec, "3.9 Functions".
2023-11-06 10:01:05 +01:00

21 lines
460 B
C++

/*
* 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;
};
}