Skip to main content

SHAPE_FLATTEN_TOLERANCE

Constant SHAPE_FLATTEN_TOLERANCE 

Source
pub const SHAPE_FLATTEN_TOLERANCE: f32 = 0.25;
Expand description

Curve-flattening tolerance, in local item coordinates.

Fixed rather than derived from the live zoom so a ShapeGeometry can memoise its polyline behind one cell with no cache key. 0.25 keeps the approximation under one device pixel out to 4× zoom and under ~5 px at 20×.