IntPoint

The Clipper Library

IntPoint

Del.» TIntPoint = record X, Y: cInt; end;

C++ » struct IntPoint { cInt X; cInt Y; ... };

C#  » public class IntPoint { public cInt X; { get; set; } public cInt Y; { get; set; } ... };

The IntPoint structure is used to represent all vertices in the Clipper Library. An integer storage type has been deliberately chosen to preserve numerical robustness. (Early versions of the library used floating point coordinates, but it became apparent that floating point imprecision would always cause occasional errors.)

A sequence of IntPoints are contained within a Path structure to represent a single contour.

As of version 6, IntPoint now has an optional third member 'Z'. This can be enabled by exposing (ie uncommenting) the PreProcessor define 'use_xyz'. When the Z member is used, its values will be copied to corresponding verticies in solutions to clipping operations. However, at points of intersection where there's no corresponding Z value, the value will be assigned zero unless a new value is provided by a user supplied callback function.

Users wishing to clip or offset polygons containing floating point coordinates need to use appropriate scaling when converting these values to and from IntPoints.

See also the notes on rounding.

See Also

Rounding, Clipper.ZFillFunction, Defines, CInt, Path, Paths