package camlpdf

  1. Overview
  2. Docs
type fpoint = float * float
type winding_rule =
  1. | EvenOdd
  2. | NonZero
type segment =
  1. | Straight of fpoint * fpoint
  2. | Bezier of fpoint * fpoint * fpoint * fpoint
type hole =
  1. | Hole
  2. | Not_hole
type closure =
  1. | Closed
  2. | Open
type subpath = hole * closure * segment list
type path = winding_rule * subpath list
val string_of_path : path -> string
type tiling =
  1. | Tiling
type function_shading = {
  1. funshading_domain : float * float * float * float;
  2. funshading_matrix : Pdftransform.transform_matrix;
  3. funshading_function : Pdffun.t;
}
type radial_shading = {
  1. radialshading_coords : float * float * float * float * float * float;
  2. radialshading_domain : float * float;
  3. radialshading_function : Pdffun.t list;
  4. radialshading_extend : bool * bool;
}
type axial_shading = {
  1. axialshading_coords : float * float * float * float;
  2. axialshading_domain : float * float;
  3. axialshading_function : Pdffun.t list;
  4. axialshading_extend : bool * bool;
}
type shading_kind =
  1. | FunctionShading of function_shading
  2. | AxialShading of axial_shading
  3. | RadialShading of radial_shading
  4. | FreeFormGouraudShading
  5. | LatticeFormGouraudShading
  6. | CoonsPatchMesh
  7. | TensorProductPatchMesh
type shading = {
  1. shading_colourspace : Pdf.pdfobject;
  2. shading_background : Pdf.pdfobject option;
  3. shading_bbox : Pdf.pdfobject option;
  4. shading_antialias : bool;
  5. shading_matrix : Pdftransform.transform_matrix;
  6. shading_extgstate : Pdf.pdfobject;
  7. shading : shading_kind;
}
type pattern =
  1. | ColouredTilingPattern of tiling
  2. | UncolouredTilingPattern of tiling
  3. | ShadingPattern of shading
type colvals =
  1. | Floats of float list
  2. | Named of string * float list
  3. | Pattern of pattern
type transparency_attributes = {
  1. fill_transparency : float;
  2. line_transparency : float;
}
type path_attributes = {
  1. path_transform : Pdftransform.transform_matrix;
  2. path_fill : (Pdfspace.t * colvals) option;
  3. path_line : (Pdfspace.t * colvals) option;
  4. path_linewidth : float;
  5. path_joinstyle : int;
  6. path_capstyle : int;
  7. path_dash : float list * float;
  8. path_mitrelimit : float;
  9. path_transparency : transparency_attributes;
  10. path_intent : string;
}
type text_attributes = {
  1. textmode : int;
}
type textblock_attributes = {
  1. textblock_transform : Pdftransform.transform_matrix;
}
type textblock = text_attributes * Pdfops.t
type image_attributes = {
  1. image_transform : Pdftransform.transform_matrix;
  2. image_transparency : float;
  3. image_softmask : softmask option;
}
and softmask_subtype =
  1. | Alpha
  2. | Luminosity
and transparency_group = {
  1. tr_group_colourspace : Pdf.pdfobject option;
  2. isolated : bool;
  3. knockout : bool;
  4. tr_graphic : t;
}
and softmask = {
  1. softmask_subtype : softmask_subtype;
  2. transparency_group : transparency_group;
  3. softmask_bbox : float * float * float * float;
  4. backdrop : float list option;
  5. softmask_transfer : Pdffun.t option;
}
and fontname = string * Pdf.pdfobject
and graphic_elt =
  1. | Path of path * path_attributes
  2. | Text of textblock list * textblock_attributes
  3. | MCPoint of string
  4. | MCPointProperties of string * Pdf.pdfobject
  5. | MCSection of string * graphic_elt list
  6. | MCSectionProperties of string * Pdf.pdfobject * graphic_elt list
  7. | Image of image_attributes * int
  8. | GraphicInlineImage of Pdf.pdfobject * Pdfio.bytes * Pdftransform.transform_matrix
  9. | Clip of path * graphic_elt list
  10. | Shading of path option * shading * Pdftransform.transform_matrix
and t = {
  1. elements : graphic_elt list;
  2. fonts : fontname list;
  3. resources : Pdf.pdfobject;
}
val bbox_of_graphic : t -> float * float * float * float
val graphic_of_page : Pdf.t -> Pdfpage.t -> t
val graphic_of_ops : Pdfops.t list -> t
val page_of_graphic : Pdf.t -> (float * float * float * float) -> t -> Pdfpage.t
val string_of_graphic : t -> string
val ops_of_simple_graphic : t -> Pdfops.t list
val streams_of_simple_graphic : t -> Pdf.pdfobject list
val transform_graphic : Pdftransform.transform_matrix -> t -> t
OCaml

Innovation. Community. Security.