package fontforge-of-ocaml

  1. Overview
  2. Docs

PsMat which provides quick access to some useful transformations expressed as PostScript matrices. API: complete (compared to the Python API) except that the type PsMat.t become abstract.

Point

type t

Abstract type for transform PostScript matrices

val identity : unit -> t

Returns an identity matrix

val compose : mat1:t -> t -> t

Returns an identity matrix

Returns a matrix which is the composition of the two input transformations

val inverse : t -> t

Returns a matrix which is the composition of the two input transformations

Returns a matrix which is the inverse of the input transformation. (Note: There will not always be an inverse)

val rotate : float -> t

Returns a matrix which is the inverse of the input transformation. (Note: There will not always be an inverse)

Returns a matrix which will rotate by theta. Theta is expressed in radians

val scale : ?y:float -> float -> t

Returns a matrix which will rotate by theta. Theta is expressed in radians

Returns a matrix which will scale by x in the horizontal direction and y in the vertical. If y is omitted, it will scale by the same amount x in both directions

val skew : float -> t

Returns a matrix which will scale by x in the horizontal direction and y in the vertical. If y is omitted, it will scale by the same amount x in both directions

Returns a matrix which will skew by theta (to produce a oblique font). Theta is expressed in radians

val translate : x:float -> y:float -> t

Returns a matrix which will skew by theta (to produce a oblique font). Theta is expressed in radians

Returns a matrix which will translate by x in the horizontal direction and y in the vertical

OCaml

Innovation. Community. Security.