github ↗
docs menu

Module Hugin.Size

Figure sizes.

A size says which length the caller fixes: the whole figure's, or each data area's, the figure growing to hold what protrudes. Lengths are in points; Size.mm and Size.dpi convert other units.

#type t

The type for sizes.

#val figure : float -> float -> t

figure w h is a figure w points wide and h points high. The tracks of its grid share what aspect tracks, gaps, protrusions and the margin leave, and layout raises if that is less than they need.

Raises Invalid_argument if w or h is not finite and positive.

#val panels : float -> float -> t

panels w h gives each column of weight k (grid) a data area k *. w points wide and each row of weight k one k *. h points high, unless a panel with an aspect sets its height, the figure being as large as its tracks, gaps, protrusions and margin need. A track grows past that to hold a title, header or legend longer than it (layout).

Raises Invalid_argument if w or h is not finite and positive.

#val mm : float -> float

mm l is l millimetres in points, l *. 72. /. 25.4.

#val dpi : float -> float

dpi d is the density of d dots per inch, d /. 72. device pixels per point.

#val equal : t -> t -> bool

equal s s' is true iff s and s' fix the same length to equal values.

#val pp : Stdlib.Format.formatter -> t -> unit

pp ppf s formats s for debugging.