Crate polylabel

Source
Expand description

This crate provides a Rust implementation of the Polylabel algorithm for finding the optimum position of a polygon label.

ffi bindings are provided: enable the ffi and headers features when building the crate.

Modules§

errors
Errors that can occur when determining an optimum label position

Structs§

Array
Wrapper for a void pointer to a sequence of 2-element arrays representing points, and the sequence length. Used for FFI.
Position
FFI struct for returned optimum Polygon label position
WrapperArray
Wrapper for a void pointer to a sequence of Arrays, and the sequence length. Used for FFI.

Functions§

polylabel
Calculate a Polygon’s ideal label position by calculating its ✨pole of inaccessibility✨
polylabel_ffi
FFI access to the polylabel function