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:
parent
21894f1cde
commit
9204252d02
3 changed files with 80 additions and 0 deletions
21
Userland/Libraries/LibPDF/Function.h
Normal file
21
Userland/Libraries/LibPDF/Function.h
Normal 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;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue