Module Pdffun

module Pdffun: sig .. end
Parsing and Evaluating PDF Functions - Some types of function missing.

type calculator = 
| If of calculator list
| IfElse of calculator list * calculator list
| Bool of bool
| Float of float
| Int of int32
| Abs
| Add
| Atan
| Ceiling
| Cos
| Cvi
| Cvr
| Div
| Exp
| Floor
| Idiv
| Ln
| Log
| Mod
| Mul
| Neg
| Round
| Sin
| Sqrt
| Sub
| Truncate
| And
| Bitshift
| Eq
| Ge
| Gt
| Le
| Lt
| Ne
| Not
| Or
| Xor
| Copy
| Exch
| Pop
| Dup
| Index
| Roll
type sampled = {
   size :int list;
   order :int;
   encode :float list;
   decode :float list;
   bps :int;
   samples :int32 array;
}
type interpolation = {
   c0 :float list;
   c1 :float list;
   n :float;
}
type stitching = {
   functions :pdf_fun list;
   bounds :float list;
   stitch_encode :float list;
}
type pdf_fun_kind = 
| Interpolation of interpolation
| Stitching of stitching
| Sampled of sampled
| Calculator of calculator list
type pdf_fun = {
   func :pdf_fun_kind;
   domain :float list;
   range :float list option;
}
The type of functions.
val parse_function : Pdf.pdfdoc -> Pdf.pdfobject -> pdf_fun
Parse a function given a document and function object.
exception BadFunctionEvaluation of string
Raised from eval_function (see below) in the case of inputs which don't match the evaluation
val eval_function : pdf_fun -> float list -> float list
Evaluate a function given a list of inputs.
val pdfobject_of_function : Pdf.pdfdoc -> pdf_fun -> Pdf.pdfobject
Flatten a function to its PDF representation