Skip to main content

approx_poly_dp

Function approx_poly_dp 

Source
pub fn approx_poly_dp(
    src: &[(i32, i32)],
    eps: f64,
    closed: bool,
) -> Vec<(i32, i32)>
Expand description

Approximate a polygonal curve with the Douglas–Peucker algorithm.

eps is the maximum distance (in pixels) between the original curve and its approximation. Returns the approximated vertices in order.