Module Hugin_gg_kit.Pgon2
Polygons.
A polygon is a list of Ring2 rings. Its surface is the set of points around which the rings together wind a non-zero number of times, as the conventions state. Outer boundaries are positively oriented and holes negatively: a square with a hole is a positively oriented square and, inside it, a negatively oriented ring. Field2.isoband returns polygons of this form, whose rings neither cross nor overlap.
Types
type tThe type for polygons.
Constructors
Accessors
Measures
area p is the signed area of the rings of p, the sum of their Ring2.areas. It is the area of the surface of p, up to rounding, when the rings of p wind 0 or 1 times around every point off them, as those of Field2.isoband do.
val bounds : t -> Hugin_gg.Box2.t optionbounds p is the smallest box containing the points of the rings of p, or None if they have no point.
Converting
val to_path : t -> Hugin_gg.Path.tto_path p is the subpaths Ring2.to_path gives for the rings of p, in order. Filled with the nonzero rule, it paints the surface of p.
Comparing and formatting
equal p p' is true iff p and p' have Ring2.equal rings in the same order.