Function.h 460 B

123456789101112131415161718192021
  1. /*
  2. * Copyright (c) 2023, Nico Weber <thakis@chromium.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Forward.h>
  8. #include <LibPDF/Value.h>
  9. namespace PDF {
  10. class Function : public RefCounted<Function> {
  11. public:
  12. static PDFErrorOr<NonnullRefPtr<Function>> create(Document*, NonnullRefPtr<Object>);
  13. virtual ~Function() = default;
  14. virtual PDFErrorOr<ReadonlySpan<float>> evaluate(ReadonlySpan<float>) const = 0;
  15. };
  16. }