Expand description
Buffer / offset (Minkowski sum with a disk) of polygons, polylines,
and points via i_overlay.
- Polygons: positive distance inflates, negative erodes. A heavy
negative buffer may erase or split a polygon — output is
therefore a
Vec<Polygon>. - Polylines: stroked into a buffered polygon strip of width
2 * distance. Open paths. - Points: emitted as round polygons of radius
distance(approx via i_overlay’s round join).
Negative distance for polylines and points is ignored (an open path or a point has no interior to erode).
Structs§
- Buffer
Opts - Configuration for
buffer_polygons.
Enums§
- Buffer
Join - Join (corner) style applied at vertices of the offset path.
Functions§
- buffer_
lines - Stroke each polyline into a buffered polygon strip of width
2 * distance.abs(). Open paths (start ≠ end). Negative distance has no meaning here and is treated as its absolute value. - buffer_
points - Emit a regular n-gon approximating a disk of radius
distance.abs()per input point. Segment count is derived fromBufferJoin::Round’smax_segment_angle_rad; other joins default to 32 segments. - buffer_
polygons - Inflate (positive) or erode (negative) every polygon. Heavy
erosion can split a polygon; the result is therefore a single flat
Vec<Polygon>.