ITADN

New stroker can produce NaN paths

#519OpenLaurenzV 创建于 2025-10-17
L
LaurenzVcommented
See this example: ```rs use kurbo::{BezPath, Stroke, StrokeOpts}; fn main() { let path = BezPath::from_svg("M47.5884,316.827 C47.5884,316.827 47.4321,317.6239 47.4321,317.6239 C46.7915,317.7801 46.7915,317.2176 46.7915,317.2176 Z").unwrap(); let stroke = Stroke { width: 10.0, ..Stroke::default() }; let expanded = kurbo::stroke(&path, &stroke, &StrokeOpts::default(), 0.25); eprintln!("{:?}", expanded.is_nan()); } ``` When using 0.12, this will print `true`, while it will print false for 0.11.3. It somehow seems to be related to the very large width, because reducing it to 5 for example makes the issue go away.
2 条评论