github ↗
docs menu

Module Hugin.Layout

Laid-out figures.

A laid-out figure is a resolved figure on a page: its text measured with the theme's faces, its ticks chosen and frozen, its guides built, its grid solved and each panel's projection fixed.

#type t

The type for laid-out figures.

#type panel = {
  1. #id : id;
    (*

    The id of the panel (Ids).

    *)
  2. #box : Box2.t;
    (*

    The data area, in points on the page.

    *)
  3. #projection : Coord.projection;
    (*

    The panel's projection.

    *)
}

The type for panels.

#val size : t -> float * float

size l is the width and height of the figure, in points.

#val panels : t -> panel list

panels l is the panels of l, in the order of the figure.

#val warnings : t -> warning list

warnings l is the warnings of resolving and laying out, in the order of the figure.

#val equal : t -> t -> bool

equal l l' is true iff l and l' lay out Resolved.equal figures in Theme.equal themes and have equal sizes, panels of equal ids, boxes and coordinate systems, equal frozen ticks, guides, headers and titles of equal contents in equal boxes, and equal warnings. Equal layouts draw Drawing.equal drawings at one density.

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

pp ppf l formats the page size, panels, ticks and guides of l and the warnings, for debugging and baselines.