package wall

  1. Overview
  2. Docs

Module Wall.TransformSource

Definition of affine transformation matrices.

Sourcetype t = Wall_types.transform = {
  1. x00 : float;
  2. x01 : float;
  3. x10 : float;
  4. x11 : float;
  5. x20 : float;
  6. x21 : float;
}
Sourceval identity : t
Sourceval average_scale : t -> float
Sourceval scale_x : t -> float
Sourceval scale_y : t -> float
Sourceval translation : x:float -> y:float -> t
Sourceval rotation : a:float -> t
Sourceval scale : sx:float -> sy:float -> t
Sourceval skew : sx:float -> sy:float -> t
Sourceval compose : t -> t -> t
Sourceval inverse : t -> t
Sourceval translate : x:float -> y:float -> t -> t
Sourceval rotate : float -> t -> t
Sourceval rescale : sx:float -> sy:float -> t -> t
Sourceval px : t -> float -> float -> float

px t x y is the x coordinate of the point (x,y) after applying the affine transformation t.

Sourceval py : t -> float -> float -> float

py t x y is the y coordinate of the point (x,y) after applying the affine transformation t.

Sourceval linear_px : t -> float -> float -> float

linear_px t x y is the x coordinate of the point (x,y) after applying the linear transformation described by t. Translation is ignored!

Sourceval linear_py : t -> float -> float -> float

linear_py t x y is the y coordinate of the point (x,y) after applying the linear transformation described by t. Translation is ignored!

Sourceval point : t -> Gg.p2 -> Gg.p2

point t p is the point p after transformation by t

OCaml

Innovation. Community. Security.