Mesh: no edge search for a lookup without tolerance

This commit is contained in:
dotCooCoo
2026-11-01 01:22:08 +07:00
committed by bflatastic
parent c1205c4017
commit fc820cc066
+3
View File
@@ -603,6 +603,9 @@ impl GradientMesh {
}
let bp = self.outline().to_bezpath();
if bp.winding(p) == 0 {
if tol.is_nan() || tol <= 0.0 {
return None;
}
return self.nearest_edge(p).filter(|e| e.0 <= tol * tol).map(|(_, r, c, u, v)| (r, c, u, v));
}
const N: usize = 16;